*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.48 2004/08/29 05:06:43 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.49 2004/09/09 00:59:31 momjian Exp $
*
* Since the server static private key ($DataDir/server.key)
* will normally be stored unencrypted so that the database
* think of a reasonable check to apply on Windows. (See also the
* data directory permission check in postmaster.c)
*/
-#if !defined(__CYGWIN__) && !defined(WIN32)
+#if !defined(WIN32) && !defined(__CYGWIN__)
if (!S_ISREG(buf.st_mode) || (buf.st_mode & (S_IRWXG | S_IRWXO)) ||
buf.st_uid != getuid())
ereport(FATAL,
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.424 2004/08/29 05:06:46 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.425 2004/09/09 00:59:33 momjian Exp $
*
* NOTES
*
* be proper support for Unix-y file permissions. Need to think of a
* reasonable check to apply on Windows.
*/
-#if !defined(__CYGWIN__) && !defined(WIN32)
+#if !defined(WIN32) && !defined(__CYGWIN__)
if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
ereport(FATAL,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/c.h,v 1.168 2004/08/29 05:06:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/c.h,v 1.169 2004/09/09 00:59:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <sys/types.h>
#include <errno.h>
-#if defined(__CYGWIN__) || defined(WIN32)
+#if defined(WIN32) || defined(__CYGWIN__)
#include <fcntl.h> /* ensure O_BINARY is available */
#endif
#ifdef HAVE_SUPPORTDEFS_H
* literal control-Z. The other affect is that we see CRLF, but
* that is OK because we can already handle those cleanly.
*/
-#if defined(__CYGWIN__) || defined(WIN32)
+#if defined(WIN32) || defined(__CYGWIN__)
#define PG_BINARY O_BINARY
#define PG_BINARY_R "rb"
#define PG_BINARY_W "wb"
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/port.h,v 1.59 2004/09/09 00:24:10 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.60 2004/09/09 00:59:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif
/* Global variable holding time zone information. */
-#if !defined(__CYGWIN__)
+#ifndef __CYGWIN__
#define TIMEZONE_GLOBAL timezone
#define TZNAME_GLOBAL tzname
#else
-/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.31 2004/08/31 11:29:56 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.32 2004/09/09 00:59:44 momjian Exp $ */
/* undefine and redefine after #include */
#undef mkdir
#define USES_WINSOCK
/* defines for dynamic linking on Win32 platform */
-#if defined(__CYGWIN__) || defined(__MINGW32__)
+#if defined(__MINGW32__) || defined(__CYGWIN__)
#if __GNUC__ && ! defined (__declspec)
#error You need egcs 1.1 or newer for compiling!
#define POSTGRES_SQLCA_H
#ifndef DLLIMPORT
-#if defined(__CYGWIN__) || defined(WIN32)
+#if defined(WIN32) || defined(__CYGWIN__)
#define DLLIMPORT __declspec (dllimport)
#else
#define DLLIMPORT
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.22 2004/08/29 05:07:02 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.23 2004/09/09 00:59:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
{
int loops = 0;
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
while (!MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING))
#endif
#ifdef __CYGWIN__
while (rename(from, to) < 0)
#endif
{
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
if (GetLastError() != ERROR_ACCESS_DENIED)
#endif
#ifdef __CYGWIN__