]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - quakedef.h
Rewritten SVQC stringbuffer saving routines (which is part of yet unfinished databuff...
[xonotic/darkplaces.git] / quakedef.h
index de92736ca7985e5f171288955b55f2bc338c5da2..6bd5ddfaee6bd78214cc9b56c70c2daf6072f759 100644 (file)
@@ -25,9 +25,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #if defined(__GNUC__) && (__GNUC__ > 2)
 #define DP_FUNC_PRINTF(n) __attribute__ ((format (printf, n, n+1)))
 #define DP_FUNC_PURE      __attribute__ ((pure))
+#define DP_FUNC_NORETURN  __attribute__ ((noreturn))
 #else
 #define DP_FUNC_PRINTF(n)
 #define DP_FUNC_PURE
+#define DP_FUNC_NORETURN
 #endif
 
 #include <sys/types.h>
@@ -508,7 +510,7 @@ void Host_InitCommands(void);
 void Host_Main(void);
 void Host_Shutdown(void);
 void Host_StartVideo(void);
-void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1);
+void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN;
 void Host_Quit_f(void);
 void Host_ClientCommands(const char *fmt, ...) DP_FUNC_PRINTF(1);
 void Host_ShutdownServer(void);
@@ -561,5 +563,17 @@ void Sys_Shared_Init(void);
 #define VECTOR_LOSSLESS_FORMAT "%.9g %.9g %.9g"
 #endif
 
+// originally this was _MSC_VER
+// but here we want to test the system libc, which on win32 is borked, and NOT the compiler
+#ifdef WIN32
+#define INT_LOSSLESS_FORMAT_SIZE "I64"
+#define INT_LOSSLESS_FORMAT_CONVERT_S(x) ((__int64)(x))
+#define INT_LOSSLESS_FORMAT_CONVERT_U(x) ((unsigned __int64)(x))
+#else
+#define INT_LOSSLESS_FORMAT_SIZE "j"
+#define INT_LOSSLESS_FORMAT_CONVERT_S(x) ((intmax_t)(x))
+#define INT_LOSSLESS_FORMAT_CONVERT_U(x) ((uintmax_t)(x))
+#endif
+
 #endif