VirtualBox

Changeset 22398 in vbox


Ignore:
Timestamp:
Aug 23, 2009 8:36:47 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: Fix compiling on FreeBSD amd64. When compiling code for 32bit our declerations for uint64_t and int64_t clash with the ones from FreeBSD. The ones from FreeBSD are actually wrong (guess they don't expect to compile 32bit software on 64bit) because they define uint64_t as 'unsigned long' whereas it needs to be 'unsigned long long' on 32bit. Before including sys/types.h we define them as declared to omit decleration in the system headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/types.h

    r21513 r22398  
    9595# else
    9696#  include <stddef.h>
     97#   if defined(RT_OS_FREEBSD) && (HC_ARCH_BITS == 64) && defined(RT_ARCH_X86)
     98     /* Compiling on a 64bit machine in 32bit mode. FreeBSD declares
     99      * uint64_t and int64_t wrong (long unsigned and long int
     100      * though they need to be long long unsigned and long long int)
     101      *
     102      * These defines conflict with our decleration in stdint.h.
     103      * Adding the defines below omits the definitions in the system header.
     104      */
     105#    define _UINT64_T_DECLARED
     106#    define _INT64_T_DECLARED
     107#   endif
    97108#  include <sys/types.h>
    98109# endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette