summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
diff options
context:
space:
mode:
authordas <das>2005-05-14 20:52:30 (GMT)
committerdas <das>2005-05-14 20:52:30 (GMT)
commit65286b9f063c3c50f48935273423c3157b0c2926 (patch)
tree5bd963b54e43eebbac431fc6523841b4b3eed7a3 /unix/tclUnixInit.c
parent059da8747325b6904a2b0a2be8bc25294ef6f782 (diff)
downloadtcl-65286b9f063c3c50f48935273423c3157b0c2926.zip
tcl-65286b9f063c3c50f48935273423c3157b0c2926.tar.gz
tcl-65286b9f063c3c50f48935273423c3157b0c2926.tar.bz2
* macosx/tclMacOSXBundle.c:
* unix/tclUnixInit.c: * unix/tcl.m4 (Darwin): made use of CoreFoundation API configurable and added test of CoreFoundation availablility to allow building on ppc64, replaced HAVE_CFBUNDLE by HAVE_COREFOUNDATION; test for availability of Tiger or later OSSpinLockLock API. * unix/tclUnixNotfy.c: * unix/Makefile.in: * macosx/tclMacOSXNotify.c (new file): when CoreFoundation is available, use new CFRunLoop based notifier: allows easy integration with other event loops on Mac OS X, in particular the TkAqua Carbon event loop is now integrated via a standard tcl event source (instead of TkAqua upon loading having to finalize the exsting notifier and replace it with its custom version). [Patch 1202052] * tests/unixNotfy.test: don't run unthreaded tests on Darwin since notifier may be using threads even in unthreaded core. * unix/tclUnixPort.h: * unix/tcl.m4 (Darwin): test for thread-unsafe realpath durning configure, as Darwin 7 and later realpath is threadsafe. * macosx/tclMacOSXBundle.c: * unix/tclLoadDyld.c: * unix/tclUnixInit.c: fixed gcc 4.0 warnings. * unix/configure: autoconf-2.13
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r--unix/tclUnixInit.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 0c6fbe9..8403f6b 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,10 +7,10 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.34.2.6 2005/01/05 22:14:43 dkf Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.34.2.7 2005/05/14 20:52:33 das Exp $
*/
-#if defined(HAVE_CFBUNDLE)
+#if defined(HAVE_COREFOUNDATION)
#include <CoreFoundation/CoreFoundation.h>
#endif
#include "tclInt.h"
@@ -145,9 +145,9 @@ static CONST LocaleTable localeTable[] = {
{NULL, NULL}
};
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
static int Tcl_MacOSXGetLibraryPath(Tcl_Interp *interp, int maxPathLen, char *tclLibPath);
-#endif /* HAVE_CFBUNDLE */
+#endif /* HAVE_COREFOUNDATION */
/*
@@ -441,13 +441,13 @@ CONST char *path; /* Path to the executable in native
*/
{
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
char tclLibPath[MAXPATHLEN + 1];
if (Tcl_MacOSXGetLibraryPath(NULL, MAXPATHLEN, tclLibPath) == TCL_OK) {
str = tclLibPath;
} else
-#endif /* HAVE_CFBUNDLE */
+#endif /* HAVE_COREFOUNDATION */
{
str = defaultLibraryDir;
}
@@ -739,7 +739,7 @@ TclpSetVariables(interp)
CONST char *user;
Tcl_DString ds;
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
char tclLibPath[MAXPATHLEN + 1];
if (Tcl_MacOSXGetLibraryPath(interp, MAXPATHLEN, tclLibPath) == TCL_OK) {
@@ -771,7 +771,7 @@ TclpSetVariables(interp)
Tcl_StatBuf statBuf;
if((frameworksURL = CFBundleCopyPrivateFrameworksURL(bundleRef))) {
if(CFURLGetFileSystemRepresentation(frameworksURL, TRUE,
- tclLibPath, MAXPATHLEN) &&
+ (unsigned char*) tclLibPath, MAXPATHLEN) &&
! TclOSstat(tclLibPath, &statBuf) &&
S_ISDIR(statBuf.st_mode)) {
Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath,
@@ -783,7 +783,7 @@ TclpSetVariables(interp)
}
if((frameworksURL = CFBundleCopySharedFrameworksURL(bundleRef))) {
if(CFURLGetFileSystemRepresentation(frameworksURL, TRUE,
- tclLibPath, MAXPATHLEN) &&
+ (unsigned char*) tclLibPath, MAXPATHLEN) &&
! TclOSstat(tclLibPath, &statBuf) &&
S_ISDIR(statBuf.st_mode)) {
Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath,
@@ -797,7 +797,7 @@ TclpSetVariables(interp)
Tcl_SetVar(interp, "tcl_pkgPath", pkgPath,
TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
} else
-#endif /* HAVE_CFBUNDLE */
+#endif /* HAVE_COREFOUNDATION */
{
Tcl_SetVar(interp, "tclDefaultLibrary", defaultLibraryDir,
TCL_GLOBAL_ONLY);
@@ -1053,7 +1053,7 @@ TclpCheckStackSpace()
return 1;
}
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
/*
*----------------------------------------------------------------------
*
@@ -1080,5 +1080,5 @@ static int Tcl_MacOSXGetLibraryPath(Tcl_Interp *interp, int maxPathLen, char *tc
#endif
return foundInFramework;
}
-#endif /* HAVE_CFBUNDLE */
+#endif /* HAVE_COREFOUNDATION */