From 18db5bcf28ea2cbd763c1a454d328ee7a7ad1c45 Mon Sep 17 00:00:00 2001 From: John Birrell Date: Sat, 26 Apr 2008 04:11:16 +0000 Subject: [PATCH] Simplify for FreeBSD for now, bypassing the multibyte char variables that Solaris has. We may need to revisit this issue later. --- cddl/contrib/opensolaris/lib/libgen/common/gmatch.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c b/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c index dc47f7ec3f01..cfd66e862657 100644 --- a/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c +++ b/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c @@ -32,15 +32,28 @@ /*LINTLIBRARY*/ +#if defined(sun) #pragma weak gmatch = _gmatch +#endif +#if defined(sun) #include "gen_synonyms.h" +#endif #include #include #include #include +#if defined(sun) #include #include "_range.h" +#else +/* DOODAD */ static int multibyte = 0; +#define WCHAR_CSMASK 0x30000000 +#define valid_range(c1, c2) \ + (((c1) & WCHAR_CSMASK) == ((c2) & WCHAR_CSMASK) && \ + ((c1) > 0xff || !iscntrl((int)c1)) && ((c2) > 0xff || \ + !iscntrl((int)c2))) +#endif #define Popwchar(p, c) \ n = mbtowc(&cl, p, MB_LEN_MAX); \