6
6
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
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 $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
@@ -22,21 +22,26 @@ int fseeko(FILE *stream, off_t offset, int whence);
22
22
off_t ftello (FILE * stream );
23
23
#endif
24
24
25
+ #ifdef WIN32
25
26
/*
26
27
* Win32 doesn't have reliable rename/unlink during concurrent access
27
28
*/
28
- #if defined( WIN32 ) && !defined( FRONTEND )
29
+ #ifndef FRONTEND
29
30
int pgrename (const char * from ,const char * to );
30
31
int pgunlink (const char * path );
31
32
#define rename (from ,to )pgrename(from, to)
32
33
#define unlink (path )pgunlink(path)
33
34
#endif
34
35
36
+ extern int copydir (char * fromdir ,char * todir );
37
+ extern int gettimeofday (struct timeval * tp ,struct timezone * tzp );
38
+
39
+ #else
40
+
35
41
/*
36
42
*Win32 requires a special close for sockets and pipes, while on Unix
37
43
*close() does them all.
38
44
*/
39
- #ifndef WIN32
40
45
#define closesocket close
41
46
#endif
42
47
@@ -45,7 +50,7 @@ int pgunlink(const char *path);
45
50
* When necessary, these routines are provided by files in src/port/.
46
51
*/
47
52
#ifndef HAVE_CRYPT
48
- char * crypt (const char * key ,const char * setting );
53
+ extern char * crypt (const char * key ,const char * setting );
49
54
#endif
50
55
51
56
#ifndef HAVE_FSEEKO
@@ -90,4 +95,3 @@ extern long random(void);
90
95
#ifndef HAVE_SRANDOM
91
96
extern void srandom (unsignedint seed );
92
97
#endif
93
-