From: Kurt Zeilenga Date: Thu, 25 Jul 2002 15:00:31 +0000 (+0000) Subject: More 64-bit hacking... X-Git-Tag: NO_SLAP_OP_BLOCKS~1339 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ee705326d4cbb356fce3586a62b508bc7086941f;p=openldap More 64-bit hacking... This code should be rewritten to avoid fixed sized types. --- diff --git a/libraries/liblunicode/ucdata/ucdata.c b/libraries/liblunicode/ucdata/ucdata.c index 77e32a3a3c..151e0ac105 100644 --- a/libraries/liblunicode/ucdata/ucdata.c +++ b/libraries/liblunicode/ucdata/ucdata.c @@ -45,8 +45,8 @@ **************************************************************************/ typedef struct { - ac_uint4 bom; - ac_uint4 cnt; + ac_uint2 bom; + ac_uint2 cnt; union { ac_uint4 bytes; ac_uint2 len[2]; diff --git a/libraries/liblunicode/ucdata/ucgendat.c b/libraries/liblunicode/ucdata/ucgendat.c index e403638ddf..dcb4a91a39 100644 --- a/libraries/liblunicode/ucdata/ucgendat.c +++ b/libraries/liblunicode/ucdata/ucgendat.c @@ -30,6 +30,7 @@ #include "ldap_config.h" #include +#include #include #include #include @@ -1216,7 +1217,8 @@ static void write_cdata(char *opath) { FILE *out; - unsigned long i, idx, bytes, nprops; + ac_uint4 bytes; + unsigned long i, idx, nprops; unsigned short casecnt[2]; char path[BUFSIZ]; @@ -1268,7 +1270,7 @@ write_cdata(char *opath) /* * Write the header. */ - fwrite((char *) hdr, sizeof(unsigned short), 2, out); + fwrite((char *) hdr, sizeof(ac_uint4), 2, out); /* * Write the byte count.