aboutsummaryrefslogtreecommitdiff
path: root/make-bootstrap-jim
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-11-07 08:55:09 +1000
committerSteve Bennett <steveb@workware.net.au>2011-11-07 15:31:41 +1000
commit05e51ed5447b83badfd8ed550c7386b68eb94919 (patch)
treec0c2c87069eaf34f9d90aaa8e810b7cf8f40c4fc /make-bootstrap-jim
parent5fe0bb5f3beedb262512a8e548bf7cc6ed9bff96 (diff)
downloadjimtcl-05e51ed5447b83badfd8ed550c7386b68eb94919.zip
jimtcl-05e51ed5447b83badfd8ed550c7386b68eb94919.tar.gz
jimtcl-05e51ed5447b83badfd8ed550c7386b68eb94919.tar.bz2
Allow building with MSVC on windows
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'make-bootstrap-jim')
-rwxr-xr-xmake-bootstrap-jim21
1 files changed, 15 insertions, 6 deletions
diff --git a/make-bootstrap-jim b/make-bootstrap-jim
index ac84367..5af4acf 100755
--- a/make-bootstrap-jim
+++ b/make-bootstrap-jim
@@ -58,22 +58,31 @@ for i in $allexts; do
echo "#define jim_ext_$i"
done
-# Can we make a bootstrap jimsh work even on mingw32?
cat <<EOF
-#if defined(__MINGW32__)
+#if defined(_MSC_VER)
+#define TCL_PLATFORM_OS "windows"
+#define TCL_PLATFORM_PLATFORM "windows"
+#define TCL_PLATFORM_PATH_SEPARATOR ";"
+#define HAVE_MKDIR_ONE_ARG
+#define HAVE_SYSTEM
+#elif defined(__MINGW32__)
#define TCL_PLATFORM_OS "mingw"
#define TCL_PLATFORM_PLATFORM "windows"
#define TCL_PLATFORM_PATH_SEPARATOR ";"
#define HAVE_MKDIR_ONE_ARG
#define HAVE_SYSTEM
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+#define HAVE_SYS_TIME_H
+#define HAVE_DIRENT_H
+#define HAVE_UNISTD_H
#else
#define TCL_PLATFORM_OS "unknown"
#define TCL_PLATFORM_PLATFORM "unix"
#define TCL_PLATFORM_PATH_SEPARATOR ":"
#define HAVE_VFORK
#define HAVE_WAITPID
+#define HAVE_SYS_TIME_H
+#define HAVE_DIRENT_H
+#define HAVE_UNISTD_H
#endif
EOF
@@ -85,7 +94,7 @@ outputsource()
}
# Now output header files, removing references to jim header files
-for i in utf8.h jim.h jim-subcmd.h jimregexp.h ; do
+for i in jim-win32compat.h utf8.h jim.h jim-subcmd.h jimregexp.h ; do
outputsource $i
done
@@ -99,7 +108,7 @@ done
makeloadexts $allexts
# And finally the core source code
-for i in jim.c jim-subcmd.c utf8.c jim-format.c jimregexp.c; do
+for i in jim.c jim-subcmd.c utf8.c jim-format.c jimregexp.c jim-win32compat.c; do
outputsource $i
done
echo "#ifndef JIM_BOOTSTRAP_LIB_ONLY"