summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rwxr-xr-xunix/configure2
-rw-r--r--unix/configure.in2
-rw-r--r--unix/tclUnixCompat.c2
-rw-r--r--unix/tclUnixFile.c8
-rw-r--r--unix/tclUnixPort.h18
5 files changed, 17 insertions, 15 deletions
diff --git a/unix/configure b/unix/configure
index 522828d..4b141b6 100755
--- a/unix/configure
+++ b/unix/configure
@@ -18931,7 +18931,7 @@ main ()
"mov %%ebx, %%esi \n\t"
"mov %%edi, %%ebx \n\t"
: "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
- : "a"(index));
+ : "a"(index) : "edi");
;
return 0;
diff --git a/unix/configure.in b/unix/configure.in
index aea5ee5..441c98f 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -737,7 +737,7 @@ AC_CACHE_CHECK([whether the cpuid instruction is usable], tcl_cv_cpuid, [
"mov %%ebx, %%esi \n\t"
"mov %%edi, %%ebx \n\t"
: "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
- : "a"(index));
+ : "a"(index) : "edi");
], tcl_cv_cpuid=yes, tcl_cv_cpuid=no)])
if test $tcl_cv_cpuid = yes; then
AC_DEFINE(HAVE_CPUID, 1, [Is the cpuid instruction usable?])
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index d9d5052..f582c0c 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -826,7 +826,7 @@ TclWinCPUID(
"mov %%ebx, %%esi \n\t" /* save what cpuid just put in %ebx */
"mov %%edi, %%ebx \n\t" /* restore the old %ebx */
: "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
- : "a"(index));
+ : "a"(index) : "edi");
status = TCL_OK;
#endif
return status;
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index f428af7..edd0d2f 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -44,14 +44,6 @@ TclpFindExecutable(
int length;
char buf[PATH_MAX * TCL_UTF_MAX + 1];
char name[PATH_MAX * TCL_UTF_MAX + 1];
-
- /* Make some symbols available without including <windows.h> */
-# define CP_UTF8 65001
- DLLIMPORT extern int cygwin_conv_to_full_posix_path(const char *, char *);
- DLLIMPORT extern __stdcall int GetModuleFileNameW(void *, const char *, int);
- DLLIMPORT extern __stdcall int WideCharToMultiByte(int, int, const char *, int,
- const char *, int, const char *, const char *);
-
GetModuleFileNameW(NULL, name, PATH_MAX);
WideCharToMultiByte(CP_UTF8, 0, name, -1, buf, PATH_MAX, NULL, NULL);
cygwin_conv_to_full_posix_path(buf, name);
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 33348e2..8b7fab1 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -74,12 +74,22 @@ typedef off_t Tcl_SeekOffset;
#endif
#ifdef __CYGWIN__
-# define WSAEWOULDBLOCK 10035
-# define HINSTANCE void *
-# define HANDLE void *
+
+ /* Make some symbols available without including <windows.h> */
# define DWORD unsigned int
+# define CP_UTF8 65001
+# define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
+# define HANDLE void *
+# define HINSTANCE void *
# define SOCKET unsigned int
-# typedef char TCHAR;
+# define WSAEWOULDBLOCK 10035
+ typedef char TCHAR;
+ DLLIMPORT extern __stdcall int GetModuleHandleExW(unsigned int, const char *, void *);
+ DLLIMPORT extern __stdcall int GetModuleFileNameW(void *, const char *, int);
+ DLLIMPORT extern __stdcall int WideCharToMultiByte(int, int, const char *, int,
+ const char *, int, const char *, const char *);
+
+ DLLIMPORT extern int cygwin_conv_to_full_posix_path(const char *, char *);
# define USE_PUTENV 1
# define USE_PUTENV_FOR_UNSET 1
/* On Cygwin, the environment is imported from the Cygwin DLL. */