diff --git a/ChangeLog b/ChangeLog index 56246e6e9..aaa4d5503 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Source/win32/GSFileHandleWin32.m: Ignore extraneous write events. * Source/NSString.m: Don't insert native path separators by default. + * Source/NSProcessInfo.m: Report correct operating system on windows. 2006-02-07 Richard Frith-Macdonald diff --git a/Headers/Foundation/NSProcessInfo.h b/Headers/Foundation/NSProcessInfo.h index 4f918fe1a..5e672a3c4 100644 --- a/Headers/Foundation/NSProcessInfo.h +++ b/Headers/Foundation/NSProcessInfo.h @@ -51,7 +51,8 @@ enum { NSOSF1OperatingSystem, NSGNULinuxOperatingSystem = 100, NSBSDOperatingSystem, - NSBeOperatingSystem + NSBeOperatingSystem, + NSCygwinOperatingSystem }; #endif diff --git a/Source/NSProcessInfo.m b/Source/NSProcessInfo.m index 91d3c7afa..182c48b6e 100644 --- a/Source/NSProcessInfo.m +++ b/Source/NSProcessInfo.m @@ -936,6 +936,7 @@ int main(int argc, char *argv[], char *env[]) * NSOSF1OperatingSystem - probably never to be implemented * NSGNULinuxOperatingSystem - the GNUstep 'standard' * NSBSDOperatingSystem - BSD derived operating systems + * NSCygwinOperatingSystem - cygwin unix-like environment * */ - (unsigned int) operatingSystem @@ -950,13 +951,13 @@ int main(int argc, char *argv[], char *env[]) { os = NSGNULinuxOperatingSystem; } - else if ([n isEqualToString: @"mingw"] == YES) + else if ([n hasPrefix: @"mingw"] == YES) { os = NSWindowsNTOperatingSystem; } else if ([n isEqualToString: @"cygwin"] == YES) { - os = NSWindowsNTOperatingSystem; + os = NSCygwinOperatingSystem; } else if ([n hasPrefix: @"bsd"] == YES) {