[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#3869) Unicode datatypes @ 64-bit host
hyc@symas.com wrote:
> Sounds like we should change ldap_unicode_t ac_uint4. It doesn't appear
> that this definition affects anything besides ucstr.c.
>
Of course it's not as simple as that; ucstr.c also calls
ldap_x_utf8_to_ucs4 which uses ldap_ucs4_t. One or the other of these
types needs to go away. I think I'll replace ldap_unicode_t with
ldap_ucs4_t.
> h.b.furuseth@usit.uio.no wrote:
>
>> liblunicode/ucstr.c:ucstrncasecmp() and ucstrncmp() take ldap_unicode_t*
>> strings, but are passed ac_uint4* strings from UTF8bvnormcmp().
>>
>> include/ldap_pvt_uc.h says
>> /* UCDATA uses UCS-2 passed in an unsigned long */
>> typedef unsigned long ldap_unicode_t;
>> which is 8 bytes on a 64-bit host, but include/ac/bytes.h says
>> typedef unsigned AC_INT4_TYPE ac_uint4;
>> where AC_INT4_TYPE is a 4-byte integer type.
>>
>> Yet it passes 'make tests', which maybe means some character
>> encoding tests are needed...
>>
>> BTW, ldap_pvt_uc.h also has a declaration
>> typedef short ldap_ucs2_t;
>> Looks strange to me that this one is signed. The type is not
>> used though, so maybe it should simply be deleted.
>>
>>
>>
>>
>>
>>
>
>
>
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/