[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3869) Unicode datatypes @ 64-bit host



Sounds like we should change ldap_unicode_t ac_uint4. It doesn't appear 
that this definition affects anything besides ucstr.c.

h.b.furuseth@usit.uio.no wrote:
> Full_Name: Hallvard B Furuseth
> Version: HEAD
> OS: Linux (x86_64)
> URL: 
> Submission from: (NULL) (129.240.186.42)
> Submitted by: hallvard
>
>
> 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/