summaryrefslogtreecommitdiffstats
path: root/gl/vsnprintf.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/vsnprintf.h')
-rw-r--r--gl/vsnprintf.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/gl/snprintf.h b/gl/snprintf.h
deleted file mode 100644
index 5032b9e..0000000
--- a/gl/snprintf.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* Formatted output to strings.
2 Copyright (C) 2004 Free Software Foundation, Inc.
3 Written by Simon Josefsson.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18
19#ifndef SNPRINTF_H
20#define SNPRINTF_H
21
22/* Get snprintf declaration, if available. */
23#include <stdio.h>
24
25#if defined HAVE_DECL_SNPRINTF && !HAVE_DECL_SNPRINTF
26int snprintf (char *str, size_t size, const char *format, ...);
27#endif
28
29#endif /* SNPRINTF_H */
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
41extern "C" { 41extern "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
68extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) 72extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
69 __attribute__ ((__format__ (__printf__, 3, 4))); 73 __attribute__ ((__format__ (__printf__, 3, 4)));
70extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) 74extern 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
diff --git a/gl/vsnprintf.h b/gl/vsnprintf.h
deleted file mode 100644
index f80c77a..0000000
--- a/gl/vsnprintf.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* Formatted output to strings.
2 Copyright (C) 2004 Free Software Foundation, Inc.
3 Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18
19#ifndef VSNPRINTF_H
20#define VSNPRINTF_H
21
22#include <stdarg.h>
23
24/* Get vsnprintf declaration, if available. */
25#include <stdio.h>
26
27#if defined HAVE_DECL_VSNPRINTF && !HAVE_DECL_VSNPRINTF
28int vsnprintf (char *str, size_t size, const char *format, va_list args);
29#endif
30
31#endif /* VSNPRINTF_H */