diff --git a/lib/libc/gen/_sys_errlist.c b/lib/libc/gen/_sys_errlist.c index ead675c0a1f3..005afd34e312 100644 --- a/lib/libc/gen/_sys_errlist.c +++ b/lib/libc/gen/_sys_errlist.c @@ -1,4 +1,4 @@ -/* $NetBSD: _sys_errlist.c,v 1.8 2005/06/12 05:34:34 lukem Exp $ */ +/* $NetBSD: _sys_errlist.c,v 1.9 2005/07/30 15:21:20 christos Exp $ */ /* * Written by J.T. Conklin, December 12, 1994 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _sys_errlist.c,v 1.8 2005/06/12 05:34:34 lukem Exp $"); +__RCSID("$NetBSD: _sys_errlist.c,v 1.9 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ __warn_references(sys_errlist, @@ -21,7 +21,7 @@ __warn_references(__sys_nerr, "warning: reference to deprecated __sys_nerr; include and use sys_nerr") -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_sys_errlist, sys_errlist) __indr_reference(_sys_errlist, __sys_errlist) /* Backwards compat with v.12 */ #else diff --git a/lib/libc/gen/_sys_nerr.c b/lib/libc/gen/_sys_nerr.c index b604248a54a6..893cc4aea91c 100644 --- a/lib/libc/gen/_sys_nerr.c +++ b/lib/libc/gen/_sys_nerr.c @@ -1,4 +1,4 @@ -/* $NetBSD: _sys_nerr.c,v 1.8 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _sys_nerr.c,v 1.9 2005/07/30 15:21:20 christos Exp $ */ /* * Written by J.T. Conklin, December 12, 1994 @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _sys_nerr.c,v 1.8 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _sys_nerr.c,v 1.9 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_sys_nerr, sys_nerr) __indr_reference(_sys_nerr, __sys_nerr) /* Backwards compat with v.12 */ #endif diff --git a/lib/libc/gen/_sys_siglist.c b/lib/libc/gen/_sys_siglist.c index 26ed588f0df1..f4d4b42715ae 100644 --- a/lib/libc/gen/_sys_siglist.c +++ b/lib/libc/gen/_sys_siglist.c @@ -1,4 +1,4 @@ -/* $NetBSD: _sys_siglist.c,v 1.9 2005/06/12 05:34:34 lukem Exp $ */ +/* $NetBSD: _sys_siglist.c,v 1.10 2005/07/30 15:21:20 christos Exp $ */ /* * Written by J.T. Conklin, December 12, 1994 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _sys_siglist.c,v 1.9 2005/06/12 05:34:34 lukem Exp $"); +__RCSID("$NetBSD: _sys_siglist.c,v 1.10 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ __warn_references(sys_siglist, @@ -15,7 +15,7 @@ __warn_references(sys_siglist, __warn_references(__sys_siglist, "warning: reference to deprecated __sys_siglist[]; include or and use sys_siglist") -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_sys_siglist, sys_siglist) __indr_reference(_sys_siglist, __sys_siglist) /* Backwards compat with v.12 */ #else diff --git a/lib/libc/gen/_sysconf.c b/lib/libc/gen/_sysconf.c index 0cd8a797339e..825671ed00b8 100644 --- a/lib/libc/gen/_sysconf.c +++ b/lib/libc/gen/_sysconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: _sysconf.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _sysconf.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _sysconf.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _sysconf.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(__sysconf, sysconf) #else diff --git a/lib/libc/include/namespace.h b/lib/libc/include/namespace.h index dbb7f1914328..71fd669d01de 100644 --- a/lib/libc/include/namespace.h +++ b/lib/libc/include/namespace.h @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.103 2005/07/17 16:07:36 christos Exp $ */ +/* $NetBSD: namespace.h,v 1.104 2005/07/30 15:21:20 christos Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -57,6 +57,7 @@ #define inet_pton _inet_pton #define pipe _pipe #define sbrk _sbrk +#define strerror_r _strerror_r #define strlcat _strlcat #define strlcpy _strlcpy #define strtoimax _strtoimax diff --git a/lib/libc/inet/_inet_aton.c b/lib/libc/inet/_inet_aton.c index ffc72d1cfe4b..fdbe930860cf 100644 --- a/lib/libc/inet/_inet_aton.c +++ b/lib/libc/inet/_inet_aton.c @@ -1,4 +1,4 @@ -/* $NetBSD: _inet_aton.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _inet_aton.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * Written by Klaus Klein, September 14, 1999. @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _inet_aton.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _inet_aton.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_inet_aton,inet_aton) #else diff --git a/lib/libc/inet/_inet_pton.c b/lib/libc/inet/_inet_pton.c index 083ff2985ff2..b1e8bd0feb7c 100644 --- a/lib/libc/inet/_inet_pton.c +++ b/lib/libc/inet/_inet_pton.c @@ -1,4 +1,4 @@ -/* $NetBSD: _inet_pton.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _inet_pton.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * Written by Klaus Klein, September 14, 1999. @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _inet_pton.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _inet_pton.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_inet_pton,inet_pton) #else diff --git a/lib/libc/nls/_catclose.c b/lib/libc/nls/_catclose.c index 0d304519afdd..a6a1e6fe63b1 100644 --- a/lib/libc/nls/_catclose.c +++ b/lib/libc/nls/_catclose.c @@ -1,4 +1,4 @@ -/* $NetBSD: _catclose.c,v 1.5 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _catclose.c,v 1.6 2005/07/30 15:21:20 christos Exp $ */ /* * Written by J.T. Conklin, 10/05/94 @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _catclose.c,v 1.5 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _catclose.c,v 1.6 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_catclose,catclose) #else diff --git a/lib/libc/nls/_catgets.c b/lib/libc/nls/_catgets.c index 4fe1cf016a0e..99c3263ac069 100644 --- a/lib/libc/nls/_catgets.c +++ b/lib/libc/nls/_catgets.c @@ -1,4 +1,4 @@ -/* $NetBSD: _catgets.c,v 1.6 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _catgets.c,v 1.7 2005/07/30 15:21:20 christos Exp $ */ /* * Written by J.T. Conklin, 10/05/94 @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _catgets.c,v 1.6 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _catgets.c,v 1.7 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_catgets,catgets) #else diff --git a/lib/libc/nls/_catopen.c b/lib/libc/nls/_catopen.c index 7584a035f83d..d973e5583db5 100644 --- a/lib/libc/nls/_catopen.c +++ b/lib/libc/nls/_catopen.c @@ -1,4 +1,4 @@ -/* $NetBSD: _catopen.c,v 1.5 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _catopen.c,v 1.6 2005/07/30 15:21:20 christos Exp $ */ /* * Written by J.T. Conklin, 10/05/94 @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _catopen.c,v 1.5 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _catopen.c,v 1.6 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_catopen,catopen) #else diff --git a/lib/libc/resolv/__dn_comp.c b/lib/libc/resolv/__dn_comp.c index 7782751de1ad..4a6661219655 100644 --- a/lib/libc/resolv/__dn_comp.c +++ b/lib/libc/resolv/__dn_comp.c @@ -1,4 +1,4 @@ -/* $NetBSD: __dn_comp.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: __dn_comp.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * written by matthew green, 22/04/97. @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: __dn_comp.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: __dn_comp.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(__dn_comp,dn_comp) #else diff --git a/lib/libc/resolv/__res_close.c b/lib/libc/resolv/__res_close.c index a08e22e1a7ea..a8af21baedaa 100644 --- a/lib/libc/resolv/__res_close.c +++ b/lib/libc/resolv/__res_close.c @@ -1,4 +1,4 @@ -/* $NetBSD: __res_close.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: __res_close.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * written by matthew green, 22/04/97. @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: __res_close.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: __res_close.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(__res_close,res_close) #else diff --git a/lib/libc/resolv/__res_send.c b/lib/libc/resolv/__res_send.c index 28e4e3966079..b2f25a035a56 100644 --- a/lib/libc/resolv/__res_send.c +++ b/lib/libc/resolv/__res_send.c @@ -1,4 +1,4 @@ -/* $NetBSD: __res_send.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: __res_send.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * written by matthew green, 22/04/97. @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: __res_send.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: __res_send.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(__res_send,res_send) #else diff --git a/lib/libc/stdio/_fileno.c b/lib/libc/stdio/_fileno.c index f06dc885e708..dbd493c63b2b 100644 --- a/lib/libc/stdio/_fileno.c +++ b/lib/libc/stdio/_fileno.c @@ -1,4 +1,4 @@ -/* $NetBSD: _fileno.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _fileno.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _fileno.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _fileno.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_fileno, fileno) #else diff --git a/lib/libc/stdio/_fseeko.c b/lib/libc/stdio/_fseeko.c index 25f568b02e0c..a79e69b29720 100644 --- a/lib/libc/stdio/_fseeko.c +++ b/lib/libc/stdio/_fseeko.c @@ -1,4 +1,4 @@ -/* $NetBSD: _fseeko.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _fseeko.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _fseeko.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _fseeko.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_fseeko, fseeko) #else diff --git a/lib/libc/stdio/_ftello.c b/lib/libc/stdio/_ftello.c index d4454ec4109a..8a2c20e5c20c 100644 --- a/lib/libc/stdio/_ftello.c +++ b/lib/libc/stdio/_ftello.c @@ -1,4 +1,4 @@ -/* $NetBSD: _ftello.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _ftello.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _ftello.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _ftello.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_ftello, ftello) #else diff --git a/lib/libc/stdlib/_strtoimax.c b/lib/libc/stdlib/_strtoimax.c index fbc1db3e1f20..bc496a0f84b6 100644 --- a/lib/libc/stdlib/_strtoimax.c +++ b/lib/libc/stdlib/_strtoimax.c @@ -1,4 +1,4 @@ -/* $NetBSD: _strtoimax.c,v 1.2 2005/06/12 05:21:27 lukem Exp $ */ +/* $NetBSD: _strtoimax.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _strtoimax.c,v 1.2 2005/06/12 05:21:27 lukem Exp $"); +__RCSID("$NetBSD: _strtoimax.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_strtoimax, strtoimax) #else diff --git a/lib/libc/stdlib/_strtoll.c b/lib/libc/stdlib/_strtoll.c index 41e51248b12f..2617b91ef857 100644 --- a/lib/libc/stdlib/_strtoll.c +++ b/lib/libc/stdlib/_strtoll.c @@ -1,4 +1,4 @@ -/* $NetBSD: _strtoll.c,v 1.3 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _strtoll.c,v 1.4 2005/07/30 15:21:20 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _strtoll.c,v 1.3 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _strtoll.c,v 1.4 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_strtoll, strtoll) #else diff --git a/lib/libc/stdlib/_strtoull.c b/lib/libc/stdlib/_strtoull.c index c937e1f5ceca..d2904c08239d 100644 --- a/lib/libc/stdlib/_strtoull.c +++ b/lib/libc/stdlib/_strtoull.c @@ -1,4 +1,4 @@ -/* $NetBSD: _strtoull.c,v 1.3 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _strtoull.c,v 1.4 2005/07/30 15:21:20 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _strtoull.c,v 1.3 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _strtoull.c,v 1.4 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_strtoull, strtoull) #else diff --git a/lib/libc/stdlib/_strtoumax.c b/lib/libc/stdlib/_strtoumax.c index d7089314da0a..d1f6b1b6145a 100644 --- a/lib/libc/stdlib/_strtoumax.c +++ b/lib/libc/stdlib/_strtoumax.c @@ -1,4 +1,4 @@ -/* $NetBSD: _strtoumax.c,v 1.2 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _strtoumax.c,v 1.3 2005/07/30 15:21:20 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _strtoumax.c,v 1.2 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _strtoumax.c,v 1.3 2005/07/30 15:21:20 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_strtoumax, strtoumax) #else diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index f3ba4747034f..cf266efcde23 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -1,12 +1,12 @@ # from: @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -# $NetBSD: Makefile.inc,v 1.57 2005/07/28 16:26:29 christos Exp $ +# $NetBSD: Makefile.inc,v 1.58 2005/07/30 15:21:21 christos Exp $ # string sources .PATH: ${ARCHDIR}/string ${.CURDIR}/string SRCS+= bm.c strcasecmp.c strcasestr.c strcoll.c strdup.c strerror.c \ strlcat.c strlcpy.c strmode.c strsignal.c strtok.c strtok_r.c \ - strxfrm.c __strerror.c __strsignal.c strerror_r.c + strxfrm.c __strsignal.c strerror_r.c # wide char SRCS+= wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c \ @@ -16,7 +16,7 @@ SRCS+= wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c \ wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c # namespace protection wrappers -SRCS+= _strlcat.c _strlcpy.c +SRCS+= _strlcat.c _strlcpy.c _strerror_r.c # machine-dependent net sources # m-d Makefile.inc must include sources for: diff --git a/lib/libc/string/__strerror.c b/lib/libc/string/__strerror.c deleted file mode 100644 index b66013b306c5..000000000000 --- a/lib/libc/string/__strerror.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $NetBSD: __strerror.c,v 1.22 2005/07/28 16:26:29 christos Exp $ */ - -/* - * Copyright (c) 1988 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91"; -#else -__RCSID("$NetBSD: __strerror.c,v 1.22 2005/07/28 16:26:29 christos Exp $"); -#endif -#endif /* LIBC_SCCS and not lint */ - -#include "namespace.h" -#ifdef NLS -#include -#include -#endif - -#include -#include -#include -#include -#include "extern.h" - -/* - * Compatibility. Can it be removed? - */ - -const char * -__strerror(int num, char *buf, size_t buflen) -{ - (void)strerror_r(num, buf, buflen); - return buf; -} diff --git a/lib/libc/string/_strerror_r.c b/lib/libc/string/_strerror_r.c new file mode 100644 index 000000000000..17dc293ea6ee --- /dev/null +++ b/lib/libc/string/_strerror_r.c @@ -0,0 +1,55 @@ +/* $NetBSD: _strerror_r.c,v 1.1 2005/07/30 15:21:21 christos Exp $ */ + +/*- + * Copyright (c) 2005 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: _strerror_r.c,v 1.1 2005/07/30 15:21:21 christos Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#if defined(__indr_reference) && !defined(__lint__) +__indr_reference(_strerror_r, strerror_r) +#else + +#include +int _strerror_r(int, char *, size_t); /* XXX */ + +int +strerror_r(int num, char *buf, size_t siz) +{ + return _strerror_r(num, buf, siz); +} +#endif diff --git a/lib/libc/string/_strlcat.c b/lib/libc/string/_strlcat.c index efec8dc72d12..ea6145df1b08 100644 --- a/lib/libc/string/_strlcat.c +++ b/lib/libc/string/_strlcat.c @@ -1,4 +1,4 @@ -/* $NetBSD: _strlcat.c,v 1.2 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _strlcat.c,v 1.3 2005/07/30 15:21:21 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _strlcat.c,v 1.2 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _strlcat.c,v 1.3 2005/07/30 15:21:21 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_strlcat, strlcat) #else diff --git a/lib/libc/string/_strlcpy.c b/lib/libc/string/_strlcpy.c index 50d9b4347198..fbf0cee38ec4 100644 --- a/lib/libc/string/_strlcpy.c +++ b/lib/libc/string/_strlcpy.c @@ -1,4 +1,4 @@ -/* $NetBSD: _strlcpy.c,v 1.2 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _strlcpy.c,v 1.3 2005/07/30 15:21:21 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _strlcpy.c,v 1.2 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _strlcpy.c,v 1.3 2005/07/30 15:21:21 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_strlcpy, strlcpy) #else diff --git a/lib/libc/string/strerror_r.c b/lib/libc/string/strerror_r.c index a9743821f960..a900036ea6c1 100644 --- a/lib/libc/string/strerror_r.c +++ b/lib/libc/string/strerror_r.c @@ -1,4 +1,4 @@ -/* $NetBSD: strerror_r.c,v 1.1 2005/07/28 16:26:29 christos Exp $ */ +/* $NetBSD: strerror_r.c,v 1.2 2005/07/30 15:21:21 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -34,7 +34,7 @@ #if 0 static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91"; #else -__RCSID("$NetBSD: strerror_r.c,v 1.1 2005/07/28 16:26:29 christos Exp $"); +__RCSID("$NetBSD: strerror_r.c,v 1.2 2005/07/30 15:21:21 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -50,8 +50,18 @@ __RCSID("$NetBSD: strerror_r.c,v 1.1 2005/07/28 16:26:29 christos Exp $"); #include #include "extern.h" +#ifdef _LIBC +# ifdef __weak_alias +__weak_alias(strerror_r, _strerror_r) +# endif +#endif + int +#ifdef _LIBC +_strerror_r(int num, char *buf, size_t buflen) +#else strerror_r(int num, char *buf, size_t buflen) +#endif { #define UPREFIX "Unknown error: %u" unsigned int errnum = num; diff --git a/lib/libc/sys/_brk.c b/lib/libc/sys/_brk.c index 0a8d7a1ee2dd..6ea03921ad03 100644 --- a/lib/libc/sys/_brk.c +++ b/lib/libc/sys/_brk.c @@ -1,4 +1,4 @@ -/* $NetBSD: _brk.c,v 1.3 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _brk.c,v 1.4 2005/07/30 15:21:21 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _brk.c,v 1.3 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _brk.c,v 1.4 2005/07/30 15:21:21 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_brk, brk) #else diff --git a/lib/libc/sys/_fork.c b/lib/libc/sys/_fork.c index 029315843644..4b002be93a66 100644 --- a/lib/libc/sys/_fork.c +++ b/lib/libc/sys/_fork.c @@ -1,4 +1,4 @@ -/* $NetBSD: _fork.c,v 1.2 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _fork.c,v 1.3 2005/07/30 15:21:21 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _fork.c,v 1.2 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _fork.c,v 1.3 2005/07/30 15:21:21 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_fork, fork) #else diff --git a/lib/libc/sys/_pipe.c b/lib/libc/sys/_pipe.c index 2074b6f12afa..6ca84fcd3f27 100644 --- a/lib/libc/sys/_pipe.c +++ b/lib/libc/sys/_pipe.c @@ -1,4 +1,4 @@ -/* $NetBSD: _pipe.c,v 1.4 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _pipe.c,v 1.5 2005/07/30 15:21:21 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _pipe.c,v 1.4 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _pipe.c,v 1.5 2005/07/30 15:21:21 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_pipe, pipe) #else diff --git a/lib/libc/sys/_sbrk.c b/lib/libc/sys/_sbrk.c index ad6bf24f6215..d22465ab75d7 100644 --- a/lib/libc/sys/_sbrk.c +++ b/lib/libc/sys/_sbrk.c @@ -1,4 +1,4 @@ -/* $NetBSD: _sbrk.c,v 1.3 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _sbrk.c,v 1.4 2005/07/30 15:21:21 christos Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -31,10 +31,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _sbrk.c,v 1.3 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _sbrk.c,v 1.4 2005/07/30 15:21:21 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_sbrk, sbrk) #else diff --git a/lib/libc/time/_daylight.c b/lib/libc/time/_daylight.c index be2de50c7869..8b67b2ef5133 100644 --- a/lib/libc/time/_daylight.c +++ b/lib/libc/time/_daylight.c @@ -1,4 +1,4 @@ -/* $NetBSD: _daylight.c,v 1.2 2005/06/12 05:21:28 lukem Exp $ */ +/* $NetBSD: _daylight.c,v 1.3 2005/07/30 15:21:21 christos Exp $ */ /* * Written by Klaus Klein, December 27, 2000. @@ -7,10 +7,10 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _daylight.c,v 1.2 2005/06/12 05:21:28 lukem Exp $"); +__RCSID("$NetBSD: _daylight.c,v 1.3 2005/07/30 15:21:21 christos Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __indr_reference +#if defined(__indr_reference) && !defined(__lint__) __indr_reference(_daylight, daylight) #endif /* LINTED empty translation unit */