Ticket #13137: trac_13137-mpir.patch

File trac_13137-mpir.patch, 17.2 KB (added by jhpalmieri, 9 years ago)

patch for mpir spkg; for review only

  • SPKG.txt

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1345488911 25200
    # Node ID 973a68a1c250fbf5e51b33f433f01b00ac773951
    # Parent  96d6cc6e0d945379e85875c8c7521bbb17e9cf7c
    Trac 13137: upgrade MPIR to version 2.5.1
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b See http://www.mpir.org 
    4040 * gmp-h.in.patch: a trivial patch adding some #includes such that MPIR
    4141   would compile on SunOS with Sun CC.  The changes in this patch only
    4242   take effect if the preprocessor variable `__SUNPRO_CC` is defined.
    43  * We apply a simple patch to upstream yasm's re2c code, to avoid a potential
    44    race condition when building yasm in parallel.  (Cf. #11844.)
    4543 * quote_asm.patch: replace things of the form "define(OPERATION_foo,1)" by
    4644   "define(`OPERATION_foo',1)".  This gives proper quoting for use with m4,
    4745   otherwise the define might expand to "define(,1)".  Some versions of m4
    See http://www.mpir.org 
    5452
    5553== Changelog ==
    5654
     55=== mpir-2.5.1.p0 (John Palmieri, 20 August 2012) ===
     56 * Trac #13137: Update to MPIR 2.5.1. Remove the patch
     57   'patches/yasm__tools__re2c__code.c.patch'.
     58
    5759=== mpir-2.4.0.p6 (Jeroen Demeyer, 28 May 2012) ===
    5860 * Trac #12751: Apply the ia64 workaround for gcc-4.7.0 *only* on
    5961   gcc-4.7.0 and not on other gcc-4.7.x versions.
  • patches/configure.patch

    diff --git a/patches/configure.patch b/patches/configure.patch
    a b  
    11diff -dru src/acinclude.m4 b/acinclude.m4
    2 --- src/acinclude.m4    2011-04-27 03:43:23.000000000 -0700
    3 +++ b/acinclude.m4      2012-05-27 21:43:11.000000000 -0700
    4 @@ -515,31 +515,45 @@
     2--- src/acinclude.m4    2011-07-27 00:59:54.000000000 -0700
     3+++ b/acinclude.m4      2012-06-19 12:53:56.000000000 -0700
     4@@ -508,31 +508,45 @@
    55 int cmov () { return (n >= 0 ? n : 0); }
    66 ])
    77 
    diff -dru src/acinclude.m4 b/acinclude.m 
    5858 
    5959 # __builtin_alloca is not available everywhere, check it exists before
    6060diff -dru src/configure.in b/configure.in
    61 --- src/configure.in    2011-05-27 23:09:15.000000000 -0700
    62 +++ b/configure.in      2012-05-18 14:59:37.000000000 -0700
    63 @@ -2009,16 +2009,6 @@
     61--- src/configure.in    2012-03-08 23:21:29.000000000 -0800
     62+++ b/configure.in      2012-06-19 12:53:56.000000000 -0700
     63@@ -1919,16 +1919,6 @@
    6464   fi
    6565 fi
    6666 
    diff -dru src/configure.in b/configure.i 
    7878 
    7979 # Generate an error here if attempting to build both shared and static when
    8080diff -dru src/yasm/Makefile.in b/yasm/Makefile.in
    81 --- src/yasm/Makefile.in        2011-06-13 22:35:39.000000000 -0700
    82 +++ b/yasm/Makefile.in  2012-05-18 14:35:01.000000000 -0700
    83 @@ -3868,7 +3868,8 @@
     81--- src/yasm/Makefile.in        2012-03-10 23:16:35.000000000 -0800
     82+++ b/yasm/Makefile.in  2012-06-19 12:53:56.000000000 -0700
     83@@ -3747,7 +3747,8 @@
    8484 check-am: all-am
    8585        $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
    8686        $(MAKE) $(AM_MAKEFLAGS) check-TESTS
    diff -dru src/yasm/Makefile.in b/yasm/Ma 
    9090 all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) config.h \
    9191                all-local
    9292 installdirs: installdirs-recursive
    93 @@ -3876,7 +3877,8 @@
     93@@ -3755,7 +3756,8 @@
    9494        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(modincludedir)" "$(DESTDIR)$(includedir)"; do \
    9595          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
    9696        done
    diff -dru src/yasm/Makefile.in b/yasm/Ma 
    101101 install-data: install-data-recursive
    102102 uninstall: uninstall-recursive
    103103diff -dru src/configure b/configure
    104 --- src/configure       2011-06-13 22:34:01.000000000 -0700
    105 +++ b/configure 2012-05-27 21:54:57.000000000 -0700
    106 @@ -2071,52 +2071,6 @@
     104--- src/configure       2012-06-19 12:53:56.000000000 -0700
     105+++ b/configure 2012-03-10 01:07:26.000000000 -0800
     106@@ -2069,52 +2069,6 @@
    107107 
    108108 } # ac_fn_cxx_try_link
    109109 
    diff -dru src/configure b/configure 
    156156 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
    157157 # ---------------------------------------------
    158158 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
    159 @@ -5363,11 +5317,13 @@
     159@@ -5301,11 +5255,13 @@
    160160    on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630".  The -mcpu=630
    161161    option causes gcc to incorrectly select the 32-bit libgcc.a, not
    162162    the 64-bit one, and consequently it misses out on the __fixunsdfdi
    diff -dru src/configure b/configure 
    174174 EOF
    175175   echo "Test compile: double -> ulong conversion" >&5
    176176   gmp_compile="$cc $cflags $cppflags conftest.c >&5"
    177 @@ -5411,7 +5367,6 @@
     177@@ -5349,7 +5305,6 @@
    178178 
    179179 
    180180 
    diff -dru src/configure b/configure 
    182182 if test "$gmp_prog_cc_works" = yes; then
    183183   # remove anything that might look like compiler output to our "||" expression
    184184   rm -f conftest* a.out b.out a.exe a_out.exe
    185 @@ -5419,10 +5374,10 @@
     185@@ -5357,10 +5312,10 @@
    186186 /* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if
    187187    the assembler doesn't know hppa 2.0 instructions.  fneg is a 2.0
    188188    instruction, and a negation like this comes out using it.  */
    diff -dru src/configure b/configure 
    196196 EOF
    197197   echo "Test compile: double negation" >&5
    198198   gmp_compile="$cc $cflags $cppflags conftest.c >&5"
    199 @@ -5466,7 +5421,6 @@
     199@@ -5404,7 +5359,6 @@
    200200 
    201201 
    202202 
    diff -dru src/configure b/configure 
    204204 if test "$gmp_prog_cc_works" = yes; then
    205205   # remove anything that might look like compiler output to our "||" expression
    206206   rm -f conftest* a.out b.out a.exe a_out.exe
    207 @@ -5475,10 +5429,10 @@
     207@@ -5413,10 +5367,10 @@
    208208    (cvtsd2ss) which will provoke an error if the assembler doesn't recognise
    209209    those instructions.  Not sure how much of the gmp code will come out
    210210    wanting sse2, but it's easiest to reject an option we know is bad.  */
    diff -dru src/configure b/configure 
    218218 EOF
    219219   echo "Test compile: double -> float conversion" >&5
    220220   gmp_compile="$cc $cflags $cppflags conftest.c >&5"
    221 @@ -5522,6 +5476,59 @@
     221@@ -5460,6 +5414,59 @@
    222222 
    223223 
    224224 
    diff -dru src/configure b/configure 
    278278 
    279279 # __builtin_alloca is not available everywhere, check it exists before
    280280 # seeing that it works
    281 @@ -6644,11 +6651,13 @@
     281@@ -6551,11 +6558,13 @@
    282282    on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630".  The -mcpu=630
    283283    option causes gcc to incorrectly select the 32-bit libgcc.a, not
    284284    the 64-bit one, and consequently it misses out on the __fixunsdfdi
    diff -dru src/configure b/configure 
    296296 EOF
    297297   echo "Test compile: double -> ulong conversion" >&5
    298298   gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
    299 @@ -6692,7 +6701,6 @@
     299@@ -6599,7 +6608,6 @@
    300300 
    301301 
    302302 
    diff -dru src/configure b/configure 
    304304 if test "$gmp_prog_cc_works" = yes; then
    305305   # remove anything that might look like compiler output to our "||" expression
    306306   rm -f conftest* a.out b.out a.exe a_out.exe
    307 @@ -6700,10 +6708,10 @@
     307@@ -6607,10 +6615,10 @@
    308308 /* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if
    309309    the assembler doesn't know hppa 2.0 instructions.  fneg is a 2.0
    310310    instruction, and a negation like this comes out using it.  */
    diff -dru src/configure b/configure 
    318318 EOF
    319319   echo "Test compile: double negation" >&5
    320320   gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
    321 @@ -6747,7 +6755,6 @@
     321@@ -6654,7 +6662,6 @@
    322322 
    323323 
    324324 
    diff -dru src/configure b/configure 
    326326 if test "$gmp_prog_cc_works" = yes; then
    327327   # remove anything that might look like compiler output to our "||" expression
    328328   rm -f conftest* a.out b.out a.exe a_out.exe
    329 @@ -6756,10 +6763,10 @@
     329@@ -6663,10 +6670,10 @@
    330330    (cvtsd2ss) which will provoke an error if the assembler doesn't recognise
    331331    those instructions.  Not sure how much of the gmp code will come out
    332332    wanting sse2, but it's easiest to reject an option we know is bad.  */
    diff -dru src/configure b/configure 
    340340 EOF
    341341   echo "Test compile: double -> float conversion" >&5
    342342   gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
    343 @@ -6803,6 +6810,59 @@
     343@@ -6710,6 +6717,59 @@
    344344 
    345345 
    346346 
    diff -dru src/configure b/configure 
    400400 
    401401 # __builtin_alloca is not available everywhere, check it exists before
    402402 # seeing that it works
    403 @@ -11761,16 +11821,6 @@
     403@@ -11668,16 +11728,6 @@
    404404   fi
    405405 fi
    406406 
    diff -dru src/configure b/configure 
    417417 case `pwd` in
    418418   *\ * | *\    *)
    419419     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
    420 @@ -14654,7 +14704,6 @@
     420@@ -14561,7 +14611,6 @@
    421421 
    422422 
    423423 
    diff -dru src/configure b/configure 
    425425 # Set options
    426426 
    427427 
    428 @@ -21800,2717 +21849,6 @@
     428@@ -21707,2717 +21756,6 @@
    429429 
    430430 
    431431 
    diff -dru src/configure b/configure 
    31433143 
    31443144 
    31453145 
    3146 @@ -29562,103 +26900,54 @@
     3146@@ -29309,103 +26647,54 @@
    31473147 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
    31483148 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
    31493149 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
    diff -dru src/configure b/configure 
    32473247 
    32483248 LTCC='$LTCC'
    32493249 LTCFLAGS='$LTCFLAGS'
    3250 @@ -29746,57 +27035,31 @@
     3250@@ -29493,57 +26782,31 @@
    32513251 postdeps \
    32523252 compiler_lib_search_path \
    32533253 LD_CXX \
    diff -dru src/configure b/configure 
    33063306     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    33073307     *[\\\\\\\`\\"\\\$]*)
    33083308       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
    3309 @@ -29828,27 +27091,16 @@
     3309@@ -29575,27 +26838,16 @@
    33103310 sys_lib_search_path_spec \
    33113311 sys_lib_dlsearch_path_spec \
    33123312 reload_cmds_CXX \
    diff -dru src/configure b/configure 
    33353335     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    33363336     *[\\\\\\\`\\"\\\$]*)
    33373337       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
    3338 @@ -29881,8 +27133,6 @@
     3338@@ -29628,8 +26880,6 @@
    33393339 
    33403340 
    33413341 
    diff -dru src/configure b/configure 
    33443344 _ACEOF
    33453345 
    33463346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    3347 @@ -30594,7 +27844,7 @@
     3347@@ -30341,7 +27591,7 @@
    33483348 
    33493349 
    33503350 # The names of the tagged configurations supported by this script.
    diff -dru src/configure b/configure 
    33533353 
    33543354 # ### BEGIN LIBTOOL CONFIG
    33553355 
    3356 @@ -31348,163 +28598,6 @@
     3356@@ -31095,163 +28345,6 @@
    33573357 # ### END LIBTOOL TAG CONFIG: CXX
    33583358 _LT_EOF
    33593359 
    diff -dru src/configure b/configure 
    35173517  ;;
    35183518 
    35193519   esac
    3520 @@ -32583,103 +29676,54 @@
     3520@@ -32330,103 +29423,54 @@
    35213521 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
    35223522 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
    35233523 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
    diff -dru src/configure b/configure 
    36213621 
    36223622 LTCC='$LTCC'
    36233623 LTCFLAGS='$LTCFLAGS'
    3624 @@ -32767,57 +29811,31 @@
     3624@@ -32514,57 +29558,31 @@
    36253625 postdeps \
    36263626 compiler_lib_search_path \
    36273627 LD_CXX \
    diff -dru src/configure b/configure 
    36803680     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    36813681     *[\\\\\\\`\\"\\\$]*)
    36823682       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
    3683 @@ -32849,27 +29867,16 @@
     3683@@ -32596,27 +29614,16 @@
    36843684 sys_lib_search_path_spec \
    36853685 sys_lib_dlsearch_path_spec \
    36863686 reload_cmds_CXX \
    diff -dru src/configure b/configure 
    37093709     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    37103710     *[\\\\\\\`\\"\\\$]*)
    37113711       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
    3712 @@ -32899,8 +29906,6 @@
     3712@@ -32646,8 +29653,6 @@
    37133713 
    37143714 
    37153715 
    diff -dru src/configure b/configure 
    37183718 ac_aux_dir='$ac_aux_dir'
    37193719 
    37203720 
    3721 @@ -33617,7 +30622,7 @@
     3721@@ -33364,7 +30369,7 @@
    37223722 
    37233723 
    37243724 # The names of the tagged configurations supported by this script.
    diff -dru src/configure b/configure 
    37273727 
    37283728 # ### BEGIN LIBTOOL CONFIG
    37293729 
    3730 @@ -34371,163 +31376,6 @@
     3730@@ -34118,163 +31123,6 @@
    37313731 # ### END LIBTOOL TAG CONFIG: CXX
    37323732 _LT_EOF
    37333733 
    diff -dru src/configure b/configure 
    38913891  ;;
    38923892 
    38933893   esac
    3894 @@ -35610,103 +32458,54 @@
     3894@@ -35357,103 +32205,54 @@
    38953895 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
    38963896 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
    38973897 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
    diff -dru src/configure b/configure 
    39953995 
    39963996 LTCC='$LTCC'
    39973997 LTCFLAGS='$LTCFLAGS'
    3998 @@ -35794,57 +32593,31 @@
     3998@@ -35541,57 +32340,31 @@
    39993999 postdeps \
    40004000 compiler_lib_search_path \
    40014001 LD_CXX \
    diff -dru src/configure b/configure 
    40544054     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    40554055     *[\\\\\\\`\\"\\\$]*)
    40564056       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
    4057 @@ -35876,27 +32649,16 @@
     4057@@ -35623,27 +32396,16 @@
    40584058 sys_lib_search_path_spec \
    40594059 sys_lib_dlsearch_path_spec \
    40604060 reload_cmds_CXX \
    diff -dru src/configure b/configure 
    40834083     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    40844084     *[\\\\\\\`\\"\\\$]*)
    40854085       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
    4086 @@ -35926,8 +32688,6 @@
     4086@@ -35673,8 +32435,6 @@
    40874087 
    40884088 
    40894089 
    diff -dru src/configure b/configure 
    40924092 ac_aux_dir='$ac_aux_dir'
    40934093 ac_aux_dir='$ac_aux_dir'
    40944094 
    4095 @@ -36646,7 +33406,7 @@
     4095@@ -36393,7 +33153,7 @@
    40964096 
    40974097 
    40984098 # The names of the tagged configurations supported by this script.
    diff -dru src/configure b/configure 
    41014101 
    41024102 # ### BEGIN LIBTOOL CONFIG
    41034103 
    4104 @@ -37400,163 +34160,6 @@
     4104@@ -37147,163 +33907,6 @@
    41054105 # ### END LIBTOOL TAG CONFIG: CXX
    41064106 _LT_EOF
    41074107 
  • patches/quote_asm.patch

    diff --git a/patches/quote_asm.patch b/patches/quote_asm.patch
    a b diff -ru src/mpn/ia64/xor_n.asm src.patc 
    214214 
    215215 ifdef(`OPERATION_and_n',
    216216 `      define(`func',`mpn_and_n')
    217 diff -ru src/mpn/m68k/add_n.asm src.patched/mpn/m68k/add_n.asm
    218 --- src/mpn/m68k/add_n.asm      2010-12-31 08:23:57.000000000 +0100
    219 +++ src.patched/mpn/m68k/add_n.asm      2012-04-07 14:27:53.028268643 +0200
    220 @@ -25,7 +25,7 @@
    221  C         cycles/limb
    222  C 68040:      6
    223  
    224 -define(OPERATION_add_n,1)
    225 +define(`OPERATION_add_n',1)
    226  
    227  ifdef(`OPERATION_add_n',`
    228    define(M4_inst,       addxl)
    229 diff -ru src/mpn/m68k/mc68020/addmul_1.asm src.patched/mpn/m68k/mc68020/addmul_1.asm
    230 --- src/mpn/m68k/mc68020/addmul_1.asm   2010-12-30 08:34:14.000000000 +0100
    231 +++ src.patched/mpn/m68k/mc68020/addmul_1.asm   2012-04-07 14:27:53.008279908 +0200
    232 @@ -25,7 +25,7 @@
    233  C         cycles/limb
    234  C 68040:     25
    235  
    236 -define(OPERATION_addmul_1,1)
    237 +define(`OPERATION_addmul_1',1)
    238  
    239  ifdef(`OPERATION_addmul_1',`
    240    define(M4_inst,       addl)
    241 diff -ru src/mpn/m68k/mc68020/submul_1.asm src.patched/mpn/m68k/mc68020/submul_1.asm
    242 --- src/mpn/m68k/mc68020/submul_1.asm   2010-12-30 08:34:34.000000000 +0100
    243 +++ src.patched/mpn/m68k/mc68020/submul_1.asm   2012-04-07 14:27:53.008279908 +0200
    244 @@ -25,7 +25,7 @@
    245  C         cycles/limb
    246  C 68040:     25
    247  
    248 -define(OPERATION_submul_1,1)
    249 +define(`OPERATION_submul_1',1)
    250  
    251  ifdef(`OPERATION_addmul_1',`
    252    define(M4_inst,       addl)
    253 diff -ru src/mpn/m68k/sub_n.asm src.patched/mpn/m68k/sub_n.asm
    254 --- src/mpn/m68k/sub_n.asm      2010-12-31 08:24:06.000000000 +0100
    255 +++ src.patched/mpn/m68k/sub_n.asm      2012-04-07 14:27:52.988268768 +0200
    256 @@ -25,7 +25,7 @@
    257  C         cycles/limb
    258  C 68040:      6
    259  
    260 -define(OPERATION_sub_n,1)
    261 +define(`OPERATION_sub_n',1)
    262  
    263  ifdef(`OPERATION_add_n',`
    264    define(M4_inst,       addxl)
    265217diff -ru src/mpn/powerpc32/vmx/and_n.asm src.patched/mpn/powerpc32/vmx/and_n.asm
    266218--- src/mpn/powerpc32/vmx/and_n.asm     2010-12-31 08:16:01.000000000 +0100
    267219+++ src.patched/mpn/powerpc32/vmx/and_n.asm     2012-04-07 14:27:52.968280448 +0200
  • deleted file patches/yasm__tools__re2c__code.c.patch

    diff --git a/patches/yasm__tools__re2c__code.c.patch b/patches/yasm__tools__re2c__code.c.patch
    deleted file mode 100644
    + -  
    1 --- src/yasm/tools/re2c/code.c  2011-03-05 14:47:11.000000000 +0100
    2 +++ src/yasm/tools/re2c/code.c  2012-04-05 12:34:44.958541522 +0200
    3 @@ -1,5 +1,6 @@
    4  #include <stdlib.h>
    5  #include <string.h>
    6 +#include <errno.h>
    7  #include <ctype.h>
    8  #include "tools/re2c/substr.h"
    9  #include "tools/re2c/globals.h"
    10 @@ -10,7 +11,7 @@
    11      while (value >= vUsedLabelAlloc) {
    12         vUsedLabels = realloc(vUsedLabels, vUsedLabelAlloc * 2);
    13         if (!vUsedLabels) {
    14 -           fputs("Out of memory.\n", stderr);
    15 +           fputs("Error: re2c: Out of memory.\n", stderr);
    16             exit(EXIT_FAILURE);
    17         }
    18         memset(vUsedLabels + vUsedLabelAlloc, 0, vUsedLabelAlloc);
    19 @@ -844,14 +845,17 @@
    20      nOrgOline = oline;
    21      maxFillIndexes = vFillIndexes;
    22      orgVFillIndexes = vFillIndexes;
    23 -    tmpo = fopen("re2c.tmp", "wt");
    24 +    if (!(tmpo = tmpfile()))
    25 +    {
    26 +        fprintf(stderr, "Error: re2c: tmpfile(): %s\n", strerror(errno));
    27 +        exit(EXIT_FAILURE);
    28 +    }
    29      for(s = d->head; s; s = s->next){
    30         int readCh = 0;
    31         State_emit(s, tmpo, &readCh);
    32         Go_genGoto(&s->go, tmpo, s, s->next, &readCh);
    33      }
    34      fclose(tmpo);
    35 -    remove("re2c.tmp");
    36      maxFillIndexes = vFillIndexes;
    37      vFillIndexes = orgVFillIndexes;
    38      oline = nOrgOline;