+/* use internal functions when OS provided ones are borken */
+#if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
+XBT_PRIVATE int portable_snprintf(char *str, size_t str_m, const char *fmt,
+ /*args */ ...);
+XBT_PRIVATE int portable_vsnprintf(char *str, size_t str_m, const char *fmt,
+ va_list ap);
+#define snprintf portable_snprintf
+#define vsnprintf portable_vsnprintf
+#endif
+
+/* prototype of GNU functions */
+#if (defined(__GNUC__) && !defined(__cplusplus))
+XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt, /*args */ ...);
+XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
+#endif
+
+extern int asnprintf(char **ptr, size_t str_m, const char *fmt, /*args */
+ ...);
+extern int vasnprintf(char **ptr, size_t str_m, const char *fmt,
+ va_list ap);
+
+/*
+ * What we need to extract the backtrace in exception handling code
+ */
+#ifdef HAVE_EXECINFO_H
+# include <execinfo.h>
+#endif
+
+#endif /* SIMGRID_PORTABLE_H */