diff mbox

Fix fixinclude common/non-common mix

Message ID alpine.LNX.2.00.1301140940480.6889@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Jan. 14, 2013, 8:42 a.m. UTC
fixincludes mixes common declarations (in fixlib.h) and non-common
decls (where they are defined) for verbose_level and fixinc_mode.
XCode on Mountain Lion doesn't like this and its linker (rightfully)
complains.

Fixed with the following, committed as obvious.

Richard.

2013-01-14  Richard Biener  <rguenther@suse.de>

	* fixlib.h (verbose_level, fixinc_mode): Mark extern.

Comments

Bruce Korb Jan. 14, 2013, 2:47 p.m. UTC | #1
Hi,

On Mon, Jan 14, 2013 at 12:42 AM, Richard Biener <rguenther@suse.de> wrote:
>
> fixincludes mixes common declarations (in fixlib.h) and non-common
> decls (where they are defined) for verbose_level and fixinc_mode.
> XCode on Mountain Lion doesn't like this and its linker (rightfully)
> complains.

It is not rightful that it complain, but it is rightful to accommodate
it.  "approved."
diff mbox

Patch

Index: fixincludes/fixlib.h
===================================================================
--- fixincludes/fixlib.h	(revision 195140)
+++ fixincludes/fixlib.h	(working copy)
@@ -223,7 +223,7 @@  typedef enum {
   VERB_EVERYTHING
 } te_verbose;
 
-te_verbose  verbose_level;
+extern te_verbose  verbose_level;
 
 #define VLEVEL(l)  ((unsigned int) verbose_level >= (unsigned int) l)
 #define NOT_SILENT VLEVEL(VERB_FIXES)
@@ -233,7 +233,7 @@  typedef enum {
   TESTING_ON  = 1
 } fixinc_mode_t;
 
-fixinc_mode_t fixinc_mode;
+extern fixinc_mode_t fixinc_mode;
 
 #ifdef HAVE_MMAP_FILE
 #define UNLOAD_DATA() do { if (curr_data_mapped) { \