summaryrefslogtreecommitdiff
path: root/inc/common/common.h
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2014-12-03 13:28:16 +0300
committerAndrey Nazarov <skuller@skuller.net>2014-12-03 18:33:25 +0300
commit924ff39aa48df1d6cd985b42a2fe5a60ff154030 (patch)
tree79dc211425cf4689ec56308fb93c4f4bbc17d464 /inc/common/common.h
parent7525450fb6d79d7371375d7f710ba4fe484494b3 (diff)
Stop fiddling around with jmp_buf.
Implement custom abort function handler for cleaning up CM after failed server startup. Less hacky and more portable than previous solution that involved swapping copies of jmp_buf around. Fixes a weird Win64 crash when loading savegames.
Diffstat (limited to 'inc/common/common.h')
-rw-r--r--inc/common/common.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/inc/common/common.h b/inc/common/common.h
index 643a9f1..1ed0a20 100644
--- a/inc/common/common.h
+++ b/inc/common/common.h
@@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "common/cmd.h"
#include "common/utils.h"
-#include <setjmp.h>
//
// common.h -- definitions common between client and server, but not game.dll
@@ -83,6 +82,8 @@ typedef void (*rdflush_t)(int target, char *buffer, size_t len);
void Com_BeginRedirect(int target, char *buffer, size_t buffersize, rdflush_t flush);
void Com_EndRedirect(void);
+void Com_AbortFunc(void (*func)(void *), void *arg);
+
#ifdef _WIN32
void Com_AbortFrame(void);
#endif
@@ -175,8 +176,6 @@ extern unsigned time_before_ref;
extern unsigned time_after_ref;
#endif
-extern jmp_buf com_abortframe;
-
extern const char com_version_string[];
extern unsigned com_framenum;