diff options
| author | Ray <[email protected]> | 2022-08-28 15:48:12 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-08-28 15:48:12 +0200 |
| commit | 7f5567eec0f996fd849876c74508aa63b3c2e3fc (patch) | |
| tree | 269456dbe6e6695028f9820d23ec5955c41bb7ee /src/Makefile | |
| parent | be2328f848d96a788f9f40f1ed302c64335d47df (diff) | |
| download | raylib-7f5567eec0f996fd849876c74508aa63b3c2e3fc.tar.gz raylib-7f5567eec0f996fd849876c74508aa63b3c2e3fc.zip | |
Reviewed GLFW compilation requirements on Linux: `_GNU_SOURCE`
Reasons to NOT define `_GNU_SOURCE`:
- access to lots of nonstandard GNU/Linux extension functions
- access to traditional functions which were omitted from the POSIX standard (often for good reason, such as being replaced with better alternatives, or being tied to particular legacy implementations)
- access to low-level functions that cannot be portable, but that you sometimes need for implementing system utilities like mount, ifconfig, etc.
- broken behavior for lots of POSIX-specified functions, where the GNU folks disagreed with the standards committee on how the functions should behave and decided to do their own thing.
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index a6f380b6..291508ed 100644 --- a/src/Makefile +++ b/src/Makefile @@ -307,6 +307,7 @@ endif # -Wno-missing-braces ignore invalid warning (GCC bug 53119) # -Wno-unused-value ignore unused return values of some functions (i.e. fread()) # -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec +# -D_GNU_SOURCE access to lots of nonstandard GNU/Linux extension functions # -Werror=pointer-arith catch unportable code that does direct arithmetic on void pointers # -fno-strict-aliasing jar_xm.h does shady stuff (breaks strict aliasing) CFLAGS = -Wall -D_GNU_SOURCE -D$(PLATFORM) -D$(GRAPHICS) -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing $(CUSTOM_CFLAGS) |
