projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
v850 linker scripts
[deliverable/binutils-gdb.git]
/
libiberty
/
choose-temp.c
diff --git
a/libiberty/choose-temp.c
b/libiberty/choose-temp.c
index 1f5e0e50c880d3ed1f568139200cad721cd523a3..8e1e84be7651d05962810979c34696733b338fb3 100644
(file)
--- a/
libiberty/choose-temp.c
+++ b/
libiberty/choose-temp.c
@@
-22,6
+22,10
@@
Boston, MA 02110-1301, USA. */
#endif
#include <stdio.h> /* May get P_tmpdir. */
#endif
#include <stdio.h> /* May get P_tmpdir. */
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
@@
-30,7
+34,6
@@
Boston, MA 02110-1301, USA. */
#endif
#include "libiberty.h"
#endif
#include "libiberty.h"
-extern char *choose_tmpdir (void);
/* Name of temporary file.
mktemp requires 6 trailing X's. */
/* Name of temporary file.
mktemp requires 6 trailing X's. */
@@
-46,7
+49,7
@@
find one. The current directory is chosen if all else fails so the
program is exited if a temporary directory can't be found (@code{mktemp}
fails). The buffer for the result is obtained with @code{xmalloc}.
program is exited if a temporary directory can't be found (@code{mktemp}
fails). The buffer for the result is obtained with @code{xmalloc}.
-This function is provided for backwards compat
a
bility only. Its use is
+This function is provided for backwards compat
i
bility only. Its use is
not recommended.
@end deftypefn
not recommended.
@end deftypefn
@@
-61,12
+64,11
@@
choose_temp_base (void)
int len;
len = strlen (base);
int len;
len = strlen (base);
- temp_filename =
xmalloc (
len + TEMP_FILE_LEN + 1);
+ temp_filename =
XNEWVEC (char,
len + TEMP_FILE_LEN + 1);
strcpy (temp_filename, base);
strcpy (temp_filename + len, TEMP_FILE);
strcpy (temp_filename, base);
strcpy (temp_filename + len, TEMP_FILE);
- mktemp (temp_filename);
- if (strlen (temp_filename) == 0)
+ if (mktemp (temp_filename) == 0)
abort ();
return temp_filename;
}
abort ();
return temp_filename;
}
This page took
0.023444 seconds
and
4
git commands to generate.