summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-03 19:13:24 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-03 19:13:24 +0000
commit4222cc97e94c160817d38652163af2b96cf9c8da (patch)
tree7c4b85a69401bba6edd8710f7d876ec4ce0b25a2 /include
parentaa46ec5518ab0d127ea951f9fc8290da97288dc8 (diff)
Sync headers w/ glibc
Diffstat (limited to 'include')
-rw-r--r--include/dirent.h75
-rw-r--r--include/sys/wait.h25
-rw-r--r--include/time.h15
3 files changed, 66 insertions, 49 deletions
diff --git a/include/dirent.h b/include/dirent.h
index 006e5dcb2..565a94dee 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -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,12 +128,18 @@ enum
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
@@ -141,35 +147,43 @@ extern int closedir (DIR *__dirp) __THROW;
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,27 +192,32 @@ extern int __REDIRECT (readdir_r,
# 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. */
@@ -223,15 +242,16 @@ extern int dirfd (DIR *__dirp) __THROW;
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 __REDIRECT (scandir,
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 @@ extern int __REDIRECT (alphasort,
# 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
diff --git a/include/sys/wait.h b/include/sys/wait.h
index 03ac5fe35..67fd0c17a 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -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 @@ __BEGIN_DECLS
#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,8 +105,11 @@ typedef enum
/* 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'. */
@@ -125,8 +128,11 @@ extern __pid_t wait (__WAIT_STATUS __stat_loc) __THROW;
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
@@ -138,9 +144,12 @@ extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options) __THROW;
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
diff --git a/include/time.h b/include/time.h
index e8e514ca5..84e17f317 100644
--- a/include/time.h
+++ b/include/time.h
@@ -143,10 +143,10 @@ struct tm
#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 size_t strftime_l (char *__restrict __s, size_t __maxsize,
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