aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2003-07-11 03:24:01 +0000
committerH. Peter Anvin <hpa@zytor.com>2003-07-11 03:24:01 +0000
commit7c62e2a786bdc92b76b593246fe3f21a9263551f (patch)
tree0ba597cea3ffa08e6870cf9edd1bc08993d89f33
parentacdd7cafcc8a90e15665caa4fd7768dc5a3a9958 (diff)
downloadzisofs-tools-7c62e2a786bdc92b76b593246fe3f21a9263551f.tar.gz
Use autoheader; use 64-bit mode when appropriate
-rw-r--r--Makefile7
-rw-r--r--config.h.in27
-rw-r--r--configure.in6
-rw-r--r--hash.c1
-rw-r--r--mkzftree.h7
5 files changed, 18 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index a469eeb..929be32 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ mkzftree: $(OBJS)
$(CC) $(LDFLAGS) -o mkzftree $(OBJS) $(LIBS)
spotless: distclean
- rm -f configure
+ rm -f configure config.h.in
install: all
mkdir -p $(INSTALLROOT)$(bindir)
@@ -54,7 +54,10 @@ MCONFIG: configure MCONFIG.in config.h.in
config.h: MCONFIG
: Generated by side effect
-configure: configure.in aclocal.m4
+config.h.in: configure.in aclocal.m4
+ autoheader
+
+configure: configure.in aclocal.m4 config.h.in
autoconf
rm -f MCONFIG config.cache config.log config.status config.h
diff --git a/config.h.in b/config.h.in
deleted file mode 100644
index 107e638..0000000
--- a/config.h.in
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- c -*- ------------------------------------------------------------- *
- *
- * Copyright 2001 H. Peter Anvin - All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
- * USA; either version 2 of the License, or (at your option) any later
- * version; incorporated herein by reference.
- *
- * ----------------------------------------------------------------------- */
-/* $Id$ */
-
-/*
- * config.h.in
- *
- * Pattern file for configurations
- */
-
-#undef HAVE_SYSEXITS_H /* Define if <sysexits.h> exists */
-#undef HAVE_GETOPT_H /* Define if <getopt.h> exists */
-#undef HAVE_GETOPT_LONG /* Define if we have getopt_long() */
-#undef HAVE_LCHOWN /* Define if we have lchown() */
-#undef off_t /* Define to long if off_t missing */
-#undef size_t /* Define to unsigned long if size_t missing */
-#undef ssize_t /* Define to long if ssize_t missing */
-
diff --git a/configure.in b/configure.in
index f44a1fa..605efd0 100644
--- a/configure.in
+++ b/configure.in
@@ -6,6 +6,8 @@ AC_INIT(MCONFIG.in)
AC_PREFIX_DEFAULT(/usr)
AC_PROG_CC
+AC_GNU_SOURCE
+AC_SYS_LARGEFILE
AC_C_CONST
AC_C_INLINE
@@ -23,8 +25,10 @@ PA_ADD_CFLAGS(-Wshadow)
PA_ADD_CFLAGS(-Wcast-align)
PA_ADD_CFLAGS(-pipe)
+AC_CHECK_HEADERS(inttypes.h)
AC_CHECK_HEADERS(sysexits.h)
AC_CHECK_HEADERS(getopt.h)
+AC_CHECK_HEADERS(endian.h)
AC_CHECK_TYPE(off_t, signed long)
AC_CHECK_TYPE(size_t, unsigned long)
@@ -35,6 +39,8 @@ AC_CHECK_FUNCS(lchown)
AC_SEARCH_LIBS(compress2, z, , [AC_MSG_ERROR(zlib not found, cannot continue)])
AC_SEARCH_LIBS(getopt_long, [getopt getopt_long], AC_DEFINE(HAVE_GETOPT_LONG))
+AC_DEFINE([HAVE_GETOPT_LONG], [], [Define to 1 if you have the `getopt_long' function])
+
AC_PROG_RANLIB
AC_PROG_INSTALL
diff --git a/hash.c b/hash.c
index 993579b..d9ba1a6 100644
--- a/hash.c
+++ b/hash.c
@@ -17,7 +17,6 @@
* Hash table used to find hard-linked files
*/
-#include <stdlib.h>
#include "mkzftree.h"
#define HASH_BUCKETS 2683
diff --git a/mkzftree.h b/mkzftree.h
index f954e6f..ff902bf 100644
--- a/mkzftree.h
+++ b/mkzftree.h
@@ -14,9 +14,16 @@
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
+#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#ifdef HAVE_ENDIAN_H
+#include <endian.h>
+#endif
#ifdef HAVE_SYSEXITS_H
#include <sysexits.h>