From 53cd97376ff9f2bc75a1b46e4d117c25ee983615 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Thu, 15 Jan 2009 16:22:28 -0200 Subject: [PATCH] Ansification and compile warning fixes. This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects make distcheck and all gcc 4.3 and sparse warnings. Change-Id: Ic2ab8aa52e0ddd92c45e4fc072a00d09d55c76ed --- .gitignore | 4 ++++ Makefile.am | 2 +- configure.ac | 8 ++++++++ xwud.c | 8 ++++---- 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 #include -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); -- 2.7.4