mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
#ifdef WIN32 /* Cygwin has its own symlinks */
|
||||
#endif /* defined(WIN32) || defined(__CYGWIN__) */
|
||||
|
||||
|
||||
#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__) */
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user