66 * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
77 * Portions Copyright (c) 1994, Regents of the University of California
88 *
9- * $Id: port.h,v 1.1 2003/05/15 16:35:29 momjian Exp $
9+ * $Id: port.h,v 1.2 2003/05/16 01:57:51 momjian Exp $
1010 *
1111 *-------------------------------------------------------------------------
1212 */
@@ -22,21 +22,26 @@ int fseeko(FILE *stream, off_t offset, int whence);
2222off_t ftello (FILE * stream );
2323#endif
2424
25+ #ifdef WIN32
2526/*
2627 * Win32 doesn't have reliable rename/unlink during concurrent access
2728 */
28- #if defined( WIN32 ) && !defined( FRONTEND )
29+ #ifndef FRONTEND
2930int pgrename (const char * from ,const char * to );
3031int pgunlink (const char * path );
3132#define rename (from ,to )pgrename(from, to)
3233#define unlink (path )pgunlink(path)
3334#endif
3435
36+ extern int copydir (char * fromdir ,char * todir );
37+ extern int gettimeofday (struct timeval * tp ,struct timezone * tzp );
38+
39+ #else
40+
3541/*
3642 *Win32 requires a special close for sockets and pipes, while on Unix
3743 *close() does them all.
3844 */
39- #ifndef WIN32
4045#define closesocket close
4146#endif
4247
@@ -45,7 +50,7 @@ int pgunlink(const char *path);
4550 * When necessary, these routines are provided by files in src/port/.
4651 */
4752#ifndef HAVE_CRYPT
48- char * crypt (const char * key ,const char * setting );
53+ extern char * crypt (const char * key ,const char * setting );
4954#endif
5055
5156#ifndef HAVE_FSEEKO
@@ -90,4 +95,3 @@ extern long random(void);
9095#ifndef HAVE_SRANDOM
9196extern void srandom (unsignedint seed );
9297#endif
93-