summaryrefslogtreecommitdiffstats
path: root/generic/tclStubInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclStubInit.c')
-rw-r--r--generic/tclStubInit.c88
1 files changed, 86 insertions, 2 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index d8a300c..b4e23a9 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -63,6 +63,61 @@ MODULE_SCOPE TclPlatStubs tclPlatStubs;
MODULE_SCOPE TclStubs tclStubs;
MODULE_SCOPE TclTomMathStubs tclTomMathStubs;
+#ifdef __CYGWIN__
+
+#define TclWinGetPlatformId winGetPlatformId
+#define Tcl_WinUtfToTChar winUtfToTChar
+#define Tcl_WinTCharToUtf winTCharToUtf
+
+static Tcl_Encoding winTCharEncoding;
+
+static int
+TclWinGetPlatformId()
+{
+ /* Don't bother to determine the real platform on cygwin,
+ * because VER_PLATFORM_WIN32_NT is the only supported platform */
+ return 2; /* VER_PLATFORM_WIN32_NT */;
+}
+
+static char *
+Tcl_WinUtfToTChar(string, len, dsPtr)
+ CONST char *string;
+ int len;
+ Tcl_DString *dsPtr;
+{
+ if (!winTCharEncoding) {
+ winTCharEncoding = Tcl_GetEncoding(NULL, "unicode");
+ }
+ return Tcl_UtfToExternalDString(winTCharEncoding,
+ string, len, dsPtr);
+}
+
+static char *
+Tcl_WinTCharToUtf(string, len, dsPtr)
+ CONST char *string;
+ int len;
+ Tcl_DString *dsPtr;
+{
+ if (!winTCharEncoding) {
+ winTCharEncoding = Tcl_GetEncoding(NULL, "unicode");
+ }
+ return Tcl_ExternalToUtfDString(winTCharEncoding,
+ string, len, dsPtr);
+}
+
+#define Tcl_MacOSXOpenBundleResources (int (*) _ANSI_ARGS_(( \
+ Tcl_Interp *, CONST char *, int, int, char *))) Tcl_WinUtfToTChar
+#define Tcl_MacOSXOpenVersionedBundleResources (int (*) _ANSI_ARGS_(( \
+ Tcl_Interp *, CONST char *, CONST char *, int, int, char *))) Tcl_WinTCharToUtf
+
+#elif !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
+# define TclWinGetPlatformId (int (*)()) TclpCreateTempFile
+# ifndef MAC_OSX_TCL
+# define Tcl_MacOSXOpenBundleResources 0
+# define Tcl_MacOSXOpenVersionedBundleResources 0
+# endif
+#endif
+
/*
* WARNING: The contents of this file is automatically generated by the
* tools/genStubs.tcl script. Any modifications to the function declarations
@@ -339,12 +394,27 @@ TclIntPlatStubs tclIntPlatStubs = {
TclpMakeFile, /* 6 */
TclpOpenFile, /* 7 */
TclUnixWaitForFile, /* 8 */
- TclpCreateTempFile, /* 9 */
+ TclWinGetPlatformId, /* 9 */
TclpReaddir, /* 10 */
TclpLocaltime_unix, /* 11 */
TclpGmtime_unix, /* 12 */
TclpInetNtoa, /* 13 */
TclUnixCopyFile, /* 14 */
+ NULL, /* 15 */
+ NULL, /* 16 */
+ NULL, /* 17 */
+ NULL, /* 18 */
+ NULL, /* 19 */
+ NULL, /* 20 */
+ NULL, /* 21 */
+ TclpCreateTempFile, /* 22 */
+ NULL, /* 23 */
+ NULL, /* 24 */
+ NULL, /* 25 */
+ NULL, /* 26 */
+ NULL, /* 27 */
+ NULL, /* 28 */
+ TclWinCPUID, /* 29 */
#endif /* UNIX */
#ifdef __WIN32__ /* WIN */
TclWinConvertError, /* 0 */
@@ -388,7 +458,7 @@ TclIntPlatStubs tclIntPlatStubs = {
TclpMakeFile, /* 6 */
TclpOpenFile, /* 7 */
TclUnixWaitForFile, /* 8 */
- TclpCreateTempFile, /* 9 */
+ TclWinGetPlatformId, /* 9 */
TclpReaddir, /* 10 */
TclpLocaltime_unix, /* 11 */
TclpGmtime_unix, /* 12 */
@@ -399,12 +469,26 @@ TclIntPlatStubs tclIntPlatStubs = {
TclMacOSXCopyFileAttributes, /* 17 */
TclMacOSXMatchType, /* 18 */
TclMacOSXNotifierAddRunLoopMode, /* 19 */
+ NULL, /* 20 */
+ NULL, /* 21 */
+ TclpCreateTempFile, /* 22 */
+ NULL, /* 23 */
+ NULL, /* 24 */
+ NULL, /* 25 */
+ NULL, /* 26 */
+ NULL, /* 27 */
+ NULL, /* 28 */
+ TclWinCPUID, /* 29 */
#endif /* MACOSX */
};
TclPlatStubs tclPlatStubs = {
TCL_STUB_MAGIC,
NULL,
+#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
+ Tcl_MacOSXOpenBundleResources, /* 0 */
+ Tcl_MacOSXOpenVersionedBundleResources, /* 1 */
+#endif /* UNIX */
#ifdef __WIN32__ /* WIN */
Tcl_WinUtfToTChar, /* 0 */
Tcl_WinTCharToUtf, /* 1 */