core: New API functions gpgrt_mkdir, gpgrt_chdir, gpgrt_getcwd.
* src/gpg-error.h.in (gpgrt_mkdir, gpgrt_chdir, gpgrt_getcwd): New. * src/visibility.c, src/visibility.h: Add wrappers. * src/gpg-error.vers, src/gpg-error.def.in: Add them. * src/sysutils.c (modestr_to_mode): New. (_gpgrt_mkdir, _gpgrt_chdir, _gpgrt_getcwd): New. * m4/gnupg-misc.m4: New. * m4/Makefile.am (EXTRA_DIST): Add new M4 file. * configure.ac: Call new GNUPG_FUNC_MKDIR_TAKES_ONE_ARG. (AC_CHECK_FUNCS): Add stat.
The code has been taken from GnuPG. _gpgrt_mkdir was originally
written by me as gnupg_mkdir and here relicensed to LGPLv2.1+.
_gpgrt_getcwd was originally written by in 2007 and also here
relicensed to LGPLv2.1. The new M4 macro was also written by me for
use in in GnuPG; it has been taken from GnUPG's acinclude.m4, moved to
its own file here, and relicensed to FSFULLR.
- Signed-off-by: Werner Koch <wk@gnupg.org>