gdbsupport: include cstdlib in common-defs.h
[deliverable/binutils-gdb.git] / gdbsupport / common-defs.h
index 65500ce76343ec8cc677526e50588bd78801dfa7..d3f5eafa4555fb014d2f9140127a6fb846d6574c 100644 (file)
 
 #include <stdarg.h>
 #include <stdio.h>
+
+/* Include both cstdlib and stdlib.h to ensure we have standard functions
+   defined both in the std:: namespace and in the global namespace.  */
+#include <cstdlib>
 #include <stdlib.h>
+
 #include <stddef.h>
 #include <stdint.h>
 #include <string.h>
@@ -92,7 +97,9 @@
 #include <strings.h>   /* for strcasecmp and strncasecmp */
 #endif
 #include <errno.h>
+#if HAVE_ALLOCA_H
 #include <alloca.h>
+#endif
 
 #include "ansidecl.h"
 /* This is defined by ansidecl.h, but we prefer gnulib's version.  On
This page took 0.038496 seconds and 4 git commands to generate.