From 41e8adcb98ee7d92236f17855aad0b28c4e78504 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 9 Nov 2003 02:34:03 +0000 Subject: [PATCH] Core integer types header file reorganization stage 2/2: Adjust main source files to reflect stdint.h and other changes. Primarily this means getting rid of the _BSD_XXX type useage but in some cases, such as for tar, it means getting rid of #define overrides for intmax_t and uintmax_t. --- contrib/gcc/config/alpha/freebsd.h | 4 ++-- contrib/gcc/config/alpha/openbsd.h | 4 +++- contrib/gcc/config/i386/freebsd.h | 4 ++-- contrib/gcc/config/i386/freebsd.h.fixed | 4 ++-- contrib/gcc/config/i386/openbsd.h | 4 +++- contrib/gcc/ginclude/stddef.h | 14 +++++++------- gnu/usr.bin/tar/config.h | 8 +------- lib/libc/locale/runetype.c | 5 ++--- lib/libc/locale/table.c | 3 ++- lib/libc/locale/tolower.c | 10 ++++++---- lib/libc/locale/toupper.c | 10 ++++++---- lib/libc/stdio/local.h | 8 ++++++-- lib/libc/stdio/vasprintf.c | 8 +++----- lib/libc/stdio/vprintf.c | 7 +++---- lib/libc/stdio/vscanf.c | 7 +++---- lib/libc/stdio/vsnprintf.c | 9 +++------ lib/libc/stdio/vsprintf.c | 8 +++----- lib/libc/stdio/vsscanf.c | 8 +++----- lib/libc/string/memccpy.c | 4 ++-- lib/libcr/locale/runetype.c | 6 +++--- lib/libcr/locale/tolower.c | 8 ++++---- lib/libcr/stdio/vasprintf.c | 8 +++----- lib/libcr/stdio/vprintf.c | 7 +++---- lib/libcr/stdio/vscanf.c | 7 +++---- lib/libcr/stdio/vsnprintf.c | 9 +++------ lib/libcr/stdio/vsprintf.c | 8 +++----- lib/libcr/stdio/vsscanf.c | 8 +++----- lib/libkvm/kvm.h | 22 ++++++---------------- lib/libmd/ripemd.h | 4 +++- lib/libmd/rmd160c.c | 5 +---- lib/libmd/sha.h | 4 ++-- lib/libmd/sha0c.c | 5 +---- lib/libmd/sha1c.c | 5 ++--- lib/libstand/printf.c | 4 ++-- lib/libstand/stand.h | 9 ++++++--- share/man/man5/dir.5 | 4 ++-- share/man/man5/types.5 | 5 +++-- usr.sbin/ypserv/yp_error.c | 9 ++++----- 38 files changed, 119 insertions(+), 147 deletions(-) diff --git a/contrib/gcc/config/alpha/freebsd.h b/contrib/gcc/config/alpha/freebsd.h index f64bc71cf3..e5df5ba081 100644 --- a/contrib/gcc/config/alpha/freebsd.h +++ b/contrib/gcc/config/alpha/freebsd.h @@ -23,7 +23,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ for FreeBSD/Alpha by Hidetoshi Shimokawa */ /* $FreeBSD: src/contrib/gcc/config/alpha/freebsd.h,v 1.9.2.3 2002/06/20 23:12:36 obrien Exp $ */ -/* $DragonFly: src/contrib/gcc/config/alpha/Attic/freebsd.h,v 1.2 2003/06/17 04:24:01 dillon Exp $ */ +/* $DragonFly: src/contrib/gcc/config/alpha/Attic/freebsd.h,v 1.3 2003/11/09 02:33:58 dillon Exp $ */ /* Names to predefine in the preprocessor for this target machine. @@ -78,7 +78,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /************************[ Target stuff ]***********************************/ /* Define the actual types of some ANSI-mandated types. - Needs to agree with . GCC defaults come from c-decl.c, + Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ /* alpha.h gets this wrong for FreeBSD. We use the GCC defaults instead. */ diff --git a/contrib/gcc/config/alpha/openbsd.h b/contrib/gcc/config/alpha/openbsd.h index 60591d554f..29c9e2ac26 100644 --- a/contrib/gcc/config/alpha/openbsd.h +++ b/contrib/gcc/config/alpha/openbsd.h @@ -18,6 +18,8 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $DragonFly: src/contrib/gcc/config/alpha/Attic/openbsd.h,v 1.2 2003/11/09 02:33:58 dillon Exp $ */ + /* We settle for little endian for now. */ #define TARGET_ENDIAN_DEFAULT 0 @@ -46,7 +48,7 @@ Boston, MA 02111-1307, USA. */ /* Layout of source language data types. */ -/* This must agree with */ +/* This must agree with */ #undef SIZE_TYPE #define SIZE_TYPE "long unsigned int" diff --git a/contrib/gcc/config/i386/freebsd.h b/contrib/gcc/config/i386/freebsd.h index 479cc60fcc..947c48fa29 100644 --- a/contrib/gcc/config/i386/freebsd.h +++ b/contrib/gcc/config/i386/freebsd.h @@ -24,7 +24,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.34.2.5 2002/06/20 23:12:37 obrien Exp $ */ -/* $DragonFly: src/contrib/gcc/config/i386/Attic/freebsd.h,v 1.2 2003/06/17 04:24:01 dillon Exp $ */ +/* $DragonFly: src/contrib/gcc/config/i386/Attic/freebsd.h,v 1.3 2003/11/09 02:34:00 dillon Exp $ */ #undef CPP_PREDEFINES #define CPP_PREDEFINES \ @@ -108,7 +108,7 @@ Boston, MA 02111-1307, USA. */ /************************[ Target stuff ]***********************************/ /* Define the actual types of some ANSI-mandated types. - Needs to agree with . GCC defaults come from c-decl.c, + Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ #undef SIZE_TYPE diff --git a/contrib/gcc/config/i386/freebsd.h.fixed b/contrib/gcc/config/i386/freebsd.h.fixed index 521f8589fb..7090419dc5 100644 --- a/contrib/gcc/config/i386/freebsd.h.fixed +++ b/contrib/gcc/config/i386/freebsd.h.fixed @@ -24,7 +24,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h.fixed,v 1.34.2.3 2001/03/02 09:27:49 obrien Exp $ */ -/* $DragonFly: src/contrib/gcc/config/i386/Attic/freebsd.h.fixed,v 1.2 2003/06/17 04:24:01 dillon Exp $ */ +/* $DragonFly: src/contrib/gcc/config/i386/Attic/freebsd.h.fixed,v 1.3 2003/11/09 02:34:00 dillon Exp $ */ #undef CPP_PREDEFINES #define CPP_PREDEFINES \ @@ -105,7 +105,7 @@ Boston, MA 02111-1307, USA. */ /************************[ Target stuff ]***********************************/ /* Define the actual types of some ANSI-mandated types. - Needs to agree with . GCC defaults come from c-decl.c, + Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ #undef SIZE_TYPE diff --git a/contrib/gcc/config/i386/openbsd.h b/contrib/gcc/config/i386/openbsd.h index dc84f892c1..6b3c148fed 100644 --- a/contrib/gcc/config/i386/openbsd.h +++ b/contrib/gcc/config/i386/openbsd.h @@ -19,6 +19,8 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $DragonFly: src/contrib/gcc/config/i386/Attic/openbsd.h,v 1.2 2003/11/09 02:34:00 dillon Exp $ */ + /* This is tested by i386gas.h. */ #define YES_UNDERSCORES @@ -41,7 +43,7 @@ Boston, MA 02111-1307, USA. */ /* Layout of source language data types. */ -/* This must agree with */ +/* This must agree with */ #undef SIZE_TYPE #define SIZE_TYPE "unsigned int" diff --git a/contrib/gcc/ginclude/stddef.h b/contrib/gcc/ginclude/stddef.h index 3765c2b5eb..970aa37674 100644 --- a/contrib/gcc/ginclude/stddef.h +++ b/contrib/gcc/ginclude/stddef.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/contrib/gcc/ginclude/stddef.h,v 1.3 1999/10/13 15:55:31 obrien Exp $ */ -/* $DragonFly: src/contrib/gcc/ginclude/Attic/stddef.h,v 1.2 2003/06/17 04:24:02 dillon Exp $ */ +/* $DragonFly: src/contrib/gcc/ginclude/Attic/stddef.h,v 1.3 2003/11/09 02:34:01 dillon Exp $ */ #if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \ && !defined(__STDDEF_H__)) \ @@ -25,10 +25,10 @@ /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ -/* On 4.3bsd-net2, make sure ansi.h is included, so we have +/* On 4.3bsd-net2, make sure stdint.h is included, so we have one less case to deal with in the following. */ #if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__) -#include +#include #endif /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are @@ -41,7 +41,7 @@ #if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_) #define _PTRDIFF_T #endif -/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ +/* On BSD/386 1.1, at least, machine/stdint.h defines _BSD_WCHAR_T_ instead of _WCHAR_T_. */ #if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_) #ifndef _BSD_WCHAR_T_ @@ -228,15 +228,15 @@ typedef long ssize_t; #define __INT_WCHAR_T_H #define _GCC_WCHAR_T -/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ +/* On BSD/386 1.1, at least, machine/stdint.h defines _BSD_WCHAR_T_ instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other symbols in the _FOO_T_ family, stays defined even after its corresponding type is defined). If we define wchar_t, then we must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if we undef _WCHAR_T_, then we must also define rune_t, since - headers like runetype.h assume that if machine/ansi.h is included, + headers like runetype.h assume that if machine/stdint.h is included, and _BSD_WCHAR_T_ is not defined, then rune_t is available. - machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of + machine/stdint.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of the same type." */ #ifdef _BSD_WCHAR_T_ #undef _BSD_WCHAR_T_ diff --git a/gnu/usr.bin/tar/config.h b/gnu/usr.bin/tar/config.h index 8ae7dcb604..4fae1b1b56 100644 --- a/gnu/usr.bin/tar/config.h +++ b/gnu/usr.bin/tar/config.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/gnu/usr.bin/tar/config.h,v 1.1.2.1 2002/07/14 13:19:46 sobomax Exp $ */ -/* $DragonFly: src/gnu/usr.bin/tar/Attic/config.h,v 1.2 2003/06/17 04:25:49 dillon Exp $ */ +/* $DragonFly: src/gnu/usr.bin/tar/Attic/config.h,v 1.3 2003/11/09 02:34:01 dillon Exp $ */ #include @@ -540,9 +540,6 @@ if it is not supported. */ /* #undef inline */ -/* Define to widest signed type if doesn't define. */ -#define intmax_t long long - /* Type of major device numbers. */ #define major_t int @@ -578,6 +575,3 @@ /* Define to `int' if doesn't define. */ /* #undef uid_t */ - -/* Define to widest unsigned type if doesn't define. */ -#define uintmax_t unsigned long long diff --git a/lib/libc/locale/runetype.c b/lib/libc/locale/runetype.c index b573835151..1ddb880a21 100644 --- a/lib/libc/locale/runetype.c +++ b/lib/libc/locale/runetype.c @@ -34,15 +34,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/locale/runetype.c,v 1.5.8.1 2000/06/04 21:47:39 ache Exp $ - * $DragonFly: src/lib/libc/locale/Attic/runetype.c,v 1.2 2003/06/17 04:26:44 dillon Exp $ + * $DragonFly: src/lib/libc/locale/Attic/runetype.c,v 1.3 2003/11/09 02:34:01 dillon Exp $ */ #include #include unsigned long -___runetype(c) - _BSD_CT_RUNE_T_ c; +___runetype(__ct_rune_t c) { int x; _RuneRange *rr = &_CurrentRuneLocale->runetype_ext; diff --git a/lib/libc/locale/table.c b/lib/libc/locale/table.c index 69efdf7a63..450dc4f89b 100644 --- a/lib/libc/locale/table.c +++ b/lib/libc/locale/table.c @@ -34,13 +34,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/locale/table.c,v 1.13.2.1 2000/06/04 21:47:39 ache Exp $ - * $DragonFly: src/lib/libc/locale/Attic/table.c,v 1.2 2003/06/17 04:26:44 dillon Exp $ + * $DragonFly: src/lib/libc/locale/Attic/table.c,v 1.3 2003/11/09 02:34:01 dillon Exp $ * * @(#)table.c 8.1 (Berkeley) 6/27/93 */ #include #include +#include extern rune_t _none_sgetrune __P((const char *, size_t, char const **)); extern int _none_sputrune __P((rune_t, char *, size_t, char **)); diff --git a/lib/libc/locale/tolower.c b/lib/libc/locale/tolower.c index 84b7f905f7..17324bc79d 100644 --- a/lib/libc/locale/tolower.c +++ b/lib/libc/locale/tolower.c @@ -34,15 +34,17 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/locale/tolower.c,v 1.5.8.1 2000/06/04 21:47:39 ache Exp $ - * $DragonFly: src/lib/libc/locale/Attic/tolower.c,v 1.2 2003/06/17 04:26:44 dillon Exp $ + * $DragonFly: src/lib/libc/locale/Attic/tolower.c,v 1.3 2003/11/09 02:34:01 dillon Exp $ */ #include #include +#ifndef _SYS_STDINT_H_ +#include +#endif -_BSD_CT_RUNE_T_ -___tolower(c) - _BSD_CT_RUNE_T_ c; +__ct_rune_t +___tolower(__ct_rune_t c) { int x; _RuneRange *rr = &_CurrentRuneLocale->maplower_ext; diff --git a/lib/libc/locale/toupper.c b/lib/libc/locale/toupper.c index 72e1c3b16d..2eff49fa1c 100644 --- a/lib/libc/locale/toupper.c +++ b/lib/libc/locale/toupper.c @@ -34,15 +34,17 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/locale/toupper.c,v 1.5.8.1 2000/06/04 21:47:39 ache Exp $ - * $DragonFly: src/lib/libc/locale/Attic/toupper.c,v 1.2 2003/06/17 04:26:44 dillon Exp $ + * $DragonFly: src/lib/libc/locale/Attic/toupper.c,v 1.3 2003/11/09 02:34:01 dillon Exp $ */ #include #include +#ifndef _SYS_STDINT_H_ +#include +#endif -_BSD_CT_RUNE_T_ -___toupper(c) - _BSD_CT_RUNE_T_ c; +__ct_rune_t +___toupper(__ct_rune_t c) { int x; _RuneRange *rr = &_CurrentRuneLocale->mapupper_ext; diff --git a/lib/libc/stdio/local.h b/lib/libc/stdio/local.h index 9b7535a58a..7d83609f97 100644 --- a/lib/libc/stdio/local.h +++ b/lib/libc/stdio/local.h @@ -36,9 +36,13 @@ * @(#)local.h 8.3 (Berkeley) 7/3/94 * * $FreeBSD: src/lib/libc/stdio/local.h,v 1.1.1.2.6.1 2001/03/05 11:27:49 obrien Exp $ - * $DragonFly: src/lib/libc/stdio/local.h,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libc/stdio/local.h,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ +#ifndef _MACHINE_STDINT_H_ +#include /* __size_t */ +#endif + /* * Information local to this implementation of stdio, * in particular, macros and private variables. @@ -55,7 +59,7 @@ extern void __sinit __P((void)); extern void _cleanup __P((void)); extern void (*__cleanup) __P((void)); extern void __smakebuf __P((FILE *)); -extern int __swhatbuf __P((FILE *, size_t *, int *)); +extern int __swhatbuf __P((FILE *, __size_t *, int *)); extern int _fwalk __P((int (*)(FILE *))); extern int __swsetup __P((FILE *)); extern int __sflags __P((const char *, int *)); diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c index f45fc34e28..2644c9e0dd 100644 --- a/lib/libc/stdio/vasprintf.c +++ b/lib/libc/stdio/vasprintf.c @@ -27,18 +27,16 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libc/stdio/vasprintf.c,v 1.11 1999/08/28 00:01:19 peter Exp $ - * $DragonFly: src/lib/libc/stdio/vasprintf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libc/stdio/vasprintf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include #include +#include #include int -vasprintf(str, fmt, ap) - char **str; - const char *fmt; - _BSD_VA_LIST_ ap; +vasprintf(char **str, const char *fmt, va_list ap) { int ret; FILE f; diff --git a/lib/libc/stdio/vprintf.c b/lib/libc/stdio/vprintf.c index 74cc13e63e..d7dd21f652 100644 --- a/lib/libc/stdio/vprintf.c +++ b/lib/libc/stdio/vprintf.c @@ -35,15 +35,14 @@ * * @(#)vprintf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vprintf.c,v 1.6 1999/08/28 00:01:21 peter Exp $ - * $DragonFly: src/lib/libc/stdio/vprintf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libc/stdio/vprintf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include +#include int -vprintf(fmt, ap) - char const *fmt; - _BSD_VA_LIST_ ap; +vprintf(char const *fmt, va_list ap) { return (vfprintf(stdout, fmt, ap)); } diff --git a/lib/libc/stdio/vscanf.c b/lib/libc/stdio/vscanf.c index 48351447db..969666d31e 100644 --- a/lib/libc/stdio/vscanf.c +++ b/lib/libc/stdio/vscanf.c @@ -35,16 +35,15 @@ * * @(#)vscanf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vscanf.c,v 1.7 1999/08/28 00:01:21 peter Exp $ - * $DragonFly: src/lib/libc/stdio/vscanf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libc/stdio/vscanf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include +#include #include "libc_private.h" int -vscanf(fmt, ap) - const char *fmt; - _BSD_VA_LIST_ ap; +vscanf(const char *fmt, va_list ap) { int retval; diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index 2b948c2373..010118541a 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -35,18 +35,15 @@ * * @(#)vsnprintf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vsnprintf.c,v 1.12.2.1 2002/09/23 06:58:17 maxim Exp $ - * $DragonFly: src/lib/libc/stdio/vsnprintf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libc/stdio/vsnprintf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include #include +#include int -vsnprintf(str, n, fmt, ap) - char *str; - size_t n; - const char *fmt; - _BSD_VA_LIST_ ap; +vsnprintf(char *str, size_t n, const char *fmt, va_list ap) { size_t on; int ret; diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c index bf6dc9881e..0a7ce29f71 100644 --- a/lib/libc/stdio/vsprintf.c +++ b/lib/libc/stdio/vsprintf.c @@ -35,17 +35,15 @@ * * @(#)vsprintf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vsprintf.c,v 1.6 1999/08/28 00:01:21 peter Exp $ - * $DragonFly: src/lib/libc/stdio/vsprintf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libc/stdio/vsprintf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include +#include #include int -vsprintf(str, fmt, ap) - char *str; - const char *fmt; - _BSD_VA_LIST_ ap; +vsprintf(char *str, const char *fmt, va_list ap) { int ret; FILE f; diff --git a/lib/libc/stdio/vsscanf.c b/lib/libc/stdio/vsscanf.c index 7f3caee682..d6bba0d437 100644 --- a/lib/libc/stdio/vsscanf.c +++ b/lib/libc/stdio/vsscanf.c @@ -35,10 +35,11 @@ * * @(#)vsscanf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vsscanf.c,v 1.7 1999/08/28 00:01:22 peter Exp $ - * $DragonFly: src/lib/libc/stdio/vsscanf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libc/stdio/vsscanf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include +#include #include static int @@ -56,10 +57,7 @@ eofread(cookie, buf, len) } int -vsscanf(str, fmt, ap) - const char *str; - const char *fmt; - _BSD_VA_LIST_ ap; +vsscanf(const char *str, const char *fmt, va_list ap) { FILE f; diff --git a/lib/libc/string/memccpy.c b/lib/libc/string/memccpy.c index bfe698704c..53e61b1456 100644 --- a/lib/libc/string/memccpy.c +++ b/lib/libc/string/memccpy.c @@ -32,7 +32,7 @@ * * @(#)memccpy.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/string/memccpy.c,v 1.2.12.1 2001/07/09 23:30:03 obrien Exp $ - * $DragonFly: src/lib/libc/string/memccpy.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libc/string/memccpy.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include @@ -43,7 +43,7 @@ memccpy(t, f, c, n) void *t; const void *f; int c; - register size_t n; + size_t n; { if (n) { diff --git a/lib/libcr/locale/runetype.c b/lib/libcr/locale/runetype.c index e4f64879ae..4ae06145e2 100644 --- a/lib/libcr/locale/runetype.c +++ b/lib/libcr/locale/runetype.c @@ -34,15 +34,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/locale/runetype.c,v 1.5.8.1 2000/06/04 21:47:39 ache Exp $ - * $DragonFly: src/lib/libcr/locale/Attic/runetype.c,v 1.2 2003/06/17 04:26:44 dillon Exp $ + * $DragonFly: src/lib/libcr/locale/Attic/runetype.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include #include +#include unsigned long -___runetype(c) - _BSD_CT_RUNE_T_ c; +___runetype(__ct_rune_t c) { int x; _RuneRange *rr = &_CurrentRuneLocale->runetype_ext; diff --git a/lib/libcr/locale/tolower.c b/lib/libcr/locale/tolower.c index d2cfc47280..5a3d89792c 100644 --- a/lib/libcr/locale/tolower.c +++ b/lib/libcr/locale/tolower.c @@ -34,15 +34,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc/locale/tolower.c,v 1.5.8.1 2000/06/04 21:47:39 ache Exp $ - * $DragonFly: src/lib/libcr/locale/Attic/tolower.c,v 1.2 2003/06/17 04:26:44 dillon Exp $ + * $DragonFly: src/lib/libcr/locale/Attic/tolower.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include #include +#include -_BSD_CT_RUNE_T_ -___tolower(c) - _BSD_CT_RUNE_T_ c; +__ct_rune_t +___tolower(__ct_rune_T c) { int x; _RuneRange *rr = &_CurrentRuneLocale->maplower_ext; diff --git a/lib/libcr/stdio/vasprintf.c b/lib/libcr/stdio/vasprintf.c index 7f29004b7b..6400f96ae1 100644 --- a/lib/libcr/stdio/vasprintf.c +++ b/lib/libcr/stdio/vasprintf.c @@ -27,18 +27,16 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libc/stdio/vasprintf.c,v 1.11 1999/08/28 00:01:19 peter Exp $ - * $DragonFly: src/lib/libcr/stdio/Attic/vasprintf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libcr/stdio/Attic/vasprintf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include #include +#include #include int -vasprintf(str, fmt, ap) - char **str; - const char *fmt; - _BSD_VA_LIST_ ap; +vasprintf(char **str, const char *fmt, va_list ap) { int ret; FILE f; diff --git a/lib/libcr/stdio/vprintf.c b/lib/libcr/stdio/vprintf.c index d6f107c704..68526fa943 100644 --- a/lib/libcr/stdio/vprintf.c +++ b/lib/libcr/stdio/vprintf.c @@ -35,15 +35,14 @@ * * @(#)vprintf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vprintf.c,v 1.6 1999/08/28 00:01:21 peter Exp $ - * $DragonFly: src/lib/libcr/stdio/Attic/vprintf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libcr/stdio/Attic/vprintf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include +#include int -vprintf(fmt, ap) - char const *fmt; - _BSD_VA_LIST_ ap; +vprintf(char const *fmt, va_list ap) { return (vfprintf(stdout, fmt, ap)); } diff --git a/lib/libcr/stdio/vscanf.c b/lib/libcr/stdio/vscanf.c index 0b456cfc15..5e029f9aba 100644 --- a/lib/libcr/stdio/vscanf.c +++ b/lib/libcr/stdio/vscanf.c @@ -35,16 +35,15 @@ * * @(#)vscanf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vscanf.c,v 1.7 1999/08/28 00:01:21 peter Exp $ - * $DragonFly: src/lib/libcr/stdio/Attic/vscanf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libcr/stdio/Attic/vscanf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include +#include #include "libc_private.h" int -vscanf(fmt, ap) - const char *fmt; - _BSD_VA_LIST_ ap; +vscanf(const char *fmt, va_list ap) { int retval; diff --git a/lib/libcr/stdio/vsnprintf.c b/lib/libcr/stdio/vsnprintf.c index ee6052a397..10bc30fa30 100644 --- a/lib/libcr/stdio/vsnprintf.c +++ b/lib/libcr/stdio/vsnprintf.c @@ -35,18 +35,15 @@ * * @(#)vsnprintf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vsnprintf.c,v 1.12.2.1 2002/09/23 06:58:17 maxim Exp $ - * $DragonFly: src/lib/libcr/stdio/Attic/vsnprintf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libcr/stdio/Attic/vsnprintf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include #include +#include int -vsnprintf(str, n, fmt, ap) - char *str; - size_t n; - const char *fmt; - _BSD_VA_LIST_ ap; +vsnprintf(char *str, size_t n, const char *fmt, va_list ap) { size_t on; int ret; diff --git a/lib/libcr/stdio/vsprintf.c b/lib/libcr/stdio/vsprintf.c index 98fac2baee..85f8a9aab7 100644 --- a/lib/libcr/stdio/vsprintf.c +++ b/lib/libcr/stdio/vsprintf.c @@ -35,17 +35,15 @@ * * @(#)vsprintf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vsprintf.c,v 1.6 1999/08/28 00:01:21 peter Exp $ - * $DragonFly: src/lib/libcr/stdio/Attic/vsprintf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libcr/stdio/Attic/vsprintf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include +#include #include int -vsprintf(str, fmt, ap) - char *str; - const char *fmt; - _BSD_VA_LIST_ ap; +vsprintf(char *str, const char *fmt, va_list ap) { int ret; FILE f; diff --git a/lib/libcr/stdio/vsscanf.c b/lib/libcr/stdio/vsscanf.c index bc05322a11..939fc1d3cc 100644 --- a/lib/libcr/stdio/vsscanf.c +++ b/lib/libcr/stdio/vsscanf.c @@ -35,10 +35,11 @@ * * @(#)vsscanf.c 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/lib/libc/stdio/vsscanf.c,v 1.7 1999/08/28 00:01:22 peter Exp $ - * $DragonFly: src/lib/libcr/stdio/Attic/vsscanf.c,v 1.2 2003/06/17 04:26:46 dillon Exp $ + * $DragonFly: src/lib/libcr/stdio/Attic/vsscanf.c,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #include +#include #include static int @@ -56,10 +57,7 @@ eofread(cookie, buf, len) } int -vsscanf(str, fmt, ap) - const char *str; - const char *fmt; - _BSD_VA_LIST_ ap; +vsscanf(const char *str, const char *fmt, va_list ap) { FILE f; diff --git a/lib/libkvm/kvm.h b/lib/libkvm/kvm.h index 378d2ae5f4..c52f82dda6 100644 --- a/lib/libkvm/kvm.h +++ b/lib/libkvm/kvm.h @@ -32,30 +32,20 @@ * * @(#)kvm.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/lib/libkvm/kvm.h,v 1.11 1999/08/27 23:44:50 peter Exp $ - * $DragonFly: src/lib/libkvm/kvm.h,v 1.2 2003/06/17 04:26:49 dillon Exp $ + * $DragonFly: src/lib/libkvm/kvm.h,v 1.3 2003/11/09 02:34:02 dillon Exp $ */ #ifndef _KVM_H_ #define _KVM_H_ #include -#include +#include #include /* Default version symbol. */ #define VRS_SYM "_version" #define VRS_KEY "VERSION" -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#ifdef _BSD_SSIZE_T_ -typedef _BSD_SSIZE_T_ ssize_t; -#undef _BSD_SSIZE_T_ -#endif - typedef struct __kvm kvm_t; struct kinfo_proc; @@ -88,10 +78,10 @@ kvm_t *kvm_open __P((const char *, const char *, const char *, int, const char *)); kvm_t *kvm_openfiles __P((const char *, const char *, const char *, int, char *)); -ssize_t kvm_read __P((kvm_t *, unsigned long, void *, size_t)); -ssize_t kvm_uread - __P((kvm_t *, const struct proc *, unsigned long, char *, size_t)); -ssize_t kvm_write __P((kvm_t *, unsigned long, const void *, size_t)); +__ssize_t kvm_read __P((kvm_t *, unsigned long, void *, __size_t)); +__ssize_t kvm_uread + __P((kvm_t *, const struct proc *, unsigned long, char *, __size_t)); +__ssize_t kvm_write __P((kvm_t *, unsigned long, const void *, __size_t)); __END_DECLS #endif /* !_KVM_H_ */ diff --git a/lib/libmd/ripemd.h b/lib/libmd/ripemd.h index 1399d32bfc..f73744a75c 100644 --- a/lib/libmd/ripemd.h +++ b/lib/libmd/ripemd.h @@ -54,13 +54,15 @@ * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] + * + * $DragonFly: src/lib/libmd/ripemd.h,v 1.2 2003/11/09 02:34:03 dillon Exp $ */ #ifndef HEADER_RIPEMD_H #define HEADER_RIPEMD_H #include -#include /* XXX switch to machine/ansi.h and __ types */ +#include /* XXX switch to machine/stdint.h and __ types */ #define RIPEMD160_CBLOCK 64 #define RIPEMD160_LBLOCK 16 diff --git a/lib/libmd/rmd160c.c b/lib/libmd/rmd160c.c index ceb9584c17..54048020bd 100644 --- a/lib/libmd/rmd160c.c +++ b/lib/libmd/rmd160c.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] * * $FreeBSD: src/lib/libmd/rmd160c.c,v 1.4 1999/08/28 00:05:07 peter Exp $ - * $DragonFly: src/lib/libmd/rmd160c.c,v 1.2 2003/06/17 04:26:50 dillon Exp $ + * $DragonFly: src/lib/libmd/rmd160c.c,v 1.3 2003/11/09 02:34:03 dillon Exp $ */ #include @@ -64,9 +64,6 @@ #include #include -#if 0 -#include /* we use the __ variants of bit-sized types */ -#endif #include #include "rmd_locl.h" diff --git a/lib/libmd/sha.h b/lib/libmd/sha.h index 9f92900ef4..8cd082e2b0 100644 --- a/lib/libmd/sha.h +++ b/lib/libmd/sha.h @@ -55,14 +55,14 @@ * [including the GNU Public Licence.] * * $FreeBSD: src/lib/libmd/sha.h,v 1.3 1999/08/28 00:05:08 peter Exp $ - * $DragonFly: src/lib/libmd/sha.h,v 1.2 2003/06/17 04:26:50 dillon Exp $ + * $DragonFly: src/lib/libmd/sha.h,v 1.3 2003/11/09 02:34:03 dillon Exp $ */ #ifndef _SHA_H_ #define _SHA_H_ 1 #include -#include /* XXX switch to machine/ansi.h and __ types */ +#include /* XXX switch to machine/stdint.h and __ types */ #define SHA_CBLOCK 64 #define SHA_LBLOCK 16 diff --git a/lib/libmd/sha0c.c b/lib/libmd/sha0c.c index 32079dd9e8..5a75c1c694 100644 --- a/lib/libmd/sha0c.c +++ b/lib/libmd/sha0c.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] * * $FreeBSD: src/lib/libmd/sha0c.c,v 1.3 1999/08/28 00:05:09 peter Exp $ - * $DragonFly: src/lib/libmd/sha0c.c,v 1.2 2003/06/17 04:26:50 dillon Exp $ + * $DragonFly: src/lib/libmd/sha0c.c,v 1.3 2003/11/09 02:34:03 dillon Exp $ */ #include @@ -64,9 +64,6 @@ #include #include -#if 0 -#include /* we use the __ variants of bit-sized types */ -#endif #include #define SHA_0 diff --git a/lib/libmd/sha1c.c b/lib/libmd/sha1c.c index 660cff9db1..cb2a8932c3 100644 --- a/lib/libmd/sha1c.c +++ b/lib/libmd/sha1c.c @@ -54,6 +54,8 @@ * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] + * + * $DragonFly: src/lib/libmd/sha1c.c,v 1.2 2003/11/09 02:34:03 dillon Exp $ */ #include @@ -61,9 +63,6 @@ #include #include -#if 0 -#include /* we use the __ variants of bit-sized types */ -#endif #include #undef SHA_0 diff --git a/lib/libstand/printf.c b/lib/libstand/printf.c index 818231de4b..35e12a5282 100644 --- a/lib/libstand/printf.c +++ b/lib/libstand/printf.c @@ -37,7 +37,7 @@ * * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/lib/libstand/printf.c,v 1.4 1999/12/27 08:45:14 peter Exp $ - * $DragonFly: src/lib/libstand/printf.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + * $DragonFly: src/lib/libstand/printf.c,v 1.3 2003/11/09 02:34:03 dillon Exp $ */ /* @@ -52,7 +52,7 @@ * Note that stdarg.h and the ANSI style va_start macro is used for both * ANSI and traditional C compilers. */ -#include +#include static char *ksprintn (u_long num, int base, int *len); static int kvprintf(char const *fmt, void (*func)(int), void *arg, int radix, va_list ap); diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h index 6409397090..3f69719a71 100644 --- a/lib/libstand/stand.h +++ b/lib/libstand/stand.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libstand/stand.h,v 1.18.2.8 2002/06/17 11:22:39 sobomax Exp $ - * $DragonFly: src/lib/libstand/stand.h,v 1.2 2003/06/17 04:26:51 dillon Exp $ + * $DragonFly: src/lib/libstand/stand.h,v 1.3 2003/11/09 02:34:03 dillon Exp $ * From $NetBSD: stand.h,v 1.22 1997/06/26 19:17:40 drochner Exp $ */ @@ -63,6 +63,9 @@ * @(#)stand.h 8.1 (Berkeley) 6/11/93 */ +#ifndef _MACHINE_STDARG_H_ +#include /* __va_list */ +#endif #include #include #include @@ -246,9 +249,9 @@ struct disklabel; extern char *getdisklabel(const char *, struct disklabel *); extern int printf(const char *fmt, ...); -extern void vprintf(const char *fmt, _BSD_VA_LIST_); +extern void vprintf(const char *fmt, __va_list va); extern int sprintf(char *buf, const char *cfmt, ...); -extern void vsprintf(char *buf, const char *cfmt, _BSD_VA_LIST_); +extern void vsprintf(char *buf, const char *cfmt, __va_list va); extern void twiddle(void); diff --git a/share/man/man5/dir.5 b/share/man/man5/dir.5 index ddad34b5ef..6a5924c606 100644 --- a/share/man/man5/dir.5 +++ b/share/man/man5/dir.5 @@ -31,7 +31,7 @@ .\" .\" @(#)dir.5 8.3 (Berkeley) 4/19/94 .\" $FreeBSD: src/share/man/man5/dir.5,v 1.12.2.5 2001/12/17 11:30:13 ru Exp $ -.\" $DragonFly: src/share/man/man5/dir.5,v 1.2 2003/06/17 04:37:00 dillon Exp $ +.\" $DragonFly: src/share/man/man5/dir.5,v 1.3 2003/11/09 02:34:03 dillon Exp $ .\" .Dd April 19, 1994 .Dt DIR 5 @@ -87,7 +87,7 @@ The directory entry format is defined in the file #ifndef _SYS_DIRENT_H_ #define _SYS_DIRENT_H_ -#include +#include /* * The dirent structure defines the format of directory entries returned by diff --git a/share/man/man5/types.5 b/share/man/man5/types.5 index 91d8b605e8..a2e699a849 100644 --- a/share/man/man5/types.5 +++ b/share/man/man5/types.5 @@ -31,7 +31,7 @@ .\" .\" @(#)types.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD: src/share/man/man5/types.5,v 1.10.2.2 2001/12/17 11:30:15 ru Exp $ -.\" $DragonFly: src/share/man/man5/Attic/types.5,v 1.3 2003/08/22 19:34:14 asmodai Exp $ +.\" $DragonFly: src/share/man/man5/Attic/types.5,v 1.4 2003/11/09 02:34:03 dillon Exp $ .\" .Dd June 5, 1993 .Dt TYPES 5 @@ -53,7 +53,8 @@ used through out the system). #include /* Machine type dependent parameters. */ -#include /* includes */ +#include +#include #include #ifndef _POSIX_SOURCE diff --git a/usr.sbin/ypserv/yp_error.c b/usr.sbin/ypserv/yp_error.c index 997099d17c..314b61e7b1 100644 --- a/usr.sbin/ypserv/yp_error.c +++ b/usr.sbin/ypserv/yp_error.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/ypserv/yp_error.c,v 1.7 1999/08/28 01:21:12 peter Exp $ - * $DragonFly: src/usr.sbin/ypserv/yp_error.c,v 1.2 2003/06/17 04:30:04 dillon Exp $ + * $DragonFly: src/usr.sbin/ypserv/yp_error.c,v 1.3 2003/11/09 02:34:03 dillon Exp $ */ /* @@ -53,10 +53,9 @@ extern char *progname; #include #endif -static void __verr(fmt, ap) - const char *fmt; - _BSD_VA_LIST_ ap; - +static +void +__verr(const char *fmt, va_list ap) { if (debug && !_rpcpmstart) { fprintf(stderr,"%s: ",progname); -- 2.41.0