__attribute__ ((format (gnu_printf, 3, 4)));
#undef snprintf
#define snprintf __mingw_snprintf
+/* Fallback to sprintf if target does not have snprintf. */
+#elif !defined(HAVE_SNPRINTF)
+#undef snprintf
+#define snprintf(str, size, ...) sprintf (str, __VA_ARGS__)
#endif
int separator_len;
const char *separator;
- int use_stderr, all_unbuffered, unbuffered_preconnected, default_recl;
- int fpe, dump_core, backtrace;
+ int all_unbuffered, unbuffered_preconnected, default_recl;
+ int fpe, backtrace;
}
options_t;
extern options_t options;
internal_proto(options);
-extern void handler (int);
-internal_proto(handler);
+extern void backtrace_handler (int);
+internal_proto(backtrace_handler);
/* Compile-time options that will influence the library. */
int allow_std;
int pedantic;
int convert;
- int dump_core;
int backtrace;
int sign_zero;
size_t record_marker;
extern char * full_exe_path (void);
internal_proto(full_exe_path);
+extern void find_addr2line (void);
+internal_proto(find_addr2line);
+
/* backtrace.c */
extern void show_backtrace (void);
#define GFC_OTOA_BUF_SIZE (GFC_LARGEST_BUF * 3 + 1)
#define GFC_BTOA_BUF_SIZE (GFC_LARGEST_BUF * 8 + 1)
-extern void sys_exit (int) __attribute__ ((noreturn));
-internal_proto(sys_exit);
+extern void sys_abort (void) __attribute__ ((noreturn));
+internal_proto(sys_abort);
+
+extern ssize_t estr_write (const char *);
+internal_proto(estr_write);
+
+extern int st_vprintf (const char *, va_list);
+internal_proto(st_vprintf);
+
+extern int st_printf (const char *, ...)
+ __attribute__((format (gfc_printf, 1, 2)));
+internal_proto(st_printf);
extern const char *gfc_xtoa (GFC_UINTEGER_LARGEST, char *, size_t);
internal_proto(gfc_xtoa);
extern int unit_to_fd (int);
internal_proto(unit_to_fd);
-extern int st_printf (const char *, ...)
- __attribute__ ((format (gfc_printf, 1, 2)));
-internal_proto(st_printf);
-
-extern int st_vprintf (const char *, va_list);
-internal_proto(st_vprintf);
-
extern char * filename_from_unit (int);
internal_proto(filename_from_unit);