* 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:
parent
0791c40b20
commit
022e15dc60
|
@ -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>
|
2011-06-07 Christopher Faylor <me.cygwin2011@cgf.cx>
|
||||||
|
|
||||||
* fhandler_console.cc (fhandler_console::open_shared_console):
|
* fhandler_console.cc (fhandler_console::open_shared_console):
|
||||||
|
|
|
@ -29,6 +29,7 @@ details. */
|
||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
#include "environ.h"
|
#include "environ.h"
|
||||||
#include "child_info.h"
|
#include "child_info.h"
|
||||||
|
#include "shared_info.h"
|
||||||
#include "ntdll.h"
|
#include "ntdll.h"
|
||||||
|
|
||||||
extern bool dos_file_warning;
|
extern bool dos_file_warning;
|
||||||
|
@ -529,8 +530,7 @@ enum settings
|
||||||
{
|
{
|
||||||
justset,
|
justset,
|
||||||
isfunc,
|
isfunc,
|
||||||
setbit,
|
setbit
|
||||||
set_process_state,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* When BUF is:
|
/* When BUF is:
|
||||||
|
@ -563,6 +563,19 @@ set_proc_retry (const char *buf)
|
||||||
child_info::retry_count = strtoul (buf, NULL, 0);
|
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
|
/* The structure below is used to set up an array which is used to
|
||||||
parse the CYGWIN environment variable or, if enabled, options from
|
parse the CYGWIN environment variable or, if enabled, options from
|
||||||
the registry. */
|
the registry. */
|
||||||
|
@ -588,14 +601,14 @@ static struct parse_thing
|
||||||
{
|
{
|
||||||
{"dosfilewarning", {&dos_file_warning}, justset, NULL, {{false}, {true}}},
|
{"dosfilewarning", {&dos_file_warning}, justset, NULL, {{false}, {true}}},
|
||||||
{"envcache", {&envcache}, justset, NULL, {{true}, {false}}},
|
{"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}}},
|
{"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}}},
|
{"proc_retry", {func: set_proc_retry}, isfunc, NULL, {{0}, {5}}},
|
||||||
{"reset_com", {&reset_com}, justset, NULL, {{false}, {true}}},
|
{"reset_com", {&reset_com}, justset, NULL, {{false}, {true}}},
|
||||||
{"strip_title", {&strip_title_path}, justset, NULL, {{false}, {true}}},
|
{"strip_title", {&strip_title_path}, justset, NULL, {{false}, {true}}},
|
||||||
{"title", {&display_title}, 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}}},
|
{"upcaseenv", {&create_upcaseenv}, justset, NULL, {{false}, {true}}},
|
||||||
{"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}},
|
{"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}},
|
||||||
{NULL, {0}, justset, 0, {{0}, {0}}}
|
{NULL, {0}, justset, 0, {{0}, {0}}}
|
||||||
|
@ -665,9 +678,6 @@ parse_options (char *buf)
|
||||||
*k->setting.x = strtol (eq, NULL, 0);
|
*k->setting.x = strtol (eq, NULL, 0);
|
||||||
debug_printf ("%s %d", k->name, *k->setting.x);
|
debug_printf ("%s %d", k->name, *k->setting.x);
|
||||||
break;
|
break;
|
||||||
case set_process_state:
|
|
||||||
k->setting.x = &myself->process_state;
|
|
||||||
/* fall through */
|
|
||||||
case setbit:
|
case setbit:
|
||||||
*k->setting.x &= ~k->values[istrue].i;
|
*k->setting.x &= ~k->values[istrue].i;
|
||||||
if (istrue || (eq && strtol (eq, NULL, 0)))
|
if (istrue || (eq && strtol (eq, NULL, 0)))
|
||||||
|
|
|
@ -15,6 +15,8 @@ details. */
|
||||||
#include "limits.h"
|
#include "limits.h"
|
||||||
#include "mount.h"
|
#include "mount.h"
|
||||||
|
|
||||||
|
#define CURR_USER_MAGIC 0x6467403bU
|
||||||
|
|
||||||
class user_info
|
class user_info
|
||||||
{
|
{
|
||||||
void initialize ();
|
void initialize ();
|
||||||
|
@ -22,10 +24,12 @@ public:
|
||||||
LONG version;
|
LONG version;
|
||||||
DWORD cb;
|
DWORD cb;
|
||||||
bool warned_msdos;
|
bool warned_msdos;
|
||||||
|
bool warned_notty;
|
||||||
mount_info mountinfo;
|
mount_info mountinfo;
|
||||||
friend void dll_crt0_1 (void *);
|
friend void dll_crt0_1 (void *);
|
||||||
static void create (bool);
|
static void create (bool);
|
||||||
};
|
};
|
||||||
|
|
||||||
/******** Shared Info ********/
|
/******** Shared Info ********/
|
||||||
/* Data accessible to all tasks */
|
/* Data accessible to all tasks */
|
||||||
|
|
||||||
|
@ -33,7 +37,6 @@ public:
|
||||||
#define CURR_SHARED_MAGIC 0x34e5bfa7U
|
#define CURR_SHARED_MAGIC 0x34e5bfa7U
|
||||||
|
|
||||||
#define USER_VERSION 1
|
#define USER_VERSION 1
|
||||||
#define CURR_USER_MAGIC 0x6112afb3U
|
|
||||||
|
|
||||||
/* NOTE: Do not make gratuitous changes to the names or organization of the
|
/* NOTE: Do not make gratuitous changes to the names or organization of the
|
||||||
below class. The layout is checksummed to determine compatibility between
|
below class. The layout is checksummed to determine compatibility between
|
||||||
|
|
Loading…
Reference in New Issue