equal
deleted
inserted
replaced
|
1 #!perl |
|
2 # os_version_h.PL |
|
3 # |
|
4 # Copyright (c) 2010 Accenture. All rights reserved. |
|
5 # This component and the accompanying materials are made available |
|
6 # under the terms of the "Eclipse Public License v1.0" |
|
7 # which accompanies this distribution, and is available |
|
8 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 # |
|
10 # Initial Contributors: |
|
11 # Accenture - Initial contribution |
|
12 # |
|
13 |
|
14 use strict; |
|
15 die "Error: not running on Win32; Win32Conole must be updated/replaced for this OS: $^O\n" unless $^O =~ m|Win32|; |
|
16 require Win32; |
|
17 |
|
18 my @ver = Win32::GetOSVersion(); |
|
19 my ($string, $major, $minor, $build, $id) = @ver; |
|
20 |
|
21 my $ver = sprintf("%02x%02s", $major, $minor); |
|
22 |
|
23 print <<__EOS__; |
|
24 // os_version.h |
|
25 // This header is automatically generated by os_version_h.PL; do not edit it directly, edit |
|
26 // win_version_h.PL instead. |
|
27 |
|
28 #ifndef __OS_VERSION_H__ |
|
29 #define __OS_VERSION_H__ |
|
30 |
|
31 #define _WIN32_WINNT 0x$ver |
|
32 |
|
33 #endif // __OS_VERSION_H__ |
|
34 __EOS__ |