summaryrefslogtreecommitdiffstats
path: root/byterun/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/misc.h')
-rw-r--r--byterun/misc.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/byterun/misc.h b/byterun/misc.h
index 4fd82af2d..5640980a6 100644
--- a/byterun/misc.h
+++ b/byterun/misc.h
@@ -61,8 +61,6 @@ typedef char * addr;
/* Assertions */
-/* <private> */
-
#ifdef DEBUG
#define CAMLassert(x) \
((x) ? (void) 0 : caml_failed_assert ( #x , __FILE__, __LINE__))
@@ -76,6 +74,13 @@ CAMLextern void caml_fatal_error_arg (char *fmt, char *arg) Noreturn;
CAMLextern void caml_fatal_error_arg2 (char *fmt1, char *arg1,
char *fmt2, char *arg2) Noreturn;
+/* Safe string operations */
+
+CAMLextern char * caml_strdup(const char * s);
+CAMLextern char * caml_strconcat(int n, ...); /* n args of const char * type */
+
+/* <private> */
+
/* Data structures */
struct ext_table {
@@ -138,6 +143,13 @@ extern void caml_set_fields (char *, unsigned long, unsigned long);
#define Assert CAMLassert
#endif
+/* snprintf emulation for Win32 */
+
+#ifdef _WIN32
+extern int caml_snprintf(char * buf, size_t size, const char * format, ...);
+#define snprintf caml_snprintf
+#endif
+
/* </private> */
#endif /* CAML_MISC_H */