From 9c96ff23858b0759e12ad69e3c4599931c90bee8 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 14 Aug 2011 04:07:50 -0700 Subject: * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIM_INFINITY, RLIM64_INFINITY): Fix 64-bit values for 32-bit sparc. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/sparc/bits/resource.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d543f6..45e389e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-14 David S. Miller + + * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIM_INFINITY, + RLIM64_INFINITY): Fix 64-bit values for 32-bit sparc. + 2011-08-13 Ulrich Drepper * elf/dl-open.c: Rename show_scope to _dl_schow_scope and export. diff --git a/sysdeps/unix/sysv/linux/sparc/bits/resource.h b/sysdeps/unix/sysv/linux/sparc/bits/resource.h index 04d33e4..5c00b8f 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/resource.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/resource.h @@ -130,11 +130,11 @@ enum __rlimit_resource #ifndef __USE_FILE_OFFSET64 # define RLIM_INFINITY ((long int)(~0UL >> 1)) #else -# define RLIM_INFINITY 0x7fffffffffffffffLL +# define RLIM_INFINITY 0xffffffffffffffffLL #endif #ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL +# define RLIM64_INFINITY 0xffffffffffffffffLL #endif #endif -- cgit v1.1 From 5e4287d16f897cde3e0201de0f96d148248c0ca9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 14 Aug 2011 15:59:11 -0700 Subject: Warning patrol. --- ChangeLog | 6 ++++++ elf/rtld.c | 2 +- sysdeps/generic/ldsodefs.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45e389e..c67904e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-08-14 Roland McGrath + + * sysdeps/generic/ldsodefs.h (struct unique_sym): Add a const. + * elf/rtld.c (dl_main): Invert order of assignment in last change, + to avoid a warning. + 2011-08-14 David S. Miller * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIM_INFINITY, diff --git a/elf/rtld.c b/elf/rtld.c index b84a3e7..478d037 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1391,7 +1391,7 @@ of this helper program; chances are you did not intend to run this program.\n\ char *copy = malloc (len); if (copy == NULL) _dl_fatal_printf ("out of memory\n"); - l->l_name = l->l_libname->name = memcpy (copy, dsoname, len); + l->l_libname->name = l->l_name = memcpy (copy, dsoname, len); } /* Add the vDSO to the object list. */ diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index a5f0a25..8c7f00f 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -396,7 +396,7 @@ struct rtld_global uint32_t hashval; const char *name; const ElfW(Sym) *sym; - struct link_map *map; + const struct link_map *map; } *entries; size_t size; size_t n_elements; -- cgit v1.1 From 675456ef83622a17c86ae60b94b8e5e3a9d5bb2f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 14 Aug 2011 16:08:37 -0700 Subject: Clean up locale/Makefile variables for -D switches. --- ChangeLog | 7 +++++++ locale/Makefile | 28 +++++++++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c67904e..341deeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-08-14 Roland McGrath + * locale/Makefile (locale-CPPFLAGS): Renamed CPPFLAGS-locale-programs. + (locale-CPPFLAGS): New variable; put LOCALEDIR, LOCALE_ALIAS_PATH and + -Iprograms here. + (cppflags-iterator.mk sequence): Use locale-programs in place of nonlib. + (localedef-modules): Add localedef. + (locale-modules): Add locale. + * sysdeps/generic/ldsodefs.h (struct unique_sym): Add a const. * elf/rtld.c (dl_main): Invert order of assignment in last change, to avoid a warning. diff --git a/locale/Makefile b/locale/Makefile index 87c29a5..ccaebf1 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -60,10 +60,11 @@ vpath %.c programs ../crypt vpath %.h programs vpath %.gperf programs -localedef-modules := $(categories:%=ld-%) charmap linereader locfile \ +localedef-modules := localedef $(categories:%=ld-%) \ + charmap linereader locfile \ repertoire locarchive localedef-aux := md5 -locale-modules := locale-spec +locale-modules := locale locale-spec lib-modules := charmap-dir simple-hash xmalloc xstrdup @@ -91,22 +92,27 @@ endif localepath = "$(localedir):$(i18ndir)" -locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \ - -DLOCALEDIR='"$(localedir)"' \ - -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \ - -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ - -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \ - -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \ - -Iprograms -DNOT_IN_libc +# -Iprograms doesn't really belong here, but this gets it at the head +# of the list instead of the tail, where CPPFLAGS-$(lib) gets added. +# We need it before the standard -I's to see programs/config.h first. +locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \ + -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \ + -Iprograms + +CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \ + -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ + -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \ + -DLOCSRCDIR='"$(i18ndir)/locales"' \ + -DHAVE_CONFIG_H -DNOT_IN_libc CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-charmap-dir.c = -Wno-write-strings -# This makes sure -DNOT_IN_libc is passed for all these modules. +# This makes sure -DNOT_IN_libc et al are passed for all these modules. cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \ $(locale-modules) $(lib-modules)) -lib := nonlib +lib := locale-programs include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) # Depend on libc.so so a DT_NEEDED is generated in the shared objects. -- cgit v1.1 From 69f630971184cae39d578709089d175c4b743390 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 14 Aug 2011 16:42:06 -0700 Subject: More warning patrol. --- ChangeLog | 2 ++ string/strncat.c | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 341deeb..4569518 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2011-08-14 Roland McGrath + * string/strncat.c (STRNCAT): Use prototype definition. + * locale/Makefile (locale-CPPFLAGS): Renamed CPPFLAGS-locale-programs. (locale-CPPFLAGS): New variable; put LOCALEDIR, LOCALE_ALIAS_PATH and -Iprograms here. diff --git a/string/strncat.c b/string/strncat.c index 72d9d69..0a3d4af 100644 --- a/string/strncat.c +++ b/string/strncat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991,1997,2011 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 @@ -29,10 +29,7 @@ typedef char reg_char; #endif char * -STRNCAT (s1, s2, n) - char *s1; - const char *s2; - size_t n; +STRNCAT (char *s1, const char *s2, size_t n) { reg_char c; char *s = s1; -- cgit v1.1