Eventually including ../config.h generated by autotools

This commit is contained in:
Thomas Schmitt 2010-05-19 09:02:20 +00:00
parent afcc57f2c0
commit 050059a388

View File

@ -13,6 +13,10 @@
cc -g -o compare_file compare_file.c cc -g -o compare_file compare_file.c
*/ */
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include <ctype.h> #include <ctype.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
@ -250,6 +254,12 @@ int main(int argc, char **argv)
int ret, i, with_ctime= 1; int ret, i, with_ctime= 1;
char adr1[4096], adr2[4096], adrc[4096]; 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) { if(argc<4) {
fprintf(stderr, "usage: %s path prefix1 prefix2\n", argv[0]); fprintf(stderr, "usage: %s path prefix1 prefix2\n", argv[0]);
exit(2); exit(2);
@ -259,7 +269,7 @@ int main(int argc, char **argv)
with_ctime= 0; with_ctime= 0;
else { else {
fprintf(stderr, "%s : Option not recognized: '%s'\n", argv[0], argv[i]); fprintf(stderr, "%s : Option not recognized: '%s'\n", argv[0], argv[i]);
exit(1); exit(2);
} }
} }