Skip to content

Commit

Permalink
Fixed|GCC: Conflicts between C/C++ linkage of extern variables
Browse files Browse the repository at this point in the history
As we switch souce files to C++, we must be careful of the implications
to externed global variables. They must be declared to use C linkage
until all source files are fully C++ (if we ever reach that point).
  • Loading branch information
skyjake committed Sep 10, 2012
1 parent 43a67ae commit 5e7fad1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions doomsday/plugins/jdoom64/include/r_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ typedef struct xline_s {
} xline_t;

// Our private map data structures.
extern xsector_t* xsectors;
extern xline_t* xlines;
DENG_EXTERN_C xsector_t* xsectors;
DENG_EXTERN_C xline_t* xlines;

// If true we are in the process of setting up a map.
extern boolean mapSetup;
DENG_EXTERN_C boolean mapSetup;

/**
* Converts a line to an xline.
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/jheretic/include/doomdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
#define VERBOSE(code) { if(verbose >= 1) { code; } }
#define VERBOSE2(code) { if(verbose >= 2) { code; } }

extern game_import_t gi;
extern game_export_t gx;
DENG_EXTERN_C game_import_t gi;
DENG_EXTERN_C game_export_t gx;

//
// Global parameters/defines.
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/jhexen/include/h2def.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
#define VERBOSE(code) { if(verbose >= 1) { code; } }
#define VERBOSE2(code) { if(verbose >= 2) { code; } }

extern game_import_t gi;
extern game_export_t gx;
DENG_EXTERN_C game_import_t gi;
DENG_EXTERN_C game_export_t gx;

//
// Global parameters/defines.
Expand Down
8 changes: 4 additions & 4 deletions doomsday/plugins/jhexen/include/x_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ extern boolean paused; // Game Pause?

// This one is related to the 3-screen display mode.
// ANG90 = left side, ANG270 = right
extern int viewangleoffset;
DENG_EXTERN_C int viewangleoffset;

// Timer, for scores.
extern int mapStartTic; // Game tic at map start.
extern int mapTime; // Tics in game play for par.
DENG_EXTERN_C int mapStartTic; // Game tic at map start.
DENG_EXTERN_C int mapTime; // Tics in game play for par.

// Quit after playing a demo from cmdline.
extern boolean singledemo;
DENG_EXTERN_C boolean singledemo;

//-----------------------------
// Internal parameters, fixed.
Expand Down

0 comments on commit 5e7fad1

Please sign in to comment.