VirtualBox

Changeset 107244 in vbox for trunk/include/iprt/types.h


Ignore:
Timestamp:
Dec 6, 2024 3:09:11 PM (2 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166258
Message:

iprt/types.h: solaris/pairfait workaround attempt.

File:
1 edited

Legend:

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

    r106338 r107244  
    202202# else
    203203#  include <stddef.h>
     204#  if defined(RT_OS_SOLARIS) && defined(VBOX_WITH_PARFAIT) && defined(_KERNEL) && defined(__INT_FAST16_MAX__)
     205    /* HACK ALERT: Workaround for duplicate [u]int_fast16_t conflicting due to 'incorrect'
     206                   __INT_FAST16_TYPE__ and __UINT_FAST16_TYPE__ definitions in pairfait.
     207                   The types are usually 'int' and 'unsigned int', which the system headers
     208                   assume, thus we get a conflict when the pairfait compiler redefines to
     209                   a narrow variant.  Workaround, try ignore the system types and use the
     210                   compiler ones... */
     211#   if (__INT_FAST16_MAX__) == 32767
     212#    define int_fast16_t  hacked_int_fast16_t
     213#    define uint_fast16_t hacked_uint_fast16_t
     214#    include <sys/int_types.h>
     215#    undef  int_fast16_t
     216#    undef  uint_fast16_t
     217#   endif
     218#  endif
    204219#  include <sys/types.h>
    205220# 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