From 050059a388fe0650b3ec6dddfb55175995f3f493 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 19 May 2010 09:02:20 +0000 Subject: [PATCH] Eventually including ../config.h generated by autotools --- test/compare_file.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/compare_file.c b/test/compare_file.c index 47be2f41..d554c4e8 100644 --- a/test/compare_file.c +++ b/test/compare_file.c @@ -13,6 +13,10 @@ cc -g -o compare_file compare_file.c */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include #include @@ -250,6 +254,12 @@ int main(int argc, char **argv) int ret, i, with_ctime= 1; char adr1[4096], adr2[4096], adrc[4096]; + if(sizeof(off_t) < 8) { + fprintf(stderr, + "%s : FATAL : Compile time misconfiguration. sizeof(off_t) too small.\n\n", + argv[0]); + exit(4); + } if(argc<4) { fprintf(stderr, "usage: %s path prefix1 prefix2\n", argv[0]); exit(2); @@ -259,7 +269,7 @@ int main(int argc, char **argv) with_ctime= 0; else { fprintf(stderr, "%s : Option not recognized: '%s'\n", argv[0], argv[i]); - exit(1); + exit(2); } }