mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 18:40:08 +01:00
build: Include correct poll.h
Including sys/poll.h when poll.h is available produces a compile warning on some systems, but only sys/poll.h is present on others such as AIX. This makes sure the most suitable poll.h is included in each situation. Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
This commit is contained in:
parent
3b1bf9d6d3
commit
9a3ad1df1c
5 changed files with 26 additions and 5 deletions
|
|
@ -88,7 +88,7 @@ AC_CHECK_HEADERS([stdint.h inttypes.h sys/int_types.h])
|
|||
AC_CHECK_TYPES([uint64_t, uint128_t, __uint128_t])
|
||||
|
||||
dnl Check for socket support for any2ppm daemon
|
||||
AC_CHECK_HEADERS([fcntl.h unistd.h signal.h sys/stat.h sys/socket.h sys/poll.h sys/un.h])
|
||||
AC_CHECK_HEADERS([fcntl.h unistd.h signal.h poll.h sys/stat.h sys/socket.h sys/poll.h sys/un.h])
|
||||
|
||||
dnl Check for infinite loops
|
||||
AC_CHECK_FUNCS([alarm])
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ check_headers = [
|
|||
['signal.h'],
|
||||
['sys/stat.h'],
|
||||
['sys/socket.h'],
|
||||
['poll.h'],
|
||||
['sys/poll.h'],
|
||||
['sys/un.h'],
|
||||
['sched.h', {'check-funcs': ['sched_getaffinity']}],
|
||||
|
|
|
|||
|
|
@ -85,13 +85,18 @@
|
|||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H && HAVE_SIGNAL_H && HAVE_SYS_STAT_H && HAVE_SYS_SOCKET_H && HAVE_SYS_POLL_H && HAVE_SYS_UN_H
|
||||
#if HAVE_UNISTD_H && HAVE_SIGNAL_H && HAVE_SYS_STAT_H && HAVE_SYS_SOCKET_H && (HAVE_POLL_H || HAVE_SYS_POLL_H) && HAVE_SYS_UN_H
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#if defined(HAVE_POLL_H)
|
||||
#include <poll.h>
|
||||
#elif defined(HAVE_SYS_POLL_H)
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
|
||||
#define SOCKET_PATH "./.any2ppm"
|
||||
#define TIMEOUT 60000 /* 60 seconds */
|
||||
|
||||
|
|
|
|||
|
|
@ -79,15 +79,23 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/un.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if CAIRO_HAS_REAL_PTHREAD
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_POLL_H)
|
||||
#include <poll.h>
|
||||
#elif defined(HAVE_SYS_POLL_H)
|
||||
#include <sys/poll.h>
|
||||
#else
|
||||
#error No poll.h equivalent found
|
||||
#endif
|
||||
|
||||
#if HAVE_FCFINI
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
|
@ -24,6 +23,14 @@
|
|||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#if defined(HAVE_POLL_H)
|
||||
#include <poll.h>
|
||||
#elif defined(HAVE_SYS_POLL_H)
|
||||
#include <sys/poll.h>
|
||||
#else
|
||||
#error No poll.h equivalent found
|
||||
#endif
|
||||
|
||||
#include <cairo.h>
|
||||
#include <cairo-script.h>
|
||||
#include <cairo-script-interpreter.h>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue