Tcl Source Code

Artifact [22a183243f]
Login

Artifact 22a183243f480e8c2d0f9201e581593e3e302ea5:

Attachment "3135271.patch" to ticket [3135271fff] added by nijtmans 2010-12-13 04:42:35.
Index: generic/tcl.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.h,v
retrieving revision 1.309
diff -u -r1.309 tcl.h
--- generic/tcl.h	10 Dec 2010 21:59:24 -0000	1.309
+++ generic/tcl.h	12 Dec 2010 21:41:02 -0000
@@ -190,7 +190,7 @@
 #   endif
 #else
 #   define DLLIMPORT
-#   if defined(__GNUC__) && __GNUC__ > 3
+#   if defined(__GNUC__) && !defined(NO_VIZ)
 #       define DLLEXPORT __attribute__ ((visibility("default")))
 #   else
 #       define DLLEXPORT
Index: unix/configure
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure,v
retrieving revision 1.297
diff -u -r1.297 configure
--- unix/configure	12 Dec 2010 11:51:44 -0000	1.297
+++ unix/configure	12 Dec 2010 21:41:03 -0000
@@ -6545,6 +6545,11 @@
 
 else
 
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_VIZ
+_ACEOF
+
 	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
 	cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
Index: unix/tcl.m4
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tcl.m4,v
retrieving revision 1.230
diff -u -r1.230 tcl.m4
--- unix/tcl.m4	12 Dec 2010 11:51:44 -0000	1.230
+++ unix/tcl.m4	12 Dec 2010 21:41:03 -0000
@@ -1056,6 +1056,7 @@
     AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
 	CFLAGS="$CFLAGS -fvisibility=hidden"
     ], [
+	AC_DEFINE(NO_VIZ, [], [No visibility attribute])
 	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
 	AC_TRY_LINK([
 	    extern __attribute__((__visibility__("hidden"))) void f(void);