+2014-10-15 David Malcolm <dmalcolm@redhat.com>
+
+ * libiberty.h (choose_tmpdir): New prototype.
+
2013-10-02 Mark Wielaard <mjw@redhat.com>
PR debug/63239
extern char *make_relative_prefix_ignore_links (const char *, const char *,
const char *) ATTRIBUTE_MALLOC;
+/* Returns a pointer to a directory path suitable for creating temporary
+ files in. */
+
+extern const char *choose_tmpdir (void) ATTRIBUTE_RETURNS_NONNULL;
+
/* Choose a temporary directory to use for scratch files. */
extern char *choose_temp_base (void) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
+2014-10-15 David Malcolm <dmalcolm@redhat.com>
+
+ * choose-temp.c (choose_tmpdir): Remove now-redundant local
+ copy of prototype.
+ * functions.texi: Regenerate.
+ * make-temp-file.c (choose_tmpdir): Convert return type from
+ char * to const char * - given that this returns a pointer to
+ a memoized allocation, the caller must not touch it.
+
2014-10-14 Joel Brobecker <brobecker@adacore.com>
* d-demangle.c: Replace strtold with strtod in global comment.
#endif
#include "libiberty.h"
-extern char *choose_tmpdir (void);
/* Name of temporary file.
mktemp requires 6 trailing X's. */
@end deftypefn
-@c choose-temp.c:46
+@c choose-temp.c:45
@deftypefn Extension char* choose_temp_base (void)
Return a prefix for temporary file names or @code{NULL} if unable to
@end deftypefn
@c make-temp-file.c:96
-@deftypefn Replacement char* choose_tmpdir ()
+@deftypefn Replacement const char* choose_tmpdir ()
Returns a pointer to a directory path suitable for creating temporary
files in.
@dots{}, @code{NULL})
Concatenate zero or more of strings and return the result in freshly
-@code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is
-available. The argument list is terminated by the first @code{NULL}
-pointer encountered. Pointers to empty strings are ignored.
+@code{xmalloc}ed memory. The argument list is terminated by the first
+@code{NULL} pointer encountered. Pointers to empty strings are ignored.
@end deftypefn
@end ftable
@end defvr
-@c hashtab.c:336
+@c hashtab.c:328
@deftypefn Supplemental htab_t htab_create_typed_alloc (size_t @var{size}, @
htab_hash @var{hash_f}, htab_eq @var{eq_f}, htab_del @var{del_f}, @
htab_alloc @var{alloc_tab_f}, htab_alloc @var{alloc_f}, @
@end deftypefn
-@c concat.c:174
+@c concat.c:160
@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @
@dots{}, @code{NULL})
/*
-@deftypefn Replacement char* choose_tmpdir ()
+@deftypefn Replacement const char* choose_tmpdir ()
Returns a pointer to a directory path suitable for creating temporary
files in.
*/
-char *
+const char *
choose_tmpdir (void)
{
if (!memoized_tmpdir)