From bdfd6db4ee4c9b639d084d6004591f318007a22f Mon Sep 17 00:00:00 2001 From: kbongers Date: Fri, 14 Sep 2001 03:48:59 +0000 Subject: [PATCH] allow for APPLE MACH compilation git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1268 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- as/mcs51/lklibr.c | 5 +++++ as/z80/aslist.c | 5 +++++ as/z80/assym.c | 5 +++++ debugger/mcs51/cmd.c | 5 +++++ src/SDCCset.c | 4 ++++ support/Util/NewAlloc.c | 4 ++++ support/cpp2/hashtable.h | 4 ++++ support/cpp2/system.h | 4 ++++ 8 files changed, 36 insertions(+) diff --git a/as/mcs51/lklibr.c b/as/mcs51/lklibr.c index 8c8ccd2d..b4e287ef 100644 --- a/as/mcs51/lklibr.c +++ b/as/mcs51/lklibr.c @@ -15,7 +15,12 @@ * */ +#if defined(__APPLE__) && defined(__MACH__) +#include +#include +#else #include +#endif #include #include #include "aslink.h" diff --git a/as/z80/aslist.c b/as/z80/aslist.c index 1f57b890..e5344899 100644 --- a/as/z80/aslist.c +++ b/as/z80/aslist.c @@ -16,7 +16,12 @@ #include #include #include +#if defined(__APPLE__) && defined(__MACH__) +#include +#include +#else #include +#endif #include "asm.h" diff --git a/as/z80/assym.c b/as/z80/assym.c index 1ef7cc76..db88a08a 100644 --- a/as/z80/assym.c +++ b/as/z80/assym.c @@ -12,7 +12,12 @@ #include #include #include +#if defined(__APPLE__) && defined(__MACH__) +#include +#include +#else #include +#endif #include "asm.h" /*)Module assym.c diff --git a/debugger/mcs51/cmd.c b/debugger/mcs51/cmd.c index 3d43bfa8..e06045b9 100644 --- a/debugger/mcs51/cmd.c +++ b/debugger/mcs51/cmd.c @@ -31,6 +31,10 @@ int listLines = 10; EXTERN_STACK_DCL(callStack,function *,1024); +#if defined(__APPLE__) && defined(__MACH__) +static char *copying= +{" GNU GENERAL PUBLIC LICENSE Version 2"}; +#else static char *copying= " GNU GENERAL PUBLIC LICENSE Version 2, June 1991 @@ -312,6 +316,7 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. "; +#endif static void printTypeInfo(link *); static void printValAggregates (symbol *,link *,char,unsigned int); diff --git a/src/SDCCset.c b/src/SDCCset.c index 07ab964a..f56b6cf4 100644 --- a/src/SDCCset.c +++ b/src/SDCCset.c @@ -23,7 +23,11 @@ -------------------------------------------------------------------------*/ #include +#if defined(__APPLE__) && defined(__MACH__) +#include +#else #include +#endif #include "newalloc.h" #include #include "SDCCset.h" diff --git a/support/Util/NewAlloc.c b/support/Util/NewAlloc.c index c603b17c..22aa198b 100644 --- a/support/Util/NewAlloc.c +++ b/support/Util/NewAlloc.c @@ -28,7 +28,11 @@ functions. */ #include +#if defined(__APPLE__) && defined(__MACH__) +#include +#else #include +#endif #include #include #include diff --git a/support/cpp2/hashtable.h b/support/cpp2/hashtable.h index 5b08fde2..b45d5912 100644 --- a/support/cpp2/hashtable.h +++ b/support/cpp2/hashtable.h @@ -18,7 +18,11 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef GCC_HASHTABLE_H #define GCC_HASHTABLE_H +#if defined(__APPLE__) && defined(__MACH__) +#include "libiberty/obstack.h" +#else #include "obstack.h" +#endif /* This is what each hash table entry points to. It may be embedded deeply within another object. */ diff --git a/support/cpp2/system.h b/support/cpp2/system.h index 8486185e..9e89c061 100644 --- a/support/cpp2/system.h +++ b/support/cpp2/system.h @@ -61,7 +61,11 @@ Boston, MA 02111-1307, USA. */ /* There are an extraordinary number of issues with . The last straw is that it varies with the locale. Use libiberty's replacement instead. */ +#if defined(__APPLE__) && defined(__MACH__) +#include +#else #include +#endif /* Define a default escape character; it's different for EBCDIC. */ #ifndef TARGET_ESC -- 2.47.2