w32: Get IOSPAWN flag back in sync with spawn helper.
* src/gpgme-w32spawn.c: Include priv-io.h.
This commit is contained in:
parent
efaf42205c
commit
68116fa5f6
@ -36,10 +36,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
/* Flag values as used by gpgme. */
|
#include "priv-io.h"
|
||||||
#define IOSPAWN_FLAG_ALLOW_SET_FG 1
|
|
||||||
|
|
||||||
|
|
||||||
/* Name of this program. */
|
/* Name of this program. */
|
||||||
@ -47,15 +45,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct spawn_fd_item_s
|
|
||||||
{
|
|
||||||
int handle;
|
|
||||||
int dup_to;
|
|
||||||
int peer_name;
|
|
||||||
int arg_loc;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
build_commandline (char **argv)
|
build_commandline (char **argv)
|
||||||
{
|
{
|
||||||
@ -160,7 +149,7 @@ my_spawn (char **argv, struct spawn_fd_item_s *fd_list, unsigned int flags)
|
|||||||
|
|
||||||
fprintf (stderr, PGM": spawning: %s\n", arg_string);
|
fprintf (stderr, PGM": spawning: %s\n", arg_string);
|
||||||
|
|
||||||
for (i = 0; fd_list[i].handle != -1; i++)
|
for (i = 0; fd_list[i].fd != -1; i++)
|
||||||
{
|
{
|
||||||
/* The handle already is inheritable. */
|
/* The handle already is inheritable. */
|
||||||
if (fd_list[i].dup_to == 0)
|
if (fd_list[i].dup_to == 0)
|
||||||
@ -240,8 +229,8 @@ my_spawn (char **argv, struct spawn_fd_item_s *fd_list, unsigned int flags)
|
|||||||
if (hnul != INVALID_HANDLE_VALUE)
|
if (hnul != INVALID_HANDLE_VALUE)
|
||||||
CloseHandle (hnul);
|
CloseHandle (hnul);
|
||||||
|
|
||||||
for (i = 0; fd_list[i].handle != -1; i++)
|
for (i = 0; fd_list[i].fd != -1; i++)
|
||||||
CloseHandle ((HANDLE) fd_list[i].handle);
|
CloseHandle ((HANDLE) fd_list[i].fd);
|
||||||
|
|
||||||
if (flags & IOSPAWN_FLAG_ALLOW_SET_FG)
|
if (flags & IOSPAWN_FLAG_ALLOW_SET_FG)
|
||||||
{
|
{
|
||||||
@ -379,12 +368,12 @@ translate_get_from_file (const char *trans_file,
|
|||||||
break;
|
break;
|
||||||
linep = tail;
|
linep = tail;
|
||||||
|
|
||||||
fd_list[idx].handle = from;
|
fd_list[idx].fd = from;
|
||||||
fd_list[idx].dup_to = dup_to;
|
fd_list[idx].dup_to = dup_to;
|
||||||
fd_list[idx].peer_name = to;
|
fd_list[idx].peer_name = to;
|
||||||
fd_list[idx].arg_loc = loc;
|
fd_list[idx].arg_loc = loc;
|
||||||
}
|
}
|
||||||
fd_list[idx].handle = -1;
|
fd_list[idx].fd = -1;
|
||||||
fd_list[idx].dup_to = -1;
|
fd_list[idx].dup_to = -1;
|
||||||
fd_list[idx].peer_name = -1;
|
fd_list[idx].peer_name = -1;
|
||||||
fd_list[idx].arg_loc = 0;
|
fd_list[idx].arg_loc = 0;
|
||||||
@ -420,7 +409,7 @@ translate_handles (const char *trans_file, const char * const *argv,
|
|||||||
args[idx] = NULL;
|
args[idx] = NULL;
|
||||||
n_args = idx;
|
n_args = idx;
|
||||||
|
|
||||||
for (idx = 0; fd_list[idx].handle != -1; idx++)
|
for (idx = 0; fd_list[idx].fd != -1; idx++)
|
||||||
{
|
{
|
||||||
char buf[25];
|
char buf[25];
|
||||||
int aidx;
|
int aidx;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
# ifdef HAVE_W32CE_SYSTEM
|
# ifdef HAVE_W32CE_SYSTEM
|
||||||
# include "w32-ce.h"
|
# include "w32-ce.h"
|
||||||
# endif
|
# endif
|
||||||
|
# include <winsock2.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#else
|
#else
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user