shithub: femtolisp

Download patch

ref: 3707cc21abf5ee271f76f712c9be6609fd542e0b
parent: fe8b88cfc681d085c706f4364fd19b295ae7444b
author: Jon Distad <jon.distad@gmail.com>
date: Wed May 8 15:41:21 EDT 2013

Updated carbon path and pointer size check

--- 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 @@
 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
--- a/llt/dirpath.c
+++ b/llt/dirpath.c
@@ -113,8 +113,8 @@
     return buf;
 }
 #elif defined(MACOSX)
-#include "/Developer/Headers/FlatCarbon/Processes.h"
-#include "/Developer/Headers/FlatCarbon/Files.h"
+#include <FlatCarbon/Processes.h>
+#include <FlatCarbon/Files.h>
 char *get_exename(char *buf, size_t size)
 {
     ProcessSerialNumber PSN;
--- 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
@@ -37,6 +38,7 @@
 #  define BITS32
 #else
 #  error "this is one weird machine"
+#endif
 #endif