~ubuntu-branches/ubuntu/trusty/gnutls26/trusty

« back to all changes in this revision

Viewing changes to gl/vasnprintf.h

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2011-10-01 15:28:13 UTC
  • mfrom: (12.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20111001152813-yygm1c4cxonfxhzy
* New upstream version.
  + Allow CA importing of 0 certificates to succeed. Closes: #640639
* Add libp11-kit-dev to libgnutls-dev dependencies. (see #643811)
* [20_guiledocstring.diff] guile: Fix docstring extraction with CPP 4.5+.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* vsprintf with automatic memory allocation.
2
 
   Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
 
2
   Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software; you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
24
24
/* Get size_t.  */
25
25
#include <stddef.h>
26
26
 
27
 
#ifndef __attribute__
28
27
/* The __attribute__ feature is available in gcc versions 2.5 and later.
29
28
   The __-protected variants of the attributes 'format' and 'printf' are
30
29
   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
31
 
   We enable __attribute__ only if these are supported too, because
 
30
   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
32
31
   gnulib and libintl do '#define printf __printf__' when they override
33
32
   the 'printf' function.  */
34
 
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
35
 
#  define __attribute__(Spec)   /* empty */
36
 
# endif
 
33
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
 
34
# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
 
35
#else
 
36
# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
37
37
#endif
38
38
 
39
39
#ifdef __cplusplus
69
69
# define vasnprintf rpl_vasnprintf
70
70
#endif
71
71
extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
72
 
       __attribute__ ((__format__ (__printf__, 3, 4)));
 
72
       _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
73
73
extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
74
 
       __attribute__ ((__format__ (__printf__, 3, 0)));
 
74
       _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0));
75
75
 
76
76
#ifdef __cplusplus
77
77
}