From: Kurt Zeilenga Date: Thu, 27 Jan 2000 05:27:36 +0000 (+0000) Subject: Move ldap_unicode_t to ldap_pvt.h, typedef to ldap_ucs2_t for now. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3237 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9dde98577dc50bc6b57d053b7f5710d89f02a715;p=openldap Move ldap_unicode_t to ldap_pvt.h, typedef to ldap_ucs2_t for now. ldap_ucs2_t is a short. The unicode routines may break if sizeof(short) != 2... --- diff --git a/include/ldap_pvt.h b/include/ldap_pvt.h index 6c03e5577f..c969243695 100644 --- a/include/ldap_pvt.h +++ b/include/ldap_pvt.h @@ -149,6 +149,7 @@ LIBLDAP_F (int) ldap_pvt_tls_start LDAP_P(( Sockbuf *sb, void *ctx_arg )); typedef ber_int_t ldap_ucs4_t; typedef short ldap_ucs2_t; +typedef ldap_ucs2_t ldap_unicode_t; /* returns the number of bytes in the UTF-8 string */ LIBLDAP_F (ber_len_t) ldap_utf8_bytes( const char * ); diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index a0b0c5e7f3..faf96a5e03 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -928,8 +928,7 @@ IA5StringConvert( struct berval *in, struct berval **out ) { - typedef ldap_ucs4_t ldap_unicode_t; /* TEMPORARY */ - int i; + ber_len_t i; struct berval *bv = ch_malloc( sizeof(struct berval) ); bv->bv_len = (in->bv_len+1) * sizeof( ldap_unicode_t ); bv->bv_val = ch_malloc( bv->bv_len ); @@ -941,6 +940,9 @@ IA5StringConvert( */ bv->bv_val[i] = in->bv_val[i]; } + + *out = bv; + return 0; } static int diff --git a/servers/slapd/tools/ldbmtest.dsp b/servers/slapd/tools/ldbmtest.dsp index f0af0a21db..d0e20d54ea 100644 --- a/servers/slapd/tools/ldbmtest.dsp +++ b/servers/slapd/tools/ldbmtest.dsp @@ -126,7 +126,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libdbs.lib hs_regexd.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease" +# ADD LINK32 libdbs.lib hs_regex.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\SRelease" !ENDIF