diff options
author | Marcus Brinkmann <[email protected]> | 2011-10-25 16:59:26 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2011-10-25 16:59:26 +0000 |
commit | 3ddf4c3d4000a9b0b52180c3aa3acf1387a193bf (patch) | |
tree | 856904c18b5798a36669eadde81208d9caad11ca /src | |
parent | Post-release. (diff) | |
download | gpgme-3ddf4c3d4000a9b0b52180c3aa3acf1387a193bf.tar.gz gpgme-3ddf4c3d4000a9b0b52180c3aa3acf1387a193bf.zip |
Remove support for libgpgme-pth.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/Makefile.am | 21 | ||||
-rw-r--r-- | src/ath-pth.c | 186 | ||||
-rw-r--r-- | src/gpgme.m4 | 69 |
4 files changed, 8 insertions, 273 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3cbc41d4..e53b226b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-10-25 Marcus Brinkmann <[email protected]> + + * Makefile.am: Remove build rules for libgpgme-pth. + * gpgme.m4: Remove support for libgpgme-pth. + 2011-05-26 Marcus Brinkmann <[email protected]> * decrypt.c (gpgme_op_decrypt_start, gpgme_op_decrypt): Check CTX. diff --git a/src/Makefile.am b/src/Makefile.am index 18c8b3b3..d4f4ba7f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,11 +33,6 @@ ltlib_gpgme_pthread = libgpgme-pthread.la else ltlib_gpgme_pthread = endif -if HAVE_PTH -ltlib_gpgme_pth = libgpgme-pth.la -else -ltlib_gpgme_pth = -endif if BUILD_W32_GLIB ltlib_gpgme_glib = libgpgme-glib.la @@ -52,7 +47,7 @@ ltlib_gpgme_qt = endif lib_LTLIBRARIES = libgpgme.la $(ltlib_gpgme_glib) $(ltlib_gpgme_qt) \ - $(ltlib_gpgme_pthread) $(ltlib_gpgme_pth) + $(ltlib_gpgme_pthread) if HAVE_LD_VERSION_SCRIPT libgpgme_version_script_cmd = -Wl,--version-script=$(srcdir)/libgpgme.vers @@ -132,8 +127,6 @@ libgpgme_la_SOURCES = $(main_sources) \ ath.h ath.c $(system_components_not_extra) libgpgme_pthread_la_SOURCES = $(main_sources) \ ath.h ath-pthread.c $(system_components_not_extra) -libgpgme_pth_la_SOURCES = $(main_sources) \ - ath.h ath-pth.c $(system_components_not_extra) if BUILD_W32_GLIB libgpgme_glib_la_SOURCES = $(main_sources) ath.h ath.c w32-glib-io.c @@ -154,9 +147,8 @@ endif # We use a global CFLAGS and CPPFLAGS setting for all library # versions, because then every object file is only compiled once. -AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ @PTH_CPPFLAGS@ \ - @QT4_CORE_CFLAGS@ -AM_CFLAGS = @LIBASSUAN_CFLAGS@ @PTH_CFLAGS@ @GLIB_CFLAGS@ @QT4_CORE_CFLAGS@ +AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ @QT4_CORE_CFLAGS@ +AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@ @QT4_CORE_CFLAGS@ if HAVE_W32_SYSTEM # Windows provides us with an endless stream of Tough Love. To spawn @@ -213,13 +205,6 @@ libgpgme_pthread_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers libgpgme_pthread_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \ -lpthread @GPG_ERROR_LIBS@ -libgpgme_pth_la_LDFLAGS = @PTH_LDFLAGS@ $(no_undefined) $(export_symbols) \ - $(libgpgme_version_script_cmd) -version-info \ - @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@ -libgpgme_pth_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers -libgpgme_pth_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \ - @PTH_LIBS@ @GPG_ERROR_LIBS@ - if BUILD_W32_GLIB libgpgme_glib_la_LDFLAGS = $(no_undefined) \ $(export_symbols) $(libgpgme_version_script_cmd) -version-info \ diff --git a/src/ath-pth.c b/src/ath-pth.c deleted file mode 100644 index 3c7bd54b..00000000 --- a/src/ath-pth.c +++ /dev/null @@ -1,186 +0,0 @@ -/* ath-pth.c - Pth module for self-adapting thread-safeness library - Copyright (C) 2002, 2003, 2004 g10 Code GmbH - - This file is part of GPGME. - - GPGME is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of - the License, or (at your option) any later version. - - GPGME is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdlib.h> -#include <errno.h> - -#include <pth.h> - -#include "ath.h" - - -/* The lock we take while checking for lazy lock initialization. */ -static pth_mutex_t check_init_lock = PTH_MUTEX_INIT; - - -uintptr_t -ath_self (void) -{ - return (uintptr_t) pth_self (); -} - - -/* Initialize the mutex *PRIV. If JUST_CHECK is true, only do this if - it is not already initialized. */ -static int -mutex_pth_init (ath_mutex_t *priv, int just_check) -{ - int err = 0; - - if (just_check) - pth_mutex_acquire (&check_init_lock, 0, NULL); - if (!*priv || !just_check) - { - pth_mutex_t *lock = malloc (sizeof (pth_mutex_t)); - if (!lock) - err = ENOMEM; - if (!err) - { - err = pth_mutex_init (lock); - if (err == FALSE) - err = errno; - else - err = 0; - - if (err) - free (lock); - else - *priv = (ath_mutex_t) lock; - } - } - if (just_check) - pth_mutex_release (&check_init_lock); - return err; -} - - -void -ath_init (void) -{ - /* Nothing to do. */ -} - - -int -ath_mutex_init (ath_mutex_t *lock) -{ - return mutex_pth_init (lock, 0); -} - - -int -ath_mutex_destroy (ath_mutex_t *lock) -{ - int err = mutex_pth_init (lock, 1); - if (!err) - { - /* GNU Pth has no destructor function. */ - free (*lock); - } - return err; -} - - -int -ath_mutex_lock (ath_mutex_t *lock) -{ - int ret = mutex_pth_init (lock, 1); - if (ret) - return ret; - - ret = pth_mutex_acquire ((pth_mutex_t *) *lock, 0, NULL); - return ret == FALSE ? errno : 0; -} - - -int -ath_mutex_unlock (ath_mutex_t *lock) -{ - int ret = mutex_pth_init (lock, 1); - if (ret) - return ret; - - ret = pth_mutex_release ((pth_mutex_t *) *lock); - return ret == FALSE ? errno : 0; -} - - -ssize_t -ath_read (int fd, void *buf, size_t nbytes) -{ - return pth_read (fd, buf, nbytes); -} - - -ssize_t -ath_write (int fd, const void *buf, size_t nbytes) -{ - return pth_write (fd, buf, nbytes); -} - - -ssize_t -ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset, - struct timeval *timeout) -{ - return pth_select (nfd, rset, wset, eset, timeout); -} - - -ssize_t -ath_waitpid (pid_t pid, int *status, int options) -{ - return pth_waitpid (pid, status, options); -} - - -int -ath_accept (int s, struct sockaddr *addr, socklen_t *length_ptr) -{ - return pth_accept (s, addr, length_ptr); -} - - -int -ath_connect (int s, const struct sockaddr *addr, socklen_t length) -{ - return pth_connect (s, addr, length); -} - -int -ath_sendmsg (int s, const struct msghdr *msg, int flags) -{ - /* FIXME: GNU Pth is missing pth_sendmsg. */ - return sendmsg (s, msg, flags); -} - - -int -ath_recvmsg (int s, struct msghdr *msg, int flags) -{ - /* FIXME: GNU Pth is missing pth_recvmsg. */ - return recvmsg (s, msg, flags); -} - diff --git a/src/gpgme.m4 b/src/gpgme.m4 index 44bf43cb..fe17f21a 100644 --- a/src/gpgme.m4 +++ b/src/gpgme.m4 @@ -98,75 +98,6 @@ AC_DEFUN([AM_PATH_GPGME], AC_SUBST(GPGME_LIBS) ]) -dnl AM_PATH_GPGME_PTH([MINIMUM-VERSION, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) -dnl Test for libgpgme and define GPGME_PTH_CFLAGS and GPGME_PTH_LIBS. -dnl -AC_DEFUN([AM_PATH_GPGME_PTH], -[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl - tmp=ifelse([$1], ,1:0.4.2,$1) - if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then - req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` - min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` - else - req_gpgme_api=0 - min_gpgme_version="$tmp" - fi - - AC_MSG_CHECKING(for GPGME Pth - version >= $min_gpgme_version) - ok=no - if test "$GPGME_CONFIG" != "no" ; then - if `$GPGME_CONFIG --thread=pth 2> /dev/null` ; then - req_major=`echo $min_gpgme_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` - req_minor=`echo $min_gpgme_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - req_micro=`echo $min_gpgme_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - if test "$gpgme_version_major" -gt "$req_major"; then - ok=yes - else - if test "$gpgme_version_major" -eq "$req_major"; then - if test "$gpgme_version_minor" -gt "$req_minor"; then - ok=yes - else - if test "$gpgme_version_minor" -eq "$req_minor"; then - if test "$gpgme_version_micro" -ge "$req_micro"; then - ok=yes - fi - fi - fi - fi - fi - fi - fi - if test $ok = yes; then - # If we have a recent GPGME, we should also check that the - # API is compatible. - if test "$req_gpgme_api" -gt 0 ; then - tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` - if test "$tmp" -gt 0 ; then - if test "$req_gpgme_api" -ne "$tmp" ; then - ok=no - fi - fi - fi - fi - if test $ok = yes; then - GPGME_PTH_CFLAGS=`$GPGME_CONFIG --thread=pth --cflags` - GPGME_PTH_LIBS=`$GPGME_CONFIG --thread=pth --libs` - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - GPGME_PTH_CFLAGS="" - GPGME_PTH_LIBS="" - AC_MSG_RESULT(no) - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GPGME_PTH_CFLAGS) - AC_SUBST(GPGME_PTH_LIBS) -]) - dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS |