summaryrefslogtreecommitdiffstats
path: root/runtime/glbl.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-17 09:07:12 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-17 09:07:12 +0200
commit87c936ab65b4381fed35689b38c98f130883d903 (patch)
tree460ca0e1481a62ab9a9728a7e56a74eceb8d2767 /runtime/glbl.h
parentbf3e0d4f224a26e2ac9bc3edfd1e6eedcf56c9f8 (diff)
downloadrsyslog-87c936ab65b4381fed35689b38c98f130883d903.tar.gz
rsyslog-87c936ab65b4381fed35689b38c98f130883d903.tar.xz
rsyslog-87c936ab65b4381fed35689b38c98f130883d903.zip
modularization work
cleanup + created an abstract class for global data items and moved glblGetWorkDir to it
Diffstat (limited to 'runtime/glbl.h')
-rw-r--r--runtime/glbl.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/runtime/glbl.h b/runtime/glbl.h
index 037c9ec4..b2a26deb 100644
--- a/runtime/glbl.h
+++ b/runtime/glbl.h
@@ -35,7 +35,22 @@
#define glblGetIOBufSize() 4096 /* size of the IO buffer, e.g. for strm class */
extern uchar *glblModPath; /* module load path */
-extern uchar *pszWorkDir;
-#define glblGetWorkDir() (pszWorkDir == NULL ? (uchar*) "" : pszWorkDir)
+
+/* the glbl object
+ * Note: this must be defined to satisfy the interface. We do not
+ * actually have instance data.*/
+typedef struct glbl_s {
+ BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */
+} glbl_t;
+
+
+/* interfaces */
+BEGINinterface(glbl) /* name must also be changed in ENDinterface macro! */
+ uchar* (*GetWorkDir)(void);
+ENDinterface(glbl)
+#define glblCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
+
+/* the remaining prototypes */
+PROTOTYPEObj(glbl);
#endif /* #ifndef GLBL_H_INCLUDED */