From e62023fe1b04a9c7f0052b8ea39b1064e37ba3e7 Mon Sep 17 00:00:00 2001 From: John Williams Date: Mon, 8 Nov 2004 00:25:31 +0000 Subject: [PATCH] Add support for win32 (non-cygwin) builds of elf2flt Fix minor typo in error message Patch submitted by Scott Thibault --- elf2flt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/elf2flt.c b/elf2flt.c index 31f23f2..b0ef6ca 100644 --- a/elf2flt.c +++ b/elf2flt.c @@ -40,8 +40,11 @@ #include /* Userland prototypes of the Unix std system calls */ #include /* Flag value for file handling functions */ #include - +#ifndef WIN32 #include /* Consts and structs defined by the internet system */ +#else +#include +#endif /* from $(INSTALLDIR)/include */ #include /* Main header file for the BFD library */ @@ -1686,9 +1689,9 @@ int main(int argc, char *argv[]) } \ } while (0) - gf = fopen(ofile, "a"); + gf = fopen(ofile, "ab"); /* Add 'b' to support non-posix (ie windows) */ if (!gf) { - fprintf(stderr, "Can't opne file %s for writing\n", ofile); \ + fprintf(stderr, "Can't open file %s for writing\n", ofile); \ exit(4); } -- 2.11.0