summaryrefslogtreecommitdiffstats
path: root/generic
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 /generic
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 'generic')
-rw-r--r--generic/tclInt.decls13
-rw-r--r--generic/tclIntDecls.h12
-rw-r--r--generic/tclIntPlatDecls.h15
-rw-r--r--generic/tclStubInit.c5
-rw-r--r--generic/tclTest.c14
-rw-r--r--generic/tclUtil.c25
6 files changed, 54 insertions, 30 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index c457741..f4f29c7 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tclInt.decls,v 1.88 2005/05/10 18:34:41 kennykb Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.89 2005/05/14 20:46:44 das Exp $
library tcl
@@ -891,6 +891,10 @@ declare 222 generic {
declare 223 generic {
int TclBN_mp_read_radix(mp_int *a, const char *str, int radix)
}
+# for use in tclTest.c
+declare 224 generic {
+ TclPlatformType *TclGetPlatform(void)
+}
##############################################################################
@@ -993,9 +997,10 @@ declare 23 win {
declare 24 win {
char *TclWinNoBackslash(char *path)
}
-declare 25 win {
- TclPlatformType *TclWinGetPlatform(void)
-}
+# replaced by generic TclGetPlatform
+#declare 25 win {
+# TclPlatformType *TclWinGetPlatform(void)
+#}
declare 26 win {
void TclWinSetInterfaces(int wide)
}
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 7364d0f..3e5827e 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIntDecls.h,v 1.79 2005/05/10 18:34:42 kennykb Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.80 2005/05/14 20:46:45 das Exp $
*/
#ifndef _TCLINTDECLS
@@ -1156,6 +1156,11 @@ EXTERN int TclBN_mp_init _ANSI_ARGS_((mp_int * a));
EXTERN int TclBN_mp_read_radix _ANSI_ARGS_((mp_int * a,
const char * str, int radix));
#endif
+#ifndef TclGetPlatform_TCL_DECLARED
+#define TclGetPlatform_TCL_DECLARED
+/* 224 */
+EXTERN TclPlatformType * TclGetPlatform _ANSI_ARGS_((void));
+#endif
typedef struct TclIntStubs {
int magic;
@@ -1400,6 +1405,7 @@ typedef struct TclIntStubs {
void (*tclBN_mp_clear) _ANSI_ARGS_((mp_int * a)); /* 221 */
int (*tclBN_mp_init) _ANSI_ARGS_((mp_int * a)); /* 222 */
int (*tclBN_mp_read_radix) _ANSI_ARGS_((mp_int * a, const char * str, int radix)); /* 223 */
+ TclPlatformType * (*tclGetPlatform) _ANSI_ARGS_((void)); /* 224 */
} TclIntStubs;
#ifdef __cplusplus
@@ -2174,6 +2180,10 @@ extern TclIntStubs *tclIntStubsPtr;
#define TclBN_mp_read_radix \
(tclIntStubsPtr->tclBN_mp_read_radix) /* 223 */
#endif
+#ifndef TclGetPlatform
+#define TclGetPlatform \
+ (tclIntStubsPtr->tclGetPlatform) /* 224 */
+#endif
#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index a3c900c..e9c1184 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.26 2004/11/03 19:13:40 davygrvy Exp $
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.27 2005/05/14 20:46:45 das Exp $
*/
#ifndef _TCLINTPLATDECLS
@@ -249,11 +249,7 @@ EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst));
/* 24 */
EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char * path));
#endif
-#ifndef TclWinGetPlatform_TCL_DECLARED
-#define TclWinGetPlatform_TCL_DECLARED
-/* 25 */
-EXTERN TclPlatformType * TclWinGetPlatform _ANSI_ARGS_((void));
-#endif
+/* Slot 25 is reserved */
#ifndef TclWinSetInterfaces_TCL_DECLARED
#define TclWinSetInterfaces_TCL_DECLARED
/* 26 */
@@ -348,7 +344,7 @@ typedef struct TclIntPlatStubs {
TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 22 */
char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 23 */
char * (*tclWinNoBackslash) _ANSI_ARGS_((char * path)); /* 24 */
- TclPlatformType * (*tclWinGetPlatform) _ANSI_ARGS_((void)); /* 25 */
+ void *reserved25;
void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide)); /* 26 */
void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */
void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */
@@ -520,10 +516,7 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr;
#define TclWinNoBackslash \
(tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */
#endif
-#ifndef TclWinGetPlatform
-#define TclWinGetPlatform \
- (tclIntPlatStubsPtr->tclWinGetPlatform) /* 25 */
-#endif
+/* Slot 25 is reserved */
#ifndef TclWinSetInterfaces
#define TclWinSetInterfaces \
(tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 8240c9c..ebe7d40 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubInit.c,v 1.116 2005/05/10 18:34:49 kennykb Exp $
+ * RCS: @(#) $Id: tclStubInit.c,v 1.117 2005/05/14 20:46:45 das Exp $
*/
#include "tclInt.h"
@@ -308,6 +308,7 @@ TclIntStubs tclIntStubs = {
TclBN_mp_clear, /* 221 */
TclBN_mp_init, /* 222 */
TclBN_mp_read_radix, /* 223 */
+ TclGetPlatform, /* 224 */
};
TclIntPlatStubs tclIntPlatStubs = {
@@ -356,7 +357,7 @@ TclIntPlatStubs tclIntPlatStubs = {
TclpCreateTempFile, /* 22 */
TclpGetTZName, /* 23 */
TclWinNoBackslash, /* 24 */
- TclWinGetPlatform, /* 25 */
+ NULL, /* 25 */
TclWinSetInterfaces, /* 26 */
TclWinFlushDirtyChannels, /* 27 */
TclWinResetInterfaces, /* 28 */
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 68b8963..22859a7 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.89 2005/05/10 18:34:50 kennykb Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.90 2005/05/14 20:46:46 das Exp $
*/
#define TCL_TEST
@@ -2457,11 +2457,7 @@ TestgetplatformCmd(clientData, interp, argc, argv)
static CONST char *platformStrings[] = { "unix", "mac", "windows" };
TclPlatformType *platform;
-#ifdef __WIN32__
- platform = TclWinGetPlatform();
-#else
- platform = &tclPlatform;
-#endif
+ platform = TclGetPlatform();
if (argc != 1) {
Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0],
@@ -3697,11 +3693,7 @@ TestsetplatformCmd(clientData, interp, argc, argv)
size_t length;
TclPlatformType *platform;
-#ifdef __WIN32__
- platform = TclWinGetPlatform();
-#else
- platform = &tclPlatform;
-#endif
+ platform = TclGetPlatform();
if (argc != 2) {
Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0],
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 278380d..2c787c2 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtil.c,v 1.59 2005/05/10 18:34:52 kennykb Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.60 2005/05/14 20:46:46 das Exp $
*/
#include "tclInt.h"
@@ -2993,3 +2993,26 @@ TclpGetTime(timePtr)
{
Tcl_GetTime(timePtr);
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclGetPlatform --
+ *
+ * This is a kludge that allows the test library to get access
+ * the internal tclPlatform variable.
+ *
+ * Results:
+ * Returns a pointer to the tclPlatform variable.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+TclPlatformType *
+TclGetPlatform()
+{
+ return &tclPlatform;
+}