#include <stdio.h>
#include <string.h>
#include <wchar.h>
+#include <wctype.h>
static int
CLASSTEST (upper);
CLASSTEST (xdigit);
+ /* Character mapping tests. */
#define MAPTEST(name) \
if (to##name (c) != __to##name##_l (c, loc)) \
{ \
MAPTEST (upper);
}
+ /* Character class tests, this time for wide characters. Note that
+ this only works because we know that the internal encoding is
+ UCS4. */
+ for (c = 0; c < 128; ++c)
+ {
+#define CLASSTEST(name) \
+ if (isw##name (c) != __isw##name##_l (c, loc)) \
+ { \
+ printf ("isw%s('\\%o') != __isw%s_l('\\%o')\n", \
+ #name, c, #name, c); \
+ result = 1; \
+ }
+ CLASSTEST (alnum);
+ CLASSTEST (alpha);
+ CLASSTEST (blank);
+ CLASSTEST (cntrl);
+ CLASSTEST (digit);
+ CLASSTEST (lower);
+ CLASSTEST (graph);
+ CLASSTEST (print);
+ CLASSTEST (punct);
+ CLASSTEST (space);
+ CLASSTEST (upper);
+ CLASSTEST (xdigit);
+
+ /* Character mapping tests. Note that
+ this only works because we know that the internal encoding is
+ UCS4. */
+#define MAPTEST(name) \
+ if (tow##name (c) != __tow##name##_l (c, loc)) \
+ { \
+ printf ("tow%s('\\%o') != __tow%s_l('\\%o'): '\\%o' vs '\\%o'\n",\
+ #name, c, #name, c, \
+ tow##name (c), __tow##name##_l (c, loc)); \
+ result = 1; \
+ }
+ MAPTEST (lower);
+ MAPTEST (upper);
+ }
+
__freelocale (loc);
}
cmd->Scflag = flag['C'];
cmd->makefileflag = flag['M'];
+#ifndef _RPC_THREAD_SAFE_
if (mtflag || newstyle)
{
/* glibc doesn't support these flags. */
_("This implementation doesn't support newstyle or MT-safe code!\n"));
return (0);
}
+#endif
if (tirpcflag)
{
pmflag = inetdflag ? 0 : 1; /* pmflag or inetdflag is always TRUE */