diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2006-02-15 10:32:35 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2006-02-15 10:32:35 +0100 |
commit | 738819cdce8e966e04a3e83d305db2cfa9bdaa75 (patch) | |
tree | 8736f59d63ae4441980493f8f378c8eab142e59d /gcc/ada/sysdep.c | |
parent | ee45a6dda7e4170ad4ff320239f340a5ce17275a (diff) | |
download | gcc-738819cdce8e966e04a3e83d305db2cfa9bdaa75.zip gcc-738819cdce8e966e04a3e83d305db2cfa9bdaa75.tar.gz gcc-738819cdce8e966e04a3e83d305db2cfa9bdaa75.tar.bz2 |
s-parame-mingw.adb, [...]: Removed, replaced by s-parame.adb
* s-parame-mingw.adb, s-parame-linux.adb,
s-parame-solaris.adb: Removed, replaced by s-parame.adb
* s-parame-vxworks.ads: Fix typo.
* s-parame-vxworks.adb: New file.
* s-parame.adb: Version now used by all native platforms.
(Default_Stack_Size): Use 2 megs for default stack size and use
__gl_default_stack_size when available.
(Minimum_Stack_Size): Use 12K.
* s-taprop-mingw.adb: Set default stack size linker switch to 2megs.
(Create_Task): Refine implementation taking advantage of the XP stack
size support. On XP, we now create the thread using the flag
STACK_SIZE_PARAM_IS_A_RESERVATION.
* s-osinte-mingw.ads (Stack_Size_Param_Is_A_Reservation): New constant.
* sysdep.c (__gnat_is_windows_xp): New routine, returns 1 on Windows
XP and 0 on older Windows versions.
* interfac-vms.ads: Removed, no longer used.
From-SVN: r111034
Diffstat (limited to 'gcc/ada/sysdep.c')
-rw-r--r-- | gcc/ada/sysdep.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 03818b1..376a365 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2005 Free Software Foundation, Inc. * + * Copyright (C) 1992-2006, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -212,6 +212,8 @@ static void winflush_95 (void); static void winflush_nt (void); +int __gnat_is_windows_xp (void); + /* winflusfunction is set first to the winflushinit function which will check the OS version 95/98 or NT/2000 */ @@ -234,15 +236,40 @@ winflush_init (void) } -static void winflush_95 (void) +static void +winflush_95 (void) { FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); } -static void winflush_nt (void) +static void +winflush_nt (void) { /* Does nothing as there is no problem under NT. */ } + +int +__gnat_is_windows_xp (void) +{ + static int is_win_xp=0, is_win_xp_checked=0; + + if (!is_win_xp_checked) + { + OSVERSIONINFO version; + + is_win_xp_checked = 1; + + memset (&version, 0, sizeof (version)); + version.dwOSVersionInfoSize = sizeof (version); + + is_win_xp = GetVersionEx (&version) + && version.dwPlatformId == VER_PLATFORM_WIN32_NT + && (version.dwMajorVersion > 5 + || (version.dwMajorVersion == 5 && version.dwMinorVersion >= 1)); + } + return is_win_xp; +} + #endif #else |