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/windows | |
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/windows')
-rw-r--r-- | frontends/windows/bitmap.h | 2 | ||||
-rw-r--r-- | frontends/windows/clipboard.h | 2 | ||||
-rw-r--r-- | frontends/windows/fetch.h | 2 | ||||
-rw-r--r-- | frontends/windows/file.h | 2 | ||||
-rw-r--r-- | frontends/windows/font.h | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/frontends/windows/bitmap.h b/frontends/windows/bitmap.h index c723159e1..c57061d77 100644 --- a/frontends/windows/bitmap.h +++ b/frontends/windows/bitmap.h @@ -20,7 +20,7 @@ #ifndef _NETSURF_WINDOWS_BITMAP_H_ #define _NETSURF_WINDOWS_BITMAP_H_ -struct gui_bitmap_table *win32_bitmap_table; +extern struct gui_bitmap_table *win32_bitmap_table; struct bitmap { HBITMAP windib; diff --git a/frontends/windows/clipboard.h b/frontends/windows/clipboard.h index c707c2437..92f096b8e 100644 --- a/frontends/windows/clipboard.h +++ b/frontends/windows/clipboard.h @@ -22,6 +22,6 @@ /** * The clipboard operation function table for win32 */ -struct gui_clipboard_table *win32_clipboard_table; +extern struct gui_clipboard_table *win32_clipboard_table; #endif diff --git a/frontends/windows/fetch.h b/frontends/windows/fetch.h index 20984f14a..e85402ac3 100644 --- a/frontends/windows/fetch.h +++ b/frontends/windows/fetch.h @@ -22,7 +22,7 @@ /** * win32 API fetch operation table */ -struct gui_fetch_table *win32_fetch_table; +extern struct gui_fetch_table *win32_fetch_table; /** * Translate resource to win32 resource data. diff --git a/frontends/windows/file.h b/frontends/windows/file.h index 5262dde2c..19dfba3b1 100644 --- a/frontends/windows/file.h +++ b/frontends/windows/file.h @@ -24,6 +24,6 @@ #ifndef _NETSURF_WINDOWS_FILE_H_ #define _NETSURF_WINDOWS_FILE_H_ -struct gui_file_table *win32_file_table; +extern struct gui_file_table *win32_file_table; #endif diff --git a/frontends/windows/font.h b/frontends/windows/font.h index ec2c262ff..8219e4c76 100644 --- a/frontends/windows/font.h +++ b/frontends/windows/font.h @@ -35,8 +35,8 @@ struct font_desc { const char *encoding; }; -struct gui_layout_table *win32_layout_table; -struct gui_utf8_table *win32_utf8_table; +extern struct gui_layout_table *win32_layout_table; +extern struct gui_utf8_table *win32_utf8_table; /** * convert from utf-8 to win32 font encoding. |