Merged
Conversation
Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses build compatibility issues with modern MinGW compilers by properly separating global variable declarations from their definitions. Modern C compilers (GCC 10+) default to -fno-common, which treats multiple definitions of the same global variable as an error rather than merging them. This PR follows the correct C pattern by using extern declarations in header files and providing single definitions in source files.
Changes:
- Converted global variable declarations in header files to
externdeclarations - Added corresponding definitions of these global variables in appropriate .c files
- Affected variables:
ui_server_info,config_inst,hStatus(Win32 UI), andisVista(Windows version detection)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/win32/ui/os_win32ui.h | Added extern keywords to three global variable declarations (ui_server_info, config_inst, hStatus) |
| src/win32/ui/os_win32ui.c | Added definitions for the three Win32 UI global variables that were previously declared in the header |
| src/headers/file_op.h | Added extern keyword to isVista variable declaration |
| src/shared/file_op.c | Added definition of isVista variable within the WIN32 conditional block |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minor updates for more modern ming compiler support