]> git.neil.brown.name Git - edlib.git/commitdiff
Include some include files where there are needed in include files.
authorNeilBrown <neil@brown.name>
Mon, 3 Jul 2023 22:30:28 +0000 (08:30 +1000)
committerNeilBrown <neil@brown.name>
Wed, 12 Jul 2023 22:17:52 +0000 (08:17 +1000)
This makes it easier to move includes around in .c files.

Signed-off-by: NeilBrown <neil@brown.name>
internal.h
list.h
md5.h
misc.h
rexel.h

index a9d3dfd02ea763af121c70c47f866a8c97b5ce0e..b5405d8e23068536a8928a3ef59ac62e645be2be 100644 (file)
@@ -5,6 +5,7 @@
  * Declaration shared among core code, but not exported to
  * modules.
  */
+#include "safe.h"
 
 struct mark *doc_new_mark(struct pane *p safe, int view, struct pane *owner);
 struct mark *safe point_dup(struct mark *p safe);
diff --git a/list.h b/list.h
index 3cc97eb299c804890addf71e9fe9e9486102e706..1098610e756b1160554e61bff7cc6021d809ac7c 100644 (file)
--- a/list.h
+++ b/list.h
@@ -8,6 +8,8 @@
 #ifndef __LIST_H__
 #define __LIST_H__
 
+#include "safe.h"
+
 #define ASSERT(x) do { if (!(x)) abort();} while (0)
 
 /*Taken from various places in linux kernel */
diff --git a/md5.h b/md5.h
index 734d6fc8a4da24ea1b1580b67e46bbb5c99f8ecd..a52ae81decd144acbd1fac7e483922609b1865b0 100644 (file)
--- a/md5.h
+++ b/md5.h
@@ -9,10 +9,7 @@
 #include <memory.h>
 #include <endian.h>
 
-#ifndef safe
-#define safe
-#define safe_cast
-#endif
+#include "safe.h"
 
 #define MD5_DIGEST_SIZE                16
 #define MD5_HMAC_BLOCK_SIZE    64
diff --git a/misc.h b/misc.h
index b0490df6b720cc09d6e2ab6fb389dd72da544cb8..1d04044c399972d33d830c7dd56f125ef2514a70 100644 (file)
--- a/misc.h
+++ b/misc.h
@@ -8,6 +8,7 @@
 #ifndef EDLIB_MISC
 #define EDLIB_MISC
 
+#include <wchar.h>
 #include "list.h"
 
 #undef bool
diff --git a/rexel.h b/rexel.h
index 6dc193de160ff98938fc1b28fa48b4e7d28088da..383848784d44e8c2b3c0dcb1c68450336254b604 100644 (file)
--- a/rexel.h
+++ b/rexel.h
@@ -2,6 +2,10 @@
  * Copyright Neil Brown ©2015-2023 <neil@brown.name>
  * May be distributed under terms of GPLv2 - see file:COPYING
  */
+
+#include <wchar.h>
+#include "safe.h"
+
 struct match_state;
 enum rxl_found {
        RXL_NOMATCH,    /* No match has been found at all */