changeset 31119:afa1f54fb948

(malloc, free, realloc, calloc): Rename if USE_CRT_DLL is defined, so Emacs can use GNU malloc even though it cannot override the CRT malloc. (_WINSOCK_H): Define to prevent normal winsock definitions from being used. (sys_nerr): Provide default definition. (strdup, strupr, strnicmp, stricmp, tzset, tzname): Map to same name with _ prepended. (NSIG): Define if not known. (get_emacs_configuration): Provide extern declaration. (get_emacs_configuration_options): Provide extern declaration. (EMACS_CONFIG_OPTIONS): Call get_emacs_configuration_options.
author Andrew Innes <andrewi@gnu.org>
date Tue, 22 Aug 2000 23:55:09 +0000
parents 37c389d61cee
children e1e9965e1cd1
files src/s/ms-w32.h
diffstat 1 files changed, 23 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/s/ms-w32.h	Tue Aug 22 23:53:39 2000 +0000
+++ b/src/s/ms-w32.h	Tue Aug 22 23:55:09 2000 +0000
@@ -370,6 +370,12 @@
 #define utimbuf	  _utimbuf
 #define index     strchr
 #define rindex    strrchr
+#define strdup    _strdup
+#define strupr    _strupr
+#define strnicmp  _strnicmp
+#define stricmp   _stricmp
+#define tzset     _tzset
+#define tzname    _tzname
 
 #ifdef HAVE_NTGUI
 #define abort	w32_abort
@@ -398,6 +404,10 @@
 #define SIGALRM 14              /* Alarm */
 #define SIGCHLD 18              /* Death of child */
 
+#ifndef NSIG
+#define NSIG 23
+#endif
+
 /* For integration with MSDOS support.  */
 #define getdisk()               (_getdrive () - 1)
 #ifdef emacs
@@ -406,15 +416,24 @@
 #define getdefdir(_drv, _buf)   _getdcwd (_drv, _buf, MAXPATHLEN)
 #endif
 
+extern char *get_emacs_configuration (void);
+extern char *get_emacs_configuration_options (void);
 #define EMACS_CONFIGURATION 	get_emacs_configuration ()
-#define EMACS_CONFIG_OPTIONS	"NT"	/* Not very meaningful yet.  */
+#define EMACS_CONFIG_OPTIONS	get_emacs_configuration_options ()
 
 /* Define this so that winsock.h definitions don't get included with
    windows.h.  For this to have proper effect, config.h must always be
    included before windows.h.  */
 #define _WINSOCKAPI_    1
+#define _WINSOCK_H
 
 /* Defines size_t and alloca ().  */
+#ifdef USE_CRT_DLL
+#define malloc e_malloc
+#define free   e_free
+#define realloc e_realloc
+#define calloc e_calloc
+#endif
 #include <malloc.h>
 
 #include <sys/stat.h>
@@ -431,6 +450,9 @@
 
 /* For proper declaration of environ.  */
 #include <stdlib.h>
+#ifndef sys_nerr
+#define sys_nerr _sys_nerr
+#endif
 #include <string.h>
 
 /* Emacs takes care of ensuring that these are defined.  */