VirtualBox

Changeset 22457 in vbox


Ignore:
Timestamp:
Aug 26, 2009 8:49:15 AM (15 years ago)
Author:
vboxsync
Message:

iprt/types.h: Keep hacks out of the default case.

File:
1 edited

Legend:

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

    r22398 r22457  
    6767#   error "offsetof is not defined..."
    6868#  endif
     69
     70# elif defined(RT_OS_FREEBSD) && HC_ARCH_BITS == 64 && defined(RT_ARCH_X86)
     71    /*
     72     * Kludge for compiling 32-bit code on a 64-bit FreeBSD:
     73     *  FreeBSD declares uint64_t and int64_t wrong (long unsigned and long int
     74     *  though they need to be long long unsigned and long long int). These
     75     *  defines conflict with our decleration in stdint.h. Adding the defines
     76     *  below omits the definitions in the system header.
     77     */
     78#  include <stddef.h>
     79#  define _UINT64_T_DECLARED
     80#  define _INT64_T_DECLARED
     81#  include <sys/types.h>
    6982
    7083# elif defined(RT_OS_LINUX) && defined(__KERNEL__)
     
    95108# else
    96109#  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
    108110#  include <sys/types.h>
    109111# endif
     
    115117# endif
    116118
    117 #else /* no crt */
     119#else  /* no crt */
    118120# include <iprt/nocrt/compiler/compiler.h>
    119121#endif /* no crt */
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