Import vsnprintf from libiberty if not available.

vasprintf and vsnprintf are not available on LynxOS, at least not on
version 4.0.0.  This patch updates the configury to import them from
libiberty if not available out of the box.

gdbserver/
        * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
        * configure.ac: Add check for vasprintf and vsnprintf.
        * configure, config.in: Regenerate.
        * server.h (vasprintf, vsnprintf): Add conditional declarations.
This commit is contained in:
Joel Brobecker
2010-09-01 18:56:45 +00:00
parent 0482b03b6a
commit bb0116a433
6 changed files with 65 additions and 6 deletions

View File

@ -63,6 +63,13 @@ extern void perror (const char *);
extern void *memmem (const void *, size_t , const void *, size_t);
#endif
#if !HAVE_DECL_VASPRINTF
extern int vasprintf(char **strp, const char *fmt, va_list ap);
#endif
#if !HAVE_DECL_VSNPRINTF
int vsnprintf(char *str, size_t size, const char *format, va_list ap);
#endif
#ifndef ATTR_NORETURN
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
#define ATTR_NORETURN __attribute__ ((noreturn))