aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-02-08w32: Confirm the 639-1 code for Venda is "ve"Daniel Kahn Gillmor1-5/+1
-- https://www.loc.gov/standards/iso639-2/php/code_changes.php says that ve is indeed the 2-character code for Venda: >> This alpha-2 ISO 639-1 code was approved in 1999 and included in >> ISO 639-1: 2002. It was mistakenly missing in earlier versions of >> the tables on the ISO639-2 web site. As of January 2003, it has >> been included.
2016-02-08Convert http links to https where possible in the source.Daniel Kahn Gillmor26-27/+27
-- * use https for bug reporting * in comments and docs, use https to refer to: - www.gnu.org - creativecommons.org - translationproject.org - mail.gnome.org - www.perl.org - www.ctan.org - www.cl.cam.ac.uk - www.ntg.nl - cygwin.com - www.ethnologue.com
2016-01-27Add syscfg alias for x86_64-pc-linux-gnuhardened1Werner Koch1-0/+1
--
2016-01-19Add GPG_ERR_DB_CORRUPTED.Werner Koch1-2/+2
Signed-off-by: Werner Koch <[email protected]>
2016-01-13Add new lock-obj-pub for NIOS2.Marek Vasut2-0/+24
src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h: New.
2015-12-07Fix windows 8bit encoding conversionAndre Heinecke1-5/+13
* src/w32-gettext.c (wchar_to_native): Convert to ConsoleOutputCP. -- Just using CP_ACP did not neccessarily convert to the correct codepage as codepages might differ between ConsoleOutput and GUI output (which it usually does). This fixes encoding issues on the Windows commandline.
2015-11-19Fix typos found by codespell.Justus Winter3-6/+6
-- Signed-off-by: Justus Winter <[email protected]>
2015-11-19Avoid 'malloc' corner case.Justus Winter1-3/+3
* src/init.c (_gpgrt_realloc): Avoid calling 'malloc(0)'. -- Previously, if '_gpgrt_realloc' was called with both A and N being zero, malloc is invoked with a size of zero. This happens e.g. when calling '_gpgrt_free' with a NULL pointer, which is supposed to be a no-op. Found using the Clang Static Analyzer. Signed-off-by: Justus Winter <[email protected]>
2015-10-21Add error codes NO_NAME, NO_KEY, and SERVER_FAILURE.Werner Koch1-1/+4
2015-10-18estream: Avoid calling write(fd,NULL,n).Werner Koch1-20/+32
* src/estream.c (es_func_fd_write): Take care of a flush requests. (es_func_w32_write): Ditto. (es_func_fp_write): Ditto. -- The write handlers may be called with (BUFFER,SIZE) of (NULL,0) to propagate flush events to user supplied functions (es_fopencookie). However we need to take care to also do this with the internal handler. Might be a reason for system faults due to write or fwrite with a NULL buffer; on Linux this seems to be harmless. Signed-off-by: Werner Koch <[email protected]>
2015-09-28estream: Keep track of EPIPE.Werner Koch1-4/+25
* src/estream.c (_gpgrt_stream_internal): Add indicators.hup. (init_stream_obj): Init it. (es_fill, es_flush, es_seek): Set that. (_gpgrt_poll): Set event. Signed-off-by: Werner Koch <[email protected]>
2015-09-28Add GPG_ERR_FALSE and GPG_ERR_TRUE error codes.Werner Koch1-1/+2
Signed-off-by: Werner Koch <[email protected]>
2015-09-25estream: Add gpgrt_set_nonblock and gpgrt_poll.Werner Koch7-4/+413
* configure.ac (AC_CHECK_HEADERS): Add sys/select.h and sys/time.h. * src/estream.c: Include both header if available. (COOKIE_IOCTL_NONBLOCK): New. (struct estream_cookie_fd): Add field nonblock. (func_fd_create): Set nonblock from MODEFLAGS. (es_func_fd_ioctl): New. (parse_mode): Add modeflag "nonblock". (es_fill): Map EWOULDBLOCK to EAGAIN. Do not set error indicator for EAGAIN. (es_flush, es_seek, es_write_nbf): Map EWOULDBLOCK to EAGAIN. (do_fdopen): Call COOKIE_IOCTL_NONBLOCK. (_gpgrt_set_nonblock): New. (_gpgrt_get_nonblock): New. (_gpgrt_poll): New. * src/gpg-error.h.in (struct _gpgrt_poll_s): New. (gpgrt_poll_t, es_poll_t): New. (es_set_nonblock, es_get_nonblock, es_poll): New. * src/gpg-error.vers, src/gpg-error.def.in: Add gpgrt_set_nonblock, gpgrt_get_nonblock, and gpgrt_poll. * src/visibility.c (gpgrt_set_nonblock, gpgrt_get_nonblock): New. (gpgrt_poll): New. * tests/t-common.h (DIM): New. * tests/t-poll.c: New. * tests/Makefile.am (TESTS): Add t-poll. (t_poll_LDADD): New. -- The poll interface uses select(2) internally because that is more portable than poll(2). Signed-off-by: Werner Koch <[email protected]>
2015-09-24estream: Replace indicator help functions to ease code reading.Werner Koch1-33/+13
* src/estream.c (es_set_indicators, es_get_indicator): Remove and change callers to set/get indicators directly. Signed-off-by: Werner Koch <[email protected]>
2015-09-17Support i[456]86-pc{,-linux,-kfreebsd}-gnu.hDaniel Kahn Gillmor5-27/+8
* src/mkheader (canon_host_triplet): Add new entries. * src/syscfg/lock-obj-pub.i486-pc-gnu.h: Rename to ... * src/syscfg/lock-obj-pub.i686-pc-gnu.h: this. * src/syscfg/lock-obj-pub.i486-pc-kfreebsd-gnu.h: Rename to ... * src/syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h: this. * src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h: Remove. * src/Makefile.am (lock_obj_pub): Update. -- i486-pc, i586-pc, and i686-pc all use the same ABI given the GNU userland and a specific kernel. This changeset updates the arch-specific lock-obj header generation to treat the hardware aliases explicitly and should improve cross-building for anyone wanting to target any of these 9 architectures. It also removes src/syscfg/lock-obj-pub.i486-pc-linux-gnu.h, which should be handled by the alias to src/syscfg/lock-obj-pub.i686-pc-linux-gnu.h Debian-Bug-Id: 799177
2015-08-26Add new version macros.Werner Koch1-6/+9
* src/gpg-error.h.in (GPGRT_VERSION): New. (GPGRT_VERSION_NUMBER): New. (GPG_ERROR_VERSION, GPG_ERROR_VERSION_NUMBER): Move to top of file. -- Eventually we will have a gpgrt.h file instead of gpg-error. To make things easier we already provide suitable named version macros. Miving them to the top makes it easier to find the version. Signed-off-by: Werner Koch <[email protected]>
2015-08-26Add macro GPGRT_INLINE and avoid -Wundef warningsWerner Koch1-27/+28
* src/gpg-error.h.in (GPG_ERR_INLINE): Use #if defined for possible undefined macros to avoid warnign with GCC's -Wundef option. (GPGRT_INLINE): New. -- I still consider using -Wundef for regular building a bad behaviour because undefined macros have a well defined value in a cpp conditional. That warning is useful for debugging build problems but should not be used as standard warning option. Anyway, here is a fix.
2015-08-25w32: Make sure the setmode is called.Werner Koch1-1/+7
* src/estream.c (HAVE_DOSISH_SYSTEM): Define if needed. Signed-off-by: Werner Koch <[email protected]>
2015-07-27Add option --lib-version to the gpg-error tool.Werner Koch1-4/+14
* src/gpg-error.c (main): Add new option.
2015-07-24Add new public macros for GCC attributes.Werner Koch2-22/+100
* src/gpg-error.h.in (GPGRT_GCC_VERSION): New. (GPGRT_ATTR_NORETURN, GPGRT_ATTR_PRINTF, GPGRT_ATTR_NR_PRINTF): New. (GPGRT_ATTR_FORMAT_ARG, GPGRT_ATTR_SENTINEL): New. (GPGRT_ATTR_USED, GPGRT_ATTR_UNUSED, GPGRT_ATTR_DEPRECATED): New. (GPGRT_ATTR_PURE, GPGRT_ATTR_MALLOC): New. (GPGRT_HAVE_MACRO_FUNCTION, GPGRT_HAVE_PRAGMA_GCC_PUSH): New. (_GPGRT_GCC_A_PRINTF): Replace GPGRT_ATTR_PRINTF.
2015-06-15Allow building with --disable-threads.Werner Koch4-20/+64
* src/posix-lock-obj.h (LOCK_ABI_NOT_AVAILABLE): New. (LOCK_ABI_VERSION): Define depending on USE_POSIX_THREADS. (_gpgrt_lock_t) [!USE_POSIX_THREADS]: Do not define the union. * src/gen-posix-lock-obj.c: Take care of USE_POSIX_THREADS. * src/posix-lock.c (_gpgrt_lock_init, _gpgrt_lock_lock) (_gpgrt_lock_trylock, _gpgrt_lock_unlock) (_gpgrt_lock_destroy): Return success for a no-threads version. * tests/t-lock.c: Disable tests if threads are not available. * src/mkheader.c (main): Add NO-THREADS to the printed comment. * configure.ac: Show NO-TRHEADS in the final summary. -- Warning: Using --disable-threads creates a different ABI which we can't encode in the the cpu-vendor-os triplet. The run time checks should detect this and abort the process. Signed-off-by: Werner Koch <[email protected]>
2015-04-10Changed LDAP error strings.Werner Koch1-78/+78
--
2015-04-10w32: Remove compiler warnings.Werner Koch2-81/+15
* src/Makefile.am (pre_mkheader_cmds): Avoid make diagnostic about failed but ignored command. This confuses Emacs' compiler job parser. * tests/t-lock.c [W32]: Include time.h. * src/init.c: Reorganize Windows only code. (wchar_to_utf8, utf8_to_wchar): Remove unused functions. (_gpg_err_set_errno): Use only one copy for all platforms. -- Note that there is a still a problem for W64 pertaining to the use of an int to store a HANDLE. This will be fixed when we add a full abstraction layer for Windows file objects.
2015-03-24Use assert to print diagnosicts before calling abort.Werner Koch1-4/+17
* src/posix-lock.c: Add assert calls. Signed-off-by: Werner Koch <[email protected]>
2015-03-24Avoid breakage with gcc 5Daniel Kahn Gillmor1-1/+1
* src/Makefile.am: Add -P to the C preprocessor when building mkerrcodes.h, to avoid a noisy intermediate pipeline. -- With gcc 5 without this patch, we see many errors like the following: gcc -I. -I. -o mkerrcodes ./mkerrcodes.c In file included from ./mkerrcodes.c:26:0: ./mkerrcodes.h:9:5: error: expected expression before ‘,’ token { , "GPG_ERR_E2BIG" }, ^ ./mkerrcodes.h:10:5: error: expected expression before ‘,’ token { , "GPG_ERR_EACCES" }, ^ This patch cleans up the generated mkerrcodes.h by making the intermediate stage clean for all the versions of gcc i tested (4.x and 5). Debian-Bug-Id: 777374 Signed-Off-By: Daniel Kahn Gillmor <[email protected]>
2015-03-19Add option --defines to gpg-error.Werner Koch1-17/+75
* src/gpg-error.c (main): Add option --help and --defines. Signed-off-by: Werner Koch <[email protected]>
2015-03-19Add GPG_ERR_LDAP_* error codes.Werner Koch1-2/+103
* src/err-codes.h.in: Add error codes. * doc/ldap2gpgerr.c: New. Signed-off-by: Werner Koch <[email protected]>
2015-03-16Remove useless conditions.Werner Koch2-7/+4
* src/estream.c (fname_set_internal): Remove useless condition. * src/mkheader.c (main): Ditto. -- Detected by Stack 0.3.
2015-03-06Add host-triplet aliasing feature to mkheader.Werner Koch3-7/+48
* src/Makefile.am (lock_obj_pub): Rename i586-pc-linux-gnu to i686-pc-linux-gnu. Remove i486-pc-linux-gnu. * src/mkheader.c (canon_host_triplet): New. (main): Use it. -- config.sub does not map i{4,5,6}86-pc-linux-gnu to one common triplet. However, they all use the same ABI and thus we do not need several versions of the syscfg files. Signed-off-by: Werner Koch <[email protected]>
2015-03-06w32: Add a manifest to libgpg-error.Werner Koch3-1/+21
* src/gpg-error.w32-manifest.in: New. * src/Makefile.am (EXTRA_DIST): Add it. (versioninfo.lo): Depend on it. * src/versioninfo.rc.in: Add it. * configure.ac (AC_CONFIG_FILES): Add it. (BUILD_VERSION): New. Signed-off-by: Werner Koch <[email protected]>
2015-01-30w32: Use -static-libgcc to avoid linking to libgcc_s_sjlj-1.dll.Werner Koch1-1/+9
* src/Makefile.am (extra_ltoptions): New. (libgpg_error_la_LDFLAGS): Use it. -- Since gcc 4.8 there is a regression in that plain C programs may link to libgcc_s.a which has a dependency on libgcc_s_sjlj.dll. This is for example triggered by using long long arithmetic on a 32 bit Windows (e.g symbol __udivdi3). As usual the gcc maintainers don't care about backward compatibility and declare that as some kind of compatibility fix and not as regression from 4.7 and all earlier versions. Signed-off-by: Werner Koch <[email protected]>
2015-01-26Update copyright notices.Werner Koch2-2/+2
--
2015-01-22Add GPG_ERR_LEGACY_KEY.Werner Koch1-1/+2
2015-01-05Avoid false warning about uninitialized var.Werner Koch1-1/+1
* src/gpg-error.c (get_err_from_str): Init SAVED_CHAR.
2014-12-28Add GPG_ERR_REQUEST_TOO_SHORT and GPG_ERR_REQUEST_TOO_LONG.Werner Koch1-1/+3
2014-12-15Add GPG_ERR_OBJ_TERM_STATE.Werner Koch1-1/+2
2014-12-03Add GPG_ERR_FORBIDDEN.Werner Koch1-2/+1
2014-10-25Add new lock-obj-pub for mips64el-unknown-linux-gnuabi64.Daniel Kahn Gillmor2-0/+26
* src/syscfg/lock-obj-pub.mips64el-unknown-linux-gnuabi64.h: New. * src/Makefile.am (lock_obj_pub): Add. -- native lock obj header for 64-bit little-endian MIPS, taken from debian mips64el port buildd, see: http://mips64el.debian.net/debian/buildlog/libg/libgpg-error_1.16-2/libgpg-error_1.16-2_mips64el-20140928-1753.build Debian-Bug-Id: 766135
2014-10-23add lock-obj header for or1k-unknown-linux-gnuDaniel Kahn Gillmor2-1/+26
* src/syscfg/lock-obj-pub.or1k-unknown-linux-gnu.h: new -- This architecture-specific header information was sourced from <http://wannabuild.cmd.nu/fetch.php?pkg=libgpg-error arch=or1k&ver=1.13-2&stamp=1407320768> * Add to Makefile. -wk
2014-10-23add lock-obj for new arch triplet for x86Daniel Kahn Gillmor1-0/+23
* src/sysconfig/lock-obj-pub.i586-pc-linux-gnu.h: New. -- Helmut Grohne writes: Observe that the detected GNU triplet is now i586-pc-linux-gnu (gcc bumped it from i486-pc-linux-gnu recently), so the corresponding lock obj header in the syscfg folder needs to be moved or linked. Debian-Bug-Id: 764881
2014-10-15Fix to help building native on Windows.Werner Koch1-3/+3
* configure.ac (FORCE_USE_SYSCFG): New am_conditional. * src/Makefile.am: Use new conditional to decide whether to build the native lock object header. -- This should help to build using msys2 and mingw. GnuPG-bug-id: 1717 Signed-off-by: Werner Koch <[email protected]>
2014-10-03Change gpgrt_pending{,_unlocked} to macros.Werner Koch7-21/+30
* src/gpg-error.h.in (gpgrt_pending): Change to a macro. (gpgrt_pending_unlocked): Change to a macro. (_gpgrt_pending, _gpgrt_pending_unlocked): New private functions. * src/visibility.c, src/visibility.h: Change accordingly. * src/gpg-error.vers, src/gpg-error.def.in: Ditto. * src/estream.c (_gpgrt_pending_unlocked): Rename to _gpgrt__pending_unlocked. (_gpgrt_pending): Rename to _gpgrt__pending. -- The function are supposed to be used with gprt_getc and thus we need to avoid the function call overhead. We may want to change them to inline functions, though. gpgrt_pending is changed to a macro with the idea that we eventually can export the samestream flags and thus avoid the function call overhead in the samethread case too.
2014-10-02w32: Make it build again.Werner Koch1-1/+1
* src/estream.c (es_func_w32_read): Fix var name.
2014-10-02build: Support SYSROOT based config script finding.Werner Koch1-7/+26
* src/gpg-error.m4: Add support for SYSROOT and set gpg_config_script_warn. Use AC_PATH_PROG instead of AC_PATH_TOOL because the config script is not expected to be installed with a prefix for its name.
2014-10-02Add GPG_ERR_BOGUS_STRING and an experimental gpgrt_pending.Werner Koch8-5/+137
* src/visibility.c (gpgrt_pending, gpgrt_pending_unlocked): New. * src/estream.c (_gpgrt_pending, _gpgrt_pending_unlocked): New. (check_pending): new. (check_pending_fbf, check_pending_nbf): New. (es_func_mem_read, es_func_fd_read, es_func_w32_read) (es_func_fp_read, es_fill): Take care of the special 0 value for SIZE.
2014-09-29GNU calls little-endian powerpc64 powerpc64le, not powerpc64elDaniel Kahn Gillmor2-1/+1
* src/Makefile.am (lock_obj_pub): fix powerpc64el to powerpc64le * src/sysconfig/lock-obj-pub.powerpc64el-unknown-linux-gnu.h : move to src/sysconfig/lock-obj-pub.powerpc64le-unknown-linux-gnu.h -- 33e5504fbb5e5e2ff44023c0a22dfb668ff8b10f created lock-obj-pub for little-endian powerpc64, but misnamed the patch file as powerpc64el instead of powerpc64le. Sorry for the earlier mistake, this should correct it. See commentary from Helmut Grohne at https://bugs.debian.org/762322#34 Debian-bug-id: 762322
2014-09-29Add error codes for use by a TLS library.Werner Koch2-2/+29
2014-09-24Add new error source GPG_ERR_SOURCE_TLS.Werner Koch1-0/+2
2014-09-23Add new lock-obj-pub for sparc64-unknown-linux-gnu.Daniel Kahn Gillmor2-0/+26
* src/syscfg/lock-obj-pub.sparc64-unknown-linux-gnu.h: New. * src/Makefile.am (lock_obj_pub): Add. -- Helmut Grohne writes: Julien Cristau pointed out that sparc porter machines run 64bit kernels and can execute 64bit executables. So here we go. I crossed gen-posix-lock-obj for sparc64, verified that it is indeed a 64bit executable and attach its output. Debian-bug-id: 762322
2014-09-23Add new lock-obj-pub for powerpc64el-unknown-linux-gnu.Daniel Kahn Gillmor2-0/+26
* src/syscfg/lock-obj-pub.powerpc64el-unknown-linux-gnu.h: New. * src/Makefile.am (lock_obj_pub): Add. -- Here is a arch-specific lock-obj header file for little-endian 64-bit powerpc. Debian-bug-id: 762322