EVENT-CLIENT: fix potential compile problems with older compilers
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 23 Aug 2012 21:59:58 +0000 (23:59 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 23 Aug 2012 21:59:58 +0000 (23:59 +0200)
  - forward declarations of structs musntn't duplicate. use the cpp to circumvent this.

 tnx the_mgt for reporting this.

citadel/context.h
citadel/event_client.h

index 9243d5148230270912919694e908ee9b68a81dea..1d152a413882b2aa966e6fa53c6664ce6f8119af 100644 (file)
@@ -28,8 +28,14 @@ typedef enum __CCState {
        CON_SYS                 /* This is a system context and mustn't be purged */
 } CCState;
 
+#ifndef __ASYNCIO__
+#define __ASYNCIO__
 typedef struct AsyncIO AsyncIO; /* forward declaration for event_client.h */
+#endif
+#ifndef __CIT_CONTEXT__
+#define __CIT_CONTEXT__
 typedef struct CitContext CitContext;
+#endif
 
 /*
  * Here's the big one... the Citadel context structure.
index 4be26614c215837d904f70d508aafd5a82e1f1e2..bf4aa4ea4ef58e00d3177fdf295783d29709cc57 100644 (file)
 #include <ares.h>
 #include <curl/curl.h>
 
+#ifndef __ASYNCIO__
+#define __ASYNCIO__
 typedef struct AsyncIO AsyncIO;
+#endif
+#ifndef __CIT_CONTEXT__
+#define __CIT_CONTEXT__
 typedef struct CitContext CitContext;
+#endif
 
 typedef enum _eNextState {
        eSendDNSQuery,