summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-03 13:10:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-03 13:10:09 (GMT)
commitf693213b4dade6f73baf86ae13b2129be2ed0ad1 (patch)
tree8a428c23c89df13b9d208f9c8b7194e6a8a331de /unix
parent73dd8c4da919ada224a43fccf582ae5eb5d05d86 (diff)
parentb9ecc426358d3737357f0460caee4eae5be61a3a (diff)
downloadtcl-f693213b4dade6f73baf86ae13b2129be2ed0ad1.zip
tcl-f693213b4dade6f73baf86ae13b2129be2ed0ad1.tar.gz
tcl-f693213b4dade6f73baf86ae13b2129be2ed0ad1.tar.bz2
Move cpuid testcase from win-specific to generic tests
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.h23
5 files changed, 22 insertions, 15 deletions
diff --git a/unix/configure b/unix/configure
index f763eeb..8f25c08 100755
--- a/unix/configure
+++ b/unix/configure
@@ -19366,7 +19366,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 ad82ee0..066a84f 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -761,7 +761,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 792d6da..3818121 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -996,7 +996,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 a4426b7..1c456a0 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 5bb61a2..fac9f75 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -79,12 +79,27 @@ 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;
+ typedef unsigned short WCHAR;
+ 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 __stdcall int MultiByteToWideChar(int, int, const char *, int,
+ WCHAR *, int);
+ DLLIMPORT extern __stdcall void OutputDebugStringW(const WCHAR *);
+ DLLIMPORT extern __stdcall int IsDebuggerPresent();
+
+ 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. */