mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +01:00
Fixed improper variables definition in header file
Some header were creating variable, this is a bad practice which
is likely to not behave as expected. This creates one distinct
variable in each object file that used the header, and:
- on well behaved compiler, this ends up in a link error (see
commit 39fdb451ba for an example)
- on bad behaving compiler, this can be linked as multiple local
variable, thus having strange effects when running program
- on insouciant compiler (who said gcc?) the variables are
silently merged, hiding portability issues
This commit is contained in:
committed by
Carlos R. Mafra
parent
8238e4681a
commit
80a59696e5
@@ -36,8 +36,8 @@
|
||||
#define WTB_MENU 6
|
||||
|
||||
#ifdef HAVE_XRANDR
|
||||
Bool has_randr;
|
||||
int randr_event_base;
|
||||
extern Bool has_randr;
|
||||
extern int randr_event_base;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user