diff options
author | Jim Meyering <jim@meyering.net> | 2003-07-10 11:15:20 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-07-10 11:15:20 +0000 |
commit | b269489ba15f4921e22895df571763d13e529fa2 (patch) | |
tree | 25149e7857c3ed81cab8e2f582c6a9ec6d6af8b7 /lib/vasprintf.h | |
parent | 5624c49dafbf563e8f934c110036d16e8012a94a (diff) | |
download | coreutils-b269489ba15f4921e22895df571763d13e529fa2.tar.xz |
Now that a program (`who') uses asprintf, we need all of these:
* asnprintf.c, asprintf.c, printf-args.c, printf-args.h, printf-parse.c:
* printf-parse.h, vasnprintf.c, vasnprintf.h, vasprintf.c, vasprintf.h:
New files, from gnulib.
Diffstat (limited to 'lib/vasprintf.h')
-rw-r--r-- | lib/vasprintf.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/vasprintf.h b/lib/vasprintf.h index 8e108119f..0b4808e54 100644 --- a/lib/vasprintf.h +++ b/lib/vasprintf.h @@ -17,34 +17,34 @@ USA. */ #ifndef _VASPRINTF_H -# define _VASPRINTF_H +#define _VASPRINTF_H -# if HAVE_VASPRINTF +#if HAVE_VASPRINTF /* Get asprintf(), vasprintf() declarations. */ -# include <stdio.h> +#include <stdio.h> -# else +#else /* Get va_list. */ -# include <stdarg.h> +#include <stdarg.h> -# ifndef __attribute__ +#ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ -# define __attribute__(Spec) /* empty */ -# endif +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# define __attribute__(Spec) /* empty */ +# endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -# define __format__ format -# define __printf__ printf -# endif -# endif +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __format__ format +# define __printf__ printf +# endif +#endif -# ifdef __cplusplus +#ifdef __cplusplus extern "C" { -# endif +#endif /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in @@ -55,10 +55,10 @@ extern int asprintf (char **result, const char *format, ...) extern int vasprintf (char **result, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); -# ifdef __cplusplus +#ifdef __cplusplus } -# endif +#endif -# endif +#endif #endif /* _VASPRINTF_H */ |