* sysdeps/unix/sysv/linux/tcdrain.c: Define tcdrain, not
authorRoland McGrath <roland@gnu.org>
Sat, 20 Jan 1996 10:00:23 +0000 (10:00 +0000)
committerRoland McGrath <roland@gnu.org>
Sat, 20 Jan 1996 10:00:23 +0000 (10:00 +0000)
__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.

ChangeLog
db/db/db.c
db/hash/hash_log2.c
db/ndbm.h
posix/getopt.c
posix/glob.c
sysdeps/generic/_strerror.c
sysdeps/unix/sysv/linux/tcdrain.c

index 4715d04..f41f575 100644 (file)
--- 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.
 
index a18f056..c93b36f 100644 (file)
@@ -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;
 }
index c8c56bf..92fda72 100644 (file)
@@ -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;
index a545bca..48c4083 100644 (file)
--- 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_ */
index 371b6f1..a85053f 100644 (file)
@@ -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;
index d628b84..c8f2eab 100644 (file)
@@ -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)
                {
index 569f701..8067f3f 100644 (file)
@@ -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)
     {
index 67c7573..20cc809 100644 (file)
@@ -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)