summaryrefslogtreecommitdiff
path: root/source/sys_win.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2007-08-15 15:25:21 +0000
committerAndrey Nazarov <skuller@skuller.net>2007-08-15 15:25:21 +0000
commitd876b69b388528fd3236f2f05caac22345a798f4 (patch)
tree114f57a7ffc7a3e3a0a75fd93f4bb33680ed33d4 /source/sys_win.c
parentf294db4ccf45f6274e65260dd6f9a2c5faa94313 (diff)
Fixed UI_ModeChanged not being called for hard linked UI.
Added QDECL specifier for some interface functions. Changed default values for com_date_format and com_time_format. On Windows, set up empty CRT invalid parameter handler so e.g. invalid modificators passed to strftime do not raise an exception.
Diffstat (limited to 'source/sys_win.c')
-rw-r--r--source/sys_win.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/sys_win.c b/source/sys_win.c
index 892519f..a34cd36 100644
--- a/source/sys_win.c
+++ b/source/sys_win.c
@@ -1500,6 +1500,11 @@ EXCEPTION_DISPOSITION _ExceptionHandler(
#endif /* USE_DBGHELP */
+#if ( _MSC_VER >= 1400 )
+static void msvcrt_sucks( const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t unused ) {
+}
+#endif
+
/*
==================
WinMain
@@ -1543,6 +1548,12 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
#endif
#endif /* USE_DBGHELP */
+#if ( _MSC_VER >= 1400 )
+ // no, please, don't let strftime kill the whole fucking
+ // process just because it does not conform to C99 :((
+ _set_invalid_parameter_handler( msvcrt_sucks );
+#endif
+
Qcommon_Init( lpCmdLine );
/* main program loop */
@@ -1607,7 +1618,7 @@ main
==================
*/
-int main( int argc, char **argv ) {
+int QDECL main( int argc, char **argv ) {
int i;
for( i = 1; i < argc; i++ ) {