=================================================================== RCS file: /cvs/djgpp/djgpp/src/stub/stubedit.c,v retrieving revision 1.1 retrieving revision 1.2 diff -p -u -r1.1 -r1.2 --- djgpp/src/stub/stubedit.c 1995/01/11 08:46:54 1.1 +++ /cvs/djgpp/djgpp/src/stub/stubedit.c 1996/10/26 10:09:48 1.2 @@ -1,10 +1,14 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #include #include -#include #include +#ifdef __DJGPP__ +#include +#endif + #include "../../include/stubinfo.h" unsigned long size_of_stubinfo = 0; @@ -25,11 +29,11 @@ void find_info(char *filename) exit(1); } - fseek(f, 512L, 0); - fread(test_magic, 16, 1, f); - if (memcmp(test_magic, "go32stub", 8) != 0) + if (fseek(f, 512L, 0) != 0 || + fread(test_magic, 1, 16, f) != 16 || + memcmp(test_magic, "go32stub", 8) != 0) { - printf("Error: %s is not a go32 v2.0 or higher stub\n"); + printf("Error: %s is not a go32 v2.0 or higher stub\n", filename); exit(1); }