Compiling xemacs with Visual Studio 2015 Community ('free') edition
[email protected] (Henry S. Thompson) Sun, 26 Jul 2015 19:58:09 +0100
| Newsgroups | gmane.emacs.xemacs.beta |
|---|---|
| Message-ID | <[email protected]> |
Installed the above on my Windows 8.1 box, pulled the latest
(cb65bfaf7110) revision, imported the project file, and built it (from
inside VS2015, Debug x86 build).
The attached patch file got me to the point where the compilation
succeeded, but linking is a catastrophe, and I don't understand how to
fix it. Large numbers of _-prefixed fns are showing is unavailable,
but I can't see where they're coming from.
Attached are the patches necessary to get the compilation to complete,
and the config.inc I'm using. Probably some naive mistake there,
needs a new pair of eyes.
Note that I picked VS2015 because it's the latest available, and what
the Python project has chosen, even though all you can download at the
moment is an RC.
ht
--
Henry S. Thompson, School of Informatics, University of Edinburgh
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: [email protected]
URL: http://www.ltg.ed.ac.uk/~ht/
[mail from me _always_ has a .sig like this -- mail without it is forged spam]
_______________________________________________
XEmacs-Beta mailing list
[email protected]
http://lists.xemacs.org/mailman/listinfo/xemacs-beta
vs2015.patch
(text/x-patch, 2.9 KB)
diff -r cb65bfaf7110 nt/xemacs.mak
--- a/nt/xemacs.mak Fri Mar 27 16:05:15 2015 +0100
+++ b/nt/xemacs.mak Sun Jul 26 19:45:23 2015 +0100
@@ -793,7 +793,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)
diff -r cb65bfaf7110 src/intl-auto-encap-win32.c
--- a/src/intl-auto-encap-win32.c Fri Mar 27 16:05:15 2015 +0100
+++ b/src/intl-auto-encap-win32.c Sun Jul 26 19:45:23 2015 +0100
@@ -36,13 +36,14 @@
return PeekConsoleInputA (arg1, arg2, arg3, arg4);
}
+/* HST did this */
BOOL
-qxeReadConsole (HANDLE arg1, PVOID arg2, DWORD arg3, PDWORD arg4, PVOID arg5)
-{
- if (XEUNICODE_P)
- return ReadConsoleW (arg1, arg2, arg3, arg4, arg5);
- else
- return ReadConsoleA (arg1, arg2, arg3, arg4, arg5);
+qxeReadConsole (HANDLE hConsoleInput, LPVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, LPVOID lpReserved)
+{
+ if (XEUNICODE_P)
+ return ReadConsoleW (hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, (PCONSOLE_READCONSOLE_CONTROL)lpReserved);
+ else
+ return ReadConsoleA (hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, (PCONSOLE_READCONSOLE_CONTROL)lpReserved);
}
BOOL
@@ -3346,6 +3347,7 @@
return (Extbyte *) GetCommandLineA ();
}
+/*HST did this
DWORD
qxeGetCompressedFileSize (const Extbyte * arg1, PDWORD arg2)
{
@@ -3354,6 +3356,7 @@
else
return GetCompressedFileSizeA ((LPCSTR) arg1, arg2);
}
+*/
BOOL
qxeGetComputerName (Extbyte * arg1, PDWORD arg2)
diff -r cb65bfaf7110 src/s/windowsnt.h
--- a/src/s/windowsnt.h Fri Mar 27 16:05:15 2015 +0100
+++ b/src/s/windowsnt.h Sun Jul 26 19:45:23 2015 +0100
@@ -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
+ */
diff -r cb65bfaf7110 src/sysproc.h
--- a/src/sysproc.h Fri Mar 27 16:05:15 2015 +0100
+++ b/src/sysproc.h Sun Jul 26 19:45:23 2015 +0100
@@ -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 */
config.inc
(application/octet-stream, 12.7 KB) - not displayed