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

Commit6d8c3d4

Browse files
committed
Add popen/pclose -> _popen/_pclose() mapping for Win32.
1 parent5bd06b2 commit6d8c3d4

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

‎src/bin/psql/common.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.50 2002/10/24 01:33:50 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.51 2002/10/29 19:35:33 momjian Exp $
77
*/
88
#include"postgres_fe.h"
9-
109
#include"common.h"
1110

1211
#include<errno.h>
@@ -27,9 +26,6 @@
2726

2827
#ifndefWIN32
2928
#include<sys/ioctl.h>/* for ioctl() */
30-
#else
31-
#definepopen(x,y) _popen(x,y)
32-
#definepclose(x) _pclose(x)
3329
#endif
3430

3531
#ifdefHAVE_TERMIOS_H

‎src/bin/psql/common.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.20 2002/10/23 19:23:56 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.21 2002/10/29 19:35:33 momjian Exp $
77
*/
88
#ifndefCOMMON_H
99
#defineCOMMON_H
@@ -42,4 +42,10 @@ extern FILE *PageOutput(int lines, bool pager);
4242
/* sprompt.h */
4343
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
4444

45+
/* Used for all Win32 popen/pclose calls */
46+
#ifdefWIN32
47+
#definepopen(x,y) _popen(x,y)
48+
#definepclose(x) _pclose(x)
49+
#endif
50+
4551
#endif/* COMMON_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp