aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-03-10 03:58:22 +0000
committerRoland McGrath <roland@gnu.org>1995-03-10 03:58:22 +0000
commitd8cc5f0c6a4c3efe88076c05c4e42cf2108b3763 (patch)
tree748e9634275100169a5f7a9a87de5025332944d9 /locale
parentdf4999e1afde87987decf13b4fe4f9e8663fd920 (diff)
downloadglibc-d8cc5f0c6a4c3efe88076c05c4e42cf2108b3763.tar
glibc-d8cc5f0c6a4c3efe88076c05c4e42cf2108b3763.tar.gz
glibc-d8cc5f0c6a4c3efe88076c05c4e42cf2108b3763.tar.bz2
glibc-d8cc5f0c6a4c3efe88076c05c4e42cf2108b3763.zip
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.
Diffstat (limited to 'locale')
-rw-r--r--locale/lc-ctype.c5
-rw-r--r--locale/nl_langinfo.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/locale/lc-ctype.c b/locale/lc-ctype.c
index c634d12adb..2384d17a39 100644
--- a/locale/lc-ctype.c
+++ b/locale/lc-ctype.c
@@ -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);
diff --git a/locale/nl_langinfo.c b/locale/nl_langinfo.c
index 4d02abf49e..83d35dcb70 100644
--- a/locale/nl_langinfo.c
+++ b/locale/nl_langinfo.c
@@ -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];
}