aboutsummaryrefslogtreecommitdiffstats
path: root/src/ath.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-11-10core: Use gpgrt locking for thread safenessAndre Heinecke1-13/+0
* configure.ac: Require libgpg-error 1.17. No longer check for pthread. * doc/gpgme.texi: Document removed neccessity for thread safe gpgme flavours. * src/sema.h (DEFINE_GLOBAL_LOCK), (DEFINE_STATIC_LOCK, INIT_LOCK, DECLARE_LOCK) (DESTROY_LOCK, LOCK, UNLOCK): Change to gpgrt equivalents. * src/posix-sema.c, src/w32-sema.c: Removed. * src/Makefile.am: Remove libpthread and Update accordingly. * src/ath.c, src/ath.h (ath_mutex_init) (ath_mutex_destroy, ath_mutex_lock, ath_mutex_unlock): Removed. * src/ath.h (ATH_MUTEX_INITIALIZER): Removed. * src/version.c (do_subsystem_inits): sema_subsystem_init is no longer required. * tests/gpg/Makefile.am: Add new threading tests. (t_thread1_LDADD, t_cancel_LDADD): Use just gpgme. * tests/gpg/t-thread-keylist-verify.c, tests/gpg/t-thread-keylist.c: New. * src/gpgme-config.in: Use -lgpgme for thread-model pthread. -- Using gpgrt locks instead of pthread locks removes the neccessity to link pthread directly to gpgme and have a different, thread safe flavor of gpgme. Now gpgme is thread-safe if the conditions mentioned in the doc are met. As the cpp bindings linked against libgpgme and not libgpgme-pthread this fixes threading problems with them. libgpgme-pthread is removed but gpgme-config still supports --thread=pthread for compatibility with find scripts.
2013-05-16Make definition of off_t robust against misbehaving w32 toolchains.Werner Koch1-5/+5
* configure.ac (NEED__FILE_OFFSET_BITS): Change to define gpgme_off_t and gpgme_ssize_t. (API__OFF_T, API__SSIZE_T): New ac_subst. * src/gpgme.h.in: Replace all ssize_t and off_t by ac_subst macros. * src/assuan-support.c, src/ath-pthread.c, src/ath.c, src/ath.h * src/data-compat.c, src/data-fd.c, src/data-mem.c, src/data-stream.c * src/data-user.c, src/data.c, src/data.h, src/engine-gpgsm.c * src/engine-uiserver.c, src/gpgme-tool.c, src/gpgme.c: Replace off_t by gpgme_off_t and sszie_t by gpgme_ssize_t. * src/ath-pthread.c, src/ath.h: Include gpgme.h. -- For a detailed description, see the gpgme.texi diff.
2012-09-25Remove all trailing whitespace from source filesWerner Koch1-3/+3
-- Command used: sed -i 's,[ \t]*$,,' FILE
2010-11-15Fixes for the MSC buildWerner Koch1-0/+3
2010-11-03More include guards.Werner Koch1-1/+3
Provide access for Wince. Install dummy sehmap.h
2010-11-02First take on changes to allow building with MSC for W32CE.Werner Koch1-1/+3
Fixed regression in plain W32 build.
2009-11-042009-11-04 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+5
* ath.h (ath_self): New prototype. Include <stdint.h> * ath.c, ath-pth.c, ath-pthread.c (ath_self): New function. * debug.h: Rewrite most macros to beautify debug output. (_gpgme_debug_buffer): Remove tagname and tag argument. (_gpgme_debug_frame_begin, _gpgme_debug_frame_end): New prototypes. * debug.c: Include <time.h>. Don't include assuan.h. (frame_nr, FRAME_NR): New thread-specific variable and macro. (debug_init): Do not initialize assuan. Call _gpgme_debug after initialization instead using printf directly. (_gpgme_debug): Do not call debug_init (we now ensure proper initialization by user). Add timestamp and thread/process ID. (_gpgme_debug_buffer): Do not take tagname and tag argument. (_gpgme_debug_frame_begin, _gpgme_debug_frame_end): New functions. * version.c (gpgme_check_version_internal, gpgme_check_version): Fix debug string. Do not initialize assuan. * posix-io.c (get_max_fds): Use 0 not NULL (nicer debug output).
2008-11-03008-11-03 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+0
* configure.ac: Replace gpgme paths with src. * gpgme: Move to ... * src: ... this new directory. assuan/ 2008-11-03 Marcus Brinkmann <[email protected]> * Makefile.am (INCLUDES): Replace gpgme path with src. tests/ 2008-11-03 Marcus Brinkmann <[email protected]> * gpgsm/Makefile.am (INCLUDES, LDADD): Replace gpgme path with src. * gpg/Makefile.am (INCLUDES, LDADD, t_thread1_LDADD): Likewise. * Makefile.am (LDADD): Likewise.
2005-09-122005-09-12 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-30/+0
* configure.ac (HAVE_PTH): Don't add $PTH_CFLAGS to $CFLAGS here. gpgme/ 2005-09-12 Marcus Brinkmann <[email protected]> * Makefile.am (libgpgme_la_SOURCES): Set to ath.h and ath.c. (ath_pth_src, ath_pthread_src): Removed. (w32_o_files): Replace ath-compat.o with ath.o. (libgpgme_pth_la_CFLAGS): New variable. * ath-compat.c, ath-pthread-compat.c, ath-pth-compat.c: Removed. * ath.h (ath_pthread_available, ath_pth_available): Removed. (ath_init) [!_ATH_EXT_SYM_PREFIX]: Do not define macro. (struct ath_ops, ath_init) [_ATH_COMPAT]: Removed. (_ATH_COMPAT): Macro removed. * posix-sema.c (_gpgme_sema_subsystem_init): Do not call _gpgme_ath_init.
2005-03-09* acinclude.m4 (GNUPG_CHECK_VA_COPY): Assume no when cross-compiling.Werner Koch1-5/+9
* Makefile.am (EXTRA_DIST): Include autogen.sh * autogen.sh: Added the usual code to build for W32 (--build-w32). * configure.ac: Fixed the mingw32 host string, removed OS/2 stuff. (HAVE_DRIVE_LETTERS): Removed. (HAVE_W32_SYSTEM): Added. (AC_GNU_SOURCE): New to replace the identical AH_VERBATIM. (AH_BOTTOM): Added. * w32-util.c (_gpgme_get_gpg_path, _gpgme_get_gpgsm_path): Do not cast away type checks. * io.h [W32]: Do not include stdio.h. If it is needed do it at the right place. * data.h [W32]: Removed kludge for EOPNOTSUP. * data.c, data-compat.c [W32]: Explicitly test for it here.
2005-03-092005-03-07 Timo Schulz <[email protected]>Timo Schulz1-5/+13
* gpgme.h: [_WIN32] Removed ssize_t typedef. * ath.h: [_WIN32] Added some (dummy) types. * io.h: [_WIN32] include stdio.h. * data.h: [_WIN32] Define EOPNOTSUPP. * w32-io.c [_WIN32] (_gpgme_io_subsystem_init): New. * gpgme.c [_WIN32] (gpgme_set_locale): Disabled.
2004-12-072004-12-07 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-10/+11
* README: Refer to COPYING.LESSER and "each file" instead of COPYING. * COPYING.LESSER: New file. * gpgme.spec.in (%doc): Add COPYING.LESSER. * acinclude.m4, configure.ac, Makefile.am: Change license to LGPL 2.1 or later. * TODO: Add copyright notice. * README.CVS: Likewise. assuan/ 2004-12-07 Marcus Brinkmann <[email protected]> * README.1st: Add copyright notice. doc/ 2004-12-07 Marcus Brinkmann <[email protected]> * Makefile.am: Change license to LGPL. (gpgme_TEXINFOS): Replace gpl.texi with lesser.texi. * gpgme.texi: Change license to LGPL (also for documentation of GPGME's license). * lesser.texi: New file. * gpl.texi: File removed. gpgme/ 2004-12-07 Marcus Brinkmann <[email protected]> * putc_unlocked.c, funopen.c: I just claim copyright on these files and change their license to LGPL, because they are totally trivial wrapper functions. * isascii.c: Change copyright notice to the one from ctype/ctype.h in the GNU C Library (CVS Head 2004-10-10), where isascii is defined as a macro doing exactly the same as the function in this file. * memrchr.c: Update from the GNU C Library (CVS Head 2001-07-06). * stpcpy.c: Update from the GNU C Library (CVS Head 2004-10-10). * ath.c, ath-compat.c, ath.h, ath-pth.c, ath-pth-compat.c, ath-pthread.c, ath-pthread-compat.c, context.h, conversion.c, data.c, data-compat.c, data-fd.c, data.h, data-mem.c, data-stream.c, data-user.c, debug.c, debug.h, decrypt.c, decrypt-verify.c, delete.c, edit.c, encrypt.c, encrypt-sign.c, engine-backend.h, engine.c, engine-gpgsm.c, engine.h, error.c, export.c, genkey.c, get-env.c, gpgme.c, gpgme.h, import.c, io.h, key.c, keylist.c, mkstatus, Makefile.am, ops.h, op-support.c, passphrase.c, posix-io.c, posix-sema.c, posix-util.c, progress.c, rungpg.c, sema.h, sign.c, signers.c, trust-item.c, trustlist.c, util.h, verify.c, version.c, w32-io.c, w32-sema.c, w32-util.c, wait.c, wait-global.c, wait.h, wait-private.c, wait-user.c: Change license to LGPL. tests/ 2004-12-07 Marcus Brinkmann <[email protected]> * gpg/mkdemodirs: Add copyright notice. * gpgsm/Makefile.am, gpgsm/t-support.h, gpgsm/t-decrypt.c, gpgsm/t-encrypt.c, gpgsm/t-export.c, gpgsm/t-genkey.c, gpgsm/t-import.c, gpgsm/t-keylist.c, gpgsm/t-sign.c, gpgsm/t-verify.c, gpg/Makefile.am, gpg/t-decrypt.c, gpg/t-decrypt-verify.c, gpg/t-edit.c, gpg/t-encrypt.c, gpg/t-encrypt-sign.c, gpg/t-encrypt-sym.c, gpg/t-eventloop.c, gpg/t-export.c, gpg/t-genkey.c, gpg/t-import.c, gpg/t-keylist.c, gpg/t-keylist-sig.c, gpg/t-sign.c, gpg/t-signers.c, gpg/t-support.h, gpg/t-thread1.c, gpg/t-trustlist.c, gpg/t-verify.c, Makefile.am, t-data.c, t-engine-info.c, t-version.c: Change license to LGPL.
2003-10-062003-10-06 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-2/+2
* ath.h (struct ath_ops): Make ADDR argument of CONNECT prototype const. (ath_connect): Make ADDR argument const. * ath-pthread.c (ath_connect): Likewise. * ath-pth.c (ath_connect): Likewise. * ath-compat.c (ath_connect): Likewise. * ath.c (ath_connect): Likewise.
2003-10-062003-10-06 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+5
* ath.h [HAVE_SYS_SELECT_H]: Include <sys/select.h> for fd_set. [!HAVE_SYS_SELECT_H]: Include <sys/time.h>. * conversion.c (_gpgme_hextobyte): Drop "unsigned" from type of SRC argument. * util.h (_gpgme_hextobyte): Likewise for prototype. * gpgme.h: Remove trailing comma in enum.
2003-08-202003-08-18 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-38/+52
*configure.ac (AM_PATH_GPG_ERROR): Require 0.3. assuan/ See README.1st. gpgme/ 2003-08-19 Marcus Brinkmann <[email protected]> The ath files (ath.h, ath.c, ath-pth.c, ath-pthread.c, ath-compat.c, ath-pth-compat.c and ath-pthread-compat.c) have been updated to have better thread support, and the Makefile.am was changed to reflect that. * util.h [!HAVE_FOPENCOOKIE]: Remove fopencookie declaration. * engine-gpgsm.c (gpgsm_assuan_simple_command): Set ERR to return value of status_fnc. * rungpg.c (start): Return SAVED_ERRNO, not errno.
2002-08-202002-08-21 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-12/+2
* ath.h: Update list of symbols that get a prefix: Rename the ath_mutex_*_available symbols to ath_*_available.
2002-06-022002-06-02 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-15/+19
* acinclude.m4: Fix Pth check so that it doesn't error out if pth is not found. gpgme/ 2002-06-02 Marcus Brinkmann <[email protected]> * ath.h: Enable the _gpgme_ prefix. Fix all those prefix macros. * posix-sema.c: Use that prefix here. * posix-io.c: Include "ath.h". (_gpgme_io_read): Use _gpgme_ath_read instead read. (_gpgme_io_write): Use _gpgme_ath_write instead write. (_gpgme_io_waitpid): Use _gpgme_ath_waitpid instead waitpid. (_gpgme_io_select): Use _gpgme_ath_select instead select.
2002-06-022002-06-02 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+93
* configure.ac: Add checks for Pth and pthreads. * acinclude.m4: Add slightly hacked check for pth (seems to be an autoconf version problem). gpgme/ 2002-06-02 Marcus Brinkmann <[email protected]> * Makefile.am (ath_components): New variable. (ath_components_pthread): Likewise. (ath_components_pth): Likewise. (system_components): Add ath_componentes. * ath.h: New file. * ath.c: Likewise. * ath-pthread.c: Likewise. * ath-pth.c: Likewise. * posix-sema.c (_gpgme_sema_cs_enter): Rework to use the ATH interface. * mutex.h: Remove file.