[Xcb-commit] 2 commits - atom configure.ac convenient event icccm image keysyms property reply wm

Jamey Sharp jamey at kemper.freedesktop.org
Sun Nov 12 18:18:49 PST 2006


 atom/Makefile.am       |    2 +-
 atom/atoms.gperf.m4    |   12 ++++++------
 configure.ac           |   10 ++++++++++
 convenient/Makefile.am |    2 +-
 event/Makefile.am      |    2 +-
 icccm/Makefile.am      |    2 +-
 image/Makefile.am      |    2 +-
 keysyms/Makefile.am    |    2 +-
 property/Makefile.am   |    2 +-
 reply/Makefile.am      |    2 +-
 wm/Makefile.am         |    2 +-
 11 files changed, 25 insertions(+), 15 deletions(-)

New commits:
diff-tree 02e439a7e5023611a11ff320db7f24f9b79a2523 (from e61fc10ae25a075bc360d3e290ef5c21d629a547)
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Wed Jun 7 12:06:00 2006 -0700

    Bug #7150: Rename "len" to "namelen" to avoid m4 substitution
    
    This is the second of two fixes needed to get xcb-util building on
    Solaris.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>

diff --git a/atom/atoms.gperf.m4 b/atom/atoms.gperf.m4
index c22f745..2a4a369 100644
--- a/atom/atoms.gperf.m4
+++ b/atom/atoms.gperf.m4
@@ -84,7 +84,7 @@ int get_atom_name(xcb_connection_t *c, x
 {
 	static char buf[100];
 	const char *name = get_atom_name_predefined(atom);
-	int len;
+	int namelen;
 	xcb_get_atom_name_cookie_t atomc;
 	xcb_get_atom_name_reply_t *atomr;
 	if(name)
@@ -97,11 +97,11 @@ int get_atom_name(xcb_connection_t *c, x
 	atomr = xcb_get_atom_name_reply(c, atomc, 0);
 	if(!atomr)
 		return 0;
-	len = xcb_get_atom_name_name_length(atomr);
-	if(len > sizeof(buf))
-		len = sizeof(buf);
-	*lengthp = len;
-	memcpy(buf, xcb_get_atom_name_name(atomr), len);
+	namelen = xcb_get_atom_name_name_length(atomr);
+	if(namelen > sizeof(buf))
+		namelen = sizeof(buf);
+	*lengthp = namelen;
+	memcpy(buf, xcb_get_atom_name_name(atomr), namelen);
 	*namep = buf;
 	free(atomr);
 	return 1;
diff-tree e61fc10ae25a075bc360d3e290ef5c21d629a547 (from cbbdf0f622ed3a8642e30198940e24117baaf55e)
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Wed Jun 7 12:06:00 2006 -0700

    Bug #7150: Check for gcc & Sun cc in configure.ac and use correct flags to turn on more warnings for each
    
    This is the first of two fixes needed to get xcb-util building on
    Solaris.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>

diff --git a/atom/Makefile.am b/atom/Makefile.am
index eaff571..de642a8 100644
--- a/atom/Makefile.am
+++ b/atom/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBAtom.la
 
 xcbinclude_HEADERS = xcb_atom.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 libXCBAtom_la_SOURCES = atoms.c atomlist.m4 atoms.gperf.m4 xcb_atom.h.m4
 libXCBAtom_la_CFLAGS = $(XCB_CFLAGS)
diff --git a/configure.ac b/configure.ac
index 8b3c4ba..1204b00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,16 @@ fi
 AC_PROG_CC
 AC_PROG_LIBTOOL
 
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall"
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+	CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+
 xcbincludedir='${includedir}/xcb'
 AC_SUBST(xcbincludedir)
 
diff --git a/convenient/Makefile.am b/convenient/Makefile.am
index bd9eab4..ebc4a10 100644
--- a/convenient/Makefile.am
+++ b/convenient/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBAux.la
 
 xcbinclude_HEADERS = xcb_aux.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 libXCBAux_la_SOURCES = xcb_aux.c
 libXCBAux_la_CFLAGS = $(XCB_CFLAGS)
diff --git a/event/Makefile.am b/event/Makefile.am
index 32440bd..bd53055 100644
--- a/event/Makefile.am
+++ b/event/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBEvent.la
 
 xcbinclude_HEADERS = xcb_event.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 libXCBEvent_la_SOURCES = events.c
 libXCBEvent_la_CFLAGS = $(XCB_CFLAGS)
diff --git a/icccm/Makefile.am b/icccm/Makefile.am
index cf78df0..f5ff32a 100644
--- a/icccm/Makefile.am
+++ b/icccm/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBICCCM.la
 
 xcbinclude_HEADERS = xcb_icccm.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 libXCBICCCM_la_SOURCES = icccm.c
 libXCBICCCM_la_CFLAGS = $(XCB_CFLAGS) $(XCB_ATOM_CFLAGS) $(XCB_EVENT_CFLAGS) \
diff --git a/image/Makefile.am b/image/Makefile.am
index 1237aad..d688fca 100644
--- a/image/Makefile.am
+++ b/image/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBImage.la
 
 xcbinclude_HEADERS = xcb_image.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 XCB_IMAGE_LIBS = libXCBImage.la
 
diff --git a/keysyms/Makefile.am b/keysyms/Makefile.am
index 6765333..e5a38cd 100644
--- a/keysyms/Makefile.am
+++ b/keysyms/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBKeysyms.la
 
 xcbinclude_HEADERS = xcb_keysyms.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 libXCBKeysyms_la_SOURCES = keysyms.c
 libXCBKeysyms_la_CFLAGS = $(XCB_CFLAGS)
diff --git a/property/Makefile.am b/property/Makefile.am
index e96b4c0..c6c7a44 100644
--- a/property/Makefile.am
+++ b/property/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBProperty.la
 
 xcbinclude_HEADERS = xcb_property.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 libXCBProperty_la_SOURCES = prop.c
 libXCBProperty_la_CFLAGS = $(XCB_CFLAGS) $(XCB_EVENT_CFLAGS)
diff --git a/reply/Makefile.am b/reply/Makefile.am
index 504c68d..06b03c8 100644
--- a/reply/Makefile.am
+++ b/reply/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBReply.la
 
 xcbinclude_HEADERS = xcb_reply.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 XCB_REPLY_LIBS = libXCBReply.la
 
diff --git a/wm/Makefile.am b/wm/Makefile.am
index a5fbc9c..c436185 100644
--- a/wm/Makefile.am
+++ b/wm/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBWM.la
 
 xcbinclude_HEADERS = xcb_wm.h
 
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
 
 XCB_XCBWM_LIBS = libXCBWM.la
 


More information about the xcb-commit mailing list