mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
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:
@ -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))
|
||||
|
Reference in New Issue
Block a user