mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-02 01:40:49 +02:00
commit bash-20110826 snapshot
This commit is contained in:
@@ -12110,3 +12110,21 @@ configure.in
|
||||
builtins/Makefile.in
|
||||
- substitute LIBS_FOR_BUILD from configure, not strictly initialized
|
||||
to $(LIBS)
|
||||
|
||||
8/27
|
||||
----
|
||||
doc/{bash.1,bashref.texi}
|
||||
- minor changes to the here string description to clarify the
|
||||
expansions performed on the word
|
||||
|
||||
support/shobj-conf
|
||||
- handle compilation on Lion (Mac OS X 10.7/darwin11) with changes
|
||||
to darwin stanzas. Fixes readline bug reported by Vincent
|
||||
Sheffer <vince.sheffer@apisphere.com>
|
||||
|
||||
lib/sh/strtrans.c
|
||||
- ansic_wshouldquote: check a string with multi-byte characters for
|
||||
characters that needs to be backslash-octal escaped for $'...'
|
||||
- ansic_shouldquote: if is_basic fails for one character, let
|
||||
ansic_wshouldquote examine the rest of the string and return what
|
||||
it returns. From a patch sent by Roman Rakus <rrakus@redhat.com>
|
||||
|
||||
@@ -12056,3 +12056,68 @@ doc/{bash.1,bashref.texi}
|
||||
lib/sh/zread.c
|
||||
- zsyncfd: change variable holding return value from lseek to
|
||||
off_t. Bug report and fix from Gregory Margo <gmargo@pacbell.net>
|
||||
|
||||
8/1
|
||||
---
|
||||
expr.c
|
||||
- don't check for division by 0 when in a context where no evaluation
|
||||
is taking place. Fixes bug reported by dnade.ext@orange-ftgroup.com
|
||||
|
||||
8/6
|
||||
---
|
||||
execute_cmd.c
|
||||
- execute_command_internal: the parent branch of the subshell code
|
||||
(where the child calls execute_in_subshell) should not close all
|
||||
open FIFOs with unlink_fifo_list if it's part of a shell function
|
||||
that's still executing. Fixes bug reported by Maarten Billemont
|
||||
<lhunath@lyndir.com>
|
||||
|
||||
8/9
|
||||
---
|
||||
builtins/common.c
|
||||
- get_exitstat: return EX_BADUSAGE (2) on a non-numeric argument
|
||||
|
||||
builtins/return.def
|
||||
- return_builtin: just call get_exitstat to get the return status,
|
||||
let it handle proper parsing and handling of arguments. Fixes
|
||||
issue most recently raised by Linda Walsh <bash@tlinx.org>.
|
||||
Reverses change from 9/11/2008 (see above)
|
||||
|
||||
8/16
|
||||
----
|
||||
doc/{bash.1,bashref.texi}
|
||||
- clean up `set -e' language to make it clearer that any failure of
|
||||
a compound command will cause the shell to exit, not just subshells
|
||||
and brace commands
|
||||
|
||||
8/17
|
||||
----
|
||||
configure.in
|
||||
- make the various XXX_FOR_BUILD variables `precious' to autoconf to
|
||||
avoid stale data
|
||||
- change how CC_FOR_BUILD is initialized when cross-compiling and not,
|
||||
but do not change behavior
|
||||
- initialize CFLAGS_FOR_BUILD to -g when cross-compiling
|
||||
- initialize LIBS_FOR_BUILD to $(LIBS) when not cross-compiling, empty
|
||||
when cross-compiling
|
||||
- create AUTO_CFLAGS variable to hold basic CFLAGS defaults; used when
|
||||
CFLAGS not inherited from environment (like effect of old
|
||||
auto_cflags variable)
|
||||
- substitute LIBS_FOR_BUILD into output Makefiles
|
||||
[changes inspired by bug report from Nathan Phillip Brink
|
||||
<ohnobinki@ohnopublishing.net> -- gentoo bug 378941]
|
||||
|
||||
builtins/Makefile.in
|
||||
- substitute LIBS_FOR_BUILD from configure, not strictly initialized
|
||||
to $(LIBS)
|
||||
|
||||
8/27
|
||||
----
|
||||
doc/{bash.1,bashref.texi}
|
||||
- minor changes to the here string description to clarify the
|
||||
expansions performed on the word
|
||||
|
||||
support/shobj-conf
|
||||
- handle compilation on Lion (Mac OS X 10.7/darwin11) with changes
|
||||
to darwin stanzas. Fixes readline bug reported by Vincent
|
||||
Sheffer <vince.sheffer@apisphere.com>
|
||||
|
||||
+19790
-4040
File diff suppressed because it is too large
Load Diff
+18
-18
@@ -15,55 +15,55 @@
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AM_PATH_GUILE' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AM_PATH_GUILE' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AM_NLS' => 1,
|
||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
||||
'AM_MAKEFILE_INCLUDE' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_MAKEFILE_INCLUDE' => 1,
|
||||
'AM_PROG_CXX_C_O' => 1,
|
||||
'_AM_MAKEFILE_INCLUDE' => 1,
|
||||
'_AM_COND_ENDIF' => 1,
|
||||
'_AM_MAKEFILE_INCLUDE' => 1,
|
||||
'AM_ENABLE_MULTILIB' => 1,
|
||||
'AM_SILENT_RULES' => 1,
|
||||
'AM_PROG_MOC' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'AM_PROG_AR' => 1,
|
||||
'include' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AM_PROG_AR' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'sinclude' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AM_XGETTEXT_OPTION' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_XGETTEXT_OPTION' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AM_POT_TOOLS' => 1,
|
||||
|
||||
+2145
-2210
File diff suppressed because it is too large
Load Diff
+12
-9
@@ -3395,9 +3395,10 @@ the redirection refers to the standard output (file descriptor
|
||||
1).
|
||||
.PP
|
||||
The word following the redirection operator in the following
|
||||
descriptions, unless otherwise noted, is subjected to brace expansion,
|
||||
tilde expansion, parameter expansion, command substitution, arithmetic
|
||||
expansion, quote removal, pathname expansion, and word splitting.
|
||||
descriptions, unless otherwise noted, is subjected to
|
||||
brace expansion, tilde expansion, parameter and variable expansion,
|
||||
command substitution, arithmetic expansion, quote removal,
|
||||
pathname expansion, and word splitting.
|
||||
If it expands to more than one word,
|
||||
.B bash
|
||||
reports an error.
|
||||
@@ -3599,8 +3600,8 @@ The format of here-documents is:
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
No parameter expansion, command substitution, arithmetic expansion,
|
||||
or pathname expansion is performed on
|
||||
No parameter and variable expansion, command substitution,
|
||||
arithmetic expansion, or pathname expansion is performed on
|
||||
.IR word .
|
||||
If any characters in
|
||||
.I word
|
||||
@@ -3639,10 +3640,12 @@ A variant of here documents, the format is:
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
The \fIword\fP
|
||||
is expanded as described above, with the exception that
|
||||
pathname expansion is not applied, and supplied as a single string
|
||||
to the command on its standard input.
|
||||
The \fIword\fP undergoes
|
||||
brace expansion, tilde expansion, parameter and variable expansion,
|
||||
command substitution, arithmetic expansion, and quote removal.
|
||||
Pathname expansion word splitting are not performed.
|
||||
The result is supplied as a single string to the command on its
|
||||
standard input.
|
||||
.SS "Duplicating File Descriptors"
|
||||
.PP
|
||||
The redirection operator
|
||||
|
||||
+14
-9
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Sun Jul 24 13:20:45 EDT 2011
|
||||
.\" Last Change: Tue Aug 16 20:43:02 EDT 2011
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2011 July 24" "GNU Bash 4.2"
|
||||
.TH BASH 1 "2011 August 16" "GNU Bash 4.2"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -689,8 +689,9 @@ Expressions are composed of the primaries described below under
|
||||
.SM
|
||||
.BR "CONDITIONAL EXPRESSIONS" .
|
||||
Word splitting and pathname expansion are not performed on the words
|
||||
between the \fB[[\fP and \fB]]\fP; tilde expansion, parameter and
|
||||
variable expansion, arithmetic expansion, command substitution, process
|
||||
between the \fB[[\fP and \fB]]\fP; tilde expansion,
|
||||
parameter and variable expansion,
|
||||
arithmetic expansion, command substitution, process
|
||||
substitution, and quote removal are performed.
|
||||
Conditional operators such as \fB\-f\fP must be unquoted to be recognized
|
||||
as primaries.
|
||||
@@ -8499,13 +8500,14 @@ immediately, rather than before the next primary prompt. This is
|
||||
effective only when job control is enabled.
|
||||
.TP 8
|
||||
.B \-e
|
||||
Exit immediately if a \fIpipeline\fP (which may consist of a single
|
||||
\fIsimple command\fP), a \fIsubshell\fP command enclosed in parentheses,
|
||||
or one of the commands executed as part of a command list enclosed
|
||||
by braces (see
|
||||
Exit immediately if a
|
||||
\fIpipeline\fP (which may consist of a single \fIsimple command\fP),
|
||||
a \fIlist\fP,
|
||||
or a \fIcompound command\fP
|
||||
(see
|
||||
.SM
|
||||
.B SHELL GRAMMAR
|
||||
above) exits with a non-zero status.
|
||||
above), exits with a non-zero status.
|
||||
The shell does not exit if the
|
||||
command that fails is part of the command list immediately following a
|
||||
.B while
|
||||
@@ -8525,6 +8527,9 @@ any command in a pipeline but the last,
|
||||
or if the command's return value is
|
||||
being inverted with
|
||||
.BR ! .
|
||||
If a compound command other than a subshell
|
||||
returns a non-zero status because a command failed
|
||||
while \fB\-e\fP was being ignored, the shell does not exit.
|
||||
A trap on \fBERR\fP, if set, is executed before the shell exits.
|
||||
This option applies to the shell environment and each subshell environment
|
||||
separately (see
|
||||
|
||||
+8
-6
@@ -2380,8 +2380,8 @@ The format of here-documents is:
|
||||
@var{delimiter}
|
||||
@end example
|
||||
|
||||
No parameter expansion, command substitution, arithmetic expansion,
|
||||
or filename expansion is performed on
|
||||
No parameter and variable expansion, command substitution,
|
||||
arithmetic expansion, or filename expansion is performed on
|
||||
@var{word}. If any characters in @var{word} are quoted, the
|
||||
@var{delimiter} is the result of quote removal on @var{word},
|
||||
and the lines in the here-document are not expanded.
|
||||
@@ -2404,10 +2404,12 @@ A variant of here documents, the format is:
|
||||
<<< @var{word}
|
||||
@end example
|
||||
|
||||
The @var{word}
|
||||
is expanded as described above, with the exception that
|
||||
pathname expansion is not applied, and supplied as a single string
|
||||
to the command on its standard input.
|
||||
The @var{word} undergoes
|
||||
brace expansion, tilde expansion, parameter and variable expansion,
|
||||
command substitution, arithmetic expansion, and quote removal.
|
||||
Pathname expansion word splitting are not performed.
|
||||
The result is supplied as a single string to the command on its
|
||||
standard input.
|
||||
|
||||
@subsection Duplicating File Descriptors
|
||||
The redirection operator
|
||||
|
||||
+10
-6
@@ -2968,7 +2968,8 @@ If the @option{-e} option is supplied with @option{-P}
|
||||
and the current working directory cannot be successfully determined
|
||||
after a successful directory change, @code{cd} will return an unsuccessful
|
||||
status.
|
||||
If @var{directory} is @samp{-}, it is equivalent to @env{$OLDPWD}.
|
||||
If @var{directory} is @samp{-}, it is converted to @env{$OLDPWD}
|
||||
before the directory change is attempted.
|
||||
|
||||
If a non-empty directory name from @env{CDPATH} is used, or if
|
||||
@samp{-} is the first argument, and the directory change is
|
||||
@@ -4189,11 +4190,11 @@ Cause the status of terminated background jobs to be reported
|
||||
immediately, rather than before printing the next primary prompt.
|
||||
|
||||
@item -e
|
||||
Exit immediately if a pipeline (@pxref{Pipelines}), which may consist
|
||||
of a single simple command (@pxref{Simple Commands}),
|
||||
a subshell command enclosed in parentheses (@pxref{Command Grouping}),
|
||||
or one of the commands executed as part of a command list enclosed
|
||||
by braces (@pxref{Command Grouping})
|
||||
Exit immediately if
|
||||
a pipeline (@pxref{Pipelines}), which may consist of a single simple command
|
||||
(@pxref{Simple Commands}),
|
||||
a list (@pxref{Lists}),
|
||||
or a compound command (@pxref{Compound Commands})
|
||||
returns a non-zero status.
|
||||
The shell does not exit if the command that fails is part of the
|
||||
command list immediately following a @code{while} or @code{until} keyword,
|
||||
@@ -4202,6 +4203,9 @@ part of any command executed in a @code{&&} or @code{||} list except
|
||||
the command following the final @code{&&} or @code{||},
|
||||
any command in a pipeline but the last,
|
||||
or if the command's return status is being inverted with @code{!}.
|
||||
If a compound command other than a subshell
|
||||
returns a non-zero status because a command failed
|
||||
while @option{-e} was being ignored, the shell does not exit.
|
||||
A trap on @code{ERR}, if set, is executed before the shell exits.
|
||||
|
||||
This option applies to the shell environment and each subshell environment
|
||||
|
||||
+51
-7
@@ -1,6 +1,6 @@
|
||||
/* strtrans.c - Translate and untranslate strings with ANSI-C escape sequences. */
|
||||
|
||||
/* Copyright (C) 2000-2010 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
#include "shell.h"
|
||||
|
||||
#include "shmbchar.h"
|
||||
#include "shmbutil.h"
|
||||
|
||||
#ifdef ESC
|
||||
#undef ESC
|
||||
#endif
|
||||
@@ -74,7 +77,7 @@ ansicstr (string, len, flags, sawc, rlen)
|
||||
case 'a': c = '\a'; break;
|
||||
case 'v': c = '\v'; break;
|
||||
#else
|
||||
case 'a': c = '\007'; break;
|
||||
case 'a': c = (int) 0x07; break;
|
||||
case 'v': c = (int) 0x0B; break;
|
||||
#endif
|
||||
case 'b': c = '\b'; break;
|
||||
@@ -206,8 +209,10 @@ ansic_quote (str, flags, rlen)
|
||||
int flags, *rlen;
|
||||
{
|
||||
char *r, *ret, *s;
|
||||
int l, rsize;
|
||||
int l, rsize, sindex;
|
||||
unsigned char c;
|
||||
size_t slen;
|
||||
DECLARE_MBSTATE;
|
||||
|
||||
if (str == 0 || *str == 0)
|
||||
return ((char *)0);
|
||||
@@ -219,9 +224,11 @@ ansic_quote (str, flags, rlen)
|
||||
*r++ = '$';
|
||||
*r++ = '\'';
|
||||
|
||||
for (s = str, l = 0; *s; s++)
|
||||
s = str;
|
||||
slen = strlen (str);
|
||||
|
||||
for (s = str; c = *s; s++)
|
||||
{
|
||||
c = *s;
|
||||
l = 1; /* 1 == add backslash; 0 == no backslash */
|
||||
switch (c)
|
||||
{
|
||||
@@ -266,6 +273,37 @@ ansic_quote (str, flags, rlen)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
int
|
||||
ansic_wshouldquote (string)
|
||||
const char *string;
|
||||
{
|
||||
const wchar_t *wcs;
|
||||
wchar_t wcc;
|
||||
|
||||
wchar_t *wcstr = NULL;
|
||||
size_t wclen, slen;
|
||||
|
||||
|
||||
slen = mbstowcs (wcstr, string, 0);
|
||||
|
||||
if (slen == -1)
|
||||
slen = 0;
|
||||
wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (slen + 1));
|
||||
mbstowcs (wcstr, string, slen + 1);
|
||||
|
||||
for (wcs = wcstr; wcc = *wcs; wcs++)
|
||||
if (iswprint(wcc) == 0)
|
||||
{
|
||||
free (wcstr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
free (wcstr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* return 1 if we need to quote with $'...' because of non-printing chars. */
|
||||
int
|
||||
ansic_shouldquote (string)
|
||||
@@ -278,8 +316,14 @@ ansic_shouldquote (string)
|
||||
return 0;
|
||||
|
||||
for (s = string; c = *s; s++)
|
||||
if (ISPRINT (c) == 0)
|
||||
return 1;
|
||||
{
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
if (is_basic (c) == 0)
|
||||
return (ansic_wshouldquote (s));
|
||||
#endif
|
||||
if (ISPRINT (c) == 0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,358 @@
|
||||
/* strtrans.c - Translate and untranslate strings with ANSI-C escape sequences. */
|
||||
|
||||
/* Copyright (C) 2000-2011 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <bashansi.h>
|
||||
#include <stdio.h>
|
||||
#include <chartypes.h>
|
||||
|
||||
#include "shell.h"
|
||||
|
||||
#include "shmbchar.h"
|
||||
#include "shmbutil.h"
|
||||
|
||||
#ifdef ESC
|
||||
#undef ESC
|
||||
#endif
|
||||
#define ESC '\033' /* ASCII */
|
||||
|
||||
/* Convert STRING by expanding the escape sequences specified by the
|
||||
ANSI C standard. If SAWC is non-null, recognize `\c' and use that
|
||||
as a string terminator. If we see \c, set *SAWC to 1 before
|
||||
returning. LEN is the length of STRING. If (FLAGS&1) is non-zero,
|
||||
that we're translating a string for `echo -e', and therefore should not
|
||||
treat a single quote as a character that may be escaped with a backslash.
|
||||
If (FLAGS&2) is non-zero, we're expanding for the parser and want to
|
||||
quote CTLESC and CTLNUL with CTLESC. If (flags&4) is non-zero, we want
|
||||
to remove the backslash before any unrecognized escape sequence. */
|
||||
char *
|
||||
ansicstr (string, len, flags, sawc, rlen)
|
||||
char *string;
|
||||
int len, flags, *sawc, *rlen;
|
||||
{
|
||||
int c, temp;
|
||||
char *ret, *r, *s;
|
||||
unsigned long v;
|
||||
|
||||
if (string == 0 || *string == '\0')
|
||||
return ((char *)NULL);
|
||||
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
ret = (char *)xmalloc (4*len + 1);
|
||||
#else
|
||||
ret = (char *)xmalloc (2*len + 1); /* 2*len for possible CTLESC */
|
||||
#endif
|
||||
for (r = ret, s = string; s && *s; )
|
||||
{
|
||||
c = *s++;
|
||||
if (c != '\\' || *s == '\0')
|
||||
*r++ = c;
|
||||
else
|
||||
{
|
||||
switch (c = *s++)
|
||||
{
|
||||
#if defined (__STDC__)
|
||||
case 'a': c = '\a'; break;
|
||||
case 'v': c = '\v'; break;
|
||||
#else
|
||||
case 'a': c = (int) 0x07; break;
|
||||
case 'v': c = (int) 0x0B; break;
|
||||
#endif
|
||||
case 'b': c = '\b'; break;
|
||||
case 'e': case 'E': /* ESC -- non-ANSI */
|
||||
c = ESC; break;
|
||||
case 'f': c = '\f'; break;
|
||||
case 'n': c = '\n'; break;
|
||||
case 'r': c = '\r'; break;
|
||||
case 't': c = '\t'; break;
|
||||
case '1': case '2': case '3':
|
||||
case '4': case '5': case '6':
|
||||
case '7':
|
||||
#if 1
|
||||
if (flags & 1)
|
||||
{
|
||||
*r++ = '\\';
|
||||
break;
|
||||
}
|
||||
/*FALLTHROUGH*/
|
||||
#endif
|
||||
case '0':
|
||||
/* If (FLAGS & 1), we're translating a string for echo -e (or
|
||||
the equivalent xpg_echo option), so we obey the SUSv3/
|
||||
POSIX-2001 requirement and accept 0-3 octal digits after
|
||||
a leading `0'. */
|
||||
temp = 2 + ((flags & 1) && (c == '0'));
|
||||
for (c -= '0'; ISOCTAL (*s) && temp--; s++)
|
||||
c = (c * 8) + OCTVALUE (*s);
|
||||
c &= 0xFF;
|
||||
break;
|
||||
case 'x': /* Hex digit -- non-ANSI */
|
||||
if ((flags & 2) && *s == '{')
|
||||
{
|
||||
flags |= 16; /* internal flag value */
|
||||
s++;
|
||||
}
|
||||
/* Consume at least two hex characters */
|
||||
for (temp = 2, c = 0; ISXDIGIT ((unsigned char)*s) && temp--; s++)
|
||||
c = (c * 16) + HEXVALUE (*s);
|
||||
/* DGK says that after a `\x{' ksh93 consumes ISXDIGIT chars
|
||||
until a non-xdigit or `}', so potentially more than two
|
||||
chars are consumed. */
|
||||
if (flags & 16)
|
||||
{
|
||||
for ( ; ISXDIGIT ((unsigned char)*s); s++)
|
||||
c = (c * 16) + HEXVALUE (*s);
|
||||
flags &= ~16;
|
||||
if (*s == '}')
|
||||
s++;
|
||||
}
|
||||
/* \x followed by non-hex digits is passed through unchanged */
|
||||
else if (temp == 2)
|
||||
{
|
||||
*r++ = '\\';
|
||||
c = 'x';
|
||||
}
|
||||
c &= 0xFF;
|
||||
break;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
case 'u':
|
||||
case 'U':
|
||||
temp = (c == 'u') ? 4 : 8; /* \uNNNN \UNNNNNNNN */
|
||||
for (v = 0; ISXDIGIT ((unsigned char)*s) && temp--; s++)
|
||||
v = (v * 16) + HEXVALUE (*s);
|
||||
if (temp == ((c == 'u') ? 4 : 8))
|
||||
{
|
||||
*r++ = '\\'; /* c remains unchanged */
|
||||
break;
|
||||
}
|
||||
else if (v <= UCHAR_MAX)
|
||||
{
|
||||
c = v;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
temp = u32cconv (v, r);
|
||||
r += temp;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
case '\\':
|
||||
break;
|
||||
case '\'': case '"': case '?':
|
||||
if (flags & 1)
|
||||
*r++ = '\\';
|
||||
break;
|
||||
case 'c':
|
||||
if (sawc)
|
||||
{
|
||||
*sawc = 1;
|
||||
*r = '\0';
|
||||
if (rlen)
|
||||
*rlen = r - ret;
|
||||
return ret;
|
||||
}
|
||||
else if ((flags & 1) == 0 && *s == 0)
|
||||
; /* pass \c through */
|
||||
else if ((flags & 1) == 0 && (c = *s))
|
||||
{
|
||||
s++;
|
||||
if ((flags & 2) && c == '\\' && c == *s)
|
||||
s++; /* Posix requires $'\c\\' do backslash escaping */
|
||||
c = TOCTRL(c);
|
||||
break;
|
||||
}
|
||||
/*FALLTHROUGH*/
|
||||
default:
|
||||
if ((flags & 4) == 0)
|
||||
*r++ = '\\';
|
||||
break;
|
||||
}
|
||||
if ((flags & 2) && (c == CTLESC || c == CTLNUL))
|
||||
*r++ = CTLESC;
|
||||
*r++ = c;
|
||||
}
|
||||
}
|
||||
*r = '\0';
|
||||
if (rlen)
|
||||
*rlen = r - ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Take a string STR, possibly containing non-printing characters, and turn it
|
||||
into a $'...' ANSI-C style quoted string. Returns a new string. */
|
||||
char *
|
||||
ansic_quote (str, flags, rlen)
|
||||
char *str;
|
||||
int flags, *rlen;
|
||||
{
|
||||
char *r, *ret, *s;
|
||||
int l, rsize, sindex;
|
||||
unsigned char c;
|
||||
size_t slen;
|
||||
DECLARE_MBSTATE;
|
||||
|
||||
if (str == 0 || *str == 0)
|
||||
return ((char *)0);
|
||||
|
||||
l = strlen (str);
|
||||
rsize = 4 * l + 4;
|
||||
r = ret = (char *)xmalloc (rsize);
|
||||
|
||||
*r++ = '$';
|
||||
*r++ = '\'';
|
||||
|
||||
s = str;
|
||||
slen = strlen (str);
|
||||
|
||||
for (s = str; c = *s; s++)
|
||||
{
|
||||
l = 1; /* 1 == add backslash; 0 == no backslash */
|
||||
switch (c)
|
||||
{
|
||||
case ESC: c = 'E'; break;
|
||||
#ifdef __STDC__
|
||||
case '\a': c = 'a'; break;
|
||||
case '\v': c = 'v'; break;
|
||||
#else
|
||||
case '\007': c = 'a'; break;
|
||||
case 0x0b: c = 'v'; break;
|
||||
#endif
|
||||
|
||||
case '\b': c = 'b'; break;
|
||||
case '\f': c = 'f'; break;
|
||||
case '\n': c = 'n'; break;
|
||||
case '\r': c = 'r'; break;
|
||||
case '\t': c = 't'; break;
|
||||
case '\\':
|
||||
case '\'':
|
||||
break;
|
||||
default:
|
||||
if (ISPRINT (c) == 0)
|
||||
{
|
||||
*r++ = '\\';
|
||||
*r++ = TOCHAR ((c >> 6) & 07);
|
||||
*r++ = TOCHAR ((c >> 3) & 07);
|
||||
*r++ = TOCHAR (c & 07);
|
||||
continue;
|
||||
}
|
||||
l = 0;
|
||||
break;
|
||||
}
|
||||
if (l)
|
||||
*r++ = '\\';
|
||||
*r++ = c;
|
||||
}
|
||||
|
||||
*r++ = '\'';
|
||||
*r = '\0';
|
||||
if (rlen)
|
||||
*rlen = r - ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
int
|
||||
ansic_wshouldquote (string)
|
||||
const char *string;
|
||||
{
|
||||
const wchar_t *wcs;
|
||||
wchar_t wcc;
|
||||
|
||||
wchar_t *wcstr = NULL;
|
||||
size_t wclen, slen;
|
||||
|
||||
|
||||
slen = mbstowcs (wcstr, string, 0);
|
||||
|
||||
if (slen == -1)
|
||||
slen = 0;
|
||||
wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (slen + 1));
|
||||
mbstowcs (wcstr, string, slen + 1);
|
||||
|
||||
for (wcs = wcstr; wcc = *wcs; wcs++)
|
||||
if (iswprint(wcc) == 0)
|
||||
{
|
||||
free (wcstr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
free (wcstr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* return 1 if we need to quote with $'...' because of non-printing chars. */
|
||||
int
|
||||
ansic_shouldquote (string)
|
||||
const char *string;
|
||||
{
|
||||
const char *s;
|
||||
unsigned char c;
|
||||
|
||||
if (string == 0)
|
||||
return 0;
|
||||
|
||||
for (s = string; c = *s; s++)
|
||||
{
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
if (isbasic (c) == 0)
|
||||
return (ansic_wshouldquote (s));
|
||||
#endif
|
||||
if (ISPRINT (c) == 0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* $'...' ANSI-C expand the portion of STRING between START and END and
|
||||
return the result. The result cannot be longer than the input string. */
|
||||
char *
|
||||
ansiexpand (string, start, end, lenp)
|
||||
char *string;
|
||||
int start, end, *lenp;
|
||||
{
|
||||
char *temp, *t;
|
||||
int len, tlen;
|
||||
|
||||
temp = (char *)xmalloc (end - start + 1);
|
||||
for (tlen = 0, len = start; len < end; )
|
||||
temp[tlen++] = string[len++];
|
||||
temp[tlen] = '\0';
|
||||
|
||||
if (*temp)
|
||||
{
|
||||
t = ansicstr (temp, tlen, 2, (int *)NULL, lenp);
|
||||
free (temp);
|
||||
return (t);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lenp)
|
||||
*lenp = 0;
|
||||
return (temp);
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,14 @@
|
||||
# This file is distributed under the same license as the bash package.
|
||||
# Kyoichi Ozaki <k@afromania.org>, 2000.
|
||||
# Yasuaki Taniguchi <yasuakit@gmail.com>, 2011.
|
||||
# Takeshi Hamasaki <hmatrjp@users.sourceforge.jp>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU bash 4.2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-01-28 22:09-0500\n"
|
||||
"PO-Revision-Date: 2011-02-16 16:24+0900\n"
|
||||
"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
|
||||
"PO-Revision-Date: 2011-08-26 23:34+0900\n"
|
||||
"Last-Translator: Takeshi Hamasaki <hmatrjp@users.sourceforge.jp>\n"
|
||||
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
|
||||
"Language: Japanese\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -1187,7 +1188,7 @@ msgstr "free: 未割当のブロックを引数として呼び出されました
|
||||
|
||||
#: lib/malloc/malloc.c:896
|
||||
msgid "free: underflow detected; mh_nbytes out of range"
|
||||
msgstr "free: アンダーフローを検出しました。 mh_nbytes が範囲外です。"
|
||||
msgstr "free: アンダーフローを検出しました。 mh_nbytes が範囲外です"
|
||||
|
||||
#: lib/malloc/malloc.c:902
|
||||
msgid "free: start and end chunk sizes differ"
|
||||
@@ -1199,7 +1200,7 @@ msgstr "realloc: 未割当のブロックを引数として呼び出されまし
|
||||
|
||||
#: lib/malloc/malloc.c:1016
|
||||
msgid "realloc: underflow detected; mh_nbytes out of range"
|
||||
msgstr "realloc: アンダーフローを検出しました。 mh_nbytes が範囲外です。<"
|
||||
msgstr "realloc: アンダーフローを検出しました。 mh_nbytes が範囲外です"
|
||||
|
||||
#: lib/malloc/malloc.c:1022
|
||||
msgid "realloc: start and end chunk sizes differ"
|
||||
@@ -1685,7 +1686,7 @@ msgstr "プログラミングエラー"
|
||||
|
||||
#: siglist.c:203
|
||||
msgid "HFT monitor mode granted"
|
||||
msgstr "HTF monitorモードが与えられました"
|
||||
msgstr "HFT monitorモードが与えられました"
|
||||
|
||||
#: siglist.c:207
|
||||
msgid "HFT monitor mode retracted"
|
||||
@@ -4476,7 +4477,7 @@ msgstr ""
|
||||
" \n"
|
||||
" `if COMMANDS' を実行します。この終了ステータスが 0 の場合、`then COMMANDS'\n"
|
||||
" を実行します。そうでない場合は、各 `elif COMMANDS' を順番に実行し、その\n"
|
||||
" 終了ステータスが 0 のの場合に、関連した `then COMMANDS' を実行し、if 文が\n"
|
||||
" 終了ステータスが 0 の場合に、関連した `then COMMANDS' を実行し、if 文が\n"
|
||||
" 完了します。それ以外の場合、 `else COMMANDS' が存在する場合には実行され\n"
|
||||
" ます。文全体の終了ステータスは、最後に実行したコマンドの終了ステータスか、\n"
|
||||
" または、テストした条件に true となるものが無い場合は 0 です。\n"
|
||||
@@ -5070,7 +5071,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"オプションに基づいた補完候補を表示します。\n"
|
||||
" \n"
|
||||
" シェル関数の中で補完候補をを生成するために使用するように意図されています。\n"
|
||||
" シェル関数の中で補完候補を生成するために使用するように意図されています。\n"
|
||||
" オプション引数 WORD が与えられた場合、WORD に対して一致した候補が生成\n"
|
||||
" されます。\n"
|
||||
" \n"
|
||||
|
||||
+2
-2
@@ -171,7 +171,7 @@ freebsd[4-9]*|freebsdelf*|dragonfly*)
|
||||
;;
|
||||
|
||||
# Darwin/MacOS X
|
||||
darwin[89]*|darwin10*)
|
||||
darwin[89]*|darwin1[012]*)
|
||||
SHOBJ_STATUS=supported
|
||||
SHLIB_STATUS=supported
|
||||
|
||||
@@ -200,7 +200,7 @@ darwin*|macosx*)
|
||||
SHLIB_LIBSUFF='dylib'
|
||||
|
||||
case "${host_os}" in
|
||||
darwin[789]*|darwin10*) SHOBJ_LDFLAGS=''
|
||||
darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS=''
|
||||
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
;;
|
||||
*) SHOBJ_LDFLAGS='-dynamic'
|
||||
|
||||
@@ -0,0 +1,593 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# shobj-conf -- output a series of variable assignments to be substituted
|
||||
# into a Makefile by configure which specify system-dependent
|
||||
# information for creating shared objects that may be loaded
|
||||
# into bash with `enable -f'
|
||||
#
|
||||
# usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor
|
||||
#
|
||||
# Chet Ramey
|
||||
# chet@po.cwru.edu
|
||||
|
||||
# Copyright (C) 1996-2009 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GNU Bash, the Bourne Again SHell.
|
||||
#
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# defaults
|
||||
#
|
||||
SHOBJ_STATUS=supported
|
||||
SHLIB_STATUS=supported
|
||||
|
||||
SHOBJ_CC=cc
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=
|
||||
SHOBJ_LDFLAGS=
|
||||
SHOBJ_XLDFLAGS=
|
||||
SHOBJ_LIBS=
|
||||
|
||||
SHLIB_XLDFLAGS=
|
||||
SHLIB_LIBS=
|
||||
|
||||
SHLIB_DOT='.'
|
||||
SHLIB_LIBPREF='lib'
|
||||
SHLIB_LIBSUFF='so'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)'
|
||||
SHLIB_DLLVERSION='$(SHLIB_MAJOR)'
|
||||
|
||||
PROGNAME=`basename $0`
|
||||
USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-C) shift; SHOBJ_CC="$1"; shift ;;
|
||||
-c) shift; host_cpu="$1"; shift ;;
|
||||
-o) shift; host_os="$1"; shift ;;
|
||||
-v) shift; host_vendor="$1"; shift ;;
|
||||
*) echo "$USAGE" >&2 ; exit 2;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "${host_os}-${SHOBJ_CC}-${host_vendor}" in
|
||||
nsk-cc-tandem)
|
||||
SHOBJ_CFLAGS=-Wglobalized
|
||||
case $(uname -m) in
|
||||
NSR*)
|
||||
SHOBJ_CFLAGS="${SHOBJ_CFLAGS} -Wcall_shared" # default on TNS/E, needed on TNS/R
|
||||
SHOBJ_LD=/usr/bin/ld # for TNS/R
|
||||
;;
|
||||
NSE*|NEO*)
|
||||
SHOBJ_LD=/usr/bin/eld
|
||||
;;
|
||||
esac
|
||||
SHOBJ_LDFLAGS='-shared -bglobalized -unres_symbols ignore'
|
||||
;;
|
||||
|
||||
sunos4*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD=/usr/bin/ld
|
||||
SHOBJ_LDFLAGS='-assert pure-text'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
SHOBJ_CFLAGS=-pic
|
||||
SHOBJ_LD=/usr/bin/ld
|
||||
SHOBJ_LDFLAGS='-assert pure-text'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
sunos5*-*gcc*|solaris2*-*gcc*)
|
||||
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)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sunos5*|solaris2*)
|
||||
SHOBJ_CFLAGS='-K pic'
|
||||
SHOBJ_LD=/usr/ccs/bin/ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -i -h $@'
|
||||
|
||||
# SHLIB_XLDFLAGS='-R $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
# All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd.
|
||||
linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
freebsd2*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-x -Bshareable'
|
||||
|
||||
SHLIB_XLDFLAGS='-R$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
# FreeBSD-3.x ELF
|
||||
freebsd3*|freebsdaout*)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
else
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_XLDFLAGS='-R$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
fi
|
||||
;;
|
||||
|
||||
# FreeBSD-4.x and later have only ELF
|
||||
freebsd[4-9]*|freebsdelf*|dragonfly*)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
# Darwin/MacOS X
|
||||
darwin[89]*|darwin10*)
|
||||
SHOBJ_STATUS=supported
|
||||
SHLIB_STATUS=supported
|
||||
|
||||
SHOBJ_CFLAGS='-fno-common'
|
||||
|
||||
SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBSUFF='dylib'
|
||||
|
||||
SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`'
|
||||
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
|
||||
SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
|
||||
;;
|
||||
|
||||
darwin*|macosx*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=supported
|
||||
|
||||
SHOBJ_CFLAGS='-fno-common'
|
||||
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBSUFF='dylib'
|
||||
|
||||
case "${host_os}" in
|
||||
darwin[789]*|darwin10*) SHOBJ_LDFLAGS=''
|
||||
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
;;
|
||||
*) SHOBJ_LDFLAGS='-dynamic'
|
||||
SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
;;
|
||||
esac
|
||||
|
||||
SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
|
||||
;;
|
||||
|
||||
openbsd*|netbsd*)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_XLDFLAGS='-R$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
bsdi2*)
|
||||
SHOBJ_CC=shlicc2
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS=-r
|
||||
SHOBJ_LIBS=-lc_s.2.1.0
|
||||
|
||||
# BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
|
||||
# the ass -- they require changing {/usr/lib,etc}/shlib.map on
|
||||
# each system, and the library creation process is byzantine
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
bsdi3*)
|
||||
SHOBJ_CC=shlicc2
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS=-r
|
||||
SHOBJ_LIBS=-lc_s.3.0.0
|
||||
|
||||
# BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
|
||||
# the ass -- they require changing {/usr/lib,etc}/shlib.map on
|
||||
# each system, and the library creation process is byzantine
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
bsdi4*)
|
||||
# BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked
|
||||
# shared libraries. gcc 2.x is the standard compiler, and the
|
||||
# `normal' gcc options should work as they do in Linux.
|
||||
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
osf*-*gcc*)
|
||||
# Fix to use gcc linker driver from bfischer@TechFak.Uni-Bielefeld.DE
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
osf*)
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-shared -soname $@ -expect_unresolved "*"'
|
||||
|
||||
SHLIB_XLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='ld'
|
||||
SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
|
||||
SHOBJ_XLDFLAGS='-G'
|
||||
|
||||
SHLIB_XLDFLAGS='-bM:SRE'
|
||||
SHLIB_LIBS='-lcurses -lc'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
aix4.[2-9]*|aix[5-9].*)
|
||||
SHOBJ_CFLAGS=-K
|
||||
SHOBJ_LD='ld'
|
||||
SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
|
||||
SHOBJ_XLDFLAGS='-G'
|
||||
|
||||
SHLIB_XLDFLAGS='-bM:SRE'
|
||||
SHLIB_LIBS='-lcurses -lc'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
#
|
||||
# THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface
|
||||
#
|
||||
irix[56]*-*gcc*)
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
irix[56]*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
# SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@'
|
||||
# Change from David Kaelbling <drk@sgi.com>. If you have problems,
|
||||
# remove the `-no_unresolved'
|
||||
SHOBJ_LDFLAGS='-shared -no_unresolved -soname $@'
|
||||
|
||||
SHLIB_XLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux9*-*gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux9*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
|
||||
# If you are using the HP ANSI C compiler, you can uncomment and use
|
||||
# this code (I have not tested it)
|
||||
# SHOBJ_STATUS=supported
|
||||
# SHLIB_STATUS=supported
|
||||
#
|
||||
# SHOBJ_CFLAGS='+z'
|
||||
# SHOBJ_LD='ld'
|
||||
# SHOBJ_LDFLAGS='-b +s'
|
||||
#
|
||||
# SHLIB_XLDFLAGS='+b $(libdir)'
|
||||
# SHLIB_LIBSUFF='sl'
|
||||
# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
|
||||
;;
|
||||
|
||||
hpux10*-*gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
# if you have problems linking here, moving the `-Wl,+h,$@' from
|
||||
# SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work
|
||||
SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux10*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
|
||||
# If you are using the HP ANSI C compiler, you can uncomment and use
|
||||
# this code (I have not tested it)
|
||||
# SHOBJ_STATUS=supported
|
||||
# SHLIB_STATUS=supported
|
||||
#
|
||||
# SHOBJ_CFLAGS='+z'
|
||||
# SHOBJ_LD='ld'
|
||||
# SHOBJ_LDFLAGS='-b +s +h $@'
|
||||
#
|
||||
# SHLIB_XLDFLAGS='+b $(libdir)'
|
||||
# SHLIB_LIBSUFF='sl'
|
||||
# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
|
||||
;;
|
||||
|
||||
hpux11*-*gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
# SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@'
|
||||
SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s -Wl,+h,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux11*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
|
||||
# If you are using the HP ANSI C compiler, you can uncomment and use
|
||||
# this code (I have not tested it)
|
||||
# SHOBJ_STATUS=supported
|
||||
# SHLIB_STATUS=supported
|
||||
#
|
||||
# SHOBJ_CFLAGS='+z'
|
||||
# SHOBJ_LD='ld'
|
||||
# SHOBJ_LDFLAGS='-b +s +h $@'
|
||||
#
|
||||
# SHLIB_XLDFLAGS='+b $(libdir)'
|
||||
# SHLIB_LIBSUFF='sl'
|
||||
# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
|
||||
;;
|
||||
|
||||
sysv4*-*gcc*)
|
||||
SHOBJ_CFLAGS=-shared
|
||||
SHOBJ_LDFLAGS='-shared -h $@'
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv4*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-dy -z text -G -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sco3.2v5*-*gcc*)
|
||||
SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
SHOBJ_CFLAGS='-K pic -b elf'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -b elf -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5uw7*-*gcc*)
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5uw7*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5UnixWare*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5UnixWare*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5OpenUNIX*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5OpenUNIX*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
dgux*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
SHOBJ_CFLAGS='-K pic'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
msdos*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
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)'
|
||||
|
||||
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
|
||||
;;
|
||||
|
||||
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
|
||||
;;
|
||||
|
||||
#
|
||||
# Rely on correct gcc configuration for everything else
|
||||
#
|
||||
*-*gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
echo SHOBJ_CC=\'"$SHOBJ_CC"\'
|
||||
echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\'
|
||||
echo SHOBJ_LD=\'"$SHOBJ_LD"\'
|
||||
echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\'
|
||||
echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\'
|
||||
echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\'
|
||||
|
||||
echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\'
|
||||
echo SHLIB_LIBS=\'"$SHLIB_LIBS"\'
|
||||
|
||||
echo SHLIB_DOT=\'"$SHLIB_DOT"\'
|
||||
|
||||
echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\'
|
||||
echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\'
|
||||
|
||||
echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\'
|
||||
echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\'
|
||||
|
||||
echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\'
|
||||
echo SHLIB_STATUS=\'"$SHLIB_STATUS"\'
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user