python-pyrex: Rework DEPENDS updates
[openembedded.git] / recipes / glibc / glibc-2.3.2 / 80_glibc232-wcsmbs-fix.patch
blob99af55259208685946d44ad4b3efd40cd748610c
1 --- wcsmbs/wcpncpy.c 1 Jun 2003 07:06:26 -0000 1.4
2 +++ wcsmbs/wcpncpy.c 22 Jul 2003 19:19:55 -0000 1.5
3 @@ -31,8 +31,6 @@
4 wint_t c;
5 wchar_t *const s = dest;
7 - --dest;
9 if (n >= 4)
11 size_t n4 = n >> 2;
12 @@ -40,19 +38,19 @@
13 for (;;)
15 c = *src++;
16 - *++dest = c;
17 + *dest++ = c;
18 if (c == L'\0')
19 break;
20 c = *src++;
21 - *++dest = c;
22 + *dest++ = c;
23 if (c == L'\0')
24 break;
25 c = *src++;
26 - *++dest = c;
27 + *dest++ = c;
28 if (c == L'\0')
29 break;
30 c = *src++;
31 - *++dest = c;
32 + *dest++ = c;
33 if (c == L'\0')
34 break;
35 if (--n4 == 0)
36 --- /dev/null 2003-01-13 18:16:28.000000000 +0900
37 +++ wcsmbs/tst-wcpncpy.c 2003-07-23 04:23:43.000000000 +0900
38 @@ -0,0 +1,31 @@
39 +/* Copyright (C) 2003 Free Software Foundation, Inc.
40 + This file is part of the GNU C Library.
41 + Contributed by Ulrich Drepper <drepper@cygnus.com>, 2003.
43 + The GNU C Library is free software; you can redistribute it and/or
44 + modify it under the terms of the GNU Lesser General Public
45 + License as published by the Free Software Foundation; either
46 + version 2.1 of the License, or (at your option) any later version.
48 + The GNU C Library is distributed in the hope that it will be useful,
49 + but WITHOUT ANY WARRANTY; without even the implied warranty of
50 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
51 + Lesser General Public License for more details.
53 + You should have received a copy of the GNU Lesser General Public
54 + License along with the GNU C Library; if not, write to the Free
55 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
56 + 02111-1307 USA. */
58 +#include <wchar.h>
61 +int
62 +main (void)
64 + const wchar_t src[] = L"0";
65 + wchar_t dest[10];
66 + wmemset (dest, L'\0', 10);
67 + wcpncpy (dest, src, 2);
68 + return wcscmp (dest, src) != 0;
70 --- wcsmbs/Makefile 29 Aug 2002 06:37:43 -0000 1.20
71 +++ wcsmbs/Makefile 22 Jul 2003 19:23:54 -0000 1.21
72 @@ -1,4 +1,4 @@
73 -# Copyright (C) 1995-2000, 2002 Free Software Foundation, Inc.
74 +# Copyright (C) 1995-2000, 2002, 2003 Free Software Foundation, Inc.
75 # This file is part of the GNU C Library.
77 # The GNU C Library is free software; you can redistribute it and/or
78 @@ -40,7 +40,7 @@
79 wcsmbsload mbsrtowcs_l
81 tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
82 - tst-wcrtomb
83 + tst-wcrtomb tst-wcpncpy
85 include ../Rules