Ticket #6746: bash-builtins.patch

File bash-builtins.patch, 1.9 KB (added by mmadia, 13 years ago)
  • src/bin/bash/builtins/mkbuiltins.c

     
    1919   along with Bash.  If not, see <http://www.gnu.org/licenses/>.
    2020*/
    2121
    22 #if !defined (CROSS_COMPILING) 
     22#if !defined (CROSS_COMPILING)
    2323#  include <config.h>
    2424#else   /* CROSS_COMPILING */
    2525/* A conservative set of defines based on POSIX/SUS3/XPG6 */
     
    221221
    222222      if (strcmp (arg, "-externfile") == 0)
    223223    extern_filename = argv[arg_index++];
     224      else if (strcmp (arg, "-tempstructfile") == 0)
     225    temp_struct_filename = argv[arg_index++];
    224226      else if (strcmp (arg, "-structfile") == 0)
    225227    struct_filename = argv[arg_index++];
    226228      else if (strcmp (arg, "-noproduction") == 0)
     
    287289      /* Open the files. */
    288290      if (struct_filename)
    289291    {
    290       temp_struct_filename = xmalloc (15);
    291       sprintf (temp_struct_filename, "mk-%ld", (long) getpid ());
     292      if (!temp_struct_filename)
     293      {
     294        temp_struct_filename = xmalloc (15);
     295        sprintf (temp_struct_filename, "mk-%ld", (long) getpid ());
     296      }
    292297      structfile = fopen (temp_struct_filename, "w");
    293298
    294299      if (!structfile)
     
    14481453    {
    14491454      if (filename_p == 0)
    14501455        {
    1451           if (line[0])       
     1456          if (line[0])
    14521457        fprintf (stream, "  N_(\"");
    14531458          else
    14541459        fprintf (stream, "  N_(\" ");       /* the empty string translates specially. */
  • src/bin/bash/builtins/Jamfile

     
    4747
    4848actions MkBuiltinsExt1
    4949{
    50     $(2[1]) -externfile $(1[1]) -structfile $(1[2]) -noproduction $(2[2-]) ;
     50    $(2[1]) -externfile $(1[1]) -tempstructfile $(1[2]).temp -structfile $(1[2]) -noproduction $(2[2-]) ;
    5151}
    5252
    5353local bashDefFiles =