summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-29 17:40:24 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-29 17:40:24 -0200
commit9784df5ba9f04163da7486c005eaf2383c37b127 (patch)
tree2f9975b894b75322ecbc93ca6bdb752fde17eb30
parent839ef4a38dceec053c3fb33878e59eb26bd8d580 (diff)
downloadxorg-lib-libXfixes-9784df5ba9f04163da7486c005eaf2383c37b127.tar.gz
Janitor: Correct make distcheck and gcc/sparse warnings.
-rw-r--r--.gitignore9
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac14
-rw-r--r--man/.gitignore2
-rw-r--r--src/.gitignore7
-rw-r--r--src/Cursor.c12
-rw-r--r--src/Makefile.am4
-rw-r--r--src/Region.c6
-rw-r--r--src/Xfixes.c2
9 files changed, 30 insertions, 34 deletions
diff --git a/.gitignore b/.gitignore
index e28ffe9..61e8e53 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
aclocal.m4
autom4te.cache
compile
@@ -20,3 +22,10 @@ mkinstalldirs
stamp-h1
xfixes.pc
*~
+*.3
+*.o
+*.la
+*.lo
+libXfixes-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 70b07e1..6b357b8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,21 +19,17 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-AM_CFLAGS = $(FIXESEXT_CFLAGS) $(X_CFLAGS)
-
SUBDIRS = src man
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xfixes.pc
-EXTRA_DIST = xfixes.pc.in autogen.sh
-
-EXTRA_DIST += ChangeLog
+EXTRA_DIST = xfixes.pc.in ChangeLog
MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog
ChangeLog:
- (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+ $(CHANGELOG_CMD)
dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index 3f491cd..754ef2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,29 +36,29 @@ AC_INIT(libXfixes, 4.0.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xo
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
AM_CONFIG_HEADER(config.h)
# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
-
-# Check for X
-PKG_CHECK_MODULES(X, x11)
-
-AC_SUBST(X_CFLAGS)
-AC_SUBST(X_LIBS)
+XORG_CWARNFLAGS
# Check fixesext configuration, strip extra digits from package version to
# find the required protocol version
FIXESEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
AC_SUBST(FIXESEXT_VERSION)
-PKG_CHECK_MODULES(FIXESEXT, xproto [fixesproto >= $FIXESEXT_VERSION] xextproto)
+PKG_CHECK_MODULES(FIXESEXT, xproto [fixesproto >= $FIXESEXT_VERSION] xextproto x11)
+FIXESEXT_CFLAGS="$CWARNFLAGS $FIXESEXT_CFLAGS"
AC_SUBST(FIXESEXT_CFLAGS)
AC_SUBST(FIXESEXT_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile
src/Makefile
diff --git a/man/.gitignore b/man/.gitignore
deleted file mode 100644
index 282522d..0000000
--- a/man/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index b956f41..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-.libs
-libXfixes.la
-*.lo
-Makefile
-Makefile.in
-*~
diff --git a/src/Cursor.c b/src/Cursor.c
index dac1f1c..5fd8efe 100644
--- a/src/Cursor.c
+++ b/src/Cursor.c
@@ -79,7 +79,7 @@ XFixesGetCursorImage (Display *dpy)
XFixesCursorImage *image;
char *name;
- XFixesCheckExtension (dpy, info, 0);
+ XFixesCheckExtension (dpy, info, NULL);
LockDisplay (dpy);
GetReq (XFixesGetCursorImageAndName, req);
req->reqType = info->codes->major_opcode;
@@ -91,7 +91,7 @@ XFixesGetCursorImage (Display *dpy)
{
UnlockDisplay (dpy);
SyncHandle ();
- return 0;
+ return NULL;
}
if (info->major_version < 2)
{
@@ -115,7 +115,7 @@ XFixesGetCursorImage (Display *dpy)
_XEatData (dpy, nbytes);
UnlockDisplay (dpy);
SyncHandle ();
- return 0;
+ return NULL;
}
image->x = rep.x;
image->y = rep.y;
@@ -171,9 +171,9 @@ XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom)
xXFixesGetCursorNameReply rep;
char *name;
- XFixesCheckExtension (dpy, info, 0);
+ XFixesCheckExtension (dpy, info, NULL);
if (info->major_version < 2)
- return 0;
+ return NULL;
LockDisplay (dpy);
GetReq (XFixesGetCursorName, req);
req->reqType = info->codes->major_opcode;
@@ -183,7 +183,7 @@ XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom)
{
UnlockDisplay (dpy);
SyncHandle ();
- return 0;
+ return NULL;
}
*atom = rep.atom;
if ((name = (char *) Xmalloc(rep.nbytes+1))) {
diff --git a/src/Makefile.am b/src/Makefile.am
index 27ba027..3ba9522 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,8 +8,8 @@ libXfixes_la_SOURCES = \
Xfixes.c \
Xfixesint.h
-libXfixes_la_LIBADD = @X_LIBS@
-AM_CFLAGS = @X_CFLAGS@ @FIXESEXT_CFLAGS@
+libXfixes_la_LIBADD = @FIXESEXT_LIBS@
+AM_CFLAGS = @FIXESEXT_CFLAGS@
INCLUDES = -I$(top_srcdir)/include/X11/extensions
diff --git a/src/Region.c b/src/Region.c
index e75e1c1..842da06 100644
--- a/src/Region.c
+++ b/src/Region.c
@@ -316,7 +316,7 @@ XFixesFetchRegionAndBounds (Display *dpy,
long nbytes;
long nread;
- XFixesCheckExtension (dpy, info, 0);
+ XFixesCheckExtension (dpy, info, NULL);
LockDisplay (dpy);
GetReq (XFixesFetchRegion, req);
req->reqType = info->codes->major_opcode;
@@ -327,7 +327,7 @@ XFixesFetchRegionAndBounds (Display *dpy,
{
UnlockDisplay (dpy);
SyncHandle ();
- return 0;
+ return NULL;
}
bounds->x = rep.x;
bounds->y = rep.y;
@@ -342,7 +342,7 @@ XFixesFetchRegionAndBounds (Display *dpy,
_XEatData (dpy, nbytes);
UnlockDisplay (dpy);
SyncHandle ();
- return 0;
+ return NULL;
}
_XRead16 (dpy, (short *) rects, nrects << 3);
/* skip any padding */
diff --git a/src/Xfixes.c b/src/Xfixes.c
index 05bfac2..b9b0fb6 100644
--- a/src/Xfixes.c
+++ b/src/Xfixes.c
@@ -87,7 +87,7 @@ XFixesExtAddDisplay (XFixesExtInfo *extinfo,
UnlockDisplay (dpy);
SyncHandle ();
Xfree(info);
- return 0;
+ return NULL;
}
info->major_version = rep.majorVersion;
info->minor_version = rep.minorVersion;