Subject: | cygwin cpu desc |
Cygwin is obviously more Linux like than Windows.
It has a working /proc/cpuinfo
without patch:
$ ./sysinfo.pl
Use of uninitialized value in transliteration (tr///) at
/usr/src/perl/.smoke/Test/Smoke/SysInfo.pm
line 664.
Use of uninitialized value in hex at
/usr/src/perl/.smoke/Test/Smoke/SysInfo.pm line 666.
Use of uninitialized value in pattern match (m//) at
/usr/src/perl/.smoke/Test/Smoke/SysInfo.pm line
670.
Hostname : reini
Number of CPU's : 2
Processor type : x86
Processor description: (~0 MHz)
OS and version : cygwin_nt-5.1 - 1.5.25(0.156/4/2)
with patch:
$ ./sysinfo.pl
Hostname : reini
Number of CPU's : 2
Processor type : i686
Processor description: Intel(R) Pentium(R) D CPU 2.80GHz (GenuineIntel
2799MHz)
OS and version : cygwin_nt-5.1 - 1.5.25(0.156/4/2)
--
Reini Urban
Subject: | Test-Smoke-1.32-cygwin.patch |
difforig Test-Smoke-1.32-sfs_HO
2008-05-03 Reini Urban <rurban@x-ray.at>
diff -ub Test-Smoke-1.32-sfs_HO/lib/Test/Smoke/SysInfo.pm.orig
--- Test-Smoke-1.32-sfs_HO/lib/Test/Smoke/SysInfo.pm.orig 2008-05-03 00:26:09.000000000 +0000
+++ Test-Smoke-1.32-sfs_HO/lib/Test/Smoke/SysInfo.pm 2008-05-03 14:58:29.906250000 +0000
@@ -61,14 +61,15 @@
$chk_os =~ /hp-?ux/i && return bless HPUX(), $class;
- $chk_os =~ /linux/i && return bless Linux(), $class;
+ $chk_os =~ /linux|cygwin/i
+ && return bless Linux(), $class;
$chk_os =~ /irix/i && return bless IRIX(), $class;
- $chk_os =~ /solaris|sunos|osf/i
+ $chk_os =~ /solaris|sunos|osf/i
&& return bless Solaris(), $class;
- $chk_os =~ /cygwin|mswin32|windows/i
+ $chk_os =~ /mswin32|windows/i
&& return bless Windows(), $class;
$chk_os =~ /VMS/ && return bless VMS(), $class;