Browse Source

Make the module compile in the sip-router tree.

Jan Janak 16 năm trước cách đây
mục cha
commit
b372a1051e

+ 4 - 1
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

+ 3 - 3
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>

+ 3 - 3
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>

+ 1 - 1
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"
 

+ 2 - 2
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 {

+ 1 - 1
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)

+ 2 - 2
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>
 

+ 2 - 2
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"

+ 1 - 1
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"
 
 

+ 1 - 1
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>

+ 2 - 2
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