Bash-4.2 patch 5
This commit is contained in:
parent
aeb26a67db
commit
2bbe80583b
5 changed files with 28 additions and 4 deletions
|
|
@ -465,6 +465,9 @@ printf_builtin (list)
|
||||||
secs = shell_start_time; /* roughly $SECONDS */
|
secs = shell_start_time; /* roughly $SECONDS */
|
||||||
else
|
else
|
||||||
secs = arg;
|
secs = arg;
|
||||||
|
#if defined (HAVE_TZSET)
|
||||||
|
sv_tz ("TZ"); /* XXX -- just make sure */
|
||||||
|
#endif
|
||||||
tm = localtime (&secs);
|
tm = localtime (&secs);
|
||||||
n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
|
n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
|
||||||
free (timefmt);
|
free (timefmt);
|
||||||
|
|
|
||||||
3
parse.y
3
parse.y
|
|
@ -5135,6 +5135,9 @@ decode_prompt_string (string)
|
||||||
case 'A':
|
case 'A':
|
||||||
/* Make the current time/date into a string. */
|
/* Make the current time/date into a string. */
|
||||||
(void) time (&the_time);
|
(void) time (&the_time);
|
||||||
|
#if defined (HAVE_TZSET)
|
||||||
|
sv_tz ("TZ"); /* XXX -- just make sure */
|
||||||
|
#endif
|
||||||
tm = localtime (&the_time);
|
tm = localtime (&the_time);
|
||||||
|
|
||||||
if (c == 'd')
|
if (c == 'd')
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,6 @@
|
||||||
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
||||||
looks for to find the patch level (for the sccs version string). */
|
looks for to find the patch level (for the sccs version string). */
|
||||||
|
|
||||||
#define PATCHLEVEL 4
|
#define PATCHLEVEL 5
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
#endif /* _PATCHLEVEL_H_ */
|
||||||
|
|
|
||||||
21
variables.c
21
variables.c
|
|
@ -3653,6 +3653,22 @@ n_shell_variables ()
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
chkexport (name)
|
||||||
|
char *name;
|
||||||
|
{
|
||||||
|
SHELL_VAR *v;
|
||||||
|
|
||||||
|
v = find_variable (name);
|
||||||
|
if (exported_p (v))
|
||||||
|
{
|
||||||
|
array_needs_making = 1;
|
||||||
|
maybe_make_export_env ();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
maybe_make_export_env ()
|
maybe_make_export_env ()
|
||||||
{
|
{
|
||||||
|
|
@ -4214,7 +4230,7 @@ static struct name_and_function special_vars[] = {
|
||||||
{ "TEXTDOMAIN", sv_locale },
|
{ "TEXTDOMAIN", sv_locale },
|
||||||
{ "TEXTDOMAINDIR", sv_locale },
|
{ "TEXTDOMAINDIR", sv_locale },
|
||||||
|
|
||||||
#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
|
#if defined (HAVE_TZSET)
|
||||||
{ "TZ", sv_tz },
|
{ "TZ", sv_tz },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -4558,11 +4574,12 @@ sv_histtimefmt (name)
|
||||||
}
|
}
|
||||||
#endif /* HISTORY */
|
#endif /* HISTORY */
|
||||||
|
|
||||||
#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
|
#if defined (HAVE_TZSET)
|
||||||
void
|
void
|
||||||
sv_tz (name)
|
sv_tz (name)
|
||||||
char *name;
|
char *name;
|
||||||
{
|
{
|
||||||
|
if (chkexport (name))
|
||||||
tzset ();
|
tzset ();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -313,6 +313,7 @@ extern void set_func_auto_export __P((const char *));
|
||||||
|
|
||||||
extern void sort_variables __P((SHELL_VAR **));
|
extern void sort_variables __P((SHELL_VAR **));
|
||||||
|
|
||||||
|
extern int chkexport __P((char *));
|
||||||
extern void maybe_make_export_env __P((void));
|
extern void maybe_make_export_env __P((void));
|
||||||
extern void update_export_env_inplace __P((char *, int, char *));
|
extern void update_export_env_inplace __P((char *, int, char *));
|
||||||
extern void put_command_name_into_env __P((char *));
|
extern void put_command_name_into_env __P((char *));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue