Projects
Games
garglk
garglk-fix_multiple_definitions_2.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File garglk-fix_multiple_definitions_2.patch of Package garglk
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001 From: Chris Spiegel <cspiegel@gmail.com> Date: Sun, 10 May 2020 21:01:05 -0700 Subject: [PATCH] Increase internal linkage in garglk. Versions of gcc prior to 10 were fine with multiple tentative definitions, but with 10 they now become linker errors. In fact, these variables are *not* meant to be related, but instead are meant to be confined to their own files. It just so happens that some of their names overlap, so they were being shared. The intent is *not* to share, so it's correct to give them internal linkage. --- garglk/launcher.c | 8 ++++---- garglk/launchgtk.c | 6 +++--- garglk/launchmac.m | 10 +++++----- garglk/launchwin.c | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/garglk/launcher.c b/garglk/launcher.c index e479b440..f19b9764 100644 --- a/garglk/launcher.c +++ b/garglk/launcher.c @@ -48,10 +48,10 @@ #define ID_GLUL (giblorb_make_id('G','L','U','L')) #define MaxBuffer 1024 -char tmp[MaxBuffer]; -char terp[MaxBuffer]; -char exe[MaxBuffer]; -char flags[MaxBuffer]; +static char tmp[MaxBuffer]; +static char terp[MaxBuffer]; +static char exe[MaxBuffer]; +static char flags[MaxBuffer]; int runblorb(char *path, char *game) { diff --git a/garglk/launchgtk.c b/garglk/launchgtk.c index 248954f8..505c4020 100644 --- a/garglk/launchgtk.c +++ b/garglk/launchgtk.c @@ -41,9 +41,9 @@ static const char * AppName = "Gargoyle " VERSION; static const char * LaunchingTemplate = "%s/%s"; static const char * DirSeparator = "/"; -char dir[MaxBuffer]; -char buf[MaxBuffer]; -char tmp[MaxBuffer]; +static char dir[MaxBuffer]; +static char buf[MaxBuffer]; +static char tmp[MaxBuffer]; struct filter { diff --git a/garglk/launchmac.m b/garglk/launchmac.m index 4a890650..5de70181 100644 --- a/garglk/launchmac.m +++ b/garglk/launchmac.m @@ -40,13 +40,13 @@ static const char * LaunchingTemplate = "%s/%s"; static const char * DirSeparator = "/"; -char dir[MaxBuffer]; -char buf[MaxBuffer]; -char tmp[MaxBuffer]; -char etc[MaxBuffer]; +static char dir[MaxBuffer]; +static char buf[MaxBuffer]; +static char tmp[MaxBuffer]; +static char etc[MaxBuffer]; enum FILEFILTERS { FILTER_SAVE, FILTER_TEXT, FILTER_ALL }; -char *winfilters[] = +static char *winfilters[] = { "sav", "txt", diff --git a/garglk/launchwin.c b/garglk/launchwin.c index 90d7199a..30108c97 100644 --- a/garglk/launchwin.c +++ b/garglk/launchwin.c @@ -33,11 +33,11 @@ static const char * AppName = "Gargoyle " VERSION; static const char * LaunchingTemplate = "\"%s\\%s.exe\" %s \"%s\""; static const char * DirSeparator = "\\"; -char dir[MaxBuffer]; -char buf[MaxBuffer]; -char tmp[MaxBuffer]; +static char dir[MaxBuffer]; +static char buf[MaxBuffer]; +static char tmp[MaxBuffer]; -char filterlist[] = +static char filterlist[] = "All Games\0*.taf;*.agx;*.d$$;*.acd;*.a3c;*.asl;*.cas;*.ulx;*.hex;*.jacl;*.j2;*.gam;*.t3;*.z?;*.l9;*.sna;*.mag;*.dat;*.saga;*.blb;*.glb;*.zlb;*.blorb;*.gblorb;*.zblorb\0" "Adrift Games (*.taf)\0*.taf\0" "AdvSys Games (*.dat)\0*.dat\0" @@ -65,7 +65,7 @@ void winmsg(const char *msg) MessageBox(NULL, msg, AppName, MB_ICONERROR); } -int urldecode(char *decoded, unsigned int maxlen, const char *encoded) +static int urldecode(char *decoded, unsigned int maxlen, const char *encoded) { unsigned int i; int convert, ascii;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.