From 171a457e86f686cf2adddc91baa9d9e703264259 Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Mon, 12 Sep 2016 19:16:03 -0500 Subject: [PATCH] Small fix to make compilation C99 compliant. This probably won't help on Visual Studio, unless you can tell the build system there to use a C99 compliant compiler (MS's track record in this area is abysmal). --- makefile | 2 +- rmac.h | 41 +++++++++++++++-------------------------- version.h | 2 +- 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/makefile b/makefile index 33b9cfe..cd52ffe 100644 --- a/makefile +++ b/makefile @@ -8,7 +8,7 @@ rm = /bin/rm -f CC = $(CROSS)gcc HOSTCC = gcc -CFLAGS = -g -D__GCCUNIX__ -I. -O2 +CFLAGS = -std=c99 -g -D__GCCUNIX__ -I. -O2 SRCS = amode.c debug.c direct.c eagen.c error.c expr.c listing.c mach.c macro.c mark.c object.c procln.c riscasm.c rmac.c sect.c symbol.c token.c diff --git a/rmac.h b/rmac.h index f7b39e3..337096d 100644 --- a/rmac.h +++ b/rmac.h @@ -9,10 +9,19 @@ #ifndef __RMAC_H__ #define __RMAC_H__ +#include +#include +#include +#include +#include +#include + // // TARGET SPECIFIC BUILD SETTINGS // #if defined(WIN32) || defined (WIN64) + #include + #include // Release platform - windows #define PLATFORM "Win32" #define _OPEN_FLAGS _O_TRUNC|_O_CREAT|_O_BINARY|_O_RDWR @@ -40,49 +49,29 @@ #define WARNING(desc) DO_PRAGMA(message (#desc)) #endif - #include - #include - #include - #include - #include - #include - #include - #include #else #ifdef __GCCUNIX__ + #include + #include // Release platform - mac OS-X or linux #define PLATFORM "OSX/Linux" #define _OPEN_FLAGS O_TRUNC|O_CREAT|O_RDWR #define _OPEN_INC O_RDONLY - #define _PERM_MODE S_IREAD|S_IWRITE + #define _PERM_MODE S_IRUSR|S_IWUSR // WARNING WARNING WARNING #define DO_PRAGMA(x) _Pragma (#x) #define WARNING(desc) DO_PRAGMA(message (#desc)) - #include - #include - #include - #include - #include - #include - #include - #include #else // Release platform - not specified + #include #define PLATFORM "Unknown" #define _OPEN_FLAGS O_TRUNC|O_CREAT|O_RDWR #define _OPEN_INC O_RDONLY - #define _PERM_MODE S_IREAD|S_IWRITE - // Defined here, even though the platfrom may not support it... + #define _PERM_MODE S_IREAD|S_IWRITE + // Defined here, even though the platform may not support it... #define DO_PRAGMA(x) _Pragma (#x) #define WARNING(desc) DO_PRAGMA(message (#desc)) - #include - #include - #include - #include - #include - #include - #include #endif #endif diff --git a/version.h b/version.h index b95358f..b4f423c 100644 --- a/version.h +++ b/version.h @@ -13,6 +13,6 @@ #define MAJOR 1 // Major version number #define MINOR 4 // Minor version number -#define PATCH 12 // Patch release number +#define PATCH 13 // Patch release number #endif // __VERSION_H__ -- 2.37.2