mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-23 20:12:39 +03:00
Fixes to compile on solaris 9 using g++.
This commit is contained in:
parent
dcfe49ef48
commit
165c889c5d
@ -515,12 +515,13 @@ else
|
||||
fi
|
||||
])dnl ACX_PTHREAD
|
||||
|
||||
dnl enable maximum compiler warnings
|
||||
dnl enable maximum compiler warnings. must ignore unknown pragmas to
|
||||
dnl build on solaris.
|
||||
dnl we only know how to do this for g++
|
||||
AC_DEFUN([ACX_CXX_WARNINGS], [
|
||||
AC_MSG_CHECKING([for C++ compiler warning flags])
|
||||
if test "$GXX" = "yes"; then
|
||||
acx_cxx_warnings="-Wall"
|
||||
acx_cxx_warnings="-Wall -Wno-unknown-pragmas"
|
||||
fi
|
||||
if test -n "$acx_cxx_warnings"; then
|
||||
CXXFLAGS="$CXXFLAGS $acx_cxx_warnings"
|
||||
|
@ -35,19 +35,17 @@ case $host in
|
||||
*-*-mingw32* | *-*-windows*)
|
||||
acx_host_arch="WIN32"
|
||||
acx_host_winapi="MSWINDOWS"
|
||||
ARCH_CFLAGS="$ARCH_CFLAGS -DSYSAPI_WIN32=1 -DWINAPI_MSWINDOWS=1"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
acx_host_arch="UNIX"
|
||||
acx_host_winapi="CARBON"
|
||||
ARCH_CFLAGS="$ARCH_CFLAGS -DSYSAPI_UNIX=1 -DWINAPI_CARBON=1"
|
||||
;;
|
||||
*)
|
||||
acx_host_arch="UNIX"
|
||||
acx_host_winapi="XWINDOWS"
|
||||
ARCH_CFLAGS="$ARCH_CFLAGS -DSYSAPI_UNIX=1 -DWINAPI_XWINDOWS=1"
|
||||
;;
|
||||
esac
|
||||
ARCH_CFLAGS="$ARCH_CFLAGS -DSYSAPI_$acx_host_arch=1 -DWINAPI_$acx_host_winapi=1"
|
||||
AM_CONDITIONAL(WIN32, test x$acx_host_arch = xWIN32)
|
||||
AM_CONDITIONAL(UNIX, test x$acx_host_arch = xUNIX)
|
||||
AM_CONDITIONAL(MSWINDOWS, test x$acx_host_winapi = xMSWINDOWS)
|
||||
@ -85,7 +83,7 @@ ACX_CHECK_INET_ATON
|
||||
|
||||
dnl checks for header files
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([unistd.h sys/time.h sys/types.h wchar.h])
|
||||
AC_CHECK_HEADERS([unistd.h sys/time.h sys/types.h wchar.h alloca.h])
|
||||
AC_CHECK_HEADERS([sys/socket.h sys/select.h])
|
||||
AC_CHECK_HEADERS([istream ostream sstream])
|
||||
AC_HEADER_TIME
|
||||
|
@ -34,6 +34,9 @@
|
||||
|
||||
#if HAVE_POLL
|
||||
# include <sys/poll.h>
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# endif
|
||||
#else
|
||||
# if HAVE_SYS_SELECT_H
|
||||
# include <sys/select.h>
|
||||
@ -43,6 +46,13 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_ALLOCA_H
|
||||
# define freea(x_)
|
||||
#else
|
||||
# define alloca(x_) malloc(x_)
|
||||
# define freea(x_) free(x_)
|
||||
#endif
|
||||
|
||||
static const int s_family[] = {
|
||||
PF_UNSPEC,
|
||||
PF_INET
|
||||
@ -327,8 +337,10 @@ CArchNetworkBSD::pollSocket(CPollEntry pe[], int num, double timeout)
|
||||
if (errno == EINTR) {
|
||||
// interrupted system call
|
||||
ARCH->testCancelThread();
|
||||
freea(pfd);
|
||||
return 0;
|
||||
}
|
||||
freea(pfd);
|
||||
throwError(errno);
|
||||
}
|
||||
|
||||
@ -349,6 +361,7 @@ CArchNetworkBSD::pollSocket(CPollEntry pe[], int num, double timeout)
|
||||
}
|
||||
}
|
||||
|
||||
freea(pfd);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#endif
|
||||
#if defined(HAVE_X11_EXTENSIONS_DPMS_H)
|
||||
extern "C" {
|
||||
# include <X11/Xmd.h>
|
||||
# include <X11/extensions/dpms.h>
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user