| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
* src/estream.c (_gpgrt_fflush): Skip the read-only stream.
--
GnuPG-bug-id: 8518
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
* src/estream.c (trylock_stream): Return 0 on success, -1 on error.
--
GnuPG-bug-id: 8519
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in: Redefine GPGRT_HAVE_PRAGMA_GCC_PUSH
--
The old definition only covered push_option which is available since
gcc 4.4 (released 2009). The new definition also covers the
diagnostic push pragma which was introduced with 4.6 (released 2011).
|
| |
|
|
| |
--
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/visibility.c (gpgrt_w32_set_errno): New.
* src/w32-add.h: Add function.
* src/gpg-error.def.in: Ditto.
* src/estream.c (_gpgrt_w32_set_errno): Return the windows error code.
* src/gpg-error.c (main): Add CMD_MAPW32ERR with name "mapw32err" and
implement it.
--
We use various mappings from Windows Error codes to ERRNO and thus to
gpg-error. it is better to eventuially have one central place for
such mappings.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: For invocation of gen-lock-obj.sh, use NM instead of
OBJDUMP, use no AWK.
* src/gen-lock-obj.sh: Use NM with option -P and -t d for portable
output in decimal. No use of AWK, simply use cut.
--
Signed-off-by: Alexis Lothoré <[email protected]>
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/estream.c (_gpgrt_fflush): Do not use the in_atexit flag.
--
We need to research how we can better handle atexit handlers and
stream locking; in particilar for stdout and stderr. For now we keep
the code but disable it.
Fixes-commit: 50f0c56bdd36f7f709a62503942ac55399dafb9c
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/estream.c (_gpgrt_fflush): Add arg in_atexit and skip the flush in
this mode if the lock can not be taken. Change all callers.
--
The problem should up with gpgsm encryption on the standard mode and a
no public key error. In this case the process got stuck in the atexit
handler after a FAILURE gpgsm-exit status line to stderr. It is
better not to have a hanging process than having flushed everything.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Add test for snprintf.
* src/gpgrt-int.h: Do not re-map snprintf if KEEP_SYSTEM_SNPRINTF is
defined.
* src/estream-printf.c (KEEP_SYSTEM_SNPRINTF): Define.
(pr_float): Increase static buffer size. Use snprintf for long
double.
* tests/t-printf.c: Include float.h.
(check_large_float): New.
--
GnuPG-bug-id: 8240
Reported-by: Dirk Mueller <[email protected]> (AI)
|
| |
|
|
|
|
|
|
| |
* src/stringutils.c (_gpgrt_vfnameconcat): Use the correct value for
the trailing slash check.
--
Reported-by: Dirk Mueller <[email protected]> (AI)
|
| |
|
|
|
|
|
|
|
|
| |
* src/gen-lock-obj.sh: Don't specify section name.
--
It may be .bss.mtx depending to a toolchain.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
| |
* src/spawn-w32.c (_gpgrt_process_spawn): Move the hd[32] array
declaration from inside the inner block to the function scope, so that
the array remains live when CreateProcessW is called.
|
| |
|
|
|
|
|
|
|
| |
* configure.ac: Don't use PKG_CHECK_MODULES.
* src/Makefile.am (mkheader): Remove EXTRA_LIBS_FOR_BUILD.
--
Signed-off-by: Sachin T <[email protected]>
|
| |
|
|
|
|
|
| |
--
This will help to implement
GnuPG-bug-id: 6644
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* src/estream.c (IS_INVALID_SOCKET): New.
(func_sock_read, func_sock_write, func_sock_ioctl, func_sock_destroy):
Use IS_INVALID_SOCKET.
--
It is possible for some architectures that the value of extended -1
and ~0 is different in C. Better to avoid the issue in advance.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (_gpgrt_process_spawn): Don't close
the handle when GPGRT_PROCESS_*_KEEP is specified.
--
GnuPG-bug-id: 8052
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (prepare_env_block): Copy environment
variables correctly by memmove.
--
With "export GNUPGHOME=something", t-spawn.exe failed before the fix.
GnuPG-bug-id: 8052
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (spawn_detached): Don't call _gpgrt_post_syscall
on the child process.
(_gpgrt_process_spawn): Likewise.
--
On NetBSD, a POSIX semaphore is somehow shared among processes, even
if sem_init is called with PSHARED=0.
GnuPG-bug-id: 8065
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (_gpgrt_process_terminat): Care about the case
it's INVALID_HANDLE_VALUE.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
| |
* src/w32-utils.c (_gpgrt_w32__init_utils): Fix syntax error.
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/stringutils.c (_gpgrt_fconcat): New internal function.
* src/argparse.c (_gpgrt_argparser): Use it.
--
This fixes the conf files default also for Windows.
Updates-commmit: a9fc729253eec88f56d810bd2a8edd327267c5b4
GnuPG-bug-id: 7894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/w32-utils.c: New.
* src/init.c (_gpg_err_init, DllMain): Call new init function.
* src/visibility.c (gpgrt_fconcat): New.
* src/gpg-error.h.in (gpgrt_fconcat): New prototype.
(GPGRT_FCONCAT_ABS): New.
(GPGRT_FCONCAT_TILDE): New.
(GPGRT_FCONCAT_SYSCONF): New.
* src/gpg-error.def.in (gpgrt_fconcat): New.
* src/gpg-error.vers: (gpgrt_fconcat): New.
* src/stringutils.c (_gpgrt_vfnameconcat): Repalce want-abs but a new
flags arg. Change to support GPGRT_FCONCAT_SYSCONF. Fix tilde
expansion under Windows to use CISDL_PROFILE instead of $HOME. Adjust
all callers.
* src/gpg-error.c (main): New command "fconcat".
--
This function allows to get the sysconfig directory in a portable way.
On Windows this is CISDL_COMMON_APPDATA\GNU\etc. On Unix this is the
directory specified at the configure run.
This patch also changes the behaviour of tilde expansion in Windows
which was not well defined. It does now use CISDL_PROFILE instead of
the HOME envvar which is uncommon under Windows. Note that under
Windows "~user/foo" is still not defined. Tilde expansion is not done
when GPGRT_FCONCAT_SYSCONF is used.
GnuPG-bug-id: 7894
|
| |
|
|
|
|
| |
* src/w32-gettext.c (get_thread_ui_language): New func ptr.
(module_init): Initialize it.
(my_nl_locale_name): Use it instead of a direct call.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/w32-gettext.c (my_nl_locale_name): Use GetThreadUILanguage instead
of GetThreadLocale.
--
This ensures that the user configured display language is used even if
the regional format (which is meant for dates and times) is set to
another locale.
GetThreadUILanguage is available since Windows Vista and Windows Server
2008.
GnuPG-bug-id: 7874
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (struct gpgrt_spawn_actions): Rename the field to
ENVP.
(my_exec, _gpgrt_spawn_actions_set_environ): Follow the change.
--
Signed-off-by: Sachin T <[email protected]>
Co-authored-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
* src/Makefile.am (libgpg_error_la_CPPFLAGS): Add SYSCONFDIR.
* src/argparse.c (_gpgrt_argparser): Use it.
--
GnuPG-bug-id: 7894
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
| |
* src/estream.c (parse_mode): Fix parsing of "share". Set sysopen
flag.
--
Updates-commit: 0b170a499a87abc4a18b6f7d76beb44901fa0cdd
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* src/estream.c (X_SHARE_RW): Replace by ...
(X_SHARE_CUSTOM,X_SHARE_READ,X_SHARE_WRITE,X_SHARE_DEL): new.
(func_file_create_w32): Set share_mode accordingly.
(parse_mode): Extend the "share" keyword.
* src/gpg-error.c (main): Add option --openmode to allow testing of
the share modes.
--
Updates-commit: 2344947717d29170c918a195541db568648c7aa3
|
| |
|
|
|
|
|
|
| |
* src/gpg-error.m4: Update.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
* src/estream.c (X_SAMETHREAD): Move to the top. Also for the other
X_constants.
(_gpgrt_fopen): Move setting of FILE_FLAG_SEQUENTIAL_SCAN to ...
(func_file_create_w32): here. Replace arg flags_and_attrs by xflags
and use cflags to set certain properties.
(parse_mode): Add mode keyword "share=rw".
|
| |
|
|
|
|
|
|
|
|
| |
* autogen.sh: Don't use -o operator, but shell ||.
* src/gpgrt-config.in: Likewise.
--
GnuPG-bug-id: 7807
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* autogen.sh: Here.
* configure.ac: And here.
* src/gen-lock-obj.sh: And here.
* src/gpg-error.m4 (AM_PATH_GPG_ERROR): And here.
* src/gpgrt-config.in (eval_compare_version): And here.
* src/gpgrt.m4 (AM_PATH_GPGRT): And here.
--
See
GnuPG-bug-id: 7807
|
| |
|
|
|
| |
* src/w32-estream.c (reader): Use correct printf format specifiers for
the trace functions.
|
| |
|
|
|
|
|
|
|
| |
* src/sysutils.c (_gpgrt_fname_to_wchar): No change under Wine.
--
GnuPG-bug-id: 7138
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpgrt-int.h (_gpgrt_windows_feature): New.
* src/init.c (windows_specific_init): New.
(real_init) [HAVE_W32_SYSTEM]: Call windows_specific_init.
(_gpgrt_windows_feature): New.
* src/spawn-w32.c (check_windows_version): Remove.
(_gpgrt_process_spawn): Use _gpgrt_windows_feature.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/estream-printf.c (CONSSPEC_BIN): New.
(compute_type): Handle it.
(parse_format): Support 'b'.
(do_format): Divert 'b' to pr_integer.
(pr_integer): Print binary format.
* tests/t-printf.c (check_fprintf_sf): Add two simple testcases.
--
Might be handy in some cases and is easy to implement. Minor drawback
is that this increases a stack based buffer from 100 to 150 bytes.
|
| |
|
|
|
| |
* configure.ac (EXTRA_LIBS_FOR_BUILD): New ac_subst.
* src/Makefile.am (mkheader): Append that var to the rule.
|
| |
|
|
|
|
|
|
|
| |
* src/syscfg/lock-obj-pub.x86_64-unknown-linux-androideabi.h: New.
* src/Makefile.am (lock_obj_pub): Add it.
--
Signed-off-by: Ben Kibbey <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
* src/syscfg/lock-obj-pub.i686-unknown-linux-androideabi.h: New.
* src/Makefile.am (lock_obj_pub): Add it.
--
Signed-off-by: Ben Kibbey <[email protected]>
|
| |
|
|
|
|
|
|
| |
* src/mkheader.c (canon_host_triplet): Add alias.
--
Signed-off-by: Ben Kibbey <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
* src/syscfg/lock-obj-pub.aarch64-unknown-linux-androideabi.h: New.
* src/Makefile.am (lock_obj_pub): Add it.
--
Signed-off-by: Ben Kibbey <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (struct gpgrt_spawn_actions): Add detached field.
(spawn_detached): Merge into ...
(_gpgrt_process_spawn): ... here, supporting pipe I/O.
(_gpgrt_process_release): Handle detached process.
(_gpgrt_process_wait_list): Likewise.
--
For old Windows, pipe I/O and NUL stdio are not supported for
a process with GPGRT_PROCESS_DETACHED. Creation of a process
can be done, but the process has INVALID HANDLE for stdio.
GnuPG-bug-id: 7716
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (GPGRT_PROCESS_STDIO_NUL): New.
* src/spawn-w32.c (w32_open_null): Add ENABLE_NULL_DEVICE argument.
(_gpgrt_process_spawn): Follow the change.
--
GnuPG-bug-id: 7723
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (_gpgrt_process_spawn): Don't modify hd fields in
ACT. Clean up use of hd_in, hd_out, and hd_err.
--
GnuPG-bug-id: 7716
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/spawn-w32.c (spawn_detached): Use EXTENDED_STARTUPINFO_PRESENT
to enable lpAttributeList in STARTUPINFOEXW.
(_gpgrt_process_spawn): Likewise.
--
GnuPG-bug-id: 7716
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/gpgrt-config.in (determine_gpgrt_libdir): Default to gcc.
--
This minor chang helps non-GNU system with vendor C compiler as
cc.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
| |
* src/spawn-posix.c (_GPGRT_NEED_AFLOCAL): Add.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
* src/spawn-posix.c (get_max_fds): Use 1024 (was: 256).
--
GnuPG-bug-id: 7696
Signed-off-by: NIIBE Yutaka <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpgrt-int.h (_gpgrt_close_all_fds): Fix function declaration.
* src/spawn-posix.c (USE_GET_MAX_FDS): Define when closefrom is not
available.
(get_max_fds): Add an argument of FALLBACK_MAX_FDS.
(_gpgrt_close_all_fds, my_exec, spawn_detached): Likewise.
(_gpgrt_process_spawn): [USE_GET_MAX_FDS && _SC_OPEN_MAX]: It's a
parent process which calls sysconf.
--
GnuPG-bug-id: 7696
Signed-off-by: NIIBE Yutaka <[email protected]>
|