mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-09-06 13:41:39 +00:00
* m4/argz.m4 (gl_FUNC_ARGZ): Require AC_CANONICAL_HOST. * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Likewise. * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise. * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. * m4/expl.m4 (gl_FUNC_EXPL): Likewise. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise. * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise. * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise. * m4/poll.m4 (gl_FUNC_POLL): Likewise. * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise. * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise. * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise. * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise. * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST outside the m4_ifdef block.
45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
# ptsname.m4 serial 4
|
|
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
|
|
dnl This file is free software; the Free Software Foundation
|
|
dnl gives unlimited permission to copy and/or distribute it,
|
|
dnl with or without modifications, as long as this notice is preserved.
|
|
|
|
AC_DEFUN([gl_FUNC_PTSNAME],
|
|
[
|
|
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
|
|
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
|
|
|
dnl Persuade glibc <stdlib.h> to declare ptsname().
|
|
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
|
|
|
|
AC_CHECK_FUNCS([ptsname])
|
|
if test $ac_cv_func_ptsname = no; then
|
|
HAVE_PTSNAME=0
|
|
else
|
|
AC_CACHE_CHECK([whether ptsname sets errno on failure],
|
|
[gl_cv_func_ptsname_sets_errno],
|
|
[AC_RUN_IFELSE(
|
|
[AC_LANG_PROGRAM([[#include <errno.h>
|
|
]], [[
|
|
return ptsname (-1) || !errno;
|
|
]])],
|
|
[gl_cv_func_ptsname_sets_errno=yes],
|
|
[gl_cv_func_ptsname_sets_errno=no],
|
|
[case "$host_os" in
|
|
# Guess yes on glibc systems.
|
|
*-gnu*) gl_cv_func_ptsname_sets_errno="guessing yes" ;;
|
|
# If we don't know, assume the worst.
|
|
*) gl_cv_func_ptsname_sets_errno="guessing no" ;;
|
|
esac
|
|
])])
|
|
case $gl_cv_func_ptsname_sets_errno in
|
|
*no) REPLACE_PTSNAME=1 ;;
|
|
esac
|
|
fi
|
|
])
|
|
|
|
# Prerequisites of lib/ptsname.c.
|
|
AC_DEFUN([gl_PREREQ_PTSNAME], [
|
|
:
|
|
])
|