aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2009-12-22 13:00:30 +0000
committerMarcus Brinkmann <[email protected]>2009-12-22 13:00:30 +0000
commit7eb555370fe4b55bdbf7f682e0b66997dd32b7f0 (patch)
tree62a7fe7bc3e8befb5488672c6c47d22e9e63ce4c
parent2009-12-17 Marcus Brinkmann <[email protected]> (diff)
downloadgpgme-7eb555370fe4b55bdbf7f682e0b66997dd32b7f0.tar.gz
gpgme-7eb555370fe4b55bdbf7f682e0b66997dd32b7f0.zip
2009-12-22 Marcus Brinkmann <[email protected]>
* configure.ac: Do not use echo -n. Test for __thread. src/ 2009-12-22 Marcus Brinkmann <[email protected]> * debug.c: Test for TLS, not __GNUC__
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac13
-rw-r--r--src/ChangeLog4
-rw-r--r--src/debug.c2
4 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 96140db7..7ce26f3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-22 Marcus Brinkmann <[email protected]>
+
+ * configure.ac: Do not use echo -n. Test for __thread.
+
2009-12-17 Marcus Brinkmann <[email protected]>
* configure.ac: Make largefile check more robust.
diff --git a/configure.ac b/configure.ac
index cb3db3d6..90df95f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ min_automake_version="1.10"
m4_define(my_version, [1.2.1])
m4_define(my_issvn, [yes])
-m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
+m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \
|| echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
AC_INIT([gpgme],
[my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
@@ -224,6 +224,17 @@ if test "$GCC" = yes; then
fi
fi
+# Only used for debugging, so no serious test needed (for actual
+# functionality you have to test libc as well, this only tests the
+# compiler).
+AC_CACHE_CHECK([for __thread],[gpgme_cv_tls_works],
+ AC_COMPILE_IFELSE([__thread int foo;],
+ gpgme_cv_tls_works=yes,gpgme_cv_tls_works=no))
+if test "$gpgme_cv_tls_works" = yes; then
+ AC_DEFINE(HAVE_TLS, [1], [Define if __thread is supported])
+fi
+
+
# Checks for library functions.
AC_FUNC_FSEEKO
diff --git a/src/ChangeLog b/src/ChangeLog
index 98de853f..4a83b93c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-22 Marcus Brinkmann <[email protected]>
+
+ * debug.c: Test for TLS, not __GNUC__
+
2009-12-15 Marcus Brinkmann <[email protected]>
* assuan-support.c (my_spawn): Calloc, not malloc, the fd_items.
diff --git a/src/debug.c b/src/debug.c
index 1471ff24..38e0cca6 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -55,7 +55,7 @@ static int debug_level;
static FILE *errfp;
-#ifdef __GNUC__
+#ifdef HAVE_TLS
#define FRAME_NR
static __thread int frame_nr = 0;
#endif