Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* gnulib/group-member.c, gnulib/xalloc-oversized.h,
gnulib/euidaccess.c, gnulib/getgroups.c, gnulib/root-uid.h, config/gnulib/getgroups.m4, config/gnulib/group-member.m4, config/gnulib/euidaccess.m4: Missing file gnulib euidaccess. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@5581 a8d146d6-cc15-0410-8900-af154a0219e0
- Loading branch information
Jean-Louis Martineau
committed
Jan 6, 2014
1 parent
cc8b450
commit c8fe844
Showing
9 changed files
with
718 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# euidaccess.m4 serial 15 | ||
dnl Copyright (C) 2002-2013 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_NONREENTRANT_EUIDACCESS], | ||
[ | ||
AC_REQUIRE([gl_FUNC_EUIDACCESS]) | ||
AC_CHECK_DECLS([setregid]) | ||
AC_DEFINE([PREFER_NONREENTRANT_EUIDACCESS], [1], | ||
[Define this if you prefer euidaccess to return the correct result | ||
even if this would make it nonreentrant. Define this only if your | ||
entire application is safe even if the uid or gid might temporarily | ||
change. If your application uses signal handlers or threads it | ||
is probably not safe.]) | ||
]) | ||
|
||
AC_DEFUN([gl_FUNC_EUIDACCESS], | ||
[ | ||
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) | ||
dnl Persuade glibc <unistd.h> to declare euidaccess(). | ||
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) | ||
AC_CHECK_FUNCS([euidaccess]) | ||
if test $ac_cv_func_euidaccess = no; then | ||
HAVE_EUIDACCESS=0 | ||
fi | ||
]) | ||
|
||
# Prerequisites of lib/euidaccess.c. | ||
AC_DEFUN([gl_PREREQ_EUIDACCESS], [ | ||
dnl Prefer POSIX faccessat over non-standard euidaccess. | ||
AC_CHECK_FUNCS_ONCE([faccessat]) | ||
dnl Try various other non-standard fallbacks. | ||
AC_CHECK_HEADERS([libgen.h]) | ||
AC_FUNC_GETGROUPS | ||
# Solaris 9 and 10 need -lgen to get the eaccess function. | ||
# Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* | ||
# programs in the package would end up linked with that potentially-shared | ||
# library, inducing unnecessary run-time overhead. | ||
LIB_EACCESS= | ||
AC_SUBST([LIB_EACCESS]) | ||
gl_saved_libs=$LIBS | ||
AC_SEARCH_LIBS([eaccess], [gen], | ||
[test "$ac_cv_search_eaccess" = "none required" || | ||
LIB_EACCESS=$ac_cv_search_eaccess]) | ||
AC_CHECK_FUNCS([eaccess]) | ||
LIBS=$gl_saved_libs | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# serial 18 | ||
|
||
dnl From Jim Meyering. | ||
dnl A wrapper around AC_FUNC_GETGROUPS. | ||
|
||
# Copyright (C) 1996-1997, 1999-2004, 2008-2013 Free Software Foundation, Inc. | ||
# | ||
# This file is free software; the Free Software Foundation | ||
# gives unlimited permission to copy and/or distribute it, | ||
# with or without modifications, as long as this notice is preserved. | ||
|
||
m4_version_prereq([2.70], [] ,[ | ||
# This is taken from the following Autoconf patch: | ||
# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 | ||
AC_DEFUN([AC_FUNC_GETGROUPS], | ||
[ | ||
AC_REQUIRE([AC_TYPE_GETGROUPS])dnl | ||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl | ||
AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles | ||
AC_CHECK_FUNC([getgroups]) | ||
# If we don't yet have getgroups, see if it's in -lbsd. | ||
# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. | ||
ac_save_LIBS=$LIBS | ||
if test $ac_cv_func_getgroups = no; then | ||
AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd]) | ||
fi | ||
# Run the program to test the functionality of the system-supplied | ||
# getgroups function only if there is such a function. | ||
if test $ac_cv_func_getgroups = yes; then | ||
AC_CACHE_CHECK([for working getgroups], [ac_cv_func_getgroups_works], | ||
[AC_RUN_IFELSE( | ||
[AC_LANG_PROGRAM( | ||
[AC_INCLUDES_DEFAULT], | ||
[[/* On Ultrix 4.3, getgroups (0, 0) always fails. */ | ||
return getgroups (0, 0) == -1;]]) | ||
], | ||
[ac_cv_func_getgroups_works=yes], | ||
[ac_cv_func_getgroups_works=no], | ||
[case "$host_os" in # (( | ||
# Guess yes on glibc systems. | ||
*-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; | ||
# If we don't know, assume the worst. | ||
*) ac_cv_func_getgroups_works="guessing no" ;; | ||
esac | ||
]) | ||
]) | ||
else | ||
ac_cv_func_getgroups_works=no | ||
fi | ||
case "$ac_cv_func_getgroups_works" in | ||
*yes) | ||
AC_DEFINE([HAVE_GETGROUPS], [1], | ||
[Define to 1 if your system has a working `getgroups' function.]) | ||
;; | ||
esac | ||
LIBS=$ac_save_LIBS | ||
])# AC_FUNC_GETGROUPS | ||
]) | ||
|
||
AC_DEFUN([gl_FUNC_GETGROUPS], | ||
[ | ||
AC_REQUIRE([AC_TYPE_GETGROUPS]) | ||
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) | ||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
AC_FUNC_GETGROUPS | ||
if test $ac_cv_func_getgroups != yes; then | ||
HAVE_GETGROUPS=0 | ||
else | ||
if test "$ac_cv_type_getgroups" != gid_t \ | ||
|| { case "$ac_cv_func_getgroups_works" in | ||
*yes) false;; | ||
*) true;; | ||
esac | ||
}; then | ||
REPLACE_GETGROUPS=1 | ||
AC_DEFINE([GETGROUPS_ZERO_BUG], [1], [Define this to 1 if | ||
getgroups(0,NULL) does not return the number of groups.]) | ||
else | ||
dnl Detect FreeBSD bug; POSIX requires getgroups(-1,ptr) to fail. | ||
AC_CACHE_CHECK([whether getgroups handles negative values], | ||
[gl_cv_func_getgroups_works], | ||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], | ||
[[int size = getgroups (0, 0); | ||
gid_t *list = malloc (size * sizeof *list); | ||
return getgroups (-1, list) != -1;]])], | ||
[gl_cv_func_getgroups_works=yes], | ||
[gl_cv_func_getgroups_works=no], | ||
[case "$host_os" in | ||
# Guess yes on glibc systems. | ||
*-gnu*) gl_cv_func_getgroups_works="guessing yes" ;; | ||
# If we don't know, assume the worst. | ||
*) gl_cv_func_getgroups_works="guessing no" ;; | ||
esac | ||
])]) | ||
case "$gl_cv_func_getgroups_works" in | ||
*yes) ;; | ||
*) REPLACE_GETGROUPS=1 ;; | ||
esac | ||
fi | ||
fi | ||
test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# serial 14 | ||
|
||
# Copyright (C) 1999-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc. | ||
|
||
# This file is free software; the Free Software Foundation | ||
# gives unlimited permission to copy and/or distribute it, | ||
# with or without modifications, as long as this notice is preserved. | ||
|
||
dnl Written by Jim Meyering | ||
|
||
AC_DEFUN([gl_FUNC_GROUP_MEMBER], | ||
[ | ||
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) | ||
dnl Persuade glibc <unistd.h> to declare group_member(). | ||
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) | ||
dnl Do this replacement check manually because I want the hyphen | ||
dnl (not the underscore) in the filename. | ||
AC_CHECK_FUNC([group_member], , [ | ||
HAVE_GROUP_MEMBER=0 | ||
]) | ||
]) | ||
|
||
# Prerequisites of lib/group-member.c. | ||
AC_DEFUN([gl_PREREQ_GROUP_MEMBER], | ||
[ | ||
AC_REQUIRE([AC_FUNC_GETGROUPS]) | ||
]) |
Oops, something went wrong.