summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPort.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-04 07:47:22 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-04 07:47:22 (GMT)
commitef03a2c7809309b2255f7c82c6abe0db2e4160bf (patch)
treefd7b6368f954a4c1a95289f5dc388a409605c11c /unix/tclUnixPort.h
parentbf9624b12a9e6fe010e025b8f76d3e29c8399725 (diff)
parent24ef33dc101a3e9114318b884c1e99d792f4739d (diff)
downloadtcl-ef03a2c7809309b2255f7c82c6abe0db2e4160bf.zip
tcl-ef03a2c7809309b2255f7c82c6abe0db2e4160bf.tar.gz
tcl-ef03a2c7809309b2255f7c82c6abe0db2e4160bf.tar.bz2
merge trunk
Diffstat (limited to 'unix/tclUnixPort.h')
-rw-r--r--unix/tclUnixPort.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 4adb36c..63c500d 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -79,8 +79,35 @@ typedef off_t Tcl_SeekOffset;
#endif
#ifdef __CYGWIN__
-MODULE_SCOPE int TclOSstat(const char *name, Tcl_StatBuf *statBuf);
-MODULE_SCOPE int TclOSlstat(const char *name, Tcl_StatBuf *statBuf);
+
+ /* 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
+# define WSAEWOULDBLOCK 10035
+ 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_path(int, const void *, void *, int);
+ DLLIMPORT extern int cygwin_conv_path_list(int, const void *, void *, int);
+# define USE_PUTENV 1
+# define USE_PUTENV_FOR_UNSET 1
+/* On Cygwin, the environment is imported from the Cygwin DLL. */
+# define environ __cygwin_environ
+# define timezone _timezone
+ DLLIMPORT extern char **__cygwin_environ;
+ MODULE_SCOPE int TclOSstat(const char *name, Tcl_StatBuf *statBuf);
+ MODULE_SCOPE int TclOSlstat(const char *name, Tcl_StatBuf *statBuf);
#elif defined(HAVE_STRUCT_STAT64)
# define TclOSstat stat64
# define TclOSlstat lstat64
@@ -668,7 +695,6 @@ typedef int socklen_t;
*---------------------------------------------------------------------------
*/
-#define TclpGetPid(pid) ((unsigned long) (pid))
#define TclpReleaseFile(file) /* Nothing. */
/*
@@ -690,6 +716,7 @@ typedef int socklen_t;
#define TclpExit exit
#ifdef TCL_THREADS
+# include <pthread.h>
# undef inet_ntoa
# define inet_ntoa(x) TclpInetNtoa(x)
#endif /* TCL_THREADS */