summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-12 17:48:28 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-12 17:48:28 -0200
commit51a24f2177b09f8ef63ba1e5b09028f0582e1138 (patch)
treeeec34d9243cc578bb8f2e786f3be653f47329483
parenta9a8778a984e69007d77227969b0103b2a81e4c8 (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.am4
-rw-r--r--configure.ac8
-rw-r--r--read.c4
-rw-r--r--struct.c2
5 files changed, 17 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index b644569..53bc4fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,7 @@ install-sh
missing
stamp-h1
*~
+fonttosfnt-*.tar.*
+ChangeLog
+*.o
+tags
diff --git a/Makefile.am b/Makefile.am
index 3fe03df..4bffc1f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
bin_PROGRAMS = fonttosfnt
-AM_CFLAGS = -DXVENDORNAME=\"X.Org\ Foundation\" $(FONTTOSFNT_CFLAGS) -DXVENDORNAMESHORT=\"X.Org\" -D_BSD_SOURCE
+AM_CFLAGS = -DXVENDORNAME=\"X.Org\ Foundation\" $(FONTTOSFNT_CFLAGS) -DXVENDORNAMESHORT=\"X.Org\" -D_BSD_SOURCE -D_GNU_SOURCE
fonttosfnt_LDADD = $(FONTTOSFNT_LIBS) -lm
fonttosfnt_SOURCES = \
@@ -75,6 +75,6 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
.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 0782b03..73e36a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,11 +26,17 @@ AC_INIT(fonttosfnt,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=
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
+
AC_CHECK_FUNC(setenv, have_setenv=yes, have_setenv=no)
AC_CHECK_FUNCS([vasprintf])
AC_CHECK_DECLS([va_copy], [], [], [
@@ -42,10 +48,12 @@ AM_CONDITIONAL(NEED_SETENV, [test x$have_setenv = xno])
# Checks for pkg-config packages
PKG_CHECK_MODULES(FONTTOSFNT, xproto freetype2 fontenc)
+FONTTOSFNT_CFLAGS="$CWARNFLAGS $FONTTOSFNT_CFLAGS"
AC_SUBST(FONTTOSFNT_CFLAGS)
AC_SUBST(FONTTOSFNT_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/read.c b/read.c
index 440d50a..bee518c 100644
--- a/read.c
+++ b/read.c
@@ -238,8 +238,8 @@ readFile(char *filename, FontPtr font)
if(verbose_flag)
fprintf(stderr, "size %d: %dx%d\n",
i,
- face->available_sizes[i].x_ppem >> 6,
- face->available_sizes[i].y_ppem >> 6);
+ (int)(face->available_sizes[i].x_ppem >> 6),
+ (int)(face->available_sizes[i].y_ppem >> 6));
rc = FT_Set_Pixel_Sizes(face,
face->available_sizes[i].x_ppem >> 6,
diff --git a/struct.c b/struct.c
index 2d346e6..c0a3add 100644
--- a/struct.c
+++ b/struct.c
@@ -28,7 +28,7 @@ THE SOFTWARE.
#include "fonttosfnt.h"
FontPtr
-makeFont()
+makeFont(void)
{
FontPtr font;