VirtualBox

Changeset 63069 in vbox for trunk/include/iprt/win


Ignore:
Timestamp:
Aug 5, 2016 10:24:04 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109683
Message:

intsafe.h wrapper.h

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/win/intsafe.h

    r63057 r63069  
    11/** @file
    2  * Safe way to include windef.h.
     2 * Safe way to include intsafe.h.
    33 */
    44
     
    2525
    2626
    27 #ifndef ___iprt_win_windef_h___
    28 #define ___iprt_win_windef_h___
     27#ifndef ___iprt_win_intsafe_h___
     28#define ___iprt_win_intsafe_h___
    2929
    30 #ifdef _MSC_VER
    31 /*
    32  * Unfortunately, the windef.h file in SDK 7.1 is not clean wrt warning C4668:
    33  *  basetsd.h(114) : warning C4668: '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
    34  *  winnt.h(13017) : warning C4668: '_DBG_MEMCPY_INLINE_' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
    35  */
    36 # pragma warning(push)
    37 # pragma warning(disable:4668)
    38 # ifndef __cplusplus
    39 #  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
     30/* There's a conflict between the Visual C++ 2010 stdint.h and wDK 7.1 intsafe.h
     31   that we must to mediate here.  Current approach is to use the stuff from
     32   intsafe.h rather than the other. */
     33#ifndef _INTSAFE_H_INCLUDED_
     34# include <iprt/stdint.h>
     35# undef INT8_MIN
     36# undef INT16_MIN
     37# undef INT32_MIN
     38# undef INT8_MAX
     39# undef INT16_MAX
     40# undef INT32_MAX
     41# undef UINT8_MAX
     42# undef UINT16_MAX
     43# undef UINT32_MAX
     44# undef INT64_MIN
     45# undef INT64_MAX
     46# undef UINT64_MAX
     47
     48# ifdef _MSC_VER
     49#  pragma warning(push)
     50#  pragma warning(disable:4668) /* intsafe.h(55) : warning C4668: '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
    4051# endif
    41 #endif
    4252
    43 #include <windef.h>
     53# include <intsafe.h>
    4454
    45 #ifdef _MSC_VER
    46 # pragma warning(pop)
    47 #endif
     55# ifdef _MSC_VER
     56#  pragma warning(pop)
     57# endif
     58
     59#endif /* !_INTSAFE_H_INCLUDED_ */
    4860
    4961#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