projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
include sys/stat.h
[fw/sdcc]
/
as
/
asranlib
/
asranlib.c
diff --git
a/as/asranlib/asranlib.c
b/as/asranlib/asranlib.c
index dde9f787a24beafdac75ff1f1607070418072b89..52dd6111fd59ced3aeef277ebfbe5ac2faffa967 100644
(file)
--- a/
as/asranlib/asranlib.c
+++ b/
as/asranlib/asranlib.c
@@
-21,6
+21,7
@@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <string.h>
#include <assert.h>
#include <time.h>
#include <string.h>
#include <assert.h>
#include <time.h>
+#include <sys/stat.h>
#include "dbuf_string.h"
#include "lkar.h"
#include "dbuf_string.h"
#include "lkar.h"
@@
-593,7
+594,6
@@
do_ranlib (const char *archive)
struct stat stat_buf;
int can_stat;
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")))
{
#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))
{
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;
perror (NULL);
fclose (infp);
can_stat = 0;