| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/syscfg/lock-obj-pub.aarch64-apple-darwin.h: New.
* src/syscfg/lock-obj-pub.arm-apple-darwin.h: New.
--
Created by Chris Ballinger <[email protected]>. He also noted:
When cross-compiling for arm-apple-darwin and aarch64-apple-darwin I
also needed to generate these files, so here they are. I made a
little iOS utility to help people generate them in case Apple adds
any more architectures in the future:
https://github.com/chrisballinger/gen-posix-lock-obj-iOS
|
|
|
|
|
| |
* src/estream.c (destroy_stream_lock): New.
(es_create, do_close): Use new wrapper function.
|
|
|
|
| |
* src/gpgrt-int.h: s/off_t/gpgrt_off_t/.
|
|
|
|
|
| |
* src/Makefile.am: Do not distribute gpg-error.h.
(lock-obj-pub.native.h): Prepend a "./" to match the dependency.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (AC_SYS_LARGEFILE): New.
(AC_CHECK_HEADERS): Check for stdint.h.
(AC_CHECK_SIZEOF): Add for int, long and long long.
(REPLACEMENT_FOR_OFF_T): New ac_define.
* src/mkheader.c (have_stdint_h, have_w32_system, have_w64_system)
(replacement_for_off_type, stdint_h_included): New.
(xfree, xstrdup): New.
(parse_config_h): New.
(write_special): Support "define:gpgrt_off_t", "define:gpgrt_ssize_t",
"api_ssize_t" tags.
(main): Add config.h arg. Call parse_config_h. Fix substitute code.
* src/Makefile.am (gpg-error.h): Pass config.h to mkheader.
* src/gpg-error.h.in: Include definitions for gpgrt_ssize_t and
gpgrt_off_t. Let mkheader insert ssize_t keywords. Chnage all off_t
to gpgrt_off_t.
* src/estream.c: Change all off_t to gpgrt_off_t. Chnage all ssize_t
to gpgrt_ssize_t.
* src/visibility.c (gpgrt_fseeko): Use gpgrt_off_t.
(gpgrt_ftello): Ditto.
(gpgrt_getline): Use gpgrt_ssize_t.
(gpgrt_read_line): Ditto.
|
|
|
|
|
| |
* src/syscfg/lock-obj-pub.mingw32.h (GPGRT_LOCK_INITIALIZER): Add
mssing braces.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/visibility.c (gpgrt_set_alloc_func): New.
* configure.ac (_ESTREAM_PRINTF_REALLOC): Define.
(_ESTREAM_PRINTF_EXTRA_INCLUDE): Define.
* src/estream.c (mem_alloc, mem_realloc, mem_free): Simplify.
(_gpgrt_free): Remove.
* src/init.c (custom_realloc): New var.
(_gpgrt_set_alloc_func): New.
(_gpgrt_realloc, _gpgrt_malloc, _gpgrt_free): New.
* src/visibility.h (gpg_err_deinit): Mark as visible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (gpgrt_init): New macro.
(gpgrt_check_version): New prototype.
* src/init.c (_gpg_err_init): Rename from gpg_err_init.
(_gpg_err_deinit): Rename from gpg_err_deinit.
* src/visibility.c (gpg_err_init): New.
(gpg_err_deinit): New.
(gpgrt_check_version): New.
* src/gpg-error.vers (gpg_err_init, gpg_err_deinit): Add missing
symbols.
(gpgrt_check_version): New.
* src/gpg-error.def.in (gpg_err_init, gpg_err_deinit): Add missing
symbols.
(gpgrt_check_version): New.
* src/gpg-error.c (main): Use gpgrt_init macro.
|
|
|
|
| |
* src/gpg-error.h.in: Include stdarg.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/posix-lock.c: Add weak program for pthread_mutex_trylock.
(_gpgrt_lock_trylock): New.
* src/w32-lock.c (_gpgrt_lock_init): Add missing return statement.
(_gpgrt_lock_trylock): New.
* src/visibility.c (gpgrt_set_syscall_clamp): New.
(gpgrt_lock_trylock): New.
(gpgrt_vsnprintf): Fix symbol name.
* src/init.c (DllMain): Mark unused arg.
* src/estream.c: Replace npth mutexes by our own locks. Replace yeild
macro by _gpgrt_yield.
(pre_syscall_func, post_syscall_func): New.
(do_deinit): Clear both new vars.
(es_func_fd_read, es_func_fd_write): Call pre and post syscall
functions instead of the former SYSCALL macros.
(es_func_w32_read, es_func_w32_write): Ditto.
(es_func_fd_seek, es_func_w32_seek, es_func_fp_read)
(es_func_fp_write, es_func_fp_seek, es_func_fp_destroy): Bracket
syscalls with the pre- and post-syscall fucntions.
(do_npth_read, do_npth_write): Remove.
(_gpgrt_es_init): Remove call to mutex init. It is now statically
initialized.
(_gpgrt_set_syscall_clamp): New.
(es_create): Destroy stream lock on error.
(do_close): Destroy stream lock.
|
|
|
|
| |
* src/estream.c (es_write_sanitized_utf8_buffer): Remove.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: New option --enable-ld-version-script.
(GPGRT_USE_VISIBILITY): New ac_define.
(HAVE_LD_VERSION_SCRIPT): New am_conditional.
* src/gpg-error.vers: New.
* src/gpgrt-int.h: New.
* src/visibility.c, src/visibility.h: New. Lot of changes to symbold
names.
--
This is only doe for the old API. The estream API needs to be added.
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (AH_BOTTOM): Define GPGRT_ENABLE_ES_MACROS.
* src/gpg-error.h.in: include stdio.h. Include most of the estream
functions and rename structures and types.
* src/estream.h: Rewrite. Include only gpg-error.h and local
prototypes.
* src/estream.c: Rename types and macros.
* src/estream-printf.c (_gpgrt_estream_snprintf): Prefix public
functions with _gpgrt_.
|
|
|
|
|
|
|
| |
* m4/estream.m4: Check for memrchr.
* src/estream.c (memrchr) [!HAVE_MEMRCHR]: New.
* src/init.c: Include estream.h
(real_init): Init estream.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/estream-printf.c, src/estream-printf.h: New.
* src/estream.c, src/estream.h: New.
* m4/estream.m4: New.
* src/Makefile.am (libgpg_error_la_SOURCES): Add new files.
* configure.ac (AH_BOTTOM): Define estream prefix.
<gcc>: Add useful gcc warning options.
(estream_INIT): Call.
--
This is the base line patch to move the estream code from GnuPG to
libgpg-error. The code has been taken from the GnuPG repository at
commit cb680c5ea540738692a5c74951802b0fdc658e85.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (HAVE_GCC_ATTRIBUTE_ALIGNED): New.
* src/gen-posix-lock-obj.c (USE_16BYTE_ALIGNMENT): Set for HPPA-Linux.
(main): Enforce alignment if needed.
* src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h: Use 16 byte
alignment.
--
Debian-bug-id: 757060
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.alpha-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h: New.
* src/syscfg/lock-obj-pub.arm-unknown-linux-gnueabihf.h: New.
* src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.i486-pc-gnu.h: New.
* src/syscfg/lock-obj-pub.i486-pc-kfreebsd-gnu.h: New.
* src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.m68k-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.mips-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.mipsel-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.powerpc-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.powerpc64-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.s390x-ibm-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.sh4-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.sparc-unknown-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.x86_64-pc-kfreebsd-gnu.h: New.
* src/syscfg/lock-obj-pub.x86_64-pc-linux-gnu.h: New.
* src/syscfg/lock-obj-pub.x86_64-pc-linux-gnux32.h: New.
* src/Makefile.am (lock_obj_pub): Add new files.
--
To generate these:
pull all the logs stored under the "install" links from:
https://buildd.debian.org/status/package.php?p=libgpg-error&suite=unstable
https://buildd.debian-ports.org/status/package.php?p=libgpg-error&suite=unstable
and then extract the headers via:
for x in fetch*; do
awk '/^## lock-obj-pub\..*\.h$/{ X=2 } { if (X > 0) { print $0 } } /^##$/{ X = X-1 } ' < "$x" >tmp
mv -f tmp $( head -n1 < tmp | cut -f2 -d\ )
done
|
|
|
|
|
|
|
| |
* src/gen-posix-lock-obj.c: Include string.h.
--
string.h is required for strerror ().
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* src/syscfg/lock-obj.arm-unknown-linux-androideabi.h: Rename to ...
* src/syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h: this.
* src/Makefile.am (lock_obj_pub): Fix file name.
--
Ooops. A wrong comment in a generated header can make a lot of
trouble.
|
|
|
|
| |
* src/gen-posix-lock-obj.c (main): Chnage comment in created file.
|
|
|
|
|
|
| |
* src/syscfg/lock-obj.arm-unknown-linux-androideabi.h: New. Provided
by Hans-Christoph Steiner.
* src/Makefile.am (lock_obj_pub): Add file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/threadlib.m4: Set THREADLIB_CPPFLAGS.
* src/gpg-error-config.in: Add option --mt.
* configure.ac: Add support for the --mt option.
* src/gpg-error.m4: Add ac_subst GPG_ERROR_MT_CFLAGS and
GPG_ERROR_MT_LIBS.
--
Although, libgpg-error does not yet provide an API for multi-thread
support, it is useful to add the already available detection to the
config script. This allows the latest Libgcrypt to take advantage of
this in its regression tests. In particular for the regression tests
a gpgrt_thread functions would be useful and eventually added to
libgpg-error. The new gpg-error.m4 script should already be used by
other packages to be prepared for future updates.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/posix-lock.c (gpgrt_lock_init): Detect unitialized lock var.
* src/w32-lock.c (gpgrt_lock_init): Ditto.
--
gpgrt_lock_init may be used for dynamically allocated locks. For
example
gpgrt_lock_t *lock = xcalloc (1, sizeof *lock);
gpgrt_lock_init (lock);
gpgrt_lock_lock (lock);
foo ();
gpgrt_lock_unlock (lock);
gpgrt_lock_destroy (lock);
free (lock);
This patch actually allows for this.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
| |
* src/posix-lock-obj.h (_gpgrt_lock_t): Swap VERS and MTX and put MTX
into a union.
* src/posix-lock.c (gpgrt_lock_lock): Adjust for this change.
* src/gen-posix-lock-obj.c (main): Change output accordingly.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/mkheader.c (mk_include_name): New.
(include_file): Implement '&' substitution.
(try_include_file): New.
(write_special): Use try_include_file and syscfg/.
(main): Add a new arg.
* configure.ac (CROSS_COMPILING): New am_conditional.
(HOST_TRIPLET_STRING): New ac_define.
* src/gen-posix-lock-obj.c (main): Print the host triplet.
* src/w32-lock-obj-pub.in: Move to ...
* src/syscfg/lock-obj-pub.mingw32.h: here.
* src/Makefile.am (lock_obj_pub): New.
(pre_mkheader_cmds): New.
(gpg-error.h): Run pre_mkheader_cmds.
(parts_of_gpg_error_h, lock-obj-pub.native.h): Do not use when
cross-compiling.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/Makefile.am (libgpg_error_la_LIBADD): Add LIBTHREAD.
--
If configure told us to link with -lpthread we need to pass that
library to the libgpg-error.la build rule. Which is the right thing
to do. Without that we may run into strange errors; for example on
AIX pthread_mutex_lock is silently not resolved and thus any use of
gpgrt_lock_lock will immediately lead to segv.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gpg-error.h.in (GPGRT_LOCK_DEFINE): New.
(gpgrt_lock_init): New.
(gpgrt_lock_lock): New.
(gpgrt_lock_unlock): New.
(gpgrt_lock_destroy): New.
(gpgrt_yield): New.
* src/gpg-error.def.in: Add new functions.
* m4/lock.m4, m4/threadlib.m4: New. Taken from current gnulib.
* configure.ac: Call gl_LOCK. Check size of pthread_mutex_t. Add
LIBTHREAD to GPG_ERROR_CONFIG_LIBS.
* src/err-codes.h.in (GPG_ERR_INV_LOCK_OBJ): New.
* src/gen-posix-lock-obj.c: New.
* src/gen-w32-lock-obj.c: New.
* src/lock.h, src/thread.h: New.
* src/posix-lock-obj.h, src/w32-lock-obj.h: New.
* src/posix-lock.c, src/w32-lock.c: New.
* src/posix-thread.c, src/w32-thread.c:
* src/w32-lock-obj-pub.in: New.
* src/mkheader.c (include_file): Support build time include files.
(write_special): Add keyword "include:lock-obj".
* src/Makefile.am:
(posix-lock-obj-pub.in): New rule.
(noinst_PROGRAMS): Add gen-*-lock-obj helpers.
* tests/t-common.h: New.
* tests/t-lock.c: New.
* tests/Makefile.am (t_lock_LDADD): Add new test.
--
This patch introduces the gpgrt_ functions which will be extended over
time to provide a library of commonly used code in GnuPG and
Libgcrypt. Having them in a library named libgpg-error is a misnomer
but this way we can achieve a smooth upgrade path.
In contrasts to other GnuPG libraries, the gpgrt_ functions return a
simple gpg_err_code_t and not gpg_error_t. The rationale for this is
that a source of error identifier does not make sense here; it is
better to use the source of error identifier of the caller. This can
easily be achieved in a component by wrapping these function in a
gpg_error macro/inline.
There is no cross-compiling support for Posix platforms; the
gen-posix-lock-obj tool must be run on the target system.
Note that the gen-w32-lock-obj tool is not needed at build time but
was used to figure out ABI definitions for Windows.
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/mkheader.c: New. Based on the mkheader from Libassuan.
* src/mkheader.awk: Remove.
* src/errnos.in: Add trailing linefeed.
* src/gpg-error.h.in: Change meta include directives for use with
mkheader.c.
* src/Makefile.am (EXTRA_DIST): Replace mkheader.awk by mkheader.c
(BUILT_SOURCES): Remove extra-h.in.
(CLEANFILES): Remove extra-h.in. Add mkheader.c.
(parts_of_gpg_error_h): New.
(extra-h.in): Remove rule.
(mkheader): Add rule.
(gpg-error.h): Change rule to use mkheader.
Signed-off-by: Werner Koch <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/w32-gettext.c (get_string): Pass the nul of the utf-8 string to
the conversion function but keep TRANSLEN without the nul.
--
The bug first occurred on Windows 8 but it is a real thing. Assuming
that a malloced buffer is zeroed out is not solid assumptions ;-)
|
|
|
|
| |
--
|
|
|
|
|
|
|
| |
* src/Makefile.am (install-def-file): Create libdir first.
--
Reported-by: LRN <[email protected]>
|
|
|
|
|
|
|
| |
* src/err-codes.h.in (GPG_ERR_NO_CRYPT_CTX): New.
(GPG_ERR_WRONG_CRYPT_CTX, GPG_ERR_BAD_CRYPT_CTX): New.
(GPG_ERR_CRYPT_CTX_CONFLICT): New.
(GPG_ERR_BROKEN_PUBKEY, GPG_ERR_BROKEN_SECKEY): New.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (VERSION_NUMBER): New ac_subst.
(BUILD_FILEVERSION): Build on all platforms
(BUILD_TIMESTAMP): Try to use an ISO string.
* src/Makefile.am (extra-h.in): Add new version numbers.
* src/versioninfo.rc.in: Update copyright year.
* src/version.c: New.
(gpg_error_check_version): New API.
* src/gpg-error.h.in: Add gpg_error_check_version prototype.
* src/gpg-error.def.in: Add gpg_error_check_version
* tests/t-version.c: New.
* tests/Makefile.am (TESTS): Add t-version.c
* src/gpg-error-config.in: s/VERSION/PACKAGE_VERSION/.
--
All other GnuPG libraries do this, thus we do it here as well.
|
|
|
|
|
|
|
|
| |
* src/gpg-error.m4: Do not use the no-action branch in AC_ARG_WITH.
--
This fixes commit aaa3f534. The bug was that --with-gpg-error-prefix
always reset the value from --with-libgpg-error-prefix.
|
|
|
|
|
|
| |
* configure.ac: Change to a git only revision id setup.
(BUILD_FILEVERSION): Use revision id for this.
* src/versioninfo.rc.in (FileVersion): Use LT version.
|
|
|
|
| |
* src/err-sources.h.in (GPG_ERR_SOURCE_ASSUAN): New.
|
|
|
|
| |
* src/err-codes.h.in: Unify uppercase.
|
|
|
|
|
|
| |
* src/Makefile.am (mkerrcodes.h): Use CPPFLAGS.
Signed-off-by: Rafaël Carré <[email protected]>
|
|
|
|
|
|
| |
* src/gpg-error.m4 (AM_PATH_GPG_ERROR): Also accept
--with-libgpg-error-prefix=PFX, for consistency with our three
library sibling packages.
|
|
|
|
|
|
|
| |
Distributions such as Gentoo Linux use /usr/lib64 for system libraries on
multilib setups, so in those cases, ignore the libraries as well.
Signed-off-by: Diego Elio Pettenò <[email protected]>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If the path to gpg-error-config was explicitly given by the user it
may happen that it does not exists but AC_CHECK_TOOL may assume it
still exists because it is somewhere in the PATH. The extra check
avoids extra sh warnings.
Note that we can't use test -x because that is not defined on some old
systems.
|