mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +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
41b1af14ac
commit
53d1f81e7f
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>
|
2003-01-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSConcreteNumber.m: ([compare:]) explicitly cast to promote
|
* Source/NSConcreteNumber.m: ([compare:]) explicitly cast to promote
|
||||||
|
|
|
@ -162,11 +162,15 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
||||||
{
|
{
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
#if defined(__MINGW__)
|
||||||
|
Sleep(250); // 0.25 second
|
||||||
|
#else
|
||||||
/*
|
/*
|
||||||
* This should probably be more accurate like usleep(250)
|
* This should probably be more accurate like usleep(250)
|
||||||
* but usleep is known to NOT be thread safe under all architectures.
|
* but usleep is known to NOT be thread safe under all architectures.
|
||||||
*/
|
*/
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
@ -386,11 +390,15 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
||||||
{
|
{
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
#if defined(__MINGW__)
|
||||||
|
Sleep(250); // 0.25 second
|
||||||
|
#else
|
||||||
/*
|
/*
|
||||||
* This should probably be more accurate like usleep(250)
|
* This should probably be more accurate like usleep(250)
|
||||||
* but usleep is known to NOT be thread safe under all architectures.
|
* but usleep is known to NOT be thread safe under all architectures.
|
||||||
*/
|
*/
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
@ -560,11 +568,15 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
||||||
{
|
{
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
#if defined(__MINGW__)
|
||||||
|
Sleep(250); // 0.25 second
|
||||||
|
#else
|
||||||
/*
|
/*
|
||||||
* This should probably be more accurate like usleep(250)
|
* This should probably be more accurate like usleep(250)
|
||||||
* but usleep is known to NOT be thread safe under all architectures.
|
* but usleep is known to NOT be thread safe under all architectures.
|
||||||
*/
|
*/
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ getpagesize(void)
|
||||||
#define getpagesize vm_page_size
|
#define getpagesize vm_page_size
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __BEOS__
|
#ifdef __BEOS__
|
||||||
#include <kernel/OS.h>
|
#include <kernel/OS.h>
|
||||||
#define getpagesize() B_PAGE_SIZE
|
#define getpagesize() B_PAGE_SIZE
|
||||||
#endif
|
#endif
|
||||||
|
@ -142,12 +142,12 @@ NSRealMemoryAvailable ()
|
||||||
if ((sysinfo(&info)) != 0)
|
if ((sysinfo(&info)) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
return (unsigned) info.freeram;
|
return (unsigned) info.freeram;
|
||||||
#elif __MINGW__
|
#elif defined(__MINGW__)
|
||||||
MEMORYSTATUS memory;
|
MEMORYSTATUS memory;
|
||||||
|
|
||||||
GlobalMemoryStatus(&memory);
|
GlobalMemoryStatus(&memory);
|
||||||
return (unsigned)memory.dwAvailPhys;
|
return (unsigned)memory.dwAvailPhys;
|
||||||
#elif __BEOS__
|
#elif defined(__BEOS__)
|
||||||
system_info info;
|
system_info info;
|
||||||
|
|
||||||
if (get_system_info(&info) != B_OK)
|
if (get_system_info(&info) != B_OK)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue