mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Minor mingw fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15539 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
abfcff669d
commit
781772708f
3 changed files with 21 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-01-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSLock.m:
|
||||
* Source/NSPage.m:
|
||||
Mingw fixes ... problems reported by Fred.
|
||||
|
||||
2003-01-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSConcreteNumber.m: ([compare:]) explicitly cast to promote
|
||||
|
|
|
@ -162,11 +162,15 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
{
|
||||
return NO;
|
||||
}
|
||||
#if defined(__MINGW__)
|
||||
Sleep(250); // 0.25 second
|
||||
#else
|
||||
/*
|
||||
* This should probably be more accurate like usleep(250)
|
||||
* but usleep is known to NOT be thread safe under all architectures.
|
||||
*/
|
||||
sleep(1);
|
||||
#endif
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
@ -386,11 +390,15 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
{
|
||||
return NO;
|
||||
}
|
||||
#if defined(__MINGW__)
|
||||
Sleep(250); // 0.25 second
|
||||
#else
|
||||
/*
|
||||
* This should probably be more accurate like usleep(250)
|
||||
* but usleep is known to NOT be thread safe under all architectures.
|
||||
*/
|
||||
sleep(1);
|
||||
#endif
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
@ -560,11 +568,15 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
{
|
||||
return NO;
|
||||
}
|
||||
#if defined(__MINGW__)
|
||||
Sleep(250); // 0.25 second
|
||||
#else
|
||||
/*
|
||||
* This should probably be more accurate like usleep(250)
|
||||
* but usleep is known to NOT be thread safe under all architectures.
|
||||
*/
|
||||
sleep(1);
|
||||
#endif
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ getpagesize(void)
|
|||
#define getpagesize vm_page_size
|
||||
#endif
|
||||
|
||||
#if __BEOS__
|
||||
#ifdef __BEOS__
|
||||
#include <kernel/OS.h>
|
||||
#define getpagesize() B_PAGE_SIZE
|
||||
#endif
|
||||
|
@ -142,12 +142,12 @@ NSRealMemoryAvailable ()
|
|||
if ((sysinfo(&info)) != 0)
|
||||
return 0;
|
||||
return (unsigned) info.freeram;
|
||||
#elif __MINGW__
|
||||
#elif defined(__MINGW__)
|
||||
MEMORYSTATUS memory;
|
||||
|
||||
GlobalMemoryStatus(&memory);
|
||||
return (unsigned)memory.dwAvailPhys;
|
||||
#elif __BEOS__
|
||||
#elif defined(__BEOS__)
|
||||
system_info info;
|
||||
|
||||
if (get_system_info(&info) != B_OK)
|
||||
|
|
Loading…
Reference in a new issue