Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen Use C89 definitions.
details: https://anonhg.NetBSD.org/src/rev/652e3988cfa1
branches: trunk
changeset: 778245:652e3988cfa1
user: matt <matt%NetBSD.org@localhost>
date: Tue Mar 20 16:36:04 2012 +0000
description:
Use C89 definitions.
Remove use of __P
diffstat:
lib/libc/gen/_sysconf.c | 9 ++++-----
lib/libc/gen/disklabel.c | 12 +++++-------
lib/libc/gen/fmtmsg.c | 40 ++++++++++++++--------------------------
lib/libc/gen/ftok.c | 8 +++-----
lib/libc/gen/getmntinfo.c | 8 +++-----
lib/libc/gen/getnetgrent.c | 7 +++----
lib/libc/gen/nlist.c | 6 +++---
lib/libc/gen/nlist_elf32.c | 8 +++-----
lib/libc/gen/nlist_private.h | 12 ++++++------
lib/libc/gen/pthread_atfork.c | 6 +++---
lib/libc/gen/pw_private.h | 4 ++--
lib/libc/gen/setmode.c | 20 ++++++++------------
lib/libc/gen/sysctl.c | 22 ++++++++--------------
lib/libc/gen/uname.c | 7 +++----
lib/libc/gen/wait.c | 9 ++++-----
lib/libc/gen/wait3.c | 9 +++------
16 files changed, 75 insertions(+), 112 deletions(-)
diffs (truncated from 585 to 300 lines):
diff -r 7932ca88b196 -r 652e3988cfa1 lib/libc/gen/_sysconf.c
--- a/lib/libc/gen/_sysconf.c Tue Mar 20 16:30:26 2012 +0000
+++ b/lib/libc/gen/_sysconf.c Tue Mar 20 16:36:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: _sysconf.c,v 1.5 2009/10/21 01:07:45 snj Exp $ */
+/* $NetBSD: _sysconf.c,v 1.6 2012/03/20 16:36:04 matt Exp $ */
/*
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _sysconf.c,v 1.5 2009/10/21 01:07:45 snj Exp $");
+__RCSID("$NetBSD: _sysconf.c,v 1.6 2012/03/20 16:36:04 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#if defined(__indr_reference)
@@ -34,11 +34,10 @@
#else
#include <unistd.h>
-long __sysconf __P((int)); /* XXX */
+long __sysconf(int); /* XXX */
long
-sysconf(name)
- int name;
+sysconf(int name)
{
return __sysconf(name);
diff -r 7932ca88b196 -r 652e3988cfa1 lib/libc/gen/disklabel.c
--- a/lib/libc/gen/disklabel.c Tue Mar 20 16:30:26 2012 +0000
+++ b/lib/libc/gen/disklabel.c Tue Mar 20 16:36:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.35 2012/03/13 21:13:34 christos Exp $ */
+/* $NetBSD: disklabel.c,v 1.36 2012/03/20 16:36:05 matt 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.35 2012/03/13 21:13:34 christos Exp $");
+__RCSID("$NetBSD: disklabel.c,v 1.36 2012/03/20 16:36:05 matt Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -71,9 +71,9 @@
#endif
#if 0
-static void error __P((int));
+static void error(int);
#endif
-static int gettype __P((char *, const char *const *));
+static int gettype(char *, const char *const *);
static const char *db_array[2] = { _PATH_DISKTAB, 0 };
@@ -208,9 +208,7 @@
}
static int
-gettype(t, names)
- char *t;
- const char *const *names;
+gettype(char *t, const char *const *names)
{
const char *const *nm;
diff -r 7932ca88b196 -r 652e3988cfa1 lib/libc/gen/fmtmsg.c
--- a/lib/libc/gen/fmtmsg.c Tue Mar 20 16:30:26 2012 +0000
+++ b/lib/libc/gen/fmtmsg.c Tue Mar 20 16:36:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fmtmsg.c,v 1.4 2008/04/28 20:22:59 martin Exp $ */
+/* $NetBSD: fmtmsg.c,v 1.5 2012/03/20 16:36:05 matt Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fmtmsg.c,v 1.4 2008/04/28 20:22:59 martin Exp $");
+__RCSID("$NetBSD: fmtmsg.c,v 1.5 2012/03/20 16:36:05 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include <fmtmsg.h>
@@ -40,11 +40,11 @@
#include <stdlib.h>
#include <string.h>
-static unsigned int msgverb __P((const char *));
-static const char * severity2str __P((int));
-static int writeit __P((FILE *, unsigned int, const char *,
+static unsigned int msgverb(const char *);
+static const char * severity2str(int);
+static int writeit(FILE *, unsigned int, const char *,
const char *, const char *, const char *,
- const char *));
+ const char *);
#define MM_VERBLABEL 0x01U
#define MM_VERBSEVERITY 0x02U
@@ -74,8 +74,7 @@
* keywords.
*/
static unsigned int
-msgverb(str)
- const char *str;
+msgverb(const char *str)
{
u_int i;
unsigned int result;
@@ -107,7 +106,7 @@
return (result);
}
-static const char * const severities[] = {
+static const char severities[][8] = {
"", /* MM_NONE */
"HALT",
"ERROR",
@@ -122,8 +121,7 @@
* value, defaulting to NULL for an unknown value.
*/
static const char *
-severity2str(severity)
- int severity;
+severity2str(int severity)
{
const char *result;
@@ -142,14 +140,9 @@
* written, or a negative value in case of an error.
*/
static int
-writeit(stream, which, label, sevstr, text, action, tag)
- FILE *stream;
- unsigned int which;
- const char *label;
- const char *sevstr;
- const char *text;
- const char *action;
- const char *tag;
+writeit(FILE *stream, unsigned int which, const char *label,
+ const char *sevstr, const char *text, const char *action,
+ const char *tag)
{
int nwritten;
@@ -184,13 +177,8 @@
}
int
-fmtmsg(classification, label, severity, text, action, tag)
- long classification;
- const char *label;
- int severity;
- const char *text;
- const char *action;
- const char *tag;
+fmtmsg(long classification, const char *label, int severity,
+ const char *text, const char *action, const char *tag)
{
FILE *console;
const char *p, *sevstr;
diff -r 7932ca88b196 -r 652e3988cfa1 lib/libc/gen/ftok.c
--- a/lib/libc/gen/ftok.c Tue Mar 20 16:30:26 2012 +0000
+++ b/lib/libc/gen/ftok.c Tue Mar 20 16:36:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftok.c,v 1.10 2004/09/15 19:45:17 hubertf Exp $ */
+/* $NetBSD: ftok.c,v 1.11 2012/03/20 16:36:05 matt Exp $ */
/*
* Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo%sigmasoft.com@localhost>
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: ftok.c,v 1.10 2004/09/15 19:45:17 hubertf Exp $");
+__RCSID("$NetBSD: ftok.c,v 1.11 2012/03/20 16:36:05 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -43,9 +43,7 @@
#endif
key_t
-ftok(path, id)
- const char *path;
- int id;
+ftok(const char *path, int id)
{
struct stat st;
diff -r 7932ca88b196 -r 652e3988cfa1 lib/libc/gen/getmntinfo.c
--- a/lib/libc/gen/getmntinfo.c Tue Mar 20 16:30:26 2012 +0000
+++ b/lib/libc/gen/getmntinfo.c Tue Mar 20 16:36:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getmntinfo.c,v 1.16 2005/09/13 01:44:09 christos Exp $ */
+/* $NetBSD: getmntinfo.c,v 1.17 2012/03/20 16:36:05 matt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getmntinfo.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: getmntinfo.c,v 1.16 2005/09/13 01:44:09 christos Exp $");
+__RCSID("$NetBSD: getmntinfo.c,v 1.17 2012/03/20 16:36:05 matt Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -51,9 +51,7 @@
* Return information about mounted filesystems.
*/
int
-getmntinfo(mntbufp, flags)
- struct statvfs **mntbufp;
- int flags;
+getmntinfo(struct statvfs **mntbufp, int flags)
{
static struct statvfs *mntbuf;
static int mntsize;
diff -r 7932ca88b196 -r 652e3988cfa1 lib/libc/gen/getnetgrent.c
--- a/lib/libc/gen/getnetgrent.c Tue Mar 20 16:30:26 2012 +0000
+++ b/lib/libc/gen/getnetgrent.c Tue Mar 20 16:36:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getnetgrent.c,v 1.41 2009/10/21 01:07:45 snj Exp $ */
+/* $NetBSD: getnetgrent.c,v 1.42 2012/03/20 16:36:05 matt Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getnetgrent.c,v 1.41 2009/10/21 01:07:45 snj Exp $");
+__RCSID("$NetBSD: getnetgrent.c,v 1.42 2012/03/20 16:36:05 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -142,8 +142,7 @@
* getnetgroup(): Parse a netgroup, and advance the pointer
*/
static struct netgroup *
-getnetgroup(pp)
- char **pp;
+getnetgroup(char **pp)
{
struct netgroup *ng;
diff -r 7932ca88b196 -r 652e3988cfa1 lib/libc/gen/nlist.c
--- a/lib/libc/gen/nlist.c Tue Mar 20 16:30:26 2012 +0000
+++ b/lib/libc/gen/nlist.c Tue Mar 20 16:36:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist.c,v 1.22 2009/08/20 08:30:04 he Exp $ */
+/* $NetBSD: nlist.c,v 1.23 2012/03/20 16:36:05 matt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -66,7 +66,7 @@
#if 0
static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: nlist.c,v 1.22 2009/08/20 08:30:04 he Exp $");
+__RCSID("$NetBSD: nlist.c,v 1.23 2012/03/20 16:36:05 matt Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -92,7 +92,7 @@
#include "nlist_private.h"
static const struct {
- int (*fdnlist) __P((int, struct nlist *));
+ int (*fdnlist)(int, struct nlist *);
} fdnlist_fmts[] = {
#ifdef NLIST_AOUT
{ __fdnlist_aout },
diff -r 7932ca88b196 -r 652e3988cfa1 lib/libc/gen/nlist_elf32.c
--- a/lib/libc/gen/nlist_elf32.c Tue Mar 20 16:30:26 2012 +0000
+++ b/lib/libc/gen/nlist_elf32.c Tue Mar 20 16:36:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist_elf32.c,v 1.33 2011/10/15 21:06:58 christos Exp $ */
+/* $NetBSD: nlist_elf32.c,v 1.34 2012/03/20 16:36:05 matt Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: nlist_elf32.c,v 1.33 2011/10/15 21:06:58 christos Exp $");
+__RCSID("$NetBSD: nlist_elf32.c,v 1.34 2012/03/20 16:36:05 matt Exp $");
#endif /* LIBC_SCCS and not lint */
Home |
Main Index |
Thread Index |
Old Index