From e400ec32db9124edbe3587b88c9c7665cf26ac53 Mon Sep 17 00:00:00 2001 From: jb Date: Thu, 15 Jan 1998 09:58:08 +0000 Subject: Add #ifndef __NETBSD_SYSCALLS around calls to issetugid() which do not exist in NetBSD 1.3. --- lib/libc/locale/setlocale.c | 10 +++++++--- lib/libc/locale/setrunelocale.c | 6 +++++- lib/libc/nls/msgcat.c | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index 4b7a1b1..4b86a81 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -33,12 +33,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: setlocale.c,v 1.20 1997/02/22 14:59:56 peter Exp $ + * $Id: setlocale.c,v 1.21 1997/04/07 08:54:35 ache Exp $ */ #ifdef LIBC_RCS static const char rcsid[] = - "$Id: setlocale.c,v 1.20 1997/02/22 14:59:56 peter Exp $"; + "$Id: setlocale.c,v 1.21 1997/04/07 08:54:35 ache Exp $"; #endif #if defined(LIBC_SCCS) && !defined(lint) @@ -225,7 +225,11 @@ loadlocale(category) if (_PathLocale == NULL) { char *p = getenv("PATH_LOCALE"); - if (p != NULL && !issetugid()) { + if (p != NULL +#ifndef __NETBSD_SYSCALLS + && !issetugid() +#endif + ) { if (strlen(p) + 1/*"/"*/ + ENCODING_LEN + 1/*"/"*/ + CATEGORY_LEN >= PATH_MAX) return (NULL); diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c index 2d94e75..c65628e 100644 --- a/lib/libc/locale/setrunelocale.c +++ b/lib/libc/locale/setrunelocale.c @@ -87,7 +87,11 @@ _xpg4_setrunelocale(encoding) if (_PathLocale == NULL) { char *p = getenv("PATH_LOCALE"); - if (p != NULL && !issetugid()) { + if (p != NULL +#ifndef __NETBSD_SYSCALLS + && !issetugid() +#endif + ) { if (strlen(p) + 1/*"/"*/ + ENCODING_LEN + 1/*"/"*/ + CATEGORY_LEN >= PATH_MAX) return(EFAULT); diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index c90cefb..9d2d0c5 100644 --- a/lib/libc/nls/msgcat.c +++ b/lib/libc/nls/msgcat.c @@ -1,4 +1,4 @@ -/* $Id: msgcat.c,v 1.10 1997/05/10 04:28:17 ache Exp $ */ +/* $Id: msgcat.c,v 1.11 1997/05/10 04:40:40 ache Exp $ */ /*********************************************************** Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts. @@ -101,7 +101,11 @@ int type; } else { if ((lang = (char *) getenv("LANG")) == NULL) lang = "C"; - if ((nlspath = (char *) getenv("NLSPATH")) == NULL || issetugid()) + if ((nlspath = (char *) getenv("NLSPATH")) == NULL +#ifndef __NETBSD_SYSCALLS + || issetugid() +#endif + ) nlspath = "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L"; len = strlen(nlspath); -- cgit v1.1