aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2005-12-07 14:08:12 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:57 +0000
commit95732b497d12c98613bb3c5db16b61f377501a59 (patch)
tree5e1cdf79eb0407e09dca4c0ec29e11442c7d1d15 /support
parenteb87367179effbe5f430236db8259006d71438b7 (diff)
downloadandroid_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.tar.gz
android_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.tar.bz2
android_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.zip
Imported from ../bash-3.1.tar.gz.
Diffstat (limited to 'support')
-rw-r--r--support/Makefile.in2
-rwxr-xr-xsupport/config.guess2
-rw-r--r--support/man2html.c63
-rw-r--r--support/mksignames.c16
-rwxr-xr-xsupport/mkversion.sh12
-rw-r--r--support/printenv.c6
-rw-r--r--support/recho.c6
-rwxr-xr-xsupport/shobj-conf78
-rw-r--r--support/zecho.c4
9 files changed, 156 insertions, 33 deletions
diff --git a/support/Makefile.in b/support/Makefile.in
index 9aacc2f..b49bd45 100644
--- a/support/Makefile.in
+++ b/support/Makefile.in
@@ -81,7 +81,7 @@ man2html$(EXEEXT): $(OBJ1)
clean:
$(RM) man2html$(EXEEXT)
-distclean maintainer-clean mostly-clean: clean
+distclean maintainer-clean mostlyclean: clean
$(RM) $(OBJ1)
man2html.o: man2html.c
diff --git a/support/config.guess b/support/config.guess
index 9a8a499..6d90d6f 100755
--- a/support/config.guess
+++ b/support/config.guess
@@ -1162,7 +1162,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+ NSR-[DGKLNPTVWXY]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
diff --git a/support/man2html.c b/support/man2html.c
index d1ed8bc..2432c13 100644
--- a/support/man2html.c
+++ b/support/man2html.c
@@ -102,6 +102,10 @@
static char location_base[NULL_TERMINATED(MED_STR_MAX)] = "";
+static char th_page_and_sec[128] = { '\0' };
+static char th_datestr[128] = { '\0' };
+static char th_version[128] = { '\0' };
+
char *signature = "<HR>\nThis document was created by man2html from %s.<BR>\nTime: %s\n";
/* timeformat for signature */
@@ -2148,6 +2152,26 @@ skip_till_newline(char *c)
return c;
}
+static void
+outputPageHeader(char *l, char *c, char *r)
+{
+ out_html("<TABLE WIDTH=100%>\n<TR>\n");
+ out_html("<TH ALIGN=LEFT width=33%>");
+ out_html(l);
+ out_html("<TH ALIGN=CENTER width=33%>");
+ out_html(c);
+ out_html("<TH ALIGN=RIGHT width=33%>");
+ out_html(r);
+ out_html("\n</TR>\n</TABLE>\n");
+}
+
+static void
+outputPageFooter(char *l, char *c, char *r)
+{
+ out_html("<HR>\n");
+ outputPageHeader(l, c, r);
+}
+
static int ifelseval = 0;
static char *
@@ -2836,15 +2860,15 @@ scan_request(char *c)
out_html(label);
/* &nbsp; for mosaic users */
if (mode)
- out_html("\">&nbsp;</A>\n<H3>");
+ out_html("\">&nbsp;</A>\n<H4>");
else
- out_html("\">&nbsp;</A>\n<H2>");
+ out_html("\">&nbsp;</A>\n<H3>");
mandoc_synopsis = strncmp(c, "SYNOPSIS", 8) == 0;
c = mandoc_command ? scan_troff_mandoc(c, 1, NULL) : scan_troff(c, 1, NULL);
if (mode)
- out_html("</H3>\n");
+ out_html("</H4>\n");
else
- out_html("</H2>\n");
+ out_html("</H3>\n");
curpos = 0;
break;
case V('T', 'S'):
@@ -2856,25 +2880,31 @@ scan_request(char *c)
if (!output_possible) {
sl = fill_words(c + j, wordlist, &words);
if (words > 1) {
- char page_and_sec[128];
-
+ char *t;
for (i = 1; i < words; i++)
wordlist[i][-1] = '\0';
*sl = '\0';
output_possible = 1;
- sprintf(page_and_sec, "%s(%s)", wordlist[0], wordlist[1]);
+ sprintf(th_page_and_sec, "%s(%s)", wordlist[0], wordlist[1]);
+ if (words > 2) {
+ t = unescape(wordlist[2]);
+ strncpy(th_datestr, t, sizeof(th_datestr));
+ th_datestr[sizeof(th_datestr) - 1] = '\0';
+ } else
+ th_datestr[0] = '\0';
+ if (words > 3) {
+ t = unescape(wordlist[3]);
+ strncpy(th_version, t, sizeof(th_version));
+ th_version[sizeof(th_version) - 1] = '\0';
+ } else
+ th_version[0] = '\0';
out_html("<HTML><HEAD>\n<TITLE>");
- out_html(page_and_sec);
+ out_html(th_page_and_sec);
out_html(" Manual Page");
out_html("</TITLE>\n</HEAD>\n<BODY>");
- out_html("<TABLE WIDTH=100%>\n");
- out_html("<TH ALIGN=LEFT>");
- out_html(page_and_sec);
- out_html("<TH ALIGN=CENTER>");
- out_html(unescape(wordlist[2]));
- out_html("<TH ALIGN=RIGHT>");
- out_html(page_and_sec);
- out_html("\n</TABLE>\n");
+
+ outputPageHeader(th_page_and_sec, th_datestr, th_page_and_sec);
+
out_html("<BR><A HREF=\"#index\">Index</A>\n");
*sl = '\n';
out_html("<HR>\n");
@@ -4023,6 +4053,7 @@ main(int argc, char **argv)
out_html(NEWLINE);
if (output_possible) {
+ outputPageFooter(th_version, th_datestr, th_page_and_sec);
/* &nbsp; for mosaic users */
fputs("<HR>\n<A NAME=\"index\">&nbsp;</A><H2>Index</H2>\n<DL>\n", stdout);
manidx[mip] = 0;
diff --git a/support/mksignames.c b/support/mksignames.c
index c395e33..e6a1518 100644
--- a/support/mksignames.c
+++ b/support/mksignames.c
@@ -133,11 +133,11 @@ initialize_signames ()
}
#endif /* SIGRTMIN && SIGRTMAX */
-/* AIX */
#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */
signal_names[SIGLOST] = "SIGLOST";
#endif
+/* AIX */
#if defined (SIGMSG) /* HFT input data pending */
signal_names[SIGMSG] = "SIGMSG";
#endif
@@ -203,6 +203,10 @@ initialize_signames ()
signal_names[SIGCANCEL] = "SIGCANCEL";
#endif
+#if defined (SIGXRES) /* resource control exceeded */
+ signal_names[SIGXRES] = "SIGXRES";
+#endif
+
/* HP-UX */
#if defined (SIGDIL) /* DIL signal (?) */
signal_names[SIGDIL] = "SIGDIL";
@@ -226,6 +230,16 @@ initialize_signames ()
signal_names[SIGWINDOW] = "SIGWINDOW";
#endif
+/* Linux */
+#if defined (SIGSTKFLT)
+ signal_names[SIGSTKFLT] = "SIGSTKFLT";
+#endif
+
+/* FreeBSD */
+#if defined (SIGTHR) /* thread interrupt */
+ signal_names[SIGTHR] = "SIGTHR";
+#endif
+
/* Common */
#if defined (SIGHUP) /* hangup */
signal_names[SIGHUP] = "SIGHUP";
diff --git a/support/mkversion.sh b/support/mkversion.sh
index a42eb78..6aca944 100755
--- a/support/mkversion.sh
+++ b/support/mkversion.sh
@@ -96,11 +96,11 @@ echo "/* Version control for the shell. This file gets changed when you say"
echo " \`make version.h' to the Makefile. It is created by mkversion. */"
# Output the distribution version. Single numbers are converted to x.00.
-# Allow, as a special case, `[:digit:].[:digit:][:digit:][:alpha:]' for
-# intermediate versions (e.g., `2.05a').
+# Allow, as a special case, `[:digit:].[:digit:][:alpha:]' for
+# intermediate versions (e.g., `2.5a').
# Any characters other than digits and `.' are invalid.
case "$dist_version" in
-[0-9].[0-9][0-9][a-z]) ;; # special case
+[0-9].[0-9][a-z]) ;; # special case
*[!0-9.]*) echo "mkversion.sh: ${dist_version}: bad distribution version" >&2
exit 1 ;;
*.*) ;;
@@ -112,9 +112,9 @@ dist_major=`echo $dist_version | sed 's:\..*$::'`
dist_minor=`echo $dist_version | sed 's:^.*\.::'`
case "$dist_minor" in
-"") dist_minor=00 ;;
-[a-z]) dist_minor=00${dist_minor} ;;
-?) dist_minor=0${dist_minor} ;;
+"") dist_minor=0 ;;
+[a-z]) dist_minor=0${dist_minor} ;;
+?) dist_minor=${dist_minor} ;;
*) ;;
esac
diff --git a/support/printenv.c b/support/printenv.c
index 29629b3..f835792 100644
--- a/support/printenv.c
+++ b/support/printenv.c
@@ -24,6 +24,12 @@
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 (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include "bashansi.h"
+
extern char **environ;
int
diff --git a/support/recho.c b/support/recho.c
index c622582..287fffb 100644
--- a/support/recho.c
+++ b/support/recho.c
@@ -6,7 +6,7 @@
chet@po.cwru.edu
*/
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,7 +23,11 @@
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 (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+#include "bashansi.h"
#include <stdio.h>
void strprint();
diff --git a/support/shobj-conf b/support/shobj-conf
index 4c13717..0e306bc 100755
--- a/support/shobj-conf
+++ b/support/shobj-conf
@@ -41,9 +41,13 @@ 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"
@@ -78,10 +82,14 @@ sunos4*)
sunos5*-*gcc*|solaris2*-*gcc*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
- # This line works for the Solaris linker in /usr/ccs/bin/ld
- SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
- # This line works for the GNU ld
-# SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
+ 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,$@'
+ else
+ # This line works for the Solaris linker in /usr/ccs/bin/ld
+ SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
+ fi
# SHLIB_XLDFLAGS='-R $(libdir)'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
@@ -116,7 +124,7 @@ freebsd2* | netbsd*)
;;
# FreeBSD-3.x ELF
-freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*)
+freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
@@ -146,7 +154,7 @@ darwin*|macosx*)
SHLIB_LIBSUFF='dylib'
case "${host_os}" in
- darwin7*) SHOBJ_LDFLAGS=''
+ darwin[78]*) 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'
@@ -408,7 +416,39 @@ sysv5uw7*)
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}'
@@ -430,6 +470,24 @@ msdos*)
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
+ ;;
+
#
# Rely on correct gcc configuration for everything else
#
@@ -457,8 +515,14 @@ 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"\'
diff --git a/support/zecho.c b/support/zecho.c
index 3bc1fba..cc6ae60 100644
--- a/support/zecho.c
+++ b/support/zecho.c
@@ -17,7 +17,11 @@
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 (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+#include "bashansi.h"
#include <stdio.h>
int