From: Mark Valence Date: Mon, 19 Feb 2001 19:09:54 +0000 (+0000) Subject: Bug fix and Windows compat change. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1504 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f9a76ce1ab269d7bc31943a7301968e5580c618f;p=openldap Bug fix and Windows compat change. --- diff --git a/libraries/liblunicode/ucdata/ucdata.c b/libraries/liblunicode/ucdata/ucdata.c index 5e34a31cf1..01a94a0294 100644 --- a/libraries/liblunicode/ucdata/ucdata.c +++ b/libraries/liblunicode/ucdata/ucdata.c @@ -36,6 +36,12 @@ #include "ucdata.h" +#ifdef WIN32 +#define UC_DIRSEP '\\' +#else +#define UC_DIRSEP '/' +#endif + /************************************************************************** * * Miscellaneous types, data, and support functions. @@ -83,7 +89,7 @@ _ucopenfile(char *paths, char *filename, char *mode) pp = path; while (*dp && *dp != ':') *pp++ = *dp++; - *pp++ = '/'; + *pp++ = UC_DIRSEP; fp = filename; while (*fp) @@ -223,6 +229,9 @@ _ucprop_lookup(unsigned long code, unsigned long n) { long l, r, m; + if (_ucprop_size == 0) + return 0; + /* * There is an extra node on the end of the offsets to allow this routine * to work right. If the index is 0xffff, then there are no nodes for the