aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-11-08 20:14:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-11-08 20:14:57 +0000
commitcda57fa035ef88e6d41f7d43887e1d5a2667cdc6 (patch)
tree23fa0d31fa97583e1b7a49d86e109fe36622b9c8
parentd3268ee2ef933b1bf4c5e369e1471e93f9fb9305 (diff)
downloadpostgresql-cda57fa035ef88e6d41f7d43887e1d5a2667cdc6.tar.gz
postgresql-cda57fa035ef88e6d41f7d43887e1d5a2667cdc6.zip
Don't need hack copy of system() anymore in OS X 10.3.
-rw-r--r--src/backend/port/darwin/README5
-rw-r--r--src/backend/port/darwin/system.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/port/darwin/README b/src/backend/port/darwin/README
index 1c160654a41..0f0a9166ab1 100644
--- a/src/backend/port/darwin/README
+++ b/src/backend/port/darwin/README
@@ -24,3 +24,8 @@ port/SUBSYS.o definition of _system in section (__TEXT,__text)
/usr/lib/libm.dylib(system.o) unused definition of _system
These are due to overriding system() per the above-described hack.
+
+
+The bug appears to be repaired in OS X 10.2.6 and later (possibly in
+earlier 10.2.* as well, but no systems handy to check). We #ifdef out
+the substitute system() definition on 10.3 and later.
diff --git a/src/backend/port/darwin/system.c b/src/backend/port/darwin/system.c
index a0c0801f2ab..50fa32a2656 100644
--- a/src/backend/port/darwin/system.c
+++ b/src/backend/port/darwin/system.c
@@ -1,3 +1,7 @@
+/* only needed in OS X 10.1 and possibly early 10.2 releases */
+#include <AvailabilityMacros.h>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 || !defined(MAC_OS_X_VERSION_10_2)
+
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -97,3 +101,5 @@ system(const char *command)
(void) sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
return (pid == -1 ? -1 : pstat);
}
+
+#endif /* OS X < 10.3 */