diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-12 12:49:00 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-12 12:49:00 +0200 |
commit | 2551782dc3fdb3baa1e97310223fc8e3c51cf6c9 (patch) | |
tree | 0ce03a545bad41a76a87037012bd107c2a9823dd /gcc/ada/adaint.c | |
parent | f0709ca650996f4df1d8d9a7015b8dc127ea3ed3 (diff) | |
download | gcc-2551782dc3fdb3baa1e97310223fc8e3c51cf6c9.zip gcc-2551782dc3fdb3baa1e97310223fc8e3c51cf6c9.tar.gz gcc-2551782dc3fdb3baa1e97310223fc8e3c51cf6c9.tar.bz2 |
[multiple changes]
2010-10-12 Pascal Obry <obry@adacore.com>
* adaint.c (__gnat_number_of_cpus): Add implementation for Windows.
2010-10-12 Arnaud Charlet <charlet@adacore.com>
* make.adb (Globalize): New procedure.
(Compile): Set Do_Codepeer_Globalize_Step when -gnatC is used.
(Gnatmake): Call Globalize when needed.
(Process_Restrictions_Or_Restriction_Warnings): Ignore Restrictions
pragmas in CodePeer mode.
(Adjust_Global_Switches): Set No_Initialize_Scalars in CodePeer mode,
to generate simpler and consistent code.
2010-10-12 Bob Duff <duff@adacore.com>
* exp_util.adb (Remove_Side_Effects): Disable previous change,
can cause side effects to be duplicated.
From-SVN: r165359
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 51e2bb7..982ae11 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -2384,6 +2384,10 @@ __gnat_number_of_cpus (void) if (pstat_getdynamic (&psd, sizeof (psd), 1, 0) != -1) cores = (int) psd.psd_proc_cnt; +#elif defined (_WIN32) + SYSTEM_INFO sysinfo; + GetSystemInfo (&sysinfo); + cores = (int) sysinfo.dwNumberOfProcessors; #endif return cores; |