summaryrefslogtreecommitdiffstats
path: root/CRT.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-07-10 10:35:32 +1000
committerNathan Scott <nathans@redhat.com>2020-07-10 10:35:32 +1000
commitdfd9279f87791e36a5212726781c31fbe7110361 (patch)
treeee044449e757e2ae56e876efd02c5b1965c05924 /CRT.h
parent402e46bb82964366746b86d77eb5afa69c279539 (diff)
Resolve complation issues with -fno-common (default from gcc-10)
Extends the MakeHeader script to auto-generate correct "extern" function declarations in some cases that it currently does not. Related to https://github.com/hishamhm/htop/pull/981
Diffstat (limited to 'CRT.h')
-rw-r--r--CRT.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/CRT.h b/CRT.h
index 933fe068..bc3fb8b7 100644
--- a/CRT.h
+++ b/CRT.h
@@ -119,9 +119,9 @@ typedef enum ColorElements_ {
LAST_COLORELEMENT
} ColorElements;
-void CRT_fatalError(const char* note) __attribute__ ((noreturn));
+extern void CRT_fatalError(const char* note) __attribute__ ((noreturn));
-void CRT_handleSIGSEGV(int sgn);
+extern void CRT_handleSIGSEGV(int sgn);
#define KEY_ALT(x) (KEY_F(64 - 26) + (x - 'A'))
@@ -140,7 +140,7 @@ extern const char **CRT_treeStr;
extern int CRT_delay;
-int* CRT_colors;
+extern int* CRT_colors;
extern int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT];
@@ -150,21 +150,21 @@ extern int CRT_scrollHAmount;
extern int CRT_scrollWheelVAmount;
-char* CRT_termType;
+extern char* CRT_termType;
// TODO move color scheme to Settings, perhaps?
extern int CRT_colorScheme;
-void *backtraceArray[128];
+extern void *backtraceArray[128];
#if HAVE_SETUID_ENABLED
#define DIE(msg) do { CRT_done(); fprintf(stderr, msg); exit(1); } while(0)
-void CRT_dropPrivileges();
+extern void CRT_dropPrivileges();
-void CRT_restorePrivileges();
+extern void CRT_restorePrivileges();
#else
@@ -179,18 +179,18 @@ void CRT_restorePrivileges();
// TODO: pass an instance of Settings instead.
-void CRT_init(int delay, int colorScheme);
+extern void CRT_init(int delay, int colorScheme);
-void CRT_done();
+extern void CRT_done();
-void CRT_fatalError(const char* note);
+extern void CRT_fatalError(const char* note);
-int CRT_readKey();
+extern int CRT_readKey();
-void CRT_disableDelay();
+extern void CRT_disableDelay();
-void CRT_enableDelay();
+extern void CRT_enableDelay();
-void CRT_setColors(int colorScheme);
+extern void CRT_setColors(int colorScheme);
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy