diff --git a/sourcepawn/compiler/AMBuilder b/sourcepawn/compiler/AMBuilder index 6b539b82..f7982203 100644 --- a/sourcepawn/compiler/AMBuilder +++ b/sourcepawn/compiler/AMBuilder @@ -16,7 +16,7 @@ elif compiler.cc.name == 'msvc': compiler['POSTLINKFLAGS'].append('/SUBSYSTEM:CONSOLE') if AMBuild.target['platform'] == 'linux': - compiler['CDEFINES'].extend(['LINUX', 'HAVE_STDINT_H', 'AMX_ANSIONLY', 'ENABLE_BINRELOC']) + compiler['CDEFINES'].extend(['LINUX', 'HAVE_STDINT_H', 'AMX_ANSIONLY', 'ENABLE_BINRELOC', '_GNU_SOURCE']) elif AMBuild.target['platform'] == 'darwin': compiler['CDEFINES'].extend(['DARWIN', 'HAVE_STDINT_H', 'AMX_ANSIONLY', 'ENABLE_BINRELOC']) diff --git a/sourcepawn/compiler/Makefile b/sourcepawn/compiler/Makefile index e01b817d..1d5c4f59 100644 --- a/sourcepawn/compiler/Makefile +++ b/sourcepawn/compiler/Makefile @@ -30,7 +30,7 @@ LINK = -lgcc -static-libgcc INCLUDE = -I. -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn -CFLAGS += -DLINUX -DHAVE_STDINT_H -DAMX_ANSIONLY -DENABLE_BINRELOC -Dstricmp=strcasecmp -m32 +CFLAGS += -D_GNU_SOURCE -Wall -Werror -Wno-uninitialized -Wno-unused-result -Wno-unused -Wno-switch -Wno-parentheses -Wno-format -DLINUX -DHAVE_STDINT_H -DAMX_ANSIONLY -DENABLE_BINRELOC -Dstricmp=strcasecmp -m32 CPPFLAGS += -Wno-non-virtual-dtor -fno-exceptions -fno-rtti ################################################ diff --git a/sourcepawn/compiler/sc2.c b/sourcepawn/compiler/sc2.c index c792ed4d..03293f93 100644 --- a/sourcepawn/compiler/sc2.c +++ b/sourcepawn/compiler/sc2.c @@ -59,7 +59,7 @@ static short skiplevel; /* level at which we started skipping (including nested static unsigned char term_expr[] = ""; static int listline=-1; /* "current line" for the list file */ -#if defined __GNUC__ +#if defined DARWIN static double pow10(double d) { return pow(10, d);