The file: /usr/include/machine/_types.h reads: typedef long __int64_t; typedef unsigned long __uint64_t; This causes types int64_t and uint64_t be of width 32 when being compiled in the 32-bit mode. Fix: These definitions: typedef long __int64_t; typedef unsigned long __uint64_t; should be replaced with something like: #if defined(__LP64__) typedef long __int64_t; typedef unsigned long __uint64_t; #else typedef long long __int64_t; typedef unsigned long long __uint64_t; #endif How-To-Repeat: $ cat x.c #include <stdio.h> #include <stdint.h> int main(void) { printf("%d\n", sizeof(uint64_t)); return 0; } $ gcc -m32 -B/usr/lib32 x.c $ ./a.out 4
State Changed From-To: open->patched amd64 and i386 _types.h merged into x86/_types.h in r232261 http://svnweb.freebsd.org/base?view=revision&revision=232261
Merged to stable/9: http://svnweb.freebsd.org/changeset/base/263505 Will be in FreeBSD 9.3