diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-07-12 23:28:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-07-12 23:28:49 +0000 |
commit | 6bc12a4aca7c75fdf9e8d0dbd2744e77c172c8dc (patch) | |
tree | 9a7638f9e0351bb6a68620872a549c07c8737cc7 /src/port/dirmod.c | |
parent | ad44c958258ce7b835c872096c70303cb951a3e5 (diff) |
Get dirmod.c on the same page as port.h about whether we use pgsymlink
on Cygwin (answer: we don't). Also try to unwind the #ifdef spaghetti
a little bit. Untested but hopefully I didn't break anything.
Diffstat (limited to 'src/port/dirmod.c')
-rw-r--r-- | src/port/dirmod.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/port/dirmod.c b/src/port/dirmod.c index e1f7527b33d..beec1272ce8 100644 --- a/src/port/dirmod.c +++ b/src/port/dirmod.c @@ -10,7 +10,7 @@ * Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.47 2007/01/19 16:42:24 alvherre Exp $ + * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.48 2007/07/12 23:28:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -103,6 +103,7 @@ fe_repalloc(void *pointer, Size size) } return res; } + #endif /* FRONTEND */ @@ -169,8 +170,14 @@ pgunlink(const char *path) return 0; } +/* We undefined these above; now redefine for possible use below */ +#define rename(from, to) pgrename(from, to) +#define unlink(path) pgunlink(path) + +#endif /* defined(WIN32) || defined(__CYGWIN__) */ + -#ifdef WIN32 /* Cygwin has its own symlinks */ +#if defined(WIN32) && !defined(__CYGWIN__) /* Cygwin has its own symlinks */ /* * pgsymlink support: @@ -276,14 +283,8 @@ pgsymlink(const char *oldpath, const char *newpath) return 0; } -#endif /* WIN32 */ -#endif /* defined(WIN32) || defined(__CYGWIN__) */ - -/* We undefined this above, so we redefine it */ -#if defined(WIN32) || defined(__CYGWIN__) -#define unlink(path) pgunlink(path) -#endif +#endif /* defined(WIN32) && !defined(__CYGWIN__) */ /* |