[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/lib ChangeLog system.h
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/lib ChangeLog system.h |
Date: |
Wed, 29 Aug 2007 00:27:02 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 07/08/29 00:27:02
Modified files:
lib : ChangeLog system.h
Log message:
* system.h: Correct statements about <string.h> and <stdlib.h>.
[DIRENT_MUST_BE, DIRENT_MIGHT_BE_DIR, DIRENT_MIGHT_BE_SYMLINK]: Adapt
definitions from glob.c.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/ChangeLog?cvsroot=cvs&r1=1.554&r2=1.555
http://cvs.savannah.gnu.org/viewcvs/ccvs/lib/system.h?cvsroot=cvs&r1=1.86&r2=1.87
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/ChangeLog,v
retrieving revision 1.554
retrieving revision 1.555
diff -u -b -r1.554 -r1.555
--- ChangeLog 27 Aug 2007 02:11:36 -0000 1.554
+++ ChangeLog 29 Aug 2007 00:27:01 -0000 1.555
@@ -1,3 +1,9 @@
+2007-08-28 Derek Price <address@hidden>
+
+ * system.h: Correct statements about <string.h> and <stdlib.h>.
+ [DIRENT_MUST_BE, DIRENT_MIGHT_BE_DIR, DIRENT_MIGHT_BE_SYMLINK]: Adapt
+ definitions from glob.c.
+
2007-08-26 Derek Price <address@hidden>
* Makefile.am: Import changes from...
Index: system.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/lib/system.h,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- system.h 11 Jul 2006 16:39:31 -0000 1.86
+++ system.h 29 Aug 2007 00:27:01 -0000 1.87
@@ -29,9 +29,8 @@
#include <signal.h>
#include <stdio.h>
-/* C89 hosted headers we _think_ GCC supplies even on freestanding systems.
- * If we find any systems which do not have them, a replacement header should
- * be discussed with the GNULIB folks.
+/* A GNULIB wrapper for these C89 headers is supplied to solve problems in
+ * deficient headers.
*
* For more information, please see the `Portability' section of the `HACKING'
* file.
@@ -173,8 +172,34 @@
# define R_OK 4
#endif
+/* GNULIB provides a replacement for this POSIX.2 header. */
#include <dirent.h>
+/* GNULIB defines HAVE_STRUCT_DIRENT_D_TYPE if the `d_type' member for
+ * `struct dirent' is available.
+ *
+ * Much of this is copied out of GNULIB's lib/glob.c.
+ */
+#if defined HAVE_STRUCT_DIRENT_D_TYPE
+/* True if the directory entry D must be of type T. */
+# define DIRENT_MUST_BE(d, t) ((d)->d_type == (t))
+
+/* True if the directory entry D might be a symbolic link. */
+# define DIRENT_MIGHT_BE_SYMLINK(d) \
+ ((d)->d_type == DT_UNKNOWN || (d)->d_type == DT_LNK)
+
+/* True if the directory entry D might be a directory. */
+# define DIRENT_MIGHT_BE_DIR(d) \
+ ((d)->d_type == DT_DIR || DIRENT_MIGHT_BE_SYMLINK (d))
+
+#else /* !HAVE_STRUCT_DIRENT_D_TYPE */
+# define DIRENT_MUST_BE(d, t) false
+# define DIRENT_MIGHT_BE_SYMLINK(d) true
+# define DIRENT_MIGHT_BE_DIR(d) true
+#endif /* HAVE_STRUCT_DIRENT_D_TYPE */
+
+
+
/* Convert B 512-byte blocks to kilobytes if K is nonzero,
otherwise return it unchanged. */
#define convert_blocks(b, k) ((k) ? ((b) + 1) / 2 : (b))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/lib ChangeLog system.h,
Derek Robert Price <=