Blame m4/openat.m4

Packit 709fb3
# serial 45
Packit 709fb3
# See if we need to use our replacement for Solaris' openat et al functions.
Packit 709fb3
Packit 709fb3
dnl Copyright (C) 2004-2017 Free Software Foundation, Inc.
Packit 709fb3
dnl This file is free software; the Free Software Foundation
Packit 709fb3
dnl gives unlimited permission to copy and/or distribute it,
Packit 709fb3
dnl with or without modifications, as long as this notice is preserved.
Packit 709fb3
Packit 709fb3
# Written by Jim Meyering.
Packit 709fb3
Packit 709fb3
AC_DEFUN([gl_FUNC_OPENAT],
Packit 709fb3
[
Packit 709fb3
  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
Packit 709fb3
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
Packit 709fb3
  AC_CHECK_FUNCS_ONCE([openat])
Packit 709fb3
  AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
Packit 709fb3
  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
Packit 709fb3
  yes+*yes)
Packit 709fb3
    ;;
Packit 709fb3
  yes+*)
Packit 709fb3
    # Solaris 9 has *at functions, but uniformly mishandles trailing
Packit 709fb3
    # slash in all of them.
Packit 709fb3
    REPLACE_OPENAT=1
Packit 709fb3
    ;;
Packit 709fb3
  *)
Packit 709fb3
    HAVE_OPENAT=0
Packit 709fb3
    ;;
Packit 709fb3
  esac
Packit 709fb3
])
Packit 709fb3
Packit 709fb3
# Prerequisites of lib/openat.c.
Packit 709fb3
AC_DEFUN([gl_PREREQ_OPENAT],
Packit 709fb3
[
Packit 709fb3
  AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
Packit 709fb3
  :
Packit 709fb3
])