Pike fails to detect nonblocking method on OpenBSD
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3117
Reported by @grubba
From: Anders Arnholm <anders@arnholm.nu>
To: Henrik Grubbström <grubba@roxen.com>
Date: Mon, 27 May 2002 18:13:15 +0200
Subject: Re: [Bug 3105] Changed - Pike fails to find pthreads on OpenBSD
One more update and I did get that fix too, while your at it, there is one more thing with autoconf on OpenBSD:
/home/balp/src/pike-7.3/Pike/7.3/src/fd_control.c:102: #error Do not
know how to set your filedescriptors nonblocking.
#define USE_FCNTL_O_NONBLOCK
Does work, but I don't know how to test for that. But I think I have an ugly patch. That fixes that problem. (I think, but my network connection today is a loot shaky so I don't know if the testing worked.)
Index: src/configure.in
===================================================================
RCS file: /cvs/Pike/7.3/src/configure.in,v
retrieving revision 1.588
diff -c -r1.588 configure.in
*** src/configure.in 2002/05/27 11:29:29 1.588
--- src/configure.in 2002/05/27 13:46:06
***************
*** 4838,4843 ****
--- 4838,4846 ----
if test "$pike_cv_sys_os" = "AmigaOS" ; then
pike_cv_sys_nonblock=USE_FCNTL_O_NONBLOCK
else
+ if test "$pike_cv_sys_os" = "OpenBSD" ; then
+ pike_cv_sys_nonblock=USE_FCNTL_O_NONBLOCK
+ else
OCPPFLAGS="$CPPFLAGS"
pike_cv_sys_nonblock=UNKNOWN
for method in USE_FCNTL_FNDELAY USE_FCNTL_O_NDELAY
USE_FCNTL_O_NONBLOCK \
***************
*** 4864,4869 ****
--- 4867,4873 ----
done
# Restore CPPFLAGS
CPPFLAGS="$OCPPFLAGS"
+ fi
fi
])
/ Anders.