Thu Mar 9 22:29:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Fri, 10 Mar 1995 03:58:22 +0000 (03:58 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 10 Mar 1995 03:58:22 +0000 (03:58 +0000)
* elf/elf.h (STN_UNDEF): Renamed to SHN_UNDEF (typo).
(DT_NUM): New macro.

* locale/nl_langinfo.c: Include errno.h and stddef.h.  Fix typos.

* locale/lc-ctype.c (_nl_postload_ctype): Fix macro insanity.

* locale/loadlocale.c (_nl_load_locale) [! MAP_COPY]: Define
  MAP_COPY to MAP_PRIVATE.

ChangeLog
elf/elf.h
locale/lc-ctype.c
locale/nl_langinfo.c

index 6bebbdf..3b8083c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Thu Mar  9 22:29:03 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
+
+       * elf/elf.h (STN_UNDEF): Renamed to SHN_UNDEF (typo).
+       (DT_NUM): New macro.
+
+       * locale/nl_langinfo.c: Include errno.h and stddef.h.  Fix typos.
+
+       * locale/lc-ctype.c (_nl_postload_ctype): Fix macro insanity.
+
+       * locale/loadlocale.c (_nl_load_locale) [! MAP_COPY]: Define
+       MAP_COPY to MAP_PRIVATE.
+
 Thu Mar  9 17:16:53 1995  Brendan Kehoe  (brendan@zen.org)
 
        * sysdeps/alpha/divrem.m4: Undefine `ret' to avoid the definition
index 452b5c9..b5a3baf 100644 (file)
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -190,7 +190,7 @@ typedef struct
 
 /* Special symbol index.  */
 
-#define STN_UNDEF      0               /* Undefined symbol */
+#define SHN_UNDEF      0               /* Undefined symbol */
 
 /* How to extract and insert information held in the st_info field.  */
 
@@ -309,6 +309,7 @@ typedef struct
 #define DT_DEBUG       21              /* For debugging; unspecified */
 #define DT_TEXTREL     22              /* Reloc might modify .text */
 #define DT_JMPREL      23              /* Address of PLT relocs */
+#define        DT_NUM          24              /* Number used.  */
 #define DT_LOPROC      0x70000000      /* Start of processor-specific */
 #define DT_HIPROC      0x7fffffff      /* End of processor-specific */
 
index c634d12..2384d17 100644 (file)
@@ -40,10 +40,11 @@ _nl_postload_ctype (void)
 #else
 #error bizarre byte order
 #endif
-#define eval(x) x
+#define paste(a,b) paste1(a,b)
+#define paste1(a,b) a##b
 
 #define current(unsigned,x) \
-  ((const unsigned int *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_##eval(x)) \
+  ((const unsigned int *) _NL_CURRENT (LC_CTYPE, paste(_NL_CTYPE_,x)) \
    + 128)
 
   __ctype_b = current (unsigned short, CLASS);
index 4d02abf..83d35dc 100644 (file)
@@ -18,6 +18,9 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
 #include <langinfo.h>
+#include <errno.h>
+#include <stddef.h>
+#include "localeinfo.h"
 
 /* This array duplicates `_nl_current' defined in setlocale.c; but since
    the references here are not weak references, this guarantees that the
@@ -49,7 +52,7 @@ nl_langinfo (item)
       return NULL;
     }
 
-  data = nldata[category];
+  data = *nldata[category];
 
   if (index >= data->nstrings)
     {
@@ -59,5 +62,5 @@ nl_langinfo (item)
     }
 
   /* Return the string for the specified item.  */
-  return (char *) nldata->strings[index];
+  return (char *) data->strings[index];
 }