/* Process support for GNU Emacs on the Microsoft Windows API.
-Copyright (C) 1992, 1995, 1999-2015 Free Software Foundation, Inc.
+Copyright (C) 1992, 1995, 1999-2016 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
#undef kill
#include <windows.h>
-#if defined(__GNUC__) && !defined(__MINGW64__)
-/* This definition is missing from mingw.org headers, but not MinGW64
- headers. */
-extern BOOL WINAPI IsValidLocale (LCID, DWORD);
-#endif
#ifdef HAVE_LANGINFO_CODESET
#include <nl_types.h>
+ ((DWORD_PTR)(var) - (section)->VirtualAddress) \
+ (filedata).file_base))
+extern BOOL g_b_init_compare_string_w;
+int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
+ struct timespec *, void *);
+
/* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */
static signal_handler sig_handlers[NSIG];
are not expanded if we run the program directly without a shell.
Some extra whitespace characters need quoting in Cygwin/MSYS programs,
so this list is conditionally modified below. */
- char *sepchars = " \t*?";
+ const char *sepchars = " \t*?";
/* This is for native w32 apps; modified below for Cygwin/MSUS apps. */
char escape_char = '\\';
char cmdname_a[MAX_PATH];
return pid;
}
-/* Emulate the select call
+/* Emulate the select call.
Wait for available input on any of the given rfds, or timeout if
- a timeout is given and no input is detected
- wfds and efds are not supported and must be NULL.
+ a timeout is given and no input is detected. wfds are supported
+ only for asynchronous 'connect' calls. efds are not supported
+ and must be NULL.
For simplicity, we detect the death of child processes here and
synchronously call the SIGCHLD handler. Since it is possible for
/* From w32.c */
extern HANDLE winsock_lib;
extern BOOL term_winsock (void);
-extern BOOL init_winsock (int load_now);
DEFUN ("w32-has-winsock", Fw32_has_winsock, Sw32_has_winsock, 0, 1, 0,
doc: /* Test for presence of the Windows socket library `winsock'.
LCID lcid = GetThreadLocale ();
wchar_t *string1_w, *string2_w;
int val, needed;
- extern BOOL g_b_init_compare_string_w;
static CompareStringW_Proc pCompareStringW;
DWORD flags = 0;
process temporarily). A value of zero disables waiting entirely. */);
w32_pipe_read_delay = 50;
+ DEFVAR_INT ("w32-pipe-buffer-size", w32_pipe_buffer_size,
+ doc: /* Size of buffer for pipes created to communicate with subprocesses.
+The size is in bytes, and must be non-negative. The default is zero,
+which lets the OS use its default size, usually 4KB (4096 bytes).
+Any negative value means to use the default value of zero. */);
+ w32_pipe_buffer_size = 0;
+
DEFVAR_LISP ("w32-downcase-file-names", Vw32_downcase_file_names,
doc: /* Non-nil means convert all-upper case file names to lower case.
This applies when performing completions and file name expansion.