diff options
| author | Ray <[email protected]> | 2017-04-13 11:16:10 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-04-13 11:16:10 +0200 |
| commit | 82c54449bf4f472d2b46413288c0343e31eae8dc (patch) | |
| tree | 10000e867abcd336f8a4ffb01bbaaf0414af7f25 | |
| parent | 677c5cc9a8f019d1400fdaf9cc90d02a8949e7a3 (diff) | |
| parent | 774b120335d571ebf742086296998404cd5461a3 (diff) | |
| download | raylib-82c54449bf4f472d2b46413288c0343e31eae8dc.tar.gz raylib-82c54449bf4f472d2b46413288c0343e31eae8dc.zip | |
Merge pull request #260 from RDR8/develop-c99-cflags
Added _DEFAULT_SOURCE to CFLAGS for C99 compatibility
| -rw-r--r-- | examples/Makefile | 4 | ||||
| -rw-r--r-- | src/Makefile | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/Makefile b/examples/Makefile index 205c6924..97971029 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -74,7 +74,7 @@ endif # -std=gnu99 defines C language mode (GNU C from 1999 revision) # -fgnu89-inline declaring inline functions support (GCC optimized) # -Wno-missing-braces ignore invalid warning (GCC bug 53119) -# -D_DEFAULT_SOURCE use with -std=c99 on Linux to enable timespec and drflac +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),WINDOWS) CFLAGS = -O2 -s -Wall -std=c99 @@ -87,7 +87,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 -s ASSERTIONS=1 --profiling --preload-file resources + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 --profiling # -O2 # if used, also set --memory-init-file 0 # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) #-s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing diff --git a/src/Makefile b/src/Makefile index 4259a66b..b616b583 100644 --- a/src/Makefile +++ b/src/Makefile @@ -159,7 +159,7 @@ endif # -std=gnu99 defines C language mode (GNU C from 1999 revision) # -fgnu89-inline declaring inline functions support (GCC optimized) # -Wno-missing-braces ignore invalid warning (GCC bug 53119) -# -D_DEFAULT_SOURCE use with -std=c99 on Linux to enable timespec and drflac +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),WINDOWS) CFLAGS = -O1 -Wall -std=gnu99 -fgnu89-inline -Wno-missing-braces @@ -172,7 +172,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 -s ASSERTIONS=1 --profiling --preload-file resources + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 --profiling --preload-file resources # -O2 # if used, also set --memory-init-file 0 # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing |
