mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
* configure.ac: Add test to check for poll emulation
* Source/NSRunLoop.h: Don't use poll if we're just emulating. * Source/unix/GSRunLoopCtxt.m: Idem. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20788 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
37eda7e2db
commit
2e9ff3b23b
7 changed files with 335 additions and 154 deletions
|
@ -49,13 +49,9 @@
|
|||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_POLL_H
|
||||
#ifdef HAVE_POLL_F
|
||||
#include <poll.h>
|
||||
#endif
|
||||
/* Some systems (e.g. MacOSX) just emulate poll and prefer select */
|
||||
#ifdef _POLL_EMUL_H_
|
||||
#undef HAVE_POLL
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
@ -705,7 +701,7 @@ extern IMP wRetImp;
|
|||
_contextMap = NSCreateMapTable (NSNonRetainedObjectMapKeyCallBacks,
|
||||
NSObjectMapValueCallBacks, 0);
|
||||
_timedPerformers = [[NSMutableArray alloc] initWithCapacity: 8];
|
||||
#ifdef HAVE_POLL
|
||||
#ifdef HAVE_POLL_F
|
||||
_extra = objc_malloc(sizeof(pollextra));
|
||||
memset(_extra, '\0', sizeof(pollextra));
|
||||
#endif
|
||||
|
@ -721,7 +717,7 @@ extern IMP wRetImp;
|
|||
|
||||
- (void) gcFinalize
|
||||
{
|
||||
#ifdef HAVE_POLL
|
||||
#ifdef HAVE_POLL_F
|
||||
if (_extra != 0)
|
||||
{
|
||||
pollextra *e = (pollextra*)_extra;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue