#endif
#endif
+/**
+ * Exit immediately.
+ *
+ * This should be called only from the wrappers, when there is no safe way of
+ * failing gracefully.
+ */
void abort(void);
void setExceptionCallback(void (*callback)(void));
void resetExceptionCallback(void);
+/**
+ * Returns a pseudo-random integer in the range 0 to RAND_MAX.
+ */
+static inline int
+random(void) {
+#ifdef _WIN32
+ return ::rand();
+#else
+ return ::random();
+#endif
+}
+
} /* namespace os */
#endif /* _OS_HPP_ */