diff options
author | Roland McGrath <roland@gnu.org> | 1994-10-14 02:17:17 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1994-10-14 02:17:17 +0000 |
commit | c67356287c51d3c8157eaf05b74d9f35bbbbef6c (patch) | |
tree | 9f7805283cdebf681cd6c74f1a1c023c01897938 | |
parent | cd946fbe3ce76d6b797bab45d9f88bc7bb263551 (diff) | |
download | glibc-c67356287c51d3c8157eaf05b74d9f35bbbbef6c.tar.gz glibc-c67356287c51d3c8157eaf05b74d9f35bbbbef6c.tar.xz glibc-c67356287c51d3c8157eaf05b74d9f35bbbbef6c.zip |
[HAVE__LOCP]: Move this defn to first. Include sys/types.h.
-rw-r--r-- | sysdeps/unix/common/glue-ctype.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/sysdeps/unix/common/glue-ctype.c b/sysdeps/unix/common/glue-ctype.c index 73ac417ac9..d2d645b5b0 100644 --- a/sysdeps/unix/common/glue-ctype.c +++ b/sysdeps/unix/common/glue-ctype.c @@ -18,6 +18,19 @@ Cambridge, MA 02139, USA. */ /* Different systems have different names for the array. This order is important for some systems. */ + +#if !defined(TABLE) && defined(HAVE__LOCP) +/* OSF/1 has the name _ctype defined as a macro, which points down into + the _locp structure. Jesus. We'll hope this works. We need to + check for LOCP first, since there is no symbol actually named _ctype + in their library. */ +#include <sys/types.h> /* for wchar_t used by localdef.h */ +#include <sys/localedef.h> +extern loc_t *_locp; +#define TABLE (_locp->lc_chrtbl)->lc_ctype +#undef _ctype +#define TABLE_NAME _ctype +#endif #ifdef HAVE__CTYPE__ #define TABLE _ctype__ #endif @@ -33,15 +46,6 @@ Cambridge, MA 02139, USA. */ #if !defined(TABLE) && defined(HAVE___CTYPE) #define TABLE __ctype #endif -#if !defined(TABLE) && defined(HAVE__LOCP) -/* OSF/1 has the name _ctype defined as a macro, which points down into - the _locp structure. Jesus. We'll hope this works. */ -#include <sys/localedef.h> -extern loc_t *_locp; -#define TABLE (_locp->lc_chrtbl)->lc_ctype -#undef _ctype -#define TABLE_NAME _ctype -#endif #if defined (__STDC__) && __STDC__ #define STRINGIFY(arg) #arg @@ -57,7 +61,10 @@ main () int i; +#ifndef HAVE__LOCP + /* This won't work for the define to look into _locp. */ extern unsigned char TABLE[]; +#endif puts ("#include <ansidecl.h>"); #ifdef TABLE_NAME |