diff options
Diffstat (limited to 'gl/vasnprintf.h')
-rw-r--r-- | gl/vasnprintf.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h index 894008c..b9a3d6e 100644 --- a/gl/vasnprintf.h +++ b/gl/vasnprintf.h | |||
@@ -1,9 +1,9 @@ | |||
1 | /* vsprintf with automatic memory allocation. | 1 | /* vsprintf with automatic memory allocation. |
2 | Copyright (C) 2002-2004 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2004, 2007-2008 Free Software Foundation, Inc. |
3 | 3 | ||
4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; either version 2, or (at your option) | 6 | the Free Software Foundation; either version 3, or (at your option) |
7 | any later version. | 7 | any later version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, | 9 | This program is distributed in the hope that it will be useful, |
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #ifndef __attribute__ | 27 | #ifndef __attribute__ |
28 | /* This feature is available in gcc versions 2.5 and later. */ | 28 | /* This feature is available in gcc versions 2.5 and later. */ |
29 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ | 29 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) |
30 | # define __attribute__(Spec) /* empty */ | 30 | # define __attribute__(Spec) /* empty */ |
31 | # endif | 31 | # endif |
32 | /* The __-protected variants of `format' and `printf' attributes | 32 | /* The __-protected variants of `format' and `printf' attributes |
@@ -37,7 +37,7 @@ | |||
37 | # endif | 37 | # endif |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifdef __cplusplus | 40 | #ifdef __cplusplus |
41 | extern "C" { | 41 | extern "C" { |
42 | #endif | 42 | #endif |
43 | 43 | ||
@@ -65,12 +65,16 @@ extern "C" { | |||
65 | free (output); | 65 | free (output); |
66 | } | 66 | } |
67 | */ | 67 | */ |
68 | #if REPLACE_VASNPRINTF | ||
69 | # define asnprintf rpl_asnprintf | ||
70 | # define vasnprintf rpl_vasnprintf | ||
71 | #endif | ||
68 | extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) | 72 | extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) |
69 | __attribute__ ((__format__ (__printf__, 3, 4))); | 73 | __attribute__ ((__format__ (__printf__, 3, 4))); |
70 | extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) | 74 | extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) |
71 | __attribute__ ((__format__ (__printf__, 3, 0))); | 75 | __attribute__ ((__format__ (__printf__, 3, 0))); |
72 | 76 | ||
73 | #ifdef __cplusplus | 77 | #ifdef __cplusplus |
74 | } | 78 | } |
75 | #endif | 79 | #endif |
76 | 80 | ||