2003-09-11
2003-09-11 13:45:44 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
782a90156796eb55983e1f9a3e623d6d138118ef
(19 lines)
(+14/-5)
[
Show
| Annotate
]
Branch: 7.9
Fixed poll(2) support for MacOS X.
Rev: src/builtin_functions.c:1.512
2:
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
- || $Id: builtin_functions.c,v 1.511 2003/09/11 12:26:45 jhs Exp $
+ || $Id: builtin_functions.c,v 1.512 2003/09/11 13:45:44 grubba Exp $
*/
#include "global.h"
- RCSID("$Id: builtin_functions.c,v 1.511 2003/09/11 12:26:45 jhs Exp $");
+ RCSID("$Id: builtin_functions.c,v 1.512 2003/09/11 13:45:44 grubba Exp $");
#include "interpret.h"
#include "svalue.h"
#include "pike_macros.h"
3576: Inside #if defined(__NT__)
#ifdef __NT__
Sleep(DO_NOT_WARN((int)(left*1000)));
#elif defined(HAVE_POLL)
- poll(NULL,0,(int)(left*1000));
+ {
+ /* MacOS X is stupid, and requires a non-NULL pollfd pointer. */
+ struct pollfd sentinel;
+ poll(&sentinel, 0, (int)(left*1000));
+ }
#else
{
struct timeval t3;
3690: Inside #if defined(__NT__)
#ifdef __NT__
Sleep(DO_NOT_WARN((int)(left*1000)));
#elif defined(HAVE_POLL)
- poll(NULL,0,(int)(left*1000));
+ {
+ /* MacOS X is stupid, and requires a non-NULL pollfd pointer. */
+ struct pollfd sentinel;
+ poll(&sentinel, 0, (int)(left*1000));
+ }
#else
{
struct timeval t3;
4497:
case '\'':
case '+':
case '~':
- break;
+ continue;
/* Attributes */
case '.':
case ':':