* strace.cc (opts): Add leading '+' to force posixly correct

behaviour.
	(main): Revert POSIXLY_CORRECT manipulations.
This commit is contained in:
Corinna Vinschen 2004-02-11 13:30:02 +00:00
parent 49a4f409df
commit 960471b1a6
2 changed files with 7 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2004-02-11 Corinna Vinschen <corinna@vinschen.de>
* strace.cc (opts): Add leading '+' to force posixly correct
behaviour.
(main): Revert POSIXLY_CORRECT manipulations.
2004-02-10 Christopher Faylor <cgf@redhat.com>
* strace.cc (main): Guard against previous setting of POSIXLY_CORRECT.

View File

@ -870,7 +870,7 @@ struct option longopts[] = {
{NULL, 0, NULL, 0}
};
static const char *const opts = "b:dhfm:no:p:S:tTuvw";
static const char *const opts = "+b:dhfm:no:p:S:tTuvw";
static void
print_version ()
@ -903,15 +903,12 @@ main (int argc, char **argv)
pid_t pid = 0;
int opt;
int toggle = 0;
int posixly_correct_set = getenv ("POSIXLY_CORRECT") != NULL;
if (!(pgm = strrchr (*argv, '\\')) && !(pgm = strrchr (*argv, '/')))
pgm = *argv;
else
pgm++;
if (!posixly_correct_set)
(void) putenv("POSIXLY_CORRECT=1");
while ((opt = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
switch (opt)
{
@ -996,8 +993,6 @@ character #%d.\n", optarg, (int) (endptr - optarg), endptr);
if (!ofile)
ofile = stdout;
if (!posixly_correct_set)
putenv ("POSIXLY_CORRECT=");
if (toggle)
dotoggle (pid);
else