From 996d7158a87c889cde3d4a828f3091b95bfcf12b Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Mon, 16 Sep 2019 17:15:55 +0200 Subject: [PATCH] Add libnazgul.h header * Prevent loops & re-declarations in headers --- src/libnazgul.h | 8 ++++++++ src/nzg_iface.h | 7 ++++++- src/nzg_proto.h | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/libnazgul.h diff --git a/src/libnazgul.h b/src/libnazgul.h new file mode 100644 index 0000000..ef5a98a --- /dev/null +++ b/src/libnazgul.h @@ -0,0 +1,8 @@ +#ifndef _LIBNAZGUL +#define _LIBNAZGUL 1 + +#include "nzg_global.h" +#include "nzg_iface.h" +#include "nzg_proto.h" + +#endif diff --git a/src/nzg_iface.h b/src/nzg_iface.h index a2f7665..ab20c61 100644 --- a/src/nzg_iface.h +++ b/src/nzg_iface.h @@ -6,6 +6,11 @@ #define MSGSPACE_DEFAULT_MODE 0600 typedef char * msgSpaceId; +typedef char * msgSpaceListElemId; +typedef char * msgSpacePoolDataId; +typedef char * msgSpacePoolId; +typedef char * msgSpaceQueueDataId; +typedef char * msgSpaceQueueId; typedef struct MsgPool { @@ -16,7 +21,6 @@ typedef struct MsgSpace { } msgSpace; -typedef char * msgSpaceListElemId; typedef struct MsgSpaceListElem { void * id; @@ -25,5 +29,6 @@ typedef struct MsgSpaceListElem { msgSpaceListElemId next; } * msgSpaceList, msgSpaceListElem; + #endif /* */ diff --git a/src/nzg_proto.h b/src/nzg_proto.h index 13eba55..2353ac9 100644 --- a/src/nzg_proto.h +++ b/src/nzg_proto.h @@ -1,3 +1,5 @@ +#ifndef _NZG_PROTO +#define _NZG_PROTO 1 char **msgSpaceIdList(void); @@ -18,3 +20,4 @@ msgSpace *msgSpaceOpen(msgSpaceId spaceId); void msgSpaceDelete(msgSpaceId spaceId); msgSpaceId msgSp2nzgId(msgSpaceId spaceId); +#endif