Skip to content

Commit

Permalink
Moved Windows version macros to CPPFLAGS in configure.in from individ…
Browse files Browse the repository at this point in the history
…ual source files to ensure Windows version compatibility; winconfig.h: Added compile-time feature detection and support for 64-bit Windows versions. Updated VERSION to 1.9.

svn path=/trunk/mono/; revision=98664
  • Loading branch information
kornelpal committed Mar 20, 2008
1 parent 5f7aee4 commit 5a5b001
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 28 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2008-03-20 Kornél Pál <[email protected]>

* configure.in: Added Windows version macros to CPPFLAGS and export
CPPFLAGS for libgc configure to ensure Windows version compatibility.
* winconfig.h: Added compile-time feature detection and support for
64-bit Windows versions. Updated VERSION to 1.9.

2008-03-19 Zoltan Varga <[email protected]>

* configure.in: Fix a typo.
Expand Down
5 changes: 4 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ case "$host" in
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=
Expand Down
3 changes: 3 additions & 0 deletions mono/io-layer/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2008-03-20 Kornél Pál <[email protected]>

* io-layer.h: Removed Windows version macros.

Thu Mar 13 16:24:53 CET 2008 Paolo Molaro <[email protected]>

Expand Down
1 change: 0 additions & 1 deletion mono/io-layer/io-layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 5 additions & 0 deletions mono/metadata/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2008-03-20 Kornél Pál <[email protected]>

* file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
version macros.

2008-03-20 Mark Probst <[email protected]>

* generic-sharing.c, class-internals.h: Code for putting
Expand Down
4 changes: 0 additions & 4 deletions mono/metadata/file-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

#include <config.h>

#ifdef PLATFORM_WIN32
#define _WIN32_WINNT 0x0500
#endif

#include <glib.h>
#include <string.h>
#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion mono/metadata/filewatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <mono/metadata/filewatcher.h>
#include <mono/metadata/marshal.h>
#include <mono/utils/mono-dl.h>
#if (defined (PLATFORM_WIN32) && WINVER >= 0x0400)
#ifdef PLATFORM_WIN32

/*
* TODO:
Expand Down
5 changes: 0 additions & 5 deletions mono/metadata/threadpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 0 additions & 3 deletions mono/metadata/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
*/

#include <config.h>
#ifdef PLATFORM_WIN32
#define _WIN32_WINNT 0x0500
#endif

#include <glib.h>
#include <signal.h>
Expand Down
4 changes: 4 additions & 0 deletions mono/mini/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2008-03-20 Korn�l P�l <[email protected]>

* mini.c: Removed Windows version macros.

2008-03-20 Mark Probst <[email protected]>

* generic-sharing.c: Put reflection types in the extensible part
Expand Down
4 changes: 0 additions & 4 deletions mono/mini/mini.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
59 changes: 50 additions & 9 deletions winconfig.h
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -40,14 +74,19 @@
/* #undef HAVE_WORKING_SIGALTSTACK */

/* The architecture this is running on */
#if defined(_M_IA64)
#define ARCHITECTURE "ia64"
#elif defined(_M_AMD64)
#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 */

Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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
Expand All @@ -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
#define VERSION "1.9"

0 comments on commit 5a5b001

Please sign in to comment.