mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-29 12:53:12 +00:00
fix for VC7, whose /GS check is apparently much less thorough and doesn't include __security_init_cookie
This was SVN commit r3521.
This commit is contained in:
@@ -20,9 +20,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> // __argc
|
||||
|
||||
#include <process.h> // __security_init_cookie
|
||||
#include "win_internal.h"
|
||||
|
||||
#if MSC_VERSION >= 1400
|
||||
#include <process.h> // __security_init_cookie
|
||||
#define NEED_COOKIE_INIT
|
||||
#endif
|
||||
|
||||
|
||||
char win_sys_dir[MAX_PATH+1];
|
||||
char win_exe_dir[MAX_PATH+1];
|
||||
@@ -350,6 +354,7 @@ static int SEH_wrapped_entry()
|
||||
|
||||
int entry()
|
||||
{
|
||||
#ifdef NEED_COOKIE_INIT
|
||||
// 2006-02-16 workaround for R6035 on VC8:
|
||||
//
|
||||
// SEH code compiled with /GS pushes a "security cookie" onto the
|
||||
@@ -364,5 +369,6 @@ int entry()
|
||||
//
|
||||
// see http://msdn2.microsoft.com/en-US/library/ms235603.aspx
|
||||
__security_init_cookie();
|
||||
#endif
|
||||
return SEH_wrapped_entry();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user