diff options
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/configure | 2 | ||||
-rw-r--r-- | unix/configure.in | 2 | ||||
-rw-r--r-- | unix/tclUnixCompat.c | 2 | ||||
-rw-r--r-- | unix/tclUnixFile.c | 8 | ||||
-rw-r--r-- | unix/tclUnixPort.h | 18 |
5 files changed, 17 insertions, 15 deletions
diff --git a/unix/configure b/unix/configure index 4898cfb..5b8621f 100755 --- a/unix/configure +++ b/unix/configure @@ -9345,7 +9345,7 @@ int 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; } EOF diff --git a/unix/configure.in b/unix/configure.in index 869fbaa..63d7170 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -577,7 +577,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 6e2666b..71bd846 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -698,7 +698,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 4ba2e47..56acf6c 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -61,14 +61,6 @@ TclpFindExecutable(argv0) } #ifdef __CYGWIN__ - - /* Make some symbols available without including <windows.h> */ -# define CP_UTF8 65001 - extern int cygwin_conv_to_full_posix_path(const char *, char *); - extern __stdcall int GetModuleFileNameW(void *, const char *, int); - 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 b3133fb..85f2b13 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 *); EXTERN int TclOSstat(const char *name, Tcl_StatBuf *statBuf); EXTERN int TclOSlstat(const char *name, Tcl_StatBuf *statBuf); # define NO_FSTATFS |