summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* spawn: Fix spawn_cb of gpgrt_spawn_process_fd.NIIBE Yutaka2022-10-318-24/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpg-error.def.in (gpgrt_close_all_fds): New. * src/gpg-error.vers (gpgrt_close_all_fds): New. * src/gpg-error.h.in (GPGRT_SPAWN_INHERIT_FILE): New. (gpgrt_spawn_process_fd): SPAWN_CB having return value. * src/gpgrt-int.h (_gpgrt_spawn_process_fd): SPAWN_CB change. * src/spawn-posix.c (_gpgrt_close_all_fds): Rename from close_all_fds, and export it. (do_exec): Support the case not closing fds. (_gpgrt_spawn_process_fd): Handle return value of SPAWN_CB to determine closing all fds or not. * src/spawn-w32.c (_gpgrt_spawn_process_fd): Run SPAWN_CB. (_gpgrt_close_all_fds): New. * src/visibility.c (gpgrt_close_all_fds): New. * src/visibility.h (gpgrt_close_all_fds): New. -- Now, we have the API of gpgrt_spawn_process_fd for POSIX and Windows. Giving portable semantics for spawning a process is difficult, and it is still difficult for users to writing a function for SPAWN_CB with portability, but gpgrt_spawn_process_fd gives the feature of spawning a process. GnuPG-bug-id: 6249 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* spawn: Expose spawn functions.NIIBE Yutaka2022-10-275-29/+17
| | | | | | | | | | | | | * src/gpg-error.def.in: Update. * src/gpg-error.vers: Update. * src/gpg-error.h.in: Add declarations. * src/visibility.c: Add implementations. * src/visibility.h: Expose them. -- GnuPG-bug-id: 6249 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Fix the comment for _gpgrt_spawn_process_fd, it's a variant.NIIBE Yutaka2022-10-271-10/+9
| | | | | | -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* gpgrt_spawn_process, gpgrt_spawn_process_fd: Change the API.NIIBE Yutaka2022-10-205-30/+39
| | | | | | | | | | | | | | | | | | | | * src/gpg-error.h.in (gpgrt_spawn_process): Remove PREEXEC argument. (gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG. * src/gpgrt-int.h (_gpgrt_spawn_process): Remove PREEXEC argument. (_gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG. * src/spawn-posix.c (do_exec): Remove PREEXEC argument. (_gpgrt_spawn_process): Remove PREEXEC argument. (_gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG. (_gpgrt_spawn_process_detached): Follow the change of do_exec. * src/spawn-w32.c (_gpgrt_spawn_process): Remove PREEXEC argument. (_gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG. * src/visibility.c (gpgrt_spawn_process): Remove PREEXEC argument. (gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG. -- GnuPG-bug-id: 6249 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* spawn: Update changes from gnupg.NIIBE Yutaka2022-10-194-10/+32
| | | | | | | | | | | | | | | | | | | * src/gpg-error.h.in (GPGRT_SPAWN_KEEP_STDIN): New. (GPGRT_SPAWN_KEEP_STDOUT, GPGRT_SPAWN_KEEP_STDERR): New. * src/gpgrt-int.h: Add comment. * src/spawn-posix.c (do_exec): Add the argument FLAGS. (_gpgrt_spawn_process): Add FLAGS. (_gpgrt_spawn_process_fd): Follow the change. (_gpgrt_spawn_process_detached): Likewise. * src/spawn-w32.c (_gpgrt_spawn_process): Handle FLAGS. -- This commit imports GnuPG master commit of: 6d6438a361d25f3b269f702e017f5e39fd1f5c38 GnuPG-bug-id: 6249 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Remove potomo from repo.NIIBE Yutaka2022-10-111-64/+0
| | | | | | | | | | | * potomo: Remove. -- It was used when some po files were not in UTF-8. Now, we use msgfmt, and it was removed form EXTRA_DIST already. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Post release updatesWerner Koch2022-10-072-2/+8
| | | | --
* Release 1.46libgpg-error-1.46gpgrt-1.46Werner Koch2022-10-072-3/+27
|
* m4: Fix detection of gpgrt's libdir.Damien Goutte-Gattat2022-09-211-1/+5
| | | | | | | | | | | | | | | | | | | | | * src/gpg-error.m4 (GPGRT_CONFIG): Handle the case where none of the system lib directories contain a pkgconfig subdirectory. -- When we look for gpgrt_libdir, there's a corner case if we had been able to obtain system libdirs (using `cc -print-search-dirs`) *but* none of those system libdirs happen to contain a valid pkgconfig subdirectory (which may be unlikely but can and does happen when cross-compiling). We do test for the case where we have not obtained any system libdir at all, in which case we fallback to `${gpgrt_prefix}/lib` (`possible_libdir1`), but we do not test if the list of libdir candidates is reduced to nothing after we have eliminated all the libdirs that do not contain a pkgconfig subdirectory. This patch adds a test for this precise case. Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
* build: Fix installation of gpg-error-config.1.Damien Goutte-Gattat via Gnupg-devel2022-09-191-1/+5
| | | | | | | | | | | | | | | | * doc/Makefile.am (myman_pages): Rename man page to gpg-error-config.1 and only install if gpg-error-config itself is installed. -- The man page embedded within doc/gpgrt.texi has recently been renamed from gpgrt-config.1 to gpg-error-config.1, but the Makefile.am was still referring to the old name, resulting in a `make install` failure. Also make the man page installation conditional on --enable-install-gpg-error-config, as there is no point in having the man page if the corresponding tool is not installed. Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
* yat2m: Use __noreturn__ attribute.NIIBE Yutaka2022-09-151-1/+1
| | | | | | | | | * doc/yat2m.c (ATTR_NR_PRINTF): Use __noreturn__. -- GnuPG-bug-id: 4002 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Remove extra semicolons.NIIBE Yutaka2022-09-152-11/+11
| | | | | | | | | * src/gpgrt-int.h: Remove extra. * src/visibility.h: Likewise. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Silence compiler warnings.NIIBE Yutaka2022-09-082-3/+3
| | | | | | | | | * src/argparse.c (show_version): It's no args. (_gpgrt_log_get_fd, _gpgrt_log_get_stream): Likewise. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* gpgrt-config: Strip system paths for --cflags and --libs.NIIBE Yutaka2022-08-251-4/+10
| | | | | | | | | | | * src/gpgrt-config.in: Strip -I and -L with system paths. -- This behavior is more compatible to pkg-config. GnuPG-bug-id: 6136 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Omit -L<libdir> for standard paths on some 64-bit systemsIngo Klöcker2022-08-171-2/+2
| | | | | | | | | | | | | * configure.ac (GPG_ERROR_CONFIG_LIBS): Handle the case $libdir = '${exec_prefix}/lib64'. -- This ensures that on systems using /usr/lib64 the Libs entry of gpg-error.pc doesn't get prefixed with -L/usr/lib64 which helps prevent library search path problems when linking something that depends on libgpg-error. GnuPG-bug-id: 6136
* build: Only install gpg-error-config when enabled.NIIBE Yutaka2022-08-153-0/+19
| | | | | | | | | | * configure.ac (INSTALL_GPG_ERROR_CONFIG): New. * src/Makefile.am (bin_SCRIPTS, noinst_SCRIPTS): Conditionalize. -- GnuPG-bug-id: 5683 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* w32: Convert REG_DWORD values to a string.Werner Koch2022-08-021-0/+15
| | | | * src/w32-reg.c (_gpgrt_w32_reg_query_string): Handle REG_DWORD
* w32: Fix for bidirectional pipe.NIIBE Yutaka2022-07-281-0/+6
| | | | | | | | | | * src/estream.c (func_w32_seek): Return an error with ESPIPE, when it's pipe. -- GnuPG-bug-id: 6112 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* doc: Update gpgrt.texi for old gpg-error-config script.NIIBE Yutaka2022-07-221-44/+47
| | | | | | | | | | | | | * doc/gpgrt.texi: Address pkg-config. Manual entry is for gpg-error-config. gpgrt-config is an internal command for gpg-error.m4. -- Remove about variable gpg_config_script_warn, which is only relevant to a use case of old gpg-error-config. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Fix configure script.NIIBE Yutaka2022-07-191-14/+0
| | | | | | | | | * configure.ac (AC_HEADER_TIME): Remove obsolete AC macro. (AC_CHECK_SIZEOF(time_t)): Remove unneeded check. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Update config.guess, config.sub, and config.rpath.NIIBE Yutaka2022-07-193-891/+1259
| | | | | | | | | | | * build-aux/config.guess: Update from upstream. * build-aux/config.sub: Ditto. * build-aux/config.rpath: Update from gettext 0.21. -- GnuPG-bug-id: 6078 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Remove Windows CE support.NIIBE Yutaka2022-06-2823-792/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * contrib/*: Remove. * Makefile.am: Remove contrib. * autogen.sh: Remove Windows CE support. * configure.ac (have_w32ce_system): Remove. * src/Makefile.am [HAVE_W32CE_SYSTEM] (extra_cppflags): Remove. (gpg_extra_headers): Remove. (EXTRA_DIST): Remove mkw32errmap.c and w32ce-add.h (BUILT_SOURCES): Remove mkw32errmap.map.c. (tmp_files): Remove mkw32errmap.tab.h mkw32errmap.map.c (CLEANFILES): Likewise. * src/estream-printf.c [HAVE_W32CE_SYSTEM]: Remove. * src/estream.c [HAVE_W32CE_SYSTEM]: Remove. * src/gpg-error.def.in [HAVE_W32CE_SYSTEM]: Remove. * src/gpgrt-int.h: Fix comment. * src/init.c [HAVE_W32CE_SYSTEM]: Remove. * src/init.h [HAVE_W32CE_SYSTEM]: Remove. * src/mkheader.c: Remove Windows CE support. * src/mkw32errmap.c, src/w32ce-add.h: Remove. * src/spawn-posix.c [HAVE_W32CE_SYSTEM]: Remove. * src/spawn-w32.c [HAVE_W32CE_SYSTEM]: Remove. * src/sysutils.c [HAVE_W32CE_SYSTEM]: Remove. * src/w32-estream.c [HAVE_W32CE_SYSTEM]: Remove. * src/w32-reg.c [HAVE_W32CE_SYSTEM]: Remove. * tests/Makefile.am [HAVE_W32CE_SYSTEM]: Remove. -- GnuPG-bug-id: 5912 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Typo fix in autogen.sh.NIIBE Yutaka2022-06-281-1/+1
| | | | | | | | | | * autogen.sh: Fix typo. -- GnuPG-bug-id: 5769 Reported-by: Daniel Kahn Gillmor Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Merge branch 'master' of ssh+git://playfair.gnupg.org/git/libgpg-errorWerner Koch2022-04-079-79/+336
|\ | | | | | | --
| * logging: Fix the previous commit.NIIBE Yutaka2022-04-071-1/+1
| | | | | | | | | | | | * src/logging.c (set_file_fd): Open with append mode. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
| * logging: Fix gpgrt_log_get_fd for file.NIIBE Yutaka2022-04-071-68/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/logging.c (fun_writer): Only use this for socket writing. (set_file_fd): Use es_stderr when "-". Use the stream by _gpgrt_fdopen when FD is specified. Use the stream by _gpgrt_fopen when name is not socket. Only use the stream by _gpgrt_fopencookie for socket. [HAVE_W32CE_SYSTEM]: Remove W32CE support. -- GnuPG-bug-id: 5922 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
| * w32: Add ES_SYSHD_SOCK support for gpgrt_sysopen.NIIBE Yutaka2022-04-044-2/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/mkheader.c (write_special): Support @SOCKET_t@ substitution. * src/gpgrt-int.h (gpgrt_stream_backend_kind_t): Add BACKEND_SOCK. * src/gpg-error.h.in (struct _gpgrt_syshd): Use @SOCKET_t@. * src/estream.c [HAVE_W32_SYSTEM] (estream_cookie_sock_t): New. [HAVE_W32_SYSTEM] (func_sock_create, func_sock_read): New. [HAVE_W32_SYSTEM] (func_sock_write, func_sock_seek): New. [HAVE_W32_SYSTEM] (func_sock_destroy, func_sock_ioctl): New. [HAVE_W32_SYSTEM] (estream_functions_sock, do_sockopen): New. [HAVE_W32_SYSTEM] (do_sysopen): Call do_sockopen. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
| * w32: Fix handle_to_pid for MinGW-w64.NIIBE Yutaka2022-03-291-7/+10
| | | | | | | | | | | | | | | | | | * src/spawn-w32.c (handle_to_pid): Use pid_t to coerce the type. -- GnuPG-bug-id: 4656 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
| * core: Fix support of posix-lock for FreeBSD.NIIBE Yutaka2022-03-281-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/posix-lock.c [__FreeBSD__] (use_pthread_p): Use pthread_key_create to determine if it's linked to lpthread or not. -- This is from glthread_in_use in gnulib/lib/glthread/threadlib.c. On FreeBSD, pthread_key_create in there in libc (stub function) as well as -lpthread (real one), while pthread_create is not available in libc. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
| * yat2m: Only emit a message of the page with --verbose option.NIIBE Yutaka2022-03-281-1/+2
| | | | | | | | | | | | | | | | * doc/yat2m.c (finish_page): Conditionalize the output with VERBOSE. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
| * w32: Fix for MinGW which doesn't define EOPNOTSUPP.NIIBE Yutaka2022-03-251-0/+4
| | | | | | | | | | | | | | | | | | | | * src/w32-estream.c: Add EOPNOTSUPP. -- GnuPG-bug-id: 5890 Reported-by: Eli Zaretskii Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* | Post release updatesWerner Koch2022-04-072-1/+7
| | | | | | | | --
* | Release 1.45libgpg-error-1.45gpgrt-1.45Werner Koch2022-04-072-6/+8
|/
* w32: Support file names longer than MAX_PATH.Werner Koch2022-03-0410-58/+342
| | | | | | | | | | | | | | | | | | | | | | | | * src/sysutils.c (any8bitchar): Remove. (_gpgrt_fname_to_wchar): New. (_gpgrt_mkdir): Use instead of plain utf8 conversion. (_gpgrt_access): Reimplement using GetFileAttributesW so that long files names are supported. * src/estream.c (_gpgrt_w32_get_last_err_code): New. (func_file_create_w32): New. (_gpgrt_fopen): Handle the "sysopen" mode flag. Support mapping of /dev/null. (_gpgrt_freopen): Support mapping of /dev/null. * src/w32-gettext.c (load_domain): Allow long file names. * src/visibility.c (gpgrt_free_wchar): Make function public. (gpgrt_fname_to_wchar): Ditto. (gpgrt_utf8_to_wchar): Ditto. (gpgrt_wchar_to_utf8): Ditto. * src/w32-add.h (gpgrt_free_wchar): New prototype. (gpgrt_fname_to_wchar): Ditto. (gpgrt_utf8_to_wchar): Ditto. (gpgrt_wchar_to_utf8): Ditto. * src/gpg-error.def.in: Add them here too.
* gpg-error.m4: Fix use with older gpgrt-config (< 1.33).NIIBE Yutaka2022-02-171-1/+2
| | | | | | | | | | | * src/gpg-error.m4: When gpgrt-config doesn't work expected for gpg-error.pc, unset GPGRT_CONFIG. -- Found the issue in the libgcrypt build with libgpg-error 1.31. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build,tests: Fix detection of have_lock_optimization.NIIBE Yutaka2022-02-011-3/+3
| | | | | | | | | | | * configure.ac: Lock optimization (without sys/single_threaded.h) is only known to work on GNU system, using weak symbol. -- Fixes-commit: 50e0f32b19356fd7c64c799192379ff2204cd8a3 GnuPG-bug-id: 5699 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Post release updatesWerner Koch2022-01-272-1/+7
| | | | --
* Release 1.44libgpg-error-1.44gpgrt-1.44Werner Koch2022-01-277-18/+44
| | | | * configure.ac: Bump LT version to C32/A32/R2.
* build: Fixes for make distcheckWerner Koch2022-01-272-3/+3
| | | | --
* Add Turkish translationsEmir SARI2022-01-272-0/+1497
| | | | Signed-off-by: Emir SARI <emir_sari@icloud.com>
* core: Fix returning of option attributes for options with args.Werner Koch2022-01-251-0/+11
| | | | | | * src/argparse.c (_gpgrt_argparse): Set attributes info flags -- GnuPG-bug-id: 5799
* build: Detect more flexible musl variants of GNUDaniel Kahn Gillmor2022-01-181-1/+1
| | | | | | | | | | * configure.ac: expand *-*-linux-musl to *-*-linux-musl*. -- GnuPG-bug-id: 5762 Reported-by: Helmut Grohne <helmut@subdivi.de> Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* po,w32: Directly run msgfmt at install-data-hook.NIIBE Yutaka2022-01-181-7/+7
| | | | | | | | | | | * Makefile.am (EXTRA_DIST): Remove potomo. [HAVE_W32_SYSTEM] (install-data-hook): Run msgfmt. -- Note that all po files are now in UTF-8. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* po: Update files from gettext 0.21 to match m4/po.m4.NIIBE Yutaka2022-01-185-61/+114
| | | | | | | | | | | | * po/Makefile.in.in: Update. * po/Makevars: Update. * po/Rules-quot: Update. * po/insert-header.sin: Update. * po/remove-potcdate.sin: Update. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Recover and update *.m4.NIIBE Yutaka2021-12-229-97/+2629
| | | | | | | | | | | | | * m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: Copied from gnulib. * m4/po.m4, m4/nls.m4, m4/progtest.m4: Likewise. * m4/gettext.m4, m4/iconv.m4: Update from gnulib. * m4/host-cpu-c-abi.m4: New from gnulib. -- Fixes-commit: 980e4410bb0a372a7bcce5f454915e6565a56b96 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Remove obsolete m4 files.NIIBE Yutaka2021-12-2228-2375/+0
| | | | | | | | | | | | | | | | * m4/glibc2.m4, m4/glibc21.m4, m4/intdiv0.m4, m4/intmax.m4: Remove. * m4/inttypes-h.m4, m4/inttypes-pri.m4, m4/inttypes.m4: Remove. * m4/inttypes_h.m4, m4/isc-posix.m4, m4/lcmessage.m4: Remove. * m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4: Remove. * m4/longdouble.m4, m4/longlong.m4, m4/nls.m4, m4/po.m4: Remove. * m4/printf-posix.m4, m4/progtest.m4, m4/signed.m4: Remove. * m4/size_max.m4, m4/stdint_h.m4, m4/uintmax_t.m4: Remove. * m4/ulonglong.m4, m4/visibility.m4, m4/wchar_t.m4: Remove. * m4/wint_t.m4, m4/xsize.m4: Remove. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tests: Fix gpg-error-config-test for PKG_CONFIG_LIBDIR.NIIBE Yutaka2021-12-171-0/+4
| | | | | | | | | * src/gpg-error-config-test.sh.in: Clear PKG_CONFIG_LIBDIR. -- GnuPG-bug-id: 5740 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Update configure.ac for newer autoconf.NIIBE Yutaka2021-12-152-11/+13
| | | | | | | | | | | * configure.ac (AC_PREREQ): Require 2.69 or later. (AC_CONFIG_HEADERS): Replace AC_CONFIG_HEADER. (AC_HEADER_STDC): Remove. * m4/codeset.m4: Update from gnulib. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Fix have_lock_optimization code for 'guessing yes'.NIIBE Yutaka2021-12-131-2/+6
| | | | | | | | * configure.ac: Support 'guessing yes' for gl_cv_have_weak. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* build: Detect a system with musl, as a variant of GNU System.NIIBE Yutaka2021-12-131-1/+1
| | | | | | | | | * configure.ac: Add *-*-linux-musl. -- Reported-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>