From bdbf022df8d6df07ae7c69b7e386278e27804e58 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 9 Aug 1998 17:39:48 +0000 Subject: [PATCH] Update. 1998-08-09 09:40 Ulrich Drepper * nss/nss_files/files-XXX.c (internal_getent): In case of an read error do not trust errno value, set it to ENOENT. * db2/db_185.h: Move __ prototypes into include/* header. * dirent/dirent.h: Likewise. * elf/dlfcn.h: Likewise. * gmon/sys/gmon.h: Likewise. * grp/grp.h: Likewise. * intl/libintl.h: Likewise. * io/fcntl.h: Likewise. * io/sys/stat.h: Likewise. * io/sys/statfs.h: Likewise. * io/sys/statvfs.h: Likewise. * libio/stdio.h: Likewise. * login/utmp.h: Likewise. * misc/mntent.h: Likewise. * misc/search.h: Likewise. * misc/sys/file.h: Likewise. * misc/sys/ioctl.h: Likewise. * misc/sys/select.h: Likewise. * misc/sys/uio.h: Likewise. * misc/sys/ustat.h: Likewise. * posix/unistd.h: Likewise. * posix/sys/times.h: Likewise. * posix/sys/wait.h: Likewise. * pwd/pwd.h: Likewise. * resource/ulimit.h: Likewise. * resource/sys/resource.h: Likewise. * setjmp/setjmp.h: Likewise. * shadow/shadow.h: Likewise. * signal/signal.h: Likewise. * socket/sys/socket.h: Likewise. * stdlib/alloca.h: Likewise. * stdlib/stdlib.h: Likewise. * string/string.h: Likewise. * sysdeps/generic/sys/mman.h: Likewise. * sysdeps/unix/bsd/osf/sys/mman.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise. * sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise. * sysdeps/unix/sysv/irix4/sys/mman.h: Likewise. * sysdeps/unix/sysv/linux/bits/sched.h: Likewise. * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. * termios/termios.h: Likewise. * time/time.h: Likewise. * time/sys/time.h: Likewise. * wcsmbs/wchar.h: Likewise. * include/alloca.h: Add __ prototypes here. * include/db_185.h: Likewise. * include/dirent.h: Likewise. * include/dlfcn.h: Likewise. * include/fcntl.h: Likewise. * include/grp.h: Likewise. * include/libintl.h: Likewise. * include/mntent.h: Likewise. * include/pwd.h: Likewise. * include/sched.h: Likewise. * include/search.h: Likewise. * include/setjmp.h: Likewise. * include/shadow.h: Likewise. * include/signal.h: Likewise. * include/stdio.h: Likewise. * include/stdlib.h: Likewise. * include/string.h: Likewise. * include/termios.h: Likewise. * include/time.h: Likewise. * include/ulimit.h: Likewise. * include/unistd.h: Likewise. * include/utmp.h: Likewise. * include/wchar.h: Likewise. * include/sys/file.h: Likewise. * include/sys/gmon.h: Likewise. * include/sys/ioctl.h: Likewise. * include/sys/mman.h: Likewise. * include/sys/resource.h: Likewise. * include/sys/select.h: Likewise. * include/sys/socket.h: Likewise. * include/sys/stat.h: Likewise. * include/sys/statfs.h: Likewise. * include/sys/time.h: Likewise. * include/sys/times.h: Likewise. * include/sys/uio.h: Likewise. * include/sys/wait.h: Likewise. * Makeconfig (+includes): Search in $(..)include first. * io/fstat.c: Undefine __fstat. * io/lstat.c: Undefine __lstat. * wcsmbs/Versions: Add __mbrlen. --- ChangeLog | 93 ++++++++++++++++++++++++++++++++++ FAQ | 2 +- FAQ.in | 2 +- Makeconfig | 5 +- db2/db_185.h | 1 - dirent/dirent.h | 8 --- elf/dlfcn.h | 2 - gmon/sys/gmon.h | 4 -- grp/grp.h | 5 -- include/alloca.h | 9 ++++ include/db_185.h | 3 ++ include/dirent.h | 10 ++++ include/dlfcn.h | 4 ++ include/fcntl.h | 3 ++ include/grp.h | 7 +++ include/libintl.h | 6 +++ include/mntent.h | 10 ++++ include/pwd.h | 13 +++++ include/sched.h | 6 +++ include/search.h | 11 ++++ include/setjmp.h | 12 +++++ include/shadow.h | 15 ++++++ include/signal.h | 26 +++++++++- include/stdio.h | 22 +++++++- include/stdlib.h | 40 +++++++++++++++ include/string.h | 7 +++ include/sys/file.h | 3 ++ include/sys/gmon.h | 6 +++ include/sys/ioctl.h | 3 ++ include/sys/mman.h | 13 +++++ include/sys/resource.h | 5 ++ include/sys/select.h | 5 ++ include/sys/socket.h | 3 ++ include/sys/stat.h | 32 ++++++++++++ include/sys/statfs.h | 4 ++ include/sys/time.h | 12 +++++ include/sys/times.h | 3 ++ include/sys/uio.h | 8 +++ include/sys/wait.h | 8 +++ include/termios.h | 3 ++ include/time.h | 38 +++++++++++++- include/ulimit.h | 3 ++ include/unistd.h | 62 +++++++++++++++++++++++ include/utmp.h | 16 ++++++ include/wchar.h | 29 +++++++++++ intl/libintl.h | 6 +-- io/fcntl.h | 1 - io/fstat.c | 3 +- io/lstat.c | 1 + io/sys/stat.h | 39 +++----------- io/sys/statfs.h | 2 - io/sys/statvfs.h | 2 - libio/stdio.h | 33 ++++-------- login/utmp.h | 14 ----- misc/mntent.h | 8 --- misc/search.h | 9 ---- misc/sys/file.h | 3 +- misc/sys/ioctl.h | 3 +- misc/sys/select.h | 5 +- misc/sys/uio.h | 7 +-- misc/sys/ustat.h | 3 +- nss/nss_files/files-XXX.c | 2 +- posix/sys/times.h | 3 +- posix/sys/wait.h | 6 --- posix/unistd.h | 66 ++---------------------- pwd/pwd.h | 11 ---- resource/sys/resource.h | 3 -- resource/ulimit.h | 3 +- setjmp/setjmp.h | 12 +---- shadow/shadow.h | 15 +----- signal/signal.h | 35 ++++--------- socket/sys/socket.h | 1 - stdlib/alloca.h | 7 +-- stdlib/stdlib.h | 39 +------------- string/string.h | 5 -- sysdeps/generic/sys/mman.h | 8 +-- sysdeps/unix/bsd/osf/sys/mman.h | 6 +-- sysdeps/unix/bsd/sun/sunos4/sys/mman.h | 6 +-- sysdeps/unix/bsd/ultrix4/sys/mman.h | 6 +-- sysdeps/unix/sysv/irix4/sys/mman.h | 6 +-- sysdeps/unix/sysv/linux/bits/sched.h | 2 - sysdeps/unix/sysv/linux/sys/mman.h | 8 --- termios/termios.h | 3 +- time/sys/time.h | 12 +---- time/time.h | 33 ++---------- wcsmbs/Versions | 2 +- wcsmbs/wchar.h | 28 +--------- 87 files changed, 617 insertions(+), 432 deletions(-) create mode 100644 include/sys/mman.h diff --git a/ChangeLog b/ChangeLog index d56e798..51e64b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,96 @@ +1998-08-09 09:40 Ulrich Drepper + + * nss/nss_files/files-XXX.c (internal_getent): In case of an read + error do not trust errno value, set it to ENOENT. + + * db2/db_185.h: Move __ prototypes into include/* header. + * dirent/dirent.h: Likewise. + * elf/dlfcn.h: Likewise. + * gmon/sys/gmon.h: Likewise. + * grp/grp.h: Likewise. + * intl/libintl.h: Likewise. + * io/fcntl.h: Likewise. + * io/sys/stat.h: Likewise. + * io/sys/statfs.h: Likewise. + * io/sys/statvfs.h: Likewise. + * libio/stdio.h: Likewise. + * login/utmp.h: Likewise. + * misc/mntent.h: Likewise. + * misc/search.h: Likewise. + * misc/sys/file.h: Likewise. + * misc/sys/ioctl.h: Likewise. + * misc/sys/select.h: Likewise. + * misc/sys/uio.h: Likewise. + * misc/sys/ustat.h: Likewise. + * posix/unistd.h: Likewise. + * posix/sys/times.h: Likewise. + * posix/sys/wait.h: Likewise. + * pwd/pwd.h: Likewise. + * resource/ulimit.h: Likewise. + * resource/sys/resource.h: Likewise. + * setjmp/setjmp.h: Likewise. + * shadow/shadow.h: Likewise. + * signal/signal.h: Likewise. + * socket/sys/socket.h: Likewise. + * stdlib/alloca.h: Likewise. + * stdlib/stdlib.h: Likewise. + * string/string.h: Likewise. + * sysdeps/generic/sys/mman.h: Likewise. + * sysdeps/unix/bsd/osf/sys/mman.h: Likewise. + * sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise. + * sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise. + * sysdeps/unix/sysv/irix4/sys/mman.h: Likewise. + * sysdeps/unix/sysv/linux/bits/sched.h: Likewise. + * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. + * termios/termios.h: Likewise. + * time/time.h: Likewise. + * time/sys/time.h: Likewise. + * wcsmbs/wchar.h: Likewise. + + * include/alloca.h: Add __ prototypes here. + * include/db_185.h: Likewise. + * include/dirent.h: Likewise. + * include/dlfcn.h: Likewise. + * include/fcntl.h: Likewise. + * include/grp.h: Likewise. + * include/libintl.h: Likewise. + * include/mntent.h: Likewise. + * include/pwd.h: Likewise. + * include/sched.h: Likewise. + * include/search.h: Likewise. + * include/setjmp.h: Likewise. + * include/shadow.h: Likewise. + * include/signal.h: Likewise. + * include/stdio.h: Likewise. + * include/stdlib.h: Likewise. + * include/string.h: Likewise. + * include/termios.h: Likewise. + * include/time.h: Likewise. + * include/ulimit.h: Likewise. + * include/unistd.h: Likewise. + * include/utmp.h: Likewise. + * include/wchar.h: Likewise. + * include/sys/file.h: Likewise. + * include/sys/gmon.h: Likewise. + * include/sys/ioctl.h: Likewise. + * include/sys/mman.h: Likewise. + * include/sys/resource.h: Likewise. + * include/sys/select.h: Likewise. + * include/sys/socket.h: Likewise. + * include/sys/stat.h: Likewise. + * include/sys/statfs.h: Likewise. + * include/sys/time.h: Likewise. + * include/sys/times.h: Likewise. + * include/sys/uio.h: Likewise. + * include/sys/wait.h: Likewise. + + * Makeconfig (+includes): Search in $(..)include first. + + * io/fstat.c: Undefine __fstat. + * io/lstat.c: Undefine __lstat. + + * wcsmbs/Versions: Add __mbrlen. + 1998-08-09 Ulrich Drepper * elf/dl-reloc.c (_dl_relocate_object): Implement DT_BIND_NOW. diff --git a/FAQ b/FAQ index c4ab812..ebb93d7 100644 --- a/FAQ +++ b/FAQ @@ -721,7 +721,7 @@ ypbind. ypbind 3.3 and older versions don't always remove these files, so glibc will continue to use them. Other BSD versions seem to work correctly. Until ypbind 3.4 is released, you can find a patch at - ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc3.diff. + ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc3.diff.gz 2.13. Under Linux/Alpha, I always get "do_ypcall: clnt_call: diff --git a/FAQ.in b/FAQ.in index eeeb2f5..4f65022 100644 --- a/FAQ.in +++ b/FAQ.in @@ -578,7 +578,7 @@ ypbind. ypbind 3.3 and older versions don't always remove these files, so glibc will continue to use them. Other BSD versions seem to work correctly. Until ypbind 3.4 is released, you can find a patch at - ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc3.diff. + ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc3.diff.gz ?? Under Linux/Alpha, I always get "do_ypcall: clnt_call: RPC: Unable to receive; errno = Connection refused" when using NIS. diff --git a/Makeconfig b/Makeconfig index 43b44c9..90c02b9 100644 --- a/Makeconfig +++ b/Makeconfig @@ -555,8 +555,9 @@ endif # $(+cflags) == "" # files (including ones given in angle brackets) in the current directory, # in the parent library source directory and in the include directory. # `+sysdep-includes' will be defined by Makerules. -+includes = -I. $(patsubst %/,-I%,$(objpfx)) $(patsubst %/,-I%,$(..)) \ - -I$(..)include $($(stdio)-include) $(includes) \ ++includes = -I$(..)include -I. \ + $(patsubst %/,-I%,$(objpfx)) $(patsubst %/,-I%,$(..)) \ + $($(stdio)-include) $(includes) \ $(+sysdep-includes) $(last-includes) $(sysincludes) # Since libio has several internal header files, we use a -I instead diff --git a/db2/db_185.h b/db2/db_185.h index 0e1b878..0be51f5 100644 --- a/db2/db_185.h +++ b/db2/db_185.h @@ -170,7 +170,6 @@ typedef struct { #if defined(__cplusplus) extern "C" { #endif -DB *__dbopen __P((const char *, int, int, DBTYPE, const void *)); DB *dbopen __P((const char *, int, int, DBTYPE, const void *)); #if defined(__cplusplus) diff --git a/dirent/dirent.h b/dirent/dirent.h index 1ac68fa..e286498 100644 --- a/dirent/dirent.h +++ b/dirent/dirent.h @@ -112,12 +112,10 @@ 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 __P ((__const char *__name)); extern DIR *opendir __P ((__const char *__name)); /* Close the directory stream DIRP. Return 0 if successful, -1 if not. */ -extern int __closedir __P ((DIR *__dirp)); extern int closedir __P ((DIR *__dirp)); /* Read a directory entry from DIRP. Return a pointer to a `struct @@ -127,8 +125,6 @@ extern int closedir __P ((DIR *__dirp)); If the Large File Support API is selected we have to use the appropriate interface. */ -extern struct dirent *__readdir __P ((DIR *__dirp)); -extern struct dirent64 *__readdir64 __P ((DIR *__dirp)); #ifndef __USE_FILE_OFFSET64 extern struct dirent *readdir __P ((DIR *__dirp)); #else @@ -146,8 +142,6 @@ extern struct dirent64 *readdir64 __P ((DIR *__dirp)); #if defined __USE_POSIX || defined __USE_MISC /* Reentrant version of `readdir'. Return in RESULT a pointer to the next entry. */ -extern int __readdir_r __P ((DIR *__dirp, struct dirent *__entry, - struct dirent **__result)); # ifndef __USE_FILE_OFFSET64 extern int readdir_r __P ((DIR *__dirp, struct dirent *__entry, struct dirent **__result)); @@ -273,8 +267,6 @@ extern int versionsort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2)); Reading starts at offset *BASEP, and *BASEP is updated with the new position after reading. Returns the number of bytes read; zero when at end of directory; or -1 for errors. */ -extern __ssize_t __getdirentries __P ((int __fd, char *__buf, - size_t __nbytes, __off_t *__basep)); extern __ssize_t getdirentries __P ((int __fd, char *__buf, size_t __nbytes, __off_t *__basep)); diff --git a/elf/dlfcn.h b/elf/dlfcn.h index aa2e32f..715e178 100644 --- a/elf/dlfcn.h +++ b/elf/dlfcn.h @@ -48,8 +48,6 @@ extern void *dlsym __P ((void *__handle, __const char *__name)); #ifdef __USE_GNU /* Find the run-time address in the shared object HANDLE refers to of the symbol called NAME with VERSION. */ -extern void *__dlvsym __P ((void *__handle, __const char *__name, - __const char *__version)); extern void *dlvsym __P ((void *__handle, __const char *__name, __const char *__version)); #endif diff --git a/gmon/sys/gmon.h b/gmon/sys/gmon.h index 85d9392..c2262dd 100644 --- a/gmon/sys/gmon.h +++ b/gmon/sys/gmon.h @@ -175,10 +175,6 @@ extern void monstartup __P ((u_long __lowpc, u_long __highpc)); /* Clean up profiling and write out gmon.out. */ extern void _mcleanup __P ((void)); -/* Write current profiling data to file. */ -extern void __write_profiling __P ((void)); -extern void write_profiling __P ((void)); - __END_DECLS #endif /* sys/gmon.h */ diff --git a/grp/grp.h b/grp/grp.h index 7e73625..1059df0 100644 --- a/grp/grp.h +++ b/grp/grp.h @@ -99,8 +99,6 @@ extern struct group *getgrnam __P ((__const char *__name)); POSIX people would choose. */ # if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -extern int __getgrent_r __P ((struct group *__resultbuf, char *buffer, - size_t __buflen, struct group **__result)); extern int getgrent_r __P ((struct group *__resultbuf, char *buffer, size_t __buflen, struct group **__result)); # endif @@ -118,9 +116,6 @@ extern int getgrnam_r __P ((__const char *__name, struct group *__resultbuf, # ifdef __USE_SVID /* Read a group entry from STREAM. This function is not standardized an probably never will. */ -extern int __fgetgrent_r __P ((FILE * __stream, struct group *__resultbuf, - char *buffer, size_t __buflen, - struct group **__result)); extern int fgetgrent_r __P ((FILE * __stream, struct group *__resultbuf, char *buffer, size_t __buflen, struct group **__result)); diff --git a/include/alloca.h b/include/alloca.h index 34eeeab..ae41090 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -1 +1,10 @@ #include + +#undef __alloca + +/* Now define the internal interfaces. */ +extern __ptr_t __alloca __P ((size_t __size)); + +#ifdef __GNUC__ +# define __alloca(size) __builtin_alloca (size) +#endif /* GCC. */ diff --git a/include/db_185.h b/include/db_185.h index d303a1c..db78199 100644 --- a/include/db_185.h +++ b/include/db_185.h @@ -1 +1,4 @@ #include + +/* Now define the internal interfaces. */ +DB *__dbopen __P((const char *, int, int, DBTYPE, const void *)); diff --git a/include/dirent.h b/include/dirent.h index f59a6b7..594d90d 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -1 +1,11 @@ #include + +/* Now define the internal interfaces. */ +extern DIR *__opendir __P ((__const char *__name)); +extern int __closedir __P ((DIR *__dirp)); +extern struct dirent *__readdir __P ((DIR *__dirp)); +extern struct dirent64 *__readdir64 __P ((DIR *__dirp)); +extern int __readdir_r __P ((DIR *__dirp, struct dirent *__entry, + struct dirent **__result)); +extern __ssize_t __getdirentries __P ((int __fd, char *__buf, + size_t __nbytes, __off_t *__basep)); diff --git a/include/dlfcn.h b/include/dlfcn.h index 92804a1..766c80a 100644 --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -1 +1,5 @@ #include + +/* Now define the internal interfaces. */ +extern void *__dlvsym __P ((void *__handle, __const char *__name, + __const char *__version)); diff --git a/include/fcntl.h b/include/fcntl.h index bac1e86..cce3d5e 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -1 +1,4 @@ #include + +/* Now define the internal interfaces. */ +extern int __open64 __P ((__const char *__file, int __oflag, ...)); diff --git a/include/grp.h b/include/grp.h index 250092c..ddde842 100644 --- a/include/grp.h +++ b/include/grp.h @@ -1 +1,8 @@ #include + +/* Now define the internal interfaces. */ +extern int __getgrent_r __P ((struct group *__resultbuf, char *buffer, + size_t __buflen, struct group **__result)); +extern int __fgetgrent_r __P ((FILE * __stream, struct group *__resultbuf, + char *buffer, size_t __buflen, + struct group **__result)); diff --git a/include/libintl.h b/include/libintl.h index be1062c..582cb05 100644 --- a/include/libintl.h +++ b/include/libintl.h @@ -1 +1,7 @@ #include + +/* Now define the internal interfaces. */ +extern char *__gettext __P ((__const char *__msgid)); +extern char *__textdomain __P ((__const char *__domainname)); +extern char *__bindtextdomain __P ((__const char *__domainname, + __const char *__dirname)); diff --git a/include/mntent.h b/include/mntent.h index 87a6fb9..d869625 100644 --- a/include/mntent.h +++ b/include/mntent.h @@ -1 +1,11 @@ #include + +/* Now define the internal interfaces. */ +extern FILE *__setmntent __P ((__const char *__file, __const char *__mode)); +extern struct mntent *__getmntent_r __P ((FILE *__stream, + struct mntent *__result, + char *__buffer, int __bufsize)); +extern int __addmntent __P ((FILE *__stream, __const struct mntent *__mnt)); +extern int __endmntent __P ((FILE *__stream)); +extern char *__hasmntopt __P ((__const struct mntent *__mnt, + __const char *__opt)); diff --git a/include/pwd.h b/include/pwd.h index 28d59a6..2c57df9 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -1 +1,14 @@ #include + +/* Now define the internal interfaces. */ +extern int __getpwent_r __P ((struct passwd *__resultbuf, char *__buffer, + size_t __buflen, struct passwd **__result)); +extern int __getpwuid_r __P ((__uid_t __uid, struct passwd *__resultbuf, + char *__buffer, size_t __buflen, + struct passwd **__result)); +extern int __getpwnam_r __P ((__const char *__name, struct passwd *__resultbuf, + char *__buffer, size_t __buflen, + struct passwd **__result)); +extern int __fgetpwent_r __P ((FILE * __stream, struct passwd *__resultbuf, + char *__buffer, size_t __buflen, + struct passwd **__result)); diff --git a/include/sched.h b/include/sched.h index b9bebc9..02dc60a 100644 --- a/include/sched.h +++ b/include/sched.h @@ -1 +1,7 @@ #include "posix/sched.h" + +/* Now define the internal interfaces. */ + +/* This is Linux specific. */ +extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg)); diff --git a/include/search.h b/include/search.h index ff24508..05dc75a 100644 --- a/include/search.h +++ b/include/search.h @@ -1 +1,12 @@ #include + +/* Now define the internal interfaces. */ +extern void __hdestroy __P ((void)); +extern void *__tsearch __PMT ((__const void *__key, void **__rootp, + __compar_fn_t compar)); +extern void *__tfind __PMT ((__const void *__key, void *__const *__rootp, + __compar_fn_t compar)); +extern void *__tdelete __PMT ((__const void *__key, void **__rootp, + __compar_fn_t compar)); +extern void __twalk __PMT ((__const void *__root, __action_fn_t action)); +extern void __tdestroy __PMT ((void *__root, __free_fn_t freefct)); diff --git a/include/setjmp.h b/include/setjmp.h index c78a964..34fc9e5 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -1 +1,13 @@ #include + +/* Now define the internal interfaces. */ + +/* Internal machine-dependent function to restore context sans signal mask. */ +extern void __longjmp __P ((__jmp_buf __env, int __val)) + __attribute__ ((__noreturn__)); + +/* Internal function to possibly save the current mask of blocked signals + in ENV, and always set the flag saying whether or not it was saved. + This is used by the machine-dependent definition of `__sigsetjmp'. + Always returns zero, for convenience. */ +extern int __sigjmp_save __P ((jmp_buf __env, int __savemask)); diff --git a/include/shadow.h b/include/shadow.h index 4848197..5e7f943 100644 --- a/include/shadow.h +++ b/include/shadow.h @@ -1 +1,16 @@ #include + +/* Now define the internal interfaces. */ +extern int __getspent_r __P ((struct spwd *__result_buf, char *__buffer, + size_t __buflen, struct spwd **__result)); +extern int __getspnam_r __P ((__const char *__name, struct spwd *__result_buf, + char *__buffer, size_t __buflen, + struct spwd **__result)); +extern int __sgetspent_r __P ((__const char *__string, + struct spwd *__result_buf, char *__buffer, + size_t __buflen, struct spwd **__result)); +extern int __fgetspent_r __P ((FILE *__stream, struct spwd *__result_buf, + char *__buffer, size_t __buflen, + struct spwd **__result)); +extern int __lckpwdf __P ((void)); +extern int __ulckpwdf __P ((void)); diff --git a/include/signal.h b/include/signal.h index d9939c4..693aeb8 100644 --- a/include/signal.h +++ b/include/signal.h @@ -1 +1,25 @@ -#include +#if defined __need_sig_atomic_t || defined __need_sigset_t +# include +#else +# include + +/* Now define the internal interfaces. */ +extern __sighandler_t __bsd_signal __P ((int __sig, __sighandler_t __handler)); +extern int __kill __P ((__pid_t __pid, int __sig)); +extern int __sigblock __P ((int __mask)); +extern int __sigsetmask __P ((int __mask)); +extern int __sigprocmask __P ((int __how, + __const sigset_t *__set, sigset_t *__oset)); +extern int __sigsuspend __P ((__const sigset_t *__set)); +extern int __sigwait __P ((__const sigset_t *__set, int *__sig)); +extern int __sigwaitinfo __P ((__const sigset_t *__set, siginfo_t *__info)); +extern int __sigtimedwait __P ((__const sigset_t *__set, siginfo_t *__info, + __const struct timespec *__timeout)); +extern int __sigqueue __P ((__pid_t __pid, int __sig, + __const union sigval __val)); +extern int __sigvec __P ((int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec)); +extern int __sigreturn __P ((struct sigcontext *__scp)); +extern int __sigaltstack __P ((__const struct sigaltstack *__ss, + struct sigaltstack *__oss)); +#endif diff --git a/include/stdio.h b/include/stdio.h index 457eabe..c0ca602 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -1,5 +1,25 @@ #ifdef USE_IN_LIBIO -#include +#ifdef __need_FILE +# include +#else +# include + +/* Now define the internal interfaces. */ +extern int __fcloseall __P ((void)); +extern int __snprintf __P ((char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...)) + __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vfscanf __P ((FILE *__restrict __s, + __const char *__restrict __format, + _G_va_list __arg)) + __attribute__ ((__format__ (__scanf__, 2, 0))); +extern int __vscanf __P ((__const char *__restrict __format, + _G_va_list __arg)) + __attribute__ ((__format__ (__scanf__, 1, 0))); +extern _IO_ssize_t __getline __P ((char **__lineptr, size_t *__n, + FILE *__stream)); + +#endif #else #include #endif diff --git a/include/stdlib.h b/include/stdlib.h index c0887a9..c457304 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -1 +1,41 @@ #include + +/* Now define the internal interfaces. */ +extern int32_t __random __P ((void)); +extern void __srandom __P ((unsigned int __seed)); +extern __ptr_t __initstate __P ((unsigned int __seed, __ptr_t __statebuf, + size_t __statelen)); +extern __ptr_t __setstate __P ((__ptr_t __statebuf)); +extern int __random_r __P ((struct random_data *__buf, int32_t *__result)); +extern int __srandom_r __P ((unsigned int __seed, struct random_data *__buf)); +extern int __initstate_r __P ((unsigned int __seed, __ptr_t __statebuf, + size_t __statelen, struct random_data *__buf)); +extern int __setstate_r __P ((__ptr_t __statebuf, struct random_data *__buf)); +extern int __rand_r __P ((unsigned int *__seed)); +extern int __erand48_r __P ((unsigned short int __xsubi[3], + struct drand48_data *__buffer, double *__result)); +extern int __nrand48_r __P ((unsigned short int __xsubi[3], + struct drand48_data *__buffer, + long int *__result)); +extern int __jrand48_r __P ((unsigned short int __xsubi[3], + struct drand48_data *__buffer, + long int *__result)); +extern int __srand48_r __P ((long int __seedval, + struct drand48_data *__buffer)); +extern int __seed48_r __P ((unsigned short int __seed16v[3], + struct drand48_data *__buffer)); +extern int __lcong48_r __P ((unsigned short int __param[7], + struct drand48_data *__buffer)); + +/* Internal function to compute next state of the generator. */ +extern int __drand48_iterate __P ((unsigned short int __xsubi[3], + struct drand48_data *__buffer)); + +extern int __setenv __P ((__const char *__name, __const char *__value, + int __replace)); +extern void __unsetenv __P ((__const char *__name)); +extern int __clearenv __P ((void)); +extern char *__canonicalize_file_name __P ((__const char *__name)); +extern char *__realpath __P ((__const char *__name, char *__resolved)); +extern int __ptsname_r __P ((int __fd, char *__buf, size_t __buflen)); +extern int __getpt __P ((void)); diff --git a/include/string.h b/include/string.h index b557c65..1ee7ced 100644 --- a/include/string.h +++ b/include/string.h @@ -1 +1,8 @@ #include + +/* Now define the internal interfaces. */ +extern __ptr_t __memccpy __P ((__ptr_t __dest, __const __ptr_t __src, + int __c, size_t __n)); +extern size_t __strnlen __P ((__const char *__string, size_t __maxlen)); +extern char *__strsep __P ((char **__stringp, __const char *__delim)); +extern int __strverscmp __P ((__const char *__s1, __const char *__s2)); diff --git a/include/sys/file.h b/include/sys/file.h index fb3cd75..ec7f3de 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -1 +1,4 @@ #include + +/* Now define the internal interfaces. */ +extern int __flock __P ((int __fd, int __operation)); diff --git a/include/sys/gmon.h b/include/sys/gmon.h index 987589f..2e56188 100644 --- a/include/sys/gmon.h +++ b/include/sys/gmon.h @@ -1 +1,7 @@ #include + +/* Now define the internal interfaces. */ + +/* Write current profiling data to file. */ +extern void __write_profiling __P ((void)); +extern void write_profiling __P ((void)); diff --git a/include/sys/ioctl.h b/include/sys/ioctl.h index 8cc7775..e07b08a 100644 --- a/include/sys/ioctl.h +++ b/include/sys/ioctl.h @@ -1 +1,4 @@ #include + +/* Now define the internal interfaces. */ +extern int __ioctl __P ((int __fd, unsigned long int __request, ...)); diff --git a/include/sys/mman.h b/include/sys/mman.h new file mode 100644 index 0000000..3a6c33a --- /dev/null +++ b/include/sys/mman.h @@ -0,0 +1,13 @@ +#include_next + +/* Now define the internal interfaces. */ +extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); +extern __ptr_t __mmap64 __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off64_t __offset)); +extern int __munmap __P ((__ptr_t __addr, size_t __len)); +extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); + +/* This one is Linux specific. */ +extern __ptr_t __mremap __P ((__ptr_t __addr, size_t __old_len, + size_t __new_len, int __may_move)); diff --git a/include/sys/resource.h b/include/sys/resource.h index 33e6f4d..36950e2 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -1 +1,6 @@ #include + +/* Now define the internal interfaces. */ +extern int __getrlimit __P ((enum __rlimit_resource __resource, + struct rlimit *__rlimits)); +extern int __getrusage __P ((enum __rusage_who __who, struct rusage *__usage)); diff --git a/include/sys/select.h b/include/sys/select.h index f793af7..860b013 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -1 +1,6 @@ #include + +/* Now define the internal interfaces. */ +extern int __pselect __P ((int __nfds, __fd_set *__readfds, + __fd_set *__writefds, __fd_set *__exceptfds, + struct timespec *__timeout)); diff --git a/include/sys/socket.h b/include/sys/socket.h index 999a683..a319272 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -1 +1,4 @@ #include + +/* Now define the internal interfaces. */ +extern int __socket __P ((int __domain, int __type, int __protocol)); diff --git a/include/sys/stat.h b/include/sys/stat.h index 16950eb..768630f 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -1,5 +1,35 @@ +#ifndef _SYS_STAT_H #include +/* Now define the internal interfaces. */ +extern int __stat __P ((__const char *__file, struct stat *__buf)); +extern int __fstat __P ((int __fd, struct stat *__buf)); +extern int __lstat __P ((__const char *__file, struct stat *__buf)); +extern int __chmod __P ((__const char *__file, __mode_t __mode)); +extern int __fchmod __P ((int __fd, __mode_t __mode)); +extern __mode_t __umask __P ((__mode_t __mask)); +extern int __mkdir __P ((__const char *__path, __mode_t __mode)); +extern int __mknod __P ((__const char *__path, + __mode_t __mode, __dev_t __dev)); +extern __inline__ int __stat (__const char *__path, struct stat *__statbuf) +{ + return __xstat (_STAT_VER, __path, __statbuf); +} +extern __inline__ int __lstat (__const char *__path, struct stat *__statbuf) +{ + return __lxstat (_STAT_VER, __path, __statbuf); +} +extern __inline__ int __fstat (int __fd, struct stat *__statbuf) +{ + return __fxstat (_STAT_VER, __fd, __statbuf); +} +extern __inline__ int __mknod (__const char *__path, __mode_t __mode, + __dev_t __dev) +{ + return __xmknod (_MKNOD_VER, __path, __mode, &__dev); +} + + /* The `stat', `fstat', `lstat' functions have to be handled special since even while not compiling the library with optimization calls to these functions in the shared library must reference the `xstat' etc functions. @@ -7,8 +37,10 @@ since on user level we must use real functions. */ #define stat(fname, buf) __xstat (_STAT_VER, fname, buf) #define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf) +#define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf) #define lstat(fname, buf) __lxstat (_STAT_VER, fname, buf) #define __lstat(fname, buf) __lxstat (_STAT_VER, fname, buf) #define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf) #define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf) #define lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf) +#endif diff --git a/include/sys/statfs.h b/include/sys/statfs.h index d42df4b..bb4999e 100644 --- a/include/sys/statfs.h +++ b/include/sys/statfs.h @@ -1 +1,5 @@ #include + +/* Now define the internal interfaces. */ +extern int __statfs __P ((__const char *__file, struct statfs *__buf)); +extern int __fstatfs __P ((int __fildes, struct statfs *__buf)); diff --git a/include/sys/time.h b/include/sys/time.h index 5595a95..fd9f467 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -1 +1,13 @@ #include