Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f1d1116

Browse files
committed
Fix Cygwin defines to be consistent.
1 parent b70999d commit f1d1116

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/backend/libpq/be-secure.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.48 2004/08/29 05:06:43 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.49 2004/09/09 00:59:31 momjian Exp $
1515
*
1616
* Since the server static private key ($DataDir/server.key)
1717
* will normally be stored unencrypted so that the database
@@ -659,7 +659,7 @@ initialize_SSL(void)
659659
* think of a reasonable check to apply on Windows. (See also the
660660
* data directory permission check in postmaster.c)
661661
*/
662-
#if !defined(__CYGWIN__) && !defined(WIN32)
662+
#if !defined(WIN32) && !defined(__CYGWIN__)
663663
if (!S_ISREG(buf.st_mode) || (buf.st_mode & (S_IRWXG | S_IRWXO)) ||
664664
buf.st_uid != getuid())
665665
ereport(FATAL,

src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.424 2004/08/29 05:06:46 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.425 2004/09/09 00:59:33 momjian Exp $
4141
*
4242
* NOTES
4343
*
@@ -976,7 +976,7 @@ checkDataDir(const char *checkdir)
976976
* be proper support for Unix-y file permissions. Need to think of a
977977
* reasonable check to apply on Windows.
978978
*/
979-
#if !defined(__CYGWIN__) && !defined(WIN32)
979+
#if !defined(WIN32) && !defined(__CYGWIN__)
980980
if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
981981
ereport(FATAL,
982982
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),

src/include/c.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.168 2004/08/29 05:06:55 momjian Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.169 2004/09/09 00:59:41 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -68,7 +68,7 @@
6868
#include <sys/types.h>
6969

7070
#include <errno.h>
71-
#if defined(__CYGWIN__) || defined(WIN32)
71+
#if defined(WIN32) || defined(__CYGWIN__)
7272
#include <fcntl.h> /* ensure O_BINARY is available */
7373
#endif
7474
#ifdef HAVE_SUPPORTDEFS_H
@@ -680,7 +680,7 @@ typedef NameData *Name;
680680
* literal control-Z. The other affect is that we see CRLF, but
681681
* that is OK because we can already handle those cleanly.
682682
*/
683-
#if defined(__CYGWIN__) || defined(WIN32)
683+
#if defined(WIN32) || defined(__CYGWIN__)
684684
#define PG_BINARY O_BINARY
685685
#define PG_BINARY_R "rb"
686686
#define PG_BINARY_W "wb"

src/include/port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.59 2004/09/09 00:24:10 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.60 2004/09/09 00:59:41 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -181,7 +181,7 @@ extern int win32_open(const char *, int,...);
181181
#endif
182182

183183
/* Global variable holding time zone information. */
184-
#if !defined(__CYGWIN__)
184+
#ifndef __CYGWIN__
185185
#define TIMEZONE_GLOBAL timezone
186186
#define TZNAME_GLOBAL tzname
187187
#else

src/include/port/win32.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.31 2004/08/31 11:29:56 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.32 2004/09/09 00:59:44 momjian Exp $ */
22

33
/* undefine and redefine after #include */
44
#undef mkdir
@@ -19,7 +19,7 @@
1919
#define USES_WINSOCK
2020

2121
/* defines for dynamic linking on Win32 platform */
22-
#if defined(__CYGWIN__) || defined(__MINGW32__)
22+
#if defined(__MINGW32__) || defined(__CYGWIN__)
2323

2424
#if __GNUC__ && ! defined (__declspec)
2525
#error You need egcs 1.1 or newer for compiling!

src/interfaces/ecpg/include/sqlca.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define POSTGRES_SQLCA_H
33

44
#ifndef DLLIMPORT
5-
#if defined(__CYGWIN__) || defined(WIN32)
5+
#if defined(WIN32) || defined(__CYGWIN__)
66
#define DLLIMPORT __declspec (dllimport)
77
#else
88
#define DLLIMPORT

src/port/dirmod.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.22 2004/08/29 05:07:02 momjian Exp $
13+
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.23 2004/09/09 00:59:49 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -66,14 +66,14 @@ pgrename(const char *from, const char *to)
6666
{
6767
int loops = 0;
6868

69-
#ifdef WIN32
69+
#if defined(WIN32) && !defined(__CYGWIN__)
7070
while (!MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING))
7171
#endif
7272
#ifdef __CYGWIN__
7373
while (rename(from, to) < 0)
7474
#endif
7575
{
76-
#ifdef WIN32
76+
#if defined(WIN32) && !defined(__CYGWIN__)
7777
if (GetLastError() != ERROR_ACCESS_DENIED)
7878
#endif
7979
#ifdef __CYGWIN__

0 commit comments

Comments
 (0)