summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog93
-rw-r--r--FAQ2
-rw-r--r--FAQ.in2
-rw-r--r--Makeconfig5
-rw-r--r--db2/db_185.h1
-rw-r--r--dirent/dirent.h8
-rw-r--r--elf/dlfcn.h2
-rw-r--r--gmon/sys/gmon.h4
-rw-r--r--grp/grp.h5
-rw-r--r--include/alloca.h9
-rw-r--r--include/db_185.h3
-rw-r--r--include/dirent.h10
-rw-r--r--include/dlfcn.h4
-rw-r--r--include/fcntl.h3
-rw-r--r--include/grp.h7
-rw-r--r--include/libintl.h6
-rw-r--r--include/mntent.h10
-rw-r--r--include/pwd.h13
-rw-r--r--include/sched.h6
-rw-r--r--include/search.h11
-rw-r--r--include/setjmp.h12
-rw-r--r--include/shadow.h15
-rw-r--r--include/signal.h26
-rw-r--r--include/stdio.h22
-rw-r--r--include/stdlib.h40
-rw-r--r--include/string.h7
-rw-r--r--include/sys/file.h3
-rw-r--r--include/sys/gmon.h6
-rw-r--r--include/sys/ioctl.h3
-rw-r--r--include/sys/mman.h13
-rw-r--r--include/sys/resource.h5
-rw-r--r--include/sys/select.h5
-rw-r--r--include/sys/socket.h3
-rw-r--r--include/sys/stat.h32
-rw-r--r--include/sys/statfs.h4
-rw-r--r--include/sys/time.h12
-rw-r--r--include/sys/times.h3
-rw-r--r--include/sys/uio.h8
-rw-r--r--include/sys/wait.h8
-rw-r--r--include/termios.h3
-rw-r--r--include/time.h38
-rw-r--r--include/ulimit.h3
-rw-r--r--include/unistd.h62
-rw-r--r--include/utmp.h16
-rw-r--r--include/wchar.h29
-rw-r--r--intl/libintl.h6
-rw-r--r--io/fcntl.h1
-rw-r--r--io/fstat.c3
-rw-r--r--io/lstat.c1
-rw-r--r--io/sys/stat.h39
-rw-r--r--io/sys/statfs.h2
-rw-r--r--io/sys/statvfs.h2
-rw-r--r--libio/stdio.h33
-rw-r--r--login/utmp.h14
-rw-r--r--misc/mntent.h8
-rw-r--r--misc/search.h9
-rw-r--r--misc/sys/file.h3
-rw-r--r--misc/sys/ioctl.h3
-rw-r--r--misc/sys/select.h5
-rw-r--r--misc/sys/uio.h7
-rw-r--r--misc/sys/ustat.h3
-rw-r--r--nss/nss_files/files-XXX.c2
-rw-r--r--posix/sys/times.h3
-rw-r--r--posix/sys/wait.h6
-rw-r--r--posix/unistd.h66
-rw-r--r--pwd/pwd.h11
-rw-r--r--resource/sys/resource.h3
-rw-r--r--resource/ulimit.h3
-rw-r--r--setjmp/setjmp.h12
-rw-r--r--shadow/shadow.h15
-rw-r--r--signal/signal.h35
-rw-r--r--socket/sys/socket.h1
-rw-r--r--stdlib/alloca.h7
-rw-r--r--stdlib/stdlib.h39
-rw-r--r--string/string.h5
-rw-r--r--sysdeps/generic/sys/mman.h8
-rw-r--r--sysdeps/unix/bsd/osf/sys/mman.h6
-rw-r--r--sysdeps/unix/bsd/sun/sunos4/sys/mman.h6
-rw-r--r--sysdeps/unix/bsd/ultrix4/sys/mman.h6
-rw-r--r--sysdeps/unix/sysv/irix4/sys/mman.h6
-rw-r--r--sysdeps/unix/sysv/linux/bits/sched.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/mman.h8
-rw-r--r--termios/termios.h3
-rw-r--r--time/sys/time.h12
-rw-r--r--time/time.h33
-rw-r--r--wcsmbs/Versions2
-rw-r--r--wcsmbs/wchar.h28
87 files changed, 617 insertions, 432 deletions
diff --git a/ChangeLog b/ChangeLog
index d56e798f29..51e64b0599 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,96 @@
+1998-08-09 09:40 Ulrich Drepper <drepper@cygnus.com>
+
+ * 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 <drepper@cygnus.com>
* elf/dl-reloc.c (_dl_relocate_object): Implement DT_BIND_NOW.
diff --git a/FAQ b/FAQ
index c4ab81227d..ebb93d7023 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 eeeb2f546c..4f65022b0c 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 43b44c9e87..90c02b9591 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 0e1b87879b..0be51f5074 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 1ac68fa611..e286498f06 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 aa2e32ffd3..715e1783cf 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 85d9392d8e..c2262dde4b 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 7e73625741..1059df089f 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 34eeeab78e..ae41090bd1 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -1 +1,10 @@
#include <stdlib/alloca.h>
+
+#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 d303a1ce50..db78199865 100644
--- a/include/db_185.h
+++ b/include/db_185.h
@@ -1 +1,4 @@
#include <db2/db_185.h>
+
+/* 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 f59a6b778b..594d90d89f 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -1 +1,11 @@
#include <dirent/dirent.h>
+
+/* 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 92804a1c1c..766c80a11a 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -1 +1,5 @@
#include <elf/dlfcn.h>
+
+/* 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 bac1e8685d..cce3d5ee10 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -1 +1,4 @@
#include <io/fcntl.h>
+
+/* 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 250092cbf1..ddde842fe6 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -1 +1,8 @@
#include <grp/grp.h>
+
+/* 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 be1062ca03..582cb05d74 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -1 +1,7 @@
#include <intl/libintl.h>
+
+/* 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 87a6fb9f2c..d869625607 100644
--- a/include/mntent.h
+++ b/include/mntent.h
@@ -1 +1,11 @@
#include <misc/mntent.h>
+
+/* 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 28d59a6a0a..2c57df938f 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -1 +1,14 @@
#include <pwd/pwd.h>
+
+/* 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 b9bebc9dee..02dc60a872 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 ff24508172..05dc75aee9 100644
--- a/include/search.h
+++ b/include/search.h
@@ -1 +1,12 @@
#include <misc/search.h>
+
+/* 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 c78a964566..34fc9e5f69 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -1 +1,13 @@
#include <setjmp/setjmp.h>
+
+/* 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 4848197be1..5e7f943bc0 100644
--- a/include/shadow.h
+++ b/include/shadow.h
@@ -1 +1,16 @@
#include <shadow/shadow.h>
+
+/* 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 d9939c4e83..693aeb807a 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -1 +1,25 @@
-#include <signal/signal.h>
+#if defined __need_sig_atomic_t || defined __need_sigset_t
+# include <signal/signal.h>
+#else
+# include <signal/signal.h>
+
+/* 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 457eabe32f..c0ca6027e8 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -1,5 +1,25 @@
#ifdef USE_IN_LIBIO
-#include <libio/stdio.h>
+#ifdef __need_FILE
+# include <libio/stdio.h>
+#else
+# include <libio/stdio.h>
+
+/* 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 <stdio/stdio.h>
#endif
diff --git a/include/stdlib.h b/include/stdlib.h
index c0887a99e9..c45730428b 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1 +1,41 @@
#include <stdlib/stdlib.h>
+
+/* 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 b557c65f39..1ee7ced249 100644
--- a/include/string.h
+++ b/include/string.h
@@ -1 +1,8 @@
#include <string/string.h>
+
+/* 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 fb3cd7544e..ec7f3de73d 100644
--- a/include/sys/file.h
+++ b/include/sys/file.h
@@ -1 +1,4 @@
#include <misc/sys/file.h>
+
+/* 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 987589fcfe..2e56188027 100644
--- a/include/sys/gmon.h
+++ b/include/sys/gmon.h
@@ -1 +1,7 @@
#include <gmon/sys/gmon.h>
+
+/* 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 8cc77757f6..e07b08a64f 100644
--- a/include/sys/ioctl.h
+++ b/include/sys/ioctl.h
@@ -1 +1,4 @@
#include <misc/sys/ioctl.h>
+
+/* 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 0000000000..3a6c33a354
--- /dev/null
+++ b/include/sys/mman.h
@@ -0,0 +1,13 @@
+#include_next <sys/mman.h>
+
+/* 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 33e6f4de9e..36950e2f10 100644
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -1 +1,6 @@
#include <resource/sys/resource.h>
+
+/* 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 f793af7bf0..860b01347d 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -1 +1,6 @@
#include <misc/sys/select.h>
+
+/* 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 999a683016..a319272b55 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -1 +1,4 @@
#include <socket/sys/socket.h>
+
+/* 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 16950eb039..768630fd34 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -1,5 +1,35 @@
+#ifndef _SYS_STAT_H
#include <io/sys/stat.h>
+/* 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 d42df4b65d..bb4999e2a3 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -1 +1,5 @@
#include <io/sys/statfs.h>
+
+/* 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 5595a957a0..fd9f46778d 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -1 +1,13 @@
#include <time/sys/time.h>
+
+/* Now document the internal interfaces. */
+extern int __settimeofday __P ((__const struct timeval *__tv,
+ __const struct timezone *__tz));
+extern int __adjtime __P ((__const struct timeval *__delta,
+ struct timeval *__olddelta));
+extern int __getitimer __P ((enum __itimer_which __which,
+ struct itimerval *__value));
+extern int __setitimer __P ((enum __itimer_which __which,
+ __const struct itimerval *__new,
+ struct itimerval *__old));
+extern int __utimes __P ((__const char *__file, struct timeval __tvp[2]));
diff --git a/include/sys/times.h b/include/sys/times.h
index 16ca91138a..95162b8931 100644
--- a/include/sys/times.h
+++ b/include/sys/times.h
@@ -1 +1,4 @@
#include <posix/sys/times.h>
+
+/* Now define the internal interfaces. */
+extern clock_t __times __P ((struct tms *__buffer));
diff --git a/include/sys/uio.h b/include/sys/uio.h
index 03afd84b87..a3f51e5f6c 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -1 +1,9 @@
+#ifndef _SYS_UIO_H
#include <misc/sys/uio.h>
+
+/* Now define the internal interfaces. */
+extern ssize_t __readv __P ((int __fd, __const struct iovec *__vector,
+ int __count));
+extern ssize_t __writev __P ((int __fd, __const struct iovec *__vector,
+ int __count));
+#endif
diff --git a/include/sys/wait.h b/include/sys/wait.h
index 379d5cc7a5..eefc14d705 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -1 +1,9 @@
#include <posix/sys/wait.h>
+
+/* Now define the internal interfaces. */
+extern __pid_t __waitpid __P ((__pid_t __pid, int *__stat_loc,
+ int __options));
+extern __pid_t __wait3 __P ((__WAIT_STATUS __stat_loc,
+ int __options, struct rusage * __usage));
+extern __pid_t __wait4 __P ((__pid_t __pid, __WAIT_STATUS __stat_loc,
+ int __options, struct rusage *__usage));
diff --git a/include/termios.h b/include/termios.h
index 3f754ac900..90237a8101 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -1 +1,4 @@
#include <termios/termios.h>
+
+/* Now define the internal interfaces. */
+extern int __tcgetattr __P ((int __fd, struct termios *__termios_p));
diff --git a/include/time.h b/include/time.h
index b2a33bf5c3..bc8ce0662a 100644
--- a/include/time.h
+++ b/include/time.h
@@ -1 +1,37 @@
-#include <time/time.h>
+#if defined __need_time_t || defined __need_clock_t || defined __need_timespec
+# include <time/time.h>
+#else
+# include <time/time.h>
+
+/* Now define the internal interfaces. */
+struct tm;
+
+/* Subroutine of `mktime'. Return the `time_t' representation of TP and
+ normalize TP, given that a `struct tm *' maps to a `time_t' as performed
+ by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
+extern time_t __mktime_internal __P ((struct tm *__tp,
+ struct tm *(*__func) (const time_t *,
+ struct tm *),
+ time_t *__offset));
+extern struct tm *__localtime_r __P ((__const time_t *__timer,
+ struct tm *__tp));
+
+/* Compute the `struct tm' representation of *T,
+ offset OFFSET seconds east of UTC,
+ and store year, yday, mon, mday, wday, hour, min, sec into *TP.
+ Return nonzero if successful. */
+extern int __offtime __P ((__const time_t *__timer,
+ long int __offset,
+ struct tm *__tp));
+
+extern char *__asctime_r __P ((__const struct tm *__tp, char *__buf));
+extern void __tzset __P ((void));
+
+/* Return the maximum length of a timezone name.
+ This is what `sysconf (_SC_TZNAME_MAX)' does. */
+extern long int __tzname_max __P ((void));
+
+extern int __nanosleep __P ((__const struct timespec *__requested_time,
+ struct timespec *__remaining));
+extern int __getdate_r __P ((__const char *__string, struct tm *__resbufp));
+#endif
diff --git a/include/ulimit.h b/include/ulimit.h
index 1e6cf9e95a..c1523a1864 100644
--- a/include/ulimit.h
+++ b/include/ulimit.h
@@ -1 +1,4 @@
#include <resource/ulimit.h>
+
+/* Now define the internal interfaces. */
+extern long int __ulimit __P ((int __cmd, ...));
diff --git a/include/unistd.h b/include/unistd.h
index 77901d9846..f676cad415 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1 +1,63 @@
#include <posix/unistd.h>
+
+/* Now define the internal interfaces. */
+extern int __access __P ((__const char *__name, int __type));
+extern int __euidaccess __P ((__const char *__name, int __type));
+extern __off64_t __lseek64 __P ((int __fd, __off64_t __offset, int __whence));
+extern ssize_t __pread __P ((int __fd, __ptr_t __buf, size_t __nbytes,
+ __off_t __offset));
+extern ssize_t __pwrite __P ((int __fd, __const __ptr_t __buf, size_t __n,
+ __off_t __offset));
+extern int __pipe __P ((int __pipedes[2]));
+extern unsigned int __sleep __P ((unsigned int __seconds));
+extern int __chown __P ((__const char *__file,
+ __uid_t __owner, __gid_t __group));
+extern int __fchown __P ((int __fd,
+ __uid_t __owner, __gid_t __group));
+extern int __lchown __P ((__const char *__file, __uid_t __owner,
+ __gid_t __group));
+extern int __fchdir __P ((int __fd));
+extern char *__getcwd __P ((char *__buf, size_t __size));
+
+/* Get the canonical absolute name of the named directory, and put it in SIZE
+ bytes of BUF. Returns NULL if the directory couldn't be determined or
+ SIZE was too small. If successful, returns BUF. In GNU, if BUF is
+ NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
+ unless SIZE <= 0, in which case it is as big as necessary. */
+
+char *__canonicalize_directory_name_internal __P ((__const char *__thisdir,
+ char *__buf,
+ size_t __size));
+
+extern int __dup __P ((int __fd));
+extern int __dup2 __P ((int __fd, int __fd2));
+extern int __execve __P ((__const char *__path, char *__const __argv[],
+ char *__const __envp[]));
+extern long int __pathconf __P ((__const char *__path, int __name));
+extern long int __fpathconf __P ((int __fd, int __name));
+extern long int __sysconf __P ((int __name));
+extern __pid_t __getppid __P ((void));
+extern __pid_t __setsid __P ((void));
+extern __uid_t __getuid __P ((void));
+extern __uid_t __geteuid __P ((void));
+extern __gid_t __getgid __P ((void));
+extern __gid_t __getegid __P ((void));
+extern int __getgroups __P ((int __size, __gid_t __list[]));
+extern int __group_member __P ((__gid_t __gid));
+extern int __setuid __P ((__uid_t __uid));
+extern int __setreuid __P ((__uid_t __ruid, __uid_t __euid));
+extern int __setgid __P ((__gid_t __gid));
+extern int __setregid __P ((__gid_t __rgid, __gid_t __egid));
+extern __pid_t __vfork __P ((void));
+extern int __ttyname_r __P ((int __fd, char *__buf, size_t __buflen));
+extern int __isatty __P ((int __fd));
+extern int __link __P ((__const char *__from, __const char *__to));
+extern int __symlink __P ((__const char *__from, __const char *__to));
+extern int __readlink __P ((__const char *__path, char *__buf, size_t __len));
+extern int __unlink __P ((__const char *__name));
+extern int __rmdir __P ((__const char *__path));
+extern int __gethostname __P ((char *__name, size_t __len));
+extern int __profil __P ((unsigned short int *__sample_buffer, size_t __size,
+ size_t __offset, unsigned int __scale));
+extern int __getdtablesize __P ((void));
+extern int __brk __P ((__ptr_t __addr));
diff --git a/include/utmp.h b/include/utmp.h
index c0c21a4436..4535acb6a0 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -1 +1,17 @@
#include <login/utmp.h>
+
+/* Now define the internal interfaces. */
+extern void __updwtmp __P ((__const char *__wtmp_file,
+ __const struct utmp *__utmp));
+extern int __utmpname __P ((__const char *__file));
+extern struct utmp *__getutent __P ((void));
+extern void __setutent __P ((void));
+extern void __endutent __P ((void));
+extern struct utmp *__getutid __P ((__const struct utmp *__id));
+extern struct utmp *__getutline __P ((__const struct utmp *__line));
+extern struct utmp *__pututline __P ((__const struct utmp *__utmp_ptr));
+extern int __getutent_r __P ((struct utmp *__buffer, struct utmp **__result));
+extern int __getutid_r __P ((__const struct utmp *__id, struct utmp *__buffer,
+ struct utmp **__result));
+extern int __getutline_r __P ((__const struct utmp *__line,
+ struct utmp *__buffer, struct utmp **__result));
diff --git a/include/wchar.h b/include/wchar.h
index c87ffb851b..95a8c431ab 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -1 +1,30 @@
#include <wcsmbs/wchar.h>
+
+/* Now define the internal interfaces. */
+extern int __wcscasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2));
+extern int __wcsncasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2,
+ size_t __n));
+extern size_t __wcsnlen __P ((__const wchar_t *__s, size_t __maxlen));
+extern wint_t __btowc __P ((int __c));
+extern int __mbsinit __P ((__const mbstate_t *__ps));
+extern size_t __mbrtowc __P ((wchar_t *__restrict __pwc,
+ __const char *__restrict __s, size_t __n,
+ mbstate_t *__restrict __p));
+extern size_t __wcrtomb __P ((char *__restrict __s, wchar_t __wc,
+ mbstate_t *__restrict __ps));
+extern size_t __mbsrtowcs __P ((wchar_t *__restrict __dst,
+ __const char **__restrict __src,
+ size_t __len, mbstate_t *__restrict __ps));
+extern size_t __wcsrtombs __P ((char *__restrict __dst,
+ __const wchar_t **__restrict __src,
+ size_t __len, mbstate_t *__restrict __ps));
+extern size_t __mbsnrtowcs __P ((wchar_t *__restrict __dst,
+ __const char **__restrict __src, size_t __nmc,
+ size_t __len, mbstate_t *__restrict __ps));
+extern size_t __wcsnrtombs __P ((char *__restrict __dst,
+ __const wchar_t **__restrict __src,
+ size_t __nwc, size_t __len,
+ mbstate_t *__restrict __ps));
+extern wchar_t *__wcpcpy __P ((wchar_t *__dest, __const wchar_t *__src));
+extern wchar_t *__wcpncpy __P ((wchar_t *__dest, __const wchar_t *__src,
+ size_t __n));
diff --git a/intl/libintl.h b/intl/libintl.h
index 2c8e8a49eb..0a0f898ed7 100644
--- a/intl/libintl.h
+++ b/intl/libintl.h
@@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
This file is derived from the file libgettext.h in the GNU gettext package.
@@ -36,7 +36,6 @@ __BEGIN_DECLS
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
extern char *gettext __P ((__const char *__msgid));
-extern char *__gettext __P ((__const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
@@ -57,14 +56,11 @@ extern char *__dcgettext __P ((__const char *__domainname,
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
extern char *textdomain __P ((__const char *__domainname));
-extern char *__textdomain __P ((__const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
extern char *bindtextdomain __P ((__const char *__domainname,
__const char *__dirname));
-extern char *__bindtextdomain __P ((__const char *__domainname,
- __const char *__dirname));
/* Optimized version of the function above. */
diff --git a/io/fcntl.h b/io/fcntl.h
index 9f9fe8d50c..aa0796b24d 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -64,7 +64,6 @@ extern int fcntl __P ((int __fd, int __cmd, ...));
OFLAG determines the type of access used. If O_CREAT is on OFLAG,
the third argument is taken as a `mode_t', the mode of the created file. */
extern int __open __P ((__const char *__file, int __oflag, ...));
-extern int __open64 __P ((__const char *__file, int __oflag, ...));
#ifndef __USE_FILE_OFFSET64
extern int open __P ((__const char *__file, int __oflag, ...));
#else
diff --git a/io/fstat.c b/io/fstat.c
index 45e60d6b32..d93d0929ac 100644
--- a/io/fstat.c
+++ b/io/fstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 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
@@ -37,6 +37,7 @@
all callers. */
#undef fstat
+#undef __fstat
int
__fstat (int fd, struct stat *buf)
{
diff --git a/io/lstat.c b/io/lstat.c
index 7ad7b90d4c..356001db8b 100644
--- a/io/lstat.c
+++ b/io/lstat.c
@@ -37,6 +37,7 @@
all callers. */
#undef lstat
+#undef __lstat
int
__lstat (const char *file, struct stat *buf)
{
diff --git a/io/sys/stat.h b/io/sys/stat.h
index ab27f7c5fc..83113e8d36 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -176,18 +176,12 @@ __BEGIN_DECLS
#endif
+#ifndef __USE_FILE_OFFSET64
/* Get file attributes for FILE and put them in BUF. */
-extern int __stat __P ((__const char *__file, struct stat *__buf));
+extern int stat __P ((__const char *__file, struct stat *__buf));
+
/* Get file attributes for the file, device, pipe, or socket
that file descriptor FD is open on and put them in BUF. */
-extern int __fstat __P ((int __fd, struct stat *__buf));
-/* Get file attributes about FILE and put them in BUF.
- If FILE is a symbolic link, do not follow it. */
-extern int __lstat __P ((__const char *__file, struct stat *__buf));
-
-
-#ifndef __USE_FILE_OFFSET64
-extern int stat __P ((__const char *__file, struct stat *__buf));
extern int fstat __P ((int __fd, struct stat *__buf));
#else
# ifdef __REDIRECT
@@ -206,6 +200,8 @@ extern int fstat64 __P ((int __fd, struct stat64 *__buf));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
# ifndef __USE_FILE_OFFSET64
+/* Get file attributes about FILE and put them in BUF.
+ If FILE is a symbolic link, do not follow it. */
extern int lstat __P ((__const char *__file, struct stat *__buf));
# else
# ifdef __REDIRECT
@@ -223,11 +219,9 @@ extern int lstat64 __P ((__const char *__file, struct stat64 *__buf));
/* Set file access permissions for FILE to MODE.
This takes an `int' MODE argument because that
is what `mode_t's get widened to. */
-extern int __chmod __P ((__const char *__file, __mode_t __mode));
extern int chmod __P ((__const char *__file, __mode_t __mode));
/* Set file access permissions of the file FD is open on to MODE. */
-extern int __fchmod __P ((int __fd, __mode_t __mode));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int fchmod __P ((int __fd, __mode_t __mode));
#endif
@@ -235,7 +229,6 @@ extern int fchmod __P ((int __fd, __mode_t __mode));
/* Set the file creation mask of the current process to MASK,
and return the old creation mask. */
-extern __mode_t __umask __P ((__mode_t __mask));
extern __mode_t umask __P ((__mode_t __mask));
#ifdef __USE_GNU
@@ -245,14 +238,11 @@ extern __mode_t getumask __P ((void));
#endif
/* Create a new directory named PATH, with permission bits MODE. */
-extern int __mkdir __P ((__const char *__path, __mode_t __mode));
extern int mkdir __P ((__const char *__path, __mode_t __mode));
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
device numbers with the `makedev' macro above). */
-extern int __mknod __P ((__const char *__path,
- __mode_t __mode, __dev_t __dev));
#if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int mknod __P ((__const char *__path,
__mode_t __mode, __dev_t __dev));
@@ -322,19 +312,11 @@ extern int __xmknod __P ((int __ver, __const char *__path,
#if defined __GNUC__ && __GNUC__ >= 2
/* Inlined versions of the real stat and mknod functions. */
-extern __inline__ int __stat (__const char *__path, struct stat *__statbuf)
-{
- return __xstat (_STAT_VER, __path, __statbuf);
-}
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);
-}
# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern __inline__ int lstat (__const char *__path, struct stat *__statbuf)
{
@@ -342,22 +324,17 @@ extern __inline__ int lstat (__const char *__path, struct stat *__statbuf)
}
# endif
-extern __inline__ int __fstat (int __fd, struct stat *__statbuf)
-{
- return __fxstat (_STAT_VER, __fd, __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); }
# if defined __USE_MISC || defined __USE_BSD
extern __inline__ int mknod (__const char *__path, __mode_t __mode,
__dev_t __dev)
-{ return __xmknod (_MKNOD_VER, __path, __mode, &__dev); }
+{
+ return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
+}
# endif
# ifdef __USE_LARGEFILE64
diff --git a/io/sys/statfs.h b/io/sys/statfs.h
index 436668b590..be93bc9239 100644
--- a/io/sys/statfs.h
+++ b/io/sys/statfs.h
@@ -28,7 +28,6 @@
__BEGIN_DECLS
/* Return information about the filesystem on which FILE resides. */
-extern int __statfs __P ((__const char *__file, struct statfs *__buf));
#ifndef __USE_FILE_OFFSET64
extern int statfs __P ((__const char *__file, struct statfs *__buf));
#else
@@ -45,7 +44,6 @@ extern int statfs64 __P ((__const char *__file, struct statfs64 *__buf));
/* Return information about the filesystem containing the file FILDES
refers to. */
-extern int __fstatfs __P ((int __fildes, struct statfs *__buf));
#ifndef __USE_FILE_OFFSET64
extern int fstatfs __P ((int __fildes, struct statfs *__buf));
#else
diff --git a/io/sys/statvfs.h b/io/sys/statvfs.h
index 73a2fa7df7..31d60df28b 100644
--- a/io/sys/statvfs.h
+++ b/io/sys/statvfs.h
@@ -28,7 +28,6 @@
__BEGIN_DECLS
/* Return information about the filesystem on which FILE resides. */
-extern int __statvfs __P ((__const char *__file, struct statvfs *__buf));
#ifndef __USE_FILE_OFFSET64
extern int statvfs __P ((__const char *__file, struct statvfs *__buf));
#else
@@ -46,7 +45,6 @@ extern int statvfs64 __P ((__const char *__file, struct statvfs64 *__buf));
/* Return information about the filesystem containing the file FILDES
refers to. */
-extern int __fstatvfs __P ((int __fildes, struct statvfs *__buf));
#ifndef __USE_FILE_OFFSET64
extern int fstatvfs __P ((int __fildes, struct statvfs *__buf));
#else
diff --git a/libio/stdio.h b/libio/stdio.h
index 7b5e4f857f..e7b167d848 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -187,7 +187,6 @@ extern int fflush_unlocked __P ((FILE *__stream));
#ifdef __USE_GNU
/* Close all streams. */
-extern int __fcloseall __P ((void));
extern int fcloseall __P ((void));
#endif
@@ -280,7 +279,7 @@ extern int vsprintf __P ((char *__restrict __s,
__const char *__restrict __format,
_G_va_list __arg));
-#ifdef __OPTIMIZE__
+#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
__STDIO_INLINE int
vprintf (__const char *__restrict __fmt, _G_va_list __arg)
{
@@ -290,9 +289,6 @@ vprintf (__const char *__restrict __fmt, _G_va_list __arg)
#if defined __USE_BSD || defined __USE_ISOC9X || defined __USE_UNIX98
/* Maximum chars of output to write in MAXLEN. */
-extern int __snprintf __P ((char *__restrict __s, size_t __maxlen,
- __const char *__restrict __format, ...))
- __attribute__ ((__format__ (__printf__, 3, 4)));
extern int snprintf __P ((char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...))
__attribute__ ((__format__ (__printf__, 3, 4)));
@@ -340,19 +336,12 @@ extern int sscanf __P ((__const char *__restrict __s,
#ifdef __USE_GNU
/* Read formatted input from S into argument list ARG. */
-extern int __vfscanf __P ((FILE *__restrict __s,
- __const char *__restrict __format,
- _G_va_list __arg))
- __attribute__ ((__format__ (__scanf__, 2, 0)));
extern int vfscanf __P ((FILE *__restrict __s,
__const char *__restrict __format,
_G_va_list __arg))
__attribute__ ((__format__ (__scanf__, 2, 0)));
/* Read formatted input from stdin into argument list ARG. */
-extern int __vscanf __P ((__const char *__restrict __format,
- _G_va_list __arg))
- __attribute__ ((__format__ (__scanf__, 1, 0)));
extern int vscanf __P ((__const char *__restrict __format, _G_va_list __arg))
__attribute__ ((__format__ (__scanf__, 1, 0)));
@@ -379,7 +368,7 @@ extern int getchar __P ((void));
optimization for it. */
#define getc(_fp) _IO_getc (_fp)
-#ifdef __OPTIMIZE__
+#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
__STDIO_INLINE int
getchar (void)
{
@@ -419,7 +408,7 @@ extern int putchar __P ((int __c));
so we always do the optimization for it. */
#define putc(_ch, _fp) _IO_putc (_ch, _fp)
-#ifdef __OPTIMIZE__
+#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
__STDIO_INLINE int
putchar (int __c)
{
@@ -458,7 +447,7 @@ putchar_unlocked (int __c)
return _IO_putc_unlocked (__c, stdout);
}
# endif /* Optimizing. */
-#endif /* Use POSIX or MISc. */
+#endif /* Use POSIX or MISC. */
#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
@@ -491,16 +480,16 @@ extern char *gets __P ((char *__s));
NULL), pointing to *N characters of space. It is realloc'd as
necessary. Returns the number of characters read (not including the
null terminator), or -1 on error or EOF. */
-_IO_ssize_t __getdelim __P ((char **__lineptr, size_t *__n,
- int __delimiter, FILE *__stream));
-_IO_ssize_t getdelim __P ((char **__lineptr, size_t *__n,
- int __delimiter, FILE *__stream));
+extern _IO_ssize_t __getdelim __P ((char **__lineptr, size_t *__n,
+ int __delimiter, FILE *__stream));
+extern _IO_ssize_t getdelim __P ((char **__lineptr, size_t *__n,
+ int __delimiter, FILE *__stream));
/* Like `getdelim', but reads up to a newline. */
-_IO_ssize_t __getline __P ((char **__lineptr, size_t *__n, FILE *__stream));
-_IO_ssize_t getline __P ((char **__lineptr, size_t *__n, FILE *__stream));
+extern _IO_ssize_t getline __P ((char **__lineptr, size_t *__n,
+ FILE *__stream));
-# ifdef __OPTIMIZE__
+# if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
__STDIO_INLINE _IO_ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream)
{
diff --git a/login/utmp.h b/login/utmp.h
index ccf29b27ad..21436a33a6 100644
--- a/login/utmp.h
+++ b/login/utmp.h
@@ -53,54 +53,40 @@ extern void logwtmp __P ((__const char *__ut_line, __const char *__ut_name,
__const char *__ut_host));
/* Append entry UTMP to the wtmp-like file WTMP_FILE. */
-extern void __updwtmp __P ((__const char *__wtmp_file,
- __const struct utmp *__utmp));
extern void updwtmp __P ((__const char *__wtmp_file,
__const struct utmp *__utmp));
/* Change name of the utmp file to be examined. */
-extern int __utmpname __P ((__const char *__file));
extern int utmpname __P ((__const char *__file));
/* Read next entry from a utmp-like file. */
-extern struct utmp *__getutent __P ((void));
extern struct utmp *getutent __P ((void));
/* Reset the input stream to the beginning of the file. */
-extern void __setutent __P ((void));
extern void setutent __P ((void));
/* Close the current open file. */
-extern void __endutent __P ((void));
extern void endutent __P ((void));
/* Search forward from the current point in the utmp file until the
next entry with a ut_type matching ID->ut_type. */
-extern struct utmp *__getutid __P ((__const struct utmp *__id));
extern struct utmp *getutid __P ((__const struct utmp *__id));
/* Search forward from the current point in the utmp file until the
next entry with a ut_line matching LINE->ut_line. */
-extern struct utmp *__getutline __P ((__const struct utmp *__line));
extern struct utmp *getutline __P ((__const struct utmp *__line));
/* Write out entry pointed to by UTMP_PTR into the utmp file. */
-extern struct utmp *__pututline __P ((__const struct utmp *__utmp_ptr));
extern struct utmp *pututline __P ((__const struct utmp *__utmp_ptr));
#ifdef __USE_MISC
/* Reentrant versions of the file for handling utmp files. */
-extern int __getutent_r __P ((struct utmp *__buffer, struct utmp **__result));
extern int getutent_r __P ((struct utmp *__buffer, struct utmp **__result));
-extern int __getutid_r __P ((__const struct utmp *__id, struct utmp *__buffer,
- struct utmp **__result));
extern int getutid_r __P ((__const struct utmp *__id, struct utmp *__buffer,
struct utmp **__result));
-extern int __getutline_r __P ((__const struct utmp *__line,
- struct utmp *__buffer, struct utmp **__result));
extern int getutline_r __P ((__const struct utmp *__line,
struct utmp *__buffer, struct utmp **__result));
diff --git a/misc/mntent.h b/misc/mntent.h
index ca45710f8e..f7101c19dd 100644
--- a/misc/mntent.h
+++ b/misc/mntent.h
@@ -64,7 +64,6 @@ struct mntent
/* Prepare to begin reading and/or writing mount table entries from the
beginning of FILE. MODE is as for `fopen'. */
-extern FILE *__setmntent __P ((__const char *__file, __const char *__mode));
extern FILE *setmntent __P ((__const char *__file, __const char *__mode));
/* Read one mount table entry from STREAM. Returns a pointer to storage
@@ -74,9 +73,6 @@ extern struct mntent *getmntent __P ((FILE *__stream));
#ifdef __USE_MISC
/* Reentrant version of the above function. */
-extern struct mntent *__getmntent_r __P ((FILE *__stream,
- struct mntent *__result,
- char *__buffer, int __bufsize));
extern struct mntent *getmntent_r __P ((FILE *__stream,
struct mntent *__result,
char *__buffer, int __bufsize));
@@ -84,17 +80,13 @@ extern struct mntent *getmntent_r __P ((FILE *__stream,
/* Write the mount table entry described by MNT to STREAM.
Return zero on success, nonzero on failure. */
-extern int __addmntent __P ((FILE *__stream, __const struct mntent *__mnt));
extern int addmntent __P ((FILE *__stream, __const struct mntent *__mnt));
/* Close a stream opened with `setmntent'. */
-extern int __endmntent __P ((FILE *__stream));
extern int endmntent __P ((FILE *__stream));
/* Search MNT->mnt_opts for an option matching OPT.
Returns the address of the substring, or null if none found. */
-extern char *__hasmntopt __P ((__const struct mntent *__mnt,
- __const char *__opt));
extern char *hasmntopt __P ((__const struct mntent *__mnt,
__const char *__opt));
diff --git a/misc/search.h b/misc/search.h
index 323bb217c6..b534d93ccb 100644
--- a/misc/search.h
+++ b/misc/search.h
@@ -90,7 +90,6 @@ extern ENTRY *hsearch __P ((ENTRY __item, ACTION __action));
extern int hcreate __P ((size_t __nel));
/* Destroy current internal hashing table. */
-extern void __hdestroy __P ((void));
extern void hdestroy __P ((void));
#ifdef __USE_GNU
@@ -127,21 +126,15 @@ VISIT;
/* Search for an entry matching the given KEY in the tree pointed to
by *ROOTP and insert a new element if not found. */
-extern void *__tsearch __PMT ((__const void *__key, void **__rootp,
- __compar_fn_t compar));
extern void *tsearch __PMT ((__const void *__key, void **__rootp,
__compar_fn_t compar));
/* Search for an entry matching the given KEY in the tree pointed to
by *ROOTP. If no matching entry is available return NULL. */
-extern void *__tfind __PMT ((__const void *__key, void *__const *__rootp,
- __compar_fn_t compar));
extern void *tfind __PMT ((__const void *__key, void *__const *__rootp,
__compar_fn_t compar));
/* Remove the element matching KEY from the tree pointed to by *ROOTP. */
-extern void *__tdelete __PMT ((__const void *__key, void **__rootp,
- __compar_fn_t compar));
extern void *tdelete __PMT ((__const void *__key, void **__rootp,
__compar_fn_t compar));
@@ -154,7 +147,6 @@ typedef void (*__action_fn_t) __PMT ((__const void *__nodep,
/* Walk through the whole tree and call the ACTION callback for every node
or leaf. */
-extern void __twalk __PMT ((__const void *__root, __action_fn_t action));
extern void twalk __PMT ((__const void *__root, __action_fn_t action));
#ifdef __USE_GNU
@@ -163,7 +155,6 @@ extern void twalk __PMT ((__const void *__root, __action_fn_t action));
typedef void (*__free_fn_t) __PMT ((void *__nodep));
/* Destroy the whole tree, call FREEFCT for each node or leaf. */
-extern void __tdestroy __PMT ((void *__root, __free_fn_t freefct));
extern void tdestroy __PMT ((void *__root, __free_fn_t freefct));
#endif
diff --git a/misc/sys/file.h b/misc/sys/file.h
index 02285938cf..a2e7bf0ee6 100644
--- a/misc/sys/file.h
+++ b/misc/sys/file.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1997, 1998 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
@@ -48,7 +48,6 @@ __BEGIN_DECLS
/* Apply or remove an advisory lock, according to OPERATION,
on the file FD refers to. */
-extern int __flock __P ((int __fd, int __operation));
extern int flock __P ((int __fd, int __operation));
diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h
index 644ac5b02f..acb42f2b35 100644
--- a/misc/sys/ioctl.h
+++ b/misc/sys/ioctl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 96, 98 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
@@ -39,7 +39,6 @@ __BEGIN_DECLS
/* Perform the I/O control operation specified by REQUEST on FD.
One argument may follow; its presence and type depend on REQUEST.
Return value depends on REQUEST. Usually -1 indicates error. */
-extern int __ioctl __P ((int __fd, unsigned long int __request, ...));
extern int ioctl __P ((int __fd, unsigned long int __request, ...));
__END_DECLS
diff --git a/misc/sys/select.h b/misc/sys/select.h
index 17edf820aa..d65e4b07a0 100644
--- a/misc/sys/select.h
+++ b/misc/sys/select.h
@@ -1,5 +1,5 @@
/* `fd_set' type and related macros, and `select'/`pselect' declarations.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 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
@@ -78,9 +78,6 @@ extern int select __P ((int __nfds, __fd_set *__readfds,
#ifdef __USE_POSIX
/* Same as above only that the TIMEOUT value is given with higher
resolution. This version should be used. */
-extern int __pselect __P ((int __nfds, __fd_set *__readfds,
- __fd_set *__writefds, __fd_set *__exceptfds,
- struct timespec *__timeout));
extern int pselect __P ((int __nfds, __fd_set *__readfds,
__fd_set *__writefds, __fd_set *__exceptfds,
struct timespec *__timeout));
diff --git a/misc/sys/uio.h b/misc/sys/uio.h
index 3b11276362..0be33e9b45 100644
--- a/misc/sys/uio.h
+++ b/misc/sys/uio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1997, 1998 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
@@ -34,8 +34,6 @@ __BEGIN_DECLS
The buffers are filled in the order specified.
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
-extern ssize_t __readv __P ((int __fd, __const struct iovec *__vector,
- int __count));
extern ssize_t readv __P ((int __fd, __const struct iovec *__vector,
int __count));
@@ -44,12 +42,9 @@ extern ssize_t readv __P ((int __fd, __const struct iovec *__vector,
The data is written in the order specified.
Operates just like `write' (see <unistd.h>) except that the data
are taken from VECTOR instead of a contiguous buffer. */
-extern ssize_t __writev __P ((int __fd, __const struct iovec *__vector,
- int __count));
extern ssize_t writev __P ((int __fd, __const struct iovec *__vector,
int __count));
-
__END_DECLS
#endif /* sys/uio.h */
diff --git a/misc/sys/ustat.h b/misc/sys/ustat.h
index 239d70b25d..355f28ddd9 100644
--- a/misc/sys/ustat.h
+++ b/misc/sys/ustat.h
@@ -1,5 +1,5 @@
/* Header describing obsolete `ustat' interface.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 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
@@ -31,7 +31,6 @@
__BEGIN_DECLS
-extern int __ustat __P ((__dev_t __dev, struct ustat *__ubuf));
extern int ustat __P ((__dev_t __dev, struct ustat *__ubuf));
__END_DECLS
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
index 9432b14b34..bc318fa5c7 100644
--- a/nss/nss_files/files-XXX.c
+++ b/nss/nss_files/files-XXX.c
@@ -185,7 +185,7 @@ internal_getent (struct STRUCTURE *result,
if (p == NULL)
{
/* End of file or read error. */
- *errnop = errno;
+ *errnop = ENOENT;
H_ERRNO_SET (HOST_NOT_FOUND);
return NSS_STATUS_NOTFOUND;
}
diff --git a/posix/sys/times.h b/posix/sys/times.h
index 6f2838d6f1..f524438acc 100644
--- a/posix/sys/times.h
+++ b/posix/sys/times.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1998 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
@@ -46,7 +46,6 @@ struct tms
dead children (and their dead children) in BUFFER.
Return the elapsed real time, or (clock_t) -1 for errors.
All times are in CLK_TCKths of a second. */
-extern clock_t __times __P ((struct tms *__buffer));
extern clock_t times __P ((struct tms *__buffer));
__END_DECLS
diff --git a/posix/sys/wait.h b/posix/sys/wait.h
index 1eeac91200..2ba604de6b 100644
--- a/posix/sys/wait.h
+++ b/posix/sys/wait.h
@@ -128,8 +128,6 @@ extern __pid_t wait __P ((__WAIT_STATUS __stat_loc));
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 __P ((__pid_t __pid, int *__stat_loc,
- int __options));
extern __pid_t waitpid __P ((__pid_t __pid, int *__stat_loc,
int __options));
@@ -158,8 +156,6 @@ struct rusage;
nil, store information about the child's resource usage there. If the
WUNTRACED bit is set in OPTIONS, return status for stopped children;
otherwise don't. */
-extern __pid_t __wait3 __P ((__WAIT_STATUS __stat_loc,
- int __options, struct rusage * __usage));
extern __pid_t wait3 __P ((__WAIT_STATUS __stat_loc,
int __options, struct rusage * __usage));
#endif
@@ -170,8 +166,6 @@ extern __pid_t wait3 __P ((__WAIT_STATUS __stat_loc,
struct rusage;
/* PID is like waitpid. Other args are like wait3. */
-extern __pid_t __wait4 __P ((__pid_t __pid, __WAIT_STATUS __stat_loc,
- int __options, struct rusage *__usage));
extern __pid_t wait4 __P ((__pid_t __pid, __WAIT_STATUS __stat_loc,
int __options, struct rusage *__usage));
#endif /* Use BSD. */
diff --git a/posix/unistd.h b/posix/unistd.h
index 5f6067370e..aa7deffd57 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -245,13 +245,11 @@ typedef __intptr_t intptr_t;
#define F_OK 0 /* Test for existence. */
/* Test for access to NAME using the real UID and real GID. */
-extern int __access __P ((__const char *__name, int __type));
extern int access __P ((__const char *__name, int __type));
#ifdef __USE_GNU
/* Test for access to NAME using the effective UID and GID
(as normal file operations use). */
-extern int __euidaccess __P ((__const char *__name, int __type));
extern int euidaccess __P ((__const char *__name, int __type));
#endif
@@ -277,7 +275,6 @@ extern int euidaccess __P ((__const char *__name, int __type));
or the end of the file (if WHENCE is SEEK_END).
Return the new file position. */
extern __off_t __lseek __P ((int __fd, __off_t __offset, int __whence));
-extern __off64_t __lseek64 __P ((int __fd, __off64_t __offset, int __whence));
#ifndef __USE_FILE_OFFSET64
extern __off_t lseek __P ((int __fd, __off_t __offset, int __whence));
#else
@@ -311,14 +308,10 @@ extern ssize_t write __P ((int __fd, __const __ptr_t __buf, size_t __n));
/* Read NBYTES into BUF from FD at the given position OFFSET without
changing the file pointer. Return the number read, -1 for errors
or 0 for EOF. */
-extern ssize_t __pread __P ((int __fd, __ptr_t __buf, size_t __nbytes,
- __off_t __offset));
extern ssize_t __pread64 __P ((int __fd, __ptr_t __buf, size_t __nbytes,
__off64_t __offset));
/* Write N bytes of BUF to FD at the given position OFFSET without
changing the file pointer. Return the number written, or -1. */
-extern ssize_t __pwrite __P ((int __fd, __const __ptr_t __buf, size_t __n,
- __off_t __offset));
extern ssize_t __pwrite64 __P ((int __fd, __const __ptr_t __buf, size_t __n,
__off64_t __offset));
@@ -353,7 +346,6 @@ extern ssize_t pwrite64 __P ((int __fd, __const __ptr_t __buf, size_t __n,
If successful, two file descriptors are stored in PIPEDES;
bytes written on PIPEDES[1] can be read from PIPEDES[0].
Returns 0 if successful, -1 if not. */
-extern int __pipe __P ((int __pipedes[2]));
extern int pipe __P ((int __pipedes[2]));
/* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM.
@@ -372,7 +364,6 @@ extern unsigned int alarm __P ((unsigned int __seconds));
SIGALRM signal while inside `sleep' call, the handling of the SIGALRM
signal afterwards is undefined. There is no return value to indicate
error, but if `sleep' returns SECONDS, it probably didn't work. */
-extern unsigned int __sleep __P ((unsigned int __seconds));
extern unsigned int sleep __P ((unsigned int __seconds));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -395,23 +386,16 @@ extern int pause __P ((void));
/* Change the owner and group of FILE. */
-extern int __chown __P ((__const char *__file,
- __uid_t __owner, __gid_t __group));
-extern int chown __P ((__const char *__file,
- __uid_t __owner, __gid_t __group));
+extern int chown __P ((__const char *__file, __uid_t __owner,
+ __gid_t __group));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Change the owner and group of the file that FD is open on. */
-extern int __fchown __P ((int __fd,
- __uid_t __owner, __gid_t __group));
-extern int fchown __P ((int __fd,
- __uid_t __owner, __gid_t __group));
+extern int fchown __P ((int __fd, __uid_t __owner, __gid_t __group));
/* Change owner and group of FILE, if it is a symbolic
link the ownership of the symbolic link is changed. */
-extern int __lchown __P ((__const char *__file, __uid_t __owner,
- __gid_t __group));
extern int lchown __P ((__const char *__file, __uid_t __owner,
__gid_t __group));
@@ -423,7 +407,6 @@ extern int chdir __P ((__const char *__path));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Change the process's working directory to the one FD is open on. */
-extern int __fchdir __P ((int __fd));
extern int fchdir __P ((int __fd));
#endif
@@ -434,7 +417,6 @@ extern int fchdir __P ((int __fd));
an array is allocated with `malloc'; the array is SIZE
bytes long, unless SIZE == 0, in which case it is as
big as necessary. */
-extern char *__getcwd __P ((char *__buf, size_t __size));
extern char *getcwd __P ((char *__buf, size_t __size));
#ifdef __USE_GNU
@@ -442,16 +424,6 @@ extern char *getcwd __P ((char *__buf, size_t __size));
If the environment variable `PWD' is set, and its value is correct,
that value is used. */
extern char *get_current_dir_name __P ((void));
-
-/* Get the canonical absolute name of the named directory, and put it in SIZE
- bytes of BUF. Returns NULL if the directory couldn't be determined or
- SIZE was too small. If successful, returns BUF. In GNU, if BUF is
- NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
- unless SIZE <= 0, in which case it is as big as necessary. */
-
-char *__canonicalize_directory_name_internal __P ((__const char *__thisdir,
- char *__buf,
- size_t __size));
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -463,11 +435,9 @@ extern char *getwd __P ((char *__buf));
/* Duplicate FD, returning a new file descriptor on the same file. */
-extern int __dup __P ((int __fd));
extern int dup __P ((int __fd));
/* Duplicate FD to FD2, closing FD2 and making it open on the same file. */
-extern int __dup2 __P ((int __fd, int __fd2));
extern int dup2 __P ((int __fd, int __fd2));
/* NULL-terminated array of "NAME=VALUE" environment variables. */
@@ -479,8 +449,6 @@ extern char **environ;
/* Replace the current process, executing PATH with arguments ARGV and
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
-extern int __execve __P ((__const char *__path, char *__const __argv[],
- char *__const __envp[]));
extern int execve __P ((__const char *__path, char *__const __argv[],
char *__const __envp[]));
@@ -530,15 +498,12 @@ extern void _exit __P ((int __status)) __attribute__ ((__noreturn__));
#include <bits/confname.h>
/* Get file-specific configuration information about PATH. */
-extern long int __pathconf __P ((__const char *__path, int __name));
extern long int pathconf __P ((__const char *__path, int __name));
/* Get file-specific configuration about descriptor FD. */
-extern long int __fpathconf __P ((int __fd, int __name));
extern long int fpathconf __P ((int __fd, int __name));
/* Get the value of the system variable NAME. */
-extern long int __sysconf __P ((int __name));
extern long int sysconf __P ((int __name));
#ifdef __USE_POSIX2
@@ -552,7 +517,6 @@ extern __pid_t __getpid __P ((void));
extern __pid_t getpid __P ((void));
/* Get the process ID of the calling process's parent. */
-extern __pid_t __getppid __P ((void));
extern __pid_t getppid __P ((void));
/* Get the process group ID of the calling process.
@@ -613,7 +577,6 @@ extern int __REDIRECT (setpgrp, __P ((__pid_t __pid, __pid_t __pgrp)),
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process
are set to the process ID of the calling process, which is returned. */
-extern __pid_t __setsid __P ((void));
extern __pid_t setsid __P ((void));
#ifdef __USE_XOPEN_EXTENDED
@@ -622,30 +585,24 @@ extern __pid_t getsid __P ((__pid_t __pid));
#endif
/* Get the real user ID of the calling process. */
-extern __uid_t __getuid __P ((void));
extern __uid_t getuid __P ((void));
/* Get the effective user ID of the calling process. */
-extern __uid_t __geteuid __P ((void));
extern __uid_t geteuid __P ((void));
/* Get the real group ID of the calling process. */
-extern __gid_t __getgid __P ((void));
extern __gid_t getgid __P ((void));
/* Get the effective group ID of the calling process. */
-extern __gid_t __getegid __P ((void));
extern __gid_t getegid __P ((void));
/* If SIZE is zero, return the number of supplementary groups
the calling process is in. Otherwise, fill in the group IDs
of its supplementary groups in LIST and return the number written. */
-extern int __getgroups __P ((int __size, __gid_t __list[]));
extern int getgroups __P ((int __size, __gid_t __list[]));
#ifdef __USE_GNU
/* Return nonzero iff the calling process is in group GID. */
-extern int __group_member __P ((__gid_t __gid));
extern int group_member __P ((__gid_t __gid));
#endif
@@ -653,13 +610,11 @@ extern int group_member __P ((__gid_t __gid));
If the calling process is the super-user, set the real
and effective user IDs, and the saved set-user-ID to UID;
if not, the effective user ID is set to UID. */
-extern int __setuid __P ((__uid_t __uid));
extern int setuid __P ((__uid_t __uid));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Set the real user ID of the calling process to RUID,
and the effective user ID of the calling process to EUID. */
-extern int __setreuid __P ((__uid_t __ruid, __uid_t __euid));
extern int setreuid __P ((__uid_t __ruid, __uid_t __euid));
#endif
@@ -672,13 +627,11 @@ extern int seteuid __P ((__uid_t __uid));
If the calling process is the super-user, set the real
and effective group IDs, and the saved set-group-ID to GID;
if not, the effective group ID is set to GID. */
-extern int __setgid __P ((__gid_t __gid));
extern int setgid __P ((__gid_t __gid));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Set the real group ID of the calling process to RGID,
and the effective group ID of the calling process to EGID. */
-extern int __setregid __P ((__gid_t __rgid, __gid_t __egid));
extern int setregid __P ((__gid_t __rgid, __gid_t __egid));
#endif
@@ -699,7 +652,6 @@ extern __pid_t fork __P ((void));
The calling process is suspended until the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
-extern __pid_t __vfork __P ((void));
extern __pid_t vfork __P ((void));
#endif /* Use BSD. */
@@ -710,12 +662,10 @@ extern char *ttyname __P ((int __fd));
/* Store at most BUFLEN characters of the pathname of the terminal FD is
open on in BUF. Return 0 on success, otherwise an error number. */
-extern int __ttyname_r __P ((int __fd, char *__buf, size_t __buflen));
extern int ttyname_r __P ((int __fd, char *__buf, size_t __buflen));
/* Return 1 if FD is a valid descriptor associated
with a terminal, zero if not. */
-extern int __isatty __P ((int __fd));
extern int isatty __P ((int __fd));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -726,27 +676,22 @@ extern int ttyslot __P ((void));
/* Make a link to FROM named TO. */
-extern int __link __P ((__const char *__from, __const char *__to));
extern int link __P ((__const char *__from, __const char *__to));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Make a symbolic link to FROM named TO. */
-extern int __symlink __P ((__const char *__from, __const char *__to));
extern int symlink __P ((__const char *__from, __const char *__to));
/* Read the contents of the symbolic link PATH into no more than
LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */
-extern int __readlink __P ((__const char *__path, char *__buf, size_t __len));
extern int readlink __P ((__const char *__path, char *__buf, size_t __len));
#endif /* Use BSD. */
/* Remove the link NAME. */
-extern int __unlink __P ((__const char *__name));
extern int unlink __P ((__const char *__name));
/* Remove the directory PATH. */
-extern int __rmdir __P ((__const char *__path));
extern int rmdir __P ((__const char *__path));
@@ -812,7 +757,6 @@ extern char *optarg;
/* Put the name of the current host in no more than LEN bytes of NAME.
The result is null-terminated if LEN is large enough for the full
name and the terminator. */
-extern int __gethostname __P ((char *__name, size_t __len));
extern int gethostname __P ((char *__name, size_t __len));
/* Set the name of the current host to NAME, which is LEN bytes long.
@@ -849,8 +793,6 @@ extern int revoke __P ((__const char *__file));
is enabled, the system examines the user PC and increments
SAMPLE_BUFFER[((PC - OFFSET) / 2) * SCALE / 65536]. If SCALE is zero,
disable profiling. Returns zero on success, -1 on error. */
-extern int __profil __P ((unsigned short int *__sample_buffer, size_t __size,
- size_t __offset, unsigned int __scale));
extern int profil __P ((unsigned short int *__sample_buffer, size_t __size,
size_t __offset, unsigned int __scale));
@@ -933,7 +875,6 @@ extern int ftruncate64 __P ((int __fd, __off64_t __length));
/* Return the maximum number of file descriptors
the current process could possibly have. */
-extern int __getdtablesize __P ((void));
extern int getdtablesize __P ((void));
#endif /* Use BSD || X/Open Unix. */
@@ -943,7 +884,6 @@ extern int getdtablesize __P ((void));
/* Set the end of accessible data space (aka "the break") to ADDR.
Returns zero on success and -1 for errors (with errno set). */
-extern int __brk __P ((__ptr_t __addr));
extern int brk __P ((__ptr_t __addr));
# define __need_ptrdiff_t
diff --git a/pwd/pwd.h b/pwd/pwd.h
index d309656790..edccfedbca 100644
--- a/pwd/pwd.h
+++ b/pwd/pwd.h
@@ -107,22 +107,14 @@ extern struct passwd *getpwnam __P ((__const char *__name));
POSIX people would choose. */
# if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-extern int __getpwent_r __P ((struct passwd *__resultbuf, char *__buffer,
- size_t __buflen, struct passwd **__result));
extern int getpwent_r __P ((struct passwd *__resultbuf, char *__buffer,
size_t __buflen, struct passwd **__result));
# endif
-extern int __getpwuid_r __P ((__uid_t __uid, 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 getpwnam_r __P ((__const char *__name, struct passwd *__resultbuf,
char *__buffer, size_t __buflen,
struct passwd **__result));
@@ -131,9 +123,6 @@ extern int getpwnam_r __P ((__const char *__name, struct passwd *__resultbuf,
# ifdef __USE_SVID
/* Read an entry from STREAM. This function is not standardized and
probably never will. */
-extern int __fgetpwent_r __P ((FILE * __stream, 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/resource/sys/resource.h b/resource/sys/resource.h
index e51a34eb6d..e44193b326 100644
--- a/resource/sys/resource.h
+++ b/resource/sys/resource.h
@@ -28,8 +28,6 @@ __BEGIN_DECLS
/* Put the soft and hard limits for RESOURCE in *RLIMITS.
Returns 0 if successful, -1 if not (and sets errno). */
-extern int __getrlimit __P ((enum __rlimit_resource __resource,
- struct rlimit *__rlimits));
#ifndef __USE_FILE_OFFSET64
extern int getrlimit __P ((enum __rlimit_resource __resource,
struct rlimit *__rlimits));
@@ -69,7 +67,6 @@ extern int setrlimit64 __P ((enum __rlimit_resource __resource,
/* Return resource usage information on process indicated by WHO
and put it in *USAGE. Returns 0 for success, -1 for failure. */
-extern int __getrusage __P ((enum __rusage_who __who, struct rusage *__usage));
extern int getrusage __P ((enum __rusage_who __who, struct rusage *__usage));
/* Return the highest priority of any process specified by WHICH and WHO
diff --git a/resource/ulimit.h b/resource/ulimit.h
index 651e9f4e25..19bffccaac 100644
--- a/resource/ulimit.h
+++ b/resource/ulimit.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 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
@@ -41,7 +41,6 @@ enum
__BEGIN_DECLS
/* Control process limits according to CMD. */
-extern long int __ulimit __P ((int __cmd, ...));
extern long int ulimit __P ((int __cmd, ...));
__END_DECLS
diff --git a/setjmp/setjmp.h b/setjmp/setjmp.h
index b36bf3c692..73d06c9292 100644
--- a/setjmp/setjmp.h
+++ b/setjmp/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,98 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
@@ -77,16 +77,6 @@ extern void _longjmp __P ((jmp_buf __env, int __val))
__attribute__ ((__noreturn__));
#endif
-/* 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));
-
#ifdef __USE_POSIX
/* Use the same type for `jmp_buf' and `sigjmp_buf'.
diff --git a/shadow/shadow.h b/shadow/shadow.h
index d32d440c0a..1ebb0ae5e4 100644
--- a/shadow/shadow.h
+++ b/shadow/shadow.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 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
@@ -78,39 +78,26 @@ extern int putspent __P ((__const struct spwd *__p, FILE *__stream));
#ifdef __USE_MISC
/* Reentrant versions of some of the functions above. */
-extern int __getspent_r __P ((struct spwd *__result_buf, char *__buffer,
- size_t __buflen, struct spwd **__result));
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 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 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 fgetspent_r __P ((FILE *__stream, struct spwd *__result_buf,
char *__buffer, size_t __buflen,
struct spwd **__result));
#endif /* misc */
/* Protect password file against multi writers. */
-extern int __lckpwdf __P ((void));
extern int lckpwdf __P ((void));
/* Unlock password file. */
-extern int __ulckpwdf __P ((void));
extern int ulckpwdf __P ((void));
__END_DECLS
diff --git a/signal/signal.h b/signal/signal.h
index 97656d8fd0..9cf9218a6d 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -81,14 +81,12 @@ extern __sighandler_t __REDIRECT (signal,
#ifdef __USE_XOPEN
/* The X/Open definition of `signal' conflicts with the BSD version.
So they defined another function `bsd_signal'. */
-extern __sighandler_t __bsd_signal __P ((int __sig, __sighandler_t __handler));
extern __sighandler_t bsd_signal __P ((int __sig, __sighandler_t __handler));
#endif
/* Send signal SIG to process number PID. If PID is zero,
send SIG to all processes in the current process's process group.
If PID is < -1, send SIG to all processes in process group - PID. */
-extern int __kill __P ((__pid_t __pid, int __sig));
#ifdef __USE_POSIX
extern int kill __P ((__pid_t __pid, int __sig));
#endif /* Use POSIX. */
@@ -115,13 +113,6 @@ extern void psignal __P ((int __sig, __const char *__s));
#endif /* Use misc. */
-/* Block signals in MASK, returning the old mask. */
-extern int __sigblock __P ((int __mask));
-
-/* Set the mask of blocked signals to MASK, returning the old mask. */
-extern int __sigsetmask __P ((int __mask));
-
-
/* The `sigpause' function has two different interfaces. The original
BSD definition defines the argument as a mask of the signal, while
the more modern interface in X/Open defines it as the signal
@@ -143,13 +134,21 @@ extern int sigpause __P ((int __mask));
#ifdef __USE_BSD
+/* None of the following functions should be used anymore. They are here
+ only for compatibility. A single word (`int') is not guaranteed to be
+ enough to hold a complete signal mask and therefore these functions
+ simply do not work in many situations. Use `sigprocmask' instead. */
+
+/* Compute mask for signal SIG. */
# define sigmask(sig) __sigmask(sig)
+/* Block signals in MASK, returning the old mask. */
extern int sigblock __P ((int __mask));
+
+/* Set the mask of blocked signals to MASK, returning the old mask. */
extern int sigsetmask __P ((int __mask));
-/* This function is here only for compatibility.
- Use `sigprocmask' instead. */
+/* Return currently selected signal mask. */
extern int siggetmask __P ((void));
#endif /* Use BSD. */
@@ -221,14 +220,11 @@ extern int sigorset __P ((sigset_t *__set, __const sigset_t *__left,
# include <bits/sigaction.h>
/* Get and/or change the set of blocked signals. */
-extern int __sigprocmask __P ((int __how,
- __const sigset_t *__set, sigset_t *__oset));
extern int sigprocmask __P ((int __how,
__const sigset_t *__set, sigset_t *__oset));
/* Change the set of blocked signals to SET,
wait until a signal arrives, and restore the set of blocked signals. */
-extern int __sigsuspend __P ((__const sigset_t *__set));
extern int sigsuspend __P ((__const sigset_t *__set));
/* Get and/or set the action for signal SIG. */
@@ -242,24 +238,18 @@ extern int sigpending __P ((sigset_t *__set));
/* Select any of pending signals from SET or wait for any to arrive. */
-extern int __sigwait __P ((__const sigset_t *__set, int *__sig));
extern int sigwait __P ((__const sigset_t *__set, int *__sig));
/* Select any of pending signals from SET and place information in INFO. */
-extern int __sigwaitinfo __P ((__const sigset_t *__set, siginfo_t *__info));
extern int sigwaitinfo __P ((__const sigset_t *__set, siginfo_t *__info));
/* Select any of pending signals from SET and place information in INFO.
Wait the imte specified by TIMEOUT if no signal is pending. */
-extern int __sigtimedwait __P ((__const sigset_t *__set, siginfo_t *__info,
- __const struct timespec *__timeout));
extern int sigtimedwait __P ((__const sigset_t *__set, siginfo_t *__info,
__const struct timespec *__timeout));
/* Send signal SIG to the process PID. Associate data in VAL with the
signal. */
-extern int __sigqueue __P ((__pid_t __pid, int __sig,
- __const union sigval __val));
extern int sigqueue __P ((__pid_t __pid, int __sig,
__const union sigval __val));
@@ -295,8 +285,6 @@ struct sigvec
If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be
reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL,
it is filled in with the old information for SIG. */
-extern int __sigvec __P ((int __sig, __const struct sigvec *__vec,
- struct sigvec *__ovec));
extern int sigvec __P ((int __sig, __const struct sigvec *__vec,
struct sigvec *__ovec));
@@ -305,7 +293,6 @@ extern int sigvec __P ((int __sig, __const struct sigvec *__vec,
# include <bits/sigcontext.h>
/* Restore the state saved in SCP. */
-extern int __sigreturn __P ((struct sigcontext *__scp));
extern int sigreturn __P ((struct sigcontext *__scp));
#endif /* signal.h included and use BSD. */
@@ -331,8 +318,6 @@ extern int sigstack __P ((__const struct sigstack *__ss,
/* Alternate signal handler stack interface.
This interface should always be preferred over `sigstack'. */
-extern int __sigaltstack __P ((__const struct sigaltstack *__ss,
- struct sigaltstack *__oss));
extern int sigaltstack __P ((__const struct sigaltstack *__ss,
struct sigaltstack *__oss));
diff --git a/socket/sys/socket.h b/socket/sys/socket.h
index e94f56f0fa..bbf3f50e7f 100644
--- a/socket/sys/socket.h
+++ b/socket/sys/socket.h
@@ -88,7 +88,6 @@ typedef union { __SOCKADDR_ALLTYPES
/* Create a new socket of type TYPE in domain DOMAIN, using
protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically.
Returns a file descriptor for the new socket, or -1 for errors. */
-extern int __socket __P ((int __domain, int __type, int __protocol));
extern int socket __P ((int __domain, int __type, int __protocol));
/* Create two new sockets, of type TYPE in domain DOMAIN and using
diff --git a/stdlib/alloca.h b/stdlib/alloca.h
index 0416d3b9b1..741eca7431 100644
--- a/stdlib/alloca.h
+++ b/stdlib/alloca.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1997, 1998 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
@@ -27,16 +27,13 @@
__BEGIN_DECLS
/* Remove any previous definitions. */
-#undef __alloca
#undef alloca
/* Allocate a block that will be freed when the calling function exits. */
-extern __ptr_t __alloca __P ((size_t __size));
extern __ptr_t alloca __P ((size_t __size));
#ifdef __GNUC__
-# define __alloca(size) __builtin_alloca (size)
-# define alloca(size) __alloca (size)
+# define alloca(size) __builtin_alloca (size)
#endif /* GCC. */
__END_DECLS
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index c1f1c225b7..7c96fb53ee 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -219,7 +219,7 @@ extern unsigned long long int __strtoull_internal __P ((__const char *
# endif
#endif /* GCC */
-#if defined __OPTIMIZE__ && __GNUC__ >= 2
+#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && __GNUC__ >= 2
/* Define inline functions which call the internal entry points. */
extern __inline double
@@ -326,25 +326,20 @@ extern long int a64l __P ((__const char *__s));
The `rand' and `srand' functions are required by the ANSI standard.
We provide both interfaces to the same random number generator. */
/* Return a random long integer between 0 and RAND_MAX inclusive. */
-extern int32_t __random __P ((void));
extern int32_t random __P ((void));
/* Seed the random number generator with the given number. */
-extern void __srandom __P ((unsigned int __seed));
extern void srandom __P ((unsigned int __seed));
/* Initialize the random number generator to use state buffer STATEBUF,
of length STATELEN, and seed it with SEED. Optimal lengths are 8, 16,
32, 64, 128 and 256, the bigger the better; values less than 8 will
cause an error and values greater than 256 will be rounded down. */
-extern __ptr_t __initstate __P ((unsigned int __seed, __ptr_t __statebuf,
- size_t __statelen));
extern __ptr_t initstate __P ((unsigned int __seed, __ptr_t __statebuf,
size_t __statelen));
/* Switch the random number generator to state buffer STATEBUF,
which should have been previously initialized by `initstate'. */
-extern __ptr_t __setstate __P ((__ptr_t __statebuf));
extern __ptr_t setstate __P ((__ptr_t __statebuf));
@@ -364,18 +359,13 @@ struct random_data
int32_t *end_ptr; /* Pointer behind state table. */
};
-extern int __random_r __P ((struct random_data *__buf, int32_t *__result));
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 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 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 setstate_r __P ((__ptr_t __statebuf, struct random_data *__buf));
# endif /* Use misc. */
#endif /* Use SVID || extended X/Open. */
@@ -388,7 +378,6 @@ extern void srand __P ((unsigned int __seed));
#ifdef __USE_POSIX
/* Reentrant interface according to POSIX.1. */
-extern int __rand_r __P ((unsigned int *__seed));
extern int rand_r __P ((unsigned int *__seed));
#endif
@@ -426,46 +415,28 @@ struct drand48_data
# ifdef __USE_MISC
/* Return non-negative, double-precision floating-point value in [0.0,1.0). */
extern int drand48_r __P ((struct drand48_data *__buffer, double *__result));
-extern int __erand48_r __P ((unsigned short int __xsubi[3],
- struct drand48_data *__buffer, double *__result));
extern int erand48_r __P ((unsigned short int __xsubi[3],
struct drand48_data *__buffer, double *__result));
/* Return non-negative, long integer in [0,2^31). */
extern int lrand48_r __P ((struct drand48_data *__buffer, long int *__result));
-extern int __nrand48_r __P ((unsigned short int __xsubi[3],
- struct drand48_data *__buffer,
- long int *__result));
extern int nrand48_r __P ((unsigned short int __xsubi[3],
struct drand48_data *__buffer, long int *__result));
/* Return signed, long integers in [-2^31,2^31). */
extern int mrand48_r __P ((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 jrand48_r __P ((unsigned short int __xsubi[3],
struct drand48_data *__buffer, long int *__result));
/* Seed random number generator. */
-extern int __srand48_r __P ((long int __seedval,
- struct drand48_data *__buffer));
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 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));
extern int lcong48_r __P ((unsigned short int __param[7],
struct drand48_data *__buffer));
# endif /* Use misc. */
-
-/* Internal function to compute next state of the generator. */
-extern int __drand48_iterate __P ((unsigned short int __xsubi[3],
- struct drand48_data *__buffer));
#endif /* Use SVID or X/Open. */
@@ -533,13 +504,10 @@ extern int putenv __P ((__const char *__string));
#ifdef __USE_BSD
/* Set NAME to VALUE in the environment.
If REPLACE is nonzero, overwrite an existing value. */
-extern int __setenv __P ((__const char *__name, __const char *__value,
- int __replace));
extern int setenv __P ((__const char *__name, __const char *__value,
int __replace));
/* Remove the variable NAME from the environment. */
-extern void __unsetenv __P ((__const char *__name));
extern void unsetenv __P ((__const char *__name));
#endif
@@ -547,7 +515,6 @@ extern void unsetenv __P ((__const char *__name));
/* The `clearenv' was planned to be added to POSIX.1 but probably
never made it. Nevertheless the POSIX.9 standard (POSIX bindings
for Fortran 77) requires this function. */
-extern int __clearenv __P ((void));
extern int clearenv __P ((void));
#endif
@@ -576,7 +543,6 @@ extern int system __P ((__const char *__command));
/* Return a malloc'd string containing the canonical absolute name of the
named file. The last file name component need not exist, and may be a
symlink to a nonexistent file. */
-extern char *__canonicalize_file_name __P ((__const char *__name));
extern char *canonicalize_file_name __P ((__const char *__name));
#endif
@@ -587,7 +553,6 @@ extern char *canonicalize_file_name __P ((__const char *__name));
name is PATH_MAX chars or more, returns null with `errno' set to
ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the
name in RESOLVED. */
-extern char *__realpath __P ((__const char *__name, char *__resolved));
extern char *realpath __P ((__const char *__name, char *__resolved));
#endif
@@ -748,11 +713,9 @@ extern char *ptsname __P ((int __fd));
/* Store at most BUFLEN characters of the pathname of the slave pseudo
terminal associated with the master FD is open on in BUF.
Return 0 on success, otherwise an error number. */
-extern int __ptsname_r __P ((int __fd, char *__buf, size_t __buflen));
extern int ptsname_r __P ((int __fd, char *__buf, size_t __buflen));
/* Open a master pseudo terminal and return its file descriptor. */
-extern int __getpt __P ((void));
extern int getpt __P ((void));
#endif
diff --git a/string/string.h b/string/string.h
index 8f863b887c..9226850640 100644
--- a/string/string.h
+++ b/string/string.h
@@ -44,8 +44,6 @@ extern __ptr_t memmove __P ((__ptr_t __dest, __const __ptr_t __src,
/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
Return the position in DEST one byte past where C was copied,
or NULL if C was not found in the first N bytes of SRC. */
-extern __ptr_t __memccpy __P ((__ptr_t __dest, __const __ptr_t __src,
- int __c, size_t __n));
#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN
extern __ptr_t memccpy __P ((__ptr_t __dest, __const __ptr_t __src,
int __c, size_t __n));
@@ -198,7 +196,6 @@ extern size_t strlen __P ((__const char *__s));
#ifdef __USE_GNU
/* Find the length of STRING, but scan at most MAXLEN characters.
If no '\0' terminator is found in that many characters, return MAXLEN. */
-extern size_t __strnlen __P ((__const char *__string, size_t __maxlen));
extern size_t strnlen __P ((__const char *__string, size_t __maxlen));
#endif
@@ -270,13 +267,11 @@ extern int __strncasecmp_l __P ((__const char *__s1, __const char *__s2,
#ifdef __USE_BSD
/* Return the next DELIM-delimited token from *STRINGP,
terminating it with a '\0', and update *STRINGP to point past it. */
-extern char *__strsep __P ((char **__stringp, __const char *__delim));
extern char *strsep __P ((char **__stringp, __const char *__delim));
#endif
#ifdef __USE_GNU
/* Compare S1 and S2 as strings holding name & indices/version numbers. */
-extern int __strverscmp __P ((__const char *__s1, __const char *__s2));
extern int strverscmp __P ((__const char *__s1, __const char *__s2));
/* Return a string describing the meaning of the signal number in SIG. */
diff --git a/sysdeps/generic/sys/mman.h b/sysdeps/generic/sys/mman.h
index f6e0196f70..8596e70211 100644
--- a/sysdeps/generic/sys/mman.h
+++ b/sysdeps/generic/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Generic/4.4 BSD version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -89,8 +89,6 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
#ifndef __USE_FILE_OFFSET64
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, __off_t __offset));
@@ -100,21 +98,17 @@ extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
__asm__ ("mmap64");
#endif
#ifdef __USE_LARGEFILE64
-extern __ptr_t __mmap64 __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off64_t __offset));
extern __ptr_t mmap64 __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, __off64_t __offset));
#endif
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
index cf0bf45673..6ada4e6497 100644
--- a/sysdeps/unix/bsd/osf/sys/mman.h
+++ b/sysdeps/unix/bsd/osf/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. OSF/1 version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -90,20 +90,16 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 420aed9296..15608e5f24 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. SunOS 4 version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -87,20 +87,16 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
index b884ba51ac..142509455c 100644
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Ultrix 4 version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -71,20 +71,16 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Ultrix 4 does not implement `msync' or `madvise'. */
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
index ff1918ec88..9147aa7e58 100644
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Irix 4 version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -81,20 +81,16 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 9d5d5e65df..113bf4df5b 100644
--- a/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/sysdeps/unix/sysv/linux/bits/sched.h
@@ -50,8 +50,6 @@ struct sched_param
__BEGIN_DECLS
/* Clone current process. */
-extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack,
- int __flags, void *__arg));
#ifdef __USE_MISC
extern int clone __P ((int (*__fn) (void *__arg), void *__child_stack,
int __flags, void *__arg));
diff --git a/sysdeps/unix/sysv/linux/sys/mman.h b/sysdeps/unix/sysv/linux/sys/mman.h
index 92cc3d2f66..ac17af71c0 100644
--- a/sysdeps/unix/sysv/linux/sys/mman.h
+++ b/sysdeps/unix/sysv/linux/sys/mman.h
@@ -41,8 +41,6 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
#ifndef __USE_FILE_OFFSET64
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, __off_t __offset));
@@ -52,21 +50,17 @@ extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
__asm__ ("mmap64");
#endif
#ifdef __USE_LARGEFILE64
-extern __ptr_t __mmap64 __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off64_t __offset));
extern __ptr_t mmap64 __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, __off64_t __offset));
#endif
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
@@ -100,8 +94,6 @@ extern int munlock __P ((__const __ptr_t __addr, size_t __len));
/* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length
NEW_LEN. If MAY_MOVE is MREMAP_MAYMOVE the returned address may
differ from ADDR. */
-extern __ptr_t __mremap __P ((__ptr_t __addr, size_t __old_len,
- size_t __new_len, int __may_move));
extern __ptr_t mremap __P ((__ptr_t __addr, size_t __old_len,
size_t __new_len, int __may_move));
#endif
diff --git a/termios/termios.h b/termios/termios.h
index 0b06f09587..0306d8fb8d 100644
--- a/termios/termios.h
+++ b/termios/termios.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 96, 97, 98 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
@@ -64,7 +64,6 @@ extern int cfsetspeed __P ((struct termios *__termios_p, speed_t __speed));
/* Put the state of FD into *TERMIOS_P. */
-extern int __tcgetattr __P ((int __fd, struct termios *__termios_p));
extern int tcgetattr __P ((int __fd, struct termios *__termios_p));
/* Set the state of FD to *TERMIOS_P.
diff --git a/time/sys/time.h b/time/sys/time.h
index f5b03f3e9e..6c51bc6c44 100644
--- a/time/sys/time.h
+++ b/time/sys/time.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 96, 97, 98 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
@@ -61,8 +61,6 @@ extern int gettimeofday __P ((struct timeval *__tv,
/* Set the current time of day and timezone information.
This call is restricted to the super-user. */
-extern int __settimeofday __P ((__const struct timeval *__tv,
- __const struct timezone *__tz));
extern int settimeofday __P ((__const struct timeval *__tv,
__const struct timezone *__tz));
@@ -70,8 +68,6 @@ extern int settimeofday __P ((__const struct timeval *__tv,
If OLDDELTA is not NULL, it is filled in with the amount
of time adjustment remaining to be done from the last `adjtime' call.
This call is restricted to the super-user. */
-extern int __adjtime __P ((__const struct timeval *__delta,
- struct timeval *__olddelta));
extern int adjtime __P ((__const struct timeval *__delta,
struct timeval *__olddelta));
@@ -103,24 +99,18 @@ struct itimerval
/* Set *VALUE to the current setting of timer WHICH.
Return 0 on success, -1 on errors. */
-extern int __getitimer __P ((enum __itimer_which __which,
- struct itimerval *__value));
extern int getitimer __P ((enum __itimer_which __which,
struct itimerval *__value));
/* Set the timer WHICH to *NEW. If OLD is not NULL,
set *OLD to the old value of timer WHICH.
Returns 0 on success, -1 on errors. */
-extern int __setitimer __P ((enum __itimer_which __which,
- __const struct itimerval *__new,
- struct itimerval *__old));
extern int setitimer __P ((enum __itimer_which __which,
__const struct itimerval *__new,
struct itimerval *__old));
/* Change the access time of FILE to TVP[0] and
the modification time of FILE to TVP[1]. */
-extern int __utimes __P ((__const char *__file, struct timeval __tvp[2]));
extern int utimes __P ((__const char *__file, struct timeval __tvp[2]));
diff --git a/time/time.h b/time/time.h
index c9276dab01..0af3eafddb 100644
--- a/time/time.h
+++ b/time/time.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,98 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
@@ -170,14 +170,6 @@ extern double difftime __P ((time_t __time1, time_t __time0))
/* Return the `time_t' representation of TP and normalize TP. */
extern time_t mktime __P ((struct tm *__tp));
-/* Subroutine of `mktime'. Return the `time_t' representation of TP and
- normalize TP, given that a `struct tm *' maps to a `time_t' as performed
- by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
-extern time_t __mktime_internal __P ((struct tm *__tp,
- struct tm *(*__func) (const time_t *,
- struct tm *),
- time_t *__offset));
-
#ifdef __USE_ISOC9X
/* Return the `time_t' representation of TP and normalize TP, taking
account for the extra members in `struct tmx'. */
@@ -229,20 +221,10 @@ extern struct tm *gmtime_r __P ((__const time_t *__timer,
/* Return the `struct tm' representation of *TIMER in local time,
using *TP to store the result. */
-extern struct tm *__localtime_r __P ((__const time_t *__timer,
- struct tm *__tp));
extern struct tm *localtime_r __P ((__const time_t *__timer,
struct tm *__tp));
# endif /* POSIX or misc */
-/* Compute the `struct tm' representation of *T,
- offset OFFSET seconds east of UTC,
- and store year, yday, mon, mday, wday, hour, min, sec into *TP.
- Return nonzero if successful. */
-extern int __offtime __P ((__const time_t *__timer,
- long int __offset,
- struct tm *__tp));
-
/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
that is the representation of TP in this format. */
extern char *asctime __P ((__const struct tm *__tp));
@@ -255,7 +237,6 @@ extern char *ctime __P ((__const time_t *__timer));
/* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
that is the representation of TP in this format. */
-extern char *__asctime_r __P ((__const struct tm *__tp, char *__buf));
extern char *asctime_r __P ((__const struct tm *__tp, char *__buf));
/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
@@ -268,18 +249,13 @@ extern char *__tzname[2]; /* Current timezone names. */
extern int __daylight; /* If daylight-saving time is ever in use. */
extern long int __timezone; /* Seconds west of UTC. */
-/* Set time conversion information from the TZ environment variable.
- If TZ is not defined, a locale-dependent default is used. */
-extern void __tzset __P ((void));
# ifdef __USE_POSIX
/* Same as above. */
extern char *tzname[2];
-/* Return the maximum length of a timezone name.
- This is what `sysconf (_SC_TZNAME_MAX)' does. */
-extern long int __tzname_max __P ((void));
-
+/* Set time conversion information from the TZ environment variable.
+ If TZ is not defined, a locale-dependent default is used. */
extern void tzset __P ((void));
# endif
@@ -318,8 +294,6 @@ extern int dysize __P ((int __year));
# ifdef __USE_POSIX199309
/* Pause execution for a number of nanoseconds. */
-extern int __nanosleep __P ((__const struct timespec *__requested_time,
- struct timespec *__remaining));
extern int nanosleep __P ((__const struct timespec *__requested_time,
struct timespec *__remaining));
# endif
@@ -352,7 +326,6 @@ extern struct tm *getdate __P ((__const char *__string));
variant. The functionality is the same. The result is returned in
the buffer pointed to by RESBUFP and in case of an error the return
value is != 0 with the same values as given above for `getdate_err'. */
-extern int __getdate_r __P ((__const char *__string, struct tm *__resbufp));
extern int getdate_r __P ((__const char *__string, struct tm *__resbufp));
# endif
diff --git a/wcsmbs/Versions b/wcsmbs/Versions
index 4e6c399eb4..54195bad73 100644
--- a/wcsmbs/Versions
+++ b/wcsmbs/Versions
@@ -1,7 +1,7 @@
libc {
GLIBC_2.0 {
# functions used in inline functions or macros
- __wcsto*_internal;
+ __wcsto*_internal; __mbrlen;
# b*
btowc;
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 8902c3f382..7063d9ca76 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -101,12 +101,9 @@ extern int wcsncmp __P ((__const wchar_t *__s1, __const wchar_t *__s2,
#ifdef __USE_GNU
/* Compare S1 and S2, ignoring case. */
-extern int __wcscasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2));
extern int wcscasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2));
/* Compare no more than N chars of S1 and S2, ignoring case. */
-extern int __wcsncasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2,
- size_t __n));
extern int wcsncasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2,
size_t __n));
@@ -184,7 +181,6 @@ extern size_t wcslen __P ((__const wchar_t *__s));
#ifdef __USE_GNU
/* Return the number of wide characters in S, but at most MAXLEN. */
-extern size_t __wcsnlen __P ((__const wchar_t *__s, size_t __maxlen));
extern size_t wcsnlen __P ((__const wchar_t *__s, size_t __maxlen));
#endif
@@ -211,7 +207,6 @@ extern wchar_t *wmemset __P ((wchar_t *__s, wchar_t __c, size_t __n));
/* Determine whether C constitutes a valid (one-byte) multibyte
character. */
-extern wint_t __btowc __P ((int __c));
extern wint_t btowc __P ((int __c));
/* Determine whether C corresponds to a member of the extended
@@ -220,21 +215,15 @@ extern int wctob __P ((wint_t __c));
/* Determine whether PS points to an object representing the initial
state. */
-extern int __mbsinit __P ((__const mbstate_t *__ps));
extern int mbsinit __P ((__const mbstate_t *__ps));
/* Write wide character representation of multibyte character pointed
to by S to PWC. */
-extern size_t __mbrtowc __P ((wchar_t *__restrict __pwc,
- __const char *__restrict __s, size_t __n,
- mbstate_t *__restrict __p));
extern size_t mbrtowc __P ((wchar_t *__restrict __pwc,
__const char *__restrict __s, size_t __n,
mbstate_t *__p));
/* Write multibyte representation of wide character WC to S. */
-extern size_t __wcrtomb __P ((char *__restrict __s, wchar_t __wc,
- mbstate_t *__restrict __ps));
extern size_t wcrtomb __P ((char *__restrict __s, wchar_t __wc,
mbstate_t *__restrict __ps));
@@ -244,13 +233,13 @@ extern size_t __mbrlen __P ((__const char *__restrict __s, size_t __n,
extern size_t mbrlen __P ((__const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps));
-#if defined __OPTIMIZE__ \
+#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
&& (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
/* Define inline function as optimization. */
extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps)
{ return (__ps != NULL
- ? __mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); }
+ ? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); }
#endif
/* Write wide character representation of multibyte character string
@@ -264,9 +253,6 @@ extern size_t mbsrtowcs __P ((wchar_t *__restrict __dst,
/* Write multibyte character representation of wide character string
SRC to DST. */
-extern size_t __wcsrtombs __P ((char *__restrict __dst,
- __const wchar_t **__restrict __src,
- size_t __len, mbstate_t *__restrict __ps));
extern size_t wcsrtombs __P ((char *__restrict __dst,
__const wchar_t **__restrict __src,
size_t __len, mbstate_t *__restrict __ps));
@@ -275,19 +261,12 @@ extern size_t wcsrtombs __P ((char *__restrict __dst,
#ifdef __USE_GNU
/* Write wide character representation of at most NMC bytes of the
multibyte character string SRC to DST. */
-extern size_t __mbsnrtowcs __P ((wchar_t *__restrict __dst,
- __const char **__restrict __src, size_t __nmc,
- size_t __len, mbstate_t *__restrict __ps));
extern size_t mbsnrtowcs __P ((wchar_t *__restrict __dst,
__const char **__restrict __src, size_t __nmc,
size_t __len, mbstate_t *__restrict __ps));
/* Write multibyte character representation of at most NWC characters
from the wide character string SRC to DST. */
-extern size_t __wcsnrtombs __P ((char *__restrict __dst,
- __const wchar_t **__restrict __src,
- size_t __nwc, size_t __len,
- mbstate_t *__restrict __ps));
extern size_t wcsnrtombs __P ((char *__restrict __dst,
__const wchar_t **__restrict __src,
size_t __nwc, size_t __len,
@@ -492,13 +471,10 @@ extern __inline unsigned long long int wcstouq (__const wchar_t *
#ifdef __USE_GNU
/* Copy SRC to DEST, returning the address of the terminating L'\0' in
DEST. */
-extern wchar_t *__wcpcpy __P ((wchar_t *__dest, __const wchar_t *__src));
extern wchar_t *wcpcpy __P ((wchar_t *__dest, __const wchar_t *__src));
/* Copy no more than N characters of SRC to DEST, returning the address of
the last character written into DEST. */
-extern wchar_t *__wcpncpy __P ((wchar_t *__dest, __const wchar_t *__src,
- size_t __n));
extern wchar_t *wcpncpy __P ((wchar_t *__dest, __const wchar_t *__src,
size_t __n));
#endif /* use GNU */