aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/md5.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/backend/libpq/md5.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/backend/libpq/md5.c')
-rw-r--r--src/backend/libpq/md5.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/backend/libpq/md5.c b/src/backend/libpq/md5.c
index 5c12e70c7f0..dbf639fc74f 100644
--- a/src/backend/libpq/md5.c
+++ b/src/backend/libpq/md5.c
@@ -14,7 +14,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/md5.c,v 1.18 2002/09/04 20:31:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/md5.c,v 1.19 2002/10/03 17:09:41 momjian Exp $
*/
@@ -26,10 +26,19 @@
* can be compiled stand-alone.
*/
-#ifndef MD5_ODBC
+#if ! defined(MD5_ODBC) && ! defined(FRONTEND)
#include "postgres.h"
#include "libpq/crypt.h"
-#else
+#endif
+
+#ifdef FRONTEND
+#include "postgres_fe.h"
+#ifndef WIN32
+#include "libpq/crypt.h"
+#endif /* WIN32 */
+#endif /* FRONTEND */
+
+#ifdef MD5_ODBC
#include "md5.h"
#endif