1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00
Move _POSIX_C_SOURCE to internal header.
This commit is contained in:
Calvin Rose 2019-12-30 12:23:22 -05:00
parent a964a95c1e
commit 407d8af026
3 changed files with 6 additions and 2 deletions

View File

@ -37,7 +37,7 @@ MANPATH?=$(PREFIX)/share/man/man1/
PKG_CONFIG_PATH?=$(LIBDIR)/pkgconfig
DEBUGGER=gdb
CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -Isrc/conf -fPIC -O2 -fvisibility=hidden \
CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -Isrc/conf -fPIC -O2 -fvisibility=hidden -march=native \
-DJANET_BUILD=$(JANET_BUILD)
LDFLAGS=-rdynamic

View File

@ -30,6 +30,11 @@
#include <janet.h>
#endif
/* For internal usage */
#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200112L
#endif
/* Handle runtime errors */
#ifndef janet_exit
#include <stdio.h>

View File

@ -76,7 +76,6 @@ extern "C" {
|| defined(sun) || defined(__sun) /* Solaris */ \
|| defined(unix) || defined(__unix) || defined(__unix__)
#define JANET_POSIX 1
#define _POSIX_C_SOURCE 200112L
#elif defined(__EMSCRIPTEN__)
#define JANET_WEB 1
#elif defined(WIN32) || defined(_WIN32)