aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/server.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-09-01 18:56:45 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-09-01 18:56:45 +0000
commitbb0116a433af6f2a1bb99b628a863be46446cea0 (patch)
tree4f115327f70f296c49b1c121ce62c7a853ee5df2 /gdb/gdbserver/server.h
parent0482b03b6a590ca2540b32cc8db2526172bd8e34 (diff)
downloadgdb-bb0116a433af6f2a1bb99b628a863be46446cea0.zip
gdb-bb0116a433af6f2a1bb99b628a863be46446cea0.tar.gz
gdb-bb0116a433af6f2a1bb99b628a863be46446cea0.tar.bz2
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.
Diffstat (limited to 'gdb/gdbserver/server.h')
-rw-r--r--gdb/gdbserver/server.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index d5f32e8..d007107 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -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))