aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/pqexpbuffer.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-10-03 17:09:42 +0000
committerBruce Momjian <bruce@momjian.us>2002-10-03 17:09:42 +0000
commita0bf2503ea0d9a1a2208dd3cf74727bcda7e69d2 (patch)
treeaa3d6727dc94d4a0c4741077184e7cfcf5cdf709 /src/interfaces/libpq/pqexpbuffer.c
parentd4eae72513d919522c8711b55894511f4fb49443 (diff)
downloadpostgresql-a0bf2503ea0d9a1a2208dd3cf74727bcda7e69d2.tar.gz
postgresql-a0bf2503ea0d9a1a2208dd3cf74727bcda7e69d2.zip
The attached patch fixes a number of issues related to compiling the
client utilities (libpq.dll and psql.exe) for win32 (missing defines, adjustments to includes, pedantic casting, non-existent functions) per: http://developer.postgresql.org/docs/postgres/install-win32.html. It compiles cleanly under Windows 2000 using Visual Studio .net. Also compiles clean and passes all regression tests (regular and contrib) under Linux. In addition to a review by the usual suspects, it would be very desirable for someone well versed in the peculiarities of win32 to take a look. Joe Conway
Diffstat (limited to 'src/interfaces/libpq/pqexpbuffer.c')
-rw-r--r--src/interfaces/libpq/pqexpbuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c
index 9d679bb7263..4bd78b18740 100644
--- a/src/interfaces/libpq/pqexpbuffer.c
+++ b/src/interfaces/libpq/pqexpbuffer.c
@@ -17,7 +17,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/pqexpbuffer.c,v 1.13 2002/06/20 20:29:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/pqexpbuffer.c,v 1.14 2002/10/03 17:09:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -192,7 +192,7 @@ printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
* actually stored, but at least one returns -1 on failure. Be
* conservative about believing whether the print worked.
*/
- if (nprinted >= 0 && nprinted < avail - 1)
+ if (nprinted >= 0 && nprinted < (int) avail - 1)
{
/* Success. Note nprinted does not include trailing null. */
str->len += nprinted;
@@ -240,7 +240,7 @@ appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
* actually stored, but at least one returns -1 on failure. Be
* conservative about believing whether the print worked.
*/
- if (nprinted >= 0 && nprinted < avail - 1)
+ if (nprinted >= 0 && nprinted < (int) avail - 1)
{
/* Success. Note nprinted does not include trailing null. */
str->len += nprinted;