changeset 5927:b58b74274fa2 cygwin

changes from long ago, never committed...
author Henry Thompson <ht@markup.co.uk>
date Wed, 15 Dec 2021 19:02:33 +0000
parents da02ba75e50a
children
files nt/README nt/xemacs.mak src/s/windowsnt.h src/sysproc.h
diffstat 4 files changed, 44 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/nt/README	Fri Feb 27 17:48:44 2015 +0000
+++ b/nt/README	Wed Dec 15 19:02:33 2021 +0000
@@ -279,6 +279,9 @@
     similar to running `configure --srcdir=PATH' under Unix.  See the
     comments in `config.inc.samp' for more information.
 
+[HST says: Launch an elevated CMD shell: "Administrator: VS2015 x86 Native Tools Command Prompt"]
+
+
 4.  If you want to build xemacs on the command line, use
     `nmake install -f xemacs.mak', or just `nmake -f xemacs.mak' if you want
     to run XEmacs from its build directory.  nmake will build temacs, the DOC
--- a/nt/xemacs.mak	Fri Feb 27 17:48:44 2015 +0000
+++ b/nt/xemacs.mak	Wed Dec 15 19:02:33 2021 +0000
@@ -543,6 +543,7 @@
 OPT_DEFINES=$(OPT_DEFINES) -DHAVE_XPM -DFOR_MSW
 OPT_INCLUDES=$(OPT_INCLUDES) -I"$(XPM_DIR)" -I"$(XPM_DIR)\lib"
 OPT_LIBS=$(OPT_LIBS) "$(XPM_DIR)\lib\Xpm.lib"
+OPT_PATH=$(OPT_PATH)$(XPM_DIR)\lib;
 !endif
 !if $(HAVE_GIF)
 OPT_DEFINES=$(OPT_DEFINES) -DHAVE_GIF
@@ -595,8 +596,10 @@
 OPT_INCLUDES=$(OPT_INCLUDES) -I"$(DATABASE_DIR)\build_win32"
 !if $(BUILD_DATABASE_SHARED)
 OPT_LIBS=$(OPT_LIBS) "$(DATABASE_DIR)\build_win32\Release\libdb43.lib"
+OPT_PATH=$(OPT_PATH)$(DATABASE_DIR)\build_win32\Release;
 !else
 OPT_LIBS=$(OPT_LIBS) "$(DATABASE_DIR)\build_win32\Release_static\libdb43s.lib"
+OPT_PATH=$(OPT_PATH)$(DATABASE_DIR)\build_win32\Release_static;
 !endif
 OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\database.obj
 !endif
@@ -738,10 +741,10 @@
 !if $(USE_CRTDLL)
 !  if $(DEBUG_XEMACS) && "$(OK_TO_USE_MSVCRTD)" == "1"
 C_LIBFLAG=-MDd
-LIBC_LIB=msvcrtd.lib
+LIBC_LIB=msvcrtd.lib ucrtd.lib vcruntimed.lib
 !  else
 C_LIBFLAG=-MD
-LIBC_LIB=msvcrt.lib
+LIBC_LIB=msvcrt.lib ucrt.lib vcruntime.lib
 !  endif
 !else
 C_LIBFLAG=-ML
@@ -793,7 +796,7 @@
 INCLUDES=-I$(NT)\inc -I$(SRC) $(OPT_INCLUDES)
 
 DEFINES=$(OPT_DEFINES) \
-	-DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
+	-DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs  -DNTDDI_VERSION=NTDDI_WIN2K -D_WIN32_WINNT=_WIN32_WINNT_WIN2K -D_CRT_NO_POSIX_ERROR_CODES \
 	-DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
 
 CFLAGS_NO_OPT=-nologo -W3 -DSTRICT $(DEBUG_FLAGS_COMPILE)
@@ -1103,7 +1106,7 @@
 # If we're using Visual Studio 2005 or greater,
 # embed the manifest into the executable.
 !if $(MSC_VER) >= 1400
-	mt -manifest $@.manifest -outputresource:$@;1
+	@if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 !endif
 
 # Individual dependencies
@@ -1113,7 +1116,7 @@
 # If we're using Visual Studio 2005 or greater,
 # embed the manifest into the executable.
 !if $(MSC_VER) >= 1400
-	mt -manifest $@.manifest -outputresource:$@;1
+	@if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 !endif
 
 $(BLDLIB_SRC)/movemail.exe : $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
@@ -1124,7 +1127,7 @@
 # If we're using Visual Studio 2005 or greater,
 # embed the manifest into the executable.
 !if $(MSC_VER) >= 1400
-	mt -manifest $@.manifest -outputresource:$@;1
+	@if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 !endif
 
 LIB_SRC_TOOLS = \
@@ -1324,7 +1327,7 @@
  mpr.lib uuid.lib imm32.lib $(INTEL_LIBS) $(LIBC_LIB)
 TEMACS_COMMON_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS_LINK) \
  -base:0x1000000 -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows \
- -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj
+ -heap:0x00100000 -nodefaultlib  -dynamicbase:no $(PROFILE_FLAGS) setargv.obj
 TEMACS_LFLAGS=$(TEMACS_COMMON_LFLAGS) \
  -pdb:$(BLDSRC)\temacs.pdb -map:$(BLDSRC)\temacs.map
 XEMACS_LFLAGS=$(TEMACS_COMMON_LFLAGS) \
@@ -1334,8 +1337,10 @@
 
 RAW_EXE=$(BLDSRC)\temacs.exe
 DUMP_TARGET = $(BLDSRC)\xemacs.exe
-DO_TEMACS = "$(BLDLIB_SRC)\i" "$(RAW_EXE)"
-DO_XEMACS = "$(BLDLIB_SRC)\i" "$(DUMP_TARGET)"
+#DO_TEMACS = "$(BLDLIB_SRC)\i" "$(RAW_EXE)" removed by HST, i.exe crashes
+DO_TEMACS = "$(RAW_EXE)"
+#DO_XEMACS = "$(BLDLIB_SRC)\i" "$(DUMP_TARGET)" ditto
+DO_XEMACS = "$(DUMP_TARGET)"
 
 BATCH = -no-packages -batch
 BATCH_PACKAGES = -vanilla -batch
@@ -1397,6 +1402,7 @@
 ## (3) Update the .elc's needed for dumping
 
 update-elc: $(RAW_EXE)
+	set PATH=$(OPT_PATH)$(PATH)
 	$(TEMACS_BATCH) -l $(LISP)\update-elc.el
 
 ## This file is touched by update-elc.el when redumping is necessary.
@@ -1417,11 +1423,15 @@
 # calculates dependencies; see comments in src/Makefile.in.in.
 $(DOC): $(BLDLIB_SRC)\make-docfile.exe $(BLDSRC)\NEEDTODUMP $(TEMACS_DOC_SOURCES)
 !if $(QUICK_BUILD)
-	if not exist $(DOC) $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
+	if not exist $(DOC) (
+	set PATH=$(OPT_PATH)$(PATH)
+	$(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
 $(**)
 <<
 	-touch $(DOC)
+	)
 !else
+	set PATH=$(OPT_PATH)$(PATH)
 	$(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
 $(**)
 <<
@@ -1437,6 +1447,7 @@
 # requirements have changed.
 
 $(DUMP_TARGET): $(DOC) $(RAW_EXE) $(BLDSRC)\NEEDTODUMP
+	set PATH=$(OPT_PATH)$(PATH)
 	$(TEMACS_BATCH) -l $(LISP)\loadup.el dump
 !if $(USE_PORTABLE_DUMPER)
 	cd $(BLDSRC)
@@ -1450,7 +1461,7 @@
 # If we're using Visual Studio 2005 or greater,
 # embed the manifest into the executable.
 !if $(MSC_VER) >= 1400
-	mt -manifest $@.manifest -outputresource:$@;1
+	@if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 !endif
 
 !endif
@@ -1458,6 +1469,7 @@
 ## (6) Update the remaining .elc's, post-dumping
 
 update-elc-2: $(DUMP_TARGET)
+	set PATH=$(OPT_PATH)$(PATH)
 	$(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP)
 
 ## (7) Other random stuff
@@ -1465,6 +1477,7 @@
 $(LISP)/finder-inf.el: update-elc-2
 !if !$(QUICK_BUILD)
 	@echo Building finder database ...
+	set PATH=$(OPT_PATH)$(PATH)
 	$(XEMACS_BATCH)	-eval "(setq finder-compile-keywords-quiet t)" \
 		-l finder -f finder-compile-keywords
 	@echo Building finder database ...(done)
@@ -1473,6 +1486,7 @@
 load-shadows: update-elc-2
 !if !$(QUICK_BUILD)
 	@echo Testing for Lisp shadows ...
+	set PATH=$(OPT_PATH)$(PATH)
 	@$(XEMACS_BATCH) -f list-load-path-shadows
 !endif
 
@@ -1501,6 +1515,7 @@
 
 {$(MANDIR)}.texi{$(INFODIR)}.info:
 	cd $(MANDIR)
+	set PATH=$(OPT_PATH)$(PATH)
 	$(MAKEINFO) $(**F)
 
 XEMACS_SRCS = \
@@ -1633,18 +1648,22 @@
 
 $(INFODIR)\xemacs.info: $(XEMACS_SRCS)
 	cd $(MANDIR)\xemacs
+	set PATH=$(OPT_PATH)$(PATH)
 	$(MAKEINFO) xemacs.texi
 
 $(INFODIR)\lispref.info: $(LISPREF_SRCS)
 	cd $(MANDIR)\lispref
+	set PATH=$(OPT_PATH)$(PATH)
 	$(MAKEINFO) lispref.texi
 
 $(INFODIR)\internals.info: $(INTERNALS_SRCS)
 	cd $(MANDIR)\internals
+	set PATH=$(OPT_PATH)$(PATH)
 	$(MAKEINFO) internals.texi
 
 $(INFODIR)\new-users-guide.info: $(NEW_USERS_GUIDE_SRCS)
 	cd $(MANDIR)\new-users-guide
+	set PATH=$(OPT_PATH)$(PATH)
 	$(MAKEINFO) new-users-guide.texi
 
 info:	makeinfo-test $(INFO_FILES)
@@ -1660,14 +1679,17 @@
 
 check:
 	cd $(BLDSRC)
+	set PATH=$(OPT_PATH)$(PATH)
 	$(DO_XEMACS) $(batch_test_emacs)
 
 check-temacs:
 	cd $(BLDSRC)
+	set PATH=$(OPT_PATH)$(PATH)
 	$(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs)
 
 check-features: all
 	cd $(BLDSRC)
+	set PATH=$(OPT_PATH)$(PATH)
 	$(XEMACS_BATCH) -l check-features.el
 
 
@@ -1832,6 +1854,7 @@
 @echo off
 @"$(MAKEINFO)" --version
 @if not errorlevel 1 goto test_done
+@set PATH=$(OPT_PATH)$(PATH)
 @$(XEMACS_BATCH_PACKAGES) -eval "(condition-case nil (require (quote texinfo)) (t (kill-emacs 1)))"
 @if not errorlevel 1 goto suggest_makeinfo
 @echo XEmacs 'info' cannot be built!
--- a/src/s/windowsnt.h	Fri Feb 27 17:48:44 2015 +0000
+++ b/src/s/windowsnt.h	Wed Dec 15 19:02:33 2021 +0000
@@ -63,6 +63,8 @@
 
 #define HAVE_TIMEVAL
 #define HAVE_TZNAME
+/* need this, where should it go? HST */
+#define tzname _tzname
 #define HAVE_H_ERRNO
 
 #define HAVE_CLOSEDIR
@@ -176,9 +178,11 @@
 #pragma warning ( disable : 4646 )
 #endif 
 
-/* MSVC version >= 2.x without /Za supports __inline */
+/* MSVC version >= 2.x without /Za supports __inline
+   HST cut this -- VS2015 complains
 #if (_MSC_VER < 900) || defined (__STDC__)
 # define inline
 #else
 # define inline __inline
 #endif
+ */
--- a/src/sysproc.h	Fri Feb 27 17:48:44 2015 +0000
+++ b/src/sysproc.h	Wed Dec 15 19:02:33 2021 +0000
@@ -35,8 +35,8 @@
    This is not true with visual c though. The trick below works with
    VC4.2b, 5.0 and 6.0. It assumes that VC is installed in a kind of
    standard way, so include path ends with /include.
-*/
-#include <../include/process.h>
+   HST changed this to ucrt */
+#include <../ucrt/process.h>
 #endif
 
 #ifdef HAVE_SOCKETS	/* TCP connection support, if kernel can do it */