--- genext2fs-1.4.1.orig/autogen.sh
+++ genext2fs-1.4.1/autogen.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+die() {
+ echo "*** $0 failed :("
+ exit 1
+}
+
+./clean.sh
+
+automake_flags="-c -a"
+for p in aclocal autoconf automake ; do
+ flags=${p}_flags
+ if ! ${p} ${!flags} ; then
+ echo "*** ${p} failed :("
+ exit 1
+ fi
+done
+
+echo
+echo "Now just run:"
+echo "./configure"
+echo "make"
--- genext2fs-1.4.1.orig/config.h.in
+++ genext2fs-1.4.1/config.h.in
@@ -52,7 +52,7 @@
/* Define to 1 if you have the `strtof' function. */
#undef HAVE_STRTOF
-/* Define to 1 if `st_rdev' is member of `struct stat'. */
+/* Define to 1 if `struct stat' is a member of `st_rdev'. */
#undef HAVE_STRUCT_STAT_ST_RDEV
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
@@ -98,6 +98,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@@ -111,13 +114,40 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* Version number of package */
-#undef VERSION
-
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
--- genext2fs-1.4.1.orig/configure.in
+++ genext2fs-1.4.1/configure.in
@@ -8,7 +8,7 @@
builtin(include, [m4/ac_func_scanf_can_malloc.m4])dnl
AM_INIT_AUTOMAKE(genext2fs,1.4.1)
-AC_CONFIG_HEADER([config.h])
+AM_CONFIG_HEADER(config.h)
AC_GNU_SOURCE
--- genext2fs-1.4.1.orig/genext2fs.c
+++ genext2fs-1.4.1/genext2fs.c
@@ -286,7 +286,9 @@
// older solaris. Note that this is still not very portable, in that
// the return value cannot be trusted.
-#if SCANF_CAN_MALLOC
+#if 0 // SCANF_CAN_MALLOC
+// C99 define "a" for floating point, so you can have runtime surprise
+// according the library versions
# define SCANF_PREFIX "a"
# define SCANF_STRING(s) (&s)
#else
--- genext2fs-1.4.1.orig/clean.sh
+++ genext2fs-1.4.1/clean.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+for f in \
+ `find . -name Makefile.in -o -name Makefile` \
+ `find . -name .libs -o -name .deps` \
+ `find . -name '*.o' -o -name '*.la' -o -name '*.lo' -o -name '*.loT'` \
+ aclocal.m4* autom4te.cache stamp-h1 \
+ configure config.h config.log config.status \
+ depcomp install-sh ltmain.sh missing mkinstalldirs libtool \
+ genext2fs
+do
+ rm -rf $f
+done