diff options
author | Michael Forney <mforney@mforney.org> | 2019-06-29 16:09:45 -0700 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-06-30 09:52:06 +0100 |
commit | 6a53b447e5726bc7d7b8405b1b1dd958c701b007 (patch) | |
tree | 661c6efe74f6edd53842a1b6a079eafd9ab69fd9 /frontends/gtk | |
parent | 1c3ce67c62cccd8a32090e770f0cba62e9945f28 (diff) | |
download | netsurf-6a53b447e5726bc7d7b8405b1b1dd958c701b007.tar.gz netsurf-6a53b447e5726bc7d7b8405b1b1dd958c701b007.tar.bz2 |
Declare global variables as extern in headers
Otherwise, each source file that includes the header will create a
new definition, which are usually merged together by the linker.
Multiple definitions of an object is not allowed in ISO C.
Diffstat (limited to 'frontends/gtk')
-rw-r--r-- | frontends/gtk/download.h | 2 | ||||
-rw-r--r-- | frontends/gtk/fetch.h | 2 | ||||
-rw-r--r-- | frontends/gtk/search.h | 2 | ||||
-rw-r--r-- | frontends/gtk/selection.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/frontends/gtk/download.h b/frontends/gtk/download.h index 0b1097655..b720650ca 100644 --- a/frontends/gtk/download.h +++ b/frontends/gtk/download.h @@ -24,7 +24,7 @@ /** * download operation table for gtk */ -struct gui_download_table *nsgtk_download_table; +extern struct gui_download_table *nsgtk_download_table; /** * Initialise download window ready for use. diff --git a/frontends/gtk/fetch.h b/frontends/gtk/fetch.h index a095adbf9..9175ccdf2 100644 --- a/frontends/gtk/fetch.h +++ b/frontends/gtk/fetch.h @@ -19,7 +19,7 @@ #ifndef NETSURF_GTK_FETCH_H #define NETSURF_GTK_FETCH_H -struct gui_fetch_table *nsgtk_fetch_table; +extern struct gui_fetch_table *nsgtk_fetch_table; void gtk_fetch_filetype_init(const char *mimefile); void gtk_fetch_filetype_fin(void); diff --git a/frontends/gtk/search.h b/frontends/gtk/search.h index dd8c60d0f..b2162b805 100644 --- a/frontends/gtk/search.h +++ b/frontends/gtk/search.h @@ -19,7 +19,7 @@ #ifndef _NETSURF_GTK_SEARCH_H_ #define _NETSURF_GTK_SEARCH_H_ -struct gui_search_table *nsgtk_search_table; +extern struct gui_search_table *nsgtk_search_table; struct nsgtk_scaffolding; diff --git a/frontends/gtk/selection.h b/frontends/gtk/selection.h index 6463692cf..07716a0d9 100644 --- a/frontends/gtk/selection.h +++ b/frontends/gtk/selection.h @@ -19,6 +19,6 @@ #ifndef GTK_SELECTION_H #define GTK_SELECTION_H -struct gui_clipboard_table *nsgtk_clipboard_table; +extern struct gui_clipboard_table *nsgtk_clipboard_table; #endif |