Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0476bbb

Browse files
committed
Several Cygwin fixes pointed out by Reini Urban.
1 parentf94aea9 commit0476bbb

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

‎src/backend/utils/mmgr/mcxt.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.47 2004/08/08 06:44:32 momjian Exp $
17+
* $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.48 2004/08/29 02:58:50 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -631,7 +631,7 @@ MemoryContextStrdup(MemoryContext context, const char *string)
631631
}
632632

633633

634-
#ifdefWIN32
634+
#if defined(WIN32)|| defined(__CYGWIN__)
635635
/*
636636
*Memory support routines for libpgport on Win32
637637
*
@@ -649,6 +649,7 @@ pgport_palloc(Size sz)
649649
returnpalloc(sz);
650650
}
651651

652+
652653
char*
653654
pgport_pstrdup(constchar*str)
654655
{

‎src/port/dirmod.c

Lines changed: 12 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.19 2004/08/2901:44:02 momjian Exp $
13+
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.20 2004/08/2902:58:50 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -31,18 +31,27 @@
3131

3232
#if defined(WIN32)|| defined(__CYGWIN__)
3333

34-
3534
#include"miscadmin.h"
36-
#include<winioctl.h>
3735

3836
#undef rename
3937
#undef unlink
4038

39+
#ifdef__WIN32__
40+
#include<winioctl.h>
41+
#else
42+
/* __CYGWIN__ */
43+
#include<windows.h>
44+
#include<w32api/winioctl.h>
45+
#endif
46+
4147
#ifndefFRONTEND
4248
/*
4349
*Call non-macro versions of palloc, can't reference CurrentMemoryContext
4450
*because of DLLIMPORT.
4551
*/
52+
#undef palloc
53+
#undef pstrdup
54+
#undef pfree
4655
#definepalloc(sz)pgport_palloc(sz)
4756
#definepstrdup(str)pgport_pstrdup(str)
4857
#definepfree(pointer)pgport_pfree(pointer)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp