allow for APPLE MACH compilation
authorkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 14 Sep 2001 03:48:59 +0000 (03:48 +0000)
committerkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 14 Sep 2001 03:48:59 +0000 (03:48 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1268 4a8a32a2-be11-0410-ad9d-d568d2c75423

as/mcs51/lklibr.c
as/z80/aslist.c
as/z80/assym.c
debugger/mcs51/cmd.c
src/SDCCset.c
support/Util/NewAlloc.c
support/cpp2/hashtable.h
support/cpp2/system.h

index 8c8ccd2debbb60d4d4877dc65bc1e3910415359a..b4e287ef8a308d9796da06198b6b947ada480bbb 100644 (file)
  *
  */
 
+#if defined(__APPLE__) && defined(__MACH__)
+#include <sys/types.h>
+#include <sys/malloc.h>
+#else
 #include <malloc.h>
+#endif
 #include <stdio.h>
 #include <string.h>
 #include "aslink.h"
index 1f57b8903e2f21f87cff52a0bf7febb1ee10a412..e5344899bb1e25136cd79b5e87fb6ba5cfe41e65 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if defined(__APPLE__) && defined(__MACH__)
+#include <sys/types.h>
+#include <sys/malloc.h>
+#else
 #include <malloc.h>
+#endif
 
 #include "asm.h"
 
index 1ef7cc7675e9fdee89a542ec5a994e0c571c1f92..db88a08afbd0def5d614c29fe381662a1649988b 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#if defined(__APPLE__) && defined(__MACH__)
+#include <sys/types.h>
+#include <sys/malloc.h>
+#else
 #include <malloc.h>
+#endif
 #include "asm.h"
 
 /*)Module      assym.c
index 3d43bfa8f2128b346c42242df83feef7e1f0e2aa..e06045b963d80f4555f3954388a1e85138e928b9 100644 (file)
 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);
index 07ab964ae94ea65726ee37fbfeebcded4ecb1310..f56b6cf4d1644c046e94c910d716f36b2dffbd1a 100644 (file)
 -------------------------------------------------------------------------*/
 
 #include <stdio.h>
+#if defined(__APPLE__) && defined(__MACH__)
+#include <sys/malloc.h>
+#else
 #include <malloc.h>
+#endif
 #include "newalloc.h"
 #include <assert.h>
 #include "SDCCset.h"
index c603b17ce38323b3e3f9f348593d1646a8c58ddd..22aa198b5c8f3cc779f0fc1fbd9da7ab4c98a9e5 100644 (file)
@@ -28,7 +28,11 @@ functions.
 */
 
 #include <stdio.h>
+#if defined(__APPLE__) && defined(__MACH__)
+#include <sys/malloc.h>
+#else
 #include <malloc.h>
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <memory.h>
index 5b08fde25b630f7fcf8810f817bbe89ca9a29a30..b45d5912dbd03a0601b484ab8a6bdf6ad3960e5b 100644 (file)
@@ -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.  */
index 8486185ee8fd67819602b4c4441c0e8748b127ba..9e89c0615e4c83ea97a3195fd54271f2bbdab831 100644 (file)
@@ -61,7 +61,11 @@ Boston, MA 02111-1307, USA.  */
 /* There are an extraordinary number of issues with <ctype.h>.
    The last straw is that it varies with the locale.  Use libiberty's
    replacement instead.  */
+#if defined(__APPLE__) && defined(__MACH__)
+#include <libiberty/safe-ctype.h>
+#else
 #include <safe-ctype.h>
+#endif
 
 /* Define a default escape character; it's different for EBCDIC.  */
 #ifndef TARGET_ESC