VirtualBox

Changeset 69085 in vbox


Ignore:
Timestamp:
Oct 13, 2017 5:01:46 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118373
Message:

Additions/x11/vboxvideo: always pull in stdint.h, even on XFree86.
bugref:9017: Additions/x11: put vboxvideo into upstream X.Org

Because XFree86 tried to provide its own versions of everything, including
part of the standard C library, including standard headers when building
XFree86 libraries tends to cause problems, and I was trying to recreate
part of stdint.h in the IPRT replacement header file. Reading the XFree86
header files and testing seem to indicate though that including stdint.h is
doable. So this change removes the stdint.h replacement code, which was
causing build problems on Debian 9.0, and includes stdint.h unconditionally.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/VBoxVideoIPRT.h

    r69079 r69085  
    5353#endif  /* defined(IN_XF86_MODULE) && !defined(NO_ANSIC) */
    5454#define __STDC_LIMIT_MACROS  /* define *INT*_MAX on C++ too. */
    55 #include "compiler.h"  /* Pulls in <sdtint.h>.  Must come after xf86_ansic.h on XFree86. */
     55#include "compiler.h"  /* Can pull in <sdtint.h>.  Must come after xf86_ansic.h on XFree86. */
    5656#include <X11/Xfuncproto.h>
     57#include <stdint.h>
    5758#if defined(IN_XF86_MODULE) && !defined(NO_ANSIC)
    5859/* XFree86 did not have these.  Not that I care much for micro-optimisations
     
    6364#  define offsetof(type, member) ( (int)(uintptr_t)&( ((type *)(void *)0)->member) )
    6465# endif
    65 # if !defined(_INT8_T_DECLARED)   && !defined(_INT8_T)   && !defined(__INT8_TYPE__)   && !defined(INT8_MAX)
    66 typedef signed char int8_t;
    67 # endif
    68 # if !defined(_UINT8_T_DECLARED)   && !defined(_UINT8_T)   && !defined(__UINT8_TYPE__)   && !defined(UINT8_MAX)
    69 typedef unsigned char uint8_t;
    70 # endif
    71 # if !defined(_INT16_T_DECLARED)   && !defined(_INT16_T)   && !defined(__INT16_TYPE__)   && !defined(INT16_MAX)
    72 typedef signed short int16_t;
    73 # endif
    74 # if !defined(_UINT16_T_DECLARED)   && !defined(_UINT16_T)   && !defined(__UINT16_TYPE__)   && !defined(UINT16_MAX)
    75 typedef unsigned short uint16_t;
    76 # endif
    77 # if !defined(_INT32_T_DECLARED)   && !defined(_INT32_T)   && !defined(__INT32_TYPE__)   && !defined(INT32_MAX)
    78 typedef signed int int32_t;
    79 # endif
    80 # if !defined(_UINT32_T_DECLARED)   && !defined(_UINT32_T)   && !defined(__UINT32_TYPE__)   && !defined(UINT32_MAX)
    81 typedef unsigned int uint32_t;
    82 # endif
    83 # if !defined(_INT64_T_DECLARED)   && !defined(_INT64_T)   && !defined(__INT64_TYPE__)   && !defined(INT64_MAX)
    84 typedef signed long long int64_t;
    85 # endif
    86 # if !defined(_UINT64_T_DECLARED)   && !defined(_UINT64_T)   && !defined(__UINT64_TYPE__)   && !defined(UINT64_MAX)
    87 typedef unsigned long long uint64_t;
    88 # endif
    89 # ifndef _XSERVER64
    90 #  if !defined(_INTPTR_T_DECLARED)  && !defined(_INTPTR_T)  && !defined(__INTPTR_TYPE__)   && !defined(INTPTR_MAX)
    91 typedef signed long         intptr_t;
    92 #  endif
    93 #  if !defined(_UINTPTR_T_DECLARED)  && !defined(_UINTPTR_T)  && !defined(__UINTPTR_TYPE__)   && !defined(UINTPTR_MAX)
    94 typedef unsigned long       uintptr_t;
    95 #  endif
    96 # else
    97 #  if !defined(_INTPTR_T_DECLARED)  && !defined(_INTPTR_T)  && !defined(__INTPTR_TYPE__)   && !defined(INTPTR_MAX)
    98 typedef int64_t             intptr_t;
    99 #  endif
    100 #  if !defined(_UINTPTR_T_DECLARED)  && !defined(_UINTPTR_T)  && !defined(__UINTPTR_TYPE__)   && !defined(UINTPTR_MAX)
    101 typedef uint64_t            uintptr_t;
    102 #  endif
    103 # endif
    10466#else  /* !(defined(IN_XF86_MODULE) && !defined(NO_ANSIC)) */
    10567# include <stdarg.h>
    10668# include <stddef.h>
    107 # include <stdint.h>
    10869# include <string.h>
    10970#endif  /* !(defined(IN_XF86_MODULE) && !defined(NO_ANSIC)) */
     
    171132#ifndef UINT32_C
    172133# define UINT32_C(Value) (Value ## U)
    173 #endif
    174 #ifndef INT16_MAX
    175 # define INT16_MAX INT16_C(0x7fff)
    176 #endif
    177 #ifndef UINT16_MAX
    178 # define UINT16_MAX UINT16_C(0xffff)
    179 #endif
    180 #ifndef INT32_MAX
    181 # define INT32_MAX INT32_C(0x7fffffff)
    182 #endif
    183 #ifndef UINT32_MAX
    184 # define UINT32_MAX UINT32_C(0xffffffff)
    185134#endif
    186135
Note: See TracChangeset for help on using the changeset viewer.

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