Fix up brain-damaged test for accept third argument.

This makes that port require autoconf, until the dxpc people mend their
ways.
This commit is contained in:
espie 1999-06-01 17:33:26 +00:00
parent 494748b53e
commit e02f708f3d
2 changed files with 31 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.2 1999/04/18 21:05:42 brad Exp $
# $OpenBSD: Makefile,v 1.3 1999/06/01 17:33:26 espie Exp $
DISTNAME= dxpc-3.7.0
CATEGORIES= net X11
@ -8,9 +8,11 @@ MAINTAINER= espie@openbsd.org
MASTER_SITES= ftp://ftp.x.org/contrib/utilities/ \
ftp://sunsite.unc.edu/pub/Linux/X11/xutils/
CXXFLAGS= -O2
CXXFLAGS= -O2
USE_EGXX= yes
GNU_CONFIGURE= yes
# we need to make a proper check for accept
USE_AUTOCONF= yes
.include <bsd.port.mk>

26
net/dxpc/patches/patch-aa Normal file
View File

@ -0,0 +1,26 @@
--- configure.in.orig Tue Jun 1 19:29:14 1999
+++ configure.in Tue Jun 1 19:29:18 1999
@@ -12,14 +12,13 @@
AC_PATH_XTRA
#AC_CHECK_HEADERS(sys/select.h)
-# UnixWare-2.x and AIX reportedly declare accept(2) with size_t, rather
-# than int, as the type of the third argument...
-if uname -a | egrep -i "UNIX_SV.*4\.2MP.*86" >/dev/null
-then
- AC_DEFINE(DXPC_ACCEPT_IS_SIZE_T)
-elif uname -a | egrep -i "AIX" >/dev/null
-then
- AC_DEFINE(DXPC_ACCEPT_IS_SIZE_T)
-fi
-
+dnl recent systems want socklen_t for accept third argument
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>],
+[int f()
+ {
+ socklen_t *third;
+ return accept(0, 0, third);
+ }], AC_DEFINE(DXPC_ACCEPT_IS_SIZE_T))
AC_OUTPUT(Makefile)