aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>2008-04-26 04:11:16 +0000
committerJohn Birrell <jb@FreeBSD.org>2008-04-26 04:11:16 +0000
commit18db5bcf28ea2cbd763c1a454d328ee7a7ad1c45 (patch)
tree1b9f4219e5621f607898eeccebaf58857f17ad16 /cddl
parent76429c36b05fec2a04cc6fdcf5200c59eb6aac29 (diff)
downloadsrc-18db5bcf28ea2cbd763c1a454d328ee7a7ad1c45.tar.gz
src-18db5bcf28ea2cbd763c1a454d328ee7a7ad1c45.zip
Simplify for FreeBSD for now, bypassing the multibyte char variables
that Solaris has. We may need to revisit this issue later.
Notes
Notes: svn path=/head/; revision=178549
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/lib/libgen/common/gmatch.c13
1 files changed, 13 insertions, 0 deletions
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 <sys/types.h>
#include <libgen.h>
#include <stdlib.h>
#include <limits.h>
+#if defined(sun)
#include <widec.h>
#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); \