add common.h include to all other header files

Mon, 27 Dec 2021 17:02:32 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 27 Dec 2021 17:02:32 +0100
changeset 484
9e6900b1cf9d
parent 483
929016224c3c
child 485
6a86ad3d8c03

add common.h include to all other header files

src/cx/allocator.h file | annotate | diff | comparison | revisions
src/cx/buffer.h file | annotate | diff | comparison | revisions
src/cx/common.h file | annotate | diff | comparison | revisions
src/cx/linked_list.h file | annotate | diff | comparison | revisions
src/cx/list.h file | annotate | diff | comparison | revisions
src/cx/tree.h file | annotate | diff | comparison | revisions
--- a/src/cx/allocator.h	Mon Dec 27 16:51:10 2021 +0100
+++ b/src/cx/allocator.h	Mon Dec 27 17:02:32 2021 +0100
@@ -33,7 +33,7 @@
 #ifndef UCX_ALLOCATOR_H
 #define UCX_ALLOCATOR_H
 
-#include <stdlib.h>
+#include "common.h"
 
 #ifdef __cplusplus
 extern "C" {
--- a/src/cx/buffer.h	Mon Dec 27 16:51:10 2021 +0100
+++ b/src/cx/buffer.h	Mon Dec 27 17:02:32 2021 +0100
@@ -45,9 +45,9 @@
  */
 
 #ifndef UCX_BUFFER_H
-#define    UCX_BUFFER_H
+#define UCX_BUFFER_H
 
-#include <sys/types.h>
+#include "common.h"
 #include <stdio.h>
 
 #ifdef    __cplusplus
--- a/src/cx/common.h	Mon Dec 27 16:51:10 2021 +0100
+++ b/src/cx/common.h	Mon Dec 27 17:02:32 2021 +0100
@@ -49,6 +49,8 @@
 /** Version constant which ensures to increase monotonically. */
 #define UCX_VERSION (((UCX_VERSION_MAJOR)<<16)|UCX_VERSION_MINOR)
 
+#include <stdlib.h>
+#include <stddef.h>
 
 #ifdef _WIN32
 #if !(defined __ssize_t_defined || defined _SSIZE_T_)
@@ -65,9 +67,7 @@
 #endif
 #endif /* __WORDSIZE */
 #else /* !_WIN32 */
-
 #include <sys/types.h>
-
 #endif /* _WIN32 */
 
 #endif /* UCX_COMMON_H */
--- a/src/cx/linked_list.h	Mon Dec 27 16:51:10 2021 +0100
+++ b/src/cx/linked_list.h	Mon Dec 27 17:02:32 2021 +0100
@@ -38,7 +38,7 @@
 #ifndef UCX_LINKED_LIST_H
 #define UCX_LINKED_LIST_H
 
-#include <stddef.h>
+#include "common.h"
 #include "list.h"
 
 #ifdef __cplusplus
--- a/src/cx/list.h	Mon Dec 27 16:51:10 2021 +0100
+++ b/src/cx/list.h	Mon Dec 27 17:02:32 2021 +0100
@@ -37,7 +37,7 @@
 #ifndef UCX_LIST_H
 #define UCX_LIST_H
 
-#include <stdlib.h>
+#include "common.h"
 #include "allocator.h"
 
 #ifdef __cplusplus
--- a/src/cx/tree.h	Mon Dec 27 16:51:10 2021 +0100
+++ b/src/cx/tree.h	Mon Dec 27 17:02:32 2021 +0100
@@ -37,8 +37,7 @@
 #ifndef UCX_TREE_H
 #define UCX_TREE_H
 
-#include <stddef.h>
-#include <stdlib.h>
+#include "common.h"
 #include "allocator.h"
 
 #ifdef __cplusplus

mercurial