unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Fabrice Popineau <fabrice.popineau@supelec.fr>
To: Eli Zaretskii <eliz@gnu.org>
Cc: cschol2112@googlemail.com, 9960@debbugs.gnu.org
Subject: bug#9960: Compiling Emacs trunk with MSVC
Date: Thu, 10 Nov 2011 20:56:11 +0100	[thread overview]
Message-ID: <CAFgFV9M4=B+JzgP+NVHLcwDoQU=-JcNm6HaH_NUG7YNg1K7rBg@mail.gmail.com> (raw)
In-Reply-To: <83sjlzj25l.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 1324 bytes --]

2011/11/7 Eli Zaretskii <eliz@gnu.org>

> Will this work:
>
>  #define ALIGN_GCTYPEBITS 8
>  #if (1 << GCTYPEBITS) != ALIGN_GCTYPEBITS
>  #error ALIGN_GCTYPEBITS is wrong!
>  #endif
>  #define DECL_ALIGN(type, var) \
>       type __declspec(align(ALIGN_GCTYPEBITS)) var
>
> Since all this is needed for MSVC alone, we could then move the
> ALIGN_GCTYPEBITS definition to src/s/ms-w32.h and leave only the rest
> in lisp.h.  WDYT?
>

Sure. feel free to adapt on the basis of the attached patch.
Status is :
- completely functional 32 bits version with xpm, gif, jpeg, tiff. Able to
boostrap itself.
- the 64 bits version compiles and dumps, but fails to bootstrap (seems to
be looping inside elisp code).

Is there any interest in having a 64bits windows emacs ?

I have added two other files : a 64bits manifest for emacs.exe and a
w32compat.h header file that is needed to compile the above mentioned
libraries. In my case, this w32compat.h is included while compiling image.c
for example.

Feel free to comment and adapt for the release version.

Fabrice



-- 
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------

[-- Attachment #1.2: Type: text/html, Size: 2050 bytes --]

[-- Attachment #2: emacs-24-3.diff --]
[-- Type: application/octet-stream, Size: 12862 bytes --]

=== modified file 'build-aux/move-if-change' (properties changed: +x to -x)
=== modified file 'lib-src/emacsclient.c'
--- lib-src/emacsclient.c	2011-10-27 00:59:21 +0000
+++ lib-src/emacsclient.c	2011-11-10 17:40:29 +0000
@@ -1635,7 +1635,9 @@
   /* Send over our environment and current directory. */
   if (!current_frame)
     {
+#ifndef _MSC_VER
       extern char **environ;
+#endif
       int i;
       for (i = 0; environ[i]; i++)
         {

=== modified file 'lib-src/makefile.w32-in'
--- lib-src/makefile.w32-in	2011-07-07 01:32:56 +0000
+++ lib-src/makefile.w32-in	2011-11-08 18:23:01 +0000
@@ -23,7 +23,7 @@
 
 LOCAL_FLAGS	= -DWINDOWSNT -DDOS_NT -DNO_LDAV=1 \
 		  -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../lib \
-		  -I../nt/inc -I../src
+		  -I../nt/inc -I../src $(EMACS_EXTRA_C_FLAGS)
 
 LIBS 		= $(BASE_LIBS) $(ADVAPI32)
 

=== modified file 'lib/strftime.c'
--- lib/strftime.c	2011-03-31 04:24:03 +0000
+++ lib/strftime.c	2011-11-10 17:39:37 +0000
@@ -36,9 +36,14 @@
 #include <ctype.h>
 #include <time.h>
 
+#ifdef _MSC_VER
+#define tzname _tzname
+#else
 #if HAVE_TZNAME && !HAVE_DECL_TZNAME
 extern char *tzname[];
 #endif
+#endif
+
 
 /* Do multibyte processing if multibytes are supported, unless
    multibyte sequences are safe in formats.  Multibyte sequences are

=== modified file 'lisp/bindings.el'
--- lisp/bindings.el	2011-10-08 16:37:46 +0000
+++ lisp/bindings.el	2011-11-10 17:49:35 +0000
@@ -824,13 +824,13 @@
 ;; Define control-digits.
 (let ((i ?0))
   (while (<= i ?9)
-    (define-key global-map (read (format "[?\\C-%c]" i)) 'digit-argument)
+;    (define-key global-map (read (format "[?\\C-%c]" i)) 'digit-argument)
     (setq i (1+ i))))
 (define-key global-map [?\C--] 'negative-argument)
 ;; Define control-meta-digits.
 (let ((i ?0))
   (while (<= i ?9)
-    (define-key esc-map (read (format "[?\\C-%c]" i)) 'digit-argument)
+;    (define-key esc-map (read (format "[?\\C-%c]" i)) 'digit-argument)
     (setq i (1+ i))))
 (define-key global-map [?\C-\M--] 'negative-argument)
 

=== modified file 'nt/config.nt'
--- nt/config.nt	2011-11-05 17:16:01 +0000
+++ nt/config.nt	2011-11-10 17:42:22 +0000
@@ -303,6 +303,10 @@
 /* Define to 1 if you have the `localtime_r' function. */
 #undef HAVE_LOCALTIME_R
 
+/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
+   don't. */
+#define HAVE_DECL_STRTOLL 1
+
 /* Define to 1 if you have the declaration of `strtoull', and to 0 if you
    don't. */
 #define HAVE_DECL_STRTOULL 1
@@ -353,8 +357,8 @@
 /* A va_copy replacement for MSVC.  */
 #ifdef _MSC_VER
 # ifdef _WIN64
-#  ifndef va_copy
-#   error "va_copy is needed, but not defined!"
+#  ifndef va_copy               /* Need to be checked (?) */
+#   define va_copy(d,s) ((d) = (s))
 #  endif
 # else	/* not _WIN64 */
 #  define va_copy(d,s) ((d) = (s))
@@ -429,7 +433,11 @@
 
    See m/template.h for documentation on writing m/MACHINE.h files.  */
 #undef config_machfile
+#ifdef _WIN64
+#include "m/amdx86-64.h"
+#else
 #include "m/intel386.h"
+#endif
 
 /* Define `subprocesses' should be defined if you want to
    have code for asynchronous subprocesses

=== modified file 'nt/configure.bat'
--- nt/configure.bat	2011-05-07 04:00:12 +0000
+++ nt/configure.bat	2011-11-09 15:43:42 +0000
@@ -96,8 +96,8 @@
 set profile=N
 set nocygwin=N
 set COMPILER=
-set usercflags=
-set escusercflags=
+set usercflags=-I../src -I../nt/inc -I../lib -Ic:/source/XEmTeX/source/libs/w32compat -Ic:/source/XEmTeX/source/libs/zlib-1.2.5 -Ic:/source/XEmTeX/source/libs/libpng-1.5.4 -Ic:/source/XEmTeX/source/libs/jpeg-8b -Ic:/source/XEmTeX/source/libs/tiff-3.9.5/libtiff -Ic:/source/XEmTeX/source/libs/giflib-4.1.6/lib -Ic:/source/XEmTeX/source/libs/xpm-3.4k -Ic:/source/XEmTeX/source/libs/xpm-3.4k/lib
+set escusercflags=-I../src -I../nt/inc -I../lib -Ic:/source/XEmTeX/source/libs/w32compat -Ic:/source/XEmTeX/source/libs/zlib-1.2.5 -Ic:/source/XEmTeX/source/libs/libpng-1.5.4 -Ic:/source/XEmTeX/source/libs/jpeg-8b -Ic:/source/XEmTeX/source/libs/tiff-3.9.5/libtiff -Ic:/source/XEmTeX/source/libs/giflib-4.1.6/lib -Ic:/source/XEmTeX/source/libs/xpm-3.4k -Ic:/source/XEmTeX/source/libs/xpm-3.4k/lib
 set docflags=
 set userldflags=
 set escuserldflags=
@@ -536,7 +536,8 @@
 echo The failed program was: >>config.log
 type junk.c >>config.log
 set HAVE_PNG=
-goto :pngDone
+rem goto :pngDone
+goto :end
 
 :havePng
 echo ...PNG header available, building with PNG support.

=== modified file 'nt/emacs.rc'
--- nt/emacs.rc	2011-10-31 02:25:01 +0000
+++ nt/emacs.rc	2011-11-10 02:47:58 +0000
@@ -1,6 +1,10 @@
 Emacs ICON   icons\emacs.ico
 32649 CURSOR icons\hand.cur
+#ifdef WIN64
+1 24 "emacs-x64.manifest"
+#else
 1 24 "emacs.manifest"
+#endif
 
 #ifndef VS_VERSION_INFO
 #define VS_VERSION_INFO 1

=== modified file 'nt/inc/inttypes.h'
--- nt/inc/inttypes.h	2011-05-06 12:09:08 +0000
+++ nt/inc/inttypes.h	2011-11-08 04:33:57 +0000
@@ -24,7 +24,13 @@
 #include_next <inttypes.h>
 #else  /* !__MINGW32__ */
 #include "stdint.h"
+#ifdef _WIN64
 #define strtoumax _strtoui64
+#define strtoimax _strtoi64
+#else
+#define strtoumax strtoul
+#define strtoimax strtol
+#endif
 #endif	/* !__MINGW32__ */
 
 #endif

=== modified file 'nt/inc/stdint.h'
--- nt/inc/stdint.h	2011-11-05 22:33:44 +0000
+++ nt/inc/stdint.h	2011-11-10 01:36:50 +0000
@@ -29,7 +29,9 @@
 
 #ifdef _WIN64
 typedef __int64 intptr_t;
-#define UINT64_MAX 18446744073709551616
+typedef unsigned int uint32_t;
+typedef unsigned __int64 uint64_t;
+#define UINT64_MAX (18446744073709551615i64)
 #define UINT64_MIN 0
 /* "i64" is the non-standard suffix used by MSVC for 64-bit constants.  */
 #define INT64_MAX 9223372036854775807i64
@@ -39,6 +41,8 @@
 #define UINTMAX_MIN UINT64_MIN
 #define INTMAX_MAX INT64_MAX
 #define INTMAX_MIN INT64_MIN
+#define uintmax_t unsigned __int64
+#define intmax_t __int64
 #else
 typedef int intptr_t;
 typedef unsigned int uint32_t;
@@ -51,10 +55,10 @@
 #define UINTMAX_MIN UINT32_MIN
 #define INTMAX_MAX INT32_MAX
 #define INTMAX_MIN INT32_MIN
+#define uintmax_t unsigned long
+#define intmax_t long
 #endif
 
-#define uintmax_t unsigned __int64
-#define intmax_t __int64
 #define PTRDIFF_MAX INTPTR_MAX
 
 #endif	/* !__GNUC__ */

=== modified file 'nt/nmake.defs'
--- nt/nmake.defs	2011-11-05 11:34:56 +0000
+++ nt/nmake.defs	2011-11-09 16:52:19 +0000
@@ -86,7 +86,11 @@
 !    if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
 ARCH		= ppc
 !    else
-!     error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
+!     if "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
+ARCH		= AMD64
+!     else
+!      error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
+!     endif
 !    endif
 !   endif
 !  endif
@@ -164,7 +168,11 @@
 
 # see comments in allocate_heap in w32heap.c before changing any of the
 # -stack, -heap, or -base settings.
+!if "$(ARCH)" == "AMD64"
+TEMACS_EXTRA_LINK = -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -pdb:$(BLD)\temacs.pdb -machine:x64 $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK)
+!else
 TEMACS_EXTRA_LINK = -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -pdb:$(BLD)\temacs.pdb -machine:$(ARCH) $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK)
+!endif
 
 !ifdef NOOPT
 OBJDIR          = obj
@@ -234,11 +242,24 @@
 ARCH_LDFLAGS	= $(SYS_LDFLAGS)
 
 !else
+!if "$(ARCH)" == "AMD64"
+# These flags are a guess...if they don't work, please send me mail.
+!ifdef NOOPT
+#ARCH_CFLAGS     = -nologo -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG)
+ARCH_CFLAGS     = -nologo -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -c -Zl -Zp8 -W2 -Od -Gd $(DEBUG_FLAG)
+!else
+#ARCH_CFLAGS     = -nologo -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG)
+ARCH_CFLAGS     = -nologo -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -c -Zl -Zp8 -W2 -Oi -Ot -Oy- -Ob2 -GF -Gy -Gd $(DEBUG_FLAG)
+!endif
+ARCH_LDFLAGS	= $(SYS_LDFLAGS) -machine:x64
+
+!else
 !ERROR Unknown architecture type "$(ARCH)".
 !endif
 !endif
 !endif
 !endif
+!endif
 
 LINK_FLAGS	= $(ARCH_LDFLAGS) $(DEBUG_LINK) $(USER_LDFLAGS)
 

=== modified file 'src/lisp.h'
--- src/lisp.h	2011-11-07 17:04:01 +0000
+++ src/lisp.h	2011-11-10 17:24:14 +0000
@@ -163,14 +163,23 @@
 /* First, try and define DECL_ALIGN(type,var) which declares a static
    variable VAR of type TYPE with the added requirement that it be
    TYPEBITS-aligned.  */
+
+#ifndef GCTYPEBITS
+#define GCTYPEBITS 3
+#endif
+
 #ifndef NO_DECL_ALIGN
 # ifndef DECL_ALIGN
 #  if HAVE_ATTRIBUTE_ALIGNED
 #   define DECL_ALIGN(type, var) \
      type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
 #  elif defined(_MSC_VER)
+#   define ALIGN_GCTYPEBITS 8
+#   if (1 << GCTYPEBITS) != ALIGN_GCTYPEBITS
+#    error ALIGN_GCTYPEBITS is wrong!
+#   endif
 #   define DECL_ALIGN(type, var) \
-     type __declspec(align(1 << GCTYPEBITS)) var
+     type __declspec(align(ALIGN_GCTYPEBITS)) var
 #  else
      /* What directives do other compilers use?  */
 #  endif
@@ -300,10 +309,6 @@
     Lisp_Fwd_Kboard_Obj,	/* Fwd to a Lisp_Object field of kboards.  */
   };
 
-#ifndef GCTYPEBITS
-#define GCTYPEBITS 3
-#endif
-
 /* These values are overridden by the m- file on some machines.  */
 #ifndef VALBITS
 #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS)

=== modified file 'src/m/amdx86-64.h'
--- src/m/amdx86-64.h	2011-04-19 00:34:42 +0000
+++ src/m/amdx86-64.h	2011-11-08 16:00:11 +0000
@@ -27,9 +27,17 @@
 /* __x86_64 defined automatically.  */
 
 /* Define the type to use.  */
+#ifdef _WIN64
+#define EMACS_INT               __int64
+#define pI			"i64"
+#define EMACS_UINT              unsigned __int64
+#define VIRT_ADDR_VARIES
+#define DATA_START 	get_data_start ()
+#else
 #define EMACS_INT               long
 #define pI			"l"
 #define EMACS_UINT              unsigned long
+#endif
 
 /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
 #undef DATA_SEG_BITS

=== modified file 'src/makefile.w32-in'
--- src/makefile.w32-in	2011-11-05 22:55:08 +0000
+++ src/makefile.w32-in	2011-11-10 02:16:49 +0000
@@ -177,7 +177,7 @@
 $(TEMACS):      $(TLIB0) $(TLIB1) $(TLIB2) $(TLASTLIB) $(TOBJ) $(TRES) \
 		  ../nt/$(BLD)/addsection.exe $(GNULIB)
 	$(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
-	"$(THISDIR)/../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 21
+	"$(THISDIR)/../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 42
 
 # These omit firstfile.${O}, but there's no documentation in there
 # anyways.

=== modified file 'src/s/ms-w32.h'
--- src/s/ms-w32.h	2011-11-05 16:30:13 +0000
+++ src/s/ms-w32.h	2011-11-10 17:46:07 +0000
@@ -275,11 +275,13 @@
 #define popen     _popen
 #define pclose    _pclose
 #define umask	  _umask
-#define utimbuf	  _utimbuf
+#define snprintf  _snprintf
 #define strdup    _strdup
+#define strtoll   _strtoi64
 #define strupr    _strupr
 #define strnicmp  _strnicmp
 #define stricmp   _stricmp
+/* #define tzname    _tzname */
 #define tzset     _tzset
 
 #if !defined (_MSC_VER) || (_MSC_VER < 1400)
@@ -335,7 +337,7 @@
 #define _WINSOCK_H
 
 /* Defines size_t and alloca ().  */
-#if (defined(_MSC_VER) && defined(emacs)) || defined(USE_CRT_DLL)
+#if (defined(_MSC_VER) && defined(emacs))
 #define malloc e_malloc
 #define free   e_free
 #define realloc e_realloc

=== modified file 'src/w32.c'
--- src/w32.c	2011-11-07 16:42:34 +0000
+++ src/w32.c	2011-11-10 17:46:50 +0000
@@ -1665,10 +1665,10 @@
 
       if (!GetModuleFileName (NULL, modname, MAX_PATH))
 	abort ();
+
       if ((p = strrchr (modname, '\\')) == NULL)
 	abort ();
       *p = 0;
-
       if ((p = strrchr (modname, '\\')) && xstrcasecmp (p, "\\bin") == 0)
 	{
 	  char buf[SET_ENV_BUF_SIZE];
@@ -1685,7 +1685,8 @@
       /* FIXME: should use substring of get_emacs_configuration ().
 	 But I don't think the Windows build supports alpha, mips etc
          anymore, so have taken the easy option for now.  */
-      else if (p && xstrcasecmp (p, "\\i386") == 0)
+      else if (p && (xstrcasecmp (p, "\\i386") == 0
+                     || xstrcasecmp (p, "\\AMD64") == 0))
 	{
 	  *p = 0;
 	  p = strrchr (modname, '\\');

=== modified file 'src/xdisp.c'
--- src/xdisp.c	2011-11-08 20:05:27 +0000
+++ src/xdisp.c	2011-11-10 17:20:07 +0000
@@ -1086,7 +1086,11 @@
    area AREA of window W.  AREA < 0 means return the right edge of the
    whole window, to the left of the right fringe of W.  */
 
+#ifdef _MSC_VER
 int
+#else
+inline int
+#endif
 window_box_right_offset (struct window *w, int area)
 {
   return window_box_left_offset (w, area) + window_box_width (w, area);
@@ -1116,7 +1120,11 @@
    area AREA of window W.  AREA < 0 means return the right edge of the
    whole window, to the left of the right fringe of W.  */
 
+#ifdef _MSC_VER
 int
+#else
+inline int
+#endif
 window_box_right (struct window *w, int area)
 {
   return window_box_left (w, area) + window_box_width (w, area);


[-- Attachment #3: emacs-x64.manifest --]
[-- Type: application/octet-stream, Size: 821 bytes --]

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
                        version="6.0.0.0" processorArchitecture="AMD64"
                        publicKeyToken="6595b64144ccf1df"
                        language="*"/>
    </dependentAssembly>
  </dependency>
  <assemblyIdentity version="1.0.0.0" processorArchitecture="AMD64"
		    name="emacs" type="win32"/>
  <description>GNU Emacs</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

[-- Attachment #4: w32compat.h --]
[-- Type: text/x-chdr, Size: 6010 bytes --]


#ifndef _W32COMPAT_H_
#define _W32COMPAT_H_ 1

#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#include <conio.h>
#include <direct.h>
#include <malloc.h>
#include <../include/process.h>
#include <time.h>
#include <sys/types.h>
#define dev_t _dev_t
#define fstat _fstat
#define chmod _chmod
#include <sys/stat.h>
#include <../include/sys/time.h>
#include <sys/utime.h>
#include <sys/locking.h>

#include <signal.h>
typedef unsigned int sigset_t;

typedef unsigned int ssize_t;

#ifndef _WIN64
typedef unsigned short mode_t;
#endif

#if 0
struct timezone
  {
    int	tz_minuteswest;	/* minutes west of Greenwich */
    int	tz_dsttime;	/* type of dst correction */
  };
#endif

void gettimeofday (struct timeval *, struct timezone *);
struct tm *gmtime_r (time_t const * __restrict, struct tm * __restrict);
struct tm *localtime_r (time_t const * __restrict, struct tm * __restrict);

#include <string.h>
#include <mbstring.h>

#define inline __inline

#ifndef O_RDONLY
#define O_RDONLY _O_RDONLY
#endif
#ifndef O_WRONLY
#define O_WRONLY _O_WRONLY
#endif
#ifndef O_RDWR
#define O_RDWR _O_RDWR
#endif
#ifndef O_APPEND
#define O_APPEND _O_APPEND
#endif
#ifndef O_CREAT
#define O_CREAT _O_CREAT
#endif
#ifndef O_TRUNC
#define O_TRUNC _O_TRUNC
#endif
#ifndef O_EXCL
#define O_EXCL _O_EXCL
#endif
#ifndef O_TEXT
#define O_TEXT _O_TEXT
#endif
#ifndef O_BINARY
#define O_BINARY _O_BINARY
#endif
#ifndef O_RAW
#define O_RAW           _O_BINARY
#endif
#ifndef O_TEMPORARY
#define O_TEMPORARY     _O_TEMPORARY
#endif
#ifndef O_NOINHERIT
#define O_NOINHERIT     _O_NOINHERIT
#endif
#ifndef O_SEQUENTIAL
#define O_SEQUENTIAL    _O_SEQUENTIAL
#endif
#ifndef O_RANDOM
#define O_RANDOM        _O_RANDOM
#endif

#define alloca _alloca
#define stricmp _stricmp

#define access _access
#define chmod _chmod
#define chsize _chsize
#define close _close
#define creat _creat
#define dup _dup
#define dup2 _dup2
#if 0
/* This one conflicts with texk/web2/lib/eofeoln.c */
#define eof _eof
#endif
#define filelength _filelength
#define isatty _isatty
#define locking _locking
#define lseek _lseek
#define mktemp _mktemp
#define open _open
#define read _read
#define setmode _setmode
#define sopen _sopen
#define tell _tell
#define umask _umask
#define unlink _unlink
#define write _write

#define cgets _cgets
#define cprintf _cprintf
#define cputs _cputs
#define cscanf _cscanf
#define inp _inp
#define inpw _inpw
#define getch _getch
#define getche _getche
#define kbhit _kbhit
#define outp _outp
#define outpw _outpw
#define putch _putch
#define ungetch _ungetch

#define chdir _chdir
#define getcwd _getcwd
#define mkdir _mkdir
#define rmdir _rmdir

#define CLK_TCK  CLOCKS_PER_SEC

#if _MSC_VER <= 1310
#define timezone _timezone
#endif
#define daylight _daylight
#define tzname _tzname
#define tzset _tzset

#define P_WAIT          _P_WAIT
#define P_NOWAIT        _P_NOWAIT
#define P_OVERLAY       _P_OVERLAY
#define OLD_P_OVERLAY   _OLD_P_OVERLAY
#define P_NOWAITO       _P_NOWAITO
#define P_DETACH        _P_DETACH
#define WAIT_CHILD      _WAIT_CHILD
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD

#define cwait _cwait
#define execl _execl
#define execle _execle
#define execlp _execlp
#define execlpe _execlpe
#define execv _execv
#define execve _execve
#define execvp _execvp
#define execvpe _execvpe
#define spawnl _spawnl
#define spawnle _spawnle
#define spawnlp _spawnlp
#define spawnlpe _spawnlpe
#define spawnv _spawnv
#define spawnve _spawnve
#define spawnvp _spawnvp
#define spawnvpe _spawnvpe

#define getpid _getpid

#define P_tmpdir  _P_tmpdir
#define SYS_OPEN  _SYS_OPEN

#define fcloseall _fcloseall
#define fdopen _fdopen
#define fgetchar _fgetchar
#define fileno _fileno
#define flushall _flushall
#define fputchar _fputchar
#define getw _getw
#define putw _putw
#define rmtmp _rmtmp
#define tempnam _tempnam
#define unlink _unlink

#define sys_errlist _sys_errlist
#define sys_nerr    _sys_nerr
#define environ     _environ

#define onexit_t _onexit_t

#define ecvt _ecvt
#define fcvt _fcvt
#define gcvt _gcvt
#define itoa _itoa
#define ltoa _ltoa
#define onexit _onexit
#define putenv _putenv
#define swab _swab
#define ultoa _ultoa

#ifndef S_IFMT
#define S_IFMT _S_IFMT
#endif
#ifndef S_IFDIR
#define S_IFDIR _S_IFDIR
#endif
#ifndef S_IFCHR
#define S_IFCHR _S_IFCHR
#endif
#ifndef S_IFIFO
#define S_IFIFO _S_IFIFO
#endif
#ifndef S_IFREG
#define S_IFREG _S_IFREG
#endif
#ifndef S_IREAD
#define S_IREAD _S_IREAD
#endif
#ifndef S_IWRITE
#define S_IWRITE _S_IWRITE
#endif
#ifndef S_IEXEC
#define S_IEXEC  _S_IEXEC
#endif
#ifndef S_IXUSR
#define S_IXUSR _S_IEXEC
#endif
#ifndef S_IXGRP
#define S_IXGRP _S_IEXEC
#endif
#ifndef S_IXOTH
#define S_IXOTH _S_IEXEC
#endif
#ifndef S_IRUSR
#define S_IRUSR _S_IREAD
#endif
#ifndef S_IRGRP
#define S_IRGRP _S_IREAD
#endif
#ifndef S_IROTH
#define S_IROTH _S_IREAD
#endif
#ifndef S_IWUSR
#define S_IWUSR _S_IWRITE
#endif
#ifndef S_IWGRP
#define S_IWGRP _S_IWRITE
#endif
#ifndef S_IWOTH
#define S_IWOTH _S_IWRITE
#endif

#if 0
#define stat _stat64i32
#endif

typedef long off_t;

/* from string.h */
#define memccpy _memccpy
#define memicmp _memicmp
#define strcmpi _strcmpi
#define stricmp _stricmp
#define strdup _strdup
#define strlwr _strlwr
#define strnicmp _strnicmp
#define strnset _strnset
#define strrev _strrev
#define strset _strset
#define strupr _strupr
#define wcsdup _wcsdup

#define isascii __isascii
#define toascii __toascii
#define iscsymf __iscsymf
#define iscsym  __iscsym

#define timeb __timeb32

#define ftime _ftime

#define utimbuf _utimbuf
#define utime _utime

#define locking _locking
#define LK_LOCK _LK_LOCK
#define LK_NBLCK _LK_NBLCK
#define LK_NBRLCK _LK_NBRLCK
#define LK_RLCK _LK_RLCK
#define LK_UNLCK _LK_UNLCK

#endif

  reply	other threads:[~2011-11-10 19:56 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <loom.20101206T214649-301@post.gmane.org>
     [not found] ` <83sjy5279e.fsf@gnu.org>
     [not found]   ` <AANLkTikmhiNmd5gz8wkpqbgHni2LKkjhTtnPizaOEz7T@mail.gmail.com>
2011-11-05 11:19     ` bug#9960: Compiling Emacs trunk with MSVC Eli Zaretskii
2011-11-05 11:39       ` Eli Zaretskii
2011-11-05 12:54         ` Christoph Scholtes
2011-11-05 13:22           ` Eli Zaretskii
2011-11-05 13:58             ` Christoph Scholtes
2011-11-05 14:16               ` Eli Zaretskii
2011-11-05 14:53                 ` Eli Zaretskii
2011-11-05 15:51                   ` Óscar Fuentes
2011-11-05 16:10                     ` Eli Zaretskii
2011-11-05 16:27                 ` Christoph Scholtes
2011-11-05 16:50                   ` Eli Zaretskii
2011-11-05 16:57                     ` Eli Zaretskii
2011-11-05 17:22                     ` Christoph Scholtes
2011-11-05 18:20                       ` Christoph Scholtes
2011-11-05 19:33                         ` Eli Zaretskii
2011-11-05 20:38                           ` Christoph Scholtes
2011-11-05 21:11                             ` Eli Zaretskii
2011-11-05 22:07                               ` Christoph Scholtes
2011-11-05 22:15                                 ` Christoph Scholtes
2011-11-05 22:22                                   ` Christoph Scholtes
2011-11-06  4:03                                     ` Eli Zaretskii
2011-11-05 20:32                         ` Christoph Scholtes
2011-11-05 21:27                           ` Eli Zaretskii
2011-11-05 22:23                             ` Christoph Scholtes
2011-11-06  1:50                               ` Christoph Scholtes
2011-11-06  5:47                                 ` Eli Zaretskii
2011-11-06  5:37                               ` Eli Zaretskii
2011-11-07 16:13                             ` Fabrice Popineau
2011-11-07 16:57                               ` Eli Zaretskii
     [not found]                                 ` <CAFgFV9N4w+wi4J84BhoEZrgAuwJdFZtWzOAkdb_T9+B7L+Ftfg@mail.gmail.com>
2011-11-08 16:51                                   ` Eli Zaretskii
2011-11-07 17:03                               ` Eli Zaretskii
2011-11-10 19:56                                 ` Fabrice Popineau [this message]
2011-11-10 20:28                                   ` Lennart Borgman
2011-11-10 20:31                                     ` Juanma Barranquero
2011-11-10 20:29                                   ` Juanma Barranquero
2011-11-20 20:59                                     ` Fabrice Popineau
2011-11-20 21:15                                       ` Juanma Barranquero
2011-11-20 21:35                                         ` Dan Nicolaescu
2011-11-20 21:40                                           ` Juanma Barranquero
2011-11-21  2:30                                         ` Stefan Monnier
2011-11-21  2:45                                           ` Juanma Barranquero
2011-11-21  3:51                                             ` Eli Zaretskii
2011-11-21  8:21                                               ` Andreas Schwab
2011-11-21  9:54                                                 ` Eli Zaretskii
2011-11-21 12:14                                               ` Juanma Barranquero
2011-11-21 13:56                                                 ` Eli Zaretskii
2011-12-04  8:06                                                   ` Fabrice Popineau
2011-12-05  5:11                                                     ` Eli Zaretskii
2011-11-21 15:55                                       ` Richard Stallman
2011-11-11  9:39                                   ` Eli Zaretskii
2011-11-11 19:28                                     ` Fabrice Popineau
2011-11-11 19:53                                       ` Eli Zaretskii
2011-11-11 21:55                                         ` Fabrice Popineau
2011-11-12 13:50                                           ` Eli Zaretskii
2011-11-12 14:34                                             ` Fabrice Popineau
2011-11-12 15:59                                               ` Óscar Fuentes
2011-11-12 23:32                                                 ` Richard Stallman
2011-11-12 14:27                                       ` Eli Zaretskii
2011-11-12 17:55                                         ` Fabrice Popineau
2011-11-12 20:48                                           ` Eli Zaretskii
2011-11-12 22:27                                             ` Fabrice Popineau
2011-11-12 22:44                                               ` Fabrice Popineau
2011-11-12 23:08                                                 ` Fabrice Popineau
2011-11-13 14:45                                                   ` Christoph Scholtes
2011-11-27 19:05                                       ` Eli Zaretskii
2011-11-28  9:18                                         ` YAMAMOTO Mitsuharu
2011-11-28 11:51                                           ` Eli Zaretskii
2011-11-28 19:07                                         ` Fabrice Popineau
2012-03-24 13:46                                           ` Eli Zaretskii
2012-03-24 16:10                                             ` Fabrice Popineau
2012-03-24 18:42                                               ` Eli Zaretskii
2011-11-12 17:10                                   ` Christoph Scholtes
2011-11-12 20:37                                     ` Eli Zaretskii
2011-11-05 23:44         ` Fabrice Popineau
2011-11-06  3:42           ` Christoph Scholtes
2011-11-06  4:02           ` Eli Zaretskii
2011-11-08  6:43       ` bug#9960: fix for Bug#9772 should also help fix Bug#9960 Paul Eggert
2011-11-28  9:34       ` bug#9960: "emacsclient.c (main) <environ>: Remove declaration, " breaks build on Mac OS X David Caldwell
2011-11-28 17:29       ` bug#9960: : " Leon Zhang
2011-11-30 15:48       ` bug#9960: Compiling Emacs trunk with MSVC Tim Crews
2011-11-30 16:30         ` Tim Crews
2011-11-30 18:04         ` Eli Zaretskii
2011-11-30 18:22           ` Tim Crews
2011-11-30 19:17             ` Eli Zaretskii
2011-11-30 19:42               ` Tim Crews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFgFV9M4=B+JzgP+NVHLcwDoQU=-JcNm6HaH_NUG7YNg1K7rBg@mail.gmail.com' \
    --to=fabrice.popineau@supelec.fr \
    --cc=9960@debbugs.gnu.org \
    --cc=cschol2112@googlemail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).