diff options
author | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-06 10:51:53 +0000 |
---|---|---|
committer | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-06 10:51:53 +0000 |
commit | 9bd66f4fd8f4a6918f6f1164ad7c5573067b68a1 (patch) | |
tree | 0e5bad21294e960bf15b62a46b22a036e39b67e7 /create/schema/gen.pl | |
parent | e9578557daf661b50db13dc48a398c06db0eb196 (diff) | |
download | zabbix-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 'create/schema/gen.pl')
-rwxr-xr-x | create/schema/gen.pl | 59 |
1 files changed, 25 insertions, 34 deletions
diff --git a/create/schema/gen.pl b/create/schema/gen.pl index 1156faf8..6f46fa10 100755 --- a/create/schema/gen.pl +++ b/create/schema/gen.pl @@ -55,7 +55,7 @@ local $output; %c=( "type" => "code", "database" => "", - "after" => "\t{0}\n};\n\n#endif\n", + "after" => "\t{0}\n};\n", "t_bigint" => "ZBX_TYPE_UINT", "t_id" => "ZBX_TYPE_ID", "t_integer" => "ZBX_TYPE_INT", @@ -73,38 +73,29 @@ local $output; "t_cksum_text" => "ZBX_TYPE_TEXT" ); -$c{"before"}="#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 - -static ZBX_TABLE tables[]={ +$c{"before"}="/* +** 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. +**/ + +#include \"common.h\" +#include \"dbschema.h\" + +ZBX_TABLE tables[]={ "; %oracle=("t_bigint" => "number(20)", @@ -152,7 +143,7 @@ static ZBX_TABLE tables[]={ %sqlite=("t_bigint" => "bigint", "database" => "sqlite", - "before" => "BEGIN TRANSACTION;\n\n", + "before" => "BEGIN TRANSACTION;\n", "after" => "COMMIT;\n", "type" => "sql", "t_id" => "bigint", |