[uClibc-cvs] uClibc/libc/sysdeps/linux/common/bits dirent.h,1.1,1.2

Erik Andersen andersen at codepoet.org
Mon Feb 10 21:15:22 UTC 2003


Update of /var/cvs/uClibc/libc/sysdeps/linux/common/bits
In directory winder:/tmp/cvs-serv15577/libc/sysdeps/linux/common/bits

Modified Files:
	dirent.h 
Log Message:
We need to have the size of struct dirent equal to the size of struct dirent64
so when _FILE_OFFSET_BITS=64 (such that we transparently change 32bit into 64
bit interfaces), we will not lose an unsigned char from d_name which silently
becomes the d_type field instead.  oops.
 -Erik


Index: dirent.h
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/common/bits/dirent.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dirent.h	1 Mar 2002 20:46:02 -0000	1.1
+++ dirent.h	10 Feb 2003 21:15:19 -0000	1.2
@@ -30,9 +30,7 @@
     __off64_t d_off;
 #endif
     unsigned short int d_reclen;
-#ifdef __USE_FILE_OFFSET64
     unsigned char d_type;
-#endif
     char d_name[256];		/* We must not include limits.h! */
   };
 
@@ -52,8 +50,4 @@
 #undef  _DIRENT_HAVE_D_NAMLEN
 #define _DIRENT_HAVE_D_RECLEN
 #define _DIRENT_HAVE_D_OFF
-#ifdef __USE_FILE_OFFSET64
-# define _DIRENT_HAVE_D_TYPE
-#else
-# undef _DIRENT_HAVE_D_TYPE
-#endif
+#define _DIRENT_HAVE_D_TYPE




More information about the uClibc-cvs mailing list