diff options
Diffstat (limited to 'contrib/gcc/libiberty.h')
-rw-r--r-- | contrib/gcc/libiberty.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/contrib/gcc/libiberty.h b/contrib/gcc/libiberty.h index 3e0ca09..53cfc21 100644 --- a/contrib/gcc/libiberty.h +++ b/contrib/gcc/libiberty.h @@ -73,12 +73,12 @@ extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC; declaration without arguments. If it is 0, we checked and failed to find the declaration so provide a fully prototyped one. If it is 1, we found it so don't provide any declaration at all. */ -#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || (defined (HAVE_DECL_BASENAME) && !HAVE_DECL_BASENAME) +#if !HAVE_DECL_BASENAME +#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (HAVE_DECL_BASENAME) extern char *basename PARAMS ((const char *)); #else -# if !defined (HAVE_DECL_BASENAME) extern char *basename (); -# endif +#endif #endif /* A well-defined basename () that is always compiled in. */ @@ -145,6 +145,12 @@ extern char * getpwd PARAMS ((void)); extern long get_run_time PARAMS ((void)); +/* Generate a relocated path to some installation directory. Allocates + return value using malloc. */ + +extern char *make_relative_prefix PARAMS ((const char *, const char *, + const char *)); + /* Choose a temporary directory to use for scratch files. */ extern char *choose_temp_base PARAMS ((void)) ATTRIBUTE_MALLOC; @@ -236,6 +242,10 @@ extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC; extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC; +/* Physical memory routines. Return values are in BYTES. */ +extern double physmem_total PARAMS ((void)); +extern double physmem_available PARAMS ((void)); + /* hex character manipulation routines */ #define _hex_array_size 256 @@ -264,16 +274,20 @@ extern int pexecute PARAMS ((const char *, char * const *, const char *, extern int pwait PARAMS ((int, int *, int)); +#if !HAVE_DECL_ASPRINTF /* Like sprintf but provides a pointer to malloc'd storage, which must be freed by the caller. */ extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2; +#endif +#if !HAVE_DECL_VASPRINTF /* Like vsprintf but provides a pointer to malloc'd storage, which must be freed by the caller. */ extern int vasprintf PARAMS ((char **, const char *, va_list)) ATTRIBUTE_PRINTF(2,0); +#endif #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) |