summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPort.h
diff options
context:
space:
mode:
authordas <das>2006-08-18 07:45:41 (GMT)
committerdas <das>2006-08-18 07:45:41 (GMT)
commit14bd76d3ec59b713ec76126253b3ed6c91ffc64a (patch)
treeed001b456f65d2bf75246db8dc3876f3cd7d2722 /unix/tclUnixPort.h
parent23337a910dff06fe7f10369619b17a42760935cf (diff)
downloadtcl-14bd76d3ec59b713ec76126253b3ed6c91ffc64a.zip
tcl-14bd76d3ec59b713ec76126253b3ed6c91ffc64a.tar.gz
tcl-14bd76d3ec59b713ec76126253b3ed6c91ffc64a.tar.bz2
* unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for
universal builds including x86_64, for 64-bit CoreFoundation on Leopard and for use of -mmacosx-version-min instead of MACOSX_DEPLOYMENT_TARGET. * unix/configure: autoconf-2.13 * generic/tcl.h: add fixes for building on Leopard and support for * unix/tclUnixPort.h: 64-bit CoreFoundation on Leopard. * unix/tclUnixPort.h: on Darwin x86_64, disable use of vfork as it causes execve to fail intermittently. (rdar://4685553) * macosx/README: updates for x86_64 support and Xcode 2.3.
Diffstat (limited to 'unix/tclUnixPort.h')
-rw-r--r--unix/tclUnixPort.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 023cad4..a747c40 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.12 2006/07/20 06:21:46 das Exp $
+ * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.13 2006/08/18 07:45:43 das Exp $
*/
#ifndef _TCLUNIXPORT
@@ -512,9 +512,9 @@ extern double strtod();
/*
* Support for fat compiles: configure runs only once for multiple architectures
*/
-# ifdef __LP64__
+# if defined(__LP64__) && defined (NO_COREFOUNDATION_64)
# undef HAVE_COREFOUNDATION
-# endif /* __LP64__ */
+# endif /* __LP64__ && NO_COREFOUNDATION_64 */
# include <sys/cdefs.h>
# ifdef __DARWIN_UNIX03
# if __DARWIN_UNIX03
@@ -550,6 +550,9 @@ extern double strtod();
* only use API available in the indicated OS version or earlier.
*/
# ifdef MAC_OS_X_VERSION_MAX_ALLOWED
+# if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 && defined(__LP64__)
+# undef HAVE_COREFOUNDATION
+# endif
# if MAC_OS_X_VERSION_MAX_ALLOWED < 1040
# undef HAVE_OSSPINLOCKLOCK
# undef HAVE_PTHREAD_ATFORK
@@ -563,6 +566,17 @@ extern double strtod();
# undef HAVE_LANGINFO
# endif
# endif /* MAC_OS_X_VERSION_MAX_ALLOWED */
+# if defined(HAVE_COREFOUNDATION) && defined(__LP64__) && \
+ defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1050
+# warning "Weak import of 64-bit CoreFoundation is not supported, will not run on Mac OS X < 10.5."
+# endif
+/*
+ * At present, using vfork() instead of fork() causes execve() to fail
+ * intermittently on Darwin x86_64. rdar://4685553
+ */
+# if defined(__x86_64__) && !defined(FIXED_RDAR_4685553)
+# undef USE_VFORK
+# endif /* __x86_64__ */
#endif /* __APPLE__ */
/*
@@ -572,18 +586,24 @@ extern double strtod();
#ifdef HAVE_COPYFILE
#ifdef HAVE_COPYFILE_H
#include <copyfile.h>
-#else
+#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040
+/* Support for weakly importing copyfile. */
+#define WEAK_IMPORT_COPYFILE
+extern int copyfile(const char *from, const char *to, copyfile_state_t state,
+ copyfile_flags_t flags) WEAK_IMPORT_ATTRIBUTE;
+#endif /* HAVE_WEAK_IMPORT */
+#else /* HAVE_COPYFILE_H */
int copyfile(const char *from, const char *to, void *state, uint32_t flags);
#define COPYFILE_ACL (1<<0)
#define COPYFILE_XATTR (1<<2)
#define COPYFILE_NOFOLLOW_SRC (1<<18)
-#endif /* HAVE_COPYFILE_H */
#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040
/* Support for weakly importing copyfile. */
#define WEAK_IMPORT_COPYFILE
extern int copyfile(const char *from, const char *to, void *state,
uint32_t flags) WEAK_IMPORT_ATTRIBUTE;
#endif /* HAVE_WEAK_IMPORT */
+#endif /* HAVE_COPYFILE_H */
#endif /* HAVE_COPYFILE */
/*