]> granicus.if.org Git - postgresql/commitdiff
Make use of configure symbols for unportable constructs. Make
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 30 Mar 2000 05:30:42 +0000 (05:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 30 Mar 2000 05:30:42 +0000 (05:30 +0000)
inclusions of system headers more consistent.

src/interfaces/libpq++/libpq++.h
src/interfaces/libpq++/pgconnection.cc
src/interfaces/libpq++/pgconnection.h
src/interfaces/libpq++/pgdatabase.h

index 1f227c3b741fee83edeaa59df9e3bcc0d41bbe43..493e2465a94ec6cff2c09f2b5d77c3a572a3aa86 100644 (file)
@@ -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 $
  *
  *-------------------------------------------------------------------------
  */
 #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 */
-
-
index 3afbb57aa60ddbdf47dc9346e84575f6ac2a0f2f..d624264935b432f85e8aa7c9ceec284cbb1a4915 100644 (file)
  * 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" {
index 6d3baee5eb95eba3f76434e505dc91ef77e1f381..d010caa6528c12c756eb3e488f5d217531e7b796 100644 (file)
@@ -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 $
  *
  *-------------------------------------------------------------------------
  */
 #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
+
 
 // ****************************************************************
 //
index 17c1c502e8f81a83e508ba4930708d7375c4ae64..e0fd9f9268cff452f1cb2ae765f1d0de07ad7b0f 100644 (file)
@@ -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>
 
 // ****************************************************************
 //