From 04522580adb27729e57dd209962ef6f69dbbe710 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. (cherry picked from commit 56aad76b164be741af21688ea3832093c2069cef) --- 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 41329b37..62a3cfab 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 db4427d6..a8121e85 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 e327c628..11a31ef4 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 3b270351..d390cdc1 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 d6480960..ce896d1f 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 38508522..867e399f 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 19525276..0b93e72d 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 b03a0489..94aa8f9b 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 3d0f9cf7..e44d0ca2 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 a2f42efe..337d5cf0 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 42e457f2..7366cfa5 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 d390a1c6..db21b7a9 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 bbbbd36d..89571a76 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 b48477b6..569bc8c0 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 60180bcb..000faf28 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 f5cb092f..4514dae9 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 67021ab6..045c76a2 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 b45bb2e1..c2fa49d4 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 ff4ea60b..f1697dce 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 53f856cc..040c8f18 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 cb326732..7f9ed862 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 5b0d09b8..03ccf2be 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 e28868f4..216452ef 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 5c3e87de..4ffc9fbf 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 e6875dbc..3982e9ae 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 9391fc9b..ce0686db 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 29670f97..75594637 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 48b3dd5d..c46a1e6b 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 cf403dd0..4b356b21 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 8a6b918c..292de1c3 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 223c3b8d..db492711 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 0ae712dd..c6cbc7ad 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 dae5b98c..a89e7495 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 1cf0c42b..db9746e8 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 f66c49b7..716e116f 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 ad3cc233..f30c4cd7 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"