summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-15 16:22:28 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-15 16:22:28 -0200
commit11d54146e412a726807b8c0d5df8eb584084325d (patch)
treead89e986908bfd57197511fb2e93e7c9d576dd51
parentf20c704dd2962fabaea95a1c118ceffe0898d572 (diff)
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects make distcheck and all gcc 4.3 and sparse warnings.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac8
-rw-r--r--xwud.c8
4 files changed, 17 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 84a2306..5f98b68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,7 @@ stamp-h1
xwud
xwud.1
*~
+*.o
+xwud-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 6eb6c7e..99e345f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,6 +68,6 @@ 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 e773fa8..4ed0947 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,17 +26,25 @@ AC_INIT(xwud,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
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)
AC_PROG_CC
AC_PROG_INSTALL
+XORG_CWARNFLAGS
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(XWUD, x11)
+XWUD_CFLAGS="$CWARNFLAGS $XWUD_CFLAGS"
AC_SUBST(XWUD_CFLAGS)
AC_SUBST(XWUD_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/xwud.c b/xwud.c
index 1475f06..d2c463d 100644
--- a/xwud.c
+++ b/xwud.c
@@ -42,11 +42,11 @@ from The Open Group.
#include <errno.h>
#include <stdlib.h>
-Atom wm_protocols;
-Atom wm_delete_window;
-int split;
+static Atom wm_protocols;
+static Atom wm_delete_window;
+static int split;
-char *progname;
+static char *progname;
static void usage(void);
static Bool Read(char *ptr, int size, int nitems, FILE *stream);