* 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:
fedor 2005-02-23 22:17:54 +00:00
parent b00056dd18
commit cdbd239478
7 changed files with 335 additions and 154 deletions

View file

@ -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;