From 56aad76b164be741af21688ea3832093c2069cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 20 May 2019 15:24:14 +0200 Subject: [PATCH] Add C dialect reminders to each source file Files built for Win32 must use C89 style declarations for compatibility with VS 2010 and 2012, which are still supported by GLFW. --- src/cocoa_init.m | 2 ++ src/cocoa_joystick.m | 2 ++ src/cocoa_monitor.m | 2 ++ src/cocoa_time.c | 2 ++ src/cocoa_window.m | 2 ++ src/context.c | 2 ++ src/egl_context.c | 2 ++ src/glx_context.c | 2 ++ src/init.c | 2 ++ src/input.c | 2 ++ src/linux_joystick.c | 2 ++ src/monitor.c | 2 ++ src/nsgl_context.m | 2 ++ src/null_init.c | 2 ++ src/null_joystick.c | 2 ++ src/null_monitor.c | 2 ++ src/null_window.c | 2 ++ src/osmesa_context.c | 2 ++ src/posix_thread.c | 2 ++ src/posix_time.c | 2 ++ src/vulkan.c | 2 ++ src/wgl_context.c | 2 ++ src/win32_init.c | 2 ++ src/win32_joystick.c | 2 ++ src/win32_monitor.c | 2 ++ src/win32_thread.c | 2 ++ src/win32_time.c | 2 ++ src/win32_window.c | 2 ++ src/window.c | 2 ++ src/wl_init.c | 2 ++ src/wl_monitor.c | 2 ++ src/wl_window.c | 2 ++ src/x11_init.c | 2 ++ src/x11_monitor.c | 2 ++ src/x11_window.c | 2 ++ src/xkb_unicode.c | 2 ++ 36 files changed, 72 insertions(+) diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 138695c2..01c1b319 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -23,6 +23,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" #include // For MAXPATHLEN diff --git a/src/cocoa_joystick.m b/src/cocoa_joystick.m index a49763b6..b98f9f67 100644 --- a/src/cocoa_joystick.m +++ b/src/cocoa_joystick.m @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/cocoa_monitor.m b/src/cocoa_monitor.m index 1b47a9df..e9148ff1 100644 --- a/src/cocoa_monitor.m +++ b/src/cocoa_monitor.m @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/cocoa_time.c b/src/cocoa_time.c index 9d14a1e2..4bf646c8 100644 --- a/src/cocoa_time.c +++ b/src/cocoa_time.c @@ -23,6 +23,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 8626f2c8..b1a4d81f 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -23,6 +23,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/context.c b/src/context.c index ce02f4c6..48311e5f 100644 --- a/src/context.c +++ b/src/context.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/egl_context.c b/src/egl_context.c index 7ad11c13..6a33396f 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/glx_context.c b/src/glx_context.c index 233a24a5..1e1a9da8 100644 --- a/src/glx_context.c +++ b/src/glx_context.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/init.c b/src/init.c index eba29af7..96feab0c 100644 --- a/src/init.c +++ b/src/init.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" #include "mappings.h" diff --git a/src/input.c b/src/input.c index 80ed5369..28291750 100644 --- a/src/input.c +++ b/src/input.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/linux_joystick.c b/src/linux_joystick.c index 97345b21..2918db55 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/monitor.c b/src/monitor.c index 10a00283..4f86cb80 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/nsgl_context.m b/src/nsgl_context.m index b55dd6d6..4e64af1c 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -23,6 +23,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/null_init.c b/src/null_init.c index c37ed90f..20c76dc5 100644 --- a/src/null_init.c +++ b/src/null_init.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/null_joystick.c b/src/null_joystick.c index bcd4b804..36c18aa2 100644 --- a/src/null_joystick.c +++ b/src/null_joystick.c @@ -23,6 +23,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/null_monitor.c b/src/null_monitor.c index 197ca73e..0a7fe064 100644 --- a/src/null_monitor.c +++ b/src/null_monitor.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/null_window.c b/src/null_window.c index bc25de45..936400d3 100644 --- a/src/null_window.c +++ b/src/null_window.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/osmesa_context.c b/src/osmesa_context.c index 6960e7b6..70e8675b 100644 --- a/src/osmesa_context.c +++ b/src/osmesa_context.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include #include diff --git a/src/posix_thread.c b/src/posix_thread.c index 49b318cc..02361457 100644 --- a/src/posix_thread.c +++ b/src/posix_thread.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/posix_time.c b/src/posix_time.c index fe7ab768..301cb958 100644 --- a/src/posix_time.c +++ b/src/posix_time.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/vulkan.c b/src/vulkan.c index f5051905..6fd0af2c 100644 --- a/src/vulkan.c +++ b/src/vulkan.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/wgl_context.c b/src/wgl_context.c index d2a380ea..57457586 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/win32_init.c b/src/win32_init.c index 9c842de9..950a52a3 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/win32_joystick.c b/src/win32_joystick.c index a82f8a49..c19f77c5 100644 --- a/src/win32_joystick.c +++ b/src/win32_joystick.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/win32_monitor.c b/src/win32_monitor.c index 0553b377..988a3f95 100644 --- a/src/win32_monitor.c +++ b/src/win32_monitor.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/win32_thread.c b/src/win32_thread.c index e9127272..53b34af2 100644 --- a/src/win32_thread.c +++ b/src/win32_thread.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/win32_time.c b/src/win32_time.c index d0311934..721b0d0d 100644 --- a/src/win32_time.c +++ b/src/win32_time.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/win32_window.c b/src/win32_window.c index c022b5ba..090e6554 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/window.c b/src/window.c index 65cabe16..fa604d01 100644 --- a/src/window.c +++ b/src/window.c @@ -25,6 +25,8 @@ // distribution. // //======================================================================== +// Please use C89 style variable declarations in this file because VS 2010 +//======================================================================== #include "internal.h" diff --git a/src/wl_init.c b/src/wl_init.c index 36b66c29..cdbfcf1e 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -23,6 +23,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/wl_monitor.c b/src/wl_monitor.c index 0f7a6804..89cdd8ba 100644 --- a/src/wl_monitor.c +++ b/src/wl_monitor.c @@ -23,6 +23,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/wl_window.c b/src/wl_window.c index 9c645fab..5c7011fd 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -23,6 +23,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #define _GNU_SOURCE diff --git a/src/x11_init.c b/src/x11_init.c index 48e3180c..6ad8a624 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/x11_monitor.c b/src/x11_monitor.c index d94780b2..3efe818d 100644 --- a/src/x11_monitor.c +++ b/src/x11_monitor.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/x11_window.c b/src/x11_window.c index 1b3f403f..daede3bc 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h" diff --git a/src/xkb_unicode.c b/src/xkb_unicode.c index 1e8f8cd4..2772ea09 100644 --- a/src/xkb_unicode.c +++ b/src/xkb_unicode.c @@ -24,6 +24,8 @@ // distribution. // //======================================================================== +// It is fine to use C99 in this file because it will not be built with VS +//======================================================================== #include "internal.h"