summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-05-04 13:57:05 +0000
committerRoland McGrath <roland@gnu.org>1996-05-04 13:57:05 +0000
commitdb2286f6d9f8d7715a1f60437a343ffd505f8af4 (patch)
treedbaed11784a6a416b989e6bde1d0b6ce0708f391 /locale
parent8f0c527e13b836a44fedbf6abc84e1901e2cc10d (diff)
downloadglibc-db2286f6d9f8d7715a1f60437a343ffd505f8af4.tar.gz
glibc-db2286f6d9f8d7715a1f60437a343ffd505f8af4.tar.xz
glibc-db2286f6d9f8d7715a1f60437a343ffd505f8af4.zip
* locale/setlocale.c (_nl_C_name): Variable removed. cvs/libc-960506 cvs/libc-960505
	* locale/C_name.c: New file.
	(_nl_C_name): Put it here instead.
	* locale/Makefile (aux): Add C_name.

	* sysdeps/mach/hurd/dl-sysdep.c (open): Don't pass io port in
	auth_user_authenticate rpc.
	(open): Avoid using strtol in digit conversion for "fd/N" magic.
	(_dl_sysdep_start): Likewise for memobj name in magic switches.

	* elf/Makefile (reloc-link): New variable.
	(dl-allobjs.so): New target, link together $(rtld-routines).
	(librtld.so): Depend on that instead of the rtld components.
	(generated): Add dl-allobjs.so.
Diffstat (limited to 'locale')
-rw-r--r--locale/C_name.c7
-rw-r--r--locale/Makefile2
-rw-r--r--locale/setlocale.c9
3 files changed, 11 insertions, 7 deletions
diff --git a/locale/C_name.c b/locale/C_name.c
new file mode 100644
index 0000000000..5e7cb85a09
--- /dev/null
+++ b/locale/C_name.c
@@ -0,0 +1,7 @@
+/* Define a constant for the name of the standard C locale, so the string
+   constant is not repeated in dozens of object files.  */
+
+#include "localeinfo.h"
+
+/* Name of our standard locale.  */
+const char _nl_C_name[] = "C";
diff --git a/locale/Makefile b/locale/Makefile
index 6b208b71a6..d7941d689f 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -30,7 +30,7 @@ distribute	= localeinfo.h categories.def \
 		  locales.h locfile.h stringtrans.h
 routines	= setlocale findlocale loadlocale localeconv nl_langinfo
 categories	= ctype messages monetary numeric time collate
-aux		= $(categories:%=lc-%) $(categories:%=C-%) SYS_libc
+aux		= $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name
 others		= localedef locale
 install-bin	= localedef locale
 extra-objs	= $(localedef-modules:=.o) $(locale-modules:=.o) \
diff --git a/locale/setlocale.c b/locale/setlocale.c
index c0d6fcdc4e..6eb6d98d70 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -102,9 +102,6 @@ void (*const _nl_category_postload[]) (void) =
   };
 
 
-/* Name of our standard locale.  */
-const char _nl_C_name[] = "C";
-
 /* Name of current locale for each individual category.
    Each is malloc'd unless it is nl_C_name.  */
 static const char *_nl_current_names[] =
@@ -261,7 +258,7 @@ setlocale (int category, const char *locale)
   if (__argz_append (&locale_path, &locale_path_len,
 		     LOCALE_PATH, sizeof (LOCALE_PATH)) != 0)
     return NULL;
-  
+
   if (category == LC_ALL)
     {
       /* The user wants to set all categories.  The desired locales
@@ -274,7 +271,7 @@ setlocale (int category, const char *locale)
       /* Set all name pointers to the argument name.  */
       for (category = 0; category < LC_ALL; ++category)
 	newnames[category] = (char *) locale;
-      
+
       if (strchr (locale, ';') != NULL)
 	{
 	  /* This is a composite name.  Make a copy and split it up.  */
@@ -329,7 +326,7 @@ setlocale (int category, const char *locale)
 		int save_errno;
 	      abort_composite:
 		save_errno = errno;
-		
+
 		while (++category < LC_ALL)
 		  if (_nl_current[category] != NULL)
 		    _nl_free_locale (newdata[category]);