Magellan Linux

Annotation of /trunk/glibc/patches/glibc-2.22-roundup.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2711 - (hide annotations) (download)
Mon Nov 2 13:15:10 2015 UTC (8 years, 6 months ago) by niro
File size: 35789 byte(s)
-updated patch
1 niro 2697 diff --git a/ChangeLog b/ChangeLog
2 niro 2711 index cb9124e..491d5c7 100644
3 niro 2697 --- a/ChangeLog
4     +++ b/ChangeLog
5 niro 2711 @@ -1,3 +1,130 @@
6     +2015-10-09 Carlos O'Donell <carlos@redhat.com>
7     +
8     + [BZ #18589]
9     + * string/bug-strcoll2.c: Adjust copyright, and remove contributed by.
10     + * string/Makefile ($(objpfx)bug-strcoll2.out): Depend on
11     + $(gen-locales).
12     +
13     +2015-10-08 Carlos O'Donell <carlos@redhat.com>
14     +
15     + [BZ #18589]
16     + * string/Makefile (tests): Add bug-strcoll2.
17     + (LOCALES): Add cs_CZ.UTF-8.
18     +
19     +2015-09-28 Martin Sebor <msebor@redhat.com>
20     +
21     + [BZ #18969]
22     + * string/Makefile (LOCALES): Define.
23     + (gen-locales.mk): Include.
24     + (test-strcasecmp.out, test-strncasecmp.out, tst-strxfrm.out)
25     + (tst-strxfrm2.out): Add deppendency on $(gen-locales).
26     + * string/tst-strxfrm2.c (do_test): Print the name of the locale
27     + on setlocale failure.
28     +
29     +2015-10-08 Carlos O'Donell <carlos@redhat.com>
30     +
31     + [BZ #18589]
32     + * string/bug-strcoll2.c: New file.
33     + * locale/categories.def: Revert commit
34     + f13c2a8dff2329c6692a80176262ceaaf8a6f74e.
35     + * locale/langinfo.h: Likewise.
36     + * locale/localeinfo.h: Likewise.
37     + * locale/C-collate.c: Likewise.
38     + * programs/ld-collate.c (collate_output): Likewise.
39     + * string/strcoll_l.c (STRDIFF): Likewise.
40     + (STRCOLL): Likewise.
41     + * wcsmbs/wcscoll_l.c: Likewise.
42     +
43     +2015-09-15 Roland McGrath <roland@hack.frob.com>
44     +
45     + * misc/sys/param.h [!MAXHOSTNAMELEN && HOST_NAME_MAX]
46     + (MAXHOSTNAMELEN): Define it to HOST_NAME_MAX.
47     +
48     +2015-09-11 Roland McGrath <roland@hack.frob.com>
49     +
50     + * sysdeps/nacl/Makefile [$(subdir) = misc] (sysdep_headers):
51     + Use 'override' keyword to freeze the value here, preventing
52     + the addition of sys/mtio.h by sysdeps/gnu/Makefile.
53     +
54     +2015-09-04 Roland McGrath <roland@hack.frob.com>
55     +
56     + [BZ #18921]
57     + * sysdeps/posix/opendir.c (need_isdir_precheck) [O_DIRECTORY]:
58     + Fix inverted sense of test of 'o_directory_works' value.
59     + Reported by Pádraig Brady <P@draigBrady.com>, diagnosed by
60     + Bernhard Voelker <mail@bernhard-voelker.de>.
61     +
62 niro 2697 +2015-08-31 Brett Neumeier <brett@neumeier.us>
63     +
64     + [BZ #18870]
65     + * sysdeps/sparc/sparc32/sem_open.c: Add missing #include
66     +
67     +2015-08-28 Mike Frysinger <vapier@gentoo.org>
68     +
69     + [BZ #18887]
70     + * misc/Makefile (tests): Add tst-mntent-blank-corrupt and
71     + tst-mntent-blank-passno.
72     + * misc/mntent_r.c (__getmntent_r): Do not read past buffer[0].
73     + * misc/tst-mntent-blank-corrupt.c: New test.
74     + * misc/tst-mntent-blank-passno.c: New test ripped from ...
75     + * misc/tst-mntent.c (do_test): ... here.
76     +
77     +2015-08-25 Roland McGrath <roland@hack.frob.com>
78     +
79     + * sysdeps/nacl/start.c (_start): Call __nacl_main instead of main
80     + if the weak reference is not null.
81     +
82     +2015-08-19 Andrew Senkevich <andrew.senkevich@intel.com>
83     +
84     + [BZ #18796]
85     + * scripts/test-installation.pl: Don't add -lmvec to build options
86     + if libmvec wasn't built.
87     + * NEWS: Mention this fix.
88     +
89     +2015-08-10 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
90     +
91     + [BZ #18778]
92     + * elf/Makefile (tests): Add Add tst-nodelete2.
93     + (modules-names): Add tst-nodelete2mod.
94     + (tst-nodelete2mod.so-no-z-defs): New.
95     + ($(objpfx)tst-nodelete2): Likewise.
96     + ($(objpfx)tst-nodelete2.out): Likewise.
97     + (LDFLAGS-tst-nodelete2): Likewise.
98     + * elf/dl-close.c (_dl_close_worker): Move DF_1_NODELETE clearing
99     + out of loop through all loaded libraries.
100     + * elf/tst-nodelete2.c: New file.
101     + * elf/tst-nodelete2mod.c: Likewise.
102     +
103     +2015-08-10 Andreas Schwab <schwab@suse.de>
104     +
105     + [BZ #18781]
106     + * sysdeps/unix/sysv/linux/openat.c (__OPENAT) [MORE_OFLAGS]: Add
107     + MORE_OFLAGS to oflag.
108     + * io/test-lfs.c (do_test): Test openat64.
109     +
110     +2015-08-08 John David Anglin <danglin@gcc.gnu.org>
111     +
112     + [BZ #18787]
113     + * sysdeps/unix/sysv/linux/hppa/bits/atomic.h (_LWS_CLOBBER): Revise
114     + clobber registers.
115     + (atomic_compare_and_exchange_val_acq): Use register asms to assign
116     + operand registers. Use register %r20 for EAGAIN and EDEADLOCK checks.
117     + Cast return to __typeof (oldval).
118     +
119     +2015-08-08 Mike Frysinger <vapier@gentoo.org>
120     +
121     + * sysdeps/unix/sysv/linux/microblaze/sysdep.h: Wrap the whole file
122     + in _LINUX_MICROBLAZE_SYSDEP_H defines. Include sysdeps/unix/sysdep.h
123     + and delete sys/syscall.h include.
124     +
125     +2015-08-07 Mike Frysinger <vapier@gentoo.org>
126     +
127     + * sysdeps/hppa/dl-symaddr.c (_dl_symbol_address): Add rtld_hidden_def.
128     +
129     +2015-08-05 Zack Weinberg <zackw@panix.com>
130     +
131     + * misc/regexp.h: Update comments.
132     +
133     2015-08-05 Carlos O'Donell <carlos@systemhalted.org>
134    
135     * version.h (RELEASE): Set to "stable".
136     diff --git a/NEWS b/NEWS
137 niro 2711 index 4c31de7..9b10bff 100644
138 niro 2697 --- a/NEWS
139     +++ b/NEWS
140     @@ -5,6 +5,12 @@ See the end for copying conditions.
141     Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
142     using `glibc' in the "product" field.
143    
144     +Version 2.22.1
145     +
146     +* The following bugs are resolved with this release:
147     +
148 niro 2711 + 18589, 18778, 18781, 18787, 18796, 18870, 18887, 18921, 18969.
149 niro 2697 +
150     Version 2.22
151    
152     * The following bugs are resolved with this release:
153     @@ -84,7 +90,7 @@ Version 2.22
154     release. Use of this header will trigger a deprecation warning.
155     Application developers should update their code to use <regex.h> instead.
156    
157     - This header was formerly part of SUSv2, but was deprecated in 1997 and
158     + This header was formerly part of SUS, but was deprecated in 1994 and
159     removed from the standard in 2001. Also, the glibc implementation
160     leaks memory. See BZ#18681 for more details.
161    
162     diff --git a/elf/Makefile b/elf/Makefile
163     index 4ceeaf8..71a18a1 100644
164     --- a/elf/Makefile
165     +++ b/elf/Makefile
166     @@ -148,7 +148,8 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
167     tst-unique1 tst-unique2 $(if $(CXX),tst-unique3 tst-unique4 \
168     tst-nodelete) \
169     tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
170     - tst-ptrguard1 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened
171     + tst-ptrguard1 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \
172     + tst-nodelete2
173     # reldep9
174     ifeq ($(build-hardcoded-path-in-tests),yes)
175     tests += tst-dlopen-aout
176     @@ -218,7 +219,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
177     tst-initorder2d \
178     tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
179     tst-array5dep tst-null-argv-lib \
180     - tst-tlsalign-lib tst-nodelete-opened-lib
181     + tst-tlsalign-lib tst-nodelete-opened-lib tst-nodelete2mod
182     ifeq (yes,$(have-protected-data))
183     modules-names += tst-protected1moda tst-protected1modb
184     tests += tst-protected1a tst-protected1b
185     @@ -594,6 +595,7 @@ tst-auditmod9b.so-no-z-defs = yes
186     tst-nodelete-uniquemod.so-no-z-defs = yes
187     tst-nodelete-rtldmod.so-no-z-defs = yes
188     tst-nodelete-zmod.so-no-z-defs = yes
189     +tst-nodelete2mod.so-no-z-defs = yes
190    
191     ifeq ($(build-shared),yes)
192     # Build all the modules even when not actually running test programs.
193     @@ -1164,6 +1166,11 @@ $(objpfx)tst-nodelete.out: $(objpfx)tst-nodelete-uniquemod.so \
194     LDFLAGS-tst-nodelete = -rdynamic
195     LDFLAGS-tst-nodelete-zmod.so = -Wl,--enable-new-dtags,-z,nodelete
196    
197     +$(objpfx)tst-nodelete2: $(libdl)
198     +$(objpfx)tst-nodelete2.out: $(objpfx)tst-nodelete2mod.so
199     +
200     +LDFLAGS-tst-nodelete2 = -rdynamic
201     +
202     $(objpfx)tst-initorder-cmp.out: tst-initorder.exp $(objpfx)tst-initorder.out
203     cmp $^ > $@; \
204     $(evaluate-test)
205     diff --git a/elf/dl-close.c b/elf/dl-close.c
206     index 9105277..c897247 100644
207     --- a/elf/dl-close.c
208     +++ b/elf/dl-close.c
209     @@ -144,6 +144,14 @@ _dl_close_worker (struct link_map *map, bool force)
210     char done[nloaded];
211     struct link_map *maps[nloaded];
212    
213     + /* Clear DF_1_NODELETE to force object deletion. We don't need to touch
214     + l_tls_dtor_count because forced object deletion only happens when an
215     + error occurs during object load. Destructor registration for TLS
216     + non-POD objects should not have happened till then for this
217     + object. */
218     + if (force)
219     + map->l_flags_1 &= ~DF_1_NODELETE;
220     +
221     /* Run over the list and assign indexes to the link maps and enter
222     them into the MAPS array. */
223     int idx = 0;
224     @@ -153,13 +161,6 @@ _dl_close_worker (struct link_map *map, bool force)
225     maps[idx] = l;
226     ++idx;
227    
228     - /* Clear DF_1_NODELETE to force object deletion. We don't need to touch
229     - l_tls_dtor_count because forced object deletion only happens when an
230     - error occurs during object load. Destructor registration for TLS
231     - non-POD objects should not have happened till then for this
232     - object. */
233     - if (force)
234     - l->l_flags_1 &= ~DF_1_NODELETE;
235     }
236     assert (idx == nloaded);
237    
238     diff --git a/elf/tst-nodelete2.c b/elf/tst-nodelete2.c
239     new file mode 100644
240     index 0000000..388e8af
241     --- /dev/null
242     +++ b/elf/tst-nodelete2.c
243     @@ -0,0 +1,37 @@
244     +#include "../dlfcn/dlfcn.h"
245     +#include <stdio.h>
246     +#include <stdlib.h>
247     +#include <gnu/lib-names.h>
248     +
249     +static int
250     +do_test (void)
251     +{
252     + int result = 0;
253     +
254     + printf ("\nOpening pthread library.\n");
255     + void *pthread = dlopen (LIBPTHREAD_SO, RTLD_LAZY);
256     +
257     + /* This is a test for correct DF_1_NODELETE clearing when dlopen failure
258     + happens. We should clear DF_1_NODELETE for failed library only, because
259     + doing this for others (e.g. libpthread) might cause them to be unloaded,
260     + that may lead to some global references (e.g. __rtld_lock_unlock) to be
261     + broken. The dlopen should fail because of undefined symbols in shared
262     + library, that cause DF_1_NODELETE to be cleared. For libpthread, this
263     + flag should be set, because if not, SIGSEGV will happen in dlclose. */
264     + if (dlopen ("tst-nodelete2mod.so", RTLD_NOW) != NULL)
265     + {
266     + printf ("Unique symbols test failed\n");
267     + result = 1;
268     + }
269     +
270     + if (pthread)
271     + dlclose (pthread);
272     +
273     + if (result == 0)
274     + printf ("SUCCESS\n");
275     +
276     + return result;
277     +}
278     +
279     +#define TEST_FUNCTION do_test ()
280     +#include "../test-skeleton.c"
281     diff --git a/elf/tst-nodelete2mod.c b/elf/tst-nodelete2mod.c
282     new file mode 100644
283     index 0000000..e88c756
284     --- /dev/null
285     +++ b/elf/tst-nodelete2mod.c
286     @@ -0,0 +1,7 @@
287     +/* Undefined symbol. */
288     +extern int not_exist (void);
289     +
290     +int foo (void)
291     +{
292     + return not_exist ();
293     +}
294     diff --git a/elf/tst-znodelete-zlib.cc b/elf/tst-znodelete-zlib.cc
295     deleted file mode 100644
296     index 1e8f368..0000000
297     --- a/elf/tst-znodelete-zlib.cc
298     +++ /dev/null
299     @@ -1,6 +0,0 @@
300     -extern int not_exist (void);
301     -
302     -int foo (void)
303     -{
304     - return not_exist ();
305     -}
306     diff --git a/io/test-lfs.c b/io/test-lfs.c
307     index 539c2a2..b6ebae4 100644
308     --- a/io/test-lfs.c
309     +++ b/io/test-lfs.c
310     @@ -144,7 +144,7 @@ test_ftello (void)
311     int
312     do_test (int argc, char *argv[])
313     {
314     - int ret;
315     + int ret, fd2;
316     struct stat64 statbuf;
317    
318     ret = lseek64 (fd, TWO_GB+100, SEEK_SET);
319     @@ -195,6 +195,25 @@ do_test (int argc, char *argv[])
320     error (EXIT_FAILURE, 0, "stat reported size %lld instead of %lld.",
321     (long long int) statbuf.st_size, (TWO_GB + 100 + 5));
322    
323     + fd2 = openat64 (AT_FDCWD, name, O_RDWR);
324     + if (fd2 == -1)
325     + {
326     + if (errno == ENOSYS)
327     + {
328     + /* Silently ignore this test. */
329     + error (0, 0, "openat64 is not supported");
330     + }
331     + else
332     + error (EXIT_FAILURE, errno, "openat64 failed to open big file");
333     + }
334     + else
335     + {
336     + ret = close (fd2);
337     +
338     + if (ret == -1)
339     + error (EXIT_FAILURE, errno, "error closing file");
340     + }
341     +
342     test_ftello ();
343    
344     return 0;
345 niro 2711 diff --git a/locale/C-collate.c b/locale/C-collate.c
346     index d7f3c55..06dfdfa 100644
347     --- a/locale/C-collate.c
348     +++ b/locale/C-collate.c
349     @@ -144,8 +144,6 @@ const struct __locale_data _nl_C_LC_COLLATE attribute_hidden =
350     /* _NL_COLLATE_COLLSEQWC */
351     { .string = (const char *) collseqwc },
352     /* _NL_COLLATE_CODESET */
353     - { .string = _nl_C_codeset },
354     - /* _NL_COLLATE_ENCODING_TYPE */
355     - { .word = __cet_8bit }
356     + { .string = _nl_C_codeset }
357     }
358     };
359     diff --git a/locale/categories.def b/locale/categories.def
360     index 045489d..a8dda53 100644
361     --- a/locale/categories.def
362     +++ b/locale/categories.def
363     @@ -58,7 +58,6 @@ DEFINE_CATEGORY
364     DEFINE_ELEMENT (_NL_COLLATE_COLLSEQMB, "collate-collseqmb", std, wstring)
365     DEFINE_ELEMENT (_NL_COLLATE_COLLSEQWC, "collate-collseqwc", std, wstring)
366     DEFINE_ELEMENT (_NL_COLLATE_CODESET, "collate-codeset", std, string)
367     - DEFINE_ELEMENT (_NL_COLLATE_ENCODING_TYPE, "collate-encoding-type", std, word)
368     ), NO_POSTLOAD)
369    
370    
371     diff --git a/locale/langinfo.h b/locale/langinfo.h
372     index ffc5c7f..a565d9d 100644
373     --- a/locale/langinfo.h
374     +++ b/locale/langinfo.h
375     @@ -255,7 +255,6 @@ enum
376     _NL_COLLATE_COLLSEQMB,
377     _NL_COLLATE_COLLSEQWC,
378     _NL_COLLATE_CODESET,
379     - _NL_COLLATE_ENCODING_TYPE,
380     _NL_NUM_LC_COLLATE,
381    
382     /* LC_CTYPE category: character classification.
383     diff --git a/locale/localeinfo.h b/locale/localeinfo.h
384     index bdab9fe..1d2ee00 100644
385     --- a/locale/localeinfo.h
386     +++ b/locale/localeinfo.h
387     @@ -110,14 +110,6 @@ enum coll_sort_rule
388     sort_mask
389     };
390    
391     -/* Collation encoding type. */
392     -enum collation_encoding_type
393     -{
394     - __cet_other,
395     - __cet_8bit,
396     - __cet_utf8
397     -};
398     -
399     /* We can map the types of the entries into a few categories. */
400     enum value_type
401     {
402     diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
403     index a39a94f..dc0fe30 100644
404     --- a/locale/programs/ld-collate.c
405     +++ b/locale/programs/ld-collate.c
406     @@ -32,7 +32,6 @@
407     #include "linereader.h"
408     #include "locfile.h"
409     #include "elem-hash.h"
410     -#include "../localeinfo.h"
411    
412     /* Uncomment the following line in the production version. */
413     /* #define NDEBUG 1 */
414     @@ -2131,8 +2130,6 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
415     /* The words have to be handled specially. */
416     if (idx == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_HASH_SIZEMB))
417     add_locale_uint32 (&file, 0);
418     - else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_ENCODING_TYPE))
419     - add_locale_uint32 (&file, __cet_other);
420     else
421     add_locale_empty (&file);
422     }
423     @@ -2496,12 +2493,6 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
424     add_locale_raw_data (&file, collate->mbseqorder, 256);
425     add_locale_collseq_table (&file, &collate->wcseqorder);
426     add_locale_string (&file, charmap->code_set_name);
427     - if (strcmp (charmap->code_set_name, "UTF-8") == 0)
428     - add_locale_uint32 (&file, __cet_utf8);
429     - else if (charmap->mb_cur_max == 1)
430     - add_locale_uint32 (&file, __cet_8bit);
431     - else
432     - add_locale_uint32 (&file, __cet_other);
433     write_locale_data (output_path, LC_COLLATE, "LC_COLLATE", &file);
434    
435     obstack_free (&weightpool, NULL);
436 niro 2697 diff --git a/misc/Makefile b/misc/Makefile
437     index aecb0da..2f5edf6 100644
438     --- a/misc/Makefile
439     +++ b/misc/Makefile
440     @@ -76,7 +76,8 @@ install-lib := libg.a
441     gpl2lgpl := error.c error.h
442    
443     tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
444     - tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
445     + tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \
446     + tst-mntent-blank-corrupt tst-mntent-blank-passno
447     ifeq ($(run-built-tests),yes)
448     tests-special += $(objpfx)tst-error1-mem.out
449     endif
450     diff --git a/misc/mntent_r.c b/misc/mntent_r.c
451     index 6159873..4f26998 100644
452     --- a/misc/mntent_r.c
453     +++ b/misc/mntent_r.c
454     @@ -136,7 +136,9 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz)
455     end_ptr = strchr (buffer, '\n');
456     if (end_ptr != NULL) /* chop newline */
457     {
458     - while (end_ptr[-1] == ' ' || end_ptr[-1] == '\t')
459     + /* Do not walk past the start of buffer if it's all whitespace. */
460     + while (end_ptr != buffer
461     + && (end_ptr[-1] == ' ' || end_ptr[-1] == '\t'))
462     end_ptr--;
463     *end_ptr = '\0';
464     }
465     diff --git a/misc/regexp.h b/misc/regexp.h
466     index 3460989..42394f7 100644
467     --- a/misc/regexp.h
468     +++ b/misc/regexp.h
469     @@ -19,10 +19,11 @@
470     #ifndef _REGEXP_H
471     #define _REGEXP_H 1
472    
473     -/* The contents of this header file were standardized in the
474     - Single Unix Specification, Version 2 (1997) but marked as
475     - LEGACY; new applications were already being encouraged to
476     - use <regex.h> instead. POSIX.1-2001 removed this header.
477     +/* The contents of this header file were originally standardized in
478     + the Single Unix Specification, Issue 3 (1992). In Issue 4 (1994)
479     + the header was marked as TO BE WITHDRAWN, and new applications
480     + were encouraged to use <regex.h> instead. It was officially
481     + withdrawn from the standard in Issue 6 (aka POSIX.1-2001).
482    
483     This header is provided only for backward compatibility.
484     It will be removed in the next release of the GNU C Library.
485 niro 2711 diff --git a/misc/sys/param.h b/misc/sys/param.h
486     index 62b7ed2..1908b93 100644
487     --- a/misc/sys/param.h
488     +++ b/misc/sys/param.h
489     @@ -50,6 +50,9 @@
490     #if !defined NOFILE && defined OPEN_MAX
491     # define NOFILE OPEN_MAX
492     #endif
493     +#if !defined MAXHOSTNAMELEN && defined HOST_NAME_MAX
494     +# define MAXHOSTNAMELEN HOST_NAME_MAX
495     +#endif
496     #ifndef NCARGS
497     # ifdef ARG_MAX
498     # define NCARGS ARG_MAX
499 niro 2697 diff --git a/misc/tst-mntent-blank-corrupt.c b/misc/tst-mntent-blank-corrupt.c
500     new file mode 100644
501     index 0000000..92266a3
502     --- /dev/null
503     +++ b/misc/tst-mntent-blank-corrupt.c
504     @@ -0,0 +1,45 @@
505     +/* Make sure blank lines does not cause memory corruption BZ #18887.
506     +
507     + Copyright (C) 2009-2015 Free Software Foundation, Inc.
508     + This file is part of the GNU C Library.
509     +
510     + The GNU C Library is free software; you can redistribute it and/or
511     + modify it under the terms of the GNU Lesser General Public
512     + License as published by the Free Software Foundation; either
513     + version 2.1 of the License, or (at your option) any later version.
514     +
515     + The GNU C Library is distributed in the hope that it will be useful,
516     + but WITHOUT ANY WARRANTY; without even the implied warranty of
517     + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
518     + Lesser General Public License for more details.
519     +
520     + You should have received a copy of the GNU Lesser General Public
521     + License along with the GNU C Library; if not, see
522     + <http://www.gnu.org/licenses/>. */
523     +
524     +#include <mntent.h>
525     +#include <stdio.h>
526     +#include <string.h>
527     +
528     +/* Make sure blank lines don't trigger memory corruption. This doesn't happen
529     + for all targets though, so it's a best effort test BZ #18887. */
530     +static int
531     +do_test (void)
532     +{
533     + FILE *fp;
534     +
535     + fp = tmpfile ();
536     + fputs ("\n \n/foo\\040dir /bar\\040dir auto bind \t \n", fp);
537     + rewind (fp);
538     +
539     + /* The corruption happens here ... */
540     + getmntent (fp);
541     + /* ... but trigers here. */
542     + endmntent (fp);
543     +
544     + /* If the test failed, we would crash, and not hit this point. */
545     + return 0;
546     +}
547     +
548     +#define TEST_FUNCTION do_test ()
549     +#include "../test-skeleton.c"
550     diff --git a/misc/tst-mntent-blank-passno.c b/misc/tst-mntent-blank-passno.c
551     new file mode 100644
552     index 0000000..fc04291
553     --- /dev/null
554     +++ b/misc/tst-mntent-blank-passno.c
555     @@ -0,0 +1,53 @@
556     +/* Make sure trailing whitespace is handled properly BZ #17273.
557     +
558     + Copyright (C) 2009-2015 Free Software Foundation, Inc.
559     + This file is part of the GNU C Library.
560     +
561     + The GNU C Library is free software; you can redistribute it and/or
562     + modify it under the terms of the GNU Lesser General Public
563     + License as published by the Free Software Foundation; either
564     + version 2.1 of the License, or (at your option) any later version.
565     +
566     + The GNU C Library is distributed in the hope that it will be useful,
567     + but WITHOUT ANY WARRANTY; without even the implied warranty of
568     + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
569     + Lesser General Public License for more details.
570     +
571     + You should have received a copy of the GNU Lesser General Public
572     + License along with the GNU C Library; if not, see
573     + <http://www.gnu.org/licenses/>. */
574     +
575     +#include <mntent.h>
576     +#include <stdio.h>
577     +#include <string.h>
578     +
579     +/* Check entries to make sure trailing whitespace is ignored and we return the
580     + correct passno value BZ #17273. */
581     +static int
582     +do_test (void)
583     +{
584     + int result = 0;
585     + FILE *fp;
586     + struct mntent *mnt;
587     +
588     + fp = tmpfile ();
589     + fputs ("/foo\\040dir /bar\\040dir auto bind \t \n", fp);
590     + rewind (fp);
591     +
592     + mnt = getmntent (fp);
593     + if (strcmp (mnt->mnt_fsname, "/foo dir") != 0
594     + || strcmp (mnt->mnt_dir, "/bar dir") != 0
595     + || strcmp (mnt->mnt_type, "auto") != 0
596     + || strcmp (mnt->mnt_opts, "bind") != 0
597     + || mnt->mnt_freq != 0
598     + || mnt->mnt_passno != 0)
599     + {
600     + puts ("Error while reading entry with trailing whitespaces");
601     + result = 1;
602     + }
603     +
604     + return result;
605     +}
606     +
607     +#define TEST_FUNCTION do_test ()
608     +#include "../test-skeleton.c"
609     diff --git a/misc/tst-mntent.c b/misc/tst-mntent.c
610     index 876c89f..820b354 100644
611     --- a/misc/tst-mntent.c
612     +++ b/misc/tst-mntent.c
613     @@ -73,26 +73,6 @@ main (int argc, char *argv[])
614     puts ("Error while reading written entry back in");
615     result = 1;
616     }
617     -
618     - /* Part III: Entry with whitespaces at the end of a line. */
619     - rewind (fp);
620     -
621     - fputs ("/foo\\040dir /bar\\040dir auto bind \t \n", fp);
622     -
623     - rewind (fp);
624     -
625     - mnt = getmntent (fp);
626     -
627     - if (strcmp (mnt->mnt_fsname, "/foo dir") != 0
628     - || strcmp (mnt->mnt_dir, "/bar dir") != 0
629     - || strcmp (mnt->mnt_type, "auto") != 0
630     - || strcmp (mnt->mnt_opts, "bind") != 0
631     - || mnt->mnt_freq != 0
632     - || mnt->mnt_passno != 0)
633     - {
634     - puts ("Error while reading entry with trailing whitespaces");
635     - result = 1;
636     - }
637     }
638    
639     return result;
640     diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl
641     index cac1562..79b2b3e 100755
642     --- a/scripts/test-installation.pl
643     +++ b/scripts/test-installation.pl
644     @@ -80,16 +80,25 @@ arglist: while (@ARGV) {
645     # We expect none or one argument.
646     if ($#ARGV == -1) {
647     $soversions="soversions.mk";
648     + $config="config.make";
649     } elsif ($#ARGV == 0) {
650     if (-d $ARGV[0]) {
651     $soversions = "$ARGV[0]/soversions.mk";
652     + $config = "$ARGV[0]/config.make";
653     } else {
654     - $soversions = $ARGV[0];
655     + $soversions = $dir = $ARGV[0];
656     + $dir =~ s!/?[^/]*/*$!!;
657     + $config = $dir . "/config.make";
658     }
659     } else {
660     die "Wrong number of arguments.";
661     }
662    
663     +if (system ("grep -q \"build-mathvec = yes\" $config") == 0) {
664     + $build_mathvec = 1;
665     +} else {
666     + $build_mathvec = 0;
667     +}
668    
669     # Read names and versions of all shared libraries that are part of
670     # glibc
671     @@ -111,6 +120,8 @@ while (<SOVERSIONS>) {
672     # - libthread_db since it contains unresolved references
673     # - it's just a test NSS module
674     # - We don't provide the libgcc so we don't test it
675     + # - libmvec if it wasn't built
676     + next if ($build_mathvec == 0 && $name eq "mvec");
677     if ($name ne "nss_ldap" && $name ne "db1"
678     && !($name =~/^nss1_/) && $name ne "thread_db"
679     && $name ne "nss_test1" && $name ne "libgcc_s") {
680 niro 2711 diff --git a/string/Makefile b/string/Makefile
681     index 8424a61..ebe9354 100644
682     --- a/string/Makefile
683     +++ b/string/Makefile
684     @@ -54,7 +54,7 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \
685     tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \
686     bug-strtok1 $(addprefix test-,$(strop-tests)) \
687     bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \
688     - tst-strtok_r
689     + tst-strtok_r bug-strcoll2
690    
691     xtests = tst-strcoll-overflow
692    
693     @@ -75,4 +75,17 @@ ifeq ($(run-built-tests),yes)
694     $(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out
695     cmp $^ > $@; \
696     $(evaluate-test)
697     +
698     +LOCALES := de_DE.UTF-8 en_US.ISO-8859-1 en_US.UTF-8 \
699     + tr_TR.ISO-8859-9 tr_TR.UTF-8 cs_CZ.UTF-8 \
700     + da_DK.ISO-8859-1
701     +include ../gen-locales.mk
702     +
703     +$(objpfx)test-strcasecmp.out: $(gen-locales)
704     +$(objpfx)test-strncasecmp.out: $(gen-locales)
705     +$(objpfx)tst-strxfrm.out: $(gen-locales)
706     +$(objpfx)tst-strxfrm2.out: $(gen-locales)
707     +# bug-strcoll2 needs cs_CZ.UTF-8 and da_DK.ISO-8859-1.
708     +$(objpfx)bug-strcoll2.out: $(gen-locales)
709     +
710     endif
711     diff --git a/string/bug-strcoll2.c b/string/bug-strcoll2.c
712     new file mode 100644
713     index 0000000..72a9ff2
714     --- /dev/null
715     +++ b/string/bug-strcoll2.c
716     @@ -0,0 +1,92 @@
717     +/* Bug 18589: sort-test.sh fails at random.
718     + Copyright (C) 2015 Free Software Foundation, Inc.
719     + This file is part of the GNU C Library.
720     +
721     + The GNU C Library is free software; you can redistribute it and/or
722     + modify it under the terms of the GNU Lesser General Public
723     + License as published by the Free Software Foundation; either
724     + version 2.1 of the License, or (at your option) any later version.
725     +
726     + The GNU C Library is distributed in the hope that it will be useful,
727     + but WITHOUT ANY WARRANTY; without even the implied warranty of
728     + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
729     + Lesser General Public License for more details.
730     +
731     + You should have received a copy of the GNU Lesser General Public
732     + License along with the GNU C Library; if not, see
733     + <http://www.gnu.org/licenses/>. */
734     +
735     +#include <stdio.h>
736     +#include <string.h>
737     +#include <locale.h>
738     +
739     +/* An incorrect strcoll optimization resulted in incorrect
740     + results from strcoll for cs_CZ and da_DK. */
741     +
742     +int
743     +test_cs_CZ (void)
744     +{
745     + const char t1[] = "config";
746     + const char t2[] = "choose";
747     + if (setlocale (LC_ALL, "cs_CZ.UTF-8") == NULL)
748     + {
749     + perror ("setlocale");
750     + return 1;
751     + }
752     + /* In Czech the digraph ch sorts after c, therefore we expect
753     + config to sort before choose. */
754     + int a = strcoll (t1, t2);
755     + int b = strcoll (t2, t1);
756     + printf ("strcoll (\"%s\", \"%s\") = %d\n", t1, t2, a);
757     + printf ("strcoll (\"%s\", \"%s\") = %d\n", t2, t1, b);
758     + if (a < 0 && b > 0)
759     + {
760     + puts ("PASS: config < choose");
761     + return 0;
762     + }
763     + else
764     + {
765     + puts ("FAIL: Wrong sorting in cs_CZ.UTF-8.");
766     + return 1;
767     + }
768     +}
769     +
770     +int
771     +test_da_DK (void)
772     +{
773     + const char t1[] = "AS";
774     + const char t2[] = "AA";
775     + if (setlocale (LC_ALL, "da_DK.ISO-8859-1") == NULL)
776     + {
777     + perror ("setlocale");
778     + return 1;
779     + }
780     + /* AA should be treated as the last letter of the Danish alphabet,
781     + hence sorting after AS. */
782     + int a = strcoll (t1, t2);
783     + int b = strcoll (t2, t1);
784     + printf ("strcoll (\"%s\", \"%s\") = %d\n", t1, t2, a);
785     + printf ("strcoll (\"%s\", \"%s\") = %d\n", t2, t1, b);
786     + if (a < 0 && b > 0)
787     + {
788     + puts ("PASS: AS < AA");
789     + return 0;
790     + }
791     + else
792     + {
793     + puts ("FAIL: Wrong sorting in da_DK.ISO-8859-1");
794     + return 1;
795     + }
796     +}
797     +
798     +static int
799     +do_test (void)
800     +{
801     + int err = 0;
802     + err |= test_cs_CZ ();
803     + err |= test_da_DK ();
804     + return err;
805     +}
806     +
807     +#define TEST_FUNCTION do_test ()
808     +#include "../test-skeleton.c"
809     diff --git a/string/strcoll_l.c b/string/strcoll_l.c
810     index 8f1225f..35bc0e4 100644
811     --- a/string/strcoll_l.c
812     +++ b/string/strcoll_l.c
813     @@ -29,7 +29,6 @@
814     # define STRING_TYPE char
815     # define USTRING_TYPE unsigned char
816     # define STRCOLL __strcoll_l
817     -# define STRDIFF __strdiff
818     # define STRCMP strcmp
819     # define WEIGHT_H "../locale/weight.h"
820     # define SUFFIX MB
821     @@ -42,20 +41,6 @@
822     #include "../locale/localeinfo.h"
823     #include WEIGHT_H
824    
825     -#define MASK_UTF8_7BIT (1 << 7)
826     -#define MASK_UTF8_START (3 << 6)
827     -
828     -size_t
829     -STRDIFF (const STRING_TYPE *s, const STRING_TYPE *t)
830     -{
831     - size_t n;
832     -
833     - for (n = 0; *s != '\0' && *s++ == *t++; ++n)
834     - continue;
835     -
836     - return n;
837     -}
838     -
839     /* Track status while looking for sequences in a string. */
840     typedef struct
841     {
842     @@ -269,29 +254,9 @@ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
843     const USTRING_TYPE *extra;
844     const int32_t *indirect;
845    
846     - /* In case there is no locale specific sort order (C / POSIX). */
847     if (nrules == 0)
848     return STRCMP (s1, s2);
849    
850     - /* Fast forward to the position of the first difference. Needs to be
851     - encoding aware as the byte-by-byte comparison can stop in the middle
852     - of a char sequence for multibyte encodings like UTF-8. */
853     - uint_fast32_t encoding =
854     - current->values[_NL_ITEM_INDEX (_NL_COLLATE_ENCODING_TYPE)].word;
855     - if (encoding != __cet_other)
856     - {
857     - size_t diff = STRDIFF (s1, s2);
858     - if (diff > 0)
859     - {
860     - if (encoding == __cet_utf8 && (*(s1 + diff) & MASK_UTF8_7BIT) != 0)
861     - do
862     - diff--;
863     - while (diff > 0 && (*(s1 + diff) & MASK_UTF8_START) != MASK_UTF8_START);
864     - s1 += diff;
865     - s2 += diff;
866     - }
867     - }
868     -
869     /* Catch empty strings. */
870     if (__glibc_unlikely (*s1 == '\0') || __glibc_unlikely (*s2 == '\0'))
871     return (*s1 != '\0') - (*s2 != '\0');
872     @@ -358,8 +323,7 @@ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
873     byte-level comparison to ensure that we don't waste time
874     going through multiple passes for totally equal strings
875     before proceeding to subsequent passes. */
876     - if (pass == 0 && encoding == __cet_other &&
877     - STRCMP (s1, s2) == 0)
878     + if (pass == 0 && STRCMP (s1, s2) == 0)
879     return result;
880     else
881     break;
882     diff --git a/string/tst-strxfrm2.c b/string/tst-strxfrm2.c
883     index d5a1115..bea5aa2 100644
884     --- a/string/tst-strxfrm2.c
885     +++ b/string/tst-strxfrm2.c
886     @@ -5,6 +5,8 @@
887     static int
888     do_test (void)
889     {
890     + static const char test_locale[] = "de_DE.UTF-8";
891     +
892     int res = 0;
893    
894     char buf[20];
895     @@ -38,9 +40,9 @@ do_test (void)
896     res = 1;
897     }
898    
899     - if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
900     + if (setlocale (LC_ALL, test_locale) == NULL)
901     {
902     - puts ("setlocale failed");
903     + printf ("cannot set locale \"%s\"\n", test_locale);
904     res = 1;
905     }
906     else
907 niro 2697 diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c
908     index b707c19..89d8baf 100644
909     --- a/sysdeps/hppa/dl-symaddr.c
910     +++ b/sysdeps/hppa/dl-symaddr.c
911     @@ -33,3 +33,4 @@ _dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref)
912     else
913     return (void *) value;
914     }
915     +rtld_hidden_def (_dl_symbol_address)
916 niro 2711 diff --git a/sysdeps/nacl/Makefile b/sysdeps/nacl/Makefile
917     index 6749a44..1748886 100644
918     --- a/sysdeps/nacl/Makefile
919     +++ b/sysdeps/nacl/Makefile
920     @@ -132,4 +132,13 @@ ifeq ($(subdir),misc)
921     # sysdeps/.../linux/ directories, but it's still a sysdeps decision to
922     # install it.
923     sysdep_headers += bits/mman-linux.h
924     +
925     +# This defeats sysdeps/gnu/Makefile's addition of sys/mtio.h, which
926     +# we do not want. This is a total kludge, but it seems no worse for
927     +# now than making the sysdeps/gnu/Makefile code conditional on a
928     +# variable we set here. If some sysdeps/.../Makefile that is later
929     +# in the list than sysdeps/gnu needed to add to sysdep_headers, this
930     +# would break it. But sysdeps/gnu is close to last in the list and
931     +# this coming up seems unlikely.
932     +override sysdep_headers := $(sysdep_headers)
933     endif
934 niro 2697 diff --git a/sysdeps/nacl/start.c b/sysdeps/nacl/start.c
935     index a4b6dd3..8e8bc1a 100644
936     --- a/sysdeps/nacl/start.c
937     +++ b/sysdeps/nacl/start.c
938     @@ -44,6 +44,10 @@
939     /* The application defines this, of course. */
940     extern int main (int argc, char **argv, char **envp);
941    
942     +/* But maybe it defines this too, in which case it takes precedence. */
943     +extern int __nacl_main (int argc, char **argv, char **envp)
944     + __attribute__ ((weak));
945     +
946     /* These are defined in libc. */
947     extern int __libc_csu_init (int argc, char **argv, char **envp);
948     extern void __libc_csu_fini (void);
949     @@ -59,7 +63,7 @@ _start (uint32_t info[])
950     {
951     /* The generic code actually assumes that envp follows argv. */
952    
953     - __libc_start_main (&main,
954     + __libc_start_main (&__nacl_main ?: &main,
955     nacl_startup_argc (info),
956     nacl_startup_argv (info),
957     nacl_startup_auxv (info),
958 niro 2711 diff --git a/sysdeps/posix/opendir.c b/sysdeps/posix/opendir.c
959     index 6509f5c..9edf056 100644
960     --- a/sysdeps/posix/opendir.c
961     +++ b/sysdeps/posix/opendir.c
962     @@ -105,7 +105,7 @@ need_isdir_precheck (void)
963     tryopen_o_directory ();
964    
965     /* We can skip the expensive `stat' call if O_DIRECTORY works. */
966     - return o_directory_works > 0;
967     + return o_directory_works < 0;
968     #endif
969     return true;
970     }
971 niro 2697 diff --git a/sysdeps/sparc/sparc32/sem_open.c b/sysdeps/sparc/sparc32/sem_open.c
972     index 16cb9ad..59df2d7 100644
973     --- a/sysdeps/sparc/sparc32/sem_open.c
974     +++ b/sysdeps/sparc/sparc32/sem_open.c
975     @@ -29,6 +29,7 @@
976     #include <sys/mman.h>
977     #include <sys/stat.h>
978     #include "semaphoreP.h"
979     +#include <futex-internal.h>
980     #include <shm-directory.h>
981    
982    
983     diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
984     index abde83e..6e73504 100644
985     --- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
986     +++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
987     @@ -56,42 +56,41 @@ typedef uintmax_t uatomic_max_t;
988     #define _LWS "0xb0"
989     #define _LWS_CAS "0"
990     /* Note r31 is the link register. */
991     -#define _LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
992     +#define _LWS_CLOBBER "r1", "r23", "r22", "r20", "r31", "memory"
993     /* String constant for -EAGAIN. */
994     #define _ASM_EAGAIN "-11"
995     /* String constant for -EDEADLOCK. */
996     #define _ASM_EDEADLOCK "-45"
997    
998     #if __ASSUME_LWS_CAS
999     -/* The only basic operation needed is compare and exchange. */
1000     +/* The only basic operation needed is compare and exchange. The mem
1001     + pointer must be word aligned. */
1002     # define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
1003     ({ \
1004     - volatile int lws_errno; \
1005     - __typeof__ (*mem) lws_ret; \
1006     - asm volatile( \
1007     + register long lws_errno asm("r21"); \
1008     + register unsigned long lws_ret asm("r28"); \
1009     + register unsigned long lws_mem asm("r26") = (unsigned long)(mem); \
1010     + register unsigned long lws_old asm("r25") = (unsigned long)(oldval);\
1011     + register unsigned long lws_new asm("r24") = (unsigned long)(newval);\
1012     + __asm__ __volatile__( \
1013     "0: \n\t" \
1014     - "copy %2, %%r26 \n\t" \
1015     - "copy %3, %%r25 \n\t" \
1016     - "copy %4, %%r24 \n\t" \
1017     "ble " _LWS "(%%sr2, %%r0) \n\t" \
1018     "ldi " _LWS_CAS ", %%r20 \n\t" \
1019     - "ldi " _ASM_EAGAIN ", %%r24 \n\t" \
1020     - "cmpb,=,n %%r24, %%r21, 0b \n\t" \
1021     + "ldi " _ASM_EAGAIN ", %%r20 \n\t" \
1022     + "cmpb,=,n %%r20, %%r21, 0b \n\t" \
1023     "nop \n\t" \
1024     - "ldi " _ASM_EDEADLOCK ", %%r25 \n\t" \
1025     - "cmpb,=,n %%r25, %%r21, 0b \n\t" \
1026     + "ldi " _ASM_EDEADLOCK ", %%r20 \n\t" \
1027     + "cmpb,=,n %%r20, %%r21, 0b \n\t" \
1028     "nop \n\t" \
1029     - "stw %%r28, %0 \n\t" \
1030     - "stw %%r21, %1 \n\t" \
1031     - : "=m" (lws_ret), "=m" (lws_errno) \
1032     - : "r" (mem), "r" (oldval), "r" (newval) \
1033     + : "=r" (lws_ret), "=r" (lws_errno) \
1034     + : "r" (lws_mem), "r" (lws_old), "r" (lws_new) \
1035     : _LWS_CLOBBER \
1036     ); \
1037     \
1038     - if(lws_errno == -EFAULT || lws_errno == -ENOSYS) \
1039     + if (lws_errno == -EFAULT || lws_errno == -ENOSYS) \
1040     ABORT_INSTRUCTION; \
1041     \
1042     - lws_ret; \
1043     + (__typeof (oldval)) lws_ret; \
1044     })
1045    
1046     # define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
1047     diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.h b/sysdeps/unix/sysv/linux/microblaze/sysdep.h
1048     index 83c0340..9d5c542 100644
1049     --- a/sysdeps/unix/sysv/linux/microblaze/sysdep.h
1050     +++ b/sysdeps/unix/sysv/linux/microblaze/sysdep.h
1051     @@ -16,8 +16,11 @@
1052     License along with the GNU C Library; if not, see
1053     <http://www.gnu.org/licenses/>. */
1054    
1055     +#ifndef _LINUX_MICROBLAZE_SYSDEP_H
1056     +#define _LINUX_MICROBLAZE_SYSDEP_H 1
1057     +
1058     +#include <sysdeps/unix/sysdep.h>
1059     #include <sysdeps/microblaze/sysdep.h>
1060     -#include <sys/syscall.h>
1061    
1062     /* Defines RTLD_PRIVATE_ERRNO. */
1063     #include <dl-sysdep.h>
1064     @@ -305,3 +308,5 @@ SYSCALL_ERROR_LABEL_DCL: \
1065     # define PTR_DEMANGLE(var) (void) (var)
1066    
1067     #endif /* not __ASSEMBLER__ */
1068     +
1069     +#endif /* _LINUX_MICROBLAZE_SYSDEP_H */
1070     diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
1071     index 6777123..ad8e31d 100644
1072     --- a/sysdeps/unix/sysv/linux/openat.c
1073     +++ b/sysdeps/unix/sysv/linux/openat.c
1074     @@ -68,6 +68,11 @@ __OPENAT (int fd, const char *file, int oflag, ...)
1075     va_end (arg);
1076     }
1077    
1078     + /* We have to add the O_LARGEFILE flag for openat64. */
1079     +#ifdef MORE_OFLAGS
1080     + oflag |= MORE_OFLAGS;
1081     +#endif
1082     +
1083     return SYSCALL_CANCEL (openat, fd, file, oflag, mode);
1084     }
1085     libc_hidden_def (__OPENAT)
1086 niro 2711 diff --git a/wcsmbs/wcscoll_l.c b/wcsmbs/wcscoll_l.c
1087     index 6d9384a..87f240d 100644
1088     --- a/wcsmbs/wcscoll_l.c
1089     +++ b/wcsmbs/wcscoll_l.c
1090     @@ -23,7 +23,6 @@
1091     #define STRING_TYPE wchar_t
1092     #define USTRING_TYPE wint_t
1093     #define STRCOLL __wcscoll_l
1094     -#define STRDIFF __wcsdiff
1095     #define STRCMP __wcscmp
1096     #define WEIGHT_H "../locale/weightwc.h"
1097     #define SUFFIX WC