From: borutr Date: Wed, 11 Mar 2009 19:44:49 +0000 (+0000) Subject: include sys/stat.h X-Git-Url: https://git.gag.com/?p=fw%2Fsdcc;a=commitdiff_plain;h=ebc4db7ef85c959245379d5c18f310a27ec44031 include sys/stat.h git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5410 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/as/asranlib/asranlib.c b/as/asranlib/asranlib.c index dde9f787..52dd6111 100644 --- a/as/asranlib/asranlib.c +++ b/as/asranlib/asranlib.c @@ -21,6 +21,7 @@ along with this program. If not, see . */ #include #include #include +#include #include "dbuf_string.h" #include "lkar.h" @@ -593,7 +594,6 @@ do_ranlib (const char *archive) struct stat stat_buf; int can_stat; - /* TODO: create tmpfile in temporery directory (TMP, TMPDIR, /usr/tmp, /tmp) */ #ifdef _WIN32 if (NULL == _mktemp (tmpfile) || NULL == (outfp = fopen (tmpfile, "wb"))) { @@ -667,7 +667,7 @@ do_ranlib (const char *archive) if (0 != fstat(fileno(infp), &stat_buf)) { - fprintf (stderr, "asranlib: can't stat %s: ", infp); + fprintf (stderr, "asranlib: can't stat %s: ", archive); perror (NULL); fclose (infp); can_stat = 0;