--- a/src/stdafx.h Wed Jun 13 11:17:30 2007 +0000
+++ b/src/stdafx.h Wed Jun 13 11:45:14 2007 +0000
@@ -78,6 +78,9 @@
# ifdef amiga
# undef amiga
# endif
+/* Act like we already included this file, as it somehow gives linkage problems
+ * (mismatch linkage of C++ and C between this include and unistd.h). */
+#define CLIB_USERGROUP_PROTOS_H
#endif /* __MORPHOS__ */
#ifdef __APPLE__
@@ -109,7 +112,6 @@
# define FORCEINLINE inline
# define CDECL
# define __int64 long long
-# define NOT_REACHED() assert(0)
# define GCC_PACK __attribute__((packed))
# if (__GNUC__ == 2)
@@ -122,7 +124,6 @@
# define NORETURN
# define FORCEINLINE inline
# define CDECL
-# define NOT_REACHED() assert(0)
# define GCC_PACK
# include <malloc.h>
#endif /* __WATCOMC__ */
@@ -160,11 +161,6 @@
# define FORCEINLINE __forceinline
# define inline _inline
# define CDECL _cdecl
-# if defined(_DEBUG)
-# define NOT_REACHED() assert(0)
-# else
-# define NOT_REACHED() _assume(0)
-# endif /* _DEBUG */
int CDECL snprintf(char *str, size_t size, const char *format, ...);
# if _MSC_VER < 1400
int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap);
@@ -331,4 +327,12 @@
# define Point OTTD_AMIGA_POINT
#endif
+void
+#ifndef STRGEN
+/* In strgen error is not fatal and returns */
+NORETURN
+#endif /* STRGEN */
+CDECL error(const char *str, ...);
+#define NOT_REACHED() error("NOT_REACHED triggered at line %i of %s", __LINE__, __FILE__)
+
#endif /* STDAFX_H */