3 dnl Copyright 2013-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_FUNC_SECURE_GETENV],
10 dnl Persuade glibc <stdlib.h> to declare secure_getenv().
11 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
13 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
14 AC_CHECK_FUNCS_ONCE([secure_getenv])
15 if test $ac_cv_func_secure_getenv = no; then
20 # Prerequisites of lib/secure_getenv.c.
21 AC_DEFUN([gl_PREREQ_SECURE_GETENV], [
22 AC_CHECK_FUNCS([__secure_getenv])
23 if test $ac_cv_func___secure_getenv = no; then
24 gl_CHECK_FUNCS_ANDROID([issetugid], [[#include <unistd.h>]])
26 AC_CHECK_FUNCS_ONCE([getuid geteuid getgid getegid])