version 1.1, 2012/02/21 22:57:49
|
version 1.1.1.2, 2012/05/29 09:29:44
|
Line 1
|
Line 1
|
# unistd_h.m4 serial 17 | # unistd_h.m4 serial 56 |
dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. | dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. |
dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
Line 11 AC_DEFUN([gl_UNISTD_H],
|
Line 11 AC_DEFUN([gl_UNISTD_H],
|
dnl Use AC_REQUIRE here, so that the default behavior below is expanded |
dnl Use AC_REQUIRE here, so that the default behavior below is expanded |
dnl once only, before all statements that occur in other macros. |
dnl once only, before all statements that occur in other macros. |
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) |
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) |
|
AC_REQUIRE([AC_C_INLINE]) |
|
|
gl_CHECK_NEXT_HEADERS([unistd.h]) |
gl_CHECK_NEXT_HEADERS([unistd.h]) |
|
|
AC_CHECK_HEADERS_ONCE([unistd.h]) |
|
if test $ac_cv_header_unistd_h = yes; then |
if test $ac_cv_header_unistd_h = yes; then |
HAVE_UNISTD_H=1 |
HAVE_UNISTD_H=1 |
else |
else |
HAVE_UNISTD_H=0 |
HAVE_UNISTD_H=0 |
fi |
fi |
AC_SUBST([HAVE_UNISTD_H]) |
AC_SUBST([HAVE_UNISTD_H]) |
|
|
|
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([[#include <unistd.h> |
|
/* Some systems declare various items in the wrong headers. */ |
|
#if !(defined __GLIBC__ && !defined __UCLIBC__) |
|
# include <fcntl.h> |
|
# include <stdio.h> |
|
# include <stdlib.h> |
|
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ |
|
# include <io.h> |
|
# endif |
|
#endif |
|
]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat |
|
fsync ftruncate getcwd getdomainname getdtablesize getgroups |
|
gethostname getlogin getlogin_r getpagesize getusershell setusershell |
|
endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite |
|
readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat |
|
usleep]) |
]) |
]) |
|
|
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], |
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], |
[ |
[ |
dnl Use AC_REQUIRE here, so that the default settings are expanded once only. |
dnl Use AC_REQUIRE here, so that the default settings are expanded once only. |
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) |
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) |
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 | 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], |
AC_DEFUN([gl_UNISTD_H_DEFAULTS], |
[ |
[ |
GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) | GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) |
GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) | GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) |
GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) | GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) |
GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) | GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) |
GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) | GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) |
GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) | GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) |
GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) | GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) |
GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) | GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) |
GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) | GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) |
GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) | GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) |
GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) | GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) |
GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) | GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) |
GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) | GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) |
GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) | GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) |
GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) | GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) |
GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) | GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) |
GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) | GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) |
GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) | GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) |
GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) | GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) |
GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) | GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) |
GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) | GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) |
GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) | GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) |
| GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) |
| GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) |
| GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) |
| GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) |
| GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) |
| GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) |
| GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) |
| GNULIB_READ=0; AC_SUBST([GNULIB_READ]) |
| GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) |
| GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) |
| GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) |
| GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) |
| GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) |
| GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) |
| GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) |
| GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) |
| GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) |
| GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) |
| GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) |
| GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) |
| GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) |
| GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) |
dnl Assume proper GNU behavior unless another module says otherwise. |
dnl Assume proper GNU behavior unless another module says otherwise. |
|
HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) |
HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) |
HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) |
|
HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) |
HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) |
HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) |
|
HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) |
|
HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) |
|
HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) |
HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) |
HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) |
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) |
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) |
HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME]) |
|
HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) |
HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) |
|
HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) |
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) |
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) |
|
HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) |
HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) |
HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) |
HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL]) | HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) |
| HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) |
HAVE_LINK=1; AC_SUBST([HAVE_LINK]) |
HAVE_LINK=1; AC_SUBST([HAVE_LINK]) |
|
HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) |
|
HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) |
|
HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) |
|
HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) |
|
HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) |
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) |
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) |
|
HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) |
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) |
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) |
|
HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) |
|
HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) |
|
HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) |
|
HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) |
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) |
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) |
|
HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) |
|
HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) |
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) |
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) |
|
HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) |
|
HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) |
|
HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) |
HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) |
HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) |
HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) |
HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) |
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) |
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) |
REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) |
REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) |
REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR]) | REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) |
| REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) |
| REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) |
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) |
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) |
|
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) |
|
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) |
|
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) |
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) |
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) |
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) |
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) |
|
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) |
|
REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) |
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) |
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) |
|
REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) |
|
REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) |
|
REPLACE_READ=0; AC_SUBST([REPLACE_READ]) |
|
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) |
|
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) |
|
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) |
|
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) |
|
REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) |
|
REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) |
|
REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) |
|
REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) |
REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) |
REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) |
UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) |
UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) |
|
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; |
|
AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) |
]) |
]) |