adjust for mach os-x support
authorkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 27 Sep 2001 22:04:24 +0000 (22:04 +0000)
committerkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 27 Sep 2001 22:04:24 +0000 (22:04 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1317 4a8a32a2-be11-0410-ad9d-d568d2c75423

configure.in
sdccconf_in.h
src/avr/gen.c
src/common.h
src/ds390/gen.c
src/mcs51/gen.c
src/pic/gen.c
src/pic/genarith.c
support/cpp2/system.h

index af1c19b5d7e714ca1faf3a64599a957b0b816af5..1f4f1bf96828f0b959047790ec2401475ec61b80 100755 (executable)
@@ -65,6 +65,7 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS(getopt.h)
 AC_CHECK_HEADERS(unistd.h)
 AC_CHECK_HEADERS(endian.h)
+AC_CHECK_HEADERS(machine/endian.h)
 AC_CHECK_HEADERS(malloc.h)
 AC_CHECK_HEADERS(sys/isa_defs.h)
 AC_CHECK_HEADERS(sys/socket.h)
index a9afbb9fd610d285933bd0b670cbe8699b9c1455..df659b1981151e80fa1a3568f4ed70c7fca3c39f 100644 (file)
@@ -25,6 +25,7 @@
 #undef HAVE_SYS_SOCKET_H
 #undef HAVE_SYS_ISA_DEFS_H
 #undef HAVE_ENDIAN_H
+#undef HAVE_MACHINE_ENDIAN_H
 
 #undef HAVE_STRERROR
 
index cd262f6eaed8ec4cfee13fccad5ad0b2a3346256..faf4c36ca613bbdfabcbfecfed91ca40400a12eb 100644 (file)
@@ -34,6 +34,9 @@
 #ifdef HAVE_SYS_ISA_DEFS_H
 #include <sys/isa_defs.h>
 #else
+#ifdef HAVE_MACHINE_ENDIAN_H
+#include <machine/endian.h>
+#else
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
@@ -43,6 +46,7 @@
 #endif
 #endif
 #endif
+#endif
 
 #include "common.h"
 #include "SDCCpeeph.h"
index 70ac2ebd6915404bae2af9cf3eb68e500bcb8b79..5694aa7750a5b1a9621242d05530b3845acde40b 100644 (file)
@@ -4,6 +4,12 @@
 #include <string.h>
 #include <assert.h>
 
+#if defined(__APPLE__) && (__MACH__)
+#ifdef _G
+#undef _G
+#endif
+#endif
+
 #include "SDCCglobl.h"
 #include "SDCCmem.h"
 #include "SDCCast.h"
index 44699fdd214adb6aabc3d7df2dee12734be6efe8..a8c10129d878a153d55eabbc543e4bac0362f317 100644 (file)
@@ -38,6 +38,9 @@
 #ifdef HAVE_SYS_ISA_DEFS_H
 #include <sys/isa_defs.h>
 #else
+#ifdef HAVE_MACHINE_ENDIAN_H
+#include <machine/endian.h>
+#else
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
@@ -47,6 +50,7 @@
 #endif
 #endif
 #endif
+#endif
 
 #define BETTER_LITERAL_SHIFT
 
index 38c60a98bc3c590a9a716fd5a01045abae92079c..3d9987a3fe5a5be24c1960a61e4c38d26f654fd9 100644 (file)
@@ -41,6 +41,9 @@
 #ifdef HAVE_SYS_ISA_DEFS_H
 #include <sys/isa_defs.h>
 #else
+#ifdef HAVE_MACHINE_ENDIAN_H
+#include <machine/endian.h>
+#else
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
@@ -50,6 +53,7 @@
 #endif
 #endif
 #endif
+#endif
 
 #include "common.h"
 #include "SDCCpeeph.h"
index d279691cae80e4c8c227e2677508589f95ec9bb0..42b0b3756937ea079081612d3e75c9726d30055e 100644 (file)
@@ -39,6 +39,9 @@
 #ifdef HAVE_SYS_ISA_DEFS_H
 #include <sys/isa_defs.h>
 #else
+#ifdef HAVE_MACHINE_ENDIAN_H
+#include <machine/endian.h>
+#else
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
@@ -48,6 +51,7 @@
 #endif
 #endif
 #endif
+#endif
 
 #include "common.h"
 #include "SDCCpeeph.h"
index 2622233e0851dd06f96b2364de4c564ae64777c7..643b179680abf7e419cc3098742ff70e07306aa4 100644 (file)
@@ -43,6 +43,9 @@
 #ifdef HAVE_SYS_ISA_DEFS_H
 #include <sys/isa_defs.h>
 #else
+#ifdef HAVE_MACHINE_ENDIAN_H
+#include <machine/endian.h>
+#else
 #ifdef HAVE_ENDIAN_H
 #include <endian.h>
 #else
@@ -52,6 +55,7 @@
 #endif
 #endif
 #endif
+#endif
 
 #include "common.h"
 #include "SDCCpeeph.h"
index 9e89c0615e4c83ea97a3195fd54271f2bbdab831..ff0473d2204914a795365b95a616e846959032ba 100644 (file)
@@ -307,9 +307,13 @@ extern void abort PARAMS ((void));
 
 /* 1 if we have C99 designated initializers.  */
 #if !defined(HAVE_DESIGNATED_INITIALIZERS)
+#if defined(__APPLE__) && (__MACH__)
+#define HAVE_DESIGNATED_INITIALIZERS 0
+#else
 #define HAVE_DESIGNATED_INITIALIZERS \
   ((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
 #endif
+#endif
 
 #if HAVE_SYS_STAT_H
 # include <sys/stat.h>