From c222226f4311c63cfa74d609bf4f5a02650427f1 Mon Sep 17 00:00:00 2001 From: Jon Distad Date: Wed, 8 May 2013 19:41:21 -0400 Subject: [PATCH] Updated carbon path and pointer size check --- Makefile.macosx | 5 +++-- llt/dirpath.c | 4 ++-- llt/dtypes.h | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile.macosx b/Makefile.macosx index 67d4aa3..502fa10 100644 --- a/Makefile.macosx +++ b/Makefile.macosx @@ -1,4 +1,5 @@ -CC = gcc +CC ?= gcc +CARBON_HEADERS ?= "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/Headers" NAME = flisp SRCS = $(NAME).c builtins.c string.c equalhash.c table.c iostream.c @@ -9,7 +10,7 @@ LIBTARGET = lib$(NAME) LLTDIR = llt LLT = $(LLTDIR)/libllt.a -CONFIG = -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 +CONFIG = -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -I$(CARBON_HEADERS) FLAGS = -falign-functions -Wall -Wno-strict-aliasing -I$(LLTDIR) $(CFLAGS) -DUSE_COMPUTED_GOTO $(CONFIG) LIBFILES = $(LLT) LIBS = $(LIBFILES) -lm -framework ApplicationServices diff --git a/llt/dirpath.c b/llt/dirpath.c index f448ac0..ca86b27 100644 --- a/llt/dirpath.c +++ b/llt/dirpath.c @@ -113,8 +113,8 @@ char *get_exename(char *buf, size_t size) return buf; } #elif defined(MACOSX) -#include "/Developer/Headers/FlatCarbon/Processes.h" -#include "/Developer/Headers/FlatCarbon/Files.h" +#include +#include char *get_exename(char *buf, size_t size) { ProcessSerialNumber PSN; diff --git a/llt/dtypes.h b/llt/dtypes.h index b0784cd..9a5995c 100644 --- a/llt/dtypes.h +++ b/llt/dtypes.h @@ -28,6 +28,7 @@ #endif +#if !defined (BITS32) && !defined (BITS64) #ifndef __SIZEOF_POINTER__ # error "__SIZEOF_POINTER__ undefined" #endif @@ -38,6 +39,7 @@ #else # error "this is one weird machine" #endif +#endif #if defined(WIN32)