Thank you very much for the help.
I attached a revised version of the patch.
Kornél
----- Original Message -----
From: "Robert Jordan" <[EMAIL PROTECTED]>
To: <mono-devel-list@lists.ximian.com>
Sent: Tuesday, March 11, 2008 12:04 AM
Subject: Re: [Mono-dev] [PATCH] [Windows] Define version macros
forWindowsSDK
Kornél Pál wrote:
CPPFLAGS are C-Pre-Processor-Flags. C++ variables start with CXX.
Thanks for both of you. Now I understand why Mono already used Unicode.
Modifying the variables didn't break the build and I see no meaning of
FD_SETSIZE on Windows. Is there any use of FD_SETSIZE on Windows?
Yes. It defaults to 64 which means that only 64 sockets can be
select(2)ed at once.
Robert
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Index: mono/configure.in
===================================================================
--- mono/configure.in (revision 97936)
+++ mono/configure.in (working copy)
@@ -70,7 +70,10 @@
export CC
fi
HOST_CC="gcc"
- CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024 -DUNICODE
-D_UNICODE"
+ # Windows 2000 is required that includes Internet Explorer 5.01
+ CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500
-D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
+ # export for libgc configure
+ export CPPFLAGS
libmono_cflags="-mno-cygwin"
libmono_ldflags="-mno-cygwin"
libdl=
Index: mono/mono/metadata/file-io.c
===================================================================
--- mono/mono/metadata/file-io.c (revision 97936)
+++ mono/mono/metadata/file-io.c (working copy)
@@ -11,10 +11,6 @@
#include <config.h>
-#ifdef PLATFORM_WIN32
-#define _WIN32_WINNT 0x0500
-#endif
-
#include <glib.h>
#include <string.h>
#include <errno.h>
Index: mono/mono/metadata/threads.c
===================================================================
--- mono/mono/metadata/threads.c (revision 97936)
+++ mono/mono/metadata/threads.c (working copy)
@@ -10,9 +10,6 @@
*/
#include <config.h>
-#ifdef PLATFORM_WIN32
-#define _WIN32_WINNT 0x0500
-#endif
#include <glib.h>
#include <signal.h>
Index: mono/mono/metadata/threadpool.c
===================================================================
--- mono/mono/metadata/threadpool.c (revision 97936)
+++ mono/mono/metadata/threadpool.c (working copy)
@@ -12,11 +12,6 @@
#include <config.h>
#include <glib.h>
-#ifdef PLATFORM_WIN32
-#define WINVER 0x0500
-#define _WIN32_WINNT 0x0500
-#endif
-
#define THREADS_PER_CPU 5 /* 20 + THREADS_PER_CPU * number of CPUs */
#include <mono/metadata/domain-internals.h>
Index: mono/mono/io-layer/io-layer.h
===================================================================
--- mono/mono/io-layer/io-layer.h (revision 97936)
+++ mono/mono/io-layer/io-layer.h (working copy)
@@ -14,7 +14,6 @@
#if defined(__WIN32__)
/* Native win32 */
#define __USE_W32_SOCKETS
-#define WINVER 0x0500 /* needed for CreateProcessWithLogonW */
#include <winsock2.h>
#include <windows.h>
#include <winbase.h>
Index: mono/mono/mini/mini.c
===================================================================
--- mono/mono/mini/mini.c (revision 97936)
+++ mono/mono/mini/mini.c (working copy)
@@ -26,10 +26,6 @@
#include <pthread.h>
#endif
-#ifdef PLATFORM_WIN32
-#define _WIN32_WINNT 0x0500
-#endif
-
#ifdef HAVE_VALGRIND_MEMCHECK_H
#include <valgrind/memcheck.h>
#endif
Index: mono/winconfig.h
===================================================================
--- mono/winconfig.h (revision 97936)
+++ mono/winconfig.h (working copy)
@@ -1,5 +1,39 @@
/* config.h. Generated by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Version macros for Windows SDK headers */
+#ifdef _WIN64
+#ifdef _M_IA64
+/* Windows XP 64-bit Edition (Itanium) is the first release that is based on
Windows XP */
+#define WINVER 0x0501
+#define _WIN32_WINNT 0x0501
+/* Includes Internet Explorer 6.0 */
+#define _WIN32_IE 0x0600
+#else /* !_M_IA64 */
+/* Windows XP Professional x64 Edition is the first release that is based on
Windows Server 2003 SP1 */
+#define WINVER 0x0502
+#define _WIN32_WINNT 0x0502
+/* Includes Internet Explorer 6.0 SP2 */
+#define _WIN32_IE 0x0603
+#endif /* _M_IA64 */
+#else /* !_WIN64 */
+/* Windows 2000 is required */
+#define WINVER 0x0500
+#define _WIN32_WINNT 0x0500
+/* Includes Internet Explorer 5.01 */
+#define _WIN32_IE 0x0501
+#endif /* _WIN64 */
+
+#ifndef _UNICODE
+#define _UNICODE
+#endif
+#ifndef UNICODE
+#define UNICODE
+#endif
+
+#define WIN32_THREADS
+#define FD_SETSIZE 1024
+
/* #undef HAVE_INET_PTON */
/* #undef HAVE_INET_ATON */
/* #undef HAVE_MSG_NOSIGNAL */
@@ -40,14 +74,19 @@
/* #undef HAVE_WORKING_SIGALTSTACK */
/* The architecture this is running on */
+#if defined(_M_IA64)
+#define ARCHITECTURE "ia64"
+#elif defined(_M_X64)
+#define ARCHITECTURE "amd64"
+#elif defined(_M_IX86)
#define ARCHITECTURE "x86"
+#else
+#error Unknown architecture
+#endif
/* String of disabled features */
#define DISABLED_FEATURES "none"
-/* Have GetProcessId */
-#define HAVE_GETPROCESSID 1
-
/* Disable AOT support */
/* #undef DISABLE_AOT */
@@ -151,7 +190,9 @@
/* #undef HAVE_GETGRNAM_R */
/* Define to 1 if you have the `GetProcessId' function. */
-/* #undef HAVE_GETPROCESSID */
+#if (_WIN32_WINNT >= 0x0502)
+#define HAVE_GETPROCESSID 1
+#endif
/* Define to 1 if you have the `getpwnam_r' function. */
/* #undef HAVE_GETPWNAM_R */
@@ -430,7 +471,11 @@
/* #undef SIZEOF_SIZE_T */
/* The size of a `void *', as computed by sizeof. */
+#ifdef _WIN64
+#define SIZEOF_VOID_P 8
+#else
#define SIZEOF_VOID_P 4
+#endif
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
@@ -439,8 +484,4 @@
#define USED_GC_NAME "Included Boehm (with typed GC)"
/* Version number of package */
-#define VERSION "1.2"
-
-#define WINVER 0x0500
-
-#define _WIN32_WINNT 0x0500
\ No newline at end of file
+#define VERSION "1.9"
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list