Module: sip-router
Branch: janakj/postgres
Commit: 3e7dc7161fd4b60dbe44a2611e6a8cac02fabd2b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3e7dc71…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Jun 30 21:29:31 2005 +0000
- merge 0.9.0 latest fixes/changes: radius modules makefiles and
libradiusclient/radiusclient-ng selection and various minor compile fixes
---
modules/db_postgres/Makefile | 4 ++--
modules/db_postgres/aug_alloc.c | 3 ++-
modules/db_postgres/aug_sysdep.h | 35 ++++++++++++++++++++++++++++++++---
3 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/modules/db_postgres/Makefile b/modules/db_postgres/Makefile
index f42049b..980587f 100644
--- a/modules/db_postgres/Makefile
+++ b/modules/db_postgres/Makefile
@@ -7,8 +7,8 @@ auto_gen=
NAME=postgres.so
# libpq-fe.h locations
-DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include \
- -I/usr/include/postgresql
+DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include \
+ -I/usr/include/postgresql -I/usr/include/postgresql/8.0
LIBS=-L$(LOCALBASE)/lib -L$(LOCALBASE)/pgsql/lib -L$(LOCALBASE)/lib/pgsql -lpq
include ../../Makefile.modules
diff --git a/modules/db_postgres/aug_alloc.c b/modules/db_postgres/aug_alloc.c
index 6d543d2..88355c8 100644
--- a/modules/db_postgres/aug_alloc.c
+++ b/modules/db_postgres/aug_alloc.c
@@ -115,6 +115,7 @@ struct MemOpt
static int mem_bad(MemHead *mem, char *where, char *file, int line)
{
aug_abort(file, line, "Corrupted memory in %s", where);
+ return 0;
}
/*
@@ -225,7 +226,7 @@ static void *mem_alloc(size_t size, void *parent, char *file, int
line)
if(par)
{
- if(mem->m.sibling = par->m.child)
+ if((mem->m.sibling = par->m.child))
mem->m.sibling->m.parent = mem;
par->m.child = mem;
}
diff --git a/modules/db_postgres/aug_sysdep.h b/modules/db_postgres/aug_sysdep.h
index 42936c2..cea0c0a 100644
--- a/modules/db_postgres/aug_sysdep.h
+++ b/modules/db_postgres/aug_sysdep.h
@@ -158,6 +158,17 @@ typedef unsigned int augUInt32;
typedef unsigned int augUInt32;
#endif
+#if defined(x86_64) || defined(__x86_64)
+
+#if defined(__GNUC__)
+#define AUG_CONFIGURATION "Sun Solaris x86_64 with GCC"
+#else
+#define AUG_CONFIGURATION "Sun Solaris x86_64 with SUNpro C"
+#endif
+
+typedef unsigned int augUInt32;
+
+#endif
#if defined(sparc) || defined(__sparc)
#if defined(__svr4__) || defined(__SVR4)
@@ -204,7 +215,16 @@ typedef unsigned int augUInt32;
typedef unsigned int augUInt32;
-#endif /* i386 */
+#endif /* x86 */
+#if defined(__x86_64)
+
+#if defined(__GNUC__)
+#define AUG_CONFIGURATION "Linux x86_64 with GCC"
+#endif
+
+typedef unsigned int augUInt32;
+
+#endif /* x86-64 */
#endif /* linux */
/*
@@ -244,7 +264,16 @@ typedef unsigned int augUInt32;
typedef unsigned int augUInt32;
-#endif /* i386 */
+#endif /* x86 */
+#if defined(__x86_64)
+
+#if defined(__GNUC__)
+#define AUG_CONFIGURATION "FreeBSD x86_64 with GCC"
+#endif
+
+typedef unsigned int augUInt32;
+
+#endif /* x86_64 */
#endif /* freebsd */
/*
@@ -324,7 +353,7 @@ typedef unsigned int augUInt32;
*/
#ifndef AUG_CONFIGURATION
-error: os/cpu/compiler combination not configured in $Source$ $Revision$
+#error: os/cpu/compiler combination not configured in $Source$ $Revision$
#endif
#endif /* AUG_SYSDEP_H */