[Xcb] low-level API changes

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Sat Mar 4 00:55:14 PST 2006


>
> Could you also do me a favor and recast your visibility patch, and any
> others I haven't committed, against the current code? There have been
> cleanups in configure.ac and all over that may make your patches
> cleaner.

here are they.

Vincent
-------------- next part --------------
--- xcbint.h	2006-03-04 10:01:35.681578751 +0100
+++ xcbint.h.old	2006-03-04 09:43:01.860275538 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2001-2004 Bart Massey and Jamey Sharp.
+ * Copyright (C) 2001-2006 Bart Massey and Jamey Sharp.
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -8,17 +8,17 @@
  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  * and/or sell copies of the Software, and to permit persons to whom the
  * Software is furnished to do so, subject to the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * 
+ *
  * Except as contained in this notice, the names of the authors or their
  * institutions shall not be used in advertising or otherwise to promote the
  * sale, use or other dealings in this Software without prior written
@@ -32,6 +32,10 @@
 #include "config.h"
 #endif
 
+#ifdef GCC_HAS_VISIBILITY
+#pragma GCC visibility push(hidden)
+#endif
+
 enum workarounds {
     WORKAROUND_NONE,
     WORKAROUND_GLX_GET_FB_CONFIGS_BUG
@@ -153,4 +157,9 @@
 };
 
 int _xcb_conn_wait(XCBConnection *c, const int should_write, pthread_cond_t *cond);
+
+#ifdef GCC_HAS_VISIBILITY
+#pragma GCC visibility pop
+#endif
+
 #endif
-------------- next part --------------
dnl Detection and configuration of the visibility feature of gcc
dnl Vincent Torri 2006-02-11
dnl
dnl GCC_CHECK_VISIBILITY([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Check the visibility feature of gcc
dnl
AC_DEFUN([GCC_CHECK_VISIBILITY],
   [AC_MSG_CHECKING([whether ${CC} supports visibility feature])
    save_CFLAGS=${CFLAGS}
    CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
    AC_COMPILE_IFELSE(
       [AC_LANG_PROGRAM(
          [[
#pragma GCC visibility push(hidden)
extern void f(int);
#pragma GCC visibility pop
          ]],
          [[]]
        )],
       [AC_DEFINE(
           GCC_HAS_VISIBILITY,
           [],
           [Defined if GCC supports the vilibility feature])
        m4_if([$1], [], [:], [$1])
        AC_MSG_RESULT(yes)],
       [m4_if([$2], [], [:], [$2])
        AC_MSG_RESULT(no)])
    CFLAGS=${save_CFLAGS}
   ])
-------------- next part --------------
--- configure.ac	2006-03-04 10:00:42.353458376 +0100
+++ configure.ac.doc	2006-03-04 08:43:43.839711835 +0100
@@ -95,10 +95,12 @@
 AC_CACHE_CHECK([what debugging options to apply], [CDEBUGFLAGS], [CDEBUGFLAGS="-g"])
 AC_SUBST(CDEBUGFLAGS)
 
-CWARNFLAGS="-Wall -pedantic -Wpointer-arith \
+CWARNFLAGS="-Wall -W -pedantic -Wpointer-arith \
 	-Wstrict-prototypes -Wmissing-declarations -Wnested-externs"
 AC_SUBST(CWARNFLAGS)
 
+GCC_CHECK_VISIBILITY()
+
 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
 AC_CONFIG_FILES([xcb.pc])
 


More information about the Xcb mailing list