From f095bb7204d80f609a73a22796edd6cffd4c6add Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 9 Jan 2010 10:56:41 -0800 Subject: Add support for XPG7 testing. The header conformance testing code needed extending for XPG7. This exposed a few bugs in the headers. There are more changes to come. --- string/strcoll_l.c | 4 ++-- string/string.h | 6 ++++-- string/strxfrm_l.c | 7 +++---- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'string') diff --git a/string/strcoll_l.c b/string/strcoll_l.c index 8bd84b1..d8d1139 100644 --- a/string/strcoll_l.c +++ b/string/strcoll_l.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,96,97,2002, 2004, 2007 Free Software Foundation, Inc. +/* Copyright (C) 1995-1997,2002,2004,2007,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper , 1995. @@ -48,7 +48,7 @@ STRCOLL (s1, s2, l) const STRING_TYPE *s2; __locale_t l; { - struct locale_data *current = l->__locales[LC_COLLATE]; + struct __locale_data *current = l->__locales[LC_COLLATE]; uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word; /* We don't assign the following values right away since it might be unnecessary in case there are no rules. */ diff --git a/string/string.h b/string/string.h index 3c76009..3884021 100644 --- a/string/string.h +++ b/string/string.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1991-1993,1995-2004,2007,2009 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993,1995-2004,2007,2009,2010 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -168,7 +169,8 @@ extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) __THROW __nonnull ((2, 4)); #endif -#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED \ + || defined __USE_XOPEN2K8 /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (__const char *__s) __THROW __attribute_malloc__ __nonnull ((1)); diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c index 20f2f14..351b426 100644 --- a/string/strxfrm_l.c +++ b/string/strxfrm_l.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2002, 2004, 2005, 2006 - Free Software Foundation, Inc. +/* Copyright (C) 1995-1997,2002,2004-2006,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper , 1995. @@ -86,7 +85,7 @@ utf8_encode (char *buf, int val) size_t STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l) { - struct locale_data *current = l->__locales[LC_COLLATE]; + struct __locale_data *current = l->__locales[LC_COLLATE]; uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word; /* We don't assign the following values right away since it might be unnecessary in case there are no rules. */ @@ -137,7 +136,7 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l) if (srclen == 0) { if (n != 0) - *dest = L('\0'); + *dest = L('\0'); return 0; } -- cgit v1.1