summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
diff options
context:
space:
mode:
authordas <das>2005-05-14 20:46:43 (GMT)
committerdas <das>2005-05-14 20:46:43 (GMT)
commit682791cc06ff9a97bb834ec6e43bbef12687d80a (patch)
tree8485c76ab6a0159bc2f9c1907dc085c2fc922e72 /unix/tclUnixInit.c
parenta06d3d0df0e5b9d324676885c38f8b44c09dfa6a (diff)
downloadtcl-682791cc06ff9a97bb834ec6e43bbef12687d80a.zip
tcl-682791cc06ff9a97bb834ec6e43bbef12687d80a.tar.gz
tcl-682791cc06ff9a97bb834ec6e43bbef12687d80a.tar.bz2
* generic/tclInt.decls:
* generic/tclTest.c: * generic/tclUtil.c: * win/tclWin32Dll.c: fixed link error due to direct access by tclTest.c to the MODULE_SCOPE tclPlatform global: renamed existing TclWinGetPlatform() accessor to TclGetPlatform() and moved it to generic code so that it can be used by on all platforms where MODULE_SCOPE is enforced. * 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/Makefile: enable configure caching. * unix/configure.in: wrap tclConfig.h header in #ifndef _TCLCONFIG so that it can be included more than once without warnings from gcc4.0 (as happens e.g. when including both tclInt.h and tclPort.h) * macosx/tclMacOSXBundle.c: * unix/tclUnixChan.c: * unix/tclLoadDyld.c: * unix/tclUnixInit.c: fixed gcc 4.0 warnings. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59 * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: make genstubs
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 1cd06a4..ec708f2 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.56 2005/05/10 18:35:27 kennykb Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.57 2005/05/14 20:46:48 das Exp $
*/
#include "tclInt.h"
@@ -26,7 +26,7 @@
# include <dlfcn.h>
# endif
#endif
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
#include <CoreFoundation/CoreFoundation.h>
#endif
@@ -328,11 +328,11 @@ static CONST LocaleTable localeTable[] = {
#ifndef TCL_NO_STACK_CHECK
static int GetStackSize _ANSI_ARGS_((size_t *stackSizePtr));
#endif /* TCL_NO_STACK_CHECK */
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
static int MacOSXGetLibraryPath _ANSI_ARGS_((
Tcl_Interp *interp, int maxPathLen,
char *tclLibPath));
-#endif /* HAVE_CFBUNDLE */
+#endif /* HAVE_COREFOUNDATION */
/*
@@ -511,13 +511,13 @@ TclpInitLibraryPath(valuePtr, lengthPtr, encodingPtr)
*/
{
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
char tclLibPath[MAXPATHLEN + 1];
if (MacOSXGetLibraryPath(NULL, MAXPATHLEN, tclLibPath) == TCL_OK) {
str = tclLibPath;
} else
-#endif /* HAVE_CFBUNDLE */
+#endif /* HAVE_COREFOUNDATION */
{
/* TODO: Pull this value from the TIP 59 table */
str = defaultLibraryDir;
@@ -724,7 +724,7 @@ TclpSetVariables(interp)
CONST char *user;
Tcl_DString ds;
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
char tclLibPath[MAXPATHLEN + 1];
if (MacOSXGetLibraryPath(interp, MAXPATHLEN, tclLibPath) == TCL_OK) {
@@ -756,7 +756,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,
@@ -768,7 +768,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,
@@ -782,7 +782,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, "tcl_pkgPath", pkgPath, TCL_GLOBAL_ONLY);
}
@@ -1131,7 +1131,7 @@ GetStackSize(stackSizePtr)
*----------------------------------------------------------------------
*/
-#ifdef HAVE_CFBUNDLE
+#ifdef HAVE_COREFOUNDATION
static int
MacOSXGetLibraryPath(Tcl_Interp *interp, int maxPathLen, char *tclLibPath)
{
@@ -1142,4 +1142,4 @@ MacOSXGetLibraryPath(Tcl_Interp *interp, int maxPathLen, char *tclLibPath)
#endif
return foundInFramework;
}
-#endif /* HAVE_CFBUNDLE */
+#endif /* HAVE_COREFOUNDATION */