NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Building NetBSD under cygwin



First excuse for my bad english.

I build current NetBSD tools under cygwin (1.5.25; gcc 3.4.4) and get the
following error:

#   compile  compat/sha1.lo
cc -O  -I. -I./include -I/cygdrive/e/src/tools/compat 
-I/cygdrive/e/src/tools/compat/sys  -DHAVE_NBTOOL_CONFIG_H=1 
-D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o sha1.lo.o    
/cygdrive/e/src/tools/compat/../../common/lib/libc/hash/sha1/sha1.c
/cygdrive/e/src/tools/compat/../../common/lib/libc/hash/sha1/sha1.c: In 
function `SHA1Transform':
/cygdrive/e/src/tools/compat/../../common/lib/libc/hash/sha1/sha1.c:151: error: 
argument "state" doesn't match prototype
/cygdrive/e/src/tools/compat/../../sys/sys/sha1.h:25: error: prototype 
declaration

Obviously this happens because the function is declared in
src/sys/sys/sha1.h as:

void      SHA1Transform(uint32_t[5], const u_char[64]);

and defined in src/common/lib/libc/hash/sha/sha1.c as:

void SHA1Transform(state, buffer)
    u_int32_t state[5];
    const u_char buffer[64];

Cygwin define uint32_t and u_int32_t as long and int respectively:

typedef __uint32_t u_int32_t;           //      # 140 
"/usr/include/cygwin/types.h"
typedef unsigned long uint32_t;         //      # 18 "/usr/include/stdint.h"
typedef unsigned int __uint32_t;        //      # 58 
"/usr/include/machine/_types.h"

If brought into line declaration and definition SHA1Transform tools is built 
without
errors.
Bug?



Home | Main Index | Thread Index | Old Index