* environ.cc (settings::set_process_state): Delete.

(tty_is_gone): New function.
(known): Change "tty" to call tty_is_gone().  Remove unneeded '&' from
beginning of function address.
(parse_options): Remove set_process_state handling.
* shared_info.h (CURR_USER_MAGIC): Reset.
(user_info::warned_notty): New member.
This commit is contained in:
Christopher Faylor 2011-06-08 19:27:48 +00:00
parent 0791c40b20
commit 022e15dc60
3 changed files with 32 additions and 9 deletions

View File

@ -1,3 +1,13 @@
2011-06-08 Christopher Faylor <me.cygwin2011@cgf.cx>
* environ.cc (settings::set_process_state): Delete.
(tty_is_gone): New function.
(known): Change "tty" to call tty_is_gone(). Remove unneeded '&' from
beginning of function address.
(parse_options): Remove set_process_state handling.
* shared_info.h (CURR_USER_MAGIC): Reset.
(user_info::warned_notty): New member.
2011-06-07 Christopher Faylor <me.cygwin2011@cgf.cx>
* fhandler_console.cc (fhandler_console::open_shared_console):

View File

@ -29,6 +29,7 @@ details. */
#include "registry.h"
#include "environ.h"
#include "child_info.h"
#include "shared_info.h"
#include "ntdll.h"
extern bool dos_file_warning;
@ -529,8 +530,7 @@ enum settings
{
justset,
isfunc,
setbit,
set_process_state,
setbit
};
/* When BUF is:
@ -563,6 +563,19 @@ set_proc_retry (const char *buf)
child_info::retry_count = strtoul (buf, NULL, 0);
}
static void
tty_is_gone (const char *buf)
{
if (!user_shared->warned_notty)
{
small_printf ("\"tty\" option detected in CYGWIN environment variable.\n"
"CYGWIN=tty is no longer supported. Please remove it from your\n"
"CYGWIN environment variable and use a terminal emulator like mintty,"
"xterm, or rxvt\n");
user_shared->warned_notty = 1;
}
}
/* The structure below is used to set up an array which is used to
parse the CYGWIN environment variable or, if enabled, options from
the registry. */
@ -588,14 +601,14 @@ static struct parse_thing
{
{"dosfilewarning", {&dos_file_warning}, justset, NULL, {{false}, {true}}},
{"envcache", {&envcache}, justset, NULL, {{true}, {false}}},
{"error_start", {func: &error_start_init}, isfunc, NULL, {{0}, {0}}},
{"error_start", {func: error_start_init}, isfunc, NULL, {{0}, {0}}},
{"export", {&export_settings}, justset, NULL, {{false}, {true}}},
{"glob", {func: &glob_init}, isfunc, NULL, {{0}, {s: "normal"}}},
{"glob", {func: glob_init}, isfunc, NULL, {{0}, {s: "normal"}}},
{"proc_retry", {func: set_proc_retry}, isfunc, NULL, {{0}, {5}}},
{"reset_com", {&reset_com}, justset, NULL, {{false}, {true}}},
{"strip_title", {&strip_title_path}, justset, NULL, {{false}, {true}}},
{"title", {&display_title}, justset, NULL, {{false}, {true}}},
{"tty", {NULL}, set_process_state, NULL, {{0}, {PID_USETTY}}},
{"tty", {func: tty_is_gone}, isfunc, NULL, {{0}, {0}}},
{"upcaseenv", {&create_upcaseenv}, justset, NULL, {{false}, {true}}},
{"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}},
{NULL, {0}, justset, 0, {{0}, {0}}}
@ -665,9 +678,6 @@ parse_options (char *buf)
*k->setting.x = strtol (eq, NULL, 0);
debug_printf ("%s %d", k->name, *k->setting.x);
break;
case set_process_state:
k->setting.x = &myself->process_state;
/* fall through */
case setbit:
*k->setting.x &= ~k->values[istrue].i;
if (istrue || (eq && strtol (eq, NULL, 0)))

View File

@ -15,6 +15,8 @@ details. */
#include "limits.h"
#include "mount.h"
#define CURR_USER_MAGIC 0x6467403bU
class user_info
{
void initialize ();
@ -22,10 +24,12 @@ public:
LONG version;
DWORD cb;
bool warned_msdos;
bool warned_notty;
mount_info mountinfo;
friend void dll_crt0_1 (void *);
static void create (bool);
};
/******** Shared Info ********/
/* Data accessible to all tasks */
@ -33,7 +37,6 @@ public:
#define CURR_SHARED_MAGIC 0x34e5bfa7U
#define USER_VERSION 1
#define CURR_USER_MAGIC 0x6112afb3U
/* NOTE: Do not make gratuitous changes to the names or organization of the
below class. The layout is checksummed to determine compatibility between