aboutsummaryrefslogtreecommitdiffstats
path: root/common/logging.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-02-23common: Add log_assert.Neal H. Walfield1-0/+4
* common/logging.h (log_assert): New macro. -- Signed-off-by: Neal H. Walfield <[email protected]>
2015-09-30common: Include <gpg-error.h>.Neal H. Walfield1-0/+1
* common/logging.h: Include <gpg-error.h>. -- Signed-off-by: Neal H. Walfield <[email protected]>. logging.h uses estream_t and as such should directly include <gpg-error.h>.
2015-07-26Replace GNUPG_GCC_A_ macros by GPGRT_ATTR_ macros.Werner Koch1-9/+10
* common/util.h: Provide replacement for GPGRT_ATTR_ macros when using libgpg-error < 1.20. * common/mischelp.h: Ditto. * common/types.h: Ditto. -- Given that libgpg-error is a dependency of all GnuPG related libraries it is better to define such macros at only one place instead of having similar macros at a lot of places. For now we need repalcement macros, though.
2015-04-24common: Remove JNLIB from boiler plate (jnlib merge).Werner Koch1-6/+6
* common/README.jnlib: Remove. -- This is the final part of merging jnlib into gnupg/common.
2015-04-24common: Rename log and gcc attribute macros (jnlib merge).Werner Koch1-22/+22
* common/logging.h: Rename JNLIB_LOG_* to GPGRT_LOG_*. * common/mischelp.h: Rename JNLIB_GCC_* to GPGRT_GCC_*. -- JNLIB has no more meaning. Thus we switch to a GPGRT_ prefix in anticipation that some code may eventually be moved to libgpg-error. Signed-off-by: Werner Koch <[email protected]>
2015-04-24common: Remove libjnlib-config.h (jnlib merge).Werner Koch1-12/+9
* common/libjnlib-config.h: Remove. * common/common-defs.h (getenv) [HAVE_GETENV]: New. From removed header. (getpid) [HAVE_W32CE_SYSTEM]: New. From removed header. * common/argparse.c: Include util.h and common-defs.h. Replace jnlib_ macro names for non-GNUPG builds by x* names. * common/dotlock.c: Ditto. * common/logging.c: Include util.h and common-defs.h. Replace jnlib_ symbol names by x* names. * common/strlist.c: Ditto. * common/utf8conv.c: Ditto. * common/w32-reg.c: Ditto. * common/mischelp.c: Ditto. Also remove _jnlib_free. * common/stringhelp.c: Ditto. (JNLIB_LOG_WITH_PREFIX): Do not depend on this macro. * common/logging.h (JNLIB_LOG_WITH_PREFIX): Do not depend on this macro. -- This is part 1 of the patches to merge the jnlib files into common/. It does not make much sense to keep jnlib/ files separate. They are not often use elsewhere and maintaining the complex marcos stuff is too troublesome for the future. Signed-off-by: Werner Koch <[email protected]>
2014-08-26Switch to the libgpg-error provided estream.Werner Koch1-1/+0
* configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14. (GPGRT_ENABLE_ES_MACROS): Define. (estream_INIT): Remove. * m4/estream.m4: Remove. * common/estream-printf.c, common/estream-printf.h: Remove. * common/estream.c, common/estream.h: Remove. * common/init.c (_init_common_subsystems): Call gpgrt initialization.
2013-08-01w32: Add code to support a portable use of GnuPG.Werner Koch1-0/+1
* common/homedir.c (w32_bin_is_bin, w32_portable_app) [W32]: New. (check_portable_app) [W32]: New. (standard_homedir, default_homedir) [W32]: Support the portable flag. (w32_rootdir, w32_commondir) [W32]: Ditto. (gnupg_bindir, gnupg_cachedir, dirmngr_socket_name) [W32]: Ditto. * common/logging.h (JNLIB_LOG_NO_REGISTRY): New. * common/logging.c (no_registry): New variable. (log_set_prefix, log_get_prefix): Set/get that variable. (do_logv): Do not check the registry if that variable is set. -- Beware: This code has not been tested because it is not yet possible to build GnuPG 2.1 for Windows. However, the code will be the base for an implementation in 2.0. A portable use of GnuPG under Windows means that GnuPG uses a home directory depending on the location of the actual binary. No registry variables are considered. The portable mode is enabled if in the installation directory of the the binary "gpgconf.exe" and a file "gpgconf.ctl" are found. The latter file is empty or consists only of empty or '#' comment lines. Signed-off-by: Werner Koch <[email protected]>
2013-01-07New function log_clock.Werner Koch1-0/+2
* common/logging.c (log_clock): New. * g10/gpg.c (set_debug): Print clock debug flag. * g10/options.h (DBG_CLOCK_VALUE, DBG_CLOCK): New. -- To actually use log_clock you need to enable the code in logginc.c:log_check() and link against librt. --debug 4096 may then be used to enable it at runtime.
2011-09-30Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch1-7/+18
This is to allow the use of this code with code under GPLv2(only).
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-5/+0
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2010-10-26Re-implemented GPG's --passwd command and improved it.Werner Koch1-0/+1
2010-08-18Fix regression in logging.Werner Koch1-0/+1
Add a registry key to enable catch-all remote debugging for W32. Replace more stdio stuff by estream.
2010-06-09Merged Dirmngr with GnuPG.Werner Koch1-1/+1
A few code changes to support dirmngr.
2010-03-15Finished the bulk of changes to use estream in most places instead ofWerner Koch1-0/+1
stdio.
2010-03-11Use a custom log handler for libassuan.Werner Koch1-0/+1
2010-03-10Change logging to use estream. The makes logging to a socket alsoWerner Koch1-2/+4
work on Solaris etc. Further changes required.. This is just a first step.
2010-03-10Merged jnlib into common.Werner Koch1-0/+0
2009-02-25Fixed a nasty bug in scdaemon which led to a card reset if the card wasWerner Koch1-0/+1
inserted during scdaemon startup and a connection was made before the ticker had a chance to run. Add some stuff for better debugging.
2007-08-22Fixed creation of private keys under W32.Werner Koch1-0/+5
Minor code cleanups.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-10-02Fix for bug 537Werner Koch1-14/+14
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2004-04-16* gpg-agent.c (main): Tell the logging code taht we are runnignWerner Koch1-1/+7
detached. * logging.h (JNLIB_LOG_WITH_PREFIX): Add constants for the flag values. * logging.c (log_set_prefix): New flag DETACHED. (fun_writer): Take care of this flag. (log_test_fd): New.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-0/+1
to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.
2003-01-09Updated from NewPGWerner Koch1-0/+76
2002-06-29Removed files for CVS reorganizationDavid Shaw1-46/+0
2000-01-24Add files to new directory.Werner Koch1-0/+46
This is mainly stuff moved from ../util to here.