Skip to content

Commit f509944

Browse files
committed
Fix cast for _open_osfhandle().
Tsutomu Yamada
1 parent 7839d35 commit f509944

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/port/open.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
88
*
9-
* $PostgreSQL: pgsql/src/port/open.c,v 1.28 2009/06/11 14:49:15 momjian Exp $
9+
* $PostgreSQL: pgsql/src/port/open.c,v 1.29 2010/01/02 12:00:08 mha Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -124,7 +124,7 @@ pgwin32_open(const char *fileName, int fileFlags,...)
124124
}
125125

126126
/* _open_osfhandle will, on error, set errno accordingly */
127-
if ((fd = _open_osfhandle((long) h, fileFlags & O_APPEND)) < 0)
127+
if ((fd = _open_osfhandle((intptr_t) h, fileFlags & O_APPEND)) < 0)
128128
CloseHandle(h); /* will not affect errno */
129129
else if (fileFlags & (O_TEXT | O_BINARY) &&
130130
_setmode(fd, fileFlags & (O_TEXT | O_BINARY)) < 0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy