Changeset

1843:07d8c9184a5f

Merge with 0.5
author Matthew Wild <mwild1@gmail.com>
date Tue, 29 Sep 2009 14:22:43 +0100
parents 1839:19029b1e79a7 (current diff) 1842:8337c0d4aee4 (diff)
children 1845:e52dbae3c05d
files
diffstat 3 files changed, 24 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/Makefile	Sun Sep 27 13:20:17 2009 +0100
+++ b/util-src/Makefile	Tue Sep 29 14:22:43 2009 +0100
@@ -24,21 +24,28 @@
 encodings.o: encodings.c
 	$(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o encodings.o encodings.c
 encodings.so: encodings.o
-	export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o encodings.so encodings.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX) -lidn
+	MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
+	$(LD) $(LFLAGS) -o encodings.so encodings.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX) -lidn
 	
 
 hashes.o: hashes.c
 	$(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o hashes.o hashes.c
 hashes.so: hashes.o
-	export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o hashes.so hashes.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX) -lcrypto
+	MACOSX_DEPLOYMENT_TARGET="10.3";
+	export MACOSX_DEPLOYMENT_TARGET;
+	$(LD) $(LFLAGS) -o hashes.so hashes.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX) -lcrypto
 
 pposix.o: pposix.c
 	$(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o pposix.o pposix.c
 pposix.so: pposix.o
-	export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o pposix.so pposix.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX)
+	MACOSX_DEPLOYMENT_TARGET="10.3";
+	export MACOSX_DEPLOYMENT_TARGET;
+	$(LD) $(LFLAGS) -o pposix.so pposix.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX)
 	
 lsignal.o: lsignal.c
 	$(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o lsignal.o lsignal.c
 signal.so: lsignal.o
-	export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o signal.so lsignal.o
+	MACOSX_DEPLOYMENT_TARGET="10.3";
+	export MACOSX_DEPLOYMENT_TARGET;
+	$(LD) $(LFLAGS) -o signal.so lsignal.o
 	
--- a/util-src/lsignal.c	Sun Sep 27 13:20:17 2009 +0100
+++ b/util-src/lsignal.c	Tue Sep 29 14:22:43 2009 +0100
@@ -301,7 +301,7 @@
   return 1;
 }
 
-#ifdef _POSIX_SOURCE
+#if defined _POSIX_SOURCE || (defined(sun) || defined(__sun))
 
 /* define some posix only functions */
 
--- a/util-src/pposix.c	Sun Sep 27 13:20:17 2009 +0100
+++ b/util-src/pposix.c	Tue Sep 29 14:22:43 2009 +0100
@@ -91,10 +91,14 @@
 
 const char * const facility_strings[] = {
 					"auth",
+#if !(defined(sun) || defined(__sun))
 					"authpriv",
+#endif
 					"cron",
 					"daemon",
+#if !(defined(sun) || defined(__sun))
 					"ftp",
+#endif
 					"kern",
 					"local0",
 					"local1",
@@ -113,10 +117,14 @@
 				};
 int facility_constants[] =	{
 					LOG_AUTH,
+#if !(defined(sun) || defined(__sun))
 					LOG_AUTHPRIV,
+#endif
 					LOG_CRON,
 					LOG_DAEMON,
+#if !(defined(sun) || defined(__sun))
 					LOG_FTP,
+#endif
 					LOG_KERN,
 					LOG_LOCAL0,
 					LOG_LOCAL1,
@@ -365,11 +373,13 @@
 	if (!strcmp(s, "CPU")) return RLIMIT_CPU;
 	if (!strcmp(s, "DATA")) return RLIMIT_DATA;
 	if (!strcmp(s, "FSIZE")) return RLIMIT_FSIZE;
+	if (!strcmp(s, "NOFILE")) return RLIMIT_NOFILE;
+	if (!strcmp(s, "STACK")) return RLIMIT_STACK;
+#if !(defined(sun) || defined(__sun))
 	if (!strcmp(s, "MEMLOCK")) return RLIMIT_MEMLOCK;
-	if (!strcmp(s, "NOFILE")) return RLIMIT_NOFILE;
 	if (!strcmp(s, "NPROC")) return RLIMIT_NPROC;
 	if (!strcmp(s, "RSS")) return RLIMIT_RSS;
-	if (!strcmp(s, "STACK")) return RLIMIT_STACK;
+#endif
 	return -1;
 }