summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-06 10:51:53 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-06 10:51:53 +0000
commit9bd66f4fd8f4a6918f6f1164ad7c5573067b68a1 (patch)
tree0e5bad21294e960bf15b62a46b22a036e39b67e7 /include
parente9578557daf661b50db13dc48a398c06db0eb196 (diff)
downloadzabbix-9bd66f4fd8f4a6918f6f1164ad7c5573067b68a1.tar.gz
zabbix-9bd66f4fd8f4a6918f6f1164ad7c5573067b68a1.tar.xz
zabbix-9bd66f4fd8f4a6918f6f1164ad7c5573067b68a1.zip
- [DEV-130] Compile warnings
git-svn-id: svn://svn.zabbix.com/trunk@5451 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
-rw-r--r--include/db.h2
-rw-r--r--include/dbschema.h55
2 files changed, 56 insertions, 1 deletions
diff --git a/include/db.h b/include/db.h
index c0ebdf8f..e9a56eaf 100644
--- a/include/db.h
+++ b/include/db.h
@@ -26,7 +26,7 @@
#include "common.h"
#include "zbxdb.h"
-#include "dbsync.h"
+#include "dbschema.h"
extern char *CONFIG_DBHOST;
extern char *CONFIG_DBNAME;
diff --git a/include/dbschema.h b/include/dbschema.h
new file mode 100644
index 00000000..39f6cdb1
--- /dev/null
+++ b/include/dbschema.h
@@ -0,0 +1,55 @@
+/*
+** ZABBIX
+** Copyright (C) 2000-2005 SIA Zabbix
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**/
+
+
+#ifndef ZABBIX_DBSYNC_H
+#define ZABBIX_DBSYNC_H
+
+#define ZBX_FIELD struct zbx_field_type
+ZBX_FIELD
+{
+ char *name;
+ int type;
+ int flags;
+};
+
+#define ZBX_MAX_FIELDS 64
+#define ZBX_TABLE struct zbx_table_type
+ZBX_TABLE
+{
+ char *table;
+ char *recid;
+ int flags;
+ ZBX_FIELD fields[ZBX_MAX_FIELDS];
+};
+
+#ifdef HAVE_ORACLE
+# define ZBX_DBTYPE_INT64 "number(20)"
+#elif HAVE_POSTGRESQL
+# define ZBX_DBTYPE_INT64 "bigint"
+#elif HAVE_MYSQL
+# define ZBX_DBTYPE_INT64 "bigint unsigned"
+#elif HAVE_SQLITE3
+# define ZBX_DBTYPE_INT64 "bigint"
+#endif
+
+extern ZBX_TABLE tables[];
+extern const char *db_schema;
+
+#endif