mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Add popen/pclose -> _popen/_pclose() mapping for Win32.
This commit is contained in:
parent
5bd06b236f
commit
6d8c3d4eb3
@ -3,10 +3,9 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2000 by PostgreSQL Global Development Group
|
* Copyright 2000 by PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.50 2002/10/24 01:33:50 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.51 2002/10/29 19:35:33 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -27,9 +26,6 @@
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <sys/ioctl.h> /* for ioctl() */
|
#include <sys/ioctl.h> /* for ioctl() */
|
||||||
#else
|
|
||||||
#define popen(x,y) _popen(x,y)
|
|
||||||
#define pclose(x) _pclose(x)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_TERMIOS_H
|
#ifdef HAVE_TERMIOS_H
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2000 by PostgreSQL Global Development Group
|
* Copyright 2000 by PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.20 2002/10/23 19:23:56 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.21 2002/10/29 19:35:33 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef COMMON_H
|
#ifndef COMMON_H
|
||||||
#define COMMON_H
|
#define COMMON_H
|
||||||
@ -42,4 +42,10 @@ extern FILE *PageOutput(int lines, bool pager);
|
|||||||
/* sprompt.h */
|
/* sprompt.h */
|
||||||
extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
|
extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
|
||||||
|
|
||||||
|
/* Used for all Win32 popen/pclose calls */
|
||||||
|
#ifdef WIN32
|
||||||
|
#define popen(x,y) _popen(x,y)
|
||||||
|
#define pclose(x) _pclose(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* COMMON_H */
|
#endif /* COMMON_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user