On 9/20/10 3:42 AM, Adam Tkac wrote:
> Which version of autoconf are you using?
The version that ships with RHEL 4 (2.59).
The attached patch seems to make things work properly. Question for
Martin: Is the "while(0)" really necessary? I don't understand why the
macro can't just be:
#define gnutls_transport_set_global_errno(A) errno=(A)
Index: configure.ac
===================================================================
--- configure.ac (revision 4145)
+++ configure.ac (working copy)
@@ -78,6 +78,8 @@
AC_CHECK_LIB([gnutls], [gnutls_global_init],
[GNUTLS_LIBS='-lgnutls'
AC_DEFINE([HAVE_GNUTLS], 1, [Is gnutls present? ])])
+ AC_CHECK_LIB([gnutls], [gnutls_transport_set_global_errno], [],
+ [AC_DEFINE([HAVE_OLD_GNUTLS], 1, [Does gnutls lack the
gnutls_transport_set_global_errno() function? ])])
fi
AC_SUBST([GNUTLS_LIBS])
AM_CONDITIONAL([HAVE_GNUTLS], [ ! test "x$GNUTLS_LIBS" = x ])
Index: common/rdr/TLSOutStream.cxx
===================================================================
--- common/rdr/TLSOutStream.cxx (revision 4145)
+++ common/rdr/TLSOutStream.cxx (working copy)
@@ -27,6 +27,10 @@
#include <rdr/TLSOutStream.h>
#include <errno.h>
+#ifdef HAVE_OLD_GNUTLS
+#define gnutls_transport_set_global_errno(A) do { errno = (A); } while(0)
+#endif
+
#ifdef HAVE_GNUTLS
using namespace rdr;
Index: common/rdr/TLSInStream.cxx
===================================================================
--- common/rdr/TLSInStream.cxx (revision 4145)
+++ common/rdr/TLSInStream.cxx (working copy)
@@ -27,6 +27,10 @@
#include <rdr/TLSInStream.h>
#include <errno.h>
+#ifdef HAVE_OLD_GNUTLS
+#define gnutls_transport_set_global_errno(A) do { errno = (A); } while(0)
+#endif
+
#ifdef HAVE_GNUTLS
using namespace rdr;
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel