aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-01-20 10:00:23 +0000
committerRoland McGrath <roland@gnu.org>1996-01-20 10:00:23 +0000
commiteb63bdd072eafe6aba40d254a71fd87285f497da (patch)
tree6e65cc839e06b6cbed8609bd829efbd802367c35
parent522548fb473c5855e399596e838932963e03695f (diff)
downloadglibc-eb63bdd072eafe6aba40d254a71fd87285f497da.zip
glibc-eb63bdd072eafe6aba40d254a71fd87285f497da.tar.gz
glibc-eb63bdd072eafe6aba40d254a71fd87285f497da.tar.bz2
* sysdeps/unix/sysv/linux/tcdrain.c: Define tcdrain, notcvs/libc-960120
__tcdrain. * posix/glob.c (glob): Use prototype in getlogin decl. * db/ndbm.h: Declare dbm_error, dbm_clearerr. * db/db/db.c (__dberr): Define with prototype. (__dbpanic): Use prototypes in casts. * db/hash/hash_log2.c: Add prototype decl. * sysdeps/generic/_strerror.c (_strerror_internal): Define with prototype.
-rw-r--r--ChangeLog13
-rw-r--r--db/db/db.c18
-rw-r--r--db/hash/hash_log2.c2
-rw-r--r--db/ndbm.h2
-rw-r--r--posix/getopt.c7
-rw-r--r--posix/glob.c2
-rw-r--r--sysdeps/generic/_strerror.c9
-rw-r--r--sysdeps/unix/sysv/linux/tcdrain.c6
8 files changed, 42 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 4715d04..f41f575 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
Fri Jan 19 13:28:59 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+ * sysdeps/unix/sysv/linux/tcdrain.c: Define tcdrain, not
+ __tcdrain.
+
+ * posix/glob.c (glob): Use prototype in getlogin decl.
+
+ * db/ndbm.h: Declare dbm_error, dbm_clearerr.
+ * db/db/db.c (__dberr): Define with prototype.
+ (__dbpanic): Use prototypes in casts.
+ * db/hash/hash_log2.c: Add prototype decl.
+
+ * sysdeps/generic/_strerror.c (_strerror_internal): Define with
+ prototype.
+
* sysdeps/unix/mkdir.c, syspdep/unix/rmdir.c: Moved from unix/sysv.
They will be overridden with syscalls if extant by unix/syscalls.list.
diff --git a/db/db/db.c b/db/db/db.c
index a18f056..c93b36f 100644
--- a/db/db/db.c
+++ b/db/db/db.c
@@ -74,7 +74,7 @@ dbopen(fname, flags, mode, type, openinfo)
}
static int
-__dberr()
+__dberr __P((void))
{
return (RET_ERROR);
}
@@ -90,10 +90,14 @@ __dbpanic(dbp)
DB *dbp;
{
/* The only thing that can succeed is a close. */
- dbp->del = (int (*)())__dberr;
- dbp->fd = (int (*)())__dberr;
- dbp->get = (int (*)())__dberr;
- dbp->put = (int (*)())__dberr;
- dbp->seq = (int (*)())__dberr;
- dbp->sync = (int (*)())__dberr;
+ dbp->del = (int (*)__P((const struct __db *,
+ const DBT *, u_int))) __dberr;
+ dbp->get = (int (*)__P((const struct __db *,
+ const DBT *, DBT *, u_int))) __dberr;
+ dbp->put = (int (*)__P((const struct __db *,
+ DBT *, const DBT *, u_int))) __dberr;
+ dbp->seq = (int (*)__P((const struct __db *,
+ DBT *, DBT *, u_int))) __dberr;
+ dbp->sync = (int (*)__P((const struct __db *, u_int))) __dberr;
+ dbp->fd = (int (*)__P((const struct __db *))) __dberr;
}
diff --git a/db/hash/hash_log2.c b/db/hash/hash_log2.c
index c8c56bf..92fda72 100644
--- a/db/hash/hash_log2.c
+++ b/db/hash/hash_log2.c
@@ -42,6 +42,8 @@ static char sccsid[] = "@(#)hash_log2.c 8.2 (Berkeley) 5/31/94";
#include <db.h>
+u_int32_t __log2 __P((u_int32_t));
+
u_int32_t
__log2(num)
u_int32_t num;
diff --git a/db/ndbm.h b/db/ndbm.h
index a545bca..48c4083 100644
--- a/db/ndbm.h
+++ b/db/ndbm.h
@@ -72,6 +72,8 @@ datum dbm_nextkey __P((DBM *));
DBM *dbm_open __P((const char *, int, int));
int dbm_store __P((DBM *, datum, datum, int));
int dbm_dirfno __P((DBM *));
+int dbm_error __P((DBM *));
+int dbm_clearerr __P((DBM *));
__END_DECLS
#endif /* !_NDBM_H_ */
diff --git a/posix/getopt.c b/posix/getopt.c
index 371b6f1..a85053f 100644
--- a/posix/getopt.c
+++ b/posix/getopt.c
@@ -230,6 +230,10 @@ static int last_nonopt;
`first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
+#if defined (__STDC__) && __STDC__
+static void exchange (char **);
+#endif
+
static void
exchange (argv)
char **argv;
@@ -288,6 +292,9 @@ exchange (argv)
/* Initialize the internal data when the first call is made. */
+#if defined (__STDC__) && __STDC__
+static const char *_getopt_initialize (const char *);
+#endif
static const char *
_getopt_initialize (optstring)
const char *optstring;
diff --git a/posix/glob.c b/posix/glob.c
index d628b84..c8f2eab 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -358,7 +358,7 @@ glob (pattern, flags, errfunc, pglob)
dirname = getenv ("HOME");
if (dirname == NULL || dirname[0] == '\0')
{
- extern char *getlogin ();
+ extern char *getlogin __P ((void));
char *name = getlogin ();
if (name != NULL)
{
diff --git a/sysdeps/generic/_strerror.c b/sysdeps/generic/_strerror.c
index 569f701..8067f3f 100644
--- a/sysdeps/generic/_strerror.c
+++ b/sysdeps/generic/_strerror.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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,10 +27,9 @@ Cambridge, MA 02139, USA. */
/* Return a string describing the errno code in ERRNUM. */
char *
-_strerror_internal (errnum, buf, buflen)
- int errnum;
- char *buf;
- size_t buflen;
+_strerror_internal (int errnum,
+ char *buf,
+ size_t buflen)
{
if (errnum < 0 || errnum >= _sys_nerr)
{
diff --git a/sysdeps/unix/sysv/linux/tcdrain.c b/sysdeps/unix/sysv/linux/tcdrain.c
index 67c7573..20cc809 100644
--- a/sysdeps/unix/sysv/linux/tcdrain.c
+++ b/sysdeps/unix/sysv/linux/tcdrain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996 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
@@ -21,11 +21,9 @@ Cambridge, MA 02139, USA. */
/* Wait for pending output to be written on FD. */
int
-__tcdrain (fd)
+tcdrain (fd)
int fd;
{
/* With an argument of 1, TCSBRK for output to be drain. */
return __ioctl (fd, TCSBRK, 1);
}
-
-weak_alias (__tcdrain, tcdrain)