summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-23 13:30:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-23 13:30:01 (GMT)
commit5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35 (patch)
treef6bba9b64f34a1b2b941103e05773ffe545c1e91 /unix
parent06ea55d820a91810fe57afda632449d0bca2fe52 (diff)
parent4723df2a35ce7e7a2d460213d01c361be26a1772 (diff)
downloadtcl-5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35.zip
tcl-5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35.tar.gz
tcl-5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35.tar.bz2
Merge 8.6. Fix Cygwin compile
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixFile.c2
-rw-r--r--unix/tclUnixPort.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index d72913b..1ab5d14 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -44,7 +44,7 @@ TclpFindExecutable(
wchar_t buf[PATH_MAX];
char name[PATH_MAX * 3 + 1];
- GetModuleFileNameW(NULL, buf, PATH_MAX);
+ GetModuleFileNameW(NULL, buf, sizeof(buf)/sizeof(wchar_t));
cygwin_conv_path(3, buf, name, sizeof(name));
length = strlen(name);
if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) {
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index e2f1104..ece0202 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -95,6 +95,8 @@ extern "C" {
# define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
# define HANDLE void *
# define HINSTANCE void *
+# define HMODULE void *
+# define MAX_PATH 260
# define SOCKET unsigned int
# define WSAEWOULDBLOCK 10035
typedef unsigned short WCHAR;