]> err.no Git - dak/commitdiff
Fixed sql-qptvc.cpp to work on modern postgresql versions,
authorMichael Casadevall <sonicmctails@gmail.com>
Tue, 30 Dec 2008 22:57:38 +0000 (17:57 -0500)
committerMichael Casadevall <sonicmctails@gmail.com>
Tue, 30 Dec 2008 22:57:38 +0000 (17:57 -0500)
and made the makefile be less braindead

Signed-off-by: Michael Casadevall <sonicmctails@gmail.com>
ChangeLog
src/Makefile
src/sql-aptvc.cpp

index 946cf32a3caa4a8a6da3801a4c5222d4d39d38aa..2bee6205b9353fda2de47035303793f91ac76ca1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-30  Michael Casadevall  <sonicmctails@gmail.com>
+
+       * src/sql-aptvc.cpp     - Fixed to work on modern postgresql version
+       * src/Makefile          - Gave it a brain on finding postgres headers
+
 2008-12-30  Joerg Jaspert  <joerg@debian.org>
 
        * config/debian/cron.hourly: Generate the 822 format for accepted,
index b45b07d8a3a762450441b2d1f0ff4c302d53911a..206f320bbc9559b38b108791f17d120eb6037347 100644 (file)
@@ -1,9 +1,9 @@
 #!/usr/bin/make -f
 
-CXXFLAGS       = -I/usr/include/postgresql/ -I/usr/include/postgresql/server/ -fPIC -Wall
-CFLAGS         = -fPIC -Wall
-LDFLAGS                = -fPIC
-LIBS           = -lapt-pkg
+CXXFLAGS       = -I/usr/include/postgresql/ -I`pg_config --includedir-server` -fPIC -Wall
+CFLAGS         = -fFIC -Wall `pg_config --cflags`
+LDFLAGS                = `pg_config --ldflags`
+LIBS           = -lapt-pkg `pg_config --libs`
 
 C++            = g++
 
index 54ba9e92f60fdf470b872131cf3d09b2be599db2..a9c3e53e0deee24df0fce7c0fb2fc1bee7ce2617 100644 (file)
@@ -26,6 +26,11 @@ extern "C"
 {
 
 #include <postgres.h>
+#include <fmgr.h>
+
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
 
   int versioncmp(text *A, text *B);