[SR-Dev] git:janakj/postgres: Make the module compile in the sip-router tree.

Jan Janak jan at iptel.org
Sun Feb 15 18:55:28 CET 2009


Module: sip-router
Branch: janakj/postgres
Commit: b372a1051efca7c5494b87ac2ea277f9816e5703
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b372a1051efca7c5494b87ac2ea277f9816e5703

Author: Jan Janak <jan at iptel.org>
Committer: Jan Janak <jan at iptel.org>
Date:   Sun Feb 15 16:59:15 2009 +0100

Make the module compile in the sip-router tree.

---

 modules/db_postgres/Makefile |    5 ++++-
 modules/db_postgres/pg_cmd.h |    6 +++---
 modules/db_postgres/pg_con.h |    6 +++---
 modules/db_postgres/pg_fld.c |    2 +-
 modules/db_postgres/pg_fld.h |    4 ++--
 modules/db_postgres/pg_res.c |    2 +-
 modules/db_postgres/pg_res.h |    4 ++--
 modules/db_postgres/pg_sql.c |    4 ++--
 modules/db_postgres/pg_sql.h |    2 +-
 modules/db_postgres/pg_uri.c |    2 +-
 modules/db_postgres/pg_uri.h |    4 ++--
 11 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/modules/db_postgres/Makefile b/modules/db_postgres/Makefile
index 3fe13e8..48857cb 100644
--- a/modules/db_postgres/Makefile
+++ b/modules/db_postgres/Makefile
@@ -8,10 +8,13 @@ NAME=postgres.so
 
 # libpq-fe.h locations
 #DEFS += -DPG_TEST
-DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include  \
+DEFS +=-DSER_MOD_INTERFACE -I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include  \
 	-I$(LOCALBASE)/include/postgresql \
 	-I/usr/include/postgresql -I/usr/include/postgresql/8.0 \
 	-I/usr/include/pgsql/
 LIBS=-L$(LOCALBASE)/lib -L$(LOCALBASE)/pgsql/lib -L$(LOCALBASE)/lib/pgsql -L /usr/lib -lpq
 
+SERLIBPATH=../../lib
+SER_LIBS=$(SERLIBPATH)/srdb2/srdb2
+
 include ../../Makefile.modules
diff --git a/modules/db_postgres/pg_cmd.h b/modules/db_postgres/pg_cmd.h
index 41914e9..1398d16 100644
--- a/modules/db_postgres/pg_cmd.h
+++ b/modules/db_postgres/pg_cmd.h
@@ -42,9 +42,9 @@
 
 #include "pg_oid.h"
 
-#include "../../db/db_drv.h"
-#include "../../db/db_cmd.h"
-#include "../../db/db_res.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_cmd.h"
+#include "../../lib/srdb2/db_res.h"
 #include "../../str.h"
 
 #include <stdarg.h>
diff --git a/modules/db_postgres/pg_con.h b/modules/db_postgres/pg_con.h
index c5d326a..53c36f2 100644
--- a/modules/db_postgres/pg_con.h
+++ b/modules/db_postgres/pg_con.h
@@ -41,9 +41,9 @@
 
 #include "pg_oid.h"
 
-#include "../../db/db_pool.h"
-#include "../../db/db_con.h"
-#include "../../db/db_uri.h"
+#include "../../lib/srdb2/db_pool.h"
+#include "../../lib/srdb2/db_con.h"
+#include "../../lib/srdb2/db_uri.h"
 
 #include <time.h>
 #include <libpq-fe.h>
diff --git a/modules/db_postgres/pg_fld.c b/modules/db_postgres/pg_fld.c
index fce1bf6..4353e48 100644
--- a/modules/db_postgres/pg_fld.c
+++ b/modules/db_postgres/pg_fld.c
@@ -40,7 +40,7 @@
 #include "pg_con.h" /* flags */
 #include "pg_mod.h"
 
-#include "../../db/db_drv.h"
+#include "../../lib/srdb2/db_drv.h"
 #include "../../mem/mem.h"
 #include "../../dprint.h"
 
diff --git a/modules/db_postgres/pg_fld.h b/modules/db_postgres/pg_fld.h
index a228cf8..917f22d 100644
--- a/modules/db_postgres/pg_fld.h
+++ b/modules/db_postgres/pg_fld.h
@@ -43,8 +43,8 @@
 #include "pg_oid.h"
 #include "pg_cmd.h"
 #include "../../ut.h"
-#include "../../db/db_gen.h"
-#include "../../db/db_fld.h"
+#include "../../lib/srdb2/db_gen.h"
+#include "../../lib/srdb2/db_fld.h"
 #include <libpq-fe.h>
 
 struct pg_fld {
diff --git a/modules/db_postgres/pg_res.c b/modules/db_postgres/pg_res.c
index 7580cfc..11dcb78 100644
--- a/modules/db_postgres/pg_res.c
+++ b/modules/db_postgres/pg_res.c
@@ -41,7 +41,7 @@
 
 #include "../../mem/mem.h"
 #include "../../dprint.h"
-#include "../../db/db_gen.h"
+#include "../../lib/srdb2/db_gen.h"
 
 
 static void pg_res_free(db_res_t* res, struct pg_res* payload)
diff --git a/modules/db_postgres/pg_res.h b/modules/db_postgres/pg_res.h
index 8b87c79..37ae98a 100644
--- a/modules/db_postgres/pg_res.h
+++ b/modules/db_postgres/pg_res.h
@@ -40,8 +40,8 @@
  * servers.
  */
 
-#include "../../db/db_drv.h"
-#include "../../db/db_res.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_res.h"
 
 #include <libpq-fe.h>
 
diff --git a/modules/db_postgres/pg_sql.c b/modules/db_postgres/pg_sql.c
index 37f9a1a..ab572dd 100644
--- a/modules/db_postgres/pg_sql.c
+++ b/modules/db_postgres/pg_sql.c
@@ -39,8 +39,8 @@
 
 #include "pg_sql.h"
 
-#include "../../db/db_cmd.h"
-#include "../../db/db_fld.h"
+#include "../../lib/srdb2/db_cmd.h"
+#include "../../lib/srdb2/db_fld.h"
 #include "../../mem/mem.h"
 #include "../../dprint.h"
 #include "../../ut.h"
diff --git a/modules/db_postgres/pg_sql.h b/modules/db_postgres/pg_sql.h
index 2ac9d96..84288dc 100644
--- a/modules/db_postgres/pg_sql.h
+++ b/modules/db_postgres/pg_sql.h
@@ -40,7 +40,7 @@
  * PostgreSQL.
  */
 
-#include "../../db/db_cmd.h"
+#include "../../lib/srdb2/db_cmd.h"
 #include "../../str.h"
 
 
diff --git a/modules/db_postgres/pg_uri.c b/modules/db_postgres/pg_uri.c
index 02fa494..61accdc 100644
--- a/modules/db_postgres/pg_uri.c
+++ b/modules/db_postgres/pg_uri.c
@@ -41,7 +41,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_postgres/pg_uri.h b/modules/db_postgres/pg_uri.h
index 324855f..2a7ed45 100644
--- a/modules/db_postgres/pg_uri.h
+++ b/modules/db_postgres/pg_uri.h
@@ -39,8 +39,8 @@
  * The implementation of parser parsing postgres://.. URIs.
  */
 
-#include "../../db/db_uri.h"
-#include "../../db/db_drv.h"
+#include "../../lib/srdb2/db_uri.h"
+#include "../../lib/srdb2/db_drv.h"
 
 /** PostgreSQL driver specific payload to attach to db_uri structures.
  * This is the PostgreSQL specific structure that will be attached




More information about the sr-dev mailing list