From 23a1ccea6aac035f084a7a4cdc968687d1b02daf Mon Sep 17 00:00:00 2001 From: "Roger A. Faulkner" Date: Thu, 12 Aug 2010 14:55:22 -0700 Subject: PSARC 2010/299 GNU/Linux/BSD compatibility functions 6960818 add get_nprocs(), getline(), strdupa(), strndup() to libc 6901783 strndup would be nice 6824404 libc should provide ffsl() & ffsll() 6793969 RFE: Add|stpcpy|to libc 6735446 Want a __progname symbol for BSD-style source compatibility 6421095 Solaris should provide strcasestr 6275498 Provide string compare functions wcscasecmp,wcsncasecmp in solaris like linux --HG-- rename : usr/src/lib/libc/port/gen/strcasecmp.c => usr/src/lib/libc/port/gen/ascii_strcasecmp.c rename : usr/src/lib/libc/port/gen/strncasecmp.c => usr/src/lib/libc/port/gen/ascii_strncasecmp.c rename : usr/src/lib/libc/sparc/gen/strcasecmp.s => usr/src/lib/libc/sparc/gen/ascii_strcasecmp.s rename : usr/src/lib/libc/sparcv9/gen/strcasecmp.s => usr/src/lib/libc/sparcv9/gen/ascii_strcasecmp.s --- usr/src/lib/nsswitch/files/common/gethostent.c | 37 +------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'usr/src/lib/nsswitch/files/common') diff --git a/usr/src/lib/nsswitch/files/common/gethostent.c b/usr/src/lib/nsswitch/files/common/gethostent.c index c2d9530a86..aa8e9da993 100644 --- a/usr/src/lib/nsswitch/files/common/gethostent.c +++ b/usr/src/lib/nsswitch/files/common/gethostent.c @@ -20,12 +20,9 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include "files_common.h" #include @@ -42,7 +39,6 @@ static int check_name(nss_XbyY_args_t *, const char *, int, int, const char **, int *, void *, int *); static char *do_aliases(); -static char *strcasestr(const char *as1, const char *as2); nss_status_t __nss_files_XY_hostbyname(); int __nss_files_2herrno(); static int __nss_files_get_addr(int, const char *, int, @@ -680,37 +676,6 @@ __nss_files_XY_hostbyname(be, args, filter, type) return (res); } -/* - * A case-insensitive version of strstr(). - */ -static char * -strcasestr(const char *as1, const char *as2) -{ - int c2; - register const char *tptr; - register const char *s1, *s2; - - s1 = as1; - s2 = as2; - - if (s2 == NULL || *s2 == '\0') - return (0); - - while (*s1) { - if (tolower(*s1++) == tolower(c2 = *s2)) { - tptr = s1; - while ((tolower(c2 = *++s2) == - tolower(*s1++)) && c2 != 0) - ; - if (c2 == 0) - return ((char *)tptr - 1); - s1 = tptr; - s2 = as2; - } - } - return (0); -} - static char * do_aliases(struct hostent *hp, char *abuf, char *end) -- cgit v1.2.3