merge from gcc

This commit is contained in:
DJ Delorie 2001-09-18 21:02:02 +00:00
parent 7cffc34564
commit 439defa230
2 changed files with 20 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2001-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h (concat, concat_length, concat_copy, concat_copy2,
ACONCAT): Improve comments.
2001-09-18 Alan Modra <amodra@bigpond.net.au> 2001-09-18 Alan Modra <amodra@bigpond.net.au>
* objalloc.h (OBJALLOC_ALIGN): Define using offsetof. * objalloc.h (OBJALLOC_ALIGN): Define using offsetof.

View File

@ -85,25 +85,29 @@ extern char *basename ();
extern const char *lbasename PARAMS ((const char *)); extern const char *lbasename PARAMS ((const char *));
/* Concatenate an arbitrary number of strings, up to (char *) NULL. /* Concatenate an arbitrary number of strings. You must pass NULL as
Allocates memory using xmalloc. */ the last argument of this function, to terminate the list of
strings. Allocates memory using xmalloc. */
extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC; extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
/* Determine the length of concatenating an arbitrary number of /* Determine the length of concatenating an arbitrary number of
strings, up to (char *) NULL. */ strings. You must pass NULL as the last argument of this function,
to terminate the list of strings. */
extern unsigned long concat_length PARAMS ((const char *, ...)); extern unsigned long concat_length PARAMS ((const char *, ...));
/* Concatenate an arbitrary number of strings into a SUPPLIED area of /* Concatenate an arbitrary number of strings into a SUPPLIED area of
memory, up to (char *) NULL. The supplied memory is assumed to be memory. You must pass NULL as the last argument of this function,
large enough. */ to terminate the list of strings. The supplied memory is assumed
to be large enough. */
extern char *concat_copy PARAMS ((char *, const char *, ...)); extern char *concat_copy PARAMS ((char *, const char *, ...));
/* Concatenate an arbitrary number of strings into a GLOBAL area of /* Concatenate an arbitrary number of strings into a GLOBAL area of
memory, up to (char *) NULL. The supplied memory is assumed to be memory. You must pass NULL as the last argument of this function,
large enough. */ to terminate the list of strings. The supplied memory is assumed
to be large enough. */
extern char *concat_copy2 PARAMS ((const char *, ...)); extern char *concat_copy2 PARAMS ((const char *, ...));
@ -111,8 +115,10 @@ extern char *concat_copy2 PARAMS ((const char *, ...));
extern char *libiberty_concat_ptr; extern char *libiberty_concat_ptr;
/* Concatenate an arbitrary number of strings, up to (char *) NULL. /* Concatenate an arbitrary number of strings. You must pass NULL as
Allocates memory using alloca. Arguments are evaluated twice!. */ the last argument of this function, to terminate the list of
strings. Allocates memory using alloca. The arguments are
evaluated twice! */
#define ACONCAT(ACONCAT_PARAMS) \ #define ACONCAT(ACONCAT_PARAMS) \
(libiberty_concat_ptr = alloca (concat_length ACONCAT_PARAMS + 1), \ (libiberty_concat_ptr = alloca (concat_length ACONCAT_PARAMS + 1), \
concat_copy2 ACONCAT_PARAMS) concat_copy2 ACONCAT_PARAMS)