mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-01 01:20:00 +02:00
commit bash-20080717 snapshot
This commit is contained in:
@@ -6712,3 +6712,15 @@ print_cmd.c
|
||||
the here-document body. This preserves syntactic correctness; the
|
||||
old code printed the control operator after the body of the here
|
||||
document. Fixes bug reported by <buport@figpost.com>
|
||||
|
||||
7/16
|
||||
----
|
||||
locale.c
|
||||
- in set_locale_var, print a warning message if setlocale() fails any
|
||||
time it's called -- required some code restructuring
|
||||
|
||||
7/19
|
||||
----
|
||||
support/shobj-conf
|
||||
- support for mingw32, contributed by Carlo Bramix
|
||||
<carlo.bramix@libero.it>
|
||||
|
||||
@@ -6693,3 +6693,28 @@ shell.c
|
||||
for `eterm', since bash sends $PWD to eterm with control sequences
|
||||
that confuse other programs. Problem reported by Micah Cowan
|
||||
<micah@cowan.name>
|
||||
|
||||
|
||||
7/12
|
||||
----
|
||||
print_cmd.c
|
||||
- break code that prints here-documents into two functions:
|
||||
print_heredoc_header, which prints the operator and delimiter, and
|
||||
print_heredoc_body, which prints the body text and closing delimiter
|
||||
- change print_redirection to call print_heredoc_{header,body}
|
||||
- sentinel variable, printing_connection, used when printing a command
|
||||
of type `connection' (|, &&, ||, etc.)
|
||||
- change print_redirection_list to save any here documents it finds
|
||||
while printing a connection and save them in `deferred_heredocs'
|
||||
- new function, print_deferred_heredocs, called from print_redirection
|
||||
in the cm_connection case, calls print_heredoc_header for all the
|
||||
here documents, then prints the operator (|, &&, ||, etc.), then
|
||||
the here-document body. This preserves syntactic correctness; the
|
||||
old code printed the control operator after the body of the here
|
||||
document. Fixes bug reported by <buport@figpost.com>
|
||||
|
||||
7/16
|
||||
----
|
||||
locale.c
|
||||
- in set_locale_var, print a warning message if setlocale() fails any
|
||||
time it's called -- required some code restructuring
|
||||
|
||||
@@ -389,6 +389,7 @@ lib/sh/fpurge.c f
|
||||
lib/sh/getcwd.c f
|
||||
lib/sh/getenv.c f
|
||||
lib/sh/inet_aton.c f
|
||||
lib/sh/input_avail.c f
|
||||
lib/sh/itos.c f
|
||||
lib/sh/mailstat.c f
|
||||
lib/sh/makepath.c f
|
||||
|
||||
+2
-1
@@ -213,7 +213,8 @@ SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \
|
||||
${SH_LIBSRC}/zmapfd.c ${SH_LIBSRC}/fpurge.c \
|
||||
${SH_LIBSRC}/zgetline.c ${SH_LIBSRC}/mbscmp.c \
|
||||
${SH_LIBSRC}/casemod.c ${SH_LIBSRC}/uconvert.c \
|
||||
${SH_LIBSRC}/ufuncs.c ${SH_LIBSRC}/fdprintf.c
|
||||
${SH_LIBSRC}/ufuncs.c ${SH_LIBSRC}/fdprintf.c \
|
||||
${SH_LIBSRC}/input_avail.c
|
||||
|
||||
SHLIB_LIB = -lsh
|
||||
SHLIB_LIBNAME = libsh.a
|
||||
|
||||
+1624
-5671
File diff suppressed because it is too large
Load Diff
+20
-88
@@ -18,114 +18,46 @@
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AM_PROG_CXX_C_O' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_SUBST_TRACE' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_PROG_CXX_C_O' => 1,
|
||||
'AM_ENABLE_MULTILIB' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
'AC_SUBST_TRACE' => 1
|
||||
}
|
||||
], 'Autom4te::Request' )
|
||||
);
|
||||
|
||||
+476
-592
File diff suppressed because it is too large
Load Diff
@@ -3843,6 +3843,8 @@ maybe_give_terminal_to (opgrp, npgrp, flags)
|
||||
int tpgrp;
|
||||
|
||||
tpgrp = tcgetpgrp (shell_tty);
|
||||
if (tpgrp < 0 && errno == ENOTTY)
|
||||
return -1;
|
||||
if (tpgrp == npgrp)
|
||||
{
|
||||
terminal_pgrp = npgrp;
|
||||
@@ -3851,7 +3853,7 @@ maybe_give_terminal_to (opgrp, npgrp, flags)
|
||||
else if (tpgrp != opgrp)
|
||||
{
|
||||
#if defined (DEBUG)
|
||||
internal_warning ("maybe_give_terminal_to: terminal pgrp == %d shell pgrp = %d", tpgrp, opgrp);
|
||||
internal_warning ("maybe_give_terminal_to: terminal pgrp == %d shell pgrp = %d new pgrp = %d", tpgrp, opgrp, npgrp);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
+15
-2
@@ -92,7 +92,7 @@ CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \
|
||||
strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c strstr.c \
|
||||
mktime.c strftime.c xstrchr.c zcatfd.c zmapfd.c winsize.c eaccess.c \
|
||||
wcsdup.c fpurge.c zgetline.c mbscmp.c uconvert.c ufuncs.c \
|
||||
casemod.c fdprintf.c
|
||||
casemod.c fdprintf.c input_avail.c
|
||||
|
||||
# The header files for this library.
|
||||
HSOURCES =
|
||||
@@ -105,7 +105,8 @@ OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.o \
|
||||
pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \
|
||||
strtrans.o strindex.o snprintf.o mailstat.o fmtulong.o \
|
||||
fmtullong.o fmtumax.o xstrchr.o zcatfd.o zmapfd.o winsize.o wcsdup.o \
|
||||
fpurge.o zgetline.o mbscmp.o uconvert.o ufuncs.o casemod.o ${LIBOBJS}
|
||||
fpurge.o zgetline.o mbscmp.o uconvert.o ufuncs.o casemod.o \
|
||||
fdprintf.o input_avail.o ${LIBOBJS}
|
||||
|
||||
SUPPORT = Makefile
|
||||
|
||||
@@ -141,6 +142,7 @@ casemod.o: casemod.c
|
||||
clktck.o: clktck.c
|
||||
clock.o: clock.c
|
||||
eaccess.o: eaccess.c
|
||||
fdprintf.o: fdprintf.c
|
||||
fmtullong.o: fmtullong.c
|
||||
fmtulong.o: fmtulong.c
|
||||
fmtumax.o: fmtumax.c
|
||||
@@ -148,6 +150,7 @@ fpurge.o: fpurge.c
|
||||
getcwd.o: getcwd.c
|
||||
getenv.o: getenv.c
|
||||
inet_aton.o: inet_aton.c
|
||||
input_avail.o: input_avail.c
|
||||
itos.o: itos.c
|
||||
mailstat.o: mailstat.c
|
||||
makepath.o: makepath.c
|
||||
@@ -207,6 +210,7 @@ casemod.o: ${BUILD_DIR}/config.h
|
||||
clktck.o: ${BUILD_DIR}/config.h
|
||||
clock.o: ${BUILD_DIR}/config.h
|
||||
eaccess.o: ${BUILD_DIR}/config.h
|
||||
fdprintf.o: ${BUILD_DIR}/config.h
|
||||
fmtullong.o: ${BUILD_DIR}/config.h
|
||||
fmtulong.o: ${BUILD_DIR}/config.h
|
||||
fmtumax.o: ${BUILD_DIR}/config.h
|
||||
@@ -214,6 +218,7 @@ fpurge.o: ${BUILD_DIR}/config.h
|
||||
getcwd.o: ${BUILD_DIR}/config.h
|
||||
getenv.o: ${BUILD_DIR}/config.h
|
||||
inet_aton.o: ${BUILD_DIR}/config.h
|
||||
input_avail.o: ${BUILD_DIR}/config.h
|
||||
itos.o: ${BUILD_DIR}/config.h
|
||||
mailstat.o: ${BUILD_DIR}/config.h
|
||||
makepath.o: ${BUILD_DIR}/config.h
|
||||
@@ -513,3 +518,11 @@ casemod.o: ${topdir}/xmalloc.h
|
||||
casemod.o: ${topdir}/bashtypes.h
|
||||
casemod.o: ${BASHINCDIR}/shmbutil.h
|
||||
casemod.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
|
||||
|
||||
fdprintf.o: ${BASHINCDIR}/stdc.h
|
||||
|
||||
input_avail.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
|
||||
input_avail.o: ${BASHINCDIR}/stdc.h
|
||||
input_avail.o: ${topdir}/xmalloc.h
|
||||
|
||||
|
||||
|
||||
+3
-1
@@ -45,9 +45,11 @@ fdprintf(fd, format, va_alist)
|
||||
#endif
|
||||
{
|
||||
FILE *fp;
|
||||
int rc, r2;
|
||||
int fd2, rc, r2;
|
||||
va_list args;
|
||||
|
||||
if ((fd2 = dup(fd)) < 0)
|
||||
return -1;
|
||||
fp = fdopen (dup (fd), "w");
|
||||
if (fp == 0)
|
||||
return -1;
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/* input_avail.c -- check whether or not data is available for reading on a
|
||||
specified file descriptor. */
|
||||
|
||||
/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2, or (at your option) any later
|
||||
version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with Bash; see the file COPYING. If not, write to the Free Software
|
||||
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
|
||||
#if defined (__TANDEM)
|
||||
# include <floss.h>
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#if defined (HAVE_SYS_FILE_H)
|
||||
# include <sys/file.h>
|
||||
#endif /* HAVE_SYS_FILE_H */
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
|
||||
#include "bashansi.h"
|
||||
|
||||
#if defined (HAVE_SELECT)
|
||||
# if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX)
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
#endif /* HAVE_SELECT */
|
||||
#if defined (HAVE_SYS_SELECT_H)
|
||||
# include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#if defined (FIONREAD_IN_SYS_IOCTL)
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if !defined (errno)
|
||||
extern int errno;
|
||||
#endif /* !errno */
|
||||
|
||||
#if !defined (O_NDELAY) && defined (O_NONBLOCK)
|
||||
# define O_NDELAY O_NONBLOCK /* Posix style */
|
||||
#endif
|
||||
|
||||
/* Return >= 1 if select/FIONREAD indicates data available for reading on
|
||||
file descriptor FD; 0 if no data available. Return -1 on error. */
|
||||
int
|
||||
input_avail (fd)
|
||||
int fd;
|
||||
{
|
||||
int result, chars_avail;
|
||||
#if defined(HAVE_SELECT)
|
||||
fd_set readfds, exceptfds;
|
||||
struct timeval timeout;
|
||||
#endif
|
||||
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
|
||||
chars_avail = 0;
|
||||
|
||||
#if defined (HAVE_SELECT)
|
||||
FD_ZERO (&readfds);
|
||||
FD_ZERO (&exceptfds);
|
||||
FD_SET (fd, &readfds);
|
||||
FD_SET (fd, &exceptfds);
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = 0;
|
||||
result = select (fd + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout);
|
||||
return ((result <= 0) ? 0 : 1);
|
||||
|
||||
#endif
|
||||
|
||||
result = -1;
|
||||
#if defined (FIONREAD)
|
||||
errno = 0;
|
||||
result = ioctl (fd, FIONREAD, &chars_avail);
|
||||
if (result == -1 && errno == EIO)
|
||||
return -1;
|
||||
return (chars_avail);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -30,10 +30,15 @@
|
||||
#include "bashansi.h"
|
||||
#include <stdio.h>
|
||||
#include "chartypes.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include "shell.h"
|
||||
#include "input.h" /* For bash_input */
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
extern int dump_translatable_strings, dump_po_strings;
|
||||
|
||||
/* The current locale when the program begins */
|
||||
@@ -144,7 +149,10 @@ set_locale_var (var, value)
|
||||
char *var, *value;
|
||||
{
|
||||
int r;
|
||||
char *x;
|
||||
|
||||
x = "";
|
||||
errno = 0;
|
||||
if (var[0] == 'T' && var[10] == 0) /* TEXTDOMAIN */
|
||||
{
|
||||
FREE (default_domain);
|
||||
@@ -177,7 +185,9 @@ set_locale_var (var, value)
|
||||
lc_all[0] = '\0';
|
||||
}
|
||||
#if defined (HAVE_SETLOCALE)
|
||||
r = *lc_all ? (setlocale (LC_ALL, lc_all) != 0) : reset_locale_vars ();
|
||||
r = *lc_all ? ((x = setlocale (LC_ALL, lc_all)) != 0) : reset_locale_vars ();
|
||||
if (x == 0)
|
||||
internal_warning("setlocale: LC_ALL: cannot change locale (%s): %s", lc_all, strerror(errno));
|
||||
locale_setblanks ();
|
||||
return r;
|
||||
#else
|
||||
@@ -191,9 +201,8 @@ set_locale_var (var, value)
|
||||
# if defined (LC_CTYPE)
|
||||
if (lc_all == 0 || *lc_all == '\0')
|
||||
{
|
||||
r = (setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE")) != 0);
|
||||
x = setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE"));
|
||||
locale_setblanks ();
|
||||
return r;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
@@ -201,34 +210,36 @@ set_locale_var (var, value)
|
||||
{
|
||||
# if defined (LC_COLLATE)
|
||||
if (lc_all == 0 || *lc_all == '\0')
|
||||
return (setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE")) != 0);
|
||||
x = setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE"));
|
||||
# endif /* LC_COLLATE */
|
||||
}
|
||||
else if (var[3] == 'M' && var[4] == 'E') /* LC_MESSAGES */
|
||||
{
|
||||
# if defined (LC_MESSAGES)
|
||||
if (lc_all == 0 || *lc_all == '\0')
|
||||
return (setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES")) != 0);
|
||||
x = setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES"));
|
||||
# endif /* LC_MESSAGES */
|
||||
}
|
||||
else if (var[3] == 'N' && var[4] == 'U') /* LC_NUMERIC */
|
||||
{
|
||||
# if defined (LC_NUMERIC)
|
||||
if (lc_all == 0 || *lc_all == '\0')
|
||||
return (setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")) != 0);
|
||||
x = setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC"));
|
||||
# endif /* LC_NUMERIC */
|
||||
}
|
||||
else if (var[3] == 'T' && var[4] == 'I') /* LC_TIME */
|
||||
{
|
||||
# if defined (LC_TIME)
|
||||
if (lc_all == 0 || *lc_all == '\0')
|
||||
return (setlocale (LC_TIME, get_locale_var ("LC_TIME")) != 0);
|
||||
x = setlocale (LC_TIME, get_locale_var ("LC_TIME"));
|
||||
# endif /* LC_TIME */
|
||||
}
|
||||
#endif /* HAVE_SETLOCALE */
|
||||
|
||||
if (x == 0)
|
||||
internal_warning("setlocale: %s: cannot change locale (%s): %s", var, get_locale_var (var), strerror(errno));
|
||||
|
||||
return (0);
|
||||
return (x != 0);
|
||||
}
|
||||
|
||||
/* Called when LANG is assigned a value. Tracks value in `lang'. Calls
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "flags.h"
|
||||
|
||||
#include "shmbutil.h"
|
||||
#include "bashintl.h"
|
||||
|
||||
#include <glob/strmatch.h>
|
||||
|
||||
|
||||
+4
-1
@@ -34,6 +34,7 @@
|
||||
#include "flags.h"
|
||||
|
||||
#include "shmbutil.h"
|
||||
#include "bashintl.h"
|
||||
|
||||
#include <glob/strmatch.h>
|
||||
|
||||
@@ -229,7 +230,7 @@ quote_globbing_chars (string)
|
||||
temp = (char *)xmalloc (slen * 2 + 1);
|
||||
for (t = temp, s = string; *s; )
|
||||
{
|
||||
if (glob_char_p (*s))
|
||||
if (glob_char_p (s))
|
||||
*t++ = '\\';
|
||||
|
||||
/* Copy a single (possibly multibyte) character from s to t,
|
||||
@@ -301,6 +302,8 @@ shell_glob_filename (pathname)
|
||||
results = glob_filename (temp, glob_star ? GX_GLOBSTAR : 0);
|
||||
free (temp);
|
||||
|
||||
itrace("shell_glob_filename: LC_COLLATE = %s", setlocale(LC_COLLATE, (char *)NULL));
|
||||
|
||||
if (results && ((GLOB_FAILED (results)) == 0))
|
||||
{
|
||||
if (should_ignore_glob_matches ())
|
||||
|
||||
+28
-11
@@ -491,20 +491,37 @@ msdos*)
|
||||
|
||||
cygwin*)
|
||||
SHOBJ_LD='$(CC)'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
|
||||
SHLIB_LIBPREF='cyg'
|
||||
SHLIB_LIBSUFF='dll'
|
||||
SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBS='$(TERMCAP_LIB)'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
|
||||
SHLIB_LIBPREF='cyg'
|
||||
SHLIB_LIBSUFF='dll'
|
||||
SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBS='$(TERMCAP_LIB)'
|
||||
|
||||
SHLIB_DOT=
|
||||
# For official cygwin releases, DLLVERSION will be defined in the
|
||||
# environment of configure, and will be incremented any time the API
|
||||
# changes in a non-backwards compatible manner. Otherwise, it is just
|
||||
# SHLIB_MAJOR.
|
||||
if [ -n "$DLLVERSION" ] ; then
|
||||
# For official cygwin releases, DLLVERSION will be defined in the
|
||||
# environment of configure, and will be incremented any time the API
|
||||
# changes in a non-backwards compatible manner. Otherwise, it is just
|
||||
# SHLIB_MAJOR.
|
||||
if [ -n "$DLLVERSION" ] ; then
|
||||
SHLIB_DLLVERSION="$DLLVERSION"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
mingw*)
|
||||
SHOBJ_LD='$(CC)'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
|
||||
SHLIB_LIBSUFF='dll'
|
||||
SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBS='$(TERMCAP_LIB)'
|
||||
|
||||
SHLIB_DOT=
|
||||
# For official cygwin releases, DLLVERSION will be defined in the
|
||||
# environment of configure, and will be incremented any time the API
|
||||
# changes in a non-backwards compatible manner. Otherwise, it is just
|
||||
# SHLIB_MAJOR.
|
||||
if [ -n "$DLLVERSION" ] ; then
|
||||
SHLIB_DLLVERSION="$DLLVERSION"
|
||||
fi
|
||||
;;
|
||||
|
||||
#
|
||||
|
||||
+3
-1
@@ -80,15 +80,17 @@ sunos4*)
|
||||
;;
|
||||
|
||||
sunos5*-*gcc*|solaris2*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
ld_used=`gcc -print-prog-name=ld`
|
||||
if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then
|
||||
# This line works for the GNU ld
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
|
||||
# http://sourceware.org/ml/binutils/2001-08/msg00361.html
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
else
|
||||
# This line works for the Solaris linker in /usr/ccs/bin/ld
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
fi
|
||||
|
||||
# SHLIB_XLDFLAGS='-R $(libdir)'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
||||
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||
THIS_SH=$BUILD_DIR/bash
|
||||
PATH=$PATH:$BUILD_DIR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user