Explorar o código

- merge 0.9.0 latest fixes/changes: radius modules makefiles and
libradiusclient/radiusclient-ng selection and various minor compile fixes

Andrei Pelinescu-Onciul %!s(int64=20) %!d(string=hai) anos
pai
achega
3e7dc7161f

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

+ 2 - 1
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;
 	}

+ 32 - 3
modules/db_postgres/aug_sysdep.h

@@ -157,6 +157,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)
@@ -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 */