From 2d698b6e42d8dca191ac795ef5dba3bf62496eec Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 9 Apr 2010 16:13:32 -0700 Subject: Integrate bash 3.2 version This is merge of current Debian stable (Lenny) version of Bash with Vyatta changes. --- builtins/mkbuiltins.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'builtins/mkbuiltins.c') diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c index 94953e6..ff0bdc0 100644 --- a/builtins/mkbuiltins.c +++ b/builtins/mkbuiltins.c @@ -1,7 +1,7 @@ /* mkbuiltins.c - Create builtins.c, builtext.h, and builtdoc.c from a single source file called builtins.def. */ -/* Copyright (C) 1987-2002 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -19,7 +19,16 @@ 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. */ -#include +#if !defined (CROSS_COMPILING) +# include +#else /* CROSS_COMPILING */ +/* A conservative set of defines based on POSIX/SUS3/XPG6 */ +# define HAVE_UNISTD_H +# define HAVE_STRING_H +# define HAVE_STDLIB_H + +# define HAVE_RENAME +#endif /* CROSS_COMPILING */ #if defined (HAVE_UNISTD_H) # ifdef _MINIX @@ -1360,7 +1369,7 @@ write_documentation (stream, documentation, indentation, flags) register char *line; int string_array, texinfo, base_indent, last_cpp, filename_p; - if (!stream) + if (stream == 0) return; string_array = flags & STRING_ARRAY; @@ -1372,7 +1381,12 @@ write_documentation (stream, documentation, indentation, flags) if (single_longdoc_strings) { if (filename_p == 0) - fprintf (stream, "N_(\" "); /* the empty string translates specially. */ + { + if (documentation && documentation[0] && documentation[0][0]) + fprintf (stream, "N_(\""); + else + fprintf (stream, "N_(\" "); /* the empty string translates specially. */ + } else fprintf (stream, "\""); } @@ -1398,7 +1412,12 @@ write_documentation (stream, documentation, indentation, flags) if (string_array && single_longdoc_strings == 0) { if (filename_p == 0) - fprintf (stream, " N_(\" "); /* the empty string translates specially. */ + { + if (line[0]) + fprintf (stream, " N_(\""); + else + fprintf (stream, " N_(\" "); /* the empty string translates specially. */ + } else fprintf (stream, " \""); } -- cgit v1.2.3