Well, the good news is that I finally succeeded in getting XEmacs
21.4.1 to build with MinGW (-mno-cygwin).
I tried to use pdump but xemacs.exe kept crashing during
initialization. If somebody with more knowledge of the pdump code
wants to give me pointers on how to debug the problem, I'll try pdump
again.
I finally hacked unexcw.c to compile again and finally succeeded in
producing a runable xemacs.exe. Long term, we should probably try to
use unexnt.c for the MinGW port instead of unexcw.c, but I didn't have
time today to try to get it to work.
Below is a diff between my workspace and the 21.4 branch in CVS. This
is not a final patch, by any means, and is only included for people to
comment on.
Craig
Index: src/nt.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/nt.c,v
retrieving revision 1.21
diff -u -r1.21 nt.c
--- src/nt.c 2001/04/12 18:24:06 1.21
+++ src/nt.c 2001/05/04 03:15:34
@@ -1216,10 +1216,10 @@
}
#else
-#if defined(MINGW) && CYGWIN_VERSION_DLL_MAJOR <= 21
-#define LowPart u.LowPart
-#define HighPart u.HighPart
-#endif
+//#if defined(MINGW) && CYGWIN_VERSION_DLL_MAJOR <= 21
+//#define LowPart u.LowPart
+//#define HighPart u.HighPart
+//#endif
static LARGE_INTEGER utc_base_li;
Index: src/sysdep.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/sysdep.c,v
retrieving revision 1.38
diff -u -r1.38 sysdep.c
--- src/sysdep.c 2001/04/12 18:24:22 1.38
+++ src/sysdep.c 2001/05/04 03:15:38
@@ -33,7 +33,7 @@
#ifdef WIN32_NATIVE
#ifdef MINGW
-#include <mingw/process.h>
+#include <../mingw/process.h>
#else
/* <process.h> should not conflict with "process.h", as per ANSI
definition.
This is not true with visual c though. The trick below works with
Index: src/syswindows.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/syswindows.h,v
retrieving revision 1.2
diff -u -r1.2 syswindows.h
--- src/syswindows.h 2001/04/12 18:24:23 1.2
+++ src/syswindows.h 2001/05/04 03:15:39
@@ -57,8 +57,7 @@
#include <windows.h>
-#if (defined (CYGWIN) || defined(MINGW)) && \
- CYGWIN_VERSION_DLL_MAJOR < 21
+#if defined(CYGWIN) && CYGWIN_VERSION_DLL_MAJOR < 21
extern BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD);
#define stricmp strcasecmp
Index: src/unexcw.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/unexcw.c,v
retrieving revision 1.6
diff -u -r1.6 unexcw.c
--- src/unexcw.c 2001/04/12 18:24:27 1.6
+++ src/unexcw.c 2001/05/04 03:15:39
@@ -37,7 +37,7 @@
#define PERROR(arg) perror(arg);exit(-1)
-#ifndef HAVE_A_OUT_H
+#if !defined(HAVE_A_OUT_H) && !defined(MINGW)
unexec (char *, char *, void *, void *, void *)
{
PERROR("cannot unexec() a.out.h not installed");
@@ -47,7 +47,11 @@
#ifndef MAX_PATH
#define MAX_PATH 260
#endif
+#ifdef MINGW
+#include <../../include/a.out.h>
+#else
#include <a.out.h>
+#endif
#define ALLOC_UNIT 0xFFFF
#define ALLOC_MASK ~((unsigned long)(ALLOC_UNIT))
cvs server: Diffing src/m
cvs server: Diffing src/s
Index: src/s/mingw32.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/s/mingw32.h,v
retrieving revision 1.2
diff -u -r1.2 mingw32.h
--- src/s/mingw32.h 2001/04/12 18:24:43 1.2
+++ src/s/mingw32.h 2001/05/04 03:15:40
@@ -133,13 +133,13 @@
#ifndef NOT_C_CODE
#include <stdlib.h>
-#include <mingw/process.h>
+#include <../mingw/process.h>
#define mkdir __mkdir
#include <dir.h>
#undef mkdir
-#ifdef HAVE_CYGWIN_VERSION_H
-#include <cygwin/version.h>
-#endif
+//#ifdef HAVE_CYGWIN_VERSION_H
+//#include <cygwin/version.h>
+//#endif
/* IO calls that are emulated or shadowed */
#define pipe sys_pipe
@@ -192,10 +192,10 @@
gid_t getgid (void);
gid_t getegid (void);
-#if CYGWIN_VERSION_DLL_MAJOR <= 21
-#define _ftime ftime
-#define _timeb timeb
-#endif
+//#if CYGWIN_VERSION_DLL_MAJOR <= 21
+//#define _ftime ftime
+//#define _timeb timeb
+//#endif
/* Stuff that gets set wrongly or otherwise */
#define HAVE_SETITIMER
Show replies by date