Commit bd4a449f authored by Geoff Voelker's avatar Geoff Voelker
Browse files

(configuration_buffer): Increase size.

(get_emacs_configuration) [WINDOWS95]: Use appropriate string.
(prepare_standard_handles) [WINDOWS95]: Disable subprocesses.
(reset_standard_handles): Check error number on failure.
parent 5c2f36b2
......@@ -263,12 +263,12 @@ getpwnam (char *name)
user enter it, so we define EMACS_CONFIGURATION to invoke this runtime
routine. */
static char configuration_buffer[16];
static char configuration_buffer[32];
char *
get_emacs_configuration (void)
char *arch, *oem;
char *arch, *oem, *os;
/* Determine the processor type. */
switch (get_processor_type ())
......@@ -297,7 +297,13 @@ get_emacs_configuration (void)
/* Let oem be "*" until we figure out how to decode the OEM field. */
oem = "*";
sprintf (configuration_buffer, "%s-%s-nt%d.%d", arch, oem,
#ifdef WINDOWS95
os = "win";
os = "nt";
sprintf (configuration_buffer, "%s-%s-%s%d.%d", arch, oem, os,
get_nt_major_version (), get_nt_minor_version ());
return configuration_buffer;
......@@ -422,8 +428,21 @@ void
prepare_standard_handles (int in, int out, int err, HANDLE handles[4])
HANDLE parent, stdin_save, stdout_save, stderr_save, err_handle;
#ifdef WINDOWS95
/* The Win95 beta doesn't set the standard handles correctly.
Handicap subprocesses until we get a version that works correctly.
Undefining the subprocesses macro reveals other incompatibilities,
so, since we're expecting subprocs to work in the near future,
disable them here. */
report_file_error ("Subprocesses currently disabled on Win95", Qnil);
parent = GetCurrentProcess ();
stdin_save = GetStdHandle (STD_INPUT_HANDLE);
stdout_save = GetStdHandle (STD_OUTPUT_HANDLE);
stderr_save = GetStdHandle (STD_ERROR_HANDLE);
if (!DuplicateHandle (parent,
......@@ -492,12 +511,16 @@ reset_standard_handles (int in, int out, int err, HANDLE handles[4])
HANDLE stdout_save = handles[1];
HANDLE stderr_save = handles[2];
HANDLE err_handle = handles[3];
int i;
if (!SetStdHandle (STD_INPUT_HANDLE, stdin_save))
report_file_error ("Resetting input handle", Qnil);
if (!SetStdHandle (STD_OUTPUT_HANDLE, stdout_save))
report_file_error ("Resetting output handle", Qnil);
i = GetLastError ();
report_file_error ("Resetting output handle", Qnil);
if (!SetStdHandle (STD_ERROR_HANDLE, stderr_save))
report_file_error ("Resetting error handle", Qnil);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment