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 5b47e95..eab51a8 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -42,6 +42,61 @@
#define TclpLocaltime_unix TclpLocaltime
#define TclpGmtime_unix TclpGmtime
+#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
@@ -322,12 +377,27 @@ static const TclIntPlatStubs tclIntPlatStubs = {
TclpMakeFile, /* 6 */
TclpOpenFile, /* 7 */
TclUnixWaitForFile, /* 8 */
- TclpCreateTempFile, /* 9 */
+ TclWinGetPlatformId, /* 9 */
TclpReaddir, /* 10 */
TclpLocaltime_unix, /* 11 */
TclpGmtime_unix, /* 12 */
TclpInetNtoa, /* 13 */
TclUnixCopyFile, /* 14 */
+ 0, /* 15 */
+ 0, /* 16 */
+ 0, /* 17 */
+ 0, /* 18 */
+ 0, /* 19 */
+ 0, /* 20 */
+ 0, /* 21 */
+ TclpCreateTempFile, /* 22 */
+ 0, /* 23 */
+ 0, /* 24 */
+ 0, /* 25 */
+ 0, /* 26 */
+ 0, /* 27 */
+ 0, /* 28 */
+ TclWinCPUID, /* 29 */
#endif /* UNIX */
#ifdef __WIN32__ /* WIN */
TclWinConvertError, /* 0 */
@@ -371,7 +441,7 @@ static const TclIntPlatStubs tclIntPlatStubs = {
TclpMakeFile, /* 6 */
TclpOpenFile, /* 7 */
TclUnixWaitForFile, /* 8 */
- TclpCreateTempFile, /* 9 */
+ TclWinGetPlatformId, /* 9 */
TclpReaddir, /* 10 */
TclpLocaltime_unix, /* 11 */
TclpGmtime_unix, /* 12 */
@@ -382,12 +452,26 @@ static const TclIntPlatStubs tclIntPlatStubs = {
TclMacOSXCopyFileAttributes, /* 17 */
TclMacOSXMatchType, /* 18 */
TclMacOSXNotifierAddRunLoopMode, /* 19 */
+ 0, /* 20 */
+ 0, /* 21 */
+ TclpCreateTempFile, /* 22 */
+ 0, /* 23 */
+ 0, /* 24 */
+ 0, /* 25 */
+ 0, /* 26 */
+ 0, /* 27 */
+ 0, /* 28 */
+ TclWinCPUID, /* 29 */
#endif /* MACOSX */
};
static const TclPlatStubs tclPlatStubs = {
TCL_STUB_MAGIC,
0,
+#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 */