Blame view

lib/mu_asprintf.h 1.16 KB
1
/*
2 3
   Copyright (C) 2007 Free Software Foundation, Inc.

4
   GNU Mailutils is free software; you can redistribute it and/or modify
5
   it under the terms of the GNU Library General Public License as published by
6
   the Free Software Foundation; either version 3 of the License, or
7 8
   (at your option) any later version.

9
   GNU Mailutils is distributed in the hope that it will be useful,
10 11 12 13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Library General Public License for more details.

14 15 16 17
   You should have received a copy of the GNU Library General
   Public License along with GNU Mailutils; if not, write to the
   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301 USA */
18 19 20 21

#ifndef MUASPRINTF_H
#define MUASPRINTF_H

22 23 24
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
25
#include <stdarg.h>
26
#include <stdio.h>
27

28
#if !HAVE_DECL_VASPRINTF
29
extern int vasprintf (char **result, const char *format, va_list args);
30 31 32
#endif
#if !HAVE_DECL_ASPRINTF
#if __STDC__
33
extern int asprintf (char **result, const char *format, ...);
34 35 36 37
#else
extern int asprintf ();
#endif
#endif
38 39 40

#endif