summaryrefslogtreecommitdiff
blob: 6c8650472e4e9ab080c9dccf0322b6e5294c4607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Adapted version of https://github.com/rocky/remake/commit/08113a28b9be25cf157ace5d63c2d36d7dbefc04
--- a/src/debugger/file2line.c
+++ b/src/debugger/file2line.c
@@ -26,6 +26,8 @@ Boston, MA 02111-1307, USA.  */
 #include "../src/rule.h"
 #include "./file2line.h"
 
+struct hash_table file2lines;
+
 unsigned long
 file2lines_hash_1 (const void *key)
 {
--- a/src/debugger/file2line.h
+++ b/src/debugger/file2line.h
@@ -19,15 +19,15 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 #ifndef REMAKE_FILE2LINE
 #define REMAKE_FILE2LINE
-struct hash_table file2lines;
+extern struct hash_table file2lines;
 
 typedef enum {
   F2L_TARGET,
   F2L_PATTERN
 } f2l_entry_t;
 
-  
-typedef struct lineo_array_s 
+
+typedef struct lineo_array_s
 {
   const char *hname;   /**< Name stored in hash table */
   unsigned int size;   /**< Number of entries in array */
@@ -40,13 +40,13 @@ typedef struct lineo_array_s
   only. So we do this on demand.
 */
 extern bool file2lines_init(void);
-extern file_t *target_for_file_and_line (const char *psz_filename, 
+extern file_t *target_for_file_and_line (const char *psz_filename,
 					 unsigned int lineno,
 					 /*out*/ f2l_entry_t *entry_type);
 extern void file2lines_dump(void);
 #endif
 
-/* 
+/*
  * Local variables:
  * eval: (c-set-style "gnu")
  * indent-tabs-mode: nil
--- a/src/dep.h
+++ b/src/dep.h
@@ -139,7 +139,7 @@ struct dep *copy_dep_chain (const struct dep *d);
 struct goaldep *read_all_makefiles (const char **makefiles);
 
 /*! The chain of makefiles read by read_makefile.  */
-struct goaldep *read_makefiles;
+extern struct goaldep *read_makefiles;
 
 void eval_buffer (char *buffer, const gmk_floc *floc);
 enum update_status update_goal_chain (struct goaldep *goals);
--- a/src/globals.h
+++ b/src/globals.h
@@ -89,6 +89,6 @@ extern int in_debugger;
 extern bool b_debugger_preread;
 
 /* Remember the original value of the SHELL variable, from the environment.  */
-struct variable shell_var;
+extern struct variable shell_var;
 
 #endif /*GLOBALS_H*/
--- a/src/main.c
+++ b/src/main.c
@@ -45,6 +45,8 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 # include <fcntl.h>
 #endif
 
+struct goaldep *read_makefiles;
+
 extern void initialize_stopchar_map ();
 
 #if defined HAVE_WAITPID || defined HAVE_WAIT3
--- a/src/make.h
+++ b/src/make.h
@@ -324,7 +324,7 @@ extern int unixy_shell;
 #endif
 #ifdef SET_STACK_SIZE
 # include <sys/resource.h>
-struct rlimit stack_limit;
+extern struct rlimit stack_limit;
 #endif
 
 /* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
--- a/src/print.h
+++ b/src/print.h
@@ -39,7 +39,7 @@ void fatal_err (target_stack_node_t *p_call, const char *fmt, ...);
 
 /* Think of the below not as an enumeration but as #defines done in a
    way that we'll be able to use the value in a gdb. */
-enum debug_print_enums_e {
+extern enum debug_print_enums_e {
   MAX_STACK_SHOW = 1000,
 } debug_print_enums1;