Module: sip-router
Branch: janakj/oracle
Commit: ba1086ac94b5080eb33a3f822a771c3f039b6499
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ba1086a…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Sun Feb 15 14:22:38 2009 +0100
Make the oracle module compile in the sip-router tree.
Changes include:
* Add -DSER_MOD_INTERFACE to Makefile
* Link with libsrdb2
* Change relative paths to SER header files.
---
modules/db_oracle/Makefile | 5 ++++-
modules/db_oracle/ora_cmd.c | 2 +-
modules/db_oracle/ora_cmd.h | 4 ++--
modules/db_oracle/ora_con.h | 8 ++++----
modules/db_oracle/ora_fld.c | 2 +-
modules/db_oracle/ora_fld.h | 4 ++--
modules/db_oracle/ora_res.c | 2 +-
modules/db_oracle/ora_res.h | 4 ++--
modules/db_oracle/ora_uri.c | 2 +-
modules/db_oracle/ora_uri.h | 4 ++--
10 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/modules/db_oracle/Makefile b/modules/db_oracle/Makefile
index c47726c..d9f2c79 100644
--- a/modules/db_oracle/Makefile
+++ b/modules/db_oracle/Makefile
@@ -14,7 +14,10 @@ ORACLE_INCLUDES = $(ORACLE_ROOT)/rdbms/public
# ORACLE_LIBS = $(ORACLE_ROOT)
# ORACLE_INCLUDES = $(ORACLE_ROOT)/sdk/include
-DEFS += -I$(ORACLE_INCLUDES)
+DEFS += -DSER_MOD_INTERFACE -I$(ORACLE_INCLUDES)
LIBS += -L$(ORACLE_LIBS) -lclntsh
+SERLIBPATH=../../lib
+SER_LIBS=$(SERLIBPATH)/srdb2/srdb2
+
include ../../Makefile.modules
diff --git a/modules/db_oracle/ora_cmd.c b/modules/db_oracle/ora_cmd.c
index c3a1883..e558cac 100644
--- a/modules/db_oracle/ora_cmd.c
+++ b/modules/db_oracle/ora_cmd.c
@@ -41,7 +41,7 @@
#include "../../mem/mem.h"
#include "../../str.h"
-#include "../../db/db_cmd.h"
+#include "../../lib/srdb2/db_cmd.h"
#include "../../ut.h"
#include <strings.h>
diff --git a/modules/db_oracle/ora_cmd.h b/modules/db_oracle/ora_cmd.h
index df6d99e..4c1a44a 100644
--- a/modules/db_oracle/ora_cmd.h
+++ b/modules/db_oracle/ora_cmd.h
@@ -29,8 +29,8 @@
#ifndef _ORA_CMD_H_
#define _ORA_CMD_H_
-#include "../../db/db_drv.h"
-#include "../../db/db_cmd.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_cmd.h"
#include <oci.h>
#include <stdarg.h>
#include "ora_con.h"
diff --git a/modules/db_oracle/ora_con.h b/modules/db_oracle/ora_con.h
index 89b62c3..52f3568 100644
--- a/modules/db_oracle/ora_con.h
+++ b/modules/db_oracle/ora_con.h
@@ -29,10 +29,10 @@
#ifndef _ORA_CON_H_
#define _ORA_CON_H_
-#include "../../db/db_pool.h"
-#include "../../db/db_con.h"
-#include "../../db/db_fld.h"
-#include "../../db/db_uri.h"
+#include "../../lib/srdb2/db_pool.h"
+#include "../../lib/srdb2/db_con.h"
+#include "../../lib/srdb2/db_fld.h"
+#include "../../lib/srdb2/db_uri.h"
#include <oci.h>
diff --git a/modules/db_oracle/ora_fld.c b/modules/db_oracle/ora_fld.c
index c87f946..69f0047 100644
--- a/modules/db_oracle/ora_fld.c
+++ b/modules/db_oracle/ora_fld.c
@@ -30,7 +30,7 @@
#include "../../mem/mem.h"
#include "../../dprint.h"
-#include "../../db/db_gen.h"
+#include "../../lib/srdb2/db_gen.h"
#include <string.h>
diff --git a/modules/db_oracle/ora_fld.h b/modules/db_oracle/ora_fld.h
index 4669307..5a3979d 100644
--- a/modules/db_oracle/ora_fld.h
+++ b/modules/db_oracle/ora_fld.h
@@ -33,8 +33,8 @@
* @{
*/
-#include "../../db/db_drv.h"
-#include "../../db/db_fld.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_fld.h"
#include <oci.h>
typedef struct ora_fld {
diff --git a/modules/db_oracle/ora_res.c b/modules/db_oracle/ora_res.c
index fe59348..3232726 100644
--- a/modules/db_oracle/ora_res.c
+++ b/modules/db_oracle/ora_res.c
@@ -32,7 +32,7 @@
#include "../../mem/mem.h"
#include "../../dprint.h"
-#include "../../db/db_gen.h"
+#include "../../lib/srdb2/db_gen.h"
#include <oci.h>
diff --git a/modules/db_oracle/ora_res.h b/modules/db_oracle/ora_res.h
index f3b0ea7..af9fadb 100644
--- a/modules/db_oracle/ora_res.h
+++ b/modules/db_oracle/ora_res.h
@@ -29,8 +29,8 @@
#ifndef _ORA_RES_H_
#define _ORA_RES_H_
-#include "../../db/db_drv.h"
-#include "../../db/db_res.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_res.h"
typedef struct _ora_res {
db_drv_t gen;
diff --git a/modules/db_oracle/ora_uri.c b/modules/db_oracle/ora_uri.c
index 13901b1..7ecc30c 100644
--- a/modules/db_oracle/ora_uri.c
+++ b/modules/db_oracle/ora_uri.c
@@ -33,7 +33,7 @@
#include "../../dprint.h"
#include "../../mem/mem.h"
#include "../../ut.h"
-#include "../../db/db_gen.h"
+#include "../../lib/srdb2/db_gen.h"
#include <stdlib.h>
#include <string.h>
diff --git a/modules/db_oracle/ora_uri.h b/modules/db_oracle/ora_uri.h
index 248b9a2..905e286 100644
--- a/modules/db_oracle/ora_uri.h
+++ b/modules/db_oracle/ora_uri.h
@@ -31,8 +31,8 @@
#ifndef _ORA_URI_H_
#define _ORA_URI_H_
-#include "../../db/db_uri.h"
-#include "../../db/db_drv.h"
+#include "../../lib/srdb2/db_uri.h"
+#include "../../lib/srdb2/db_drv.h"
typedef struct _ora_uri_t {
db_drv_t drv;