Browse Source

[build] collect Sun-specific headers and funcs

sendfilev() is Solaris-specific (and other OS have other alternatives)
master
Glenn Strauss 4 months ago
parent
commit
c0ced4e82b
  1. 1
      SConstruct
  2. 5
      configure.ac
  3. 2
      src/CMakeLists.txt
  4. 2
      src/meson.build

1
SConstruct

@ -454,6 +454,7 @@ if 1:
'sys/filio.h',
])
autoconf.haveFunc('port_create', 'port.h')
autoconf.haveFunc('sendfilev')
autoconf.haveFunc('setpflags', 'priv.h')
autoconf.haveTypes(Split('pid_t size_t off_t'))

5
configure.ac

@ -1393,6 +1393,8 @@ AC_MSG_CHECKING([crypt_r/crypt support])
AC_MSG_RESULT([$found_crypt])
dnl check whether sendfilev needs -lsendfile
case "$host_os" in
*sunos*|*solaris* )
AC_MSG_NOTICE([----------------------------------------])
save_LIBS=$LIBS
LIBS=
@ -1411,6 +1413,9 @@ AC_SUBST([SENDFILE_LIB])
AC_MSG_CHECKING([solaris sendfilev present])
AC_MSG_RESULT([$have_sendfilev])
;;
* ) ;;
esac
AC_MSG_NOTICE([----------------------------------------])

2
src/CMakeLists.txt

@ -180,6 +180,7 @@ check_include_files(priv.h HAVE_PRIV_H)
check_include_files(sys/devpoll.h HAVE_SYS_DEVPOLL_H)
check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
check_function_exists(port_create HAVE_PORT_CREATE)
check_function_exists(sendfilev HAVE_SENDFILEV)
check_function_exists(setpflags HAVE_SETPFLAGS)
endif()
@ -217,7 +218,6 @@ check_function_exists(select HAVE_SELECT)
check_function_exists(sendfile HAVE_SENDFILE)
check_function_exists(send_file HAVE_SEND_FILE)
check_function_exists(sendfile64 HAVE_SENDFILE64)
check_function_exists(sendfilev HAVE_SENDFILEV)
check_function_exists(sigaction HAVE_SIGACTION)
check_function_exists(signal HAVE_SIGNAL)
check_function_exists(splice HAVE_SPLICE)

2
src/meson.build

@ -123,6 +123,7 @@ conf_data.set('HAVE_PRIV_H', compiler.has_header('priv.h'))
conf_data.set('HAVE_SYS_DEVPOLL_H', compiler.has_header('sys/devpoll.h'))
conf_data.set('HAVE_SYS_FILIO_H', compiler.has_header('sys/filio.h'))
conf_data.set('HAVE_PORT_CREATE', compiler.has_function('port_create', args: defs))
conf_data.set('HAVE_SENDFILEV', compiler.has_function('sendfilev', args: defs))
conf_data.set('HAVE_SETPFLAGS', compiler.has_function('setpflags', args: defs))
endif
@ -160,7 +161,6 @@ conf_data.set('HAVE_SELECT', compiler.has_function('select', args: defs))
conf_data.set('HAVE_SENDFILE', compiler.has_function('sendfile', args: defs))
conf_data.set('HAVE_SEND_FILE', compiler.has_function('send_file', args: defs))
conf_data.set('HAVE_SENDFILE64', compiler.has_function('sendfile64', args: defs))
conf_data.set('HAVE_SENDFILEV', compiler.has_function('sendfilev', args: defs))
conf_data.set('HAVE_SIGACTION', compiler.has_function('sigaction', args: defs))
conf_data.set('HAVE_SIGNAL', compiler.has_function('signal', args: defs))
conf_data.set('HAVE_SPLICE', compiler.has_function('splice', args: defs))

Loading…
Cancel
Save