mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-24 23:16:10 +00:00
Adds XOPEN_SOURCE for PATH_MAX and POSIX 1993 for stat (#5529)
* Adds XOPEN_SOURCE for PATH_MAX and POSIX 1993 for stat These are the only two required extension for compilation of flatbuffers using -std=c++11 instead of gnu++11. * Sets _XOPEN_SOURCE to 600 and enable POSIX2001 for fseeko
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
3f8ce99c50
commit
625338d095
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
// Dont't remove `format off`, it prevent reordering of win-includes.
|
// Dont't remove `format off`, it prevent reordering of win-includes.
|
||||||
|
#define _POSIX_C_SOURCE 200112L // For stat from stat/stat.h and fseeko() (POSIX extensions).
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# ifndef WIN32_LEAN_AND_MEAN
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
@@ -31,6 +32,7 @@
|
|||||||
# include <winbase.h>
|
# include <winbase.h>
|
||||||
# undef interface // This is also important because of reasons
|
# undef interface // This is also important because of reasons
|
||||||
#else
|
#else
|
||||||
|
# define _XOPEN_SOURCE 600 // For PATH_MAX from limits.h (SUSv2 extension)
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|||||||
Reference in New Issue
Block a user