diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-22 16:26:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-22 16:26:39 +0000 |
commit | ef83201f7818f12ae3b36f000c04ff19e844dccd (patch) | |
tree | a4603a252478b9eb84b443473e2f236a106652ed /win32/win32.c | |
parent | c84c001d930364ea07d4745390986d70d7f0f832 (diff) | |
download | ruby-ef83201f7818f12ae3b36f000c04ff19e844dccd.tar.gz ruby-ef83201f7818f12ae3b36f000c04ff19e844dccd.tar.xz ruby-ef83201f7818f12ae3b36f000c04ff19e844dccd.zip |
* file.c (test_identical): test if two files are identical.
* file.c (rb_f_test): support DOSISH systems where st_ino is not
reliable. fixed: [ruby-core:06672]
* win32.h, win32.c (rb_w32_osid): check the running platform.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/win32/win32.c b/win32/win32.c index 07130a46a..d9ab68a90 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -44,12 +44,6 @@ #undef close #undef setsockopt -#ifdef _M_IX86 -# define WIN95 1 -#else -# undef WIN95 -#endif - #if defined __BORLANDC__ || defined _WIN32_WCE # define _filbuf _fgetc # define _flsbuf _fputc @@ -204,10 +198,10 @@ map_errno(DWORD winerr) static char *NTLoginName; #ifdef WIN95 -DWORD Win32System = (DWORD)-1; +static DWORD Win32System = (DWORD)-1; -static DWORD -IdOS(void) +DWORD +rb_w32_osid(void) { static OSVERSIONINFO osver; @@ -219,21 +213,11 @@ IdOS(void) } return (Win32System); } - -static int -IsWin95(void) { - return (IdOS() == VER_PLATFORM_WIN32_WINDOWS); -} - -static int -IsWinNT(void) { - return (IdOS() == VER_PLATFORM_WIN32_NT); -} -#else -# define IsWinNT() TRUE -# define IsWin95() FALSE #endif +#define IsWinNT() rb_w32_iswinnt() +#define IsWin95() rb_w32_iswin95() + /* main thread constants */ static struct { HANDLE handle; |