svn commit: trunk/uClibc/include: sys

psm at uclibc.org psm at uclibc.org
Thu Nov 3 19:13:26 UTC 2005


Author: psm
Date: 2005-11-03 11:13:24 -0800 (Thu, 03 Nov 2005)
New Revision: 12130

Log:
Sync headers w/ glibc

Modified:
   trunk/uClibc/include/dirent.h
   trunk/uClibc/include/sys/wait.h
   trunk/uClibc/include/time.h


Changeset:
Modified: trunk/uClibc/include/dirent.h
===================================================================
--- trunk/uClibc/include/dirent.h	2005-11-03 01:25:12 UTC (rev 12129)
+++ trunk/uClibc/include/dirent.h	2005-11-03 19:13:24 UTC (rev 12130)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2000, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -128,48 +128,62 @@
 typedef struct __dirstream DIR;
 
 /* Open a directory stream on NAME.
-   Return a DIR stream on the directory, or NULL if it could not be opened.  */
-extern DIR *opendir (__const char *__name) __THROW;
+   Return a DIR stream on the directory, or NULL if it could not be opened.
 
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern DIR *opendir (__const char *__name) __nonnull ((1));
+
 /* Close the directory stream DIRP.
-   Return 0 if successful, -1 if not.  */
-extern int closedir (DIR *__dirp) __THROW;
+   Return 0 if successful, -1 if not.
 
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern int closedir (DIR *__dirp) __nonnull ((1));
+
 /* Read a directory entry from DIRP.  Return a pointer to a `struct
    dirent' describing the entry, or NULL for EOF or error.  The
    storage returned may be overwritten by a later readdir call on the
    same DIR stream.
 
    If the Large File Support API is selected we have to use the
-   appropriate interface.  */
+   appropriate interface.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
 #ifndef __USE_FILE_OFFSET64
-extern struct dirent *readdir (DIR *__dirp) __THROW;
+extern struct dirent *readdir (DIR *__dirp) __nonnull ((1));
 #else
 # ifdef __REDIRECT
-extern struct dirent *__REDIRECT (readdir, (DIR *__dirp) __THROW, readdir64);
+extern struct dirent *__REDIRECT (readdir, (DIR *__dirp), readdir64)
+     __nonnull ((1));
 # else
 #  define readdir readdir64
 # endif
 #endif
 
 #ifdef __USE_LARGEFILE64
-extern struct dirent64 *readdir64 (DIR *__dirp) __THROW;
+extern struct dirent64 *readdir64 (DIR *__dirp) __nonnull ((1));
 #endif
 
 #if defined __USE_POSIX || defined __USE_MISC
 /* Reentrant version of `readdir'.  Return in RESULT a pointer to the
-   next entry.  */
+   next entry.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
 # ifndef __USE_FILE_OFFSET64
 extern int readdir_r (DIR *__restrict __dirp,
 		      struct dirent *__restrict __entry,
-		      struct dirent **__restrict __result) __THROW;
+		      struct dirent **__restrict __result)
+     __nonnull ((1, 2, 3));
 # else
 #  ifdef __REDIRECT
 extern int __REDIRECT (readdir_r,
 		       (DIR *__restrict __dirp,
 			struct dirent *__restrict __entry,
-			struct dirent **__restrict __result) __THROW,
-		       readdir64_r);
+			struct dirent **__restrict __result),
+		       readdir64_r) __nonnull ((1, 2, 3));
 #  else
 #   define readdir_r readdir64_r
 #  endif
@@ -178,28 +192,33 @@
 # ifdef __USE_LARGEFILE64
 extern int readdir64_r (DIR *__restrict __dirp,
 			struct dirent64 *__restrict __entry,
-			struct dirent64 **__restrict __result) __THROW;
+			struct dirent64 **__restrict __result)
+     __nonnull ((1, 2, 3));
 # endif
 #endif	/* POSIX or misc */
 
 /* Rewind DIRP to the beginning of the directory.  */
-extern void rewinddir (DIR *__dirp) __THROW;
+extern void rewinddir (DIR *__dirp) __THROW __nonnull ((1));
 
 #if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN
 # include <bits/types.h>
 
 /* Seek to position POS on DIRP.  */
-extern void seekdir (DIR *__dirp, long int __pos) __THROW;
+extern void seekdir (DIR *__dirp, long int __pos) __THROW __nonnull ((1));
 
 /* Return the current position of DIRP.  */
-extern long int telldir (DIR *__dirp) __THROW;
+extern long int telldir (DIR *__dirp) __THROW __nonnull ((1));
 #endif
 
 #if defined __USE_BSD || defined __USE_MISC
 
 /* Return the file descriptor used by DIRP.  */
-extern int dirfd (DIR *__dirp) __THROW;
+extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
 
+# if 0 /* defined __OPTIMIZE__ && defined _DIR_dirfd */
+#  define dirfd(dirp)	_DIR_dirfd (dirp)
+# endif
+
 # ifndef MAXNAMLEN
 /* Get the definitions of the POSIX.1 limits.  */
 #  include <bits/posix1_lim.h>
@@ -223,15 +242,16 @@
 extern int scandir (__const char *__restrict __dir,
 		    struct dirent ***__restrict __namelist,
 		    int (*__selector) (__const struct dirent *),
-		    int (*__cmp) (__const void *, __const void *)) __THROW;
+		    int (*__cmp) (__const void *, __const void *))
+     __nonnull ((1, 2));
 # else
 #  ifdef __REDIRECT
 extern int __REDIRECT (scandir,
 		       (__const char *__restrict __dir,
 			struct dirent ***__restrict __namelist,
 			int (*__selector) (__const struct dirent *),
-			int (*__cmp) (__const void *, __const void *)) __THROW,
-		       scandir64);
+			int (*__cmp) (__const void *, __const void *)),
+		       scandir64) __nonnull ((1, 2));
 #  else
 #   define scandir scandir64
 #  endif
@@ -243,19 +263,19 @@
 extern int scandir64 (__const char *__restrict __dir,
 		      struct dirent64 ***__restrict __namelist,
 		      int (*__selector) (__const struct dirent64 *),
-		      int (*__cmp) (__const void *, __const void *)) __THROW;
+		      int (*__cmp) (__const void *, __const void *))
+     __nonnull ((1, 2));
 # endif
 
 /* Function to compare two `struct dirent's alphabetically.  */
 # ifndef __USE_FILE_OFFSET64
 extern int alphasort (__const void *__e1, __const void *__e2)
-     __THROW __attribute_pure__;
+     __THROW __attribute_pure__ __nonnull ((1, 2));
 # else
 #  ifdef __REDIRECT
 extern int __REDIRECT (alphasort,
-		       (__const void *__e1, __const void *__e2)
-		       __THROW,
-		       alphasort64) __attribute_pure__;
+			   (__const void *__e1, __const void *__e2),
+			   alphasort64) __attribute_pure__ __nonnull ((1, 2));
 #  else
 #   define alphasort alphasort64
 #  endif
@@ -263,10 +283,9 @@
 
 # if defined __USE_GNU && defined __USE_LARGEFILE64
 extern int alphasort64 (__const void *__e1, __const void *__e2)
-     __THROW __attribute_pure__;
+     __THROW __attribute_pure__ __nonnull ((1, 2));
 # endif
 
-
 #endif /* Use BSD or misc.  */
 
 __END_DECLS

Modified: trunk/uClibc/include/sys/wait.h
===================================================================
--- trunk/uClibc/include/sys/wait.h	2005-11-03 01:25:12 UTC (rev 12129)
+++ trunk/uClibc/include/sys/wait.h	2005-11-03 19:13:24 UTC (rev 12130)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-2001,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@
 #include <signal.h>
 #include <sys/resource.h>
 
-/* These macros could also be defined int <stdlib.h>.  */
+/* These macros could also be defined in <stdlib.h>.  */
 #if !defined _STDLIB_H || !defined __USE_XOPEN
 /* This will define the `W*' macros for the flag
    bits to `waitpid', `wait3', and `wait4'.  */
@@ -105,9 +105,12 @@
 
 
 /* Wait for a child to die.  When one does, put its status in *STAT_LOC
-   and return its process ID.  For errors, return (pid_t) -1.  */
-extern __pid_t wait (__WAIT_STATUS __stat_loc) __THROW;
+   and return its process ID.  For errors, return (pid_t) -1.
 
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern __pid_t wait (__WAIT_STATUS __stat_loc);
+
 #ifdef	__USE_BSD
 /* Special values for the PID argument to `waitpid' and `wait4'.  */
 # define WAIT_ANY	(-1)	/* Any process.  */
@@ -125,9 +128,12 @@
    is not already dead, return (pid_t) 0.  If successful,
    return PID and store the dead child's status in STAT_LOC.
    Return (pid_t) -1 for errors.  If the WUNTRACED bit is
-   set in OPTIONS, return status for stopped children; otherwise don't.  */
-extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options) __THROW;
+   set in OPTIONS, return status for stopped children; otherwise don't.
 
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
+
 #if defined __USE_SVID || defined __USE_XOPEN
 # define __need_siginfo_t
 # include <bits/siginfo.h>
@@ -138,9 +144,12 @@
    If IDTYPE is P_ALL, match any process.
    If the WNOHANG bit is set in OPTIONS, and that child
    is not already dead, clear *INFOP and return 0.  If successful, store
-   exit code and status in *INFOP.  */
+   exit code and status in *INFOP.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
 extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
-		   int __options) __THROW;
+		   int __options);
 #endif
 
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED

Modified: trunk/uClibc/include/time.h
===================================================================
--- trunk/uClibc/include/time.h	2005-11-03 01:25:12 UTC (rev 12129)
+++ trunk/uClibc/include/time.h	2005-11-03 19:13:24 UTC (rev 12130)
@@ -143,10 +143,10 @@
 #ifdef __UCLIBC_HAS_TM_EXTENSIONS__
 #ifdef	__USE_BSD
   long int tm_gmtoff;		/* Seconds east of UTC.  */
-  __const char *tm_zone;	/* Timezone abbreviation. */
+  __const char *tm_zone;	/* Timezone abbreviation.  */
 #else
   long int __tm_gmtoff;		/* Seconds east of UTC.  */
-  __const char *__tm_zone;	/* Timezone abbreviation. */
+  __const char *__tm_zone;	/* Timezone abbreviation.  */
 #endif
 #endif /* __UCLIBC_HAS_TM_EXTENSIONS__ */
 };
@@ -225,17 +225,6 @@
 extern char *strptime_l (__const char *__restrict __s,
 			 __const char *__restrict __fmt, struct tm *__tp,
 			 __locale_t __loc) __THROW;
-
-
-extern size_t __strftime_l (char *__restrict __s, size_t __maxsize,
-							__const char *__restrict __format,
-							__const struct tm *__restrict __tp,
-							__locale_t __loc) __THROW;
-
-extern char *__strptime_l (__const char *__restrict __s,
-						   __const char *__restrict __fmt, struct tm *__tp,
-						   __locale_t __loc) __THROW;
-
 # endif
 #endif
 




More information about the uClibc-cvs mailing list