diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:13:32 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:15:01 -0700 |
commit | 2d698b6e42d8dca191ac795ef5dba3bf62496eec (patch) | |
tree | ac5e0b67043c50f49160e9fe407435706cf30444 /builtins/mkbuiltins.c | |
parent | f1250933e4a2ac09a3d0b25b3877068e12f44da5 (diff) | |
download | vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.tar.gz vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.zip |
Integrate bash 3.2 version
This is merge of current Debian stable (Lenny) version of Bash
with Vyatta changes.
Diffstat (limited to 'builtins/mkbuiltins.c')
-rw-r--r-- | builtins/mkbuiltins.c | 29 |
1 files changed, 24 insertions, 5 deletions
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 <config.h> +#if !defined (CROSS_COMPILING) +# include <config.h> +#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, " \""); } |