diff --git a/src/include/c.h b/src/include/c.h
index a69bb99c29cd9d10ea526ce964fc1713bd140c3e..3cb185e5c7f514410bb58d56ee0e99ab1d75afe0 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -12,7 +12,7 @@
  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: c.h,v 1.143 2003/05/09 16:26:29 momjian Exp $
+ * $Id: c.h,v 1.144 2003/05/09 16:59:43 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -798,6 +798,10 @@ extern int	vsnprintf(char *str, size_t count, const char *fmt, va_list args);
  * Default "extern" declarations or macro substitutes for library routines.
  * When necessary, these routines are provided by files in src/port/.
  */
+#ifndef HAVE_CRYPT
+char *crypt(const char *key, const char *setting);
+#endif
+
 #ifndef HAVE_FSEEKO
 #define fseeko(a, b, c) fseek((a), (b), (c))
 #define ftello(a) ftell((a))
diff --git a/src/include/port/qnx4.h b/src/include/port/qnx4.h
index b19e76793ae38524e73d98f7a0fba64bb91a095c..291abed0de7478aeac0187656b0bd543045705f7 100644
--- a/src/include/port/qnx4.h
+++ b/src/include/port/qnx4.h
@@ -26,7 +26,5 @@ typedef unsigned char slock_t;
 
 extern int	isnan(double dsrc);
 
-extern char *crypt(const char *, const char *);
-
 extern long random(void);
 extern void srandom(unsigned int seed);
diff --git a/src/interfaces/libpq/win32.h b/src/interfaces/libpq/win32.h
index e0abd87678d06c45b0ea12595aa68f477f79f692..7f3f5cbd6296ed7600f176396cdaebbc2bd6f7be 100644
--- a/src/interfaces/libpq/win32.h
+++ b/src/interfaces/libpq/win32.h
@@ -27,11 +27,6 @@
 #define vsnprintf(a,b,c,d) _vsnprintf(a,b,c,d)
 #define snprintf _snprintf
 
-/*
- * crypt not available (yet)
- */
-#define crypt(a,b) ((char *) a)
-
 #undef EAGAIN					/* doesn't apply on sockets */
 #undef EINTR
 #define EINTR WSAEINTR