Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)

- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
2013-12-06 12:04:52 +01:00
parent ff10274392
commit 84d9c625bf
4655 changed files with 379317 additions and 151059 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: wcsncasecmp.c,v 1.2 2006/08/26 22:45:52 christos Exp $ */
/* $NetBSD: wcsncasecmp.c,v 1.4 2013/05/17 12:55:57 joerg Exp $ */
/*
* Copyright (C) 2006 Aleksey Cheusov
@@ -13,18 +13,21 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: wcsncasecmp.c,v 1.2 2006/08/26 22:45:52 christos Exp $");
__RCSID("$NetBSD: wcsncasecmp.c,v 1.4 2013/05/17 12:55:57 joerg Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
#include <assert.h>
#include <wchar.h>
#include <wctype.h>
#include <locale.h>
#include "setlocale_local.h"
__weak_alias(wcsncasecmp,_wcsncasecmp)
__weak_alias(wcsncasecmp_l,_wcsncasecmp_l)
int
wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
wcsncasecmp_l(const wchar_t *s1, const wchar_t *s2, size_t n, locale_t loc)
{
int lc1 = 0;
int lc2 = 0;
@@ -34,8 +37,8 @@ wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
_DIAGASSERT(s2);
while (n--) {
lc1 = towlower (*s1);
lc2 = towlower (*s2);
lc1 = towlower_l(*s1, loc);
lc2 = towlower_l(*s2, loc);
diff = lc1 - lc2;
if (diff)
@@ -50,3 +53,9 @@ wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
return 0;
}
int
wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
{
return wcsncasecmp_l(s1, s2, n, _current_locale());
}