From: Oliver Kurth Date: Tue, 6 Mar 2018 18:38:42 +0000 (-0800) Subject: vm_basic_types.h: enable stdint.h for c99 X-Git-Tag: stable-10.3.0~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24e9d211752210abb94bd1e76bec8be20d8abef8;p=thirdparty%2Fopen-vm-tools.git vm_basic_types.h: enable stdint.h for c99 C99 mode (a.k.a. __STDC_VERSION__ >= 199901L) guarantees the stdint.h header will be present, which means we can use it for standard types instead of rolling our own. --- diff --git a/open-vm-tools/lib/include/vm_basic_types.h b/open-vm-tools/lib/include/vm_basic_types.h index 6ed62f547..32e2a09d2 100644 --- a/open-vm-tools/lib/include/vm_basic_types.h +++ b/open-vm-tools/lib/include/vm_basic_types.h @@ -160,18 +160,11 @@ #endif #if defined(__cplusplus) && __cplusplus >= 201103L || \ + defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L || \ defined(__APPLE__) || defined(HAVE_STDINT_H) /* - * TODO: C99 a.k.a. defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - * really should be in the above conditional. However, a non-trivial amount - * of code tries to compile in C99 mode with broken stdint.h headers, so - * C99 will need to use the fallback for now. - */ - -/* - * We're using stdint.h instead of cstdint below because of libstdcpp.cpp. - * It looks like a C++ file. When being preprocessed all the C++ specific - * defines(e.g. __cplusplus) are set, but the C++ include paths are not. + * We're using instead of below because some C++ code + * deliberately compiles without C++ include paths. */ #include