123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- dnl Copyright (C) 2006-2017 Free Software Foundation, Inc.
- dnl This file is free software
- dnl gives unlimited permission to copy and/or distribute it,
- dnl with or without modifications, as long as this notice is preserved.
- dnl Written by Simon Josefsson, Bruno Haible.
- AC_DEFUN([gl_UNISTD_H],
- [
- dnl Use AC_REQUIRE here, so that the default behavior below is expanded
- dnl once only, before all statements that occur in other macros.
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- gl_CHECK_NEXT_HEADERS([unistd.h])
- if test $ac_cv_header_unistd_h = yes
- HAVE_UNISTD_H=1
- else
- HAVE_UNISTD_H=0
- fi
- AC_SUBST([HAVE_UNISTD_H])
- dnl Ensure the type pid_t gets defined.
- AC_REQUIRE([AC_TYPE_PID_T])
- dnl Determine WINDOWS_64_BIT_OFF_T.
- AC_REQUIRE([gl_TYPE_OFF_T])
- dnl Check for declarations of anything we want to poison if the
- dnl corresponding gnulib module is not in use.
- gl_WARN_ON_USE_PREPARE([[
- ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
- fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
- gethostname getlogin getlogin_r getpagesize
- getusershell setusershell endusershell
- group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
- readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r
- unlink unlinkat usleep])
- ])
- AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
- [
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- gl_MODULE_INDICATOR_SET_VARIABLE([$1])
- dnl Define it also as a C macro, for the benefit of the unit tests.
- gl_MODULE_INDICATOR_FOR_TESTS([$1])
- ])
- AC_DEFUN([gl_UNISTD_H_DEFAULTS],
- [
- GNULIB_CHDIR=0
- GNULIB_CHOWN=0
- GNULIB_CLOSE=0
- GNULIB_DUP=0
- GNULIB_DUP2=0
- GNULIB_DUP3=0
- GNULIB_ENVIRON=0
- GNULIB_EUIDACCESS=0
- GNULIB_FACCESSAT=0
- GNULIB_FCHDIR=0
- GNULIB_FCHOWNAT=0
- GNULIB_FDATASYNC=0
- GNULIB_FSYNC=0
- GNULIB_FTRUNCATE=0
- GNULIB_GETCWD=0
- GNULIB_GETDOMAINNAME=0
- GNULIB_GETDTABLESIZE=0
- GNULIB_GETGROUPS=0
- GNULIB_GETHOSTNAME=0
- GNULIB_GETLOGIN=0
- GNULIB_GETLOGIN_R=0
- GNULIB_GETPAGESIZE=0
- GNULIB_GETUSERSHELL=0
- GNULIB_GROUP_MEMBER=0
- GNULIB_ISATTY=0
- GNULIB_LCHOWN=0
- GNULIB_LINK=0
- GNULIB_LINKAT=0
- GNULIB_LSEEK=0
- GNULIB_PIPE=0
- GNULIB_PIPE2=0
- GNULIB_PREAD=0
- GNULIB_PWRITE=0
- GNULIB_READ=0
- GNULIB_READLINK=0
- GNULIB_READLINKAT=0
- GNULIB_RMDIR=0
- GNULIB_SETHOSTNAME=0
- GNULIB_SLEEP=0
- GNULIB_SYMLINK=0
- GNULIB_SYMLINKAT=0
- GNULIB_TTYNAME_R=0
- GNULIB_UNISTD_H_NONBLOCKING=0
- GNULIB_UNISTD_H_SIGPIPE=0
- GNULIB_UNLINK=0
- GNULIB_UNLINKAT=0
- GNULIB_USLEEP=0
- GNULIB_WRITE=0
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_CHOWN=1
- HAVE_DUP2=1
- HAVE_DUP3=1
- HAVE_EUIDACCESS=1
- HAVE_FACCESSAT=1
- HAVE_FCHDIR=1
- HAVE_FCHOWNAT=1
- HAVE_FDATASYNC=1
- HAVE_FSYNC=1
- HAVE_FTRUNCATE=1
- HAVE_GETDTABLESIZE=1
- HAVE_GETGROUPS=1
- HAVE_GETHOSTNAME=1
- HAVE_GETLOGIN=1
- HAVE_GETPAGESIZE=1
- HAVE_GROUP_MEMBER=1
- HAVE_LCHOWN=1
- HAVE_LINK=1
- HAVE_LINKAT=1
- HAVE_PIPE=1
- HAVE_PIPE2=1
- HAVE_PREAD=1
- HAVE_PWRITE=1
- HAVE_READLINK=1
- HAVE_READLINKAT=1
- HAVE_SETHOSTNAME=1
- HAVE_SLEEP=1
- HAVE_SYMLINK=1
- HAVE_SYMLINKAT=1
- HAVE_UNLINKAT=1
- HAVE_USLEEP=1
- HAVE_DECL_ENVIRON=1
- HAVE_DECL_FCHDIR=1
- HAVE_DECL_FDATASYNC=1
- HAVE_DECL_GETDOMAINNAME=1
- HAVE_DECL_GETLOGIN=1
- HAVE_DECL_GETLOGIN_R=1
- HAVE_DECL_GETPAGESIZE=1
- HAVE_DECL_GETUSERSHELL=1
- HAVE_DECL_SETHOSTNAME=1
- HAVE_DECL_TTYNAME_R=1
- HAVE_OS_H=0
- HAVE_SYS_PARAM_H=0
- REPLACE_CHOWN=0
- REPLACE_CLOSE=0
- REPLACE_DUP=0
- REPLACE_DUP2=0
- REPLACE_FCHOWNAT=0
- REPLACE_FTRUNCATE=0
- REPLACE_GETCWD=0
- REPLACE_GETDOMAINNAME=0
- REPLACE_GETDTABLESIZE=0
- REPLACE_GETLOGIN_R=0
- REPLACE_GETGROUPS=0
- REPLACE_GETPAGESIZE=0
- REPLACE_ISATTY=0
- REPLACE_LCHOWN=0
- REPLACE_LINK=0
- REPLACE_LINKAT=0
- REPLACE_LSEEK=0
- REPLACE_PREAD=0
- REPLACE_PWRITE=0
- REPLACE_READ=0
- REPLACE_READLINK=0
- REPLACE_READLINKAT=0
- REPLACE_RMDIR=0
- REPLACE_SLEEP=0
- REPLACE_SYMLINK=0
- REPLACE_SYMLINKAT=0
- REPLACE_TTYNAME_R=0
- REPLACE_UNLINK=0
- REPLACE_UNLINKAT=0
- REPLACE_USLEEP=0
- REPLACE_WRITE=0
- UNISTD_H_HAVE_WINSOCK2_H=0
- UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0
- AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
- ])
|