From 8e6c8d7effc54f8aecd30eda17069588298f4ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 11 Jan 2024 21:32:56 +0100 Subject: [PATCH] Remove reminders to use C89 for some source files This is part of removing support for VS versions older than VS 2013. See #2465 for details and feedback. Related to #2465 --- src/CMakeLists.txt | 11 ----------- src/cocoa_time.c | 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/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/platform.c | 2 -- src/posix_module.c | 2 -- src/posix_poll.c | 2 -- src/posix_poll.h | 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_module.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 -- 37 files changed, 83 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 42f4e014..c49b31c9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -237,17 +237,6 @@ if (UNIX AND NOT APPLE) endif() endif() -# Make GCC warn about declarations that VS 2010 and 2012 won't accept for all -# source files that VS will build (Clang ignores this because we set -std=c99) -if (CMAKE_C_COMPILER_ID STREQUAL "GNU") - set_source_files_properties(context.c init.c input.c monitor.c platform.c vulkan.c - window.c null_init.c null_joystick.c null_monitor.c - null_window.c win32_init.c win32_joystick.c win32_module.c - win32_monitor.c win32_time.c win32_thread.c win32_window.c - wgl_context.c egl_context.c osmesa_context.c PROPERTIES - COMPILE_FLAGS -Wdeclaration-after-statement) -endif() - if (WIN32) if (GLFW_USE_HYBRID_HPG) target_compile_definitions(glfw PRIVATE _GLFW_USE_HYBRID_HPG) diff --git a/src/cocoa_time.c b/src/cocoa_time.c index 8da367aa..d56f145f 100644 --- a/src/cocoa_time.c +++ b/src/cocoa_time.c @@ -23,8 +23,6 @@ // 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 f8610e1e..cc1fac4f 100644 --- a/src/context.c +++ b/src/context.c @@ -24,8 +24,6 @@ // 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 6e997b11..ef65dd35 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -24,8 +24,6 @@ // 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 f3f4b3ec..7082682b 100644 --- a/src/glx_context.c +++ b/src/glx_context.c @@ -24,8 +24,6 @@ // 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 06dbb3f2..2db542f7 100644 --- a/src/init.c +++ b/src/init.c @@ -24,8 +24,6 @@ // distribution. // //======================================================================== -// Please use C89 style variable declarations in this file because VS 2010 -//======================================================================== #include "internal.h" diff --git a/src/input.c b/src/input.c index 8b7ef29c..b5bb69d6 100644 --- a/src/input.c +++ b/src/input.c @@ -24,8 +24,6 @@ // distribution. // //======================================================================== -// Please use C89 style variable declarations in this file because VS 2010 -//======================================================================== #include "internal.h" #include "mappings.h" diff --git a/src/linux_joystick.c b/src/linux_joystick.c index 78d867eb..c67f3d77 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -24,8 +24,6 @@ // 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 6429493b..61cdcb8f 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -24,8 +24,6 @@ // distribution. // //======================================================================== -// Please use C89 style variable declarations in this file because VS 2010 -//======================================================================== #include "internal.h" diff --git a/src/null_init.c b/src/null_init.c index 7236c98c..34ddc04a 100644 --- a/src/null_init.c +++ b/src/null_init.c @@ -24,8 +24,6 @@ // 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 1fe50721..ec1f6b55 100644 --- a/src/null_joystick.c +++ b/src/null_joystick.c @@ -23,8 +23,6 @@ // 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 63a1cd20..787fde71 100644 --- a/src/null_monitor.c +++ b/src/null_monitor.c @@ -24,8 +24,6 @@ // 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 e0bbb3b6..c2aafbad 100644 --- a/src/null_window.c +++ b/src/null_window.c @@ -24,8 +24,6 @@ // 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 38adabbc..a3f1a884 100644 --- a/src/osmesa_context.c +++ b/src/osmesa_context.c @@ -24,8 +24,6 @@ // distribution. // //======================================================================== -// Please use C89 style variable declarations in this file because VS 2010 -//======================================================================== #include #include diff --git a/src/platform.c b/src/platform.c index c5966ae7..e666ccd8 100644 --- a/src/platform.c +++ b/src/platform.c @@ -24,8 +24,6 @@ // distribution. // //======================================================================== -// Please use C89 style variable declarations in this file because VS 2010 -//======================================================================== #include "internal.h" diff --git a/src/posix_module.c b/src/posix_module.c index ba5024a3..7d81c672 100644 --- a/src/posix_module.c +++ b/src/posix_module.c @@ -23,8 +23,6 @@ // 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_poll.c b/src/posix_poll.c index a5016a13..b53e36e8 100644 --- a/src/posix_poll.c +++ b/src/posix_poll.c @@ -23,8 +23,6 @@ // 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/posix_poll.h b/src/posix_poll.h index 1effd1cd..4bdd2448 100644 --- a/src/posix_poll.h +++ b/src/posix_poll.h @@ -23,8 +23,6 @@ // distribution. // //======================================================================== -// It is fine to use C99 in this file because it will not be built with VS -//======================================================================== #include diff --git a/src/posix_thread.c b/src/posix_thread.c index 4ce55526..3c355a53 100644 --- a/src/posix_thread.c +++ b/src/posix_thread.c @@ -24,8 +24,6 @@ // 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 caed678e..a1724084 100644 --- a/src/posix_time.c +++ b/src/posix_time.c @@ -24,8 +24,6 @@ // 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 64a4650f..d9fabdea 100644 --- a/src/vulkan.c +++ b/src/vulkan.c @@ -24,8 +24,6 @@ // 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 08c499ff..65d758af 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -24,8 +24,6 @@ // 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 ef2615f1..4cb01adb 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -24,8 +24,6 @@ // 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 eae44edf..59389a90 100644 --- a/src/win32_joystick.c +++ b/src/win32_joystick.c @@ -24,8 +24,6 @@ // distribution. // //======================================================================== -// Please use C89 style variable declarations in this file because VS 2010 -//======================================================================== #include "internal.h" diff --git a/src/win32_module.c b/src/win32_module.c index 9c2b6d24..47c8dff6 100644 --- a/src/win32_module.c +++ b/src/win32_module.c @@ -23,8 +23,6 @@ // 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 2935ac28..13f7bfe7 100644 --- a/src/win32_monitor.c +++ b/src/win32_monitor.c @@ -24,8 +24,6 @@ // 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 db997915..212e666c 100644 --- a/src/win32_thread.c +++ b/src/win32_thread.c @@ -24,8 +24,6 @@ // 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 fcfe2005..a38e15dd 100644 --- a/src/win32_time.c +++ b/src/win32_time.c @@ -24,8 +24,6 @@ // 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 28f8d585..f7feb32d 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -24,8 +24,6 @@ // 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 1c8519ff..1117df2f 100644 --- a/src/window.c +++ b/src/window.c @@ -25,8 +25,6 @@ // 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 5790cfc4..a4692b52 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -23,8 +23,6 @@ // 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 b56f3dfb..df64f603 100644 --- a/src/wl_monitor.c +++ b/src/wl_monitor.c @@ -23,8 +23,6 @@ // 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 86b5b0fd..76c6a763 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -23,8 +23,6 @@ // 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 a0100f2f..c90b593c 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -24,8 +24,6 @@ // 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 3183630b..ae626643 100644 --- a/src/x11_monitor.c +++ b/src/x11_monitor.c @@ -24,8 +24,6 @@ // 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 7da9b965..3c76d3a9 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -24,8 +24,6 @@ // 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 a516af00..6b8dfcac 100644 --- a/src/xkb_unicode.c +++ b/src/xkb_unicode.c @@ -24,8 +24,6 @@ // distribution. // //======================================================================== -// It is fine to use C99 in this file because it will not be built with VS -//======================================================================== #include "internal.h"