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:
parent
3f8ce99c50
commit
625338d095
|
@ -16,6 +16,7 @@
|
|||
|
||||
// clang-format off
|
||||
// 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
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
|
@ -31,6 +32,7 @@
|
|||
# include <winbase.h>
|
||||
# undef interface // This is also important because of reasons
|
||||
#else
|
||||
# define _XOPEN_SOURCE 600 // For PATH_MAX from limits.h (SUSv2 extension)
|
||||
# include <limits.h>
|
||||
#endif
|
||||
// clang-format on
|
||||
|
|
Loading…
Reference in New Issue