summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-02-18 08:53:30 +0100
committerWerner Koch <wk@gnupg.org>2020-02-18 08:56:33 +0100
commit5742b8eaf3fa9cda3dfb6b3ad0fea7485fff1a12 (patch)
tree7bb1347295569e10184f65ccfb3aea8e44495275 /configure.ac
parenta6ab8e3a710b899ecfb2ff518725314a1e0e64ff (diff)
downloadlibgpg-error-5742b8eaf3fa9cda3dfb6b3ad0fea7485fff1a12.tar.gz
core: Add gpgrt_fnameconcat and gpgrt_absfnameconcat.
* src/gpg-error.h.in (gpgrt_fnameconcat): New. (gpgrt_absfnameconcat): New. * src/visibility.c (gpgrt_fnameconcat, gpgrt_absfnameconcat): New. * src/stringutils.c: New file. (_gpgrt_vfnameconcat): New. (_gpgrt_fnameconcat, _gpgrt_absfnameconcat): New. * src/gpg-error.def.in: Add new functions. * src/gpg-error.vers: Ditto. * src/sysutils.c: Include pwd.h. (_gpgrt_getpwdir): New. * configure.ac: Test for pwd.h, getpwnam, getpwuid, and their _r variants. * src/Makefile.am (libgpg_error_la_SOURCES): Add new file. * tests/t-stringutils.c: New. * tests/t-common.h (xmalloc, xstrdup, xfree): New. (die): Kludge to avoid compiler warnings. -- The new functions are based on the code of make_filename from GnuPG. They have been written by me ages ago with only minor modifications by David Shaw. I re-license them from LGPL-3.0+ OR GPL-2.0+ to LGPL-2.1-or-later. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index a92143c..ceace2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,7 +190,7 @@ AM_GNU_GETTEXT([external])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h locale.h stdint.h sys/select.h sys/time.h \
- signal.h poll.h])
+ signal.h poll.h pwd.h])
AC_FUNC_STRERROR_R
case "${host_os}" in
@@ -213,7 +213,7 @@ AC_SUBST(INSTALLSHELLPATH)
AC_FUNC_FORK
AC_CHECK_FUNCS([flockfile vasprintf mmap rand strlwr stpcpy setenv stat \
- getrlimit ])
+ getrlimit getpwnam getpwuid getpwnam_r getpwuid_r ])
#