summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2000-03-30 05:30:42 +0000
committerTom Lane2000-03-30 05:30:42 +0000
commit0a5a0b8dfd794dabce4194a0c14e723e86df7c34 (patch)
treeef73e239392953b5e55eaf1925179ab07b9c48d4
parent67cee15367e90127616bc6299d88a442a15d1421 (diff)
Make use of configure symbols for unportable constructs. Make
inclusions of system headers more consistent.
-rw-r--r--src/interfaces/libpq++/libpq++.h18
-rw-r--r--src/interfaces/libpq++/pgconnection.cc4
-rw-r--r--src/interfaces/libpq++/pgconnection.h13
-rw-r--r--src/interfaces/libpq++/pgdatabase.h3
4 files changed, 23 insertions, 15 deletions
diff --git a/src/interfaces/libpq++/libpq++.h b/src/interfaces/libpq++/libpq++.h
index 1f227c3b74..493e2465a9 100644
--- a/src/interfaces/libpq++/libpq++.h
+++ b/src/interfaces/libpq++/libpq++.h
@@ -1,4 +1,3 @@
-
/*-------------------------------------------------------------------------
*
* libpq++.h
@@ -14,6 +13,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
+ * $Id: libpq++.h,v 1.7 2000/03/30 05:30:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,19 +21,23 @@
#ifndef LIBPQXX_H
#define LIBPQXX_H
-#include <stdio.h>
-#include <strings.h>
+extern "C" {
+#include "config.h"
+}
+
+#ifdef HAVE_CXX_STRING_HEADER
#include <string>
+#endif
extern "C" {
-#include "config.h"
#include "postgres.h"
#include "libpq-fe.h"
}
-static char rcsid[] = "$Id: libpq++.h,v 1.6 2000/03/02 02:00:58 momjian Exp $";
-
+#ifdef HAVE_NAMESPACE_STD
using namespace std;
+#endif
+
// ****************************************************************
//
@@ -194,5 +198,3 @@ public:
#define BUFSIZE 1024
#endif /* LIBPQXX_H */
-
-
diff --git a/src/interfaces/libpq++/pgconnection.cc b/src/interfaces/libpq++/pgconnection.cc
index 3afbb57aa6..d624264935 100644
--- a/src/interfaces/libpq++/pgconnection.cc
+++ b/src/interfaces/libpq++/pgconnection.cc
@@ -10,13 +10,11 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgconnection.cc,v 1.7 2000/03/16 15:34:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgconnection.cc,v 1.8 2000/03/30 05:30:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdlib.h>
-#include <string.h>
#include "pgconnection.h"
extern "C" {
diff --git a/src/interfaces/libpq++/pgconnection.h b/src/interfaces/libpq++/pgconnection.h
index 6d3baee5eb..d010caa652 100644
--- a/src/interfaces/libpq++/pgconnection.h
+++ b/src/interfaces/libpq++/pgconnection.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pgconnection.h,v 1.4 2000/03/02 02:00:58 momjian Exp $
+ * $Id: pgconnection.h,v 1.5 2000/03/30 05:30:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,14 +21,23 @@
#ifndef PGCONN_H
#define PGCONN_H
-#include <stdio.h>
+extern "C" {
+#include "config.h"
+}
+
+#ifdef HAVE_CXX_STRING_HEADER
#include <string>
+#endif
extern "C" {
+#include "postgres.h"
#include "libpq-fe.h"
}
+#ifdef HAVE_NAMESPACE_STD
using namespace std;
+#endif
+
// ****************************************************************
//
diff --git a/src/interfaces/libpq++/pgdatabase.h b/src/interfaces/libpq++/pgdatabase.h
index 17c1c502e8..e0fd9f9268 100644
--- a/src/interfaces/libpq++/pgdatabase.h
+++ b/src/interfaces/libpq++/pgdatabase.h
@@ -14,7 +14,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
*
- * $Id: pgdatabase.h,v 1.6 2000/01/26 05:58:48 momjian Exp $
+ * $Id: pgdatabase.h,v 1.7 2000/03/30 05:30:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,7 +24,6 @@
#include "pgconnection.h"
-#include <stdlib.h>
// ****************************************************************
//