Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib Update old-style definitions to ANSI, remove a couple of...
details: https://anonhg.NetBSD.org/src/rev/8940db16173b
branches: trunk
changeset: 779897:8940db16173b
user: abs <abs%NetBSD.org@localhost>
date: Mon Jun 25 22:32:43 2012 +0000
description:
Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
diffstat:
lib/libc/arch/vax/gen/frexp.c | 8 ++----
lib/libc/compat-43/getwd.c | 7 ++---
lib/libc/gen/alarm.c | 7 ++---
lib/libc/gen/assert.c | 22 ++++++-----------
lib/libc/gen/confstr.c | 9 ++-----
lib/libc/gen/ctermid.c | 7 ++---
lib/libc/gen/daemon.c | 7 ++---
lib/libc/gen/disklabel.c | 10 +++-----
lib/libc/gen/execv.c | 8 ++----
lib/libc/gen/getbsize.c | 8 ++----
lib/libc/gen/getdomainname.c | 8 ++----
lib/libc/gen/gethostname.c | 8 ++----
lib/libc/gen/initgroups.c | 8 ++----
lib/libc/gen/isascii.c | 7 ++---
lib/libc/gen/isatty.c | 7 ++---
lib/libc/gen/lockf.c | 9 ++-----
lib/libc/gen/popen.c | 7 ++---
lib/libc/gen/readdir.c | 12 +++------
lib/libc/gen/setdomainname.c | 8 ++----
lib/libc/gen/sethostname.c | 8 ++----
lib/libc/gen/setmode.c | 11 +++-----
lib/libc/gen/siginterrupt.c | 7 ++---
lib/libc/gen/signal.c | 8 ++----
lib/libc/gen/sleep.c | 7 ++---
lib/libc/gen/toascii.c | 7 ++---
lib/libc/gen/ualarm.c | 8 ++----
lib/libc/gen/usleep.c | 7 ++---
lib/libc/gen/utime.c | 8 ++----
lib/libc/gen/valloc.c | 7 ++---
lib/libc/hash/md2/md2.c | 16 ++++---------
lib/libc/inet/inet_neta.c | 9 ++-----
lib/libc/locale/_wcstol.h | 7 +----
lib/libc/locale/_wcstoul.h | 7 +----
lib/libc/locale/wcscoll.c | 7 ++---
lib/libc/locale/wcsxfrm.c | 9 ++-----
lib/libc/md/mdXhl.c | 15 +++---------
lib/libc/net/base64.c | 9 ++-----
lib/libc/net/nslexer.l | 7 ++---
lib/libc/nls/catclose.c | 7 ++---
lib/libc/nls/catgets.c | 10 ++-----
lib/libc/resolv/res_debug.c | 19 +++++----------
lib/libc/rpc/getnetpath.c | 7 ++---
lib/libc/rpc/pmap_rmt.c | 15 ++++--------
lib/libc/rpc/rpc_soc.c | 50 ++++++++++-------------------------------
lib/libc/rpc/rpcb_prot.c | 36 ++++++++---------------------
lib/libc/rpc/rpcb_st_xdr.c | 32 +++++++-------------------
lib/libc/rpc/svc_auth_unix.c | 12 +++------
lib/libc/rpc/xdr.c | 20 +++++-----------
lib/libc/rpc/xdr_array.c | 21 +++++------------
lib/libc/rpc/xdr_float.c | 12 +++------
lib/libc/rpc/xdr_reference.c | 16 +++----------
lib/libc/stdlib/atof.c | 7 ++---
lib/libc/stdlib/atoi.c | 7 ++---
lib/libc/stdlib/atol.c | 7 ++---
lib/libc/stdlib/atoll.c | 7 ++---
lib/libc/stdlib/div.c | 7 ++---
lib/libc/stdlib/getsubopt.c | 8 ++----
lib/libc/stdlib/insque.c | 6 +---
lib/libc/stdlib/labs.c | 7 ++---
lib/libc/stdlib/ldiv.c | 7 ++---
lib/libc/stdlib/llabs.c | 7 ++---
lib/libc/stdlib/lldiv.c | 7 ++---
lib/libc/stdlib/lsearch.c | 15 ++++--------
lib/libc/stdlib/qabs.c | 7 ++---
lib/libc/stdlib/qdiv.c | 7 ++---
lib/libc/stdlib/rand.c | 7 ++---
lib/libc/stdlib/rand_r.c | 7 ++---
lib/libc/stdlib/remque.c | 5 +--
lib/libc/stdlib/system.c | 7 ++---
lib/libc/stdlib/tdelete.c | 12 ++++-----
lib/libc/stdlib/tfind.c | 12 ++++-----
lib/libc/stdlib/tsearch.c | 10 +++-----
lib/libc/string/bm.c | 17 ++++----------
lib/libc/string/memccpy.c | 10 ++-----
lib/libc/string/strcoll.c | 7 ++---
lib/libc/string/strdup.c | 7 ++---
lib/libc/string/strmode.c | 8 ++----
lib/libc/string/strncat.c | 9 ++-----
lib/libc/string/strsignal.c | 7 ++---
lib/libc/string/strtok_r.c | 9 ++-----
lib/libc/string/strxfrm.c | 9 ++-----
lib/libc/string/wcscat.c | 8 ++----
lib/libc/string/wcscmp.c | 7 ++---
lib/libc/string/wcscpy.c | 8 ++----
lib/libc/string/wcslcat.c | 9 ++-----
lib/libc/string/wcslcpy.c | 9 ++-----
lib/libc/string/wcslen.c | 7 ++---
lib/libc/string/wcsncat.c | 9 ++-----
lib/libc/string/wcsncmp.c | 8 ++----
lib/libc/string/wcsncpy.c | 9 ++-----
lib/libc/string/wcsrchr.c | 8 ++----
lib/libc/string/wcsstr.c | 10 +++-----
lib/libc/string/wcstok.c | 10 +++-----
lib/libc/string/wmemchr.c | 9 ++-----
lib/libc/string/wmemcmp.c | 9 ++-----
lib/libc/string/wmemcpy.c | 9 ++-----
lib/libc/string/wmemmove.c | 9 ++-----
lib/libc/string/wmemset.c | 9 ++-----
lib/libc/sys/swapon.c | 7 ++---
lib/libc/termios/cfgetispeed.c | 7 ++---
lib/libc/termios/cfgetospeed.c | 7 ++---
lib/libc/termios/cfmakeraw.c | 7 ++---
lib/libc/termios/cfsetispeed.c | 8 ++----
lib/libc/termios/cfsetospeed.c | 8 ++----
lib/libc/termios/cfsetspeed.c | 8 ++----
lib/libc/termios/tcdrain.c | 7 ++---
lib/libc/termios/tcflow.c | 7 ++---
lib/libc/termios/tcflush.c | 7 ++---
lib/libc/termios/tcgetattr.c | 8 ++----
lib/libc/termios/tcgetpgrp.c | 7 ++---
lib/libc/termios/tcgetsid.c | 7 ++---
lib/libc/termios/tcsendbreak.c | 7 ++---
lib/libc/termios/tcsetattr.c | 8 ++----
lib/libc/time/asctime.c | 11 +++-----
lib/libc/yp/yp_all.c | 10 +++-----
lib/libc/yp/yp_first.c | 24 +++++---------------
lib/libc/yp/yp_maplist.c | 8 ++----
lib/libc/yp/yp_master.c | 9 ++-----
lib/libc/yp/yp_order.c | 9 ++-----
lib/libc/yp/yperr_string.c | 7 ++---
lib/libc/yp/ypprot_err.c | 7 ++---
lib/libpuffs/framebuf.c | 6 ++--
lib/librumphijack/hijack.c | 6 ++--
lib/librumpuser/rumpuser.c | 6 ++--
lib/libutil/getrawpartition.c | 6 ++--
lib/libutil/passwd.c | 8 ++----
126 files changed, 437 insertions(+), 774 deletions(-)
diffs (truncated from 4117 to 300 lines):
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/arch/vax/gen/frexp.c
--- a/lib/libc/arch/vax/gen/frexp.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/arch/vax/gen/frexp.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: frexp.c,v 1.4 2003/08/07 16:42:31 agc Exp $ */
+/* $NetBSD: frexp.c,v 1.5 2012/06/25 22:32:43 abs Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)frexp.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: frexp.c,v 1.4 2003/08/07 16:42:31 agc Exp $");
+__RCSID("$NetBSD: frexp.c,v 1.5 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -42,9 +42,7 @@
#include <math.h>
double
-frexp(value, eptr)
- double value;
- int *eptr;
+frexp(double value, int *eptr)
{
union {
double v;
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/compat-43/getwd.c
--- a/lib/libc/compat-43/getwd.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/compat-43/getwd.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getwd.c,v 1.14 2003/08/07 16:42:39 agc Exp $ */
+/* $NetBSD: getwd.c,v 1.15 2012/06/25 22:32:43 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getwd.c 8.1 (Berkeley) 6/2/93";
#else
-__RCSID("$NetBSD: getwd.c,v 1.14 2003/08/07 16:42:39 agc Exp $");
+__RCSID("$NetBSD: getwd.c,v 1.15 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -51,8 +51,7 @@
"warning: getwd() possibly used unsafely, consider using getcwd()")
char *
-getwd(buf)
- char *buf;
+getwd(char *buf)
{
char *p;
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/gen/alarm.c
--- a/lib/libc/gen/alarm.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/gen/alarm.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: alarm.c,v 1.10 2003/08/07 16:42:45 agc Exp $ */
+/* $NetBSD: alarm.c,v 1.11 2012/06/25 22:32:43 abs Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)alarm.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: alarm.c,v 1.10 2003/08/07 16:42:45 agc Exp $");
+__RCSID("$NetBSD: alarm.c,v 1.11 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -50,8 +50,7 @@
#endif
unsigned int
-alarm(secs)
- unsigned int secs;
+alarm(unsigned int secs)
{
struct itimerval it, oitv;
struct itimerval *itp = ⁢
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/gen/assert.c
--- a/lib/libc/gen/assert.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/gen/assert.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: assert.c,v 1.16 2005/02/09 21:35:46 kleink Exp $ */
+/* $NetBSD: assert.c,v 1.17 2012/06/25 22:32:43 abs Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)assert.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: assert.c,v 1.16 2005/02/09 21:35:46 kleink Exp $");
+__RCSID("$NetBSD: assert.c,v 1.17 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -47,9 +47,8 @@
#include <syslog.h>
void
-__assert13(file, line, function, failedexpr)
- const char *file, *function, *failedexpr;
- int line;
+__assert13(const char *file, int line, const char *function,
+ const char *failedexpr)
{
(void)fprintf(stderr,
@@ -63,9 +62,7 @@
}
void
-__assert(file, line, failedexpr)
- const char *file, *failedexpr;
- int line;
+__assert(const char *file, int line, const char *failedexpr)
{
__assert13(file, line, NULL, failedexpr);
@@ -82,9 +79,8 @@
static int diagassert_flags = -1;
void
-__diagassert13(file, line, function, failedexpr)
- const char *file, *function, *failedexpr;
- int line;
+__diagassert13(const char *file, int line, const char *function,
+ const char *failedexpr)
{
char buf[1024];
@@ -132,9 +128,7 @@
}
void
-__diagassert(file, line, failedexpr)
- const char *file, *failedexpr;
- int line;
+__diagassert(const char *file, int line, const char *failedexpr)
{
__diagassert13(file, line, NULL, failedexpr);
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/gen/confstr.c
--- a/lib/libc/gen/confstr.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/gen/confstr.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: confstr.c,v 1.12 2006/12/03 00:39:19 christos Exp $ */
+/* $NetBSD: confstr.c,v 1.13 2012/06/25 22:32:43 abs Exp $ */
/*-
* Copyright (c) 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)confstr.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: confstr.c,v 1.12 2006/12/03 00:39:19 christos Exp $");
+__RCSID("$NetBSD: confstr.c,v 1.13 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -53,10 +53,7 @@
#endif
size_t
-confstr(name, buf, len)
- int name;
- char *buf;
- size_t len;
+confstr(int name, char *buf, size_t len)
{
size_t tlen;
int mib[2], sverrno;
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/gen/ctermid.c
--- a/lib/libc/gen/ctermid.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/gen/ctermid.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ctermid.c,v 1.10 2003/08/07 16:42:46 agc Exp $ */
+/* $NetBSD: ctermid.c,v 1.11 2012/06/25 22:32:43 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)ctermid.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: ctermid.c,v 1.10 2003/08/07 16:42:46 agc Exp $");
+__RCSID("$NetBSD: ctermid.c,v 1.11 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -48,8 +48,7 @@
#endif
char *
-ctermid(s)
- char *s;
+ctermid(char *s)
{
static char def[] = _PATH_TTY;
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/gen/daemon.c
--- a/lib/libc/gen/daemon.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/gen/daemon.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: daemon.c,v 1.9 2003/08/07 16:42:46 agc Exp $ */
+/* $NetBSD: daemon.c,v 1.10 2012/06/25 22:32:43 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)daemon.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: daemon.c,v 1.9 2003/08/07 16:42:46 agc Exp $");
+__RCSID("$NetBSD: daemon.c,v 1.10 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -49,8 +49,7 @@
#endif
int
-daemon(nochdir, noclose)
- int nochdir, noclose;
+daemon(int nochdir, int noclose)
{
int fd;
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/gen/disklabel.c
--- a/lib/libc/gen/disklabel.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/gen/disklabel.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.36 2012/03/20 16:36:05 matt Exp $ */
+/* $NetBSD: disklabel.c,v 1.37 2012/06/25 22:32:43 abs Exp $ */
/*
* Copyright (c) 1983, 1987, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: disklabel.c,v 1.36 2012/03/20 16:36:05 matt Exp $");
+__RCSID("$NetBSD: disklabel.c,v 1.37 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -78,8 +78,7 @@
static const char *db_array[2] = { _PATH_DISKTAB, 0 };
int
-setdisktab(name)
- const char *name;
+setdisktab(const char *name)
{
if (!name || !*name)
return -1;
@@ -90,8 +89,7 @@
struct disklabel *
-getdiskbyname(name)
- const char *name;
+getdiskbyname(const char *name)
{
static struct disklabel disk;
struct disklabel *dp = &disk;
diff -r 4f79a47aa98d -r 8940db16173b lib/libc/gen/execv.c
--- a/lib/libc/gen/execv.c Mon Jun 25 20:39:54 2012 +0000
+++ b/lib/libc/gen/execv.c Mon Jun 25 22:32:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: execv.c,v 1.9 2005/11/29 13:30:49 christos Exp $ */
+/* $NetBSD: execv.c,v 1.10 2012/06/25 22:32:43 abs Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: execv.c,v 1.9 2005/11/29 13:30:49 christos Exp $");
+__RCSID("$NetBSD: execv.c,v 1.10 2012/06/25 22:32:43 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -49,9 +49,7 @@
extern char **environ;
int
-execv(name, argv)
- const char *name;
- char * const *argv;
+execv(const char *name, char * const *argv)
{
Home |
Main Index |
Thread Index |
Old Index