[nhc-users] Native code generation

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon Nov 22 11:46:06 EST 2004


> > nhc98 does not appear to use __ctype_b directly - I could not find
> > it any name like it anywhere in the sources
> 
> Yes, it's not used directly. But I see many references to it in object files

OK, this looks like an incompatibility between the C compiler and
glibc shipped with RedHat 9.  There is more about the issue here:

    http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86465

including some suggested fixes.  For instance, the following short C
file can be compiled and added to the Runtime.a archive, to resolve
the deprecated __ctype_b symbol to the new __ctype_b_loc version.

Regards,
    Malcolm

----
/*
 * ctype_b.c
 *
 * This file has been added to compensate for a bug in
 * version 2.3.2 of the glibc library for RH8.
 */
 
#define attribute_hidden
#define CTYPE_EXTERN_INLINE /* Define real functions for accessors.  */
#include <ctype.h>
/*
#include <locale/localeinfo.h>
 
__libc_tsd_define (, CTYPE_B)
__libc_tsd_define (, CTYPE_TOLOWER)
__libc_tsd_define (, CTYPE_TOUPPER)
 
 
#include <shlib-compat.h>
*/
 
#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
----


More information about the Nhc-users mailing list