Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4051bce

Browse files
committed
Libpq++ fixes for Win32 compile.
Christian Ullrich
1 parentd674b48 commit4051bce

File tree

8 files changed

+23
-12
lines changed

8 files changed

+23
-12
lines changed

‎src/include/c.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: c.h,v 1.96 2001/07/03 20:21:50 petere Exp $
15+
* $Id: c.h,v 1.97 2001/07/11 22:12:43 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -615,7 +615,13 @@ typedef NameData *Name;
615615
#else/* not BUILDING_DLL */
616616
#defineDLLIMPORT __declspec (dllimport)
617617
#endif
618-
#else/* not CYGWIN */
618+
#elif defined(WIN32)&& defined(_MSC_VER)/* not CYGWIN */
619+
#if defined(_DLL)
620+
#defineDLLIMPORT __declspec (dllexport)
621+
#else/* not _DLL */
622+
#defineDLLIMPORT __declspec (dllimport)
623+
#endif
624+
#else/* not CYGWIN, not MSVC */
619625
#defineDLLIMPORT
620626
#endif
621627

‎src/include/config.h.win32

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@
2020

2121
#define HAVE_ATEXIT
2222
#define HAVE_MEMMOVE
23+
24+
#define HAVE_CXX_STRING_HEADER
25+
#define HAVE_NAMESPACE_STD

‎src/interfaces/libpq++/pgconnection.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
16-
* $Id: pgconnection.h,v 1.11 2001/05/09 17:29:10 momjian Exp $
16+
* $Id: pgconnection.h,v 1.12 2001/07/11 22:12:43 momjian Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -57,7 +57,7 @@ extern "C" {
5757
// This class contains all the information about the connection
5858
// to the backend process. All the database classes should be
5959
// derived from this class to obtain the connection interface.
60-
classPgConnection {
60+
classDLLIMPORTPgConnection {
6161
protected:
6262
PGconn* pgConn;// Connection Structure
6363
PGresult* pgResult;// Current Query Result

‎src/interfaces/libpq++/pgcursordb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
1616
*
17-
* $Id: pgcursordb.h,v 1.7 2001/05/09 17:29:10 momjian Exp $
17+
* $Id: pgcursordb.h,v 1.8 2001/07/11 22:12:43 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -42,7 +42,7 @@
4242
// manipulates data through it. The interface will introduce some
4343
// ease of use through the methods that will allow cursor specific
4444
// operations, like fetch, forward, etc.
45-
classPgCursor :publicPgTransaction {
45+
classDLLIMPORTPgCursor : public PgTransaction {
4646
public:
4747
PgCursor(constchar* conninfo,constchar* cursor);// use reasonable & environment defaults
4848
// connect to the database with given environment and database name

‎src/interfaces/libpq++/pgdatabase.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
1616
*
17-
* $Id: pgdatabase.h,v 1.11 2001/05/09 17:46:11 momjian Exp $
17+
* $Id: pgdatabase.h,v 1.12 2001/07/11 22:12:43 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -34,7 +34,7 @@
3434
// This is the basic database access class. Its interface should
3535
// be used only after a query has been sent to the backend and
3636
// results are being received.
37-
classPgDatabase :publicPgConnection {
37+
classDLLIMPORTPgDatabase : public PgConnection {
3838
public:
3939
// connect to the database with conninfo
4040
explicitPgDatabase(constchar* conninfo) : PgConnection(conninfo) {}

‎src/interfaces/libpq++/pglobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
1313
*
14-
* $Id: pglobject.h,v 1.7 2001/05/09 17:29:10 momjian Exp $
14+
* $Id: pglobject.h,v 1.8 2001/07/11 22:12:43 momjian Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -35,7 +35,7 @@
3535
// PgLargeObject - a class for accessing Large Object in a database
3636
//
3737
// ****************************************************************
38-
classPgLargeObject :publicPgConnection {
38+
classDLLIMPORTPgLargeObject : public PgConnection {
3939
private:
4040
int pgFd;
4141
Oid pgObject;

‎src/interfaces/libpq++/pgtransdb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
1616
*
17-
* $Id: pgtransdb.h,v 1.7 2001/05/09 17:29:10 momjian Exp $
17+
* $Id: pgtransdb.h,v 1.8 2001/07/11 22:12:43 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -34,7 +34,7 @@
3434
// This is the database access class that keeps an open
3535
// transaction block during its lifetime. The block is ENDed when
3636
// the object is destroyed.
37-
classPgTransaction :publicPgDatabase {
37+
classDLLIMPORTPgTransaction : public PgDatabase {
3838
public:
3939
explicitPgTransaction(constchar* conninfo);// use reasonable & environment defaults
4040
// connect to the database with given environment and database name

‎src/win32.mak

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ ALL:
2020
cd ..
2121
cd interfaces\libpq
2222
nmake /f win32.mak $(MAKEMACRO)
23+
cd ..\libpq++
24+
nmake /f win32.mak $(MAKEMACRO)
2325
cd ..\..\bin\psql
2426
nmake /f win32.mak $(MAKEMACRO)
2527
cd ..\..

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp