summaryrefslogtreecommitdiffstats
path: root/common/init.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Some preparations to eventuallt use gpgrt_argparse.Werner Koch2018-06-121-1/+5
| | | | | | | | | * configure.ac (GNUPG_DEF_COPYRIGHT_LINE: New. * tools/watchgnupg.c (print_version): USe this macro. * common/init.c (_init_common_subsystems): Register argparse functions. Signed-off-by: Werner Koch <wk@gnupg.org>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* agent, dirmngr, scd: Fix init_common_subsystems.NIIBE Yutaka2016-10-071-11/+0
| | | | | | | | | | | * common/init.c (_init_common_subsystems): Don't call gpgrt_set_syscall_clamp in this function. * agent/gpg-agent.c, dirmngr/dirmngr.c, scd/scdaemon.c: Call gpgrt_set_syscall_clamp after npth_init. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* common: Add a default socket name feature.Werner Koch2016-08-291-0/+3
| | | | | | | | | | | | | | | | | * common/logging.c (log_set_socket_dir_cb): New. (socket_dir_cb): New. (set_file_fd): Allow "socket://". (fun_writer): Implement default socket name. * common/init.c (_init_common_subsystems): Register default socket. -- This change allows the use of log-file socket:// in any configuration file. Signed-off-by: Werner Koch <wk@gnupg.org>
* Cleanup initialization of libgcrypt.Ben Kibbey2016-08-091-0/+8
| | | | | | | | | | | | * common/init.c (init_common_subsystems): Initialize libgcrypt. * dirmngr/Makefile.am (dirmngr_ldap): Link with libgcrypt. -- Most other modules already call gcry_check_version() after init_common_subsystems() so may as well move initialization of libgcrypt to here. Also fixes a warning in the system log from gpgconf --homedir. Signed-off-by: Ben Kibbey <bjk@luxsci.net>
* common: Smart up register_mem_cleanup_func.Werner Koch2016-07-011-0/+4
| | | | | | * common/init.c (register_mem_cleanup_func): Avoid double registration. Signed-off-by: Werner Koch <wk@gnupg.org>
* Add a hook to be called right after main.Werner Koch2015-01-281-0/+7
| | | | | | * common/init.c (early_system_init): New stub function. Signed-off-by: Werner Koch <wk@gnupg.org>
* Fix linker problem on OS X.Werner Koch2014-11-201-3/+6
| | | | | | | | * common/init.c (default_errsource): Move to the .data segmemt. -- See mails starting at http://lists.gnupg.org/pipermail/gnupg-devel/2014-November/029089.html
* Switch to the libgpg-error provided estream.Werner Koch2014-08-261-2/+6
| | | | | | | | | | * 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.
* common: Cleanup the use of USE_NPTH and HAVE_NPTH macros.Werner Koch2014-05-021-7/+1
| | | | | | | | | | | | | | | | | * configure.ac (HAVE_NPTH): New ac_define. * common/estream.c: Use USE_NPTH instead of HAVE_NPTH. * common/http.c: Ditto. Replace remaining calls to pth by npth calls. (connect_server): Remove useless _(). * common/exechelp-posix.c, common/exechelp-w32.c * common/exechelp-w32ce.c: Use HAVE_PTH to include npth.h. * common/init.c (_init_common_subsystems): Remove call to pth_init. * common/sysutils.c (gnupg_sleep): Use npth_sleep. * scd/ccid-driver.c (my_sleep): Ditto. -- USE_NPTH is used in case were we may build with and without nPth. The missing definition HAVE_NPTH didn't allowed us to build outher sources with nPTh support.
* w32: Include winsock2.h to silence warnings.Werner Koch2014-03-071-2/+5
|
* Add code to allow for late memory cleanup.Werner Koch2013-03-201-0/+47
| | | | | | | | | | | | | | | | | | | * common/init.c (mem_cleanup_item_t): New. (run_mem_cleanup): New. (_init_common_subsystems): Add an atexit for it. (register_mem_cleanup_func): New. * g10/kbnode.c (cleanup_registered): New. (release_unused_nodes): New. (alloc_node): Call register_mem_cleanup_func. -- It is often time consuming to figure out whether still allocated memory at process termination is fine (e.g. a cache) or a problem. To help for that register_mem_cleanup_func may now be used to cleanup such memory. The run time of the program will be longer; if that turns out to be a problem we can change the code to only run in debugging mode.
* Change license for some files in common to LGPLv3+/GPLv2+.Werner Koch2012-04-201-5/+15
| | | | | | | | | | | | | | | | | | | | | | | Having the LGPL on the common GnuPG code helps to share code between GnuPG and related projects (like GPGME and Libassuan). This is good for interoperability and to reduces bugs. * common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c * common/b64enc.c, common/convert.c, common/dns-cert.c * common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c * common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c * common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c * common/helpfile.c, common/homedir.c, common/http.c, common/http.h * common/i18n.c, common/init.c, common/init.h, common/iobuf.c * common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h * common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h * common/percent.c, common/pka.c, common/pka.h, common/session-env.c * common/session-env.h, common/sexp-parse.h, common/sexputil.c * common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c * common/ssh-utils.h, common/sysutils.c, common/sysutils.h * common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h * common/userids.c, common/userids.h, common/xasprintf.c: Change license to LGPLv3+/GPLv2+/
* common: Add a global variable to for the default error source.Werner Koch2012-02-061-1/+13
| | | | | | | | | | | | | | For the shared code parts it is cumbersome to pass an error sourse variable to each function. Its value is always a constant for a given binary and thus a global variable makes things a lot easier than the former macro stuff. * common/init.c (default_errsource): New global var. (init_common_subsystems): Rename to _init_common_subsystems. Set DEFAULT_ERRSOURCE. * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT. (init_common_subsystems): New macro. * common/util.h (default_errsource): Add declaration. * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
* Port to npth.Marcus Brinkmann2012-01-251-7/+7
| | | | | | | | | | | | | | | | | | | | | * configure.ac: Don't check for PTH but for NPTH. (AH_BOTTOM): Remove PTH_SYSCALL_SOFT. (have_pth): Rename to ... (have_npth): ... this. (USE_GNU_NPTH): Rename to ... (USE_GNU_PTH): ... this. * m4/npth.m4: New file. * agent/Makefile.am, agent/cache.c, agent/call-pinentry.c, agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c, agent/trustlist.c, common/Makefile.am, common/estream.c, common/exechelp-posix.c, common/exechelp-w32.c, common/exechelp-w32ce.c, common/http.c, common/init.c, common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c, dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c, dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am, g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am, scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c, scd/scdaemon.c, tools/Makefile.am: Port to npth.
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-6/+6
| | | | | | | | 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.
* gpgconf does now work for Wince.Werner Koch2010-08-231-2/+11
|
* Print --version etc via estreamWerner Koch2010-05-301-0/+21
|
* Fix preference setting in new keysWerner Koch2010-04-261-6/+13
|
* ./autogen.sh --build-w32ce does now succeed.Werner Koch2010-04-141-1/+4
|
* Minor cleanupsWerner Koch2010-03-291-0/+8
|
* More changes for CE. gpgsm does now build and run a keylisting.Werner Koch2010-03-241-1/+1
|
* More chnages to use estream. Add a way to replace the standardWerner Koch2010-03-221-3/+90
| | | | | descriptors.
* Merged jnlib into common.Werner Koch2010-03-101-1/+0
|
* Changed to GPLv3.Werner Koch2007-07-041-6/+4
| | | | | Removed intl/.
* A whole bunch of changes to allow building for Windows.Werner Koch2007-06-141-0/+73
See the ChangeLogs for details.