mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-05-13 15:13:36 +00:00
Move the euidaccess() declaration to <unistd.h>.
This commit is contained in:
18
ChangeLog
18
ChangeLog
@@ -1,3 +1,21 @@
|
||||
2008-10-18 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
Move the euidaccess() declaration to <unistd.h>.
|
||||
* lib/euidaccess.h: Remove file.
|
||||
* lib/unistd.in.h (euidaccess): New declaration.
|
||||
* lib/euidaccess.c: Don't include euidaccess.h.
|
||||
* m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Require gl_UNISTD_H_DEFAULTS.
|
||||
Don't check whether euidaccess is declared. Set HAVE_EUIDACCESS.
|
||||
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EUIDACCESS
|
||||
and HAVE_EUIDACCESS.
|
||||
* modules/euidaccess (Files): Remove lib/euidaccess.h.
|
||||
(Depends-on): Add unistd.
|
||||
(configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
|
||||
(Include): Specify <unistd.h> instead of euidaccess.h.
|
||||
* modules/unistd (Makefile.am): Substitute GNULIB_EUIDACCESS and
|
||||
HAVE_EUIDACCESS.
|
||||
* NEWS: Mention the change.
|
||||
|
||||
2008-10-18 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* lib/xgetdomainname.c: Include <unistd.h> instead of getdomainname.h.
|
||||
|
||||
3
NEWS
3
NEWS
@@ -6,6 +6,9 @@ User visible incompatible changes
|
||||
|
||||
Date Modules Changes
|
||||
|
||||
2008-10-18 euidaccess The include file is changed from "euidaccess.h"
|
||||
to <unistd.h>.
|
||||
|
||||
2008-10-18 getdomainname The include file is changed from "getdomainname.h"
|
||||
to <unistd.h>.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* euidaccess -- check if effective user id can access file
|
||||
|
||||
Copyright (C) 1990, 1991, 1995, 1998, 2000, 2003, 2004, 2005, 2006
|
||||
Copyright (C) 1990, 1991, 1995, 1998, 2000, 2003, 2004, 2005, 2006, 2008
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#ifndef _LIBC
|
||||
# include <config.h>
|
||||
# include "euidaccess.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#if ! HAVE_DECL_EUIDACCESS
|
||||
int euidaccess (char const *file, int mode);
|
||||
#endif
|
||||
@@ -134,6 +134,21 @@ extern char **environ;
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_EUIDACCESS@
|
||||
# if !@HAVE_EUIDACCESS@
|
||||
/* Like access(), except that is uses the effective user id and group id of
|
||||
the current process. */
|
||||
extern int euidaccess (const char *filename, int mode);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef euidaccess
|
||||
# define euidaccess(f,m) \
|
||||
(GL_LINK_WARNING ("euidaccess is unportable - " \
|
||||
"use gnulib module euidaccess for portability"), \
|
||||
euidaccess (f, m))
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_FCHDIR@
|
||||
# if @REPLACE_FCHDIR@
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# euidaccess.m4 serial 8
|
||||
dnl Copyright (C) 2002-2007 Free Software Foundation, Inc.
|
||||
# euidaccess.m4 serial 9
|
||||
dnl Copyright (C) 2002-2008 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.
|
||||
@@ -17,12 +17,14 @@ AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS],
|
||||
|
||||
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_DECLS_ONCE([euidaccess])
|
||||
AC_REPLACE_FUNCS(euidaccess)
|
||||
if test $ac_cv_func_euidaccess = no; then
|
||||
HAVE_EUIDACCESS=0
|
||||
gl_PREREQ_EUIDACCESS
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -36,6 +36,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
|
||||
GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
|
||||
GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
|
||||
GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
|
||||
GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
|
||||
GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
|
||||
GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
|
||||
GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
|
||||
@@ -52,6 +53,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
|
||||
GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
|
||||
dnl Assume proper GNU behavior unless another module says otherwise.
|
||||
HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
|
||||
HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
|
||||
HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
|
||||
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
|
||||
HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME])
|
||||
|
||||
@@ -2,22 +2,23 @@ Description:
|
||||
euidaccess() function: check effective user's permissions for a file.
|
||||
|
||||
Files:
|
||||
lib/euidaccess.h
|
||||
lib/euidaccess.c
|
||||
m4/euidaccess.m4
|
||||
|
||||
Depends-on:
|
||||
unistd
|
||||
extensions
|
||||
group-member
|
||||
sys_stat
|
||||
|
||||
configure.ac:
|
||||
gl_FUNC_EUIDACCESS
|
||||
gl_UNISTD_MODULE_INDICATOR([euidaccess])
|
||||
|
||||
Makefile.am:
|
||||
|
||||
Include:
|
||||
"euidaccess.h"
|
||||
<unistd.h>
|
||||
|
||||
Link:
|
||||
$(LIB_EACCESS)
|
||||
|
||||
@@ -28,6 +28,7 @@ unistd.h: unistd.in.h
|
||||
-e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
|
||||
-e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
|
||||
-e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
|
||||
-e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
|
||||
-e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
|
||||
-e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
|
||||
-e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
|
||||
@@ -43,6 +44,7 @@ unistd.h: unistd.in.h
|
||||
-e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
|
||||
-e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
|
||||
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
|
||||
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
|
||||
-e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
|
||||
-e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
|
||||
-e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
|
||||
|
||||
Reference in New Issue
Block a user