* lib/isdir.c: Include "isdir.h".
(S_ISDIR): Remove now-unneeded definition.
* modules/isdir (Files): Add lib/isdir.h.
* lib/isdir.h: New file, with declaration.
* m4/isdir.m4: Remove file -- unneeded.
+2009-12-26 Jim Meyering <meyering@redhat.com>
+
+ isdir: clean up, since at least grep still uses it
+ * lib/isdir.c: Include "isdir.h".
+ (S_ISDIR): Remove now-unneeded definition.
+ * modules/isdir (Files): Add lib/isdir.h.
+ * lib/isdir.h: New file, with declaration.
+ * m4/isdir.m4: Remove file -- unneeded.
+
2009-12-25 Bruno Haible <bruno@clisp.org>
selinux-h: Make generated .h files standalone.
/* isdir.c -- determine whether a directory exists
- Copyright (C) 1990, 1998, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998, 2006, 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+#include "isdir.h"
+
#include <sys/types.h>
#include <sys/stat.h>
-#if STAT_MACROS_BROKEN
-# undef S_ISDIR
-#endif
-
-#if !defined S_ISDIR && defined S_IFDIR
-# define S_ISDIR(Mode) (((Mode) & S_IFMT) == S_IFDIR)
-#endif
-
/* If PATH is an existing directory or symbolic link to a directory,
return nonzero, else 0. */
-
int
isdir (const char *path)
{
--- /dev/null
+int isdir (const char *path);
+++ /dev/null
-# isdir.m4 serial 2
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_ISDIR],
-[
- dnl Prerequisites of lib/isdir.c.
- AC_REQUIRE([AC_HEADER_STAT])
-])
Files:
lib/isdir.c
-m4/isdir.m4
+lib/isdir.h
Depends-on:
stat