From e075990ed3a1d9f65be121a5df0cdc4a1cd8460c Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Sat, 28 Nov 2020 16:24:08 +0100 Subject: [PATCH] Patch level : 12.0 no-patch Files correlati : Commento : Aggiunto il preprocessore c++ mcpp per sostituire il compilatore nella compilazione delle maschere. --- libraries/mcpp/ChangeLog | 325 + libraries/mcpp/ChangeLog.old | 351 + libraries/mcpp/INSTALL | 541 + libraries/mcpp/INSTALL-jp | 468 + libraries/mcpp/LICENSE | 29 + libraries/mcpp/Makefile.am | 38 + libraries/mcpp/Makefile.in | 709 + libraries/mcpp/NEWS | 120 + libraries/mcpp/README | 53 + libraries/mcpp/aclocal.m4 | 6964 +++++ libraries/mcpp/bin/mcpp-manual.html | 4617 +++ libraries/mcpp/bin/mcpp-summary-272.pdf | Bin 0 -> 170539 bytes libraries/mcpp/bin/mcpp.exe | Bin 0 -> 201728 bytes libraries/mcpp/config/compile | 142 + libraries/mcpp/config/config.guess | 1500 + libraries/mcpp/config/config.sub | 1608 ++ libraries/mcpp/config/cygwin_root | 3 + libraries/mcpp/config/depcomp | 530 + libraries/mcpp/config/install-sh | 323 + libraries/mcpp/config/ltmain.sh | 6871 +++++ libraries/mcpp/config/mb_big5 | 2 + libraries/mcpp/config/mb_jis | 2 + libraries/mcpp/config/mb_sjis | 2 + libraries/mcpp/config/mingw_root | 3 + libraries/mcpp/config/missing | 360 + libraries/mcpp/configure | 23147 ++++++++++++++++ libraries/mcpp/configure.ac | 778 + libraries/mcpp/cpp-test/LICENSE | 29 + libraries/mcpp/cpp-test/test-l/cpp-test.exp | 22 + libraries/mcpp/cpp-test/test-l/ifdef127.h | 389 + libraries/mcpp/cpp-test/test-l/ifdef255.h | 388 + libraries/mcpp/cpp-test/test-l/l_37_1.h | 24 + libraries/mcpp/cpp-test/test-l/l_37_2.c | 33 + libraries/mcpp/cpp-test/test-l/l_37_3.c | 28 + libraries/mcpp/cpp-test/test-l/l_37_4.c | 18 + libraries/mcpp/cpp-test/test-l/l_37_5.c | 16 + libraries/mcpp/cpp-test/test-l/l_37_6.c | 84 + libraries/mcpp/cpp-test/test-l/l_37_7.c | 144 + libraries/mcpp/cpp-test/test-l/l_37_8.c | 18 + libraries/mcpp/cpp-test/test-l/l_37_9.c | 23 + libraries/mcpp/cpp-test/test-l/longline.t | 1537 + libraries/mcpp/cpp-test/test-l/m8191.h | 8196 ++++++ libraries/mcpp/cpp-test/test-l/nest1.h | 2 + libraries/mcpp/cpp-test/test-l/nest10.h | 2 + libraries/mcpp/cpp-test/test-l/nest100.h | 2 + libraries/mcpp/cpp-test/test-l/nest101.h | 2 + libraries/mcpp/cpp-test/test-l/nest102.h | 2 + libraries/mcpp/cpp-test/test-l/nest103.h | 2 + libraries/mcpp/cpp-test/test-l/nest104.h | 2 + libraries/mcpp/cpp-test/test-l/nest105.h | 2 + libraries/mcpp/cpp-test/test-l/nest106.h | 2 + libraries/mcpp/cpp-test/test-l/nest107.h | 2 + libraries/mcpp/cpp-test/test-l/nest108.h | 2 + libraries/mcpp/cpp-test/test-l/nest109.h | 2 + libraries/mcpp/cpp-test/test-l/nest11.h | 2 + libraries/mcpp/cpp-test/test-l/nest110.h | 2 + libraries/mcpp/cpp-test/test-l/nest111.h | 2 + libraries/mcpp/cpp-test/test-l/nest112.h | 2 + libraries/mcpp/cpp-test/test-l/nest113.h | 2 + libraries/mcpp/cpp-test/test-l/nest114.h | 2 + libraries/mcpp/cpp-test/test-l/nest115.h | 2 + libraries/mcpp/cpp-test/test-l/nest116.h | 2 + libraries/mcpp/cpp-test/test-l/nest117.h | 2 + libraries/mcpp/cpp-test/test-l/nest118.h | 2 + libraries/mcpp/cpp-test/test-l/nest119.h | 2 + libraries/mcpp/cpp-test/test-l/nest12.h | 2 + libraries/mcpp/cpp-test/test-l/nest120.h | 2 + libraries/mcpp/cpp-test/test-l/nest121.h | 2 + libraries/mcpp/cpp-test/test-l/nest122.h | 2 + libraries/mcpp/cpp-test/test-l/nest123.h | 2 + libraries/mcpp/cpp-test/test-l/nest124.h | 2 + libraries/mcpp/cpp-test/test-l/nest125.h | 2 + libraries/mcpp/cpp-test/test-l/nest126.h | 2 + libraries/mcpp/cpp-test/test-l/nest127.h | 2 + libraries/mcpp/cpp-test/test-l/nest13.h | 2 + libraries/mcpp/cpp-test/test-l/nest14.h | 2 + libraries/mcpp/cpp-test/test-l/nest15.h | 6 + libraries/mcpp/cpp-test/test-l/nest16.h | 2 + libraries/mcpp/cpp-test/test-l/nest17.h | 2 + libraries/mcpp/cpp-test/test-l/nest18.h | 2 + libraries/mcpp/cpp-test/test-l/nest19.h | 2 + libraries/mcpp/cpp-test/test-l/nest2.h | 2 + libraries/mcpp/cpp-test/test-l/nest20.h | 2 + libraries/mcpp/cpp-test/test-l/nest21.h | 2 + libraries/mcpp/cpp-test/test-l/nest22.h | 2 + libraries/mcpp/cpp-test/test-l/nest23.h | 2 + libraries/mcpp/cpp-test/test-l/nest24.h | 2 + libraries/mcpp/cpp-test/test-l/nest25.h | 2 + libraries/mcpp/cpp-test/test-l/nest26.h | 2 + libraries/mcpp/cpp-test/test-l/nest27.h | 2 + libraries/mcpp/cpp-test/test-l/nest28.h | 2 + libraries/mcpp/cpp-test/test-l/nest29.h | 2 + libraries/mcpp/cpp-test/test-l/nest3.h | 2 + libraries/mcpp/cpp-test/test-l/nest30.h | 2 + libraries/mcpp/cpp-test/test-l/nest31.h | 6 + libraries/mcpp/cpp-test/test-l/nest32.h | 2 + libraries/mcpp/cpp-test/test-l/nest33.h | 2 + libraries/mcpp/cpp-test/test-l/nest34.h | 2 + libraries/mcpp/cpp-test/test-l/nest35.h | 2 + libraries/mcpp/cpp-test/test-l/nest36.h | 2 + libraries/mcpp/cpp-test/test-l/nest37.h | 2 + libraries/mcpp/cpp-test/test-l/nest38.h | 2 + libraries/mcpp/cpp-test/test-l/nest39.h | 2 + libraries/mcpp/cpp-test/test-l/nest4.h | 2 + libraries/mcpp/cpp-test/test-l/nest40.h | 2 + libraries/mcpp/cpp-test/test-l/nest41.h | 2 + libraries/mcpp/cpp-test/test-l/nest42.h | 2 + libraries/mcpp/cpp-test/test-l/nest43.h | 2 + libraries/mcpp/cpp-test/test-l/nest44.h | 2 + libraries/mcpp/cpp-test/test-l/nest45.h | 2 + libraries/mcpp/cpp-test/test-l/nest46.h | 2 + libraries/mcpp/cpp-test/test-l/nest47.h | 2 + libraries/mcpp/cpp-test/test-l/nest48.h | 2 + libraries/mcpp/cpp-test/test-l/nest49.h | 2 + libraries/mcpp/cpp-test/test-l/nest5.h | 2 + libraries/mcpp/cpp-test/test-l/nest50.h | 2 + libraries/mcpp/cpp-test/test-l/nest51.h | 2 + libraries/mcpp/cpp-test/test-l/nest52.h | 2 + libraries/mcpp/cpp-test/test-l/nest53.h | 2 + libraries/mcpp/cpp-test/test-l/nest54.h | 2 + libraries/mcpp/cpp-test/test-l/nest55.h | 2 + libraries/mcpp/cpp-test/test-l/nest56.h | 2 + libraries/mcpp/cpp-test/test-l/nest57.h | 2 + libraries/mcpp/cpp-test/test-l/nest58.h | 2 + libraries/mcpp/cpp-test/test-l/nest59.h | 2 + libraries/mcpp/cpp-test/test-l/nest6.h | 2 + libraries/mcpp/cpp-test/test-l/nest60.h | 2 + libraries/mcpp/cpp-test/test-l/nest61.h | 2 + libraries/mcpp/cpp-test/test-l/nest62.h | 2 + libraries/mcpp/cpp-test/test-l/nest63.h | 6 + libraries/mcpp/cpp-test/test-l/nest64.h | 2 + libraries/mcpp/cpp-test/test-l/nest65.h | 2 + libraries/mcpp/cpp-test/test-l/nest66.h | 2 + libraries/mcpp/cpp-test/test-l/nest67.h | 2 + libraries/mcpp/cpp-test/test-l/nest68.h | 2 + libraries/mcpp/cpp-test/test-l/nest69.h | 2 + libraries/mcpp/cpp-test/test-l/nest7.h | 2 + libraries/mcpp/cpp-test/test-l/nest70.h | 2 + libraries/mcpp/cpp-test/test-l/nest71.h | 2 + libraries/mcpp/cpp-test/test-l/nest72.h | 2 + libraries/mcpp/cpp-test/test-l/nest73.h | 2 + libraries/mcpp/cpp-test/test-l/nest74.h | 2 + libraries/mcpp/cpp-test/test-l/nest75.h | 2 + libraries/mcpp/cpp-test/test-l/nest76.h | 2 + libraries/mcpp/cpp-test/test-l/nest77.h | 2 + libraries/mcpp/cpp-test/test-l/nest78.h | 2 + libraries/mcpp/cpp-test/test-l/nest79.h | 2 + libraries/mcpp/cpp-test/test-l/nest8.h | 2 + libraries/mcpp/cpp-test/test-l/nest80.h | 2 + libraries/mcpp/cpp-test/test-l/nest81.h | 2 + libraries/mcpp/cpp-test/test-l/nest82.h | 2 + libraries/mcpp/cpp-test/test-l/nest83.h | 2 + libraries/mcpp/cpp-test/test-l/nest84.h | 2 + libraries/mcpp/cpp-test/test-l/nest85.h | 2 + libraries/mcpp/cpp-test/test-l/nest86.h | 2 + libraries/mcpp/cpp-test/test-l/nest87.h | 2 + libraries/mcpp/cpp-test/test-l/nest88.h | 2 + libraries/mcpp/cpp-test/test-l/nest89.h | 2 + libraries/mcpp/cpp-test/test-l/nest9.h | 2 + libraries/mcpp/cpp-test/test-l/nest90.h | 2 + libraries/mcpp/cpp-test/test-l/nest91.h | 2 + libraries/mcpp/cpp-test/test-l/nest92.h | 2 + libraries/mcpp/cpp-test/test-l/nest93.h | 2 + libraries/mcpp/cpp-test/test-l/nest94.h | 2 + libraries/mcpp/cpp-test/test-l/nest95.h | 2 + libraries/mcpp/cpp-test/test-l/nest96.h | 2 + libraries/mcpp/cpp-test/test-l/nest97.h | 2 + libraries/mcpp/cpp-test/test-l/nest98.h | 2 + libraries/mcpp/cpp-test/test-l/nest99.h | 2 + libraries/mcpp/cpp-test/test-t/cpp-test.exp | 22 + libraries/mcpp/cpp-test/test-t/e_12_8.c | 8 + libraries/mcpp/cpp-test/test-t/e_14.c | 12 + libraries/mcpp/cpp-test/test-t/e_14_10.c | 22 + libraries/mcpp/cpp-test/test-t/e_14_2.c | 17 + libraries/mcpp/cpp-test/test-t/e_14_3.c | 27 + libraries/mcpp/cpp-test/test-t/e_14_7.c | 18 + libraries/mcpp/cpp-test/test-t/e_14_9.c | 8 + libraries/mcpp/cpp-test/test-t/e_15_3.c | 18 + libraries/mcpp/cpp-test/test-t/e_16.c | 12 + libraries/mcpp/cpp-test/test-t/e_17.c | 32 + libraries/mcpp/cpp-test/test-t/e_17_5.c | 14 + libraries/mcpp/cpp-test/test-t/e_18_4.c | 34 + libraries/mcpp/cpp-test/test-t/e_19_3.c | 40 + libraries/mcpp/cpp-test/test-t/e_23_3.c | 13 + libraries/mcpp/cpp-test/test-t/e_24_6.c | 8 + libraries/mcpp/cpp-test/test-t/e_25_6.c | 17 + libraries/mcpp/cpp-test/test-t/e_27_7.c | 14 + libraries/mcpp/cpp-test/test-t/e_29_3.c | 14 + libraries/mcpp/cpp-test/test-t/e_31.c | 12 + libraries/mcpp/cpp-test/test-t/e_31_3.c | 14 + libraries/mcpp/cpp-test/test-t/e_32_5.c | 10 + libraries/mcpp/cpp-test/test-t/e_33_2.c | 11 + libraries/mcpp/cpp-test/test-t/e_35_2.c | 9 + libraries/mcpp/cpp-test/test-t/e_4_3.c | 8 + libraries/mcpp/cpp-test/test-t/e_7_4.c | 11 + libraries/mcpp/cpp-test/test-t/e_intmax.c | 18 + libraries/mcpp/cpp-test/test-t/e_operat.C | 13 + libraries/mcpp/cpp-test/test-t/e_pragma.c | 9 + libraries/mcpp/cpp-test/test-t/e_ucn.c | 14 + libraries/mcpp/cpp-test/test-t/e_vargs.c | 24 + libraries/mcpp/cpp-test/test-t/header.h | 5 + libraries/mcpp/cpp-test/test-t/i_32_3.c | 15 + libraries/mcpp/cpp-test/test-t/i_35.c | 11 + libraries/mcpp/cpp-test/test-t/ifdef15.h | 50 + libraries/mcpp/cpp-test/test-t/ifdef31.h | 52 + libraries/mcpp/cpp-test/test-t/ifdef63.h | 99 + libraries/mcpp/cpp-test/test-t/line.h | 3 + libraries/mcpp/cpp-test/test-t/long4095.h | 166 + libraries/mcpp/cpp-test/test-t/m4095.h | 4101 +++ libraries/mcpp/cpp-test/test-t/n_1.c | 19 + libraries/mcpp/cpp-test/test-t/n_10.c | 35 + libraries/mcpp/cpp-test/test-t/n_11.c | 37 + libraries/mcpp/cpp-test/test-t/n_12.c | 46 + libraries/mcpp/cpp-test/test-t/n_13.c | 39 + libraries/mcpp/cpp-test/test-t/n_13_13.c | 37 + libraries/mcpp/cpp-test/test-t/n_13_5.c | 25 + libraries/mcpp/cpp-test/test-t/n_13_7.c | 33 + libraries/mcpp/cpp-test/test-t/n_13_8.c | 33 + libraries/mcpp/cpp-test/test-t/n_15.c | 28 + libraries/mcpp/cpp-test/test-t/n_18.c | 34 + libraries/mcpp/cpp-test/test-t/n_19.c | 23 + libraries/mcpp/cpp-test/test-t/n_1_3_run.c | 26 + .../mcpp/cpp-test/test-t/n_1_3_run.c.gcc2 | 26 + .../mcpp/cpp-test/test-t/n_1_3_run.c.gcc3 | 26 + libraries/mcpp/cpp-test/test-t/n_2.c | 44 + libraries/mcpp/cpp-test/test-t/n_20.c | 14 + libraries/mcpp/cpp-test/test-t/n_21.c | 21 + libraries/mcpp/cpp-test/test-t/n_22.c | 26 + libraries/mcpp/cpp-test/test-t/n_23.c | 22 + libraries/mcpp/cpp-test/test-t/n_24.c | 30 + libraries/mcpp/cpp-test/test-t/n_24_3_run.c | 33 + .../mcpp/cpp-test/test-t/n_24_3_run.c.gcc2 | 33 + .../mcpp/cpp-test/test-t/n_24_3_run.c.gcc3 | 33 + libraries/mcpp/cpp-test/test-t/n_25.c | 46 + libraries/mcpp/cpp-test/test-t/n_26.c | 39 + libraries/mcpp/cpp-test/test-t/n_27.c | 64 + libraries/mcpp/cpp-test/test-t/n_28.c | 47 + libraries/mcpp/cpp-test/test-t/n_29.c | 18 + libraries/mcpp/cpp-test/test-t/n_3.c | 34 + libraries/mcpp/cpp-test/test-t/n_30.c | 29 + libraries/mcpp/cpp-test/test-t/n_32.c | 14 + libraries/mcpp/cpp-test/test-t/n_37.c | 101 + libraries/mcpp/cpp-test/test-t/n_3_4.c | 13 + libraries/mcpp/cpp-test/test-t/n_4.c | 21 + libraries/mcpp/cpp-test/test-t/n_5.c | 17 + libraries/mcpp/cpp-test/test-t/n_6.c | 31 + libraries/mcpp/cpp-test/test-t/n_7.c | 27 + libraries/mcpp/cpp-test/test-t/n_8.c | 16 + libraries/mcpp/cpp-test/test-t/n_8_2.c | 6 + libraries/mcpp/cpp-test/test-t/n_9.c | 9 + libraries/mcpp/cpp-test/test-t/n_bool.C | 32 + libraries/mcpp/cpp-test/test-t/n_cnvucn.C | 16 + libraries/mcpp/cpp-test/test-t/n_cplus.C | 11 + libraries/mcpp/cpp-test/test-t/n_dslcom.c | 12 + .../mcpp/cpp-test/test-t/n_dslcom_cplus.C | 12 + libraries/mcpp/cpp-test/test-t/n_line.c | 15 + libraries/mcpp/cpp-test/test-t/n_llong.c | 24 + libraries/mcpp/cpp-test/test-t/n_nularg.c | 34 + libraries/mcpp/cpp-test/test-t/n_ppnum.c | 16 + libraries/mcpp/cpp-test/test-t/n_pragma.c | 42 + libraries/mcpp/cpp-test/test-t/n_stdmac.c | 18 + libraries/mcpp/cpp-test/test-t/n_tlimit.c | 160 + libraries/mcpp/cpp-test/test-t/n_token.C | 27 + libraries/mcpp/cpp-test/test-t/n_ucn1.c | 37 + libraries/mcpp/cpp-test/test-t/n_ucn1_cplus.C | 37 + libraries/mcpp/cpp-test/test-t/n_ucn2.c | 16 + libraries/mcpp/cpp-test/test-t/n_vargs.c | 28 + libraries/mcpp/cpp-test/test-t/nest1.h | 5 + libraries/mcpp/cpp-test/test-t/nest10.h | 2 + libraries/mcpp/cpp-test/test-t/nest11.h | 2 + libraries/mcpp/cpp-test/test-t/nest12.h | 2 + libraries/mcpp/cpp-test/test-t/nest13.h | 2 + libraries/mcpp/cpp-test/test-t/nest14.h | 2 + libraries/mcpp/cpp-test/test-t/nest15.h | 4 + libraries/mcpp/cpp-test/test-t/nest2.h | 5 + libraries/mcpp/cpp-test/test-t/nest3.h | 5 + libraries/mcpp/cpp-test/test-t/nest4.h | 5 + libraries/mcpp/cpp-test/test-t/nest5.h | 5 + libraries/mcpp/cpp-test/test-t/nest6.h | 5 + libraries/mcpp/cpp-test/test-t/nest7.h | 5 + libraries/mcpp/cpp-test/test-t/nest8.h | 7 + libraries/mcpp/cpp-test/test-t/nest9.h | 2 + libraries/mcpp/cpp-test/test-t/pragmas.h | 24 + libraries/mcpp/cpp-test/test-t/u_1_1.c | 24 + libraries/mcpp/cpp-test/test-t/u_1_11.c | 11 + libraries/mcpp/cpp-test/test-t/u_1_12.c | 8 + libraries/mcpp/cpp-test/test-t/u_1_13.c | 8 + libraries/mcpp/cpp-test/test-t/u_1_14.c | 14 + libraries/mcpp/cpp-test/test-t/u_1_17.c | 17 + libraries/mcpp/cpp-test/test-t/u_1_17s.c | 14 + libraries/mcpp/cpp-test/test-t/u_1_19.c | 35 + libraries/mcpp/cpp-test/test-t/u_1_22.c | 24 + libraries/mcpp/cpp-test/test-t/u_1_24.c | 36 + libraries/mcpp/cpp-test/test-t/u_1_25.c | 21 + libraries/mcpp/cpp-test/test-t/u_1_27.c | 9 + libraries/mcpp/cpp-test/test-t/u_1_28.c | 15 + libraries/mcpp/cpp-test/test-t/u_1_5.c | 18 + libraries/mcpp/cpp-test/test-t/u_1_8.c | 21 + libraries/mcpp/cpp-test/test-t/u_2.c | 15 + libraries/mcpp/cpp-test/test-t/u_concat.c | 13 + libraries/mcpp/cpp-test/test-t/u_cplus.C | 8 + libraries/mcpp/cpp-test/test-t/u_line.c | 17 + libraries/mcpp/cpp-test/test-t/u_line_s.c | 16 + libraries/mcpp/cpp-test/test-t/unbal1.h | 2 + libraries/mcpp/cpp-test/test-t/unbal2.h | 6 + libraries/mcpp/cpp-test/test-t/unbal3.h | 2 + libraries/mcpp/cpp-test/test-t/unbal4.h | 2 + libraries/mcpp/cpp-test/test-t/unbal5.h | 2 + libraries/mcpp/cpp-test/test-t/unbal6.h | 6 + libraries/mcpp/cpp-test/test-t/unspcs.c | 34 + libraries/mcpp/cpp-test/test-t/vers2.h | 12 + libraries/mcpp/cpp-test/test-t/warn_1_1.c | 13 + libraries/mcpp/cpp-test/test-t/warn_1_2.c | 20 + libraries/mcpp/cpp-test/test-t/warn_2.c | 19 + libraries/mcpp/cpp-test/test-t/warn_3.c | 117 + libraries/mcpp/doc-jp/LICENSE | 29 + libraries/mcpp/doc-jp/cpp-test.html | 4137 +++ libraries/mcpp/doc-jp/mcpp-manual.html | 4584 +++ libraries/mcpp/doc-jp/mcpp-porting.html | 1213 + libraries/mcpp/doc-jp/mcpp-summary.pdf | Bin 0 -> 159608 bytes libraries/mcpp/doc/LICENSE | 33 + libraries/mcpp/doc/cpp-test.html | 4088 +++ libraries/mcpp/doc/cpp_test.sum | 46 + libraries/mcpp/doc/mcpp-manual.html | 4617 +++ libraries/mcpp/doc/mcpp-porting.html | 1181 + libraries/mcpp/doc/mcpp-summary.pdf | Bin 0 -> 170539 bytes libraries/mcpp/mcpp-gcc.1 | 158 + libraries/mcpp/mcpp.1 | 120 + libraries/mcpp/noconfig/bc55.dif | 44 + libraries/mcpp/noconfig/bc59.dif | 73 + libraries/mcpp/noconfig/borlandc.mak | 140 + libraries/mcpp/noconfig/cyg1310.dif | 107 + libraries/mcpp/noconfig/cyg1518.dif | 44 + libraries/mcpp/noconfig/cygwin.mak | 179 + libraries/mcpp/noconfig/freebsd.mak | 201 + libraries/mcpp/noconfig/lcc0308.dif | 44 + libraries/mcpp/noconfig/lcc0603.dif | 44 + libraries/mcpp/noconfig/lcc_w32.mak | 112 + libraries/mcpp/noconfig/linux.mak | 212 + libraries/mcpp/noconfig/linux_gcc2953.dif | 105 + libraries/mcpp/noconfig/linux_gcc32.dif | 76 + libraries/mcpp/noconfig/linux_gcc336.dif | 76 + libraries/mcpp/noconfig/linux_gcc343.dif | 42 + libraries/mcpp/noconfig/linux_gcc412.dif | 86 + libraries/mcpp/noconfig/mac_gcc401_i686.dif | 86 + .../mcpp/noconfig/mac_gcc401_powerpc.dif | 86 + libraries/mcpp/noconfig/mac_osx.mak | 222 + libraries/mcpp/noconfig/mingw.mak | 187 + libraries/mcpp/noconfig/mingw345.dif | 44 + libraries/mcpp/noconfig/vc2002.dif | 67 + libraries/mcpp/noconfig/vc2003.dif | 67 + libraries/mcpp/noconfig/vc2005.dif | 67 + libraries/mcpp/noconfig/vc2008.dif | 44 + libraries/mcpp/noconfig/vc6.dif | 67 + libraries/mcpp/noconfig/visualc.mak | 151 + libraries/mcpp/src/Makefile.am | 52 + libraries/mcpp/src/Makefile.in | 687 + libraries/mcpp/src/cc1.c | 61 + libraries/mcpp/src/config.h.in | 226 + libraries/mcpp/src/configed.H | 382 + libraries/mcpp/src/directive.c | 1699 ++ libraries/mcpp/src/eval.c | 1673 ++ libraries/mcpp/src/expand.c | 2980 ++ libraries/mcpp/src/internal.H | 562 + libraries/mcpp/src/main.c | 1129 + libraries/mcpp/src/main_libmcpp.c | 9 + libraries/mcpp/src/mbchar.c | 869 + libraries/mcpp/src/mcpp_lib.def | 7 + libraries/mcpp/src/mcpp_lib.h | 31 + libraries/mcpp/src/mcpp_out.h | 13 + libraries/mcpp/src/noconfig.H | 608 + libraries/mcpp/src/preproc.c | 9 + libraries/mcpp/src/set_mcpp.sh | 291 + libraries/mcpp/src/support.c | 2809 ++ libraries/mcpp/src/system.H | 396 + libraries/mcpp/src/system.c | 4913 ++++ libraries/mcpp/src/testmain.c | 83 + libraries/mcpp/src/unset_mcpp.sh | 95 + libraries/mcpp/test-c/LICENSE | 29 + libraries/mcpp/test-c/defs.h | 21 + libraries/mcpp/test-c/e_12_8.c | 11 + libraries/mcpp/test-c/e_14.c | 43 + libraries/mcpp/test-c/e_14_10.c | 19 + libraries/mcpp/test-c/e_14_7.c | 19 + libraries/mcpp/test-c/e_14_9.c | 11 + libraries/mcpp/test-c/e_15_3.c | 21 + libraries/mcpp/test-c/e_16.c | 15 + libraries/mcpp/test-c/e_17.c | 34 + libraries/mcpp/test-c/e_18_4.c | 36 + libraries/mcpp/test-c/e_19_3.c | 37 + libraries/mcpp/test-c/e_23_3.c | 16 + libraries/mcpp/test-c/e_24_6.c | 11 + libraries/mcpp/test-c/e_25_6.c | 18 + libraries/mcpp/test-c/e_27_7.c | 16 + libraries/mcpp/test-c/e_29_3.c | 17 + libraries/mcpp/test-c/e_31.c | 15 + libraries/mcpp/test-c/e_31_3.c | 15 + libraries/mcpp/test-c/e_32_5.c | 12 + libraries/mcpp/test-c/e_33_2.c | 12 + libraries/mcpp/test-c/e_35_2.c | 13 + libraries/mcpp/test-c/e_4_3.c | 11 + libraries/mcpp/test-c/e_7_4.c | 12 + libraries/mcpp/test-c/e_std.c | 376 + libraries/mcpp/test-c/header.h | 3 + libraries/mcpp/test-c/i_32_3.c | 26 + libraries/mcpp/test-c/i_35.c | 19 + libraries/mcpp/test-c/i_35_3.c | 19 + libraries/mcpp/test-c/ifdef15.h | 48 + libraries/mcpp/test-c/line.h | 7 + libraries/mcpp/test-c/m1024.h | 1026 + libraries/mcpp/test-c/m_33_big5.c | 31 + libraries/mcpp/test-c/m_33_eucjp.c | 31 + libraries/mcpp/test-c/m_33_gb.c | 31 + libraries/mcpp/test-c/m_33_jis.c | 33 + libraries/mcpp/test-c/m_33_ksc.c | 31 + libraries/mcpp/test-c/m_33_sjis.c | 31 + libraries/mcpp/test-c/m_33_utf8.c | 31 + libraries/mcpp/test-c/m_34_big5.c | 26 + libraries/mcpp/test-c/m_34_eucjp.c | 26 + libraries/mcpp/test-c/m_34_gb.c | 26 + libraries/mcpp/test-c/m_34_jis.c | 27 + libraries/mcpp/test-c/m_34_ksc.c | 26 + libraries/mcpp/test-c/m_34_sjis.c | 26 + libraries/mcpp/test-c/m_34_utf8.c | 26 + libraries/mcpp/test-c/m_36_big5.c | 29 + libraries/mcpp/test-c/m_36_jis.c | 33 + libraries/mcpp/test-c/m_36_sjis.c | 29 + libraries/mcpp/test-c/n_1.c | 28 + libraries/mcpp/test-c/n_10.c | 36 + libraries/mcpp/test-c/n_11.c | 40 + libraries/mcpp/test-c/n_12.c | 59 + libraries/mcpp/test-c/n_13.c | 51 + libraries/mcpp/test-c/n_13_13.c | 39 + libraries/mcpp/test-c/n_13_5.c | 36 + libraries/mcpp/test-c/n_13_7.c | 31 + libraries/mcpp/test-c/n_13_8.c | 46 + libraries/mcpp/test-c/n_15.c | 29 + libraries/mcpp/test-c/n_18.c | 33 + libraries/mcpp/test-c/n_19.c | 27 + libraries/mcpp/test-c/n_2.c | 41 + libraries/mcpp/test-c/n_20.c | 19 + libraries/mcpp/test-c/n_21.c | 24 + libraries/mcpp/test-c/n_22.c | 26 + libraries/mcpp/test-c/n_23.c | 26 + libraries/mcpp/test-c/n_24.c | 36 + libraries/mcpp/test-c/n_25.c | 42 + libraries/mcpp/test-c/n_26.c | 56 + libraries/mcpp/test-c/n_27.c | 61 + libraries/mcpp/test-c/n_28.c | 40 + libraries/mcpp/test-c/n_29.c | 22 + libraries/mcpp/test-c/n_3.c | 35 + libraries/mcpp/test-c/n_30.c | 33 + libraries/mcpp/test-c/n_32.c | 24 + libraries/mcpp/test-c/n_37.c | 108 + libraries/mcpp/test-c/n_3_4.c | 8 + libraries/mcpp/test-c/n_4.c | 20 + libraries/mcpp/test-c/n_5.c | 20 + libraries/mcpp/test-c/n_6.c | 32 + libraries/mcpp/test-c/n_7.c | 28 + libraries/mcpp/test-c/n_8.c | 12 + libraries/mcpp/test-c/n_8_2.c | 5 + libraries/mcpp/test-c/n_9.c | 16 + libraries/mcpp/test-c/n_i_.lst | 35 + libraries/mcpp/test-c/n_std.c | 957 + libraries/mcpp/test-c/nest1.h | 5 + libraries/mcpp/test-c/nest10.h | 2 + libraries/mcpp/test-c/nest11.h | 2 + libraries/mcpp/test-c/nest12.h | 2 + libraries/mcpp/test-c/nest13.h | 2 + libraries/mcpp/test-c/nest14.h | 2 + libraries/mcpp/test-c/nest15.h | 4 + libraries/mcpp/test-c/nest2.h | 5 + libraries/mcpp/test-c/nest3.h | 5 + libraries/mcpp/test-c/nest4.h | 5 + libraries/mcpp/test-c/nest5.h | 5 + libraries/mcpp/test-c/nest6.h | 5 + libraries/mcpp/test-c/nest7.h | 5 + libraries/mcpp/test-c/nest8.h | 8 + libraries/mcpp/test-c/nest9.h | 2 + libraries/mcpp/test-c/side_cpp | 46 + libraries/mcpp/test-c/u_1_1.c | 24 + libraries/mcpp/test-c/u_1_11.c | 15 + libraries/mcpp/test-c/u_1_12.c | 11 + libraries/mcpp/test-c/u_1_13.c | 11 + libraries/mcpp/test-c/u_1_14.c | 18 + libraries/mcpp/test-c/u_1_17.c | 27 + libraries/mcpp/test-c/u_1_19.c | 45 + libraries/mcpp/test-c/u_1_22.c | 25 + libraries/mcpp/test-c/u_1_23.c | 16 + libraries/mcpp/test-c/u_1_24.c | 47 + libraries/mcpp/test-c/u_1_25.c | 26 + libraries/mcpp/test-c/u_1_27.c | 11 + libraries/mcpp/test-c/u_1_28.c | 17 + libraries/mcpp/test-c/u_1_5.c | 18 + libraries/mcpp/test-c/u_1_7_big5.c | 13 + libraries/mcpp/test-c/u_1_7_eucjp.c | 12 + libraries/mcpp/test-c/u_1_7_gb.c | 13 + libraries/mcpp/test-c/u_1_7_jis.c | 12 + libraries/mcpp/test-c/u_1_7_ksc.c | 13 + libraries/mcpp/test-c/u_1_7_sjis.c | 13 + libraries/mcpp/test-c/u_1_7_utf8.c | 16 + libraries/mcpp/test-c/u_1_8.c | 21 + libraries/mcpp/test-c/u_2.c | 17 + libraries/mcpp/test-c/unbal1.h | 2 + libraries/mcpp/test-c/unbal2.h | 6 + libraries/mcpp/test-c/unbal3.h | 2 + libraries/mcpp/test-c/unbal4.h | 2 + libraries/mcpp/test-c/unbal5.h | 2 + libraries/mcpp/test-c/unbal6.h | 6 + libraries/mcpp/test-c/undefs.c | 240 + libraries/mcpp/test-c/unspcs.c | 36 + libraries/mcpp/test-c/warns.c | 161 + libraries/mcpp/test-l/LICENSE | 29 + libraries/mcpp/test-l/defs.h | 38 + libraries/mcpp/test-l/ifdef127.h | 389 + libraries/mcpp/test-l/ifdef255.h | 388 + libraries/mcpp/test-l/l_37_1.t | 24 + libraries/mcpp/test-l/l_37_2.t | 24 + libraries/mcpp/test-l/l_37_3.c | 48 + libraries/mcpp/test-l/l_37_3.t | 18 + libraries/mcpp/test-l/l_37_4.t | 6 + libraries/mcpp/test-l/l_37_5.t | 7 + libraries/mcpp/test-l/l_37_6.c | 85 + libraries/mcpp/test-l/l_37_6.t | 73 + libraries/mcpp/test-l/l_37_7.c | 146 + libraries/mcpp/test-l/l_37_7.t | 135 + libraries/mcpp/test-l/l_37_8.c | 7 + libraries/mcpp/test-l/l_37_9.t | 14 + libraries/mcpp/test-l/longline.c | 1537 + libraries/mcpp/test-l/m8191.h | 8196 ++++++ libraries/mcpp/test-l/nest1.h | 2 + libraries/mcpp/test-l/nest10.h | 2 + libraries/mcpp/test-l/nest100.h | 2 + libraries/mcpp/test-l/nest101.h | 2 + libraries/mcpp/test-l/nest102.h | 2 + libraries/mcpp/test-l/nest103.h | 2 + libraries/mcpp/test-l/nest104.h | 2 + libraries/mcpp/test-l/nest105.h | 2 + libraries/mcpp/test-l/nest106.h | 2 + libraries/mcpp/test-l/nest107.h | 2 + libraries/mcpp/test-l/nest108.h | 2 + libraries/mcpp/test-l/nest109.h | 2 + libraries/mcpp/test-l/nest11.h | 2 + libraries/mcpp/test-l/nest110.h | 2 + libraries/mcpp/test-l/nest111.h | 2 + libraries/mcpp/test-l/nest112.h | 2 + libraries/mcpp/test-l/nest113.h | 2 + libraries/mcpp/test-l/nest114.h | 2 + libraries/mcpp/test-l/nest115.h | 2 + libraries/mcpp/test-l/nest116.h | 2 + libraries/mcpp/test-l/nest117.h | 2 + libraries/mcpp/test-l/nest118.h | 2 + libraries/mcpp/test-l/nest119.h | 2 + libraries/mcpp/test-l/nest12.h | 2 + libraries/mcpp/test-l/nest120.h | 2 + libraries/mcpp/test-l/nest121.h | 2 + libraries/mcpp/test-l/nest122.h | 2 + libraries/mcpp/test-l/nest123.h | 2 + libraries/mcpp/test-l/nest124.h | 2 + libraries/mcpp/test-l/nest125.h | 2 + libraries/mcpp/test-l/nest126.h | 2 + libraries/mcpp/test-l/nest127.h | 2 + libraries/mcpp/test-l/nest13.h | 2 + libraries/mcpp/test-l/nest14.h | 2 + libraries/mcpp/test-l/nest15.h | 6 + libraries/mcpp/test-l/nest16.h | 2 + libraries/mcpp/test-l/nest17.h | 2 + libraries/mcpp/test-l/nest18.h | 2 + libraries/mcpp/test-l/nest19.h | 2 + libraries/mcpp/test-l/nest2.h | 2 + libraries/mcpp/test-l/nest20.h | 2 + libraries/mcpp/test-l/nest21.h | 2 + libraries/mcpp/test-l/nest22.h | 2 + libraries/mcpp/test-l/nest23.h | 2 + libraries/mcpp/test-l/nest24.h | 2 + libraries/mcpp/test-l/nest25.h | 2 + libraries/mcpp/test-l/nest26.h | 2 + libraries/mcpp/test-l/nest27.h | 2 + libraries/mcpp/test-l/nest28.h | 2 + libraries/mcpp/test-l/nest29.h | 2 + libraries/mcpp/test-l/nest3.h | 2 + libraries/mcpp/test-l/nest30.h | 2 + libraries/mcpp/test-l/nest31.h | 6 + libraries/mcpp/test-l/nest32.h | 2 + libraries/mcpp/test-l/nest33.h | 2 + libraries/mcpp/test-l/nest34.h | 2 + libraries/mcpp/test-l/nest35.h | 2 + libraries/mcpp/test-l/nest36.h | 2 + libraries/mcpp/test-l/nest37.h | 2 + libraries/mcpp/test-l/nest38.h | 2 + libraries/mcpp/test-l/nest39.h | 2 + libraries/mcpp/test-l/nest4.h | 2 + libraries/mcpp/test-l/nest40.h | 2 + libraries/mcpp/test-l/nest41.h | 2 + libraries/mcpp/test-l/nest42.h | 2 + libraries/mcpp/test-l/nest43.h | 2 + libraries/mcpp/test-l/nest44.h | 2 + libraries/mcpp/test-l/nest45.h | 2 + libraries/mcpp/test-l/nest46.h | 2 + libraries/mcpp/test-l/nest47.h | 2 + libraries/mcpp/test-l/nest48.h | 2 + libraries/mcpp/test-l/nest49.h | 2 + libraries/mcpp/test-l/nest5.h | 2 + libraries/mcpp/test-l/nest50.h | 2 + libraries/mcpp/test-l/nest51.h | 2 + libraries/mcpp/test-l/nest52.h | 2 + libraries/mcpp/test-l/nest53.h | 2 + libraries/mcpp/test-l/nest54.h | 2 + libraries/mcpp/test-l/nest55.h | 2 + libraries/mcpp/test-l/nest56.h | 2 + libraries/mcpp/test-l/nest57.h | 2 + libraries/mcpp/test-l/nest58.h | 2 + libraries/mcpp/test-l/nest59.h | 2 + libraries/mcpp/test-l/nest6.h | 2 + libraries/mcpp/test-l/nest60.h | 2 + libraries/mcpp/test-l/nest61.h | 2 + libraries/mcpp/test-l/nest62.h | 2 + libraries/mcpp/test-l/nest63.h | 6 + libraries/mcpp/test-l/nest64.h | 2 + libraries/mcpp/test-l/nest65.h | 2 + libraries/mcpp/test-l/nest66.h | 2 + libraries/mcpp/test-l/nest67.h | 2 + libraries/mcpp/test-l/nest68.h | 2 + libraries/mcpp/test-l/nest69.h | 2 + libraries/mcpp/test-l/nest7.h | 2 + libraries/mcpp/test-l/nest70.h | 2 + libraries/mcpp/test-l/nest71.h | 2 + libraries/mcpp/test-l/nest72.h | 2 + libraries/mcpp/test-l/nest73.h | 2 + libraries/mcpp/test-l/nest74.h | 2 + libraries/mcpp/test-l/nest75.h | 2 + libraries/mcpp/test-l/nest76.h | 2 + libraries/mcpp/test-l/nest77.h | 2 + libraries/mcpp/test-l/nest78.h | 2 + libraries/mcpp/test-l/nest79.h | 2 + libraries/mcpp/test-l/nest8.h | 2 + libraries/mcpp/test-l/nest80.h | 2 + libraries/mcpp/test-l/nest81.h | 2 + libraries/mcpp/test-l/nest82.h | 2 + libraries/mcpp/test-l/nest83.h | 2 + libraries/mcpp/test-l/nest84.h | 2 + libraries/mcpp/test-l/nest85.h | 2 + libraries/mcpp/test-l/nest86.h | 2 + libraries/mcpp/test-l/nest87.h | 2 + libraries/mcpp/test-l/nest88.h | 2 + libraries/mcpp/test-l/nest89.h | 2 + libraries/mcpp/test-l/nest9.h | 2 + libraries/mcpp/test-l/nest90.h | 2 + libraries/mcpp/test-l/nest91.h | 2 + libraries/mcpp/test-l/nest92.h | 2 + libraries/mcpp/test-l/nest93.h | 2 + libraries/mcpp/test-l/nest94.h | 2 + libraries/mcpp/test-l/nest95.h | 2 + libraries/mcpp/test-l/nest96.h | 2 + libraries/mcpp/test-l/nest97.h | 2 + libraries/mcpp/test-l/nest98.h | 2 + libraries/mcpp/test-l/nest99.h | 2 + libraries/mcpp/test-t/LICENSE | 29 + libraries/mcpp/test-t/e_12_8.t | 6 + libraries/mcpp/test-t/e_14.t | 38 + libraries/mcpp/test-t/e_14_10.t | 17 + libraries/mcpp/test-t/e_14_7.t | 14 + libraries/mcpp/test-t/e_14_9.t | 6 + libraries/mcpp/test-t/e_15_3.t | 16 + libraries/mcpp/test-t/e_16.t | 10 + libraries/mcpp/test-t/e_17.t | 37 + libraries/mcpp/test-t/e_18_4.t | 31 + libraries/mcpp/test-t/e_19_3.t | 34 + libraries/mcpp/test-t/e_23_3.t | 11 + libraries/mcpp/test-t/e_24_6.t | 6 + libraries/mcpp/test-t/e_25_6.t | 14 + libraries/mcpp/test-t/e_27_7.t | 11 + libraries/mcpp/test-t/e_29_3.t | 12 + libraries/mcpp/test-t/e_31.t | 10 + libraries/mcpp/test-t/e_31_3.t | 10 + libraries/mcpp/test-t/e_32_5.t | 7 + libraries/mcpp/test-t/e_33_2.t | 7 + libraries/mcpp/test-t/e_35_2.t | 6 + libraries/mcpp/test-t/e_4_3.t | 6 + libraries/mcpp/test-t/e_7_4.t | 9 + libraries/mcpp/test-t/e_intmax.t | 23 + libraries/mcpp/test-t/e_operat.cc | 10 + libraries/mcpp/test-t/e_operat.t | 10 + libraries/mcpp/test-t/e_post.t | 314 + libraries/mcpp/test-t/e_pragma.t | 4 + libraries/mcpp/test-t/e_std.t | 354 + libraries/mcpp/test-t/e_std99.t | 66 + libraries/mcpp/test-t/e_ucn.t | 7 + libraries/mcpp/test-t/e_vargs.t | 17 + libraries/mcpp/test-t/header.h | 3 + libraries/mcpp/test-t/i_32_3.t | 13 + libraries/mcpp/test-t/i_35.t | 8 + libraries/mcpp/test-t/i_35_3.t | 8 + libraries/mcpp/test-t/i_mbident.t | 17 + libraries/mcpp/test-t/ifdef15.h | 50 + libraries/mcpp/test-t/ifdef31.h | 52 + libraries/mcpp/test-t/ifdef63.h | 99 + libraries/mcpp/test-t/line.h | 3 + libraries/mcpp/test-t/long4095.h | 166 + libraries/mcpp/test-t/m4095.h | 4101 +++ libraries/mcpp/test-t/m_33_big5.t | 22 + libraries/mcpp/test-t/m_33_eucjp.t | 22 + libraries/mcpp/test-t/m_33_gb.t | 22 + libraries/mcpp/test-t/m_33_jis.t | 24 + libraries/mcpp/test-t/m_33_ksc.t | 22 + libraries/mcpp/test-t/m_33_sjis.t | 22 + libraries/mcpp/test-t/m_33_utf8.t | 22 + libraries/mcpp/test-t/m_34_big5.t | 13 + libraries/mcpp/test-t/m_34_eucjp.t | 13 + libraries/mcpp/test-t/m_34_gb.t | 13 + libraries/mcpp/test-t/m_34_jis.t | 14 + libraries/mcpp/test-t/m_34_ksc.t | 13 + libraries/mcpp/test-t/m_34_sjis.t | 13 + libraries/mcpp/test-t/m_34_utf8.t | 13 + libraries/mcpp/test-t/m_36_big5.t | 20 + libraries/mcpp/test-t/m_36_jis.t | 31 + libraries/mcpp/test-t/m_36_sjis.t | 24 + libraries/mcpp/test-t/misc.t | 401 + libraries/mcpp/test-t/n_1.t | 15 + libraries/mcpp/test-t/n_10.t | 27 + libraries/mcpp/test-t/n_11.t | 28 + libraries/mcpp/test-t/n_12.t | 42 + libraries/mcpp/test-t/n_13.t | 37 + libraries/mcpp/test-t/n_13_13.t | 30 + libraries/mcpp/test-t/n_13_5.t | 22 + libraries/mcpp/test-t/n_13_7.t | 25 + libraries/mcpp/test-t/n_13_8.t | 31 + libraries/mcpp/test-t/n_15.t | 20 + libraries/mcpp/test-t/n_18.t | 24 + libraries/mcpp/test-t/n_19.t | 16 + libraries/mcpp/test-t/n_2.t | 34 + libraries/mcpp/test-t/n_20.t | 7 + libraries/mcpp/test-t/n_21.t | 13 + libraries/mcpp/test-t/n_22.t | 17 + libraries/mcpp/test-t/n_23.t | 14 + libraries/mcpp/test-t/n_24.t | 32 + libraries/mcpp/test-t/n_25.t | 35 + libraries/mcpp/test-t/n_26.t | 28 + libraries/mcpp/test-t/n_27.t | 51 + libraries/mcpp/test-t/n_28.t | 32 + libraries/mcpp/test-t/n_29.t | 11 + libraries/mcpp/test-t/n_3.t | 26 + libraries/mcpp/test-t/n_30.t | 18 + libraries/mcpp/test-t/n_32.t | 12 + libraries/mcpp/test-t/n_37.t | 88 + libraries/mcpp/test-t/n_3_4.t | 8 + libraries/mcpp/test-t/n_4.t | 12 + libraries/mcpp/test-t/n_5.t | 10 + libraries/mcpp/test-t/n_6.t | 22 + libraries/mcpp/test-t/n_7.t | 18 + libraries/mcpp/test-t/n_8.t | 12 + libraries/mcpp/test-t/n_8_2.t | 5 + libraries/mcpp/test-t/n_9.t | 7 + libraries/mcpp/test-t/n_bool.cc | 23 + libraries/mcpp/test-t/n_bool.t | 23 + libraries/mcpp/test-t/n_cnvucn.cc | 23 + libraries/mcpp/test-t/n_cnvucn.t | 23 + libraries/mcpp/test-t/n_cplus.cc | 5 + libraries/mcpp/test-t/n_cplus.t | 5 + libraries/mcpp/test-t/n_dslcom.cc | 4 + libraries/mcpp/test-t/n_dslcom.t | 4 + libraries/mcpp/test-t/n_line.t | 7 + libraries/mcpp/test-t/n_llong.t | 20 + libraries/mcpp/test-t/n_nularg.t | 26 + libraries/mcpp/test-t/n_post.t | 772 + libraries/mcpp/test-t/n_post99.t | 275 + libraries/mcpp/test-t/n_ppnum.t | 8 + libraries/mcpp/test-t/n_pragma.t | 32 + libraries/mcpp/test-t/n_std.t | 831 + libraries/mcpp/test-t/n_std99.t | 319 + libraries/mcpp/test-t/n_stdmac.t | 8 + libraries/mcpp/test-t/n_tlim_2.t | 28 + libraries/mcpp/test-t/n_tlim_3.t | 5 + libraries/mcpp/test-t/n_tlim_4.t | 5 + libraries/mcpp/test-t/n_tlim_5.t | 5 + libraries/mcpp/test-t/n_tlim_6.t | 16 + libraries/mcpp/test-t/n_tlim_7.t | 70 + libraries/mcpp/test-t/n_tlim_8.t | 3 + libraries/mcpp/test-t/n_tlim_9.t | 7 + libraries/mcpp/test-t/n_tlimit.t | 147 + libraries/mcpp/test-t/n_token.cc | 18 + libraries/mcpp/test-t/n_token.t | 18 + libraries/mcpp/test-t/n_ucn1.cc | 24 + libraries/mcpp/test-t/n_ucn1.t | 25 + libraries/mcpp/test-t/n_ucn2.t | 8 + libraries/mcpp/test-t/n_vargs.t | 17 + libraries/mcpp/test-t/nest1.h | 5 + libraries/mcpp/test-t/nest10.h | 2 + libraries/mcpp/test-t/nest11.h | 2 + libraries/mcpp/test-t/nest12.h | 2 + libraries/mcpp/test-t/nest13.h | 2 + libraries/mcpp/test-t/nest14.h | 2 + libraries/mcpp/test-t/nest15.h | 4 + libraries/mcpp/test-t/nest2.h | 5 + libraries/mcpp/test-t/nest3.h | 5 + libraries/mcpp/test-t/nest4.h | 5 + libraries/mcpp/test-t/nest5.h | 5 + libraries/mcpp/test-t/nest6.h | 5 + libraries/mcpp/test-t/nest7.h | 5 + libraries/mcpp/test-t/nest8.h | 7 + libraries/mcpp/test-t/nest9.h | 2 + libraries/mcpp/test-t/pragmas.h | 24 + libraries/mcpp/test-t/recurs.t | 21 + libraries/mcpp/test-t/trad.t | 64 + libraries/mcpp/test-t/u_1_1.t | 18 + libraries/mcpp/test-t/u_1_11.t | 9 + libraries/mcpp/test-t/u_1_12.t | 6 + libraries/mcpp/test-t/u_1_13.t | 6 + libraries/mcpp/test-t/u_1_14.t | 15 + libraries/mcpp/test-t/u_1_17.t | 26 + libraries/mcpp/test-t/u_1_19.t | 37 + libraries/mcpp/test-t/u_1_22.t | 22 + libraries/mcpp/test-t/u_1_24.t | 37 + libraries/mcpp/test-t/u_1_25.t | 18 + libraries/mcpp/test-t/u_1_27.t | 6 + libraries/mcpp/test-t/u_1_28.t | 13 + libraries/mcpp/test-t/u_1_5.t | 13 + libraries/mcpp/test-t/u_1_7_big5.t | 9 + libraries/mcpp/test-t/u_1_7_eucjp.t | 8 + libraries/mcpp/test-t/u_1_7_gb.t | 9 + libraries/mcpp/test-t/u_1_7_jis.t | 8 + libraries/mcpp/test-t/u_1_7_ksc.t | 9 + libraries/mcpp/test-t/u_1_7_sjis.t | 9 + libraries/mcpp/test-t/u_1_7_utf8.t | 11 + libraries/mcpp/test-t/u_1_8.t | 7 + libraries/mcpp/test-t/u_1_9.t | 10 + libraries/mcpp/test-t/u_2.t | 12 + libraries/mcpp/test-t/u_concat.t | 10 + libraries/mcpp/test-t/u_cplus.cc | 5 + libraries/mcpp/test-t/u_cplus.t | 5 + libraries/mcpp/test-t/u_line.t | 12 + libraries/mcpp/test-t/unbal1.h | 2 + libraries/mcpp/test-t/unbal2.h | 6 + libraries/mcpp/test-t/unbal3.h | 2 + libraries/mcpp/test-t/unbal4.h | 2 + libraries/mcpp/test-t/unbal5.h | 2 + libraries/mcpp/test-t/unbal6.h | 6 + libraries/mcpp/test-t/undefs.t | 239 + libraries/mcpp/test-t/unspcs.t | 29 + libraries/mcpp/test-t/vers2.h | 12 + libraries/mcpp/test-t/warns.t | 137 + libraries/mcpp/tests/Makefile.am | 40 + libraries/mcpp/tests/Makefile.in | 411 + libraries/mcpp/tests/after_test.sh | 34 + libraries/mcpp/tests/set_test.sh | 52 + libraries/mcpp/tool/LICENSE | 3 + libraries/mcpp/tool/app_once.bat | 3 + libraries/mcpp/tool/clock_of.c | 45 + libraries/mcpp/tool/cpp_test.c | 178 + libraries/mcpp/tool/ins_once.c | 291 + libraries/mcpp/tool/once.txt | 2 + libraries/mcpp/tool/rm_once.c | 40 + libraries/mcpp/tool/total.c | 234 + 853 files changed, 140033 insertions(+) create mode 100644 libraries/mcpp/ChangeLog create mode 100644 libraries/mcpp/ChangeLog.old create mode 100644 libraries/mcpp/INSTALL create mode 100644 libraries/mcpp/INSTALL-jp create mode 100644 libraries/mcpp/LICENSE create mode 100644 libraries/mcpp/Makefile.am create mode 100644 libraries/mcpp/Makefile.in create mode 100644 libraries/mcpp/NEWS create mode 100644 libraries/mcpp/README create mode 100644 libraries/mcpp/aclocal.m4 create mode 100644 libraries/mcpp/bin/mcpp-manual.html create mode 100644 libraries/mcpp/bin/mcpp-summary-272.pdf create mode 100644 libraries/mcpp/bin/mcpp.exe create mode 100644 libraries/mcpp/config/compile create mode 100644 libraries/mcpp/config/config.guess create mode 100644 libraries/mcpp/config/config.sub create mode 100644 libraries/mcpp/config/cygwin_root create mode 100644 libraries/mcpp/config/depcomp create mode 100644 libraries/mcpp/config/install-sh create mode 100644 libraries/mcpp/config/ltmain.sh create mode 100644 libraries/mcpp/config/mb_big5 create mode 100644 libraries/mcpp/config/mb_jis create mode 100644 libraries/mcpp/config/mb_sjis create mode 100644 libraries/mcpp/config/mingw_root create mode 100644 libraries/mcpp/config/missing create mode 100644 libraries/mcpp/configure create mode 100644 libraries/mcpp/configure.ac create mode 100644 libraries/mcpp/cpp-test/LICENSE create mode 100644 libraries/mcpp/cpp-test/test-l/cpp-test.exp create mode 100644 libraries/mcpp/cpp-test/test-l/ifdef127.h create mode 100644 libraries/mcpp/cpp-test/test-l/ifdef255.h create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_1.h create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_2.c create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_3.c create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_4.c create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_5.c create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_6.c create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_7.c create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_8.c create mode 100644 libraries/mcpp/cpp-test/test-l/l_37_9.c create mode 100644 libraries/mcpp/cpp-test/test-l/longline.t create mode 100644 libraries/mcpp/cpp-test/test-l/m8191.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest1.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest10.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest100.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest101.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest102.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest103.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest104.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest105.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest106.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest107.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest108.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest109.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest11.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest110.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest111.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest112.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest113.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest114.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest115.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest116.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest117.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest118.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest119.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest12.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest120.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest121.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest122.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest123.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest124.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest125.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest126.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest127.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest13.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest14.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest15.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest16.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest17.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest18.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest19.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest2.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest20.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest21.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest22.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest23.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest24.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest25.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest26.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest27.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest28.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest29.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest3.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest30.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest31.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest32.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest33.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest34.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest35.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest36.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest37.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest38.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest39.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest4.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest40.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest41.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest42.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest43.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest44.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest45.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest46.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest47.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest48.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest49.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest5.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest50.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest51.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest52.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest53.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest54.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest55.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest56.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest57.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest58.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest59.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest6.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest60.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest61.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest62.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest63.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest64.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest65.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest66.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest67.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest68.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest69.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest7.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest70.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest71.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest72.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest73.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest74.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest75.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest76.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest77.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest78.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest79.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest8.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest80.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest81.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest82.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest83.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest84.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest85.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest86.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest87.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest88.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest89.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest9.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest90.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest91.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest92.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest93.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest94.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest95.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest96.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest97.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest98.h create mode 100644 libraries/mcpp/cpp-test/test-l/nest99.h create mode 100644 libraries/mcpp/cpp-test/test-t/cpp-test.exp create mode 100644 libraries/mcpp/cpp-test/test-t/e_12_8.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_14.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_14_10.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_14_2.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_14_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_14_7.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_14_9.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_15_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_16.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_17.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_17_5.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_18_4.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_19_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_23_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_24_6.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_25_6.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_27_7.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_29_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_31.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_31_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_32_5.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_33_2.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_35_2.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_4_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_7_4.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_intmax.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_operat.C create mode 100644 libraries/mcpp/cpp-test/test-t/e_pragma.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_ucn.c create mode 100644 libraries/mcpp/cpp-test/test-t/e_vargs.c create mode 100644 libraries/mcpp/cpp-test/test-t/header.h create mode 100644 libraries/mcpp/cpp-test/test-t/i_32_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/i_35.c create mode 100644 libraries/mcpp/cpp-test/test-t/ifdef15.h create mode 100644 libraries/mcpp/cpp-test/test-t/ifdef31.h create mode 100644 libraries/mcpp/cpp-test/test-t/ifdef63.h create mode 100644 libraries/mcpp/cpp-test/test-t/line.h create mode 100644 libraries/mcpp/cpp-test/test-t/long4095.h create mode 100644 libraries/mcpp/cpp-test/test-t/m4095.h create mode 100644 libraries/mcpp/cpp-test/test-t/n_1.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_10.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_11.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_12.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_13.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_13_13.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_13_5.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_13_7.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_13_8.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_15.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_18.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_19.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_1_3_run.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_1_3_run.c.gcc2 create mode 100644 libraries/mcpp/cpp-test/test-t/n_1_3_run.c.gcc3 create mode 100644 libraries/mcpp/cpp-test/test-t/n_2.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_20.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_21.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_22.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_23.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_24.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_24_3_run.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_24_3_run.c.gcc2 create mode 100644 libraries/mcpp/cpp-test/test-t/n_24_3_run.c.gcc3 create mode 100644 libraries/mcpp/cpp-test/test-t/n_25.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_26.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_27.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_28.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_29.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_3.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_30.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_32.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_37.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_3_4.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_4.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_5.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_6.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_7.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_8.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_8_2.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_9.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_bool.C create mode 100644 libraries/mcpp/cpp-test/test-t/n_cnvucn.C create mode 100644 libraries/mcpp/cpp-test/test-t/n_cplus.C create mode 100644 libraries/mcpp/cpp-test/test-t/n_dslcom.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_dslcom_cplus.C create mode 100644 libraries/mcpp/cpp-test/test-t/n_line.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_llong.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_nularg.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_ppnum.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_pragma.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_stdmac.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_tlimit.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_token.C create mode 100644 libraries/mcpp/cpp-test/test-t/n_ucn1.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_ucn1_cplus.C create mode 100644 libraries/mcpp/cpp-test/test-t/n_ucn2.c create mode 100644 libraries/mcpp/cpp-test/test-t/n_vargs.c create mode 100644 libraries/mcpp/cpp-test/test-t/nest1.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest10.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest11.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest12.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest13.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest14.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest15.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest2.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest3.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest4.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest5.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest6.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest7.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest8.h create mode 100644 libraries/mcpp/cpp-test/test-t/nest9.h create mode 100644 libraries/mcpp/cpp-test/test-t/pragmas.h create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_1.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_11.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_12.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_13.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_14.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_17.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_17s.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_19.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_22.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_24.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_25.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_27.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_28.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_5.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_1_8.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_2.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_concat.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_cplus.C create mode 100644 libraries/mcpp/cpp-test/test-t/u_line.c create mode 100644 libraries/mcpp/cpp-test/test-t/u_line_s.c create mode 100644 libraries/mcpp/cpp-test/test-t/unbal1.h create mode 100644 libraries/mcpp/cpp-test/test-t/unbal2.h create mode 100644 libraries/mcpp/cpp-test/test-t/unbal3.h create mode 100644 libraries/mcpp/cpp-test/test-t/unbal4.h create mode 100644 libraries/mcpp/cpp-test/test-t/unbal5.h create mode 100644 libraries/mcpp/cpp-test/test-t/unbal6.h create mode 100644 libraries/mcpp/cpp-test/test-t/unspcs.c create mode 100644 libraries/mcpp/cpp-test/test-t/vers2.h create mode 100644 libraries/mcpp/cpp-test/test-t/warn_1_1.c create mode 100644 libraries/mcpp/cpp-test/test-t/warn_1_2.c create mode 100644 libraries/mcpp/cpp-test/test-t/warn_2.c create mode 100644 libraries/mcpp/cpp-test/test-t/warn_3.c create mode 100644 libraries/mcpp/doc-jp/LICENSE create mode 100644 libraries/mcpp/doc-jp/cpp-test.html create mode 100644 libraries/mcpp/doc-jp/mcpp-manual.html create mode 100644 libraries/mcpp/doc-jp/mcpp-porting.html create mode 100644 libraries/mcpp/doc-jp/mcpp-summary.pdf create mode 100644 libraries/mcpp/doc/LICENSE create mode 100644 libraries/mcpp/doc/cpp-test.html create mode 100644 libraries/mcpp/doc/cpp_test.sum create mode 100644 libraries/mcpp/doc/mcpp-manual.html create mode 100644 libraries/mcpp/doc/mcpp-porting.html create mode 100644 libraries/mcpp/doc/mcpp-summary.pdf create mode 100644 libraries/mcpp/mcpp-gcc.1 create mode 100644 libraries/mcpp/mcpp.1 create mode 100644 libraries/mcpp/noconfig/bc55.dif create mode 100644 libraries/mcpp/noconfig/bc59.dif create mode 100644 libraries/mcpp/noconfig/borlandc.mak create mode 100644 libraries/mcpp/noconfig/cyg1310.dif create mode 100644 libraries/mcpp/noconfig/cyg1518.dif create mode 100644 libraries/mcpp/noconfig/cygwin.mak create mode 100644 libraries/mcpp/noconfig/freebsd.mak create mode 100644 libraries/mcpp/noconfig/lcc0308.dif create mode 100644 libraries/mcpp/noconfig/lcc0603.dif create mode 100644 libraries/mcpp/noconfig/lcc_w32.mak create mode 100644 libraries/mcpp/noconfig/linux.mak create mode 100644 libraries/mcpp/noconfig/linux_gcc2953.dif create mode 100644 libraries/mcpp/noconfig/linux_gcc32.dif create mode 100644 libraries/mcpp/noconfig/linux_gcc336.dif create mode 100644 libraries/mcpp/noconfig/linux_gcc343.dif create mode 100644 libraries/mcpp/noconfig/linux_gcc412.dif create mode 100644 libraries/mcpp/noconfig/mac_gcc401_i686.dif create mode 100644 libraries/mcpp/noconfig/mac_gcc401_powerpc.dif create mode 100644 libraries/mcpp/noconfig/mac_osx.mak create mode 100644 libraries/mcpp/noconfig/mingw.mak create mode 100644 libraries/mcpp/noconfig/mingw345.dif create mode 100644 libraries/mcpp/noconfig/vc2002.dif create mode 100644 libraries/mcpp/noconfig/vc2003.dif create mode 100644 libraries/mcpp/noconfig/vc2005.dif create mode 100644 libraries/mcpp/noconfig/vc2008.dif create mode 100644 libraries/mcpp/noconfig/vc6.dif create mode 100644 libraries/mcpp/noconfig/visualc.mak create mode 100644 libraries/mcpp/src/Makefile.am create mode 100644 libraries/mcpp/src/Makefile.in create mode 100644 libraries/mcpp/src/cc1.c create mode 100644 libraries/mcpp/src/config.h.in create mode 100644 libraries/mcpp/src/configed.H create mode 100644 libraries/mcpp/src/directive.c create mode 100644 libraries/mcpp/src/eval.c create mode 100644 libraries/mcpp/src/expand.c create mode 100644 libraries/mcpp/src/internal.H create mode 100644 libraries/mcpp/src/main.c create mode 100644 libraries/mcpp/src/main_libmcpp.c create mode 100644 libraries/mcpp/src/mbchar.c create mode 100644 libraries/mcpp/src/mcpp_lib.def create mode 100644 libraries/mcpp/src/mcpp_lib.h create mode 100644 libraries/mcpp/src/mcpp_out.h create mode 100644 libraries/mcpp/src/noconfig.H create mode 100644 libraries/mcpp/src/preproc.c create mode 100644 libraries/mcpp/src/set_mcpp.sh create mode 100644 libraries/mcpp/src/support.c create mode 100644 libraries/mcpp/src/system.H create mode 100644 libraries/mcpp/src/system.c create mode 100644 libraries/mcpp/src/testmain.c create mode 100644 libraries/mcpp/src/unset_mcpp.sh create mode 100644 libraries/mcpp/test-c/LICENSE create mode 100644 libraries/mcpp/test-c/defs.h create mode 100644 libraries/mcpp/test-c/e_12_8.c create mode 100644 libraries/mcpp/test-c/e_14.c create mode 100644 libraries/mcpp/test-c/e_14_10.c create mode 100644 libraries/mcpp/test-c/e_14_7.c create mode 100644 libraries/mcpp/test-c/e_14_9.c create mode 100644 libraries/mcpp/test-c/e_15_3.c create mode 100644 libraries/mcpp/test-c/e_16.c create mode 100644 libraries/mcpp/test-c/e_17.c create mode 100644 libraries/mcpp/test-c/e_18_4.c create mode 100644 libraries/mcpp/test-c/e_19_3.c create mode 100644 libraries/mcpp/test-c/e_23_3.c create mode 100644 libraries/mcpp/test-c/e_24_6.c create mode 100644 libraries/mcpp/test-c/e_25_6.c create mode 100644 libraries/mcpp/test-c/e_27_7.c create mode 100644 libraries/mcpp/test-c/e_29_3.c create mode 100644 libraries/mcpp/test-c/e_31.c create mode 100644 libraries/mcpp/test-c/e_31_3.c create mode 100644 libraries/mcpp/test-c/e_32_5.c create mode 100644 libraries/mcpp/test-c/e_33_2.c create mode 100644 libraries/mcpp/test-c/e_35_2.c create mode 100644 libraries/mcpp/test-c/e_4_3.c create mode 100644 libraries/mcpp/test-c/e_7_4.c create mode 100644 libraries/mcpp/test-c/e_std.c create mode 100644 libraries/mcpp/test-c/header.h create mode 100644 libraries/mcpp/test-c/i_32_3.c create mode 100644 libraries/mcpp/test-c/i_35.c create mode 100644 libraries/mcpp/test-c/i_35_3.c create mode 100644 libraries/mcpp/test-c/ifdef15.h create mode 100644 libraries/mcpp/test-c/line.h create mode 100644 libraries/mcpp/test-c/m1024.h create mode 100644 libraries/mcpp/test-c/m_33_big5.c create mode 100644 libraries/mcpp/test-c/m_33_eucjp.c create mode 100644 libraries/mcpp/test-c/m_33_gb.c create mode 100644 libraries/mcpp/test-c/m_33_jis.c create mode 100644 libraries/mcpp/test-c/m_33_ksc.c create mode 100644 libraries/mcpp/test-c/m_33_sjis.c create mode 100644 libraries/mcpp/test-c/m_33_utf8.c create mode 100644 libraries/mcpp/test-c/m_34_big5.c create mode 100644 libraries/mcpp/test-c/m_34_eucjp.c create mode 100644 libraries/mcpp/test-c/m_34_gb.c create mode 100644 libraries/mcpp/test-c/m_34_jis.c create mode 100644 libraries/mcpp/test-c/m_34_ksc.c create mode 100644 libraries/mcpp/test-c/m_34_sjis.c create mode 100644 libraries/mcpp/test-c/m_34_utf8.c create mode 100644 libraries/mcpp/test-c/m_36_big5.c create mode 100644 libraries/mcpp/test-c/m_36_jis.c create mode 100644 libraries/mcpp/test-c/m_36_sjis.c create mode 100644 libraries/mcpp/test-c/n_1.c create mode 100644 libraries/mcpp/test-c/n_10.c create mode 100644 libraries/mcpp/test-c/n_11.c create mode 100644 libraries/mcpp/test-c/n_12.c create mode 100644 libraries/mcpp/test-c/n_13.c create mode 100644 libraries/mcpp/test-c/n_13_13.c create mode 100644 libraries/mcpp/test-c/n_13_5.c create mode 100644 libraries/mcpp/test-c/n_13_7.c create mode 100644 libraries/mcpp/test-c/n_13_8.c create mode 100644 libraries/mcpp/test-c/n_15.c create mode 100644 libraries/mcpp/test-c/n_18.c create mode 100644 libraries/mcpp/test-c/n_19.c create mode 100644 libraries/mcpp/test-c/n_2.c create mode 100644 libraries/mcpp/test-c/n_20.c create mode 100644 libraries/mcpp/test-c/n_21.c create mode 100644 libraries/mcpp/test-c/n_22.c create mode 100644 libraries/mcpp/test-c/n_23.c create mode 100644 libraries/mcpp/test-c/n_24.c create mode 100644 libraries/mcpp/test-c/n_25.c create mode 100644 libraries/mcpp/test-c/n_26.c create mode 100644 libraries/mcpp/test-c/n_27.c create mode 100644 libraries/mcpp/test-c/n_28.c create mode 100644 libraries/mcpp/test-c/n_29.c create mode 100644 libraries/mcpp/test-c/n_3.c create mode 100644 libraries/mcpp/test-c/n_30.c create mode 100644 libraries/mcpp/test-c/n_32.c create mode 100644 libraries/mcpp/test-c/n_37.c create mode 100644 libraries/mcpp/test-c/n_3_4.c create mode 100644 libraries/mcpp/test-c/n_4.c create mode 100644 libraries/mcpp/test-c/n_5.c create mode 100644 libraries/mcpp/test-c/n_6.c create mode 100644 libraries/mcpp/test-c/n_7.c create mode 100644 libraries/mcpp/test-c/n_8.c create mode 100644 libraries/mcpp/test-c/n_8_2.c create mode 100644 libraries/mcpp/test-c/n_9.c create mode 100644 libraries/mcpp/test-c/n_i_.lst create mode 100644 libraries/mcpp/test-c/n_std.c create mode 100644 libraries/mcpp/test-c/nest1.h create mode 100644 libraries/mcpp/test-c/nest10.h create mode 100644 libraries/mcpp/test-c/nest11.h create mode 100644 libraries/mcpp/test-c/nest12.h create mode 100644 libraries/mcpp/test-c/nest13.h create mode 100644 libraries/mcpp/test-c/nest14.h create mode 100644 libraries/mcpp/test-c/nest15.h create mode 100644 libraries/mcpp/test-c/nest2.h create mode 100644 libraries/mcpp/test-c/nest3.h create mode 100644 libraries/mcpp/test-c/nest4.h create mode 100644 libraries/mcpp/test-c/nest5.h create mode 100644 libraries/mcpp/test-c/nest6.h create mode 100644 libraries/mcpp/test-c/nest7.h create mode 100644 libraries/mcpp/test-c/nest8.h create mode 100644 libraries/mcpp/test-c/nest9.h create mode 100644 libraries/mcpp/test-c/side_cpp create mode 100644 libraries/mcpp/test-c/u_1_1.c create mode 100644 libraries/mcpp/test-c/u_1_11.c create mode 100644 libraries/mcpp/test-c/u_1_12.c create mode 100644 libraries/mcpp/test-c/u_1_13.c create mode 100644 libraries/mcpp/test-c/u_1_14.c create mode 100644 libraries/mcpp/test-c/u_1_17.c create mode 100644 libraries/mcpp/test-c/u_1_19.c create mode 100644 libraries/mcpp/test-c/u_1_22.c create mode 100644 libraries/mcpp/test-c/u_1_23.c create mode 100644 libraries/mcpp/test-c/u_1_24.c create mode 100644 libraries/mcpp/test-c/u_1_25.c create mode 100644 libraries/mcpp/test-c/u_1_27.c create mode 100644 libraries/mcpp/test-c/u_1_28.c create mode 100644 libraries/mcpp/test-c/u_1_5.c create mode 100644 libraries/mcpp/test-c/u_1_7_big5.c create mode 100644 libraries/mcpp/test-c/u_1_7_eucjp.c create mode 100644 libraries/mcpp/test-c/u_1_7_gb.c create mode 100644 libraries/mcpp/test-c/u_1_7_jis.c create mode 100644 libraries/mcpp/test-c/u_1_7_ksc.c create mode 100644 libraries/mcpp/test-c/u_1_7_sjis.c create mode 100644 libraries/mcpp/test-c/u_1_7_utf8.c create mode 100644 libraries/mcpp/test-c/u_1_8.c create mode 100644 libraries/mcpp/test-c/u_2.c create mode 100644 libraries/mcpp/test-c/unbal1.h create mode 100644 libraries/mcpp/test-c/unbal2.h create mode 100644 libraries/mcpp/test-c/unbal3.h create mode 100644 libraries/mcpp/test-c/unbal4.h create mode 100644 libraries/mcpp/test-c/unbal5.h create mode 100644 libraries/mcpp/test-c/unbal6.h create mode 100644 libraries/mcpp/test-c/undefs.c create mode 100644 libraries/mcpp/test-c/unspcs.c create mode 100644 libraries/mcpp/test-c/warns.c create mode 100644 libraries/mcpp/test-l/LICENSE create mode 100644 libraries/mcpp/test-l/defs.h create mode 100644 libraries/mcpp/test-l/ifdef127.h create mode 100644 libraries/mcpp/test-l/ifdef255.h create mode 100644 libraries/mcpp/test-l/l_37_1.t create mode 100644 libraries/mcpp/test-l/l_37_2.t create mode 100644 libraries/mcpp/test-l/l_37_3.c create mode 100644 libraries/mcpp/test-l/l_37_3.t create mode 100644 libraries/mcpp/test-l/l_37_4.t create mode 100644 libraries/mcpp/test-l/l_37_5.t create mode 100644 libraries/mcpp/test-l/l_37_6.c create mode 100644 libraries/mcpp/test-l/l_37_6.t create mode 100644 libraries/mcpp/test-l/l_37_7.c create mode 100644 libraries/mcpp/test-l/l_37_7.t create mode 100644 libraries/mcpp/test-l/l_37_8.c create mode 100644 libraries/mcpp/test-l/l_37_9.t create mode 100644 libraries/mcpp/test-l/longline.c create mode 100644 libraries/mcpp/test-l/m8191.h create mode 100644 libraries/mcpp/test-l/nest1.h create mode 100644 libraries/mcpp/test-l/nest10.h create mode 100644 libraries/mcpp/test-l/nest100.h create mode 100644 libraries/mcpp/test-l/nest101.h create mode 100644 libraries/mcpp/test-l/nest102.h create mode 100644 libraries/mcpp/test-l/nest103.h create mode 100644 libraries/mcpp/test-l/nest104.h create mode 100644 libraries/mcpp/test-l/nest105.h create mode 100644 libraries/mcpp/test-l/nest106.h create mode 100644 libraries/mcpp/test-l/nest107.h create mode 100644 libraries/mcpp/test-l/nest108.h create mode 100644 libraries/mcpp/test-l/nest109.h create mode 100644 libraries/mcpp/test-l/nest11.h create mode 100644 libraries/mcpp/test-l/nest110.h create mode 100644 libraries/mcpp/test-l/nest111.h create mode 100644 libraries/mcpp/test-l/nest112.h create mode 100644 libraries/mcpp/test-l/nest113.h create mode 100644 libraries/mcpp/test-l/nest114.h create mode 100644 libraries/mcpp/test-l/nest115.h create mode 100644 libraries/mcpp/test-l/nest116.h create mode 100644 libraries/mcpp/test-l/nest117.h create mode 100644 libraries/mcpp/test-l/nest118.h create mode 100644 libraries/mcpp/test-l/nest119.h create mode 100644 libraries/mcpp/test-l/nest12.h create mode 100644 libraries/mcpp/test-l/nest120.h create mode 100644 libraries/mcpp/test-l/nest121.h create mode 100644 libraries/mcpp/test-l/nest122.h create mode 100644 libraries/mcpp/test-l/nest123.h create mode 100644 libraries/mcpp/test-l/nest124.h create mode 100644 libraries/mcpp/test-l/nest125.h create mode 100644 libraries/mcpp/test-l/nest126.h create mode 100644 libraries/mcpp/test-l/nest127.h create mode 100644 libraries/mcpp/test-l/nest13.h create mode 100644 libraries/mcpp/test-l/nest14.h create mode 100644 libraries/mcpp/test-l/nest15.h create mode 100644 libraries/mcpp/test-l/nest16.h create mode 100644 libraries/mcpp/test-l/nest17.h create mode 100644 libraries/mcpp/test-l/nest18.h create mode 100644 libraries/mcpp/test-l/nest19.h create mode 100644 libraries/mcpp/test-l/nest2.h create mode 100644 libraries/mcpp/test-l/nest20.h create mode 100644 libraries/mcpp/test-l/nest21.h create mode 100644 libraries/mcpp/test-l/nest22.h create mode 100644 libraries/mcpp/test-l/nest23.h create mode 100644 libraries/mcpp/test-l/nest24.h create mode 100644 libraries/mcpp/test-l/nest25.h create mode 100644 libraries/mcpp/test-l/nest26.h create mode 100644 libraries/mcpp/test-l/nest27.h create mode 100644 libraries/mcpp/test-l/nest28.h create mode 100644 libraries/mcpp/test-l/nest29.h create mode 100644 libraries/mcpp/test-l/nest3.h create mode 100644 libraries/mcpp/test-l/nest30.h create mode 100644 libraries/mcpp/test-l/nest31.h create mode 100644 libraries/mcpp/test-l/nest32.h create mode 100644 libraries/mcpp/test-l/nest33.h create mode 100644 libraries/mcpp/test-l/nest34.h create mode 100644 libraries/mcpp/test-l/nest35.h create mode 100644 libraries/mcpp/test-l/nest36.h create mode 100644 libraries/mcpp/test-l/nest37.h create mode 100644 libraries/mcpp/test-l/nest38.h create mode 100644 libraries/mcpp/test-l/nest39.h create mode 100644 libraries/mcpp/test-l/nest4.h create mode 100644 libraries/mcpp/test-l/nest40.h create mode 100644 libraries/mcpp/test-l/nest41.h create mode 100644 libraries/mcpp/test-l/nest42.h create mode 100644 libraries/mcpp/test-l/nest43.h create mode 100644 libraries/mcpp/test-l/nest44.h create mode 100644 libraries/mcpp/test-l/nest45.h create mode 100644 libraries/mcpp/test-l/nest46.h create mode 100644 libraries/mcpp/test-l/nest47.h create mode 100644 libraries/mcpp/test-l/nest48.h create mode 100644 libraries/mcpp/test-l/nest49.h create mode 100644 libraries/mcpp/test-l/nest5.h create mode 100644 libraries/mcpp/test-l/nest50.h create mode 100644 libraries/mcpp/test-l/nest51.h create mode 100644 libraries/mcpp/test-l/nest52.h create mode 100644 libraries/mcpp/test-l/nest53.h create mode 100644 libraries/mcpp/test-l/nest54.h create mode 100644 libraries/mcpp/test-l/nest55.h create mode 100644 libraries/mcpp/test-l/nest56.h create mode 100644 libraries/mcpp/test-l/nest57.h create mode 100644 libraries/mcpp/test-l/nest58.h create mode 100644 libraries/mcpp/test-l/nest59.h create mode 100644 libraries/mcpp/test-l/nest6.h create mode 100644 libraries/mcpp/test-l/nest60.h create mode 100644 libraries/mcpp/test-l/nest61.h create mode 100644 libraries/mcpp/test-l/nest62.h create mode 100644 libraries/mcpp/test-l/nest63.h create mode 100644 libraries/mcpp/test-l/nest64.h create mode 100644 libraries/mcpp/test-l/nest65.h create mode 100644 libraries/mcpp/test-l/nest66.h create mode 100644 libraries/mcpp/test-l/nest67.h create mode 100644 libraries/mcpp/test-l/nest68.h create mode 100644 libraries/mcpp/test-l/nest69.h create mode 100644 libraries/mcpp/test-l/nest7.h create mode 100644 libraries/mcpp/test-l/nest70.h create mode 100644 libraries/mcpp/test-l/nest71.h create mode 100644 libraries/mcpp/test-l/nest72.h create mode 100644 libraries/mcpp/test-l/nest73.h create mode 100644 libraries/mcpp/test-l/nest74.h create mode 100644 libraries/mcpp/test-l/nest75.h create mode 100644 libraries/mcpp/test-l/nest76.h create mode 100644 libraries/mcpp/test-l/nest77.h create mode 100644 libraries/mcpp/test-l/nest78.h create mode 100644 libraries/mcpp/test-l/nest79.h create mode 100644 libraries/mcpp/test-l/nest8.h create mode 100644 libraries/mcpp/test-l/nest80.h create mode 100644 libraries/mcpp/test-l/nest81.h create mode 100644 libraries/mcpp/test-l/nest82.h create mode 100644 libraries/mcpp/test-l/nest83.h create mode 100644 libraries/mcpp/test-l/nest84.h create mode 100644 libraries/mcpp/test-l/nest85.h create mode 100644 libraries/mcpp/test-l/nest86.h create mode 100644 libraries/mcpp/test-l/nest87.h create mode 100644 libraries/mcpp/test-l/nest88.h create mode 100644 libraries/mcpp/test-l/nest89.h create mode 100644 libraries/mcpp/test-l/nest9.h create mode 100644 libraries/mcpp/test-l/nest90.h create mode 100644 libraries/mcpp/test-l/nest91.h create mode 100644 libraries/mcpp/test-l/nest92.h create mode 100644 libraries/mcpp/test-l/nest93.h create mode 100644 libraries/mcpp/test-l/nest94.h create mode 100644 libraries/mcpp/test-l/nest95.h create mode 100644 libraries/mcpp/test-l/nest96.h create mode 100644 libraries/mcpp/test-l/nest97.h create mode 100644 libraries/mcpp/test-l/nest98.h create mode 100644 libraries/mcpp/test-l/nest99.h create mode 100644 libraries/mcpp/test-t/LICENSE create mode 100644 libraries/mcpp/test-t/e_12_8.t create mode 100644 libraries/mcpp/test-t/e_14.t create mode 100644 libraries/mcpp/test-t/e_14_10.t create mode 100644 libraries/mcpp/test-t/e_14_7.t create mode 100644 libraries/mcpp/test-t/e_14_9.t create mode 100644 libraries/mcpp/test-t/e_15_3.t create mode 100644 libraries/mcpp/test-t/e_16.t create mode 100644 libraries/mcpp/test-t/e_17.t create mode 100644 libraries/mcpp/test-t/e_18_4.t create mode 100644 libraries/mcpp/test-t/e_19_3.t create mode 100644 libraries/mcpp/test-t/e_23_3.t create mode 100644 libraries/mcpp/test-t/e_24_6.t create mode 100644 libraries/mcpp/test-t/e_25_6.t create mode 100644 libraries/mcpp/test-t/e_27_7.t create mode 100644 libraries/mcpp/test-t/e_29_3.t create mode 100644 libraries/mcpp/test-t/e_31.t create mode 100644 libraries/mcpp/test-t/e_31_3.t create mode 100644 libraries/mcpp/test-t/e_32_5.t create mode 100644 libraries/mcpp/test-t/e_33_2.t create mode 100644 libraries/mcpp/test-t/e_35_2.t create mode 100644 libraries/mcpp/test-t/e_4_3.t create mode 100644 libraries/mcpp/test-t/e_7_4.t create mode 100644 libraries/mcpp/test-t/e_intmax.t create mode 100644 libraries/mcpp/test-t/e_operat.cc create mode 100644 libraries/mcpp/test-t/e_operat.t create mode 100644 libraries/mcpp/test-t/e_post.t create mode 100644 libraries/mcpp/test-t/e_pragma.t create mode 100644 libraries/mcpp/test-t/e_std.t create mode 100644 libraries/mcpp/test-t/e_std99.t create mode 100644 libraries/mcpp/test-t/e_ucn.t create mode 100644 libraries/mcpp/test-t/e_vargs.t create mode 100644 libraries/mcpp/test-t/header.h create mode 100644 libraries/mcpp/test-t/i_32_3.t create mode 100644 libraries/mcpp/test-t/i_35.t create mode 100644 libraries/mcpp/test-t/i_35_3.t create mode 100644 libraries/mcpp/test-t/i_mbident.t create mode 100644 libraries/mcpp/test-t/ifdef15.h create mode 100644 libraries/mcpp/test-t/ifdef31.h create mode 100644 libraries/mcpp/test-t/ifdef63.h create mode 100644 libraries/mcpp/test-t/line.h create mode 100644 libraries/mcpp/test-t/long4095.h create mode 100644 libraries/mcpp/test-t/m4095.h create mode 100644 libraries/mcpp/test-t/m_33_big5.t create mode 100644 libraries/mcpp/test-t/m_33_eucjp.t create mode 100644 libraries/mcpp/test-t/m_33_gb.t create mode 100644 libraries/mcpp/test-t/m_33_jis.t create mode 100644 libraries/mcpp/test-t/m_33_ksc.t create mode 100644 libraries/mcpp/test-t/m_33_sjis.t create mode 100644 libraries/mcpp/test-t/m_33_utf8.t create mode 100644 libraries/mcpp/test-t/m_34_big5.t create mode 100644 libraries/mcpp/test-t/m_34_eucjp.t create mode 100644 libraries/mcpp/test-t/m_34_gb.t create mode 100644 libraries/mcpp/test-t/m_34_jis.t create mode 100644 libraries/mcpp/test-t/m_34_ksc.t create mode 100644 libraries/mcpp/test-t/m_34_sjis.t create mode 100644 libraries/mcpp/test-t/m_34_utf8.t create mode 100644 libraries/mcpp/test-t/m_36_big5.t create mode 100644 libraries/mcpp/test-t/m_36_jis.t create mode 100644 libraries/mcpp/test-t/m_36_sjis.t create mode 100644 libraries/mcpp/test-t/misc.t create mode 100644 libraries/mcpp/test-t/n_1.t create mode 100644 libraries/mcpp/test-t/n_10.t create mode 100644 libraries/mcpp/test-t/n_11.t create mode 100644 libraries/mcpp/test-t/n_12.t create mode 100644 libraries/mcpp/test-t/n_13.t create mode 100644 libraries/mcpp/test-t/n_13_13.t create mode 100644 libraries/mcpp/test-t/n_13_5.t create mode 100644 libraries/mcpp/test-t/n_13_7.t create mode 100644 libraries/mcpp/test-t/n_13_8.t create mode 100644 libraries/mcpp/test-t/n_15.t create mode 100644 libraries/mcpp/test-t/n_18.t create mode 100644 libraries/mcpp/test-t/n_19.t create mode 100644 libraries/mcpp/test-t/n_2.t create mode 100644 libraries/mcpp/test-t/n_20.t create mode 100644 libraries/mcpp/test-t/n_21.t create mode 100644 libraries/mcpp/test-t/n_22.t create mode 100644 libraries/mcpp/test-t/n_23.t create mode 100644 libraries/mcpp/test-t/n_24.t create mode 100644 libraries/mcpp/test-t/n_25.t create mode 100644 libraries/mcpp/test-t/n_26.t create mode 100644 libraries/mcpp/test-t/n_27.t create mode 100644 libraries/mcpp/test-t/n_28.t create mode 100644 libraries/mcpp/test-t/n_29.t create mode 100644 libraries/mcpp/test-t/n_3.t create mode 100644 libraries/mcpp/test-t/n_30.t create mode 100644 libraries/mcpp/test-t/n_32.t create mode 100644 libraries/mcpp/test-t/n_37.t create mode 100644 libraries/mcpp/test-t/n_3_4.t create mode 100644 libraries/mcpp/test-t/n_4.t create mode 100644 libraries/mcpp/test-t/n_5.t create mode 100644 libraries/mcpp/test-t/n_6.t create mode 100644 libraries/mcpp/test-t/n_7.t create mode 100644 libraries/mcpp/test-t/n_8.t create mode 100644 libraries/mcpp/test-t/n_8_2.t create mode 100644 libraries/mcpp/test-t/n_9.t create mode 100644 libraries/mcpp/test-t/n_bool.cc create mode 100644 libraries/mcpp/test-t/n_bool.t create mode 100644 libraries/mcpp/test-t/n_cnvucn.cc create mode 100644 libraries/mcpp/test-t/n_cnvucn.t create mode 100644 libraries/mcpp/test-t/n_cplus.cc create mode 100644 libraries/mcpp/test-t/n_cplus.t create mode 100644 libraries/mcpp/test-t/n_dslcom.cc create mode 100644 libraries/mcpp/test-t/n_dslcom.t create mode 100644 libraries/mcpp/test-t/n_line.t create mode 100644 libraries/mcpp/test-t/n_llong.t create mode 100644 libraries/mcpp/test-t/n_nularg.t create mode 100644 libraries/mcpp/test-t/n_post.t create mode 100644 libraries/mcpp/test-t/n_post99.t create mode 100644 libraries/mcpp/test-t/n_ppnum.t create mode 100644 libraries/mcpp/test-t/n_pragma.t create mode 100644 libraries/mcpp/test-t/n_std.t create mode 100644 libraries/mcpp/test-t/n_std99.t create mode 100644 libraries/mcpp/test-t/n_stdmac.t create mode 100644 libraries/mcpp/test-t/n_tlim_2.t create mode 100644 libraries/mcpp/test-t/n_tlim_3.t create mode 100644 libraries/mcpp/test-t/n_tlim_4.t create mode 100644 libraries/mcpp/test-t/n_tlim_5.t create mode 100644 libraries/mcpp/test-t/n_tlim_6.t create mode 100644 libraries/mcpp/test-t/n_tlim_7.t create mode 100644 libraries/mcpp/test-t/n_tlim_8.t create mode 100644 libraries/mcpp/test-t/n_tlim_9.t create mode 100644 libraries/mcpp/test-t/n_tlimit.t create mode 100644 libraries/mcpp/test-t/n_token.cc create mode 100644 libraries/mcpp/test-t/n_token.t create mode 100644 libraries/mcpp/test-t/n_ucn1.cc create mode 100644 libraries/mcpp/test-t/n_ucn1.t create mode 100644 libraries/mcpp/test-t/n_ucn2.t create mode 100644 libraries/mcpp/test-t/n_vargs.t create mode 100644 libraries/mcpp/test-t/nest1.h create mode 100644 libraries/mcpp/test-t/nest10.h create mode 100644 libraries/mcpp/test-t/nest11.h create mode 100644 libraries/mcpp/test-t/nest12.h create mode 100644 libraries/mcpp/test-t/nest13.h create mode 100644 libraries/mcpp/test-t/nest14.h create mode 100644 libraries/mcpp/test-t/nest15.h create mode 100644 libraries/mcpp/test-t/nest2.h create mode 100644 libraries/mcpp/test-t/nest3.h create mode 100644 libraries/mcpp/test-t/nest4.h create mode 100644 libraries/mcpp/test-t/nest5.h create mode 100644 libraries/mcpp/test-t/nest6.h create mode 100644 libraries/mcpp/test-t/nest7.h create mode 100644 libraries/mcpp/test-t/nest8.h create mode 100644 libraries/mcpp/test-t/nest9.h create mode 100644 libraries/mcpp/test-t/pragmas.h create mode 100644 libraries/mcpp/test-t/recurs.t create mode 100644 libraries/mcpp/test-t/trad.t create mode 100644 libraries/mcpp/test-t/u_1_1.t create mode 100644 libraries/mcpp/test-t/u_1_11.t create mode 100644 libraries/mcpp/test-t/u_1_12.t create mode 100644 libraries/mcpp/test-t/u_1_13.t create mode 100644 libraries/mcpp/test-t/u_1_14.t create mode 100644 libraries/mcpp/test-t/u_1_17.t create mode 100644 libraries/mcpp/test-t/u_1_19.t create mode 100644 libraries/mcpp/test-t/u_1_22.t create mode 100644 libraries/mcpp/test-t/u_1_24.t create mode 100644 libraries/mcpp/test-t/u_1_25.t create mode 100644 libraries/mcpp/test-t/u_1_27.t create mode 100644 libraries/mcpp/test-t/u_1_28.t create mode 100644 libraries/mcpp/test-t/u_1_5.t create mode 100644 libraries/mcpp/test-t/u_1_7_big5.t create mode 100644 libraries/mcpp/test-t/u_1_7_eucjp.t create mode 100644 libraries/mcpp/test-t/u_1_7_gb.t create mode 100644 libraries/mcpp/test-t/u_1_7_jis.t create mode 100644 libraries/mcpp/test-t/u_1_7_ksc.t create mode 100644 libraries/mcpp/test-t/u_1_7_sjis.t create mode 100644 libraries/mcpp/test-t/u_1_7_utf8.t create mode 100644 libraries/mcpp/test-t/u_1_8.t create mode 100644 libraries/mcpp/test-t/u_1_9.t create mode 100644 libraries/mcpp/test-t/u_2.t create mode 100644 libraries/mcpp/test-t/u_concat.t create mode 100644 libraries/mcpp/test-t/u_cplus.cc create mode 100644 libraries/mcpp/test-t/u_cplus.t create mode 100644 libraries/mcpp/test-t/u_line.t create mode 100644 libraries/mcpp/test-t/unbal1.h create mode 100644 libraries/mcpp/test-t/unbal2.h create mode 100644 libraries/mcpp/test-t/unbal3.h create mode 100644 libraries/mcpp/test-t/unbal4.h create mode 100644 libraries/mcpp/test-t/unbal5.h create mode 100644 libraries/mcpp/test-t/unbal6.h create mode 100644 libraries/mcpp/test-t/undefs.t create mode 100644 libraries/mcpp/test-t/unspcs.t create mode 100644 libraries/mcpp/test-t/vers2.h create mode 100644 libraries/mcpp/test-t/warns.t create mode 100644 libraries/mcpp/tests/Makefile.am create mode 100644 libraries/mcpp/tests/Makefile.in create mode 100644 libraries/mcpp/tests/after_test.sh create mode 100644 libraries/mcpp/tests/set_test.sh create mode 100644 libraries/mcpp/tool/LICENSE create mode 100644 libraries/mcpp/tool/app_once.bat create mode 100644 libraries/mcpp/tool/clock_of.c create mode 100644 libraries/mcpp/tool/cpp_test.c create mode 100644 libraries/mcpp/tool/ins_once.c create mode 100644 libraries/mcpp/tool/once.txt create mode 100644 libraries/mcpp/tool/rm_once.c create mode 100644 libraries/mcpp/tool/total.c diff --git a/libraries/mcpp/ChangeLog b/libraries/mcpp/ChangeLog new file mode 100644 index 000000000..0f217be09 --- /dev/null +++ b/libraries/mcpp/ChangeLog @@ -0,0 +1,325 @@ +ChangeLog of MCPP and its accompanying Validation Suite + +2008/11/30 kmatsui + * V.2.7.2 + * Enabled some CPU-specific predefined macros in compiler- + independent-build as well as compiler-specific-build, because + there are some occasions which require those macros when we use + some compiler system's header files. Created init_cpu_macro(). + (configure.ac, noconfig.H, configed.H, main.c, system.c) + * Enabled -m32 and -m64 options even on 32-bits systems and on + compiler-independent-build, when the OS is UNIX-like one. These + options change some predefined macros. (system.c) + * Made -z option to output #include lines themselves. (system.c) + * Fixed a bug of source line numbering in library-build. (by + Dwayne Boone) (main.c) + * Fixed a few minor bugs. + * Dropped support for Borland C 4.0. + * Updated the shell-scripts, makefiles and difference files, and + revised some mistakes. + * Updated the documents. + +2008/05/19 kmatsui + * V.2.7.1 + * Fixed a bug of newline synchronization on -K option. Created + sync_linenum(). (Thanks to Benjamin Smedberg) (directive.c) + * Made GCC-specific-build on x86_64 and ppc64 have two sets of + predefines for 32bit mode and 64bit mode, and implemented -m32 + and -m64 options. (Thanks to Benjamin Smedberg) (configure.ac, + set_mcpp.sh, system.c) + * Stopped to use freopen() so that a main program which links + libmcpp can use stdin, stdout and stderr. (by Benoit Foucher) + (main.c) + * Fixed a bug of file-handle leak on -MD and -MF options. + (Thanks to Masashi Fujita) (system.c) + * Added ports to Vicual C++ 6.0 and Borland C++ 5.9 (aka C++ + Builder 2007). (by Dwayne Boone) (vc6.dif, bc59.dif, eval.c) + * Revised declaration of stpcpy(). (internal.H) + * Split mcpp_out.h from mcpp_lib.h. + * Made library-build install also an mcpp executable and minimal + documents as well as libmcpp for a convenience of library + package. Created main_mcpplib.c. Made all the binary packages + library-build. (by Yutaka Niibe and kmatsui) (Makefile.am, src/ + Makefile.am) + * Split config/cygwin_root and config/mingw_root from + configure.ac to avoid a trouble of backslash character handling + on some version of bash. (Thanks to Aleksandar Samardzic) + * Changed autoconf 2.59 to 2.61 and automake 1.9.6 to 1.10. + * Updated the documents accordingly. + +2008/03/23 kmatsui + * V.2.7 + * Created macro notification mode, implemented -K option and '# + pragma MCPP debug macro_call' sub-directive to enable this mode + on STD mode. Created get_src_location(), print_macro_inf(), + print_macro_arg(), close_macro_inf(), chk_magic_balance(), + remove_magics(), some MAC_* macros to define magic characters, + struct LINE_COL, MACRO_INF. Revised many functions. + (Specifications mostly by Taras Glek, partly by Samuel, + implemented mostly by kmatsui and partly by Taras Glek and + Samuel). (internal.H, main.c, directive.c, eval.c, expand.c, + support.c, system.c) + * Created -k option to keep horizontal white spaces as they are + and convert comment to spaces of the same length on STD mode. + (Specs by Taras Glek, implemented by kmatsui). (internal,H, + main.c, directive.c, mbchar.c, support.c) + * Implemented GCC2-spec variadic macro on STD mode in GCC- + specific-build. (by Taras Glek and kmatsui). (directive.c) + * Enabled GCC-like buggy handling of macro containing 'defined' + token in #if directive on GCC-specific-build. (by Taras Glek). + (expand.c) + * Reordered initialization steps and enabled undefining of not- + Standard-required predefined macros. Created undef_macros(). + Removed undef_a_predef(). (main.c, system.c) + * Enabled non-conforming predefined macros such as 'linux' by + default on GCC-specific-build for compatibility with GCC. + Removed undef_gcc_macros(). Created DEF_NOARGS_* macros for + diagnostics sake. (internal.H, system.c) + * Fixed a bug of file searching failure when a file is specified + by relative path in -include option. Split is_full_path() from + open_include(). (thanks to Benjamin Smedberg) (system.c) + * Fixed a bug of mcpplib initialization which caused problem on + CygWIN. (main.c, system.c, lib.c) + * Fixed a bug of unterminated source file handling. (thanks to + Phil Knight) (support.c) + * Made norm_path() check existence of directory/file before + normalization. As its results, non-existent directory specified + by -I option was disabled, "non-existent/../existent" was judged + as non-existent before wrongly normalizing to "existent", and # + include "directory" was made not to open. Created norm_dir(). + (thanks to Taras Glek and Dave Mandelin) (system.c) + * Stopped to convert path-list on Windows to lowercase-letters. + Changed path-list comparing function on Windows from strcmp() to + strcasecmp() or stricmp(). (system.c) + * Changed allocation of buffer for -M* options and incdir[], + fnamelist[], once_list[] from fixed size to dynamically + enlarging ones. (system.c) + * Made #line output for GCC-specific-build closer to GCC. + Changed FILEINFO and DEFBUF struct, moved sharp() from main.c to + system.c, revised many functions. (system.c, support.c, main.c, + directive.c) + * Absorbed lib.c into system.c. Renamed getopt() to mcpp_getopt + (), also variables opt* to mcpp_opt*, and made static in order + to prevent linking of glibc getopt(). (thanks to Dwayne Boone) + * Fixed a bug of UTF-8 multibyte character handling, enabled 4- + bytes long sequences, and enabled checking of overlong sequences + and UTF-16 surrogate pairs. (by Matt Wozniski) (mbchar.c, + support.c) + * Fixed a bug of tokenization in KR and OLD modes. (support.c) + * Changed FILENAME_MAX to PATH_MAX and FILENAMEMAX to PATHMAX, + because FILENAME_MAX of some systems are too short. (thanks to + Dwayne Boone) + * Bundled some variables into structs (std_limits, option_flags, + etc.). Tidied up the sources removing unused codes, rewriting + old comments. (most of the sources) + * Ported to Mac OS X / Apple-GCC. Enabled searching of + "framework" directories for #include. Enabled to search "header + map" file. Enabled #import, which is #include with + unconditional "once only" feature. Implemented -F, -arch, + -isysroot options. Created init_framework(), search_framework(), + search_subdir(), search_header_map(), hmap_hash(). (system.c, + directive.c, set_mcpp.sh, unset_mcpp.sh, configure.ac, src/ + Makefile.am) + * Ported to Visual C++ 2008. Enabled '$' in identifier by + default in Visual-C-specific-build and GCC-specific-build. + (system.H, internal.H, support.c, system.c) + * Added documentation on source checking of firefox 3.0pre. + Added comments on system headers in Mac OS X. (mcpp-manual.html) + * Updated all the documents. (mainly by kmatsui, partly by + Taras Glek) + +2007/05/19 kmatsui + * V.2.6.4 + * Fixed memory leaks in subroutine-build related to file-> + filename, sharp_filename and others. (by Juergen Mueller and + kmatsui). (main.c, directive.c, support.c, system.c) + * Revised expanding() and expanding_macro[] to fix memory leaks. + Created clear_exp_mac(). (internal.H, expand.c, support.c) + * Fixed a bug of accessing non-allocated memory. (by isr). + (support.c) + * Revised output of // comment by -C option. Output // comment + as it is, not converting to /* */. (thanks to Taras Glek). + (support.c) + * Changed output of line top white spaces in other than + POST_STANDARD mode to preserve them as they are, rather than + squeezing to one space, in order to make output more human- + readable. (main.c, support.c) + * Removed the settings to be compiled with C++. (configed.H, + noconfig.H, noconfig/*.mak) + * Updated version-info for shared-library-build from 0:0:0 to 0: + 1:0. + * Changed installation directory of some documents in stand- + alone-and-compiler-independent-build by configure or by binary + packages. + * Updated the documents. Note that cpp-test.html were not + updated. + +2007/04/07 kmatsui + * V.2.6.3 + * Fixed a bug of some #line directive handling which wrongly + affected #include path. Added a new member for real file name + to struct FILEINFO, and made #line directive does not affect + real file name. (internal.H, main.c, support.c, system.c) + * Enabled dereferencing of symbolic linked directory (as well as + file) of #include path-list and include directory. Split + deref_syml() from norm_path(). (system.c) + * Revised again diagnostic messages for some macro expansions. + (internal.H, expand.c, support.c) + * Relaxed token checking and syntax checking in lang_asm mode. + (expand,c, support.c) + * Implemented GCC3-spec variadic macro for GCC-specific-build. + (internal.H, directive.c, expand.c) + * Added some predefined macro for GCC-specific-build. (system.c) + * Revised output routines abstracting output device, and + implementing optional memory buffer output when built with + MCPP_LIB macro. Created mcpp_lib.h, mcpp_lib_fputs(), + mcpp_lib_fputc(), mcpp_lib_fprintf(), mcpp_use_mem_buffers(), + mcpp_get_mem_buffer(), mcpp_set_out_func(), + mcpp_reset_def_out_func(), mem_putc(), mem_puts(), + append_to_buffer(), function pointers mcpp_fputs, mcpp_fputc, + mcpp_fprintf and some macros. This update disabled compilation + by C++. (All were contributed by Greg Kress and slightly + modified by kmatsui) (internal.H, main.c, directive.c, eval.c, + expand.c, mbchar.c, support.c, system.c, lib.c, mcpp_lib.h) + * Renamed some global names in order to lessen the possibility + of name collisions in subroutine-build. Renamed the variables + mode, cplus, line, debug, type[] and work[] to mcpp_mode, + cplus_val, src_line, mcpp_debug, char_type[] and work_buf[] + respectively. Renamed the functions install(), eval(), expand(), + get() and unget() to install_macro(), eval_if(), expand_macro(), + get_ch() and unget_ch() respectively. (internal.H, main.c, + directive.c, eval.c, expand.c, mbchar.c, support.c, system.c) + * Added 'mcpplib' target to make subroutine (library) build in + configure.ac and noconfig/*.mak. + * Revised some other minor points. (all sources) + * Changed default setting of noconfig.H to that of FreeBSD 6.* / + stand-alone / GCC 3.4. (noconfig.H) + * Added documentation on source checking of glibc 2.4. (mcpp- + manual.html) + * Abolished 'install-data' and 'uninstall-data' targets of + configured makefile. On the other hand, made 'install' target + install also mcpp-manual.html. + * Provided stand-alone-and-compiler-independent-build binary + packages port, rpm, deb, zip and their corresponding source + packages. + +2006/11/12 kmatsui + * V.2.6.2 + * Renamed control.c as directive.c and renamed control() as + directive(). + * Fixed a bug of #else handling in pre-Standard modes. + (directive.c) + * Fixed a bug of mcpp specific directives such as #debug or # + put_defines in pre-Standard modes. (system.c) + * Fixed a bug of warning options for GCC-specific-builds. + (system.c) + * Fixed a bug of macro expansion timing in #include directive + line. (system.c) + * Revised some other minor points, moved cur_file() from main.c + to system.c. (main.c, eval.c, system.c) + * Revised diagnostic messages for some macro expansions. + (internal.H, expand.c, support.c) + * Fixed a bug of nested includes with relative paths. (thanks + to Leo Savernik). (system.c) + * Fixed memory leaks in routines related to normalizing path- + list. (by Juergen Mueller). (system.c) + * Added MCPP_LIB setting to use mcpp as a subroutine from other + main program. Created init_main(), init_directive(), init_eval(), + init_support(), init_system(), init_lib(), clear_filelist() and + clear_symtable(). Created testmain.c as a sample source. (all + were contributed by Juergen Mueller and slightly modified by + kmatsui). (internal.H, main.c, directive.c, eval.c, expand.c, + support.c, system.c, lib.c) + * Changed the macro STAND_ALONE to INDEPENDENT. + * Changed the terminology of building methods in the documents. + (INSTALL, mcpp-porting.html, mcpp-manual.html) + * Rewrote and converted the text files in 'doc' and 'doc-jp' + directories into html files. + * Updated and corrected many points of the documents. + +2006/08/12 kmatsui + * V.2.6.1 + * Enabled automatic conversion from [CR+LF] to [LF]. (support.c) + * Set the limit of #include nesting to INCLUDE_NEST (default: + 256) in order to prevent infinitely recursive #includes. + (system.H, system.c) + * Revised white space handling in
style + header-name which is defined by macro. (system.c) + * Enabled -fworking-directory option for GCC-specific-build. + created put_info(). (system.c) + * Fixed a bug of macro definition. (lib.c) + * Fixed a bug of '#pragma once' failure. (by Greg Kress). + (system.c) + * Fixed some other minor bugs in sources. + * Revised path-list handling on CygWIN. Enabled -mno-cygwin + option for CygWIN GCC-specific-build. (configure.ac, noconfig.H, + system.c) + * Ported to MinGW. Created cc1.c to be invoked from GCC and to + invoke mcpp or GCC's cc1/cc1plus from it, because MinGW GCC + rejects to invoke a shell-script even if it is named cc1 and + because MinGW does not support symbolic link. (configure.ac, + src/Makefile.am, configed.H, noconfig.H, system.c) + * Fixed bugs in some noconfig/*.mak. + * Moved changelogs from the source files to ChangeLog and + ChangeLog.old. + +2006/07/15 kmatsui + * V.2.6 + * Integrated STANDARD mode and PRE_STANDARD mode into one + executable, differentiating the modes by the execution time + options. (all the sources) + * Absorbed DEBUG, DEBUG_EVAL, OK_MAKE into default, OK_DIGRAPHS, + OK_PRAGMA_OP into default of STD and POST_STD mode, OK_TRIGRAPHS + into default of STD mode, OK_SIZE into default of KR and + OLD_PREP modes. (all the sources) + * Changed --enable-maintainer-mode option of configure to + --enable-replace-cpp option which generates compiler-specific- + build of mcpp. Made compiler-specific-build to be installed + only into a compiler-specific-directory. (configure.ac, src/ + Makefile.am) + * Made stand-alone-build independent from any compiler-systems. + It no longer requires GCC-specific header files. (configure.ac, + configed.H, noconfig.H, system.c) + * Revised '#pragma once' and handling of include directories + list, judging a identity of directory and file by converting it + to absolute path, and dereferencing symbolic linked file. + (system.c) + * Revised #line output and its related problem at the end of an + included file. (thanks to Jay Prakash). (internal.H, support.c) + * Ported to GCC V.4.0, CygWIN 1.5.18, Visual C++ 2005 and LCC- + Win32 2006-03. (noconfig.H, system.c) + * Added some options for Visual C++. (system.c) + * Removed settings for pre-C90 compiler (string concatenation by + preprocessor, '\a' and '\v' handling, no unsigned long #if, no + Standard library functions, non-prototype declarations, no # + pragma). (all the sources) + * Removed settings for MS-DOS compiler, DJGPP and Plan9. (*.H, + system.c, mbchar.c) + * Removed the implementation of post_preproc() for pre-Standard + compiler. Removed conv_esc(), is_last_esc(), conv2oct(). + Removed HAVE_C_BACKSLASH_A and CONCAT_STRINGS macros. (main.c) + * Degraded the diagnostic of #if expression from error to + warning, which only overflows the range of 'long / unsigned + long' and does not overflow the range of 'long long / unsigned + long long' in modes other than C99. (eval.c) + * Enabled 'i64' ('ui64', 'i32', 'i16', etc.) suffixes for + integer, which are recognized when COMPILER is MSC or BORLANDC. + (eval.c) + * Renamed functions and some variables, created expand_init(), + according to integration of STANDARD and PRE_STANDARD modes. + (expand.c) + * Removed '#pragma MCPP include_next'. (system.c) + * Created init_msc_macro(), parse_warn_level(), chk_opts(), + init_predefines(), init_std_defines(), do_prestd_directive(). + Removed set_cplus(), mem_model(). (system.c) + * Removed Standard functions (memmove(), memcpy(), memcmp(), + strstr(), strcspn()). (lib.c) + * Changed default setting of noconfig.H to FreeBSD 5.* / stand- + alone / GCC 3.4. (noconfig.H) + * Renamed 'doc' directory as 'doc-jp' and renamed 'doc_eng' as + 'doc'. + * Removed some manuscript files of mcpp-summary.pdf from the + distribution. + * Validation Suite: Revised a few testcases. + * Updated all the documents accordingly. + diff --git a/libraries/mcpp/ChangeLog.old b/libraries/mcpp/ChangeLog.old new file mode 100644 index 000000000..1dc3a9425 --- /dev/null +++ b/libraries/mcpp/ChangeLog.old @@ -0,0 +1,351 @@ +ChangeLog.old of MCPP and its accompanying Validation Suite + +2005/03/19 kmatsui + * V.2.5 + * Absorbed POST_STANDARD mode into STANDARD as an execution time + option, absorbed OLD_PREPROCESSOR mode as an execution time + option of PRE_STANDARD. (all the sources) + * Changed the evaluation of #if expression in PRE_STANDARD mode + to use only (signed) long, not to use unsigned long. (eval.c) + * Revised the Standard mode macro expansion routine using GCC 3. + 2 testsuite and Wave 1.0 testcases. Revised "blue painting" of + the same name macro. Revised debugging information. Revised + handling of token separator in STANDARD mode. Split + is_macro_call() from is_macro(). (expand.c) + * Revised the old-preprocessor mode to follow "Reiser cpp model". + (expand.c) + * Removed FOLD_CASE settings. (system.c) + * Renamed most of #pragma __* directives as #pragma MCPP *. + (system.c) + * Added porting to GCC V.3.3 and 3.4. Changed some options + accordingly (changed -c to -@compat, changed -m to -e, removed + -E, added -finput-charset=). Created init_gcc_macro(), + undef_gcc_macro(). (system.c) + * Sorted usage() message lines alphabetically. + * Removed documents on older preprocessors (DJGPP, compiler + systems on MS-DOS except Borland C). + * Revised judgment of GCC version and include directories. + (configure.ac). + * Provided man page. + * Renamed the documents. + * Validation Suite: Moved tests of multi-byte character encoding + to quality matters. + * Validation Suite: Changed points allocation of the test items. + * Validation Suite: Added a few testcases for macro expansion. + * Updated Japanese and English documents. + +2004/03/20 kmatsui + * V.2.4.1 + * Revised recursive macro expansion. (expand.c) + * Added -c option (compatible mode to GCC expansion of recursive + macro). (expand.c, system.c) + * Revised some testcases in cpp-test/test-t directory. + +2004/02/25 kmatsui + * V.2.4 release. + * Implemented handling of multi-byte character encodings other + than 2-byte encodings. Made various encodings available + simultaneously. Added #pragma __setlocale. Added -m + option. Enabled environment variable LC_ALL, LC_CTYPE and LANG + to specify the encoding. (all the sources) + * Created mbchar.c. Moved type[] from system.c. Created type_* + [] tables for various encodings of multi-byte character. + Created encoding_name[][] table. Created mb_init(), + mb_read_2byte(), mb_read_iso2022_jp(), mb_read_utf8(), mb_eval(), + set_encoding(), search_encoding() and strip_bar(). (mbchar.c) + * Added porting to Plan 9 / pcc. (noconfig.H, system.c) + * Validation Suite: Added tests of various multi-byte character + encodings. + * Updated Japanese documents. + * Updated English documents which were translated by Highwell, + inc. ltd. from the Japanese documents. + * Renamed the documents. + +2003/11/28 kmatsui + * V.2.4 prerelease. + * Named this proprocessor as MCPP (This is not necessarily the + name of its executable). + * Changed predefined macro __decus_cpp as __MCPP. + * Created configure script to make mcpp executable automatically. + Accordingly, reorganized system.H, created configed.H and + noconfig.H, and changed some macro names. + * Diagnostics on macro expansion or macro redefinition were made + to show the original macro definition and its location. + * Changed DEFBUF and FILEINFO structure, reorganized some + functions and variables. Created set_fname() in system.c. + (other than system.H, eval.c lib.c) + * Created look_and_install(). (control.c) + * Removed CON_NOEXPAND and CON_EXPAND modes. Renamed CON_FALSE + mode as PRE_STANDARD. (all the sources) + * Removed append_string(), catenate() and conv_st_quote(). + (expand.c) + * Added #pragma __push_macro, #pragma __pop_macro, #pragma + __preprocess, #pragma __preprocessed. Created push_or_pop() and + do_preprocess(), revised do_pragma() accordingly. (system.c) + * Implemented -MF, -MT, -MP, -MQ options for GCC-3-compatibility. + Created md_init() and md_quote(). (system.c) + * Added porting to Visual C++ .net. (system.H, system.c) + * Removed the oldest settings on VMS, DEC C and OS-9/09. And + removed accordingly vmsparse(), reopen_stdout(), set_stdin(), + get_redirection(), put_start_file(), put_fname() and put_source(). + (system.H, system.c) + * Added strstr() and strcspn(). (lib.c) + * Moved open_file() and add_file() from main.c to system.c. + Moved sharp() from system.c to main.c. + * Updated test-reports on LCC-Win32 and ucpp. + * Updated the Japanese documents. (The English documents are not + yet updated.) + +2003/03/29 kmatsui + * V.2.3 patch 1. + * Debugged the modes other than STANDARD. (system.c) + +2003/02/28 kmatsui + * V.2.3 release. + * Implemented identifier-like operators in C++98. Created + chk_ops() in eval.c and id_operator() in support.c. (eval.c, + control.c, support.c) + * Reinforced checking of __VA_ARGS__. (control.c) + * Enabled interspersed options between filename arguments. + (system.c) + * Renamed #pragma __debug and #pragma __warning to #pragma + __debug_cpp and #pragma __warning_cpp. (system.c) + * Created the edition of Validation Suite for GCC / testsuite. + * -j option (GCC-compatible diagnostic format) added for testsuite. + * Created the document named mcpp-summary.pdf. + * Updated documents. + * Released English version of documents which were translated by + Highwell, inc. ltd. from the Japanese documents and revised by + kmatsui. + +2002/12/16 kmatsui + * V.2.3 prerelease 2. + * Port to GCC 3.2. (system.H, system.c) + * Fixed the bug of #include_next. (system.c) + * GCC-compatible options (-I-, -std=*) added. (system.c) + * Created norm_path() to normalize include directories. (system. + c) + * Fixed the bug of rescan() which warns an innocent macro call. + (expand.c) + * Updated documents. Renamed the documents. + +2002/08/26 kmatsui + * V.2.3 prerelease 1. + * Updated according to C99 (ISO/IEC 9899:1999). + * Added compatibility mode of C++ to C99. (eval.c, expand.c, + system.c) + * Increased the class of warnings from four (OR of 1, 2, 4, 8) + to five (OR of 1, 2, 4, 8, 16). Changed some errors to warnings. + * Fixed the bug of 0-parameter function-like macro. Modified re- + examination of macro of the same name. (expand.c) + * Fixed the bug of handling digraphs. Implemented UCN in pp- + number and string-literal. (support.c) + * Fixed the bugs of parse_env() and bsl2sl(). (system.c) + * Implemented many GCC-compatible options. Added -dM, -dD, + -include and -isystem option for GCC. Added -a (-lang-asm, -x + assembler-with-cpp) option. Extended -D option to enable + function-like macro definition. Changed specification of -S + option and added -V, -h option. (system.c) + * Implemented #include_next and #warning for GCC. Implemented + also #pragma __include_next and #pragma __warning_cpp. (system. + c) + * Created conv_case(), chk_env() and at_end(). Split set_limit(), + set_pragma_op(), def_a_macro() from dooptions(). Split + search_dir() from openinclude(). Removed is_id(). (system.c) + * Port to Linux / GCC 2.95.3, LCC-Win32, Borland C 5.5. (system. + H, control.c, system.c) + * Renamed functions and some variables using underscore to + separate the two words. (internal.H, all the *.c files) + * Updated the Validation Suite. + * Updated the documents. + * Renamed the directories and the documents by NIIBE Yutaka. + * Registered to CVS repository at m17n.org by NIIBE Yutaka + . + +1998/11 kmatsui + * V.2.2 + * Updated according to C++98 (ISO/IEC 14882:1998) + * Changed to evaluate "true" as 1 and "false" as 0 on C++, + according to C++ Standard. (eval.c) + * Updated UCN constraint on C++ according to C++ Standard. + (support.c) + * Fixed the bug of interaction of predefined non-standard macro + with -D option. (main.c, control.c, expand.c, system.c) + * Created undef_a_predef(). (main.c) + * Removed alloc_mem(). (system.c) + +1998/09 kmatsui + * V.2.1 + * Updated C99 features according to 1998/08 draft (including UCN, + optional multi-byte-character in identifier, type of #if + expression in integer of maximum size and concatenation of wide- + character-string-literal and character-string-literal). (main.c, + eval.c, support.c) + +1998/08 kmatsui (Kiyoshi Matsui ) + * V.2.0 + * First release of MCPP (DECUS cpp V.2) at nifty-serve and + vector/software-pack. + * Re-written according to ISO 9899:1990 and it's Amendment 1, + Corrigendum 1, 2. + * Implemented translation phases precisely. (support.c) + * Revised tokenization according to the Standard and Amendment1. + (support.c & others) + * Implemented the pre-defined macros __STDC__, __STDC_VERSION__, + __TIME__, and revised __DATE__. Made these standard macros + cannot be undefined nor redefined. (main.c) + * Implemented _Pragma() operator. (main.c & others) + * Revised some non-standard pre-defined macros. (main.c) + * Implemented #error directive. The error message is output to + the stderr. (control.c) + * Implemented #pragma __once directive, -i option and -M* option, + imported from GCC. (control.c & others) + * Implemented #pragma __put_defines, #pragma __debug directives + and the old style directives corresponding to them. (system.c & + others) + * Made #pragma lines to be output with warning to the stderr for + the compiler which can't recognize the directive. (system.c) + * Made #line argument to be subject to macro expansion. + (control.c, support.c) + * Reinforced the test of #define syntax. (control.c) + * Created Standard conforming mode of macro-expansion (including + the processing of #, ## operators). (expand.c) + * Created "post-Standard" mode of preprocessing, which is a + simplified version of Standard mode. (all the sources) + * Simplified CON_FALSE mode corresponding to K&R 1st. + specifications. CON_NOEXPAND, CON_EXPAND modes of the original + version are retained (after revising). (main.c, control.c eval. + c, expand.c) + * Revised # operator so as to inserts \ before \ or " in + stringized arguments (except in MBCHAR) in Standard mode. + (expand.c) + * Changed the type of #if expression from int to long / unsigned + long. Reinforced expression evaluation. (eval.c) + * Implemented wide character constant, multi-character character + constant, and revised multi-byte character constant in #if + expression. (eval.c) + * Revised the handling of MBCHAR in string literal and character + constant. (support.c, expand.c, eval.c, main.c) + * Supplemented the optional phase for the pre-Standard compiler- + proper to concatenate adjacent string literals, convert '\a' and + '\v' to octals, convert digraphs. (main.c) + * Implemented the features of C99-1997/11 draft except Unicode- + related features (_Pragma operator, variable arguments of macro, + // comments, long long of #if expression, p+ of pp-number) (all + the sources) + * Supplemented the C++ preprocessor option. (support.c, system. + c) + * Refined error checks and diagnostic messages. (all the + sources) + * Implemented -M* option. (main.c, system.c) + * Updated MS-DOS memory model option. (system.c) + * Revised command line options. (system.c) + * Made the source files compilable by C++ as well as C. (all + the sources) + * Re-organized and re-written the source files to be portable to + many systems. (all the sources) + * + * main.c: + * Renamed cpp1.c main.c. + * Created do_pragma_op(), de_stringize(), devide_line(), putout(), + putline(), post_preproc(), conv_esc(), conv2oct(), is_last_esc(), + esc_mbchar(), conv_a_digraph(). + * Removed output(). + * Moved sharp() from cpp1.c to system.c, addfile(), openfile(), + initdefines(), unpredefine() from cpp3.c to main.c, + * Revised most of the functions and variables. + * + * control.c: + * Renamed cpp2.c control.c. + * Moved dodefine(), is_formal(), mtokensave(), stparmscan(), + doundef() from cpp4.c to control.c. + * Moved lookid(), defendel(), dump_a_def() from cpp6.c to + control.c. + * Moved doinclude(), openinclude(), vmsparse() from cpp2.c to + system.c. + * Split doline() from control(). + * Split getparm(), getrepl(), def_stringization() from dodefine(). + * Split dumprepl() from dump_a_def(). + * Devided defendel() to install(), undefine(), lookprev(). + * Removed textput(), charput(), checkparm() from cpp4.c. + * Expanded specification of stparmscan(). + * Revised most of the functions. + * + * eval.c: + * Renamed cpp5.c eval.c. + * Created overflow(), dumpval(). + * Split evalsval(), evaluval() from evaleval(). + * Made #if error returns 0 (rather than 1). + * Changed the type of #if evaluation from int to long / unsigned + long (unsigned long is only for the compiler which has that type) + or long long / unsigned long long for C99. + * Reinforced expression evaluation (eval(), opdope[]). + * Implemented evaluation of multi-character character constant, + wide character constant and revised evaluation of multi-byte + character constant. + * Revised most of the functions. + * + * expand.c: + * Split from cpp4.c and cpp6.c (support.c). + * Created Standard conforming mode of macro expansion. + * Created is_macro(), squeeze_ws(), skip_macro() as common + routines, expand(), replace(), def_special(), prescan(), + catenate(), stringize(), substitute(), rescan(), disable_repl(), + enable_repl(), is_able_repl() for MODE >= STANDARD, expand(), + conv_st_quote() for MODE < STANDARD. + * Split expcollect() into collect_args() and get_an_arg(). + * Renamed macroid() to rescan(), expand() to replace(), expstuff + () to substitute() for MODE < STANDARD, dumpparm() to dump_args(). + * Revised most of the functions. + * + * support.c: + * Renamed cpp6.c support.c. + * Created get_unexpandable(), scantoken(), cat_line(), scanop(), + parse_line(), last_is_mbchar(), cnv_digraph(), at_eof(), + xrealloc(), putline(), dumptoken(). + * Split getline(), read_a_comment() from get(). + * Extended cfatal(), cerror(), cwarn(), removing cierror(), + ciwarn(). + * Removed save(), cget(). + * Moved macroid(), catenate(), appendstring() from cpp6.c to + expand.c, lookid(), defendel() from cpp6.c to control.c. + * Renamed scanstring() to scanquote(), getmem() to xmalloc(). + * Revised most of the functions. + * Revised line splicing and tokenization. + * + * system.c: + * Created this file gathering routines from other files. Moved + sharp(), sharpsub(), getredirection() from cpp1.c to system.c, + doinclude(), openinclude(), hasdirectory(), vmsparse() from cpp2. + c to system.c, setincdirs(), dooptions(), zap_uc() from cpp3.c + to system.c, + * Created setoptlist(), setcplus(), bsl2sl(), put_depend(), + dopragma(), doonce(), included(), dumppath(), is_junk(), + alloc_mem(), print_heap(); + * Split reopen_stdout(), setstdin() from main(), put_start_file(), + putfname() from cppmain(), setfiles(), usage(), mem_model(), + is_id() from dooptions(), doold(), dodebug(), doasm(), put_asm() + from control(). + * Split setincdirs() to setsysdirs(), setenvdirs(), parse_env(), + set_a_dir(). + * Moved type[] from cpp6.c to system.c. + * Revised most of the functions. + * + * system.H: + * Re-written and renamed from cppdef.h. + * + * internal.H: + * Re-written and renamed from cpp.h. + * + * Created Validation Suite for C/C++ preprocessing. + * + * Provided some supplementary tools for preprocessor testing. + * + * Wrote comprehensive documents (in Japanese). + +* Edit history of DECUS CPP (MM: Martin Minow) + * 21-May-84 MM "Field test" release + * 11-Jul-84 MM "Official" first release (that's what I thought!) + * 31-Aug-84 MM USENET net.sources release. + * 7-Dec-84 MM Stuff in Nov 12 Draft Standard + * 07-Jun-85 KR Latest revision diff --git a/libraries/mcpp/INSTALL b/libraries/mcpp/INSTALL new file mode 100644 index 000000000..b96d2dfe9 --- /dev/null +++ b/libraries/mcpp/INSTALL @@ -0,0 +1,541 @@ +This file explains how to generate executables by compiling the MCPP +source. For further details, please refer to mcpp-porting.html. + +1. Types of MCPP executables + +There are several types of MCPP executable corresponding to its building +methods. The building methods of MCPP have following two axis: + + 1. stand-alone-build vs subroutine-build + 2. compiler-independent-build vs compiler-specific-build + +stand-alone-build: The preprocessor which is invoked as a command. + Some of this type is invoked by compiler-driver. +subroutine-build: The preprocessor to be called as a subroutine + (repeatedly, if required) from other main program. + +compiler-independent-build: The preprocessor which behaves on its own + not depending on any compiler system. The invocation options, for + example, are the same across the compilers with which MCPP is + compiled. Although it can preprocess source files, it cannot behave + as an integrated part of a compiler system. +compiler-specific-build: The preprocessor to replace (if possible) the + resident preprocessor of certain compiler system. It has some + specifications for the compiler system only and is installed into + the compiler-system-specific directory. + +This document does not explain subroutine-build. As for it, please +refer to mcpp-porting.html 3.12. All the explanations below are of +stand-alone-build. + +2. Configure and make + +To compile MCPP, the configure script can be used on UNIX-like systems +and CygWIN, MinGW. You can do configure and make in any directory. In +this document ${mcpp-dir} represents the path of 'mcpp-${VERSION}' +directory. The ${VERSION} represents the version of MCPP such as 2.6.4 +or 2.7.1. + +The configure script searches for compilers by name of 'cc' ('c++') and +'gcc' ('g++') according to the path list set in the environment variable +$PATH. So, if you use compilers named like 'gcc-4.3.0' and 'g++-4.3.0', +you have to specify them by CC and CXX environment variables, or link +them to 'gcc' and 'g++', prior to do configure. If you use a pair of +compilers other than the one first found in the path list, you have to +change the $PATH such as: + + export PATH=/my/gcc/bin:$PATH + +The setting should be kept the same while you do 'configure' and 'make'. +Do not specify a compiler by CC or CXX variable with any directory part, +even in an absolute path, when it is not the first one found in the +$PATH, because $PATH influences everything of configure. + +2.1. The compiler-independent-build + +If you type the commands as: + + ${mcpp-dir}/configure; make; make install + +the compiler-independent executable will be generated and installed by +name of 'mcpp'. Also a few document files will be installed. + + ${mcpp-dir}/configure --prefix=/usr; make; make install + +will install the executable into 'bin' directory in the directory +specified by '--prefix' option. If this option is omitted, the +directory defaults to '/usr/local'. + +'make install' usually requires root privilege, and you can do it by: + + sudo make install + +or by first 'su', then 'configure; make; make install'. +On FreeBSD, you'd better to use 'gmake' instead of 'make'. +To strip the executable, do: + + make install-strip + +instead of 'make install'. + +To uninstall the executable, do: + + make uninstall + +If you specify 'DESTDIR=DIR' option with make (un)install, all the files +will be installed under (or uninstalled from) the 'DIR' directory. For +example, + + make DESTDIR=/tmp/mcpp install + +will install MCPP into '/tmp/mcpp/usr/local/bin/', (Non-existent +directories will be generated. If '--prefix=DIR' option was specified +in configure, '/usr/local' part will be replaced by 'DIR'). This option +is used to make a binary package. + +GCC 4.1 or later has the option '-fstack-protector' ('-fstack-protector- +all'). You can enable it by adding "CFLAGS+='-fstack-protector'" option +to make command. The same can be said on GCC-specific-build. Also, you +can use "CFLAGS+='-ggdb -O0'" option to debug mcpp by gdb. + +'make install' of compiler-independent-build installs a few documents as +well as the executable. This is for the convenience of making a binary +package. + +Note that on Linux, Mac OS X, CygWIN and MinGW, the system's standard +headers have certain defects, and some workarounds are necessary for the +compiler-independent-build of MCPP. See mcpp-manual.html 3.9.9 for this +problem. + +2.2. The compiler-specific-build + +This line of commands will generate a compiler-specific executable and +will install it into the compiler-specific directory. + + ${mcpp-dir}/configure --enable-replace-cpp; make; make install + +'make install', 'make install-strip', 'make uninstall' are the same as +compiler-independent-build. + +The prefix directory is automatocally set from the path of GCC: for +example, '/usr/local' of '/usr/local/bin/gcc'. If you specify --prefix +option for configure and it conflicts with the GCC path, the --prefix +option will be ignored. 'DESTDIR' option of make has also no relevance +to the executable's installation. + +For the compiler systems other than GCC, however, it may not be compiled +or installed properly if some porting work has not been done beforehand +and if some of the options are not specified with configure. + +2.2.1 When the compiler system is GCC + +When the compiler system is GCC, the appropriate settings will be set by +the configure without any options other than '--enable-replace-cpp'. +After configuring, do 'make'. + +2.2.1.1. make install + +After configuring and 'make', the 'make install' command installs MCPP +into the compiler's directory (e.g. /usr/libexec or /usr/lib/gcc-lib/ +SYSTEM/VERSION). This is the directory where cc1 (cpp0), which is +called by gcc, is located. 'make install' saves GCC / cc1, cc1plus +(cpp0) and setups gcc and g++ command appropriately to call MCPP. This +setting is different depending on GCC being V.2.* or V.3.*-4.*. (Refer +section 3.9.5 and 3.9.7 of mcpp-manual.html). In addition, it generates +some GCC-version-dependent header files under 'mcpp-gcc*' directory in +compiler-specific include directory. + +2.2.1.2. make check + +In the MCPP Validation Suite, there is an edition which can be used as +testsuite of GCC. If GCC / testsuite has been installed, 'make check' +can test MCPP using the testsuite edition of Validation Suite. Because +this edition is to be used as a part of GCC / testsuite, the testsuite +should be installed and ready to execute in advance. GCC / testsuite is +usually a part of the source code of GCC. (It can be a separate package +in some cases.) You can use any version of testsuite from GCC V.2.95.* +to V.4.2.*. + +Also, 'configure' needs an option to specify the directory where GCC / +testsuite is located, as: + + ${mcpp-dir}/configure --with-gcc-testsuite-dir=DIR \ + --enable-replace-cpp + +If the directory where GCC source is located is ${gcc-source}, this +'DIR' should become: + + ${gcc-source}/gcc/testsuite + +Configured as above, 'make check' after 'make; make install' copies the +testsuite edition of Validation Suite into GCC / testsuite, and applies +required settings according to whether GCC is V.2.* or V.3.*-4.*. When +the name of the gcc command is not 'gcc', for example 'gcc-4.1.2' or +'powerpc-apple-darwin9-gcc-4.0.1', 'make check' links 'gcc' to that name +temporarily, because GCC testsuite expects literal 'gcc' for the name. +Then, the testsuite will be executed. Usually, 'make check' would be +run before 'make install' in the normal software, but this order is +reversed in MCPP. This is because testsuite cannot be applied to MCPP +unless MCPP is called from gcc. Due to this, the option '--enable- +replace-cpp' is also required. + +Depending on the location of ${gcc-source} directory, you should do +'sudo make check' instead of 'make check'. In this case, make sure that +gcc is the same between root and the current user. + +The testsuite edition of Validation Suite can also be applied to cc1, +cc1plus (cpp0) of GCC V.2.95 and later, not only for MCPP. (Refer cpp- +test.html 3.2.3). + +2.2.1.3. make uninstall + +When you type 'make uninstall', the executables of MCPP will get deleted. +The header files in mcpp-gcc* directory will be deleted, too. The +settings of gcc and cc1, cc1plus (cpp0) will be reset to the initial +state. When the re-execution of configure is required after completing +'make install' for some reason, 'make uninstall' needs to be done +beforehand. This is because the configure should check GCC, not MCPP. + +If you have done 'make check', the 'make uninstall' will also remove the +testsuite edition of Validation Suite. If you want to use Validation +Suite for GCC, copy it manually. + +The Makefiles generated by configure are necessary to do 'make +uninstall', so you should not remove them. When you do 'make distclean', +first do 'make uninstall', because it is a little troublesome to +uninstall GCC-specific-MCPP manually. Also you should do 'make +uninstall; make distclean' even before updating configure or Makefile.in, +when you update MCPP. + +2.2.2. When the compiler system is Apple-GCC on Mac OS X + +Although Mac OS X is one of the UNIX-like systems, it has some +peculiarities such as "framework" directories. Its system compiler is a +GCC with many extensions added by Apple. Moreover, since the appearance +of Intel-Mac, both of the compiler system for x86 and the compiler +system for powerpc, one is a native compiler and the other is a cross +compiler, begun to co-exist in a same machine. And even a so-called +"universal binary", which is a bundle of binaries for x86 and powerpc, +hence is able to work on either machine, has become popular. The +structure of compiler systems is rather complex. + +To install MCPP for this complex system, the command sequence of 2.2.1 +is not sufficient. Here, I explain the case of Mac OS X / Apple-GCCs +apart from other UNIX. I am using Mac OS X Leopard on Intel-Mac, so I +take the examples of the system. If you use Powerpc-Mac, read the +section below swapping 'i686' and 'powerpc'. On Tiger, read 'darwin9' +as 'darwin8'. + +Apple provides GCC 4.0.1, and also provides GCC 3.3 as an addition. I +explain only GCC 4.0.1, and omit GCC 3.3, because it has not been +properly compiled at least on Leopard. + +2.2.2.1. Native compiler versus cross compiler + +It is simple to compile and install MCPP for a native compiler, i.e. for +x86 on Intel-Mac. The command sequence in 2.2.1 is sufficient for it. + +Making of MCPP with a cross compiler, however, is not so easy. +Generally, the configure script of MCPP does not support cross compiling, +because it contains a few tests to be compiled and executed. A binary +for a target environment cannot be run on a build environment usually. +If we test the build environment instead, the results are not +necessarily the same with the target. + +Nevertheless, on Mac OS X, we can exceptionally configure cross- +compiling for different CPUs in most cases. First, Intel-Mac +automatically executes a ppc binary with an emulator. Second, if the +build environment and the target differ only in CPU and its related +settings, and OS, its version and GCC's version are all the same between +them, we can substitute most of the tests of the target with that of the +build. + +On Intel-Mac, for a compiler-independent-build, you should specify the C +compiler (the name of compiler driver) and C++ compiler by the +environment-variables CC and CXX. There are many gccs and g++s in /usr/ +bin of Mac OS X. In Mac OS X Leopard on Intel-Mac, powerpc-apple- +darwin9-gcc-4.0.1 and powerpc-apple-darwin9-g++-4.0.1 are the C compiler +and the C++ compiler for powerpc. (Actually, all the gccs and g++s in +/usr/bin are universal binaries of i386 and ppc.) In addition, you +should specify the target system by --target option. In this case, you +should use the compiler's name removing '-gcc-4.0.1', i.e. powerpc-apple- +darwin9. This is the configure command to make compiler-independent- +build: + + ${mcpp-dir}/configure --target=powerpc-apple-darwin9 \ + CC=powerpc-apple-darwin9-gcc-4.0.1 \ + CXX=powerpc-apple-darwin9-g++-4.0.1 + +On the other hand, ppc-Mac cannot execute an x86 binary, so you cannot +make the compiler-independent-build with this method. Instead, you can +cross-compile it manually, using the difference file and mac_osx.mak. +See mcpp-porting.html#3.1.4 and #3.11, if needed. You can also make a +universal binary on ppc-Mac with its native compiler using the configure, +as explained in the next section. + +To make a GCC-specific-build, you should specify the C compiler by +--with-target-cc= option instead of CC and CXX as: (the configure deduce +the name of C++ compiler from the name of C compiler, replacing 'gcc' +with 'g++'.) + + ${mcpp-dir}/configure --target=powerpc-apple-darwin9 \ + --with-target-cc=powerpc-apple-darwin9-gcc-4.0.1 \ + --enable-replace-cpp + +This configuration does not contain any running test of the target, so +it can be used on ppc-Mac too, changing 'powerpc' with 'i686'. + +When the version of the default native compiler (gcc and g++) greatly +differs from that of the cross compiler specified by --with-target-cc= +option, you should specify a native compiler of a version as close as +possible to the target by the environment-variables CC and CXX. The +compiler specified by CC (CXX) is to be used to build MCPP, while the +compiler specified by --with-target-cc= is the target compiler into +which MCPP is installed. + +The cross compiler differs from the native compiler in libexec directory, +compiler-specific include directory and predefined macros. The +configure with these options appropriately sets them. These options +should be used for configure, not for make command. + +Note that a cross compiler itself runs on a host system, so does a +compiler-specific-build MCPP installed "to a cross compiler". On the +other hand, a compiler-independent-build MCPP compiled "with a cross +compiler" runs on a target system. Also note that both of the GCC- +specific-build for the native compiler and for the cross compiler are +compiled by the native compiler, therefore, if you install both, you +should first install the one for the cross compiler. + +2.2.2.2. Making a universal binary + +To make a universal binary, specify the CPUs by -arch options and add +them to the 'make' command as "CFLAGS+='-arch i386 -arch ppc'". The +valid CPU types are 'i386', 'x86_64', 'ppc' and 'ppc64'. For example, +this command generates a bundled binary for 4 CPU types. + + make CFLAGS+='-arch i386 -arch x86_64 -arch ppc -arch ppc64' + +The configure needs no special option for universal binary, it needs +only options for non-universal binary, if any. + +GCC has '-isysroot DIR' or '--sysroot=DIR' options, which change root of +system include directories to DIR. These options are not limited to Mac +OS, but are commonly used on Mac OS to compile a universal binary in +order to widen compatibility with older version of Mac OS. For example, +if '-isysroot /Developer/SDKs/MacOSX10.4u.sdk' is specified, /usr/ +include becomes /Developer/SDKs/MacOSX10.4u.sdk/usr/include. This is an +example to compile a universal binary compatible with Mac OS X 10.4 +(Tiger) on 10.5 (Leopard). When you use this option in making MCPP, you +should also specify the version of SDK by -mmacosx-version-min= option. + +Any universal binary of MCPP can be generated with a combination of the +above configure options and these make options, on either of compiler- +independent-build or GCC-specific-build, and on either of native +compiler or cross compiler. This example shows the sequence to generate +a universal binary of compiler-independent-build compatible with Tiger +for i386 and ppc. (Actually, you should write the '*' in one line.) + + ${mcpp-dir}/configure + make CFLAGS+='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ + -mmacosx-version-min=10.4 -arch i386 -arch ppc' + sudo make install + +2.2.3. When the compiler system is not GCC + +When the compiler system is not GCC, some options need to be specified +in the configure. Also, to use MCPP replacing the preprocessor of the +compiler system, the "porting" or adding source code is required. MCPP +have already been ported to GCC, because the author is using GCC on +Linux, FreeBSD, Mac OS X, CygWIN and MinGW systems, and so the +informations can be collected by the configure. However, as he does not +know any compiler systems on UNIX-like systems other than GCC, he does +not even know what or how it needs to be checked by the configure, let +alone the porting. + +For compiler systems other than GCC on UNIX systems, please compile with +the following procedures. + +2.2.3.1. Configure by specifying options + +First, do configure by specifying some options, for example: + + ${mcpp-dir}/configure --enable-replace-cpp --bindir=DIR \ + --with-cxx-include-dir=CXXDIR \ + --enable-SYSTEM-STD-macro=_MACRO=val + +Specify the directory where the preprocessor, which is called from the +compiler-driver, is located with --bindir, specify the C++ specific +include directory with --with-cxx-include-dir and specify the predefined +macro of the resident preprocessor with --enable-SYSTEM-STD-macro or +other options. + +If you type + + ${mcpp-dir}/configure --help + +some options will be displayed. + +Then, after doing 'make; make install', some work for making MCPP +callable from the compiler driver is required. Please see the setup on +GCC for how to do this. + +2.2.3.2. "Porting" work + +To be able to use the MCPP replacing the preprocessor of the compiler +system, it is required to do "porting" work by adding source code. +These are the execution options for the compiler system or the +implementation of #pragma directives. Especially, when there are some +execution time options which are used frequently but different from MCPP, +they at least need to be implemented. In order to do that, define the +macro to designate the compiler in configed.H, and write some codes in +system.c. (Refer mcpp-porting.html 4.2). + +2.2.3.3. Re-configure by adding an option + +Once porting of source is completed, re-configure by adding the option +--with-compiler-name=COMPILER. 'COMPILER' is the macro for the compiler +defined in configed.H. + +After 'make; make install' is done successfully, do 'make clean; make' +which recompiles MCPP using the installed MCPP. If it passes, it can be +said that basic porting has been done successfully. + +2.2.4. The limitations of the configure + +In the compilation of compiler-specific-build of MCPP, the +specifications of the target system (the compiler system which will use +MCPP as a preprocessor) must be understood in detail. At the same time +the host system (the compiler system with which MCPP is compiled) need +to be understood. In case these two are not the same, the source code +of MCPP is written with the settings of both systems separately in the +header file (configed.H). However, the configure cannot detect both of +them at the same time. Therefore, it assumes the target system is the +same as the host system. + +If these two systems are not the same, Part 2 of the configed.H needs to +be modified. + +Cross-compiling is not supported by the configure of MCPP, either. Some +tests which cannot be executed by the cross-compiler are included as +well. In case of cross-compiling, the default values will be set, but +this may not work. + +3. 'make' on the Windows compiler systems + +Since all compiler systems on Windows other than CygWIN and MinGW are +not subject to the 'configure', they need a bit of modification of the +source in order to do 'make'. As there are difference files for already +ported systems, a patch can be applied by using them. The procedure for +the use of the difference files is explained below. + +Even the systems subject to the 'configure' can also be controlled in +detail by editing the makefile and header files directly. + +3.1. Applying a patch + +The difference files and makefiles for various compiler systems are +available in 'noconfig' directory. The source of MCPP is defaulted to +FreeBSD / GCC 3.4 setting. The difference files are used in order to +modify this source for the particular compiler systems. The makefile is +written for using the make command attached to each compiler system. + +In the 'src' directory, run as below. All of the following process +should be done within the 'src' directory. + + patch -c < ..\noconfig\which-compiler.dif + copy ..\noconfig\which-compiler.mak Makefile + +'patch' is a UNIX command, but it can be used in Windows as it has been +ported. Of course, you can directly edit the noconfig.H file referring +the difference file. + +3.2. Modifying noconfig.H and Makefile if required + +The settings of various directories in the difference files are based on +the environment of the author, hence you have to modify them. + +If the version of the compiler system is different from that of the +difference file, modify the header file noconfig.H. (See noconfig.H +itself and mcpp-porting.html 3.1). Similarly, if the multi-byte +character for normal use is not Japanese, change the macro definition +MBCHAR in noconfig.H. + +Also, define BINDIR in the Makefile to the directory in which MCPP +executable should be installed. As for the Makefile for Visual C, +remove '#' of this line and make 'install' target effective. + + #install : + +3.3. Compiler-independent-build + +Now, you can do 'make' and 'make install' successfully for the compiler- +independent executable. (For Visual C, use 'nmake' instead of 'make'). + +3.4. Compiler-specific-build + +To make the compiler-specific-build, rewrite BINDIR in the Makefile to +the directory in which the executables of the compiler system are +located. Then, rewrite this line in noconfig.H: + + #define COMPILER INDEPENDENT + +Replace 'INDEPENDENT' with the macro to designate the compiler. Then do +'make' and 'make install'. 'COMPILER' can be overwritten also by make +option, hence the file can be left as it is. For example, in Visual C, +'nmake COMPLIER=MSC' and 'nmake COMPILER=MSC install' or in Borland C, +'make -DCOMPILER=BORLANDC' and 'make -DCOMPILER=BORLANDC install'. + +If the target system and the compiling system are different, noconfig.H +/ Part 1 should be set to the specifications of the target system and +Part 2 should be set for the compiling system. The Makefile that should +be used is the compiling system's one, and modify the installation +directory to the target system's one. + +Since most compiler systems on Windows integrate preprocessor into its +compiler, it is impossible to replace the preprocessor of such a one- +path compiler with MCPP. To use MCPP, a source program should be first +preprocessed with MCPP and then the output should be passed to the +compiler. To use MCPP with a one-path compiler, the procedure should be +written in makefile. For sample procedures, refer to the makefile's +settings used to recompile MCPP using MCPP itself. + +In Visual C++, if you create "makefile project" by IDE using the +attached makefile, all the functions of IDE, such as source level debug, +become available. (Refer mcpp-manual.html 2.10) + +3.5. Test + +On Windows, any include directory is not preset except MinGW/GCC- +specific-build and GygWIN, hence you should specify them by the +environment variable INCLUDE (and CPLUS_INCLUDE, if necessary). + +GCC / testsuite cannot be used in Windows, MCPP needs to be checked +directly by preprocessing the test samples in test-t, test-c and test-l +directories. If you use tool/cpp_test.c, it can test some parts +automatically. (Refer cpp-test.html 3.2.2). + +For the compiler-specific-build of MCPP, if you re-compile MCPP with the +"pre-preprocess" functionality of MCPP, by using MCPP itself as the +preprocessor of the compiler system, you can check whether it has been +ported successfully for the compiler system. (Refer mcpp-porting.html 3. +7) + +4. Please send me the information for porting. + +To port to the compiler systems which have not been ported yet, lots of +information is required. It will be great to hear from many people. + +Please let me know if you know the values for options of the 'configure', +for compiler systems other than GCC. I would like to work on configure. +ac. + +5. Validation Suite + +MCPP provides "Validation Suite" which tests and evaluates C/C++ +preprocessor comprehensively. Validation Suite has 265 items and can be +applied to any preprocessor as well as MCPP. Refer to 3.1 and 3.2 of +cpp-test.html. + +November, 2008 +Kiyoshi Matsui + diff --git a/libraries/mcpp/INSTALL-jp b/libraries/mcpp/INSTALL-jp new file mode 100644 index 000000000..38941720d --- /dev/null +++ b/libraries/mcpp/INSTALL-jp @@ -0,0 +1,468 @@ + ł́AMCPP ̃\[XRpCĎsvO𐶐@ +܂Bڍׂ͂ mcpp-porting.html ĂB + +1AsvO̎ + + MCPP ̎svO build @ɉĉނ܂BBuild +@ɂ͎̂Q‚̎܂B + + 1. stand-alone-build vs subroutine-build + 2. compiler-independent-build vs compiler-specific-build + +stand-alone-build: P‚̃R}hƂĒP̂œvvZbTłB + ñRpCEhCoĂяô܂B +subroutine-build: ̃CvO̒Tu[`ƂāiKv + JԂjĂяôłB + +compiler-independent-build: n͓ƗēvvZbTłB + sIvVȂǂ̎dl͏n̂ɂ炸łBvv + ZX邱Ƃł܂An̈ꕔƂē삷邱Ƃ͂ł + B +compiler-specific-build: ̏ñvvZbTi”\Ȃj + ւ邽߂̂̂łB̏nɐp̎dlȀn̐ + p̃fBNgɃCXg[܂B + + Subroutine-build ɂ‚Ă͂ł͐͗܂Bmcpp-porting.html 3. +12 ĂBȉׂ͂ stand-alone-build ɂ‚Ă̐łB + +2Aconfigure make + + MCPP RpCɂ́AUNIX ñVXe CygWIN, MinGW ł +configure XNvggƂł܂Bconfigure make ͔Cӂ̃fB +NgŎsł܂Bȉ̐ł mcpp-${VERSION} fBNĝ + path ${mcpp-dir} ƕ\L܂B${VERSION} 2.6.4, 2.7.1 +MCPP ̃o[WłB + +Configure ̓RpC cc (c++) ܂ gcc (g++) ƂOŁA‹ + $PATH ɃZbgꂽ path list ̏ɃT[`܂BāAgcc-4. +3.0, g++-4.3.0 ƂÕRpCgȂAconfigure Oɂ +‹ϐ CC, CXX Ŏw肷邩A܂ gcc, g++ ɃNĂĂ +BApath list ōŏɃT[`RpCȊÕRpC +gȂA$PATH ̂悤ɕύXȂ΂Ȃ܂B + + export PATH=/my/gcc/bin:$PATH + +̐ݒ make I܂ňێĂBPath list ōŏɃT[` +RpCȊÕRpC CC, CXX Ŏw肵Ă͂܂B +΃pXŎw肵Ă_łBPath list configure ׂ̂Ăɉe +^邩łB + +2A1Acompiler-independent-build + + ${mcpp-dir}/configure; make; make install + +ƂƁAcompiler-independent ł̎svO mcpp Ƃ +OŃCXg[܂Bꕔ̃hLgCXg[܂B + + ${mcpp-dir}/configure --prefix=/usr; make; make install + +Ƃꍇ́Aprefix Ŏw肳ꂽfBNg̒ bin fBNg +CXg[܂Bw肵Ȃ /usr/local w肵̂Ɠ +ƂɂȂ܂B + make install ɂ͒ʏ root KvȂ̂ŁA + + sudo make install + +Ƃ܂B邢 su Ă configure; make; make install Ƃ܂B +ȂAFreeBSD ł make ł͂Ȃ gmake gĂB + svO strip ɂ́Amake install ̂ + + make install-strip + +Ƃ܂B + + make uninstall + +ƂƁAMCPP ̎svO͍폜܂B + + make (un)install ł DESTDIR=DIR ƂIvVw肷ƁADIR +̃fBNgɃCXg[܂BႦ΁A + + make DESTDIR=/tmp/mcpp install + +ƂƁA/tmp/mcpp/usr/local/bin/ MCPP CXg[܂i +ȂfBNg͍쐬Bconfigure --prefix=DIR IvVw +肵Ă '/usr/local' ̕ 'DIR' ɒujBoCiEpb +P[Wɂ͂̕@g܂B + + GCC 4.1 ȍ~ɂ -fstack-protector (-fstack-protector-all) ƂIv +V܂Amake CFLAGS+='-fstack-protector' ƂIvV +w肷邱ƂłLɂ邱Ƃł܂B GCC-specific- +build łlłBMCPP gdb ŃfobO鎞ɂ CFLAGS+='-ggdb -O0' +Ƃ܂B + + compiler-independent-build ł make install ōŏ̃hLg +CXg[悤ɂ܂B̓oCiEpbP[W‚ +ɍ킹̂łB + + Linux, Mac OS X, CygWIN, MinGW ł̓VXe̕Wwb_Ɍׂ +ŁAcompiler-independent-build MCPP ł͂̑΍􂪕KvłB̖ +ɂ‚Ă mcpp-manual.html 3.9.9 ĂB + +2A2Acompiler-specific-build + + ${mcpp-dir}/configure --enable-replace-cpp; make; make install + +ƂƁAcompiler-specific ł̎svOāȀn +p̃fBNgɃCXg[܂B + make install-strip, make uninstall compiler-independent-build Ɠ +łB + prefix fBNg GCC path 玩Iɐݒ肳܂BႦ GCC + path /usr/local/bin/gcc ł΁A/usr/local prefix Ƃ܂B +configure --prefix IvVw肵ĂAꂪ GCC path Ɩ +ĂΖ܂B܂Amake ł DESTDIR IvVAsvO +̃CXg[ɂ͊֌W܂B + + AGCC ȊȌnł͐ɈڐAƂsAconfigure łɂ +‚̃IvVw肵ȂƁAK؂ȃRpCƃCXg[܂ +B + +2A2A1An GCC ̏ꍇ + +2A2A1A1Amake install + --enable-replace-cpp IvV configure ꍇAmake install +̓RpC̒ufBNgi/usr/libexec, /usr/lib/gcc-lib/i686- +pc-linux-gnu/VERSION jɎsvOCXg[܂B +gcc ̌Ăяo cc1 (cpp0) uĂfBNgłBmake install + GCC / cc1, cc1plus (cpp0) ۑŁAgcc, g++ MCPP Ăяo +悤ɓK؂Ȑݒ܂B̐ݒ GCC V.2.* ł邩 V.3.*, +4.* ł邩ɂĈĂ܂imcpp-manual.html 3.9.5, 3.9.7 QƂ +ƁjB܂AGCC ̃o[Wɉwb_t@C compiler-specific + include directory ̒ mcpp-gcc* ƂfBNgɐ܂B + +2A2A1A2Amake check + MCPP ̌؃Zbgɂ GCC testsuite ɑΉ edition ܂B +GCC / testsuite CXg[Ăꍇ́Amake check ɂĂ +testsuite Ō؃Zbg MCPP Standard [h̃eXg邱Ƃł +܂BTestsuite Ō؃Zbg GCC / testsuite ̈ꕔƂĎg悤ɂ +Ă̂ŁA炩 GCC / testsuite CXg[sł +ԂɂȂĂ邱ƂKvłBGCC / testsuite ͒ʏ GCC ̃\[Ẍ +ƂȂĂ܂iʂ̃pbP[WƂȂĂꍇjBGCC V.2.95.* +ȍ~ testsuite g܂AV.4.3.* ̂̂ɂ͎኱̖肪̂ŁAV. +4.2.* ܂ł̂̂gĂB + ܂Aconfigure 鎞 GCC / testsuite ̒uĂfBNg +w肵ĂKv܂B̂߂ɂ͎̂悤ɂ܂B + + ${mcpp-dir}/configure --with-gcc-testsuite-dir=DIR \ + --enable-replace-cpp + + 'DIR' GCC ̃\[XuĂfBNg ${gcc-source} +ƁA + + ${gcc-source}/gcc/testsuite + +ƂȂ͂łB + configure ĂāAmake; make install + + make check + +ƂƁA؃Zbg testsuite ł GCC / testsuite ̒ɃRs[A +GCC V.2.* ł邩Ƃ V.3.*, 4.* ł邩ɉĕKvȐݒ肪 +܂BTestsuite ł gcc ̖O͕ʂ 'gcc' łȂ΂Ȃ܂񂪁A +MCPP CXg[ gcc ̖OĂꍇ́Agcc ƂO +Iɂ̖O symbolic link ܂B testsuite s܂B +ʏ̃\tgEFAł make install ̑O make check ܂AMCPP +ꍇ͏tɂȂ܂Bgcc MCPP Ăяo悤ɂĂȂ + testsuite MCPP ɓKpłȂłB܂ --enable- +replace-cpp IvVKvłB + ${gcc-source} ̂肩ɂĂ make check sudo make check Ƃ +΂Ȃ܂񂪁Ȁꍇ root ƌ[UƂ 'which gcc' ̌ʂ +vĂȂ΂ȂȂƂɒӂĂB + Testsuite Ō؃Zbg MCPP łȂAGCC V.2.95 ȍ~ cc1, +cc1plus (cpp0) ɂKp邱Ƃł܂icpp-test.html 3.2.3 QƁjB + +2A2A1A3Amake uninstall + make uninstall ƂƁAMCPP ̎svO͍폜܂B +mcpp-gcc* fBNg̃wb_t@C폜܂Bgcc, cc1, cc1plus +(cpp0) ̐ݒ͏Ԃɖ߂܂B̂‚ make install +configure Ďsꍇ́ȂO make uninstall Ȃ΂Ȃ܂ +BConfigure ׂȂ̂ GCC ł MCPP ł͂ȂłB + GCC / testsuite ̒Ɍ؃ZbgCXg[Ă΁A +make uninstall ō폜܂BGCC Ɍ؃ZbgKpɂ́A蓮Ō +؃ZbgRs[ĂB + GCC-specific-build configure Őꂽ{ Makefile MCPP + uninstall ƂɕKvȂ̂ŁÂ܂܎cĂĂBmake +distclean ꍇ́ȂO make uninstall sĂB蓮 +uninstall ̂͏Ԃ邩łBlɁAconfigure +Makefile.in XVꍇ́ȂO make uninstall; make distclean +ĂȂ΂Ȃ܂BMCPP update ꍇ͒ӂĂB + +2A2A2An Mac OS X Apple-GCC ̏ꍇ + + Mac OS X UNIX nƂ͌Aframework directory ̓Ǝ̗vf +Ă܂BGCC Apple ɂ鑽̊g{ꂽ̂VXeRpC +ɂȂĂ܂B Intel-Mac ̓oȍ~́Ax86 p̃RpCVX +e powerpc p̃RpCVXeƂiЕ̓lCeBuRpC +̓NXRpCłj}Vɋ悤ɂȂAx86 p̎ +svO powerpc p̎svOP‚ɑ˂Ăǂ̃}V +悤ɂ universal binary Ƃ̂܂ō悤ɂȂĂ +̂ŁAȂ蕡Gȍ\ɂȂĂ܂B + ̕GȃVXe MCPP CXg[̂́A2A2A1A̕@ +ł͑܂BŁAMac OS X / Apple-GCC ̏ꍇAʂɂƂ肠Đ +܂B Intel-Mac Mac OS X Leopard gĂ̂ł +Ƃ܂APowerpc-Mac ł i686 powerpc tɂēǂłB +܂ATiger ł darwin9 darwin8 ɓǂݑւĂB + ȂAłƂ肠̂ GCC 4.0.1 łB̂ق GCC 3.3 Apple +ɂėpӂĂ܂AȂƂ Leopard ̂̂͐RpC +ĂȂ̂ŁAƂ肠܂B + +2A2A2A1AlCeBuRpCƃNXRpC + + ܂Anative RpCiIntel-Mac Ȃ i686 p GCCjp MCPP C +Xg[̂͊ȒPŁA2A2A1A̕@ł݂܂B + ANXRpCp MCPP CXg[̂́AȒPł +܂BMCPP configure ͈ʂɂ̓NXRpCOɑΉĂ +܂BTvvORpC run eXg‚ +܂Ă邩łB^[Qbg‹p̃oCirh‹Ŏs邱 +́Aʂ͂ł܂B܂Arh‹̃eXgĂǍʂ̓^[Q +bg‹Ƃ͈Ă邩܂B + AMac OS X ̏ꍇ͗OIɁANXRpCɑΉłꍇ +܂B܂AIntel-Mac ppc p̃oCiG~[^Ŏ +s悤ɂȂĂ܂B܂ACPU Ă OS Ƃ̃o[W +GCC ̃o[Wł΁Arh‹ł̃eXgŃ^[Qbg‹̃e +Xg̑pł܂B + Intel-Mac ł compiler-independent-build ł͂܂ACC, CXX Ƃ +ϐ C RpC C++ RpCw肵܂BMac OS X /usr/bin +ɂ͂‚ gcc g++ ܂AIntel-Mac Mac OS X Leopard + powerpc-apple-darwin9-gcc-4.0.1, powerpc-apple-darwin9-g++-4.0.1 Ƃ +̂ powerpc p C RpC C++ RpCłiۂɂ /usr/bin + gcc, g++ ׂ͂ i386, ppc õoCi킹 universal binary +łjBɁA^[QbgVXe --target IvVŎw肵܂B +̏ꍇ̓RpC̖O -gcc-4.0.1 ̕폜 powerpc- +apple-darwin9 g܂BǁAȂ܂B + + ${mcpp-dir}/configure --target=powerpc-apple-darwin9 \ + CC=powerpc-apple-darwin9-gcc-4.0.1 \ + CXX=powerpc-apple-darwin9-g++-4.0.1 + + ppc-Mac ł x86 ̃oCisłȂ̂ŁA configure +ł compiler-independent-build ̃NXRpC͂ł܂Bt@ +C mac_osx.mak g蓮RpCł΃NXRpCł +̂ŁAKvȂ mcpp-porting.html#3.1.4, #3.11 ĂB܂A +configure ł߂̕@g΁Appc-Mac native compiler +universal binary 邱Ƃ͂ł܂B + GCC-specific-build ł CC, CXX ͎g킸Â悤 --with-target-cc= +ƂIvV C RpCw肵܂i̖O gcc g++ ɕ +̂ C++ RpCƉ߂܂jB + + ${mcpp-dir}/configure --target=powerpc-apple-darwin9 \ + --with-target-cc=powerpc-apple-darwin9-gcc-4.0.1 \ + --enable-replace-cpp + + ̓^[Qbg‹̎seXg͊܂܂Ȃ̂ŁApowerpc i686 ɒu + ppcMac Ŏg͂łB + ftHg̃lCeBuRpCigcc, g++j --with-target-cc= Ŏw +肷NXRpCƂő傫o[WĂꍇ́ÃNX +RpCɂȂׂ߂o[W̃lCeBuRpC‹ϐ CC, +CXX Ŏw肵ĂBCC (CXX) Ŏw肷̂ MCPP rh邽߂ +RpCłA--with-target-cc= Ŏw肷̂ MCPP CXg[ +^[Qbg̃RpCłB + NXRpC̓lCeBuRpCƂ libexec directory, compiler- +specific include directory, O`}NقȂ܂A炪 +IvVwɂēK؂ɐݒ肳܂B̃IvV make ł +Ȃ configure Ŏw肷Kv܂B + ȂANXRpC̓zXgVXeœ삷̂Ȃ̂ŁÁuN +XRpCɁvCXg[ compiler-specific-build MCPP +lłBŁuNXRpCŁvRpCꂽ compiler- +independent-build MCPP ́A^[QbgVXeœ̂ɂȂ܂B +AGCC-specific-build ̓lCeBuRpCɃCXg[̂ +NXRpCɃCXg[̂AƂɃlCeBuRpC +RpC܂B̂߁ȂoCXg[ꍇ́ANXR +pCpɃCXg[Kv܂B + +2A2A2A2AUniversal binary make + + Universal binary ɂ́Amake 鎞 CFLAGS+='-arch i386 -arch +ppc' Ƃ悤ɁAΏۂƂ CPU -arch IvVŎw肵܂Bw +ł CPU i386, x86_64, ppc, ppc64 ̂SނłBmake CFLAGS+='-arch +i386 -arch x86_64 -arch ppc -arch ppc64' ƂƂS CPU ɑΉ +̂ł܂Bconfigure universal binary łȂꍇƓŁAʂȃI +vV͕Kv܂B + GCC ɂ -isysroot DIRi܂ --sysroot=DIRjƂIvV +Bꂪw肳ƁAVXewb_ include directory ƂăftH +g include directory DIR 𓪂ɕt̂g܂B̃IvV + Mac OS Ɍ̂ł͂܂񂪁AMac OS ł universal binary +̃RpCɂꂪgĂ܂BMac OS ̃o[WԂ͈̌݊̔ +L邽߂łBႦ΁A-isysroot /Developer/SDKs/MacOSX10.4u.sdk Ƃ +ƁA/usr/include /Developer/SDKs/MacOSX10.4u.sdk/usr/include ƂȂ +܂B̗ Mac OS X 10.5 (Leopard) 10.4 (Tiger) ƌ݊ +universal binary RpC邽߂̂̂łBMCPP make łg +߂ɂ́A -mmacosx-version-min= ƂIvV SDK Ɠo +[Ww肷Kv܂B + MCPP universal binary ́AL configure IvVƂ +make IvVgݍ킹邱ƂŁAcompiler-independent-build, GCC- +specific-build ̂ǂłAnative-compiler, cross-compiler ̂ǂ +邱Ƃł܂BႦ compiler-independent-build Tiger + i386 ppc p̂̂ɂ͂܂iۂɂ́A'*' ̒ \ +Qsɕ邱Ƃ͂łȂjB + + ${mcpp-dir}/configure + make CFLAGS+='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ + -mmacosx-version-min=10.4 -arch i386 -arch ppc' + sudo make install + +2A2A3An GCC łȂꍇ + + n GCC łȂꍇ configure ł‚̃IvVw肵Ȃ +΂Ȃ܂B܂ȀñvvZbTƒuł悤ɁA\[ +XR[huڐAvƂKvłBҎg Linux, FreeBSD, Mac +OS X, CygWIN, MinGW GCC gĂ̂ňڐAłAconfigure +ŏW邱Ƃł̂łAUNIX nVXȇ̏nɂ‚ +Ă͒mȂ̂ŁAڐA͂낪 configure ʼnǂׂΗǂ̂ +ȂłB + UNIX nVXe GCC ȊȌnł́Â悤Ȏ菇ŃRpCi +߂ĂB + +2A2A3A1AIvVw肵 configure + ܂A‚̃IvVw肵 configure Ă݂܂BႦΎ +悤ɂ܂B + + ${mcpp-dir}/configure --enable-replace-cpp --bindir=DIR \ + --with-cxx-include-dir=CXXDIR \ + --enable-SYSTEM-STD-macro=_MACRO=val + + --bindir Ŏw肷̂́ARpChCoĂяovvZ +bTufBNgłB C++ ŗL̃CN[hfBNg + --with-cxx-include-dir ŁA܂nŗL̎O`}N +--enable-SYSTEM-STD-macro ̑̃IvVŎw肵܂B + + ${mcpp-dir}/configure --help + +ƂƃIvV\܂B + make; make install āAɃRpChCo MCPP +яo悤ɍ׍H܂B̕@ɂ‚ẮAGCC ł̐ݒ@Ql +ɂĂB + +2A2A3A2AuڐAv + ñvvZbT MCPP ɒuĎg߂ɂ́A\[XR[h +uڐAvƂKvłBnŗL̎sIvV #pragma +̎łBł΂ΎgsIvV MCPP ƈقȂ +΁AŒA̎KvłB̂߂ɂ́Aconfiged.H ł̃R +pC\}N`ŁAsystem.c ɃR[h܂ +imcpp-porting.html ̂Ƃ 4.2 QƁjB + +2A2A3A3AIvVlj configure Ȃ + \[ẌڐAłA--with-compiler-name=COMPILER ƂIvV +lj configure ܂BCOMPILER configed.H Œ`̃R +pC\}NłB + make; make install łA make clean; make ƂƁAMCPP +g MCPP ̃RpCs܂Bꂪʂ΁AŒ̈ڐA͂ +Ă܂B + +2A2A4Aconfigure ̐ + + compiler-specific-build MCPP ̃RpCł̓^[QbgniMCPP +vvZbTƂĎg\̏nj̎dlڂmKv܂B +ɁARpC鏈nɂ‚Ăʂ̑ʂ̎dlmKv܂B +MCPP ̃\[X̗͂҂̏nĂĂ܂Ȃ悤ɁA҂̐ +𕪂ăwb_t@C (configed.H) Ă܂BA +configure ł̗͂҂𓯎ɒׂ邱Ƃł܂B̂߁A^[Qb +gƂ鏈nƃRpC鏈n͓łƂOŒ܂B + ̗҂̏nႤꍇ́Aconfiged.H Part 2 ҏW邱 +KvłB + MCPP configure ͓lɃNXRpCɂΉĂ܂B܂A +NXRpCł͎słȂeXg‚܂܂Ă܂BNXR +pCł͂̏ꍇ̓ftHglZbg܂A܂䂩Ȃ +܂B + +3AWindows ̏nł make + + Windows ̏n CygWIN, MinGW ȊO configure ̑ΏۂɂȂȂ +ŁA\[XC make 邱ƂKvłBłɈڐȀ݂nɂ +Ă͍t@CpӂĂ̂ŁAgăpb`Ă邱Ƃ +܂Bt@Cgꍇ̎菇ȉɐ܂B + ܂Aconfigure ̑ΏۂɂȂ鏈nłAwb_t@C makefile +ځAҏW邱Ƃł߂̂܂邱Ƃł܂B + +3A1Apb`Ă + noconfig ƂfBNgɊe폈np̍t@C makefile +pӂĂ܂BMCPP ̃\[X̓ftHgł FreeBSD / GCC 3.4 p̐ +ɂȂĂ܂Bt@C͂ʂ̏npɏĈłB +Makefile ͊enɕt make g悤ɏĂ܂B + src fBNgɓĎ̂悤ɂ܂Bȉ̍Ƃׂ͂ src fB +Ngōs܂B + + patch -c < ..\noconfig\which-compiler.dif + copy ..\noconfig\which-compiler.mak Makefile + + patch UNIX nVXẽR}hłAWindows ɂڐAĂ +ŁAg܂BAt@CāAGfB^ŏCĂ +܂܂B + +3A2AKvȂ炳 noconfig.H, Makefile C + t@Cł͊efBNg̐ݒ肪M҂̊‹ɂĂ̂ŁA +̊‹ɍ킹ďC܂B + gnt@Ĉ̂Ƃ̓o[WĂꍇ́Awb_ +t@C noconfig.H ɂɏC܂inoconfig.H ̂̂ +mcpp-porting.html 3.1 QƁjBʏg multi-byte character { +͂ȂꍇlɁAnocongig.H MBCHAR Ƃ}N̒` +B + ܂AsvOCXg[fBNg Makefile +BINDIR Ƃϐɏ܂BVisual C p Makefile ł͎̍s # +āAinstall ^[QbgLɂĂB + + #install : + +3A3Acompiler-independent-build + make make install ƁAcompiler-independent ł̎sv +OăCXg[܂iVisual C++ ł make ł͂Ȃ +nmake gjB + +3A4Acompiler-specific-build + compiler-specific ł𐶐邽߂ɂ́A܂ Makefile BINDIR +n̎svO̒uĂfBNgɏ܂BāA +noconfig.H ̎̍s 'INDEPENDENT' ̃RpC\}Nɏ +āA'make' 'make install' ܂B + + #define COMPILER INDEPENDENT + +'COMPILER' make ̃IvVŏ㏑邱Ƃł̂ŁAnoconfig.H +͕KKv͂܂BႦ΁AVisual C ł 'nmake +COMPILER=MSC' Ƃ 'nmake COMPILER=MSC install' ܂BBorland C ł +'make -DCOMPILER=BORLANDC' Ƃ 'make -DCOMPILER=BORLANDC install' +܂B + + A^[QbgnƃRpC鏈nƂĂꍇ́A +noconfig.H / Part 1 ^[Qbgn̎dlɍ킹APart 2 RpC +鏈n̎dlɍ킹܂BMakefile ̓RpC鏈np̂ +gACXg[fBNg^[QbgnpɕύX܂B + + AWindows ̏n̑̓vvZbTRpC{̂ƈ̂ +ȂĂ̂ŁAMCPP CXg[ĂvvZbTu邱Ƃ +ł܂Bn MCPP g߂ɂ́Â悤 makefile +Kv܂Bnoconfig fBNg̊e makefile ɂ́AMCPP g + MCPP RpCݒ肪Ă̂ŁAQlɂĂB + Visual C++ ł͂ makefile gāAIDE ŁuCNt@Cv +WFNgv쐬ƁAIDE ̃\[XxfobŐ@\ׂĎg +imcpp-manual.html 2.10 QƁjB + +3A5AeXg + Windows ł MinGW / GCC-specific-build CygWIN ȊOł include +directory ͐ݒ肳Ȃ̂ŁAINCLUDE Ƃ‹ϐŐݒ肵܂iKv + CPLUS_INCLUDE jB + Windows ł GCC / testsuite ͎gȂ̂ŁAtest-t, test-c, test-l f +BNgɂeXgpTv𒼐ځAvvZXĊm߂܂Btool +/cpp_test.c gƁAꕔ̃eXgłAIɎsł܂icpp- +test.html 3.2.2 QƁjB + compiler-specific-build ł́AMCPP gvvZbTƂĎgāA +MCPP "pre-preprocess" Ƃ@\g MCPP RpCĂ݂ +ƁȀnłƂ肠g悤ɂȂǂm߂邱Ƃł +܂imcpp-porting.html 3.7 QƁjB + +4AڐÂ߂̏񂹂 + + MCPP ܂ڐAĂȂnɈڐA邽߂ɂ́Ȁ񂪕Kv +B݂Ȃ̏҂Ă܂B + GCC ȊȌnɂ‚ configure ̃IvVŎw肷l킩 +̂͋ĂBconfigure.ac Ɏ荞ł䂫Ǝv܂B + +5Au؃ZbgvƂ + + MCPP ɂ́u؃ZbgvƂ̂tĂ܂B C/C++ vv +ZbTɂ‚ 265 ڂɂ킽OIȃeXgƕ]̂łB +MCPP łȂCӂ̃vvZbTɓKp邱Ƃł܂B̎g +ɂ‚ẮAcpp-test.html 3.1, 3.2 QƂĂB + +2008/11 + @ + diff --git a/libraries/mcpp/LICENSE b/libraries/mcpp/LICENSE new file mode 100644 index 000000000..5b617d281 --- /dev/null +++ b/libraries/mcpp/LICENSE @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * This software including the files in this directory is provided under + * the following license. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/libraries/mcpp/Makefile.am b/libraries/mcpp/Makefile.am new file mode 100644 index 000000000..cf5e10850 --- /dev/null +++ b/libraries/mcpp/Makefile.am @@ -0,0 +1,38 @@ +## Process this file with automake to produce Makefile.in + +AUTOMAKE_OPTIONS = foreign + +SUBDIRS = src + +if REPLACE_CPP +SUBDIRS += tests . +man_page = mcpp-gcc +else +man_page = mcpp +endif +man1_MANS = $(man_page).1 + +EXTRA_DIST = $(top_srcdir)/LICENSE $(top_srcdir)/INSTALL* \ + $(top_srcdir)/ChangeLog.old $(top_srcdir)/NEWS \ + $(top_srcdir)/mcpp.1 $(top_srcdir)/mcpp-gcc.1 $(top_srcdir)/config \ + $(top_srcdir)/src/preproc.c $(top_srcdir)/src/noconfig.H \ + $(top_srcdir)/src/cc1.c $(top_srcdir)/src/*set_mcpp.sh \ + $(top_srcdir)/src/testmain.c $(top_srcdir)/src/mcpp_lib.def \ + $(top_srcdir)/tests/*_test.sh $(top_srcdir)/noconfig \ + $(top_srcdir)/cpp-test $(top_srcdir)/test-t \ + $(top_srcdir)/test-c $(top_srcdir)/test-l $(top_srcdir)/tool \ + $(top_srcdir)/doc $(top_srcdir)/doc-jp + +if ! REPLACE_CPP +install-exec-hook: + $(top_srcdir)/config/install-sh -d "$(DESTDIR)$(prefix)/share/doc/mcpp" + cp -pf $(top_srcdir)/LICENSE $(top_srcdir)/README $(top_srcdir)/NEWS \ + $(DESTDIR)$(prefix)/share/doc/mcpp + cp -pf $(top_srcdir)/doc/mcpp-manual.html \ + $(DESTDIR)$(prefix)/share/doc/mcpp + cp -pf $(top_srcdir)/doc-jp/mcpp-manual.html \ + $(DESTDIR)$(prefix)/share/doc/mcpp/mcpp-manual-jp.html +uninstall-hook: + rm -rf $(DESTDIR)$(prefix)/share/doc/mcpp +endif + diff --git a/libraries/mcpp/Makefile.in b/libraries/mcpp/Makefile.in new file mode 100644 index 000000000..23821b4f0 --- /dev/null +++ b/libraries/mcpp/Makefile.in @@ -0,0 +1,709 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@REPLACE_CPP_TRUE@am__append_1 = tests . +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure ChangeLog \ + INSTALL NEWS config/compile config/config.guess \ + config/config.sub config/depcomp config/install-sh \ + config/ltmain.sh config/missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +depcomp = +am__depfiles_maybe = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" +NROFF = nroff +MANS = $(man1_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = src tests . +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +Target_Cpu = @Target_Cpu@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cpp_call = @cpp_call@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gcc_maj_ver = @gcc_maj_ver@ +gcc_min_ver = @gcc_min_ver@ +gcc_path = @gcc_path@ +gcc_testsuite_dir = @gcc_testsuite_dir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_system = @host_system@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +inc_dir = @inc_dir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cc = @target_cc@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +SUBDIRS = src $(am__append_1) +@REPLACE_CPP_FALSE@man_page = mcpp +@REPLACE_CPP_TRUE@man_page = mcpp-gcc +man1_MANS = $(man_page).1 +EXTRA_DIST = $(top_srcdir)/LICENSE $(top_srcdir)/INSTALL* \ + $(top_srcdir)/ChangeLog.old $(top_srcdir)/NEWS \ + $(top_srcdir)/mcpp.1 $(top_srcdir)/mcpp-gcc.1 $(top_srcdir)/config \ + $(top_srcdir)/src/preproc.c $(top_srcdir)/src/noconfig.H \ + $(top_srcdir)/src/cc1.c $(top_srcdir)/src/*set_mcpp.sh \ + $(top_srcdir)/src/testmain.c $(top_srcdir)/src/mcpp_lib.def \ + $(top_srcdir)/tests/*_test.sh $(top_srcdir)/noconfig \ + $(top_srcdir)/cpp-test $(top_srcdir)/test-t \ + $(top_srcdir)/test-c $(top_srcdir)/test-l $(top_srcdir)/tool \ + $(top_srcdir)/doc $(top_srcdir)/doc-jp + +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps'; \ + cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign --ignore-deps Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(MANS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +@REPLACE_CPP_TRUE@install-exec-hook: +@REPLACE_CPP_TRUE@uninstall-hook: +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-recursive + +install-exec-am: + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-man + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + +uninstall-man: uninstall-man1 + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-exec-am install-strip uninstall-am + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-hook uninstall-man uninstall-man1 + + +@REPLACE_CPP_FALSE@install-exec-hook: +@REPLACE_CPP_FALSE@ $(top_srcdir)/config/install-sh -d "$(DESTDIR)$(prefix)/share/doc/mcpp" +@REPLACE_CPP_FALSE@ cp -pf $(top_srcdir)/LICENSE $(top_srcdir)/README $(top_srcdir)/NEWS \ +@REPLACE_CPP_FALSE@ $(DESTDIR)$(prefix)/share/doc/mcpp +@REPLACE_CPP_FALSE@ cp -pf $(top_srcdir)/doc/mcpp-manual.html \ +@REPLACE_CPP_FALSE@ $(DESTDIR)$(prefix)/share/doc/mcpp +@REPLACE_CPP_FALSE@ cp -pf $(top_srcdir)/doc-jp/mcpp-manual.html \ +@REPLACE_CPP_FALSE@ $(DESTDIR)$(prefix)/share/doc/mcpp/mcpp-manual-jp.html +@REPLACE_CPP_FALSE@uninstall-hook: +@REPLACE_CPP_FALSE@ rm -rf $(DESTDIR)$(prefix)/share/doc/mcpp +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/mcpp/NEWS b/libraries/mcpp/NEWS new file mode 100644 index 000000000..383d42576 --- /dev/null +++ b/libraries/mcpp/NEWS @@ -0,0 +1,120 @@ +This file summarizes new major features of each MCPP release. (kmatsui) + +MCPP V.2.7.2 (2008/11) + +1. This is a bug-fixed version of V.2.7.1, fixing several bugs of the + previous release. + +2. Enabled some CPU-specific predefined macros in compiler-independent- + build as well as compiler-specific-build. + + +MCPP V.2.7.1 (2008/05) + +1. This is a bug-fixed version of V.2.7, fixing several bugs of the + previous release. + +2. Made subroutine-build also install an mcpp executable and minimal + documents as well as libmcpp for a convenience of library package. + + +MCPP V.2.7 (2008/03) + +1. Implemented -K option to enable macro notification mode. This mode + is designed for C/C++ refactoring tools and embeds macro annotations + into comments. This mode is also enabled by '#pragma MCPP debug + macro_call' sub-directive. + +2. Fixed several bugs of the previous release, including a bug of UTF-8 + multibyte character handling. + +3. Ported to Mac OS X / GCC and Visual C++ 2008. + +4. Made GCC-specific-build closer to GCC. + +5. Added documentation on source checking of firefox 3.0pre. + + +MCPP V.2.6.4 (2007/05) + +1. This is a bug-fixed version of V.2.6.3, fixing memory leaks in + subroutine-build, and fixing a bug of accessing non-allocated memory. + +2. Also changed the installation directory of some documents in stand- + alone-and-compiler-independent-build by configure or by binary + packages. + + +MCPP V.2.6.3 (2007/04) + +1. Revised subtle points of #include and '#pragma once' handling, such + as dereferencing symbolic linked directory and others. + +2. Relaxed syntax checking and token checking in lang_asm mode. + Implemented variadic macro of GCC3-specification for GCC-specific- + build. Increased compatibility of GCC-specific-build to GCC. + +3. Implemented optional memory buffer output (other than file) in + subroutine-build. + +4. Added 'mcpplib' target to make subroutine-build in configure.ac and + noconfig/*.mak. + +5. Abolished 'install-data' and 'uninstall-data' targets of configured + makefile. On the other hand, made 'install' target install also + mcpp-manual.html. + +6. Provided stand-alone-and-compiler-independent-build binary packages + port, rpm, deb, zip and their corresponding source packages on + SourceForge. + +7. Added documentation on source checking of glibc 2.4. + + +MCPP V.2.6.2 (2006/11) + +1. Fixed several bugs of the previous release. + +2. Added subroutine-build to use MCPP as a subroutine from other main + program. + +3. Changed the terms of building methods in the documents. The building + methods now have two axis: + 1. stand-alone-build vs subroutine-build + 2. compiler-independent-build vs compiler-specific-build + Refer to INSTALL #1. + Note that this change of terminology does not affect the two + building methods of stand-alone preprocessor so far: 'compiler- + independent-build' and 'compiler-specific-build'. ('compiler- + independent-build' was called 'stand-alone-build' in the previous + releases). + +4. Rewrote and converted the text files in 'doc' and 'doc-jp' + directories into html files. + + +MCPP V.2.6.1 (2006/08) + +1. Fixed several bugs of the previous release. + +2. Revised path-list handling on CygWIN. + +3. Added porting to MinGW/MSYS. + + +MCPP V.2.6 (2006/07) + +1. Integrated STANDARD mode and PRE_STANDARD mode into one executable, + differentiating the modes by the execution time options. + +2. Changed --enable-maintainer-mode option of configure to --enable- + replace-cpp option which generates compiler-specific-build of mcpp. + +3. Made compiler-independent-build really independent from any compiler- + systems. It no longer requires GCC-specific header files. + +4. Removed settings for pre-C90 compiler. + Removed settings for MS-DOS compiler, DJGPP and Plan9. + +5. Added portings to GCC V.4.0, CygWIN 1.5.18, Visual C++ 2005 and LCC- + Win32 2006-03. diff --git a/libraries/mcpp/README b/libraries/mcpp/README new file mode 100644 index 000000000..cb6851adb --- /dev/null +++ b/libraries/mcpp/README @@ -0,0 +1,53 @@ +<< What is MCPP >> + +MCPP is a C/C++ preprocessor with the following features: + + 1. Implements all of C90, C99 and C++98 features. It has the highest + conformance. + 2. Accompanies a validation suite to test the C/C++ preprocessors + comprehensively. When it is applied to the existing preprocessors, + MCPP shows outstanding result. + 3. Has a variety of accurate diagnostic messages. This allows + examination of most preprocessing problems of source, like potential + bugs or portability problems. + 4. Has various #pragma directives to output debug information. + 5. Supports the various encodings of multi-byte characters for Japan, + China, Taiwan and Korea. + 6. Highly portable. Supports many compiler systems on UNIX-like + systems and Windows. It can replace resident preprocessor of the + compiler system. It can also behave independently from any compiler + systems. Moreover, it can be built as a subroutine from any other + main program, too. + 7. Preprocessors of various behavior specifications can be generated + from the source. + 8. Is an open source software released under BSD-style-license. + 9. Full documentations in Japanese and English are attached. + +MCPP is probably the best C preprocessor in the world. + +MCPP was selected as one of the "Exploratory Software Projects" of the +Information-technology Promotion Agency (IPA), Japan, in year 2002 and +2003. With its achievements, the author was evaluated as one of the +highest rank programmers. + +The sources and documents of MCPP are found at: + + http://mcpp.sourceforge.net/ + +Please read mcpp-summary.pdf for the overview of MCPP and Validation +Suite. + +Please read INSTALL (INSTALL-jp) for how to install MCPP on your system +from the source. Refer to the above web page for installation of the +binary packages of MCPP. + +All the files except mcpp-summary.pdf are normal text files. In the +.tar.gz file, newline of the text files are [LF], and encoding of +INSTALL-jp is EUC-JP. In the .zip file, newline of the text files are +[CR][LF], and encoding of INSTALL-jp is shift-JIS. + +I would like to hear from many C programmers for reviews, comments and +the interest to participate in development. + +Kiyoshi Matsui + diff --git a/libraries/mcpp/aclocal.m4 b/libraries/mcpp/aclocal.m4 new file mode 100644 index 000000000..ac3c0cb58 --- /dev/null +++ b/libraries/mcpp/aclocal.m4 @@ -0,0 +1,6964 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# Report which library types will actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_MSG_RESULT([$SED]) +]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/libraries/mcpp/bin/mcpp-manual.html b/libraries/mcpp/bin/mcpp-manual.html new file mode 100644 index 000000000..8364037c0 --- /dev/null +++ b/libraries/mcpp/bin/mcpp-manual.html @@ -0,0 +1,4617 @@ + + + + + + + + +
+

MCPP-MANUAL

+

== How to Use MCPP ==

+
+
+

for V.2.7.2 (2008/11)
+Kiyoshi Matsui (kmatsui@t3.rim.or.jp)

+
+
+

Contents

+
+
1. Overview +
1.1. High Portability +
1.2. Standard C Mode with Highest Conformance and Other Modes +
1.3. Notations in this Manual +
+
+
2. Invocation Options and Environment Settings +
2.1. Two Kinds of Build and Five Behavioral Modes +
2.2. How to Specify Invocation Options +
2.3. Common Options +
2.4. Options by mcpp Behavioral Modes +
2.5. Common Options Except for Some Compiler Systems +
2.6. Options by Compiler System +
2.7. Environment Variables +
2.8. Multi-Byte Character Encodings +
2.9. How to Use mcpp in One-Pass Compilers +
2.10. How to Use mcpp in IDE +
2.10.1. How to Make mcpp available in Visual C++ IDE +
2.10.2. How to Make mcpp available in Mac OS X / Xcode.app
+
+
3. Enhancement and Compatibility +
3.1. #pragma MCPP put_defines, #pragma MCPP preprocess and others +
3.1.1. Pre-preprocessing of Header File
+
3.2. #pragma once +
3.2.1. Tool to Write #pragma once to Header Files
+
3.3. #pragma MCPP warning, #include_next, #warning +
3.4. #pragma MCPP push_macro, #pragma __setlocale and others +
3.5. #pragma MCPP debug, #pragma MCPP end_debug, #debug, #end_debug +
3.5.1. #pragma MCPP debug path, #debug path +
3.5.2. #pragma MCPP debug token, #debug token +
3.5.3. #pragma MCPP debug expand, #debug expand +
3.5.4. #pragma MCPP debug if, #debug if +
3.5.5. #pragma MCPP debug expression, #debug expression +
3.5.6. #pragma MCPP debug getc, #debug getc +
3.5.7. #pragma MCPP debug memory, #debug memory +
3.5.8. #pragma MCPP debug macro_call
+
3.6. #assert, #asm, #endasm +
3.7. New C99 Features (_Pragma() operator, Variadic Macro and others) +
3.8. Particular specifications for certain compiler system +
3.8.1. Variadic macro of GCC and Visual C +
3.8.2. Handling of 'defined' by GCC +
3.8.3. Asm Statement in Borland C and Other Special Syntaxes +
3.8.4. #import and Others
+
3.9. Problems of GCC and Compatibility with GCC +
3.9.1. Preprocessing FreeBSD 2/Kernel Sources +
3.9.2. Preprocessing FreeBSD 2/Libc +
3.9.3. Problems Concerning GCC 2/cpp +
3.9.4. Preprocessing Linux/glibc 2.1 +
3.9.5. To Use mcpp with GCC 2 +
3.9.5.1. To Sort mcpp's Warnings
+
3.9.6. Preprocessing GCC 3.2 Source +
3.9.7. To Use mcpp with GCC 3 or 4 +
3.9.8. Preprocessing Linux/glibc 2.4 +
3.9.9. The Problems of Linux / stddef.h, limits.h and #include_next +
3.9.10. Problems of Mac OS X / Apple-GCC and its System Headers +
3.9.11. Preprocessing firefox 3.0b3pre
+
3.10. Visual C++ System Header Problems +
3.10.1. Comment Generating Macro? +
3.10.2. '$' in Identifiers
+
+
4. Implementation-defined Behaviors +
4.1. Status Value on Exit +
4.2. Include Directory Search Path +
4.3. How to Construct Header Name +
4.4. Evaluation of #if Expression +
4.5. Character Constant Evaluation in #if Expression +
4.6. #if sizeof (type) +
4.7. How to Handle White-Space Sequence +
4.8. Default Specifications for mcpp Executables +
+
+
5. Diagnostic Messages +
5.1. Diagnostic Messages Format +
5.2. Translation Limits +
5.3. Fatal Errors +
5.3.1. mcpp's Own Bugs +
5.3.2. Physical Errors +
5.3.3. Translation Limits and Internal Buffer Errors +
5.3.4. #pragma MCPP preprocessed Related Errors
+
5.4. Errors +
5.4.1. Character and Token Related Errors +
5.4.2. Unterminated Source File Related Errors +
5.4.3. Ill-Balanced Preprocessing Group Related Errors +
5.4.4. Simple Syntax Errors on Directive Lines +
5.4.5. Syntax Errors in #if Expressions +
5.4.6. #if Expression Evaluation Errors +
5.4.7. #define Related Errors +
5.4.8. #undef Related Errors +
5.4.9. Macro Expansion Errors +
5.4.10. #error and #assert +
5.4.11. Failure of #include +
5.4.12. Other Errors
+
5.5. Warnings (Class 1) +
5.5.1. Character, Token and Comment Related Warnings +
5.5.2. Unterminated Source File Related Warnings +
5.5.3. Directive Line Related Warnings +
5.5.4. #if Expression Related Warnings +
5.5.5. Macro Expansion Related Warnings +
5.5.6. Line Number Related Warnings +
5.5.7. #pragma MCPP warning, #warning
+
5.6. Warnings (Class 2) +
5.7. Warnings (Class 4) +
5.8. Warnings (Class 8) +
5.9. Warnings (Class 16) +
5.10. Diagnostic Messages Index +
+
+
6. Reporting on Bugs and Others +
+
+ +

1. Overview

+

mcpp is a C preprocessor developed by kmatsui (Kiyoshi Matsui) based on DECUS cpp written by Martin Minow, and then rewritten entirely. mcpp means Matsui cpp. This software is supplied as source codes, and to use mcpp in any compiler systems, a small amount of modifications to adapt to the compiler system are required before it can be compiled into an executable. *1

+

This document describes the specification for mcpp executables that has been already ported to certain compiler systems. For those who want to know more about mcpp or want to port it to other compiler systems, refer to mcpp source and its document mcpp-porting.html.

+

All these sources and related documents are provided as an open-source-software.

+

Before going into detail, some of the mcpp features are introduced here.

+

Note:

+

*1 mcpp V.2.6.3 onward provides some binary packages too, at the following site.

+
+

http://mcpp.sourceforge.net/

+
+
+ +

1.1. High portability

+

mcpp is a portable preprocessor, supporting various operating systems, including Linux, FreeBSD and Windows. Its source has a wide portability, and can be compiled by any compilers which support Standard C or C++ (ANSI/ISO C or C++). The library functions used are only the classic ones.

+

To port mcpp to each compiler system, in many cases, one only needs to change some macro definitions in the header files and simply compile it. In the worst case, adding several dozen of lines into a source file would be enough.

+

To process multi-byte characters (Kanji), it supports Japanese EUC-JP, shift-JIS and ISO2022-JP, Chinese GB-2312, Taiwanese Big-5 and Korean KSC-5601 (KSX 1001), as well as UTF-8. For shift-JIS, ISO2022-JP or Big-5, mcpp can complement the compiler-proper if it does not recognize them.

+
+ +

1.2. Standard C mode with highest conformance and other modes

+

mcpp has various behavioral modes. Other than Standard-conforming mode, there are K&R 1st mode, "Reiser" cpp mode and what I call post-Standard mode. mcpp has also an execution option for C++ preprocessor.

+

Different from many existing preprocessors, Standard mode of mcpp has the highest conformance to Standards: all of C90, C99 and C++98. It has been developed aiming to become the reference model of the Standard C preprocessor. Those versions of the Standard can be specified by an execution option. *1

+

In addition, it provides several useful enhancements: '#pragma MCPP debug', which traces the process of macro expansion or #if expression evaluation, and the header file "pre-preprocessing" facility.

+

mcpp also provides several useful execution options, such as warning level or include directory specification options.

+

Even if there are any mistakes in the source, mcpp deals suitably with accurate plain diagnostic messages without running out of control or displaying misguiding error messages. It also displays warnings for portability problems. The detailed documents are also attached.

+

In spite of its high quality, mcpp's code size and memory usage is relatively small.

+

A disadvantage of mcpp, if any, is slower processing speed. It takes two or three times time of GCC 3.*, 4.* / cc1, but seeing that its processing speed is almost the same as that of Borland C 5.5/cpp32 and that it runs a little bit faster when the header file pre-preprocessing facility is used, it cannot be described as particularly slow. mcpp puts an emphasis on standard conformance, source portability and operability in a small memory space, making this level of processing speed inevitable.

+

Validation Suite for Standard C Preprocessing, which is used to test the extent to which a preprocessor conforms to Standard C, its documentation cpp-test.html, which contains results of applying Validation Suite to various preprocessors, are also released with mcpp. When looking through this file, you will notice that so-called Standard-conforming preprocessors have so many conformance-related problems.

+

During the course of developing mcpp V.2.3, it was selected as one of the "Exploratory Software Projects for 2002" by Information-technology Promotion Agency (IPA), Japan, along with its Validation Suite. From July 2002 to February 2003, the project, financed by IPA, proceeded under advice of Yutaka Niibe project manager. I asked "HighWell, Inc." Limited Company, Tokyo, for translation of all the documents. For technical details, I revised and corrected the translated documents.

+

mcpp was continuously adopted to one of the "Exploratory Software Projects" in 2003 by Hiroshi Ichiji project manager. The update of mcpp proceeded into the next version, V.2.4. *2

+

After the project, I am still going on updating mcpp and Validation Suite.

+

Note:

+

*1 ISO/IEC 9899:1990 (JIS X 3010-1993) had been used as C Standard, but in 1999, ISO/IEC 9899:1999 was adopted as a new Standard. This document calls the former C90 and latter C99. The former is generally called ANSI C or C89 because it migrated from ANSI X3.159-1989. ISO/IEC 9899:1990 + Amendment 1995 is sometimes called C95. C++ Standards are ISO/IEC 14882:1998 and its corrigendum version ISO/IEC 14882:2003. This document calls both of them C++98.

+

*2 The outline of the "Exploratory Software Project" can be seen at the following site (Japanese only).

+
+

http://www.ipa.go.jp/jinzai/esp/

+
+

mcpp from V.2.3 through V.2.5 had been located at:

+
+

http://www.m17n.org/mcpp/

+
+

In April 2006, mcpp project moved to:

+
+

http://mcpp.sourceforge.net/

+
+

The old version of mcpp, cpp V.2.2 and Validation Suite V.1.2 are located in the following Vector's web site. They are in the directory called dos/prog/c, but they are not for MS-DOS exclusively. Sources are for UNIX, WIN32, MS-DOS. The documents are Japanese only.

+
+http://www.vector.co.jp/soft/dos/prog/se081188.html
+http://www.vector.co.jp/soft/dos/prog/se081189.html
+http://www.vector.co.jp/soft/dos/prog/se081186.html
+
+

The text files in these archive files available at Vector use [CR]+[LF] as a <newline> and encode Kanji in shift-JIS for DOS/Windows. On the other hand, those from V.2.3 through V.2.5 available at SourceForge use [LF] as a <newline> and encode Kanji in EUC-JP for UNIX. From V.2.6 on two types of archive, .tar.gz file with [LF]/EUC-JP and .zip file with [CR]+[LF]/shift-JIS, are provided.

+
+ +

1.3. Notations in this Manual

+

Though this manual was text-file in the older versions, it has changed to html-file at V.2.6.2.
+This manual uses the following typographical conventions:

+
    +
  • source:
    +Navy colored constant-width font is used for code snippets and command line inputs.
    +
  • __STDC__:
    +Maroon colored constant-width font is used for Standard predefined macros or any other macros found in some codes.
    +
  • STD:
    +Italic font is used for the macros defined in mcpp source file named system.H. This manual uses these names to denote various mcpp settings. Note that these macros are only used in compilation of mcpp, and that the mcpp executable does not have such macros.
    +
+
+ +

2. Invocation Options and Environment Settings

+ +

2.1. Two Kinds of Build and Five Behavioral Modes

+

There are two types of build (or compiling configuration) for mcpp executable. *1, *2

+
    +
  1. Compiler-independent-build: the preprocessor which behaves on its own not depending on compiler system. The invocation options of compiler-independent-build are the same across the compilers with which mcpp is compiled. Although it can preprocess source files, it cannot behave as an integrated part of a compiler system.
    +
  2. Compiler-specific-build: the preprocessor to replace the resident preprocessor of certain compiler system, if possible. Each compiler-specific-build has some different specifications for compatibility with the compiler system. It has the options common with the compiler-independent-build, except a few options different from the commons to avoid conflict with the compiler system.
    +
+

Each mcpp executable has following 5 behavioral modes regardless of the building types.

+
    +
  1. STD: Standards (C90, C99, C++98) conforming mode. This is the default.
    +
  2. COMPAT: A variation of STD mode, which expands recursive macro more than the Standards' specification.
    +
  3. POSTSTD: Special "post-Standard" mode created by the author, based on the Standards and simplified removing all the Standards irregular specifications.
    +
  4. KR: K&R 1st specification mode.
    +
  5. OLDPREP: "Reiser" model cpp mode (old-preprocessor mode).
    +
+

The mode of mcpp is specified by the run-time options as follows:

+
    +
  • -@std
    +The STD mode (default).
    +
  • -@compat
    +The COMPAT mode.
    +
  • -@poststd, -@post
    +The POSTSTD mode.
    +
  • -@kr
    +The KR mode.
    +
  • -@oldprep, -@old
    +The OLDPREP mode.
    +
+

In this document, I group OLDPREP and KR into pre-Standard modes, and group STD, COMPAT and POSTSTD into Standard modes. Since COMPAT mode is almost the same with STD mode, STD includes COMPAT unless otherwise mentioned. *3

+

There are differences in the macro expansion methods between Standard and pre-Standard modes. Roughly speaking, this difference is the difference between C90 and pre-C90. The biggest difference is the expansion of the function-like macros (macros with arguments). For the arguments with macros, while in Standard mode, mcpp substitutes the parameter within the replacement list of the original macro after completely expanding the arguments, in pre-Standard, mcpp substitutes the parameter without expanding, then expands the argument at rescan time.

+

Also, in Standard mode, a macro is not expanded recursively in principle, even if the macro definition is recursive directly or indirectly. If there is a recursive macro definition in pre-Standard mode, it causes infinite recursion and becomes an error at expansion time.

+

Handling of \ at line end is also different by mode. In Standard mode, after processing the trigraph, the sequence of <backslash><newline> gets deleted before tokenization, but in pre-Standard mode, these only get deleted when they are within the string literals or in a #define line.

+

There is a subtle difference in tokenization (token parsing, decomposition to tokens). In Standard mode, it tokenizes on "token based processing" principle. To put it concretely, in Standard mode, spaces will be inserted surrounding the expanded macro to prevent the unexpected merging with its adjacent tokens. In pre-Standard mode, traditional, convenient and tacit tokenization and the macro expansion methods of "character based text replacement" are left a trace. About these, please see cpp-test.html#2.

+

In Standard mode, it handles the numeric token, called preprocessing number, according to the Standard specification. In pre-Standard, the numeric tokens are the same as integer constant tokens or floating point tokens. The suffix 'U', 'u', 'LL' and 'll' of the integer constant and the suffixes 'F', 'f', 'L' and 'l' of floating point are not recognized as a part of the tokens in pre-Standard.

+

The string literals and character constants of wide characters are recognized as single tokens only in Standard mode.

+

Digraph, #error, #pragma, and _Pragma() operator are available only in Standard mode. Also, -S <n> option (strict-ansi specs) and -+ option (the one run as C++ preprocessor) are used only in Standard mode. Pre-defined macros __STDC__, __STDC_VERSION__ are defined in Standard mode, and they don't get defined in pre-Standard.

+

#if defined, #elif cannot be used in pre-Standard mode. Macros cannot be used within argument of #include or #line in pre-Standard. Predefined macros, __FILE__, __LINE__, __DATE__, __TIME__ are not defined at pre-Standard.

+

On the other hand, #assert, #asm (#endasm), #put_defines and #debug are available in pre-Standard mode only.

+

#if expression is evaluated in long / unsigned long or long long / unsigned long long at Standard mode, and in (signed) long only at pre-Standard. sizeof (type) in #if expression can be used only in pre-Standard.

+

Trigraphs and UCN (universal character name) are available only in STD mode.

+

The output of diagnostic messages is also slightly different between the modes. Please see chapter 5 for details.

+

Any other items, which do not have any distinct rules between K&R 1st and the Standards, follow the C90 rules in pre-Standard mode.

+

The difference of OLDPREP mode from KR mode and the difference of POSTSTD and COMPAT modes from STD mode are as follows:

+
    +
  • OLDPREP
    +
      +
    1. Convert comment to 0 space instead of 1 space. Usually this conversion is done in the output at the end. In macro definition, however, the conversion is done immediately after the definition.
      +
    2. When there are string literals or character constants in the replacement list of the macro definition, and if any of the parameter names match to any part of these, that part will be substituted with the argument corresponding to the parameter when calling the macro. That is to say, when the content of the string literal or character constant is searched as token sequence, stripping the enclosing quotes, if a parameter name is found, that will be substituted.
      +
    3. You can write anything you like in the lines of #else, #endif. (One usually writes MACRO of corresponding #if MACRO or #ifdef MACRO.)
      +
    4. It stops "unterminated string literal" and "unterminated character constant" errors. If there is no closure of the literal " or ', it assumes the close at line end.
      +
    5. It treats '# 123' line as '#line 123'.
      +
    +
    +
  • COMPAT
    +Expand recursive macro more than the Standard's specification. On expanding recursive macro, set the range of non-re-replacing of the same name narrower than the Standard.
    +
    +Refer to cpp-test.html#3.4.26 about the specifications of recursive macro expansion. See test-t/recurs.t for a sample of recursive macro. *4
    +
    +
  • POSTSTD
    +This mode differs from STD mode in the following points:
    +
      +
      +
    1. Does not recognize trigraphs. Digraphs are converted at translation phase 1, that is, the beginning of preprocessing. Does not deal with digraph as a token.
      +
    2. Simplified tokenization according to complete token-base rule. When there is no white space, as a token separator between preprocessing tokens in the source code, insert a space automatically. (However, this does not get inserted between macro name and the following "(" within macro definition). Therefore, even for stringizing by # operator, it gets stringized after a space is inserted between all the preprocessing tokens. Also, at the re-definition of macros, it does not matter whether there is a token separator or not.
      +
    3. At the re-definition of function-like macros, the difference of the parameter name is not relevant.
      +
    4. Character constants cannot be used in #if expressions (it will cause an error).
      +
    5. It removed irregular "function-unlike" rules for function-like macro expansion. Hence, rescanning only targets to the replacement list of the macro, and not the sequence after that.
      +
    6. Normally, the header name with the format of #include <stdio.h> is accepted, but it gets a warning. (by class 2 warning option.) If the header name with the format of <stdio.h> is used in a macro, it can get an error at a particular instance. It recommends to use the format of #include "stdio.h".
      +
    7. The rule, a space is required between macro name and replacement list in macro definition, is added in C99, but this rule is not complied with. (A space is inserted automatically at tokenization.)
      +
    8. UCN (universal-character-name) is not recognized. Multi-byte characters in identifier are not recognized.
      +
    9. In C++, eleven identifier-like operators are not dealt as operators.
      +
    +
+

Moreover, there is a mode called lang-asm. +That is a mode to process anomalous sources which are assembler sources and nevertheless have comments, directives and macros of C embedded. +While POST_STD cannot become this mode, STD, KR and OLD get to this mode when specified by an option. +See 2.5 for its specifications.

+

For the above reasons, there are some different specifications in mcpp executables. So, please read this manual carefully. This chapter describes first the common options, next the behavioral-mode-dependent options, then the the options common to most compiler systems, finally the compiler-dependent options for each compiler-specific-build.

+

Note:

+

*1 There is another one named subroutine-build which is called as a subroutine from some other main program. The behavioral specification of subroutine-build is, however, the same with either of compiler-specific-build or compiler-independent-build according to its compile time setting. Hence, this manual does not mention subroutine-build particularly. +As for subroutine-build, refer to mcpp-porting.html#3.12.

+

*2 The binary packages provided at the SourceForge site are of compiler-independent-builds.

+

*3 mcpp had two separate executables for Standard mode and pre-Standard mode; they were integrated into one at V.2.6.

+

*4 This option is for compatibility with GCC, Visual C++ and other major implementations. 'compat' means "compatible mode".

+
+ +

2.2. How to Specify Invocation Options

+

The <arg> and [arg] shown below indicate required and optional arguments respectively. Note that the <, >, [, or ] character itself must not be entered.

+

mcpp invocation takes a form of:

+
+mcpp [-<opts> [-<opts>]] [in_file] [out_file] [-<opts> [-<opts>]]
+
+

Note that you have to replace the above "mcpp" with other name, depending on how mcpp is installed.

+

When out_file (an output path) is omitted, stdout is used unless the -o option is specified. When in_file (an input path) is omitted, stdin is used. A diagnostic message is output to stderr unless the -Q option is specified.

+

If any of these files cannot be opened, preprocessing is terminated, issuing an error message.

+

For an option with argument, white-space characters may or may not be inserted between the option character and an argument. In other words, both of "-I<arg>" and "-I <arg>" are acceptable. For options without argument, both of "-Qi" and "-Q -i" are valid.

+

For an option with an argument, missing a required argument causes an error except for the -M option,

+

If -D, -U, -I, or -W option is specified multiple times, each of them is valid. For -S, -V, or -+ option, only the first one is valid. For -2, or -3 option, its specification switches each time an option is specified. For other options, the last one is valid.

+

The option letters are case sensitive.

+

The switch character is '-', not '/', even under Windows.

+

When invalid options are specified, a usage statement is displayed. To check valid options, enter a command, such as "mcpp -?". In addition to the usage message, there are several error messages, but they are self-explanatory. I will omit their explanations.

+
+ +

2.3. Common Options

+

This section covers common options across mcpp modes or compiler systems.

+
    +
  • -C
    +Output also comments in source code. This option is useful for debugging. Note that a comment is moved ahead of a logical source line when output. This is because a comment is processed before macro expansion or directive processing, and a comment may appear during a macro invocation.
    +
    +
  • -D <macro>[=[<value>]]
    +
  • -D <macro(a,b)>[=[<value>]]
    +Define a macro named "macro". This option can be used to change the definitions of predefined macros other than __STDC__, __STDC_VERSION__, __FILE__, __LINE__, __DATE__, __TIME__ and __cplusplus. (__STDC_HOSTED__, C99's predefined macro, is exceptionally redefined by this option, because some compiler systems, like GCC V.3, use the -D option to define __STDC_HOSTED__.) To specify a value, use "=<value>". If "=<value>" is omitted, 1 is assumed. (Note that in bcc32, the macro is defined as zero-token by default.) Do not enter white-space characters immediately before "=". If a white-space character is entered immediately after "=", the macro is defined as zero token.
    +A macro with arguments can be defined by this option.
    +This option can be specified repeatedly.
    +
    +
  • -e <encoding>
    +Change a multi-byte character encoding to <encoding>. For <encoding>, refer to 2.8.
    +
    +
  • -I <directory>
    +Specify the first directory in the include directory search path order with <directory>. For a search path, refer to 4.2. If a directory name contains spaces, it has to be enclosed with " and ".
    +
    +
  • -I 1, -I 2, -I 3
    +Specify a directory from which mcpp begins searching when it encounters a #include "header" directive (i.e. not <header> format). -I1, -I2 and -I3 indicate the current directory, the source file (i.e. includer) directory, and the both respectively. For details, see 4.2.
    +
    +
  • -j
    +On outputting a diagnostic message, mcpp displays only one line of diagnostic without additional information, such as source lines. (By default, one line of diagnostic message is followed by a source code line having a problem. If the source code line in question is found in a #included file, all the #including file names and including line numbers are also displayed in sequence. For a diagnostic on macro, mcpp displays also its definition information).
    +When Validation Suite is used in the GCC testsuite, this option has to be specified to output a diagnostic message in the same format as GCC.
    +
+

The -M* options are to output source file dependency lines for makefile. When there are several source files and the -M* option is specified for each of these source files to process and merge the outputs into a file, dependency description lines are aligned. These options are similar to those of GCC, but there are several differences. *1

+
    +
  • -M
    +Output lines that describe dependency among source files. The output destination is the file specified in a command line, or stdout if omitted. If a dependency description is too long to fit in a line, it is folded over the next lines. The preprocessing result is not output.
    +
    +
  • -MM
    +Almost the same with -M, except that the following header files are not output.
    +
      +
    1. Files specified in the format of #include <stdio.h>.
      +
    2. Files specified using an absolute path name, such as #include "/usr/include/stdio.h".
      +
    3. Files specified in the format of #include "stdio.h" that are found not in the current or source directory, depending on compiler systems or the -I <n> option, but in system include directories, including those specified with the -I <directory> option or with environment variables.
      +
    +But, GCC-specific-build differs from this, it output the header files excluding only system headers, as GCC does.

    +
  • -MD [FILE]
    +Almost the same with -M, except that the preprocessing result is output to the specified file on a command line or stdout. If FILE is specified, mcpp outputs dependency description lines to that file. Otherwise, they are output to a file having the same base filename with the source file and the suffix of ".d" instead of ".c".
    +
    +
  • -MMD [FILE]
    +Almost the same with -MD, except that, like -MM, the files that are regarded as system header are not output. An output file mcpp outputs dependency description lines to is same as -MD [FILE].
    +
    +
  • -MF FILE
    +The dependency lines are output to FILE. -MF FILE takes precedence over -MD FILE or -MMD FILE.
    +
    +
  • -MP
    +"Phony targets" are also output. Each included file can be written as a phony target without a dependency as follows:
    +
    +test.o: test.c test.h
    +test.h:
    +
    +
  • -MT TARGET
    +The target name is specified as TARGET not foo.o. -MT '$(objpfx)foo.o' outputs the following line.
    +
    +$(objpfx)foo.o: foo.c
    +
    +
  • -MQ TARGET
    +Same as -MT, except that a string that has a special meaning to 'make' is 'quoted' as follows:
    +
    +$$(objpfx)foo.o: foo.c
    +
    +
  • -N
    +Disable all the predefined macros, including those that begin with "_", except for the ones required by Standards and __MCPP. The Standard predefined macros include __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__, as well as __STDC_HOSTED__ for C99 and __cplusplus for C++. If you want to disable __MCPP, use the -U option.
    +
    +
  • -o <file>
    +Output the preprocessed source to the file. If this option is omitted, the second file argument is regarded as an output path, so this option is not necessary, however, some compiler drivers use this option.
    +
    +
  • -P
    +Do not output line number information for the compiler-proper. This option is specified when you want to use mcpp for purpose other than C preprocessing.
    +
    +
  • -Q
    +Output diagnostic messages to the "mcpp.err" file in the current directory. As these messages are appended to this file, it may become bigger. Delete it from time to time.
    +
    +
  • -U <macro>
    +Undefine predefined macro named "macro". This option cannot undefine __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__ (and __STDC_HOSTED__ for C99), as well as __cplusplus invoked with -+ options.
    +
    +
  • -v
    +Output the mcpp version and a search order of include directories to stderr.
    +However, when -K option, explained at 2.4, is specified or #pragma MCPP macro_call directive, explained at 3.5.8, is specified, this option changes its meaning.
    +
    +
  • -W <level>
    +Specify a warning level with <level>. <level> should be 0 or "OR" of any one or more values of 1, 2, 4, 8 and 16. 1, 2, 4, 8 or 16 indicates a warning class. For example, if -W 5 is specified, warnings of classes 1 and 4 are output. If 0 is specified, no warnings are output. If this option is specified several times, all the specified values are "ORed" together. For example, -W 1 -W 2 -W 4 is equivalent to -W 7. Instead of -W 7 you can also write as -W "1|2|4". (Enclose with " and " so as | is not interpreted as a pipe.) If this option is omitted, -W 1 is assumed. For warning messages, refer from 5.5 through 5.9.
    +
    +
  • -z
    +The preprocessing results of the #included files are not output, but macros are defined. The #include lines themselves are output instead, though #include lines in an included file is not output. This option is used in debug of preprocessing.
    +
+

Note:

+

*1 mcpp differs from GCC in that:

+
    +
  1. mcpp does not provide the -MG option because its option specification is too complicated. (Therefore, I will omit its explanation.) The -M option can substitute for the -MG option because when include files cannot be found using the -M option, mcpp fails but outputs dependency description lines.
    +
  2. mcpp, other than GCC-specific-build, excludes a wider range of header files when using the -MM and -MMD options.
    +
+
+ +

2.4. Options by mcpp Behavioral Modes

+

mcpp has several behavioral modes. For their specifications refer to sec 2.1.

+

This manual shows a list of various mcpp behaviors by mode, which may not be readable. Please be patient. In this manual, all the uppercased names that do not begin with "__" and displayed in italics, such as DIGRAPHS_INIT, TRUE, FALSE, etc, are macros defined in system.H. These macros are only used for compiling mcpp itself and a mcpp executable generated does not predefine these macros. You must understand this point clearly.

+

The following options are available in Standard mode:

+
    +
  • -+
    +Behave as C++ preprocessor. mcpp predefines the __cplusplus macro (its value is defined in system.H and defaults to 1), interprets the text from // to the end of a logical line as a comment and recognizes "::", ".*", "->*" as a single token. It evaluates "true" and "false" tokens in a #if expression to 1 and 0, respectively. If __STDC__ and __STDC_VERSION__ are defined, they are undefined. (For GCC-specific-mcpp, __STDC__ is not undefined for compatibility with GCC.) The predefined macros that do not begin with "_" are also undefined. However, extended characters are not converted to UCN. *1, *2
    +
    +
  • -2
    +Reverse initial settings for the digraphs processing. With DIGRAPHS_INIT == FALSE, mcpp recognizes digraphs. Otherwise, it doesn't.
    +
    +
  • -h <n>
    +Define the value of __STDC_HOSTED__ macro with <n>.
    +
    +
  • -S <n>
    +Change the value of __STDC__ to <n> in C. In C++, this option is ignored. The range of <n> has to be 0-9. With <n> set to 1 or higher, the predefined macros that do not begin with "_", such as unix, linux, are disabled. S indicates __STDC__. If this option is omitted, __STDC__ is set to a default value (i.e. 1).
    +For a GCC-specific-build, -pedantic, -pedantic-errors, or -lang-c89 is equivalent to -S1, so the next -S is ignored. +This option does not disable the non-conforming predefined macros such as unix, linux, i386 for compatibility with GCC. +These macros are disabled only by -ansi or -std=iso* options.
    +
    +
  • -V <value>
    +Change the values of the predefined macros __STDC_VERSION__ for C and __cplusplus for C++ to <value>. <value> is of a long type. (In C95, C99, and C++ Standard, this value is set to 199409L, 199901L and 199711L, respectively.) With __STDC__ set to 0, __STDC_VERSION__ is always set to 0L, overriding the -V option.
    +
    +If this option is omitted for C, __STDC_VERSION__ is set to the value of STDC_VERSION in system.H. (For GCC V.2.7 - V.2.9, 199409L. For others, 0L.) If specifying -V199901L results in __STDC_VERSION__ >= 199901L, mcpp conforms to the following C99 specifications (See 3.7.):
    +
    +
      +
    1. Treats the text from // to the end of a line as a comment. *3
      +
    2. Allows the sequence of p+, P+, p-, and P-, as well as e+, E+, e-, and E-, in the preprocessing-number. This is to represent a bit pattern of a floating-point number in Hex, like 0x1.FFFFFEp+128.
      +
    3. Enables the _Pragma operator (A _Pragma( "foo bar") has the same effect as specifying a #pragma foo bar.)
      +
    4. mcpp compiled with the EXPAND_PRAGMA macro set to TRUE will macro-expand an argument on a #pragma line that does not begin with STDC or MCPP. (By default, EXPAND_PRAGMA is set to FALSE in other than Visual C-specific-build and Borland C-specific-build, so macro expansion does not occur.)
      +
    5. Allows an escape sequence of Universal-Character-Name (UCN) in identifiers, character constants, string literals and pp-numbers. (This is only enabled in STD mode.)
      +
    +Note that although C99 provides for variable argument macros, mcpp allows them in the C90 and C++ modes. *4
    +
    +In C++ also, when specifying -V199901L results in __cplusplus >= 199901L, mcpp will enter the C99 compatibility mode, providing the above 2-4 enhancements. (1 is enabled unconditionally and 5 is almost the same.) These are mcpp's own enhancements that do not conform to the C++ Standard.
    +
    +The -D option cannot be used with __STDC__, __STDC_VERSION__, and __cplusplus. This is to distinguish system-defined macros from user-defined ones.
    +
+

The following option is available for STD mode:

+
    +
  • -3
    +Reverse initial settings for the trigraphs processing. With TRIGRAPHS_INIT == FALSE, mcpp recognizes trigraphs. Otherwise, it does not.
    +
  • -K
    +Enable macro notification mode which embeds macro notifications into comments. This mode is designed to allow reconstruction of the original source position from the preprocessed output. The primary purpose of the macro notification mode is to allow C/C++ refactoring tools to refactor source code without having to implement a special-purpose C preprocessor. This mode is also handy for debugging macro expansions. The goal for macro expansion mode is to annotate every macro expansion, while still allowing the code to be compiled. *5
    +This mode is also enabled by the following pragma: +
    +#pragma MCPP debug macro_call
    +
    +The -K option has almost the same effect with this pragma at top of an input file except predefined macros are notified only by this option. +About the specs of macro notification, see 3.5.8. #pragma MCPP debug macro_call.
    +This option implies -k option. +The -v option changes its meaning in this mode, and outputs more verbose notations. +On the other hand, -a (-x assembler-with-cpp) or -C options automatically disable -K option. *6
    +
  • -k
    +Keep horizontal white spaces ('\t' and space characters) without squeezing them into one space. +Comment is converted to spaces of the same length. +This option is to keep column position of source file in preprocessed output except within macro expansion. (Column position of macros are known by -K option.) *7 +
+

Note:

+

*1 C++'s __STDC__ is not desirable and causes many problems. GCC document says that __STDC__ needs to be predefined in C++ because many header files expect __STDC__ to be defined. The header files should be blamed for this. For common parts among C90, C99 and C++, "#if __STDC__ || __cplusplus" should be used.

+

*2 Different from C99, the C++ Standard makes much of UCN. So did C 1997/11 draft. Half-hearted implementation is not permitted. However, implementing Unicode in earnest is too much burden for preprocessor.

+

*3 In C90 mcpp treats // as a comment but issues a warning.

+

*4 This is for compatibility with GCC.

+

*5 If you install GCC-specific-mcpp, cc1 (cc1plus) is set to be handed from mcpp preprocessed file with -fpreprocessed option. +Though this option means that the input is already preprocessed, +cc1 still processes comment. +Therefore, you can safely pass output of -K to cc1 with -fpreprocessed. +Furthermore, if you add -save-temps option to gcc (g++) command, preprocessed output is left as *.i (*.ii) file, and you can read it by some refactoring tool.

+

*6 Comment insertion by -K option causes column shifts in sources, and this makes *.S file of GCC, which is not C/C++ source and compiled with -x assembler-with-cpp option, unable to be assembled. +Also comments kept by -C option are sometimes confusing with that inserted by -K option. +Therefore these options cannot be used at the same time.

+

*7 This option fails to keep column position on some particularly complex cases. +When line splicing by a <backslash><newline> and line splicing by a line-crossing comment are intermingled on one output line, or a comment crosses over 256 lines, column position will be lost. +Note that each '\v' and '\f' is converted to a space with or without this option.

+
+ +

2.5. Common Options Except for Some Compiler Systems

+

The following 2 options can be used on UNIX-like systems, for either of compiler-independent-build and GCC-specific-build. +On GCC-specific-build, however, these will get an error if the GCC does not support them.

+
    +
  • -m32
    +Predefine macros for 32bit mode. +If the CPU is x86_64 or ppc64, predefined macros for 64bit mode are used by default. +With this option, however, those for i386 or ppc respectively are used.
    +
  • -m64
    +Predefine macros for 64bit mode. +If the CPU is i386 or ppc, predefined macros for 32bit mode are used by default. +With this option, however, those for x86_64 or ppc64 respectively are used.
    +
+ +

Since GCC has so many options that GCC-specific-build of mcpp has some different options from the other builds in order to avoid conflicts with GCC. Note that the options in compiler-independent-build are all the same even if compiled by GCC. The options common to the builds other than GCC-specific are as follows.

+
    +
  • -a
    +Accept the following notations used in some assembler sources without causing an error.
    +
      +
    1. +
      +#APP
      +
      +

      If the token that follows the line top # does not agree with any of C directives as above, mcpp outputs this line as it is without causing an error.

      +
    2. +
      +# + any comment.
      +
      +

      If the token that follows the line top # is not even an identifier nor pp-number, mcpp discards the line with a warning, without causing an error.

      +
    3. +
      +"A very very
      +long long
      +string literal"
      +
      +

      The above old-fashioned string literals are concatenated into "A very very\nlong long\nstring literal".

      +
    4. Even if token concatenation using a ## operator generates an invalid pp-token, it is not regarded as error.

      +
    5. mcpp does not insert spaces around a macro expansion result, and does not regard an unintended token merging of the macro expansion result with its adjacent token as an error.
      +
    +

    These sometimes happen to GNU source code, however, this option for GCC is -x assembler-with-cpp or -lang-asm.
    +This option cannot be used in POSTSTD mode.
    +This manual calls this mode lang-asm mode.
    +This mode is recommended when you use mcpp as a macro processor for some text other than C/C++, for example, as a cpp called from xrdb.

    +
  • -I-
    +Cancel default include directories and enable only ones specified with an environment variable and the -I option. Instead of -I-, GCC-specific-build uses -nostdinc. In GCC, the -I- option provides quite different functionality. See 2.6.
    +
+
+ +

2.6. Options by Compiler System

+

To use mcpp replacing the compiler system's resident preprocessor, install it in the directory where the resident preprocessor is located under an appropriate name. Before copying mcpp, be sure to change the name of resident preprocessor so that it may not be overwritten.

+

For settings on Linux, FreeBSD, or CygWIN see 3.9.5. +For settings in GCC 3.*, 4.*, see also 3.9.7, and 3.9.7.1. +For MinGW, see 3.9.7.1.

+

Possibly the compiler driver cannot pass some options to mcpp in a normal manner. However, GCC provides the -Wp almighty option to allow you to pass any options to the preprocessor. For example, if you specify as follows:

+
+gcc -Wp,-W31,-Q23
+
+

The -W31 and -Q23 options are passed to preprocessor. The options you want to pass to preprocessor have to be specified following -Wp with each option delimited by ", ". *1, *2

+

For other compiler systems, if their compiler driver source is available, it is recommended that this type of an almighty option should be added to the source. If you modify the compiler driver source code in the way that, for example, when -P<opt> is specified, only -<opt> is passed to preprocessor, it would be very convenient because any options can be passed.

+

An alternative way to use all the options of mcpp is to write a makefile in which first preprocess with mcpp, then compile the output file of mcpp as a source file. For this method, refer to sections 2.9 and 2.10.

+

The following options are available for some compiler-specific-builds. The compiler-independent-build has not these options, of course.

+ +

The following options are available for the LCC-Win32-specific-build.

+
    +
  • -g <n>
    +Define the __LCCDEBUGLEVEL macro as <n>.
    +
  • -O
    +Defines the __LCCOPTIMLEVEL macro as 1.
    +
+

The following options are available for the Visual C-specific-build.

+
    +
  • -arch:SSE, -arch:SSE2
    +Define the macro _M_IX86_FP as 1, 2 respectively.
    +
  • -Fl <file>
    +Same as -include <file> for GCC.
    +
  • -G<n>
    +If <n> is one of 3, 4, 5, 6, B, define the macro _M_IX86 as 300, 400, 500, 600, 600, respectively.
    +
  • -GR
    +Define the macro _CPPRTTI to 1.
    +
  • -GX
    +Define the macro _CPPUNWIND to 1.
    +
  • -GZ
    +Define the macro __MSVC_RUNTIME_CHECKS to 1.
    +
  • -J
    +Define the macro _CHAR_UNSIGNED to 1.
    +
  • -RTC*
    +If -RTC1, -RTCc, -RTCs, -RTCu and such option is specified, define the macro __MSVC_RUNTIME_CHECKS to 1.
    +
  • -Tc, -TC
    +Specify that the source is written in C. The result is same with or without this option.
    +
  • -Tp, -TP
    +Same as -+.
    +
  • -u
    +Same as -N.
    +
  • -Wall
    +Same as -W17 (-W1 -W16).
    +
  • -WL
    +Same as -j.
    +
  • -w
    +Same as -W0.
    +
  • -X
    +Same as -I-.
    +
  • -Za
    +Undefine the macro _MSC_EXTENSIONS and prohibit '$' in identifiers.
    +
  • -Zc:wchar_t
    +Define the macros _NATIVE_WCHAR_T_DEFINED and _WCHAR_T_DEFINED to 1.
    +
  • -Zl
    +Define the macro _VC_NODEFAULTLIB to 1.
    +
+ +

mcpp on Mac OS X accepts the following option, on both of GCC-specific-build and compiler-independent-build.

+
    +
  • -F <framework>
    +Put the <framework> directory to top of the framework directories to search. +The standard framework directories are /System/Library/Frameworks and /Library/Frameworks by default. +
+

mcpp on Mac OS X accepts the following option on GCC-specific-build.

+
    +
  • -arch <arch>
    +Change the target architecture of machine as <arch> from the default one. +This causes changes of some predefined macros. +<arch> should be i386 or x86_64 on the preprocessor for x86, ppc or ppc64 on the one for ppc. +(You can specify any of these 4 for gcc command. +gcc command invokes the preprocessor for x86 on '-arch i386' or '-arch x86_64' options, and the one for ppc on '-arch ppc' or '-arch ppc64' options.) +
+

The following options (until at the end of this 2.6 section) are available for the GCC-specific-build. Note that since __STDC__ is set to 1 for GCC, the result is same with or without the -S1 option.

+

The followings are available across the modes.

+
    +
  • -$
    +Same as -fno-dollars-in-identifiers.
    +
  • -b
    +Output line number information just like C sources.
    +The format used to pass the line number information from a preprocessor to compiler-proper is usually as follows:
    +
    +#line 123 "filename"
    +
    +Most compiler systems can use this C source format, but some systems cannot. The default specification of mcpp is such that, in compiler-specific-build for the compiler systems that cannot use the C source format, mcpp outputs the line number information in a format that the compiler-proper can accept it.
    +However, with this option specified, even in compiler-specific-build for the compiler systems that do not accept the C source format outputs the line number information in that format. This option is used with '#pragma MCPP preprocess' to pre-preprocess header files.
    +
  • -dD, -dM
    +Output valid macro definitions in the form of #define lines at the end of preprocessing.
    +With the -dD option specified, the preprocessing result is output too. Predefined macros are not output.
    +With the -dM option specified, the preprocessing result is not output, and predefined macros are output except the Standard predefined ones. *3, *4
    +
  • -fexceptions
    +Define the macro __EXCEPTIONS to 1.
    +-fno-exceptions does not define this macro.
    +
  • -finput-charset=<encoding>
    +Same as -e <encoding>. Note that GCC convert the <encoding> to UTF-8 by this option, whereas mcpp does not convert any encoding.
    +
  • -fno-dollars-in-identifiers
    +Prohibit '$' in identifiers. (Allow it by default.)
    +
  • -fPIC, -fpic, -fPIE, -fpie
    +Any of these options defines both of the macro __PIC__, __pic__ to 1. +
  • -fstack-protector
    +Define the macro __SSP__ to 1.
    +
  • -fstack-protector-all
    +Define the macro __SSP_ALL__ to 2.
    +
  • -fworking-directory
    +Emit a special line as the second line of preprocessor's output to convey the current working directory.
    +
  • -I-
    +Switch the specification of the -I <directory> before and after this option; directories specified with the -I options before -I- are used to search for header files only in the form of #include "header.h"; the directories specified with -I after -I-, if any, are used to search for all #include directives. In addition, during the former search, includer's directories are not used.
    +
  • -include <file>
    +include the <file> before processing the main source file. This is equivalent to writing #include <file> at the beginning of the main source file.
    +
  • -iquote <dir>
    +Add <dir> to the include path for #include "header.h" form.
    +
  • -isysroot=<dir>, -isysroot <dir>, --sysroot=<dir>, --sysroot <dir>
    +Use <dir> as the logical root directory for system headers, that is, prefix <dir> to the path-list of system header directory. +For example, if the default include directory is /usr/include and <dir> is /Developer/SDKs/MacOSX10.4u.sdk, then alter the include directory to /Developer/SDKs/MacOSX10.4u.sdk/usr/include.
    +
  • -isystem <dir>
    +Add <dir> to the include path immediately before system-specific directories and immediately after site-specific directories.
    +
  • -lang-c, -x c
    +Perform C preprocessing. The same as not specifying this option at all.
    +
  • -mmmx
    +Predefine a macro __MMX__ to 1.
    +-mno-mmx undefines __MMX__.
    +
  • -nostdinc
    +Same as -I- for other compiler systems.
    +
  • -undef
    +Same as -N.
    +
  • -O?
    +If ? is a non-0 digit, define a macro __OPTIMIZE__ to 1.
    +
  • -Wcomment, -Wcomments
    +Same as -W1. The result is same with or without this option.
    +
  • -Wtrigraphs
    +Same as -W16.
    +
  • -Wall
    +Same as -W17. (With -Wall, mcpp does not issue class 2 and 4 warnings because these warnings are issued frequently and annoying for Linux or some other system's standard header files. Class 8 warnings are generally surplus and bothering, but are helpful to confirm portability and etc. To use this option, be sure to specify gcc -Wp,-W31.)
    +
  • -w
    +Same as -W0.
    +
+

The following options are available for Standard mode.

+
    +
  • -ansi
    +Define macro __STRICT_ANSI__ as 1. +Disable non-conforming predefined macros such as linux, i386.
    +Do not remove comma preceding absent variable argument of GCC-spec variadic. *5
    +
  • -digraphs
    +Recognize digraphs. Digraphs specification is also reversed by -2.
    +
  • -lang-c89, -std=gnu89
    +Same as -S1. Not only C90 but also C95 specifications are used. The result is same with or without this option.
    +
  • -std=c89, -std=c90
    +Almost same as -S1, except these imply -ansi.
    +
  • -lang-c99, -lang-c9x, -std=gnu99, -std=gnu9x
    +Same as -V199901L.
    +
  • -std=c99, -std=c9x
    +Same as -V199901L and also imply -ansi.
    +
  • -lang-c++, -x c++
    +Perform C++ preprocessing. Same as -+.
    +
  • -std=c++98
    +Same as -+ and also implies -ansi.
    +
  • -pedantic, -pedantic-errors
    +Same as -W7 (i.e. -W1 -W2 -W4).
    +
  • -std=iso<n>:<ym>
    +Specify a version of C Standard. To specify C, <n> is 9899 and C++, 14882. If <n> is 9899, <ym> is any of 1990, 199409, 1999 and 199901. If <n> is 14882, <ym> is 199711. If you enter other value than these in <ym>, __STDC_VERSION__ or __cplusplus is set to that value. In this case, <ym> must be specified in six digits, like 200503.
    +These options imply -ansi. +On the other hand, -std=gnu* do not imply -ansi, also -pedantic does not imply -ansi.
    +
+

For STD mode, following options are available. (These cannot be used in POSTSTD mode.)

+
    +
  • -lang-asm, -x assembler-with-cpp
    +Same as -a for other compiler systems. +Specify lang-asm mode. +In GCC-specific-build, a macro __ASSEMBLER__ is defined to 1, and '$' in identifiers are prohibited. +When the main source file is named *.S, lang-asm mode is implicitly specified without this option.
    +
  • -trigraphs
    +Recognize trigraphs. Trigraphs specification is also reversed by -3.
    +
+

The following option is available for pre-Standard mode of GCC-specific-build.

+
    +
  • -traditional, -traditional-cpp
    +Same as -@old.
    +
+

The next option is available on CygWIN GCC-specific-build.

+
    +
  • -mno-cygwin
    +Alter the include directory from /usr/include to /usr/include/mingw, and alter the predefined macros from the ones for cygwin1.dll to the ones for msvcrt.dll.
    +
+

mcpp neither makes the following options an error nor does anything about them. (It sometime issues a warning.)

+
    +
  • -A <predicate(answer)>
    +mcpp ignores this option. In GCC, this option is equivalent to writing #assert <predicate (answer)> in the source code. Standard C, does not permit extension directives other than #pragma. Fortunately, so far, gcc, by default, passes an equivalent macro with the -D option, so there are no actual problems unless a source program uses #assert, which is a rare case.
    +
    +
  • -g <n>
    +
  • -idirafter <dir>
    +
  • -iprefix <dir>, -iwithprefix <dir>, -iwithprefixbefore <dir>
    +
  • -noprecomp
    +
  • -remap
    +
+

In GCC V.3.3 or later, preprocessor has been absorbed into compiler, and independent preprocessor does not exist. Moreover, gcc often passes to preprocessor the options not for preprocessor, even if it is invoked with -no-integrated-cpp option. GCC-specific-build of mcpp for V.3.3 or later ignores the following options, if it cannot recognize them, as that kind of false options.

+
    +
  • -c
    +
  • -E
    +
  • -f*
    +
  • -m*
    +
  • -quiet
    +
  • -W*
    +
+

Note:

+

*1 -Wa and -Wl are almighty options for assembler and linker, respectively. The documentation on UNIX/System V/cc describes these options. Probably, GCC provides the -W<x> option for compatibility.

+

*2 In GCC V.3, cpp was absorbed into cc1 (cc1plus). Therefore, the options specified with -Wp are normally passed to cc1 (cc1plus). To have cpp (cpp0), not ccl, preprocess, the -no-integrated-cpp option must be specified on gcc invocation.

+

*3 GCC V.3.3 or later predefines several dozen of macros. -dD option does not regard these macros as predefined and output them.

+

*4 The output of -dM option is similar to that of '#pragma MCPP put_defines' ('#put_defines') with the following differences:

+
    +
  1. 'put_defines' outputs also Standard predefined macros as comments.
    +
  2. 'put_defines' outputs also the file name and the line number of the macro definition as a comment, arranging to readable format. On the other hand, -d* options output in the same simple format with GCC, because some makefiles expect that format.
    +
+

*5 Refer 3.9.6.3.

+
+ +

2.7. Environment Variables

+

In compiler-independent-build of mcpp, the include directories are not set up other than /usr/include and /usr/local/include in UNIX systems. Other directories, if required, must be specified using environment variables or runtime options. The environment variable in compiler-independent-build is INCLUDE for C and CPLUS_INCLUDE for C++. Searching the file starts from the includer's source directory by default. (refer to 4.2 for the search rule.) Besides, in Linux there is a confusion of include directories, hence special setup is necessary to cope with this problem. +Refer to 3.9.9 for the problem.

+

For the default include directories on GCC-specific-build, refer to noconfig/*.dif files, and for search rule and environment variable name, refer to 4.2.

+

For the environment variable LC_ALL, LC_CTYPE, LANG, refer to 2.8.

+
+ +

2.8. Multi-Byte Character Encodings

+

mcpp can process various multi-byte character encodings as follows.

+
+ + + + + + + + +
EUC-JP Japanese extended UNIX code (UJIS)
shift-JIS Japanese MS-Kanji
GB-2312 EUC-like Chinese encoding (Simplified Chinese)
Big-Five Taiwanese encoding (Traditional Chinese)
KSC-5601 EUC-like Korean encoding (KSX 1001)
ISO-2022-JP1International standard Japanese
UTF-8 A kind of Unicode encoding
+
+

The encoding used during execution can be specified as follows (Priority is given in this order):

+
    +
  1. The encoding specified in '#pragma __setlocale( "<encoding>")' in source code. (For Visual C-specific-build, '#pragma setlocale( "<encoding>")'.) This directive allows you to specify several encodings in one source file.
    +
  2. The encoding specified with -e <encoding> or -finput-charset=<encoding> as run-time option.
    +
  3. The encoding specified with the LC_ALL, LC_CTYPE and LANG environment variables. Priority is given in this order.
    +
  4. The default encoding specified when mcpp is compiled.
    +
+

How to specify a <encoding> is basically same across #pragma __setlocale, -e option, and the environment variables; in the table below, the encoding on the left-side hand is specified by the <encoding> on right-hand side; <encoding> is not case sensitive; '-' and '_' are ignored. Moreover, if it has '.', the character sequence to the '.' is ignored. Therefore, EUC_JP, EUC-JP, EUCJP, euc-jp, eucjp and ja_JP.eucJP are regarded as same. '*' represents any character sequence of zero or more bytes. (iso8859-1, iso8859-2 are equivalent to iso8859*.).

+
+ + + + + + + + + +
EUC-JP eucjp, euc, ujis
shift-JIS sjis, shiftjis, mskanji
GB-2312 gb2312, cngb, euccn
BIG-FIVE bigfive, big5, cnbig5, euctw
KSC-5601 ksc5601, ksx1001, wansung, euckr
IS0-2022-JP1 iso2022jp, iso2022jp1, jis
UTF-8 utf8, utf
Not specifiedc, en*, latin*, iso8859*
+
+

If any of the following encodings is specified, mcpp is no longer able to recognize multi-byte characters: C, en* (english), latin* and iso8859*. When a non-ASCII ISO-8859 Latin-<n> single-byte character set is used, one of these encodings must be specified. When an empty name is used (#pragma __setlocale( "")), the encoding is restored to the default.

+

Only in the Visual C-specific-build, the following encoding name can be specified with '#pragma setlocale'. This is for compatibility with Visual C++. It is recommended you should use these names because the Visual C++ compiler cannot recognize encoding names other than these. ('-' can be omitted for mcpp, but not for the Visual C++ compiler-proper.)

+
+ + + + + + +
shift-JIS japanese, jpn
GB-2312 chinese-simplified, chs
BIG-FIVE chinese-traditional, cht
KSC-5601 korean, kor
Not specifiedC, english
+
+

In Visual C++, the default multi-byte character encoding varies, depending on what language the language parameter and "Region and Language Option" of Windows are set to. However, the #pragma setlocale specification takes precedence over these Windows's settings.

+

GCC sometimes fails to handle shift-JIS, ISO2022JP and BIG-FIVE encodings, which contain the byte of 0x5c value. +So, GCC-specific-build of mcpp complements it. *1

+

Note

+

*1 If the --enable-c-mbchar option is specified to configure GCC itself, that GCC recognizes an encoding specified by an environmental variable LANG set to one of C-EUCJP, C-SJIS or C-JIS, gcc's info says. +This way of configuring seems to be available from 1998 onward, but it has been seldom used, and its implementation does not work. +Although GCC-specific-build of mcpp had supported these environmental variables, such as LANG=C-SJIS, it removed that feature since V.2.7.
+Also GCC info says that, besides LANG, environmental variables LC_ALL and LC_CTYPE can be used to specify an encoding. However, the difference between using LC_ALL or LC_CTYPE or not lies only in their diagnostic messages, in actual.

+
+ +

2.9. How to Use mcpp in One-Pass Compilers

+

Compilers whose preprocessor is integrated into themselves are called one-pass compilers. These includes Visual C, Borland C, and LCC-Win32. Such compilers are becoming more popular because they can achieve a little higher processing speed. However, the time for preprocessing becomes shorter due to better hardware performance. In the first place, there is much point for preprocessing to be a common phase, mostly independent of run-time environment and compiler systems. It is not desirable that one-pass compilers become more popular. There will be more compiler-system-specific specifications.

+

Anyhow, it is impossible to replace the preprocessor of a one-pass compiler with mcpp. To use mcpp, a source program is preprocessed with mcpp and then the output is passed to a one-pass compiler. As you see, preprocessing takes place twice. It is useless but inevitable. Using of mcpp still has merits of source checking and can avail functions not available in resident preprocessor.

+

To use mcpp with a one-pass compiler, the procedure must be written in makefile. For sample procedures, refer to the makefile re-compilation settings used to compile mcpp itself, such as visualc.mak, borlandc.mak, and lcc_w32.mak.

+

Although GCC 3 or 4 compiler now integrates its preprocessing facility into itself, gcc provides an option to use an external preprocessor. Use this option when mcpp is used. (See 3.9.7.)

+
+ +

2.10. How to Use mcpp in IDE

+

It is difficult to use mcpp in Integrated Development Environment (IDE) because IDE's GUI follows compiler-system-specific specifications and internal interfaces are not usually made available to third parties. Furthermore, one-pass compilers make it more difficult to insert a phase to use mcpp.

+

This subsection describes how to make mcpp available in Windows / Visual C++ 2003, 2005, 2008 IDE. Use the compiler-specific-build for Borland C and LCC-Win32 on command lines.

+

Also, it is described here how to make mcpp available in Mac OS X / Xcode.app / Apple-GCC.

+ +

2.10.1. How to Make mcpp Available in Visual C++ IDE

+

mcpp cannot be used in a normal "project" since the internal specifications of Visual C++'s IDE are not made available to third parties and the compiler is a one-pass compiler. However, once a makefile that uses mcpp is created, Visual C++'s IDE can recognize the makefile and you can create a "makefile project" using that file. This allows you to utilize most of the IDE functions, including source editing, search, and source level debugging.

+

"Creating a Makefile Project" of a Visual C++ 2003 document, Visual C++ 2005 Express Edition Help and Visual C++ 2008 Express Edition Help describe how to make a makefile project. Perform the following procedure to create a makefile project.

+
    +
  1. Login as a user with debugging privilege. *1
    +
  2. Write a makefile that specifies mcpp. (Refer to noconfig/visualc.mak.) *2
    +
  3. Start Visual Studio. *3
    +
  4. Click "New Project" to display the "New Project" window. Select "Makefile Project" and specify "Name" and "Location", and then click "OK".
    +
  5. Then the "Makefile Application Wizard" windows appears. Click "Application settings", and enter appropriate values in the "Build command line", "Output", "Clean commands", and "Rebuild command line" fields.
    +Let me explain the appropriate values for these fields by taking an example of making the compiler-independent-build of mcpp itself. (Assuming the name of mcpp executable as mcpp.exe.)
    +
    +"Build command line":   nmake
    +"Output":               mcpp.exe
    +"Clean command":        nmake clean
    +"Rebuild command line": nmake PREPROCESSED=1
    +
    +To make the Visual C-specific-build of mcpp, add an option COMPILER=MSC as: +
    +"Build command line":   nmake COMPILER=MSC
    +"Output":               mcpp.exe
    +"Clean command":        nmake clean
    +"Rebuild command line": nmake COMPILER=MSC PREPROCESSED=1
    +
    +Since a Makefile project does not provide a 'make install' equivalent command, you must write the makefile in such a way that the commands you specify in "Build command line" and "Rebuild command line" also perform installation. *4
    +If you do not compile mcpp, "Build command line" and "Rebuild command line" can be the same.
    +When completed, click "Finish".
    +
  6. Then the Makefile project appears in "Solution Explorer". Click the "Source Files" folder, choose "Add Existing Solution Item" from the "Project" menu, select all the source files, and then click "OK". Then the source file names appear in Solution Explorer.
    +
+

You can now use every functions, including Edit, Build, Rebuild and Debugging.

+

Note:

+

*1 On VC 2003 and 2005, to use the debugging function under Windows XP pro or Windows 2000, a user must belong to a group called "Debugger users". However, Windows XP HE does not provide such a group, so one has to login as an administrator. On VC 2008, such a limitation on users group was lifted.

+

*2 In order to perform the source level debugging function, makefile must be written in such a way that cl.exe is called with the -Zi option appended to generate debugging information.

+

*3 If you start Visual Studio by selecting "Start" -> "Programs", environment variables, such as for include directories, are not set. In order to have these variables set, you should open the 'Visual Studio command prompt' to start Visual Studio by typing on VC 2003:

+
+devenv <Project File> /useenv
+
+

On VC 2005 express edition and VC 2008 express edition:

+
+vcexpress <Project File> /useenv
+
+

*4 You must have a writing permission to the directory into which you install mcpp. +If you try to install into 'bin' or 'lib' directories of the compiler system, the permission should be carefully set by an administrator account. +It is recommended to make the user account belong to "Power users" or "Authenticated users" group and set "write" and "modify" permissions to the directory for the group. +Another way of controlling the permission is to install the compiler system into a directory which the user has wrinting permission on, such as a shared directory.

+ +

2.10.2. How to Make mcpp available in Mac OS X / Xcode.app

+

You can use Xcode.app, which is an IDE on Mac OS X, with mcpp without problems. *1

+

Xcode.app uses gcc (g++) in /Developer/usr/bin rather than /usr/bin for some reason. +(/Developer is the default install directory for Xcode.) +To use mcpp in Xcode.app, you must install GCC-specific-build for the gcc (g++) in that directory. +You should do as follows to install it. +(${mcpp_dir} means the directory where the source of mcpp is placed.)

+
+export PATH=/Developer/usr/bin:$PATH
+configure ${mcpp_dir}/configure --enable-replace-cpp
+make
+sudo make install
+
+

The installation method is the same with that for gcc in /usr/bin, except PATH setting. +So, please refer to INSTALL for installation to cross-compiler or installation of universal binary.

+

After installing mcpp in such a way, you can use Xcode.app without any special setting for mcpp. +Also the Apple-GCC-specific *.hmap files, which are "header map" files generated by Xcode.app, are read and processed by mcpp. +However, mcpp does not process precompiled-header. +It processes '#include "header.pch"' as an ordinary #include. +Also, mcpp does not preprocess Objective-C and Objective-C++, so *.m and *.mm source files are directly handed on to cc1obj and cc1objplus, bypassing mcpp.

+

When you use mcpp-specific options, specify them as follows:
+From screen top menu bar of Xcode.app, select "Project" > "Edit Project Settings". +The "project editor" window will appear. +Then, select "Build" pane of it, and edit "Other C flags" item. +The options should be specified following '-Wp,' and separated by commas, for example:

+
+-Wp,-23,-W3
+
+

Note:

+

*1 Here we refer to Mac OS X Leopard / Xcode 3.0.

+
+ +

3. Enhancements and Compatibility

+

mcpp has its own enhancements. Each compiler-system-resident preprocessor has its own enhancements, some of which are not available in mcpp. This section covers these enhancements and their compatibility problems.

+

Principally, mcpp outputs #pragma lines as they are. This principle is applied to the #pragma lines processed by mcpp itself. This is because the compiler-proper may interpret the same #pragma for itself.

+

However, mcpp does not outputs the lines beginning with '#pragma MCPP', since these are for mcpp only. Also, mcpp does not outputs lines of '#pragma GCC' followed by either 'poison', 'dependency' or 'system_header'. Moreover, mcpp outputs neither of '#pragma once', '#pragma push_macro', nor '#pragma pop_macro' because they are useless on the later phases. +On the other hand, '#pragma GCC visibility *' is outputted, because it is for the compiler and the linker. *1

+

mcpp compiled with EXPAND_PRAGMA == TRUE expands macros in #pragma line (in actual, EXPAND_PRAGMA is set TRUE only for Visual C-specific-build and Borland C-specific-build). However, #pragma lines followed by STDC, MCPP or GCC are never expanded.

+

#pragma sub-directives are implementation-defined, hence there are risks of same name sub-directive having different meanings to different compiler-systems. Some device is necessary to avoid name collision. Moreover, when EXPAND_PRAGMA == TRUE, there should be a device to avoid the name of #pragma sub-directive itself being macro expanded. This is why mcpp-specific sub-directives begin with '#pragma MCPP' and are not subject to macro expansion. This device is adopted from '#pragma STDC' of C99 and '#pragma GCC' of GCC 3.

+

'#pragma once' is, however, implemented as it is, since this pragma has been implemented in many preprocessors and has now no risk of name collision. '#pragma __setlocale' is prefixed with "__" instead of MCPP, because it has also meaning for compiler-proper, and because the prefix avoids user-name-space.

+

Note:

+

*1 The GCC-specific-build of mcpp only supports '#pragma GCC system_header' of the pragmas starting with GCC. It does not support '#pragma GCC poison' and '#pragma GCC dependency'.

+
+ +

3.1. #pragma MCPP put_defines, #pragma MCPP preprocess and others

+

mcpp in Standard mode uses '#pragma MCPP put_defines', '#pragma MCPP preprocess' and '#pragma MCPP preprocessed'. Pre-Standard mode uses #put_defines, #preprocess and #preprocessed. Let me explain by taking an example of #pragma.

+

When mcpp encounters '#pragma MCPP put_defines' directive, it outputs all the macros defined at that time in the form of #define lines. Of course, the #undef-ed macros are not output. The macros that cannot be #defined or #undef-ed, such __STDC__ and etc, are output in the form of #define lines, but are enclosed with comment marks. (Since __FILE__ and __LINE__ are special macros defined dynamically on a macro invocation, the replacement list output here means nothing.)

+

In pre-Standard mode and POSTSTD mode mcpp do not memorize parameter names of function-like macro definitions. So, these directives mechanically represent names of the first, second, third parameters as a, b, c, ... and so on. If it reaches the 27th parameter, it begins with a1, b1, c1, ..., a2, b2, c2, ... and so on.

+

If you enter the following directive after invoking mcpp from keyboard without specifying input and output files, all the predefined macros are listed.

+
+#pragma MCPP put_defines
+
+

It also outputs a comment to indicate the source file name where each macro definition is found, as well as its line number. If you invoke mcpp with options such as -S1 or -N, you will see a different set of predefined macros.

+

When mcpp encounters '#pragma MCPP preprocess' directive, it outputs the following line:

+
+#pragma MCPP preprocessed
+
+

This indicates that the source file has been already preprocessed by mcpp.

+

When mcpp encounters a '#pragma MCPP preprocessed' directive, it determines that the source file has been preprocessed by mcpp and continues to output the code it reads as it is, until it encounters a #define line. When mcpp does encounter a #define directive, mcpp determines that the rest of the source file are all #define lines and defines macros. At this time, mcpp would memorize the source filename and line number in the comment. *1, *2

+

A '#pragma MCPP preprocessed' is applied only to the lines that follow the directive in the source file where the '#pragma MCPP preprocessed' directive is found. If the source file is an #included one, when control is returned to the #including file, '#pragma MCPP preprocessed' is no longer applied.

+

Note:

+

*1 Actual processing is a little more complex. When mcpp encounters a '#pragma MCPP preprocessed', mcpp outputs lines it has read just as they are, except for #line lines, which compiler-specific-build of mcpp converts and outputs into a format that the compiler-proper can accept. mcpp disregards predefined standard macro because its #define line is enclosed with comment marks.

+

*2 Therefore, information on where a macro definition is found is not lost during pre-preprocessing.

+ +

3.1.1. Pre-preprocessing of Header File

+

With above directives, you can "pre-preprocess" header files. Pre-preprocessing considerably saves the entire preprocessing time. I think the explanation so far has already given you an understanding of how to pre-preprocess header files, but to deepen your understanding, let me explain it by taking an example of mcpp's own source code.

+

mcpp source consists of eight *.c files, of which seven files include "system.H" and "internal.H". No other headers are included. The source looks like this:

+
+#if PREPROCESSED
+#include  "mcpp.H"
+#else
+#include  "system.H"
+#include  "internal.H"
+#endif
+
+

The system.H includes noconfig.H or configed.H, as well as several standard header files. mcpp.H is not a source file I provide and is a "pre-preprocessed" header file I am going to generate.

+

To generate mcpp.H (of course, after setting up noconfig.H and other headers), invoke mcpp as follows:

+
+mcpp > mcpp.H
+
+

For compiler systems, such as GCC, also specify the -b option.

+

Enter the following directives from the keyboard:

+
+#pragma MCPP preprocess
+#include "system.H"
+#include "internal.H"
+#pragma MCPP put_defines
+
+

Enter "end-of-file" to terminate mcpp.

+

This has accomplished mcpp.H, which consists of the preprocessed system.H and internal.H and a set of #define lines following them. Including mcpp.H gives the same effect as including system.H and internal.H, but its size is one-nth of the original header files including the standard ones. This is because #if and comments are eliminated. It takes far less time to include mcpp.H in seven *.c files than to include system.H and internal.H seven times. By using '#pragma MCPP preprocess', much more time can be saved.

+

On compilation, use the -DPREPROCESSED=1 option.

+

It is recommended that the above procedure should be written in a file and the makefile should refer to it. The makefile and preproc.c appended to mcpp sources contain the procedure. Please refer to it.

+

Although the usage of independent preprocessor is limited for one-pass compilers like Visual C, Borland C or LCC-Win32, the pre-preprocessing facility is useful even for those.

+

The pre-preprocessing facility of header files is similar to that of the -dD option of GCC, but it differs from it in that:

+
    +
  1. GCC outputs line number information not in the form of '#line 123 "filename"', but in the form of '# 123 "filename"', which allows GCC to reprocess the information, but the Standard C preprocessor cannot.
    +
  2. GCC/cpp of older version outputs a #define line whenever it encounters it, but does not output a #undef line. Therefore, reprocessing the preprocessed result may produce a different result from what the original source intends.
    +
  3. By using '#pragma MCPP preprocess', which is not provided by GCC, mcpp can provides a higher processing speed.
    +
+

As far as the pre-preprocessing facility is concerned, mcpp is more accurate and practical than GCC.

+
+ +

3.2. #pragma once

+

#pragma once directive is available in Standard mode.

+

#pragma once is also available for GCC, Visual C, LCC-Win32 and compiler-independent preprocessor called Wave.

+

This directive is used when you want to include a header file only once. With the following directive in a header file, mcpp includes the header file only once even if a #include line for that file appears many times.

+
+#pragma once
+
+

Usually, compiler-system-specific standard header files prevent duplicate definitions by using the following code:

+
+#ifndef __STDIO_H
+#define __STDIO_H
+/* Contents of stdio.h */
+#endif
+
+

#pragma once provides similar functionality to this. Using macros always involves reading a header file. (The preprocessor cannot skip reading the code as people do and must read the entire header file for #if's or #endif's; It must read a comment before it can determine whether a line is a directive line, that is, a line with # at the beginning followed by a preprocessing directive; To do so, the preprocessor must identify a string literal; After all, it must read through the entire header file and perform most of tokenization.) #pragma once eliminates the need of even accessing to a header file, resulting in a improved processing speed for multiple includes.

+

To determine whether two header files are identical, file name characters, including directory names in a search path, are compared. Windows is not case sensitive. Therefore, "/DIR1/header.h" and "/DIR2/header.h" are regarded as distinct, but "header.h" and "HEADER.H" are regarded as the same on Windows, but distinct on UNIX-like systems. A directory is memorized after converting to absolute path, and a symbolic link in UNIX systems is memorized after dereferencing. Moreover, path-list is normalized by removing redundant part such as "foo/../". So, the identical files are determined always correctly. *1, *2, *3

+

I borrowed the idea of #pragma once from GCC V.1.*/cpp. GCC V.2.*, and V.3.* still has this functionality but it is regarded as obsolete. The specification of GCC V.2.*/cpp has been changed as follows: If the entire header file is enclosed with #ifndef _MACRO, #define _MACRO, and #endif, the cpp memorizes it and inclusion occurs only once, even without #pragma once.

+

However, this GCC V.2 and V.3 specification sometimes does not work for commercially available compiler systems that are not based on the GCC specification, due to a difference in the standard header file notation. In addition, the GCC V.2 and V.3 specification is more complex to implement. For this reason, I decided to implement only #pragma once.

+

As with other preprocessors, it is not advisable to rely only on #pragma once when the same header files are used. It is recommended that #pragma once should be combined with macros as follows:

+
+#ifndef __STDIO_H
+#define __STDIO_H
+#pragma once
+/* Contents of stdio.h */
+#endif
+
+

Note that #pragma once must not be written in <assert.h>. For the reason, see cpp-test.html#5.1.2. The same thing can be said with <cassert> and <cassert.h> of C++.

+

Another problem is that the recent GCC/GLIBC system has header files, like <stddef.h>, which are repeatedly #included by other system headers. They define macros, such as __need_NULL, __need_size_t, and __need_ptrdiff_t, and then #include <stddef.h>. Each time they do so, definitions such as NULL, size_t, and ptrdiff_t are defined in the <stddef.h>. The same thing can be said with <errno.h> and <signal.h>, and even with <stdio.h>. Other system headers define macros, such as __need_FILE, __need___FILE, and then #include <stdio.h>. Each time they do so, definitions such as FILE may be defined in <stdio.h>. #pragma once can not be used in such header files. *4

+

Note:

+

*1 The normalized result can be seen by '#pragma MCPP debug path'. See 3.5.1. +'#pragma MCPP put_defines' and diagnostics use the same result, too.
+However, the path-list is not normalized usually in #line line. +By default, the #line line is output as specified by #include line, prepending the normalized include path, if any. +But, if -K option is specified, it is normalized so as to be easily utilized by some other tools.

+

*2 On CygWIN, /bin and /usr/bin are the same directory in real, also /lib and /usr/lib are the same, and supposing / is C:/dir/cygwin on Windows, /cygdrive/c/dir/cygwin is the same as /. mcpp treats these directories as the same, converting the path-list to the format of /cygdrive/c/dir/cygwin/dir-list/file.

+

*3 On MinGW, / and /usr are the same directory in real. Supposing / is C:/dir/msys/1.0, /c/dir/msys/1.0 is the same as /, and supposing /mingw is C:/dir/mingw, /c/dir/mingw is the same with /mingw. mcpp treats each of these as the same directories, converting the path-list to the format of c:/dir/msys/1.0/dir-list/file or c:/dir/mingw/dir-list/file.

+

*4 This is applied at least to Linux/GCC 2.9x, 3.* and 4.*/glibc 2.1, 2.2 and 2.3. FreeBSD 4, 5, 6 has much simpler system headers because it does not use glibc.

+ +

3.2.1. Tool to Write #pragma once to Header Files

+

With a small number of header files, writing #pragma once to them does not require much effort, but it would be tremendous work if there are many header files. I wrote a simple tool to write it automatically to header files.

+

tool/ins_once.c is a tool written for old versions of GCC. As Borland 5.5 conform to the same standard header file notation with GCC, this tool can be used. However, it is advisable that this tool should not be used in the systems like Glibc 2 that has many exceptions shown above.

+

Even in the compiler systems that can use the tool, some header files do not strictly conform to the GCC notation. GCC's read-once functionality also does not work properly for these header files.

+

Compile ins_once.c and perform the following command in a directory, such as /usr/include or /usr/local/include, under UNIX.

+
+chmod -R u+w *
+
+

and then execute ins_once as follows:

+
+ins_once -t *.h */*.h */*/*.h
+
+

Ins_once reports header files that do not begin with #ifndef or #if !defined. Manually modify these files. Then, execute ins_once as follows:

+
+ins_once *.h */*.h */*/*.h
+
+

If the first directive in each header file is #ifndef or #if !defined, a #pragma once line is inserted immediate below the line. Only a root user or a user with an appropriate permission is eligible for this modification. When you modified access permission, use 'chmod -R u-w *' to restore to original permission.

+

Ins_once provides the following options. Select the most appropriate one for your system.

+
    +
  • -t: Check whether a header file begins with #ifndef or #if !defined, excluding a comment. This option does not modify the file.
    +
  • -p: Insert a #pragma once line at the beginning of file. By default, this line is inserted immediate below the #ifndef or #if !defined line.
    +
  • -g: For GCC system, <stddef.h>, <stdio.h>, <signal.h>, <errno.h> are also excluded. By default, only <assert.h>, <cassert> and <cassert.h> are excluded.
    +
+

ins_once roughly checks to write a #pragma once line only once in the same header file even if it is executed several times, but the check is not very strict. As this ins_once is of temporary and tentative nature, it scarcely performs tokenization. It worked as I expected with FreeBSD 2.0 and 2.2.7, Borland C 5.5, but it may not work properly for special header files. So before executing this tool, be sure to make a backup of an original file.

+

Have the shell expand a wild-card. (In case of buffer overflow, execute ins_once several times by specifying some of your system header files.)

+
+ +

3.3. #pragma MCPP warning, #include_next, #warning

+

These directives are provided for compatibility with GCC. GCC provides the #include_next and #warning directives. Although these directives are non-conforming, not only some source programs sometimes use them but also some Glibc2 system header files do. Taking this situation into consideration, I implemented the #include_next and #warning directives in GCC-specific-build to allow compilation of such source programs, however, mcpp issues a warning when it finds the directives. Regardless of the compiler systems mcpp is ported to, mcpp in Standard mode also implements #pragma MCPP warning.

+

With the following directive, mcpp skips the current file's directory and start searching header.h from the next directory of search path.

+
+#include_next  <header.h>
+
+

CygWIN and MinGW ignores the distinctions of alphabetical case of header names.

+

The following code outputs 'any message' to stderr as a warning message:

+
+#pragma MCPP warning    any message
+
+#warning  any message
+
+

Different from #error, this is not counted as an error.

+
+ +

3.4. #pragma MCPP push_macro, #pragma __setlocale and others

+

When I ported mcpp to Visual C, I implemented these directives in mcpp, and then made them available for other systems.

+

'#pragma MCPP push_macro( "MACRO")' and '#pragma MCPP pop_macro( "MACRO")' are used to "push" or "pop" a macro definition (MACRO) to the current macro definition stack.

+

'#pragma push_macro( "MACRO")' and '#pragma pop_macro( "MACRO")' are also available for Visual C.

+

push_macro saves a macro definition to the stack, and pop_macro retrieves the macro definition. The pushed macro definition remains valid after push_macro. To invalidate it, use #undef or redefine the macro with a new definition. push_macro can be used multiple times for a same name macro.

+

'#pragma __setlocale( "<encoding>")' changes the current multi-byte character encoding to <encoding>. The argument of setlocale must be a string literal. For <encoding>, refer to 2.8. This directive allows you to use several encodings in one translation unit.

+

In Visual C++, '#pragma __setlocale' cannot be used. Use '#pragma setlocale' instead. Encoding specification must be conveyed not only to mcpp but also to the compiler-proper. The latter can recognize only #pragma setlocale. For other compiler systems, when the compiler-proper cannot recognize an encoding, mcpp complements it.

+

There is not yet any compiler-proper which can recognize '#pragma __setlocale'.

+
+ +

3.5. #pragma MCPP debug, #pragma MCPP end_debug, #debug, #end_debug

+

'#pragma MCPP debug' and '#pragma MCPP end_debug' are for Standard mode. #debug and #end_debug are for pre-Standard mode.

+

The '#pragma MCPP debug <args>' directive can be written anywhere in a source program. <args> specifies a debug information type. One #pragma MCPP debug directive can take several <arg>. One or more <arg> must be specified for each directive. mcpp begins to output debug information when it finds this directive, and stops it when it encounters '#pragma MCPP end_debug <args>'. The <args> can be omitted, in which case all types of debug information is reset. If <args> contains an argument that is not supported by mcpp, mcpp issues a warning, but all the preceding arguments are regarded as valid.

+

All the debug information is output to the same path with the preprocessing output to synchronize with it. Therefore, this directive usually prevents compilation. +Nevertheless, #pragma MCPP debug macro_call outputs informations embedding into comments, and can be re-preprocessed and compiled.

+

When you noticed something was wrong with the preprocessing result, enclose the coding you want to debug with the following directives, for example:

+
+#pragma MCPP debug token expand
+/* Coding you want to debug  */
+#pragma MCPP end_debug
+
+

As this directive was originally used for debugging mcpp itself, it was not developed with end users in mind. So, you may not understand its behavior unless you read its source code, and you may sometimes feel it outputs too much information, but it is useful for tracing the preprocessing process. Be patient.

+

The following debug information types can be specified with <arg>.

+
+ + + + + + + + + +
path Displays the include file search path.
token Parses tokens one by one and displays its type.
expand Traces a macro expansion process.
macro_callEmbed macro notifications into comments on each macro definition and macro expansion.
if Displays the result (true or false) of #if, #elif, #ifdef and #ifndef.
expressionTraces #if expression evaluation.
getc Traces preprocess 1-byte by 1-byte.
memory Displays the status of heap memory used by mcpp.
+
+ +

3.5.1. #pragma MCPP debug path, #debug path

+

With these directives, mcpp displays include directories in the search path (excluding the current and source directories with which search begins) in the order of priority, starting with the highest one first.

+

In addition, with a #include directive, mcpp displays all the directories, including the current one, it actually searched for the #include file.
+When a header file with #pragma once specified is #included again, the message to that effect is displayed.
+Moreover, mcpp normalizes the path-list removing the redundant part such as "foo/../", and displays the result when the normalized path-list differs from the original one.
+Also mcpp dereferences the symbolic link to its linked-file, and displays the result when conversion is occurred.

+ +

3.5.2. #pragma MCPP debug token, #debug token

+

With these directives, mcpp displays a source line it has read, and then displays a token and its type on the source line each time it has read. This token, more specifically, is a preprocessing-token (pp-token). Not only pp-tokens on a source line but also ones mcpp reads again internally during macro expansion are displayed repeatedly.

+

However, the following 1-byte tokens are not displayed for mcpp program's convenience sake:

+
    +
  1. 1. '#' at the beginning of a preprocessing directive line.
    +
  2. 2. '(' at the beginning of a parameter list of a function-like macro definition.
    +
  3. 3. ',' delimiting between function-like macro definition parameters.
    +
  4. 4. '(' at the beginning of an argument list used for a function-like macro invocation.
    +
+

A pp-token has the following types:

+
+ + + + + + + + + + +
NAM Identifier
NUM Preprocessing-number
OPE Operator or punctuator
STR String literal
WSTRWide string literal
CHR Character constant
WCHRWide character constant
SPE Special pp-tokens, such as $ and @
SEP Token separator white space
+
+

Of SEP, other than <newline> are not normally displayed. Control codes such as <newline> are displayed as <^J> or <^M>.

+ +

3.5.3. #pragma MCPP debug expand, #debug expand

+

With these directives, mcpp traces the expansion process of a macro invocation. When mcpp in Standard mode encounters a #pragma MCPP debug, it behaves as follows:

+

If there is a macro invocation, mcpp displays the macro definition. Each argument is read, the argument is substituted for the corresponding parameter in the replacement list and the replacement list is rescanned. mcpp displays this whole process. In case of nested macro definitions, they are rescanned and expanded one by one. If an argument has a macro, mcpp traces the above process recursively before parameter substitution.

+

Each time control is passed to and returned from a certain set of mcpp internal functions, mcpp displays the trace information along with the function name. The following table shows the role of these functions. Reading mcpp source code will gives you a concrete idea on what each function is doing.

+
+ + + + + + + +
expand_macroEntrance routine for macro expansion
replace Expands a macro one level down.
collect_argsCollects arguments.
prescan Scans a replacement list and processes # and ## operator.
substitute Substitutes parameters with arguments.
rescan Rescans a replacement list.
+
+

Except for expand_macro, above functions are indirectly recursive with each other.

+

For replace and collect_args, mcpp displays data it internally stacks during macro expansion. This data is displayed using the following internal codes:

+
+ + + + + + +
<n> Nth parameter
<TSEP> Token delimiter inserted by mcpp
<MAGIC> Code that inhibits re-replacement of the macro of the same name
<RT_END>Code that indicates the end of a replacement list
<SRC> Code that indicates an identifier taken from source file while rescanning
+
+

<SRC> is used only in STD mode, and is not used in POSTSTD mode nor in COMPAT mode.

+

It is recommended that '#pragma MCPP debug token' should be also used.

+

If you specify also '#pragma MCPP debug macro_call' or -K option, macro notifications are output embedded in comments. +However, in replace() and its subordinate routines some magic characters (internal codes) are written or removed in the input stream instead of comment. +These magic characters are displayed as:

+
+ + + + + +
<MACm> Call of the m'th macro contained in one macro call
<MAC_END> The end of the macro call started by previous MACm
<MACm:ARGn>The n'th argument of the m'th macro call
<ARG_END> The end of the argument started by previous MACm:ARGn
+
+

If you specify -v option too, the MAC_END and the ARG_END markers also display the same numbers with corresponding starting markers.

+

For #debug expand, mcpp uses internal routines considerably different from those used for Standard mode. The explanations are omitted.

+ +

3.5.4. #pragma MCPP debug if, #debug if

+

With these directives, mcpp displays #if, #elif, #ifdef and #ifndef lines and reports their evaluation result (true or false). As for a skipped #if section, no report is made.

+ +

3.5.5. #pragma MCPP debug expression, #debug expression

+

With these directives, mcpp traces evaluation of a #if or #elif expression. DECUS cpp, based on which mcpp has been developed, provides these directives for the purpose of debugging cpp itself. I scarcely modified them. This directive outputs a very long list of internal functions, as well as variable names and their values. Unless you read the mcpp source code, you may not understand these variables. However, without the source code, you can manage to understand how the mcpp pushes onto and takes out of a evaluation stack a complex expression value.

+ +

3.5.6. #pragma MCPP debug getc, #debug getc

+

With these directives, mcpp outputs detailed data each time it calls get_ch(), a function to read one byte. When mcpp in Standard mode scans a pp-token, this routine is called to read only the first byte of the pp-token.

+

With a #debug getc, mcpp calls this routine during token scan, resulting in a tremendous amount of data output.

+

In any way, using these directives outputs a huge amount of data, so you scarcely need to use them.

+ +

3.5.7. #pragma MCPP debug memory, #debug memory

+

With these directives, mcpp reports the status of the heap memory it has internally allocated or released using malloc(), realloc() or free() only once. Only the kmmalloc I developed and some other types of malloc() provide this functionality. Refer to mcpp-porting.html#4.extra. In case of other malloc(), mcpp will neither cause an error nor report a status.

+

mcpp reports the heap memory status again when it terminates with these directives on. The same thing happens when mcpp terminates due to out of memory.

+ +

3.5.8. #pragma MCPP debug macro_call

+

With this directive, mcpp starts macro notification mode. +In this mode, on each macro definition and macro expansion, its line and column information on source file are output embedded in comments. +On a macro call with arguments, location information on each arguments are reported too. +Token concatenation by macro, however, may cause loss of macro information about the tokens before concatenation.
+In addition, some informations are output on #undef, #if (#elif, #ifdef, #ifndef) and #endif, too.
+This mode is specified also by -K option.

+

Macro notification mode is designed to allow reconstruction of the original source position from the preprocessed output. The primary purpose of this mode is to allow C/C++ refactoring tools to refactor source code without having to implement a special-purpose C preprocessor. This mode is also handy for debugging macro expansions. *1

+

The goal for macro expansion mode is to annotate every macro expansion, while still allowing the output to be compiled. +On the other hand, '#pragma MCPP debug expand' is to trace macro expansion and outputs detailed informations, but its output is not compilable.

+

Note:

+

*1 Most of the specifications of macro notification mode were proposed by Taras Glek. +He is working on refactoring of sources at mozilla project:

+

http://blog.mozilla.com/tglek/

+ +

3.5.8.1. Comment on #define

+

For example, macro definition directives such as:

+
+#define NULL 0L
+#define BAR(x, y) x ## y
+#define BAZ(a, b) a + b
+
+

produce the following output:

+
+/*mNULL 1:9-1:16*/
+/*mBAR 2:9-2:25*/
+/*mBAZ 3:9-3:24*/
+
+

where the format means:

+/*m[NAME] [start line]:[start column]-[end line]:[end column]*/ +

Line and column numbers start from 1. +When you specify -K option, predefined macros are output too, which have no location information.

+ +

3.5.8.2. Comment on #undef

+
+#undef  BAZ
+
+

This line produces the output: +

+/*undef 10*//*BAZ*/
+
+

The [lnum] and [NAME] in the format of /*undef [lnum]*//*[NAME]*/ indicate line number of the line and the undefined MACRO name.

+ +

3.5.8.3. Comment on Macro Expansion

+

Within source code other than directives, macros are expanded with markers indicating start and stop of the macro expansion. +The format allows for HTML-like nesting. /*<...*/ signals start of macro expansion and /*>*/ the end. +The start of macro expansion takes the following format replacing /*m of start of macro definition format to /*<:

+/*<[NAME] [start line]:[start column]-[end line]:[end column]*/ +

On macro with arguments, markers indicating source location of each argument and markers indicating start and end of each argument expansion are output too. +The marker for argument location takes the format of /*!...*/. +When a macro is found in an argument, informations on that macro is output recursively, with its location information if it is on the source file. +Macro argument marker also have a disambiguating naming scheme. An argument name is of the format:

+[func-like-macro-name]:[nesting level]-[argument number] +

This way, if someone calls 'BAZ(BAZ(a,b), c)', it would possible to distinguish nested macros of the same name and their arguments from each other. +The argument number starts from 0. +Then the location format follows it as:

+[start line]:[start column]-[end line]:[end column] +

The marker for start of an argument also takes the format:

+/*<[func-like-macro-name]:[nesting level]-[argument number]*/ +

The marker for end of an argument is the same with the one for end of a macro expansion: /*>*/.

+

The following lines:

+
+foo(NULL);
+foo(BAR(some_, var));
+foo = BAZ(NULL, 2);
+bar = BAZ(BAZ(a,b), c);
+
+

expand to:

+
+foo(/*<NULL 4:5-4:9*/0L/*>*/);
+foo(/*<BAR 5:5-5:20*//*!BAR:0-0 5:9-5:14*//*!BAR:0-1 5:16-5:19*/some_var/*>*/);
+foo = /*<BAZ 6:7-6:19*//*!BAZ:0-0 6:11-6:15*//*!BAZ:0-1 6:17-6:18*//*<BAZ:0-0*//*<NULL 6:11-6:15*/0L/*>*//*>*/ + /*<BAZ:0-1*/2/*>*//*>*/;
+bar = /*<BAZ 7:7-7:23*//*!BAZ:0-0 7:11-7:19*//*!BAZ:0-1 7:21-7:22*//*<BAZ:0-0*//*<BAZ 7:11-7:19*//*!BAZ:1-0*//*!BAZ:1-1*//*<BAZ:1-0*/a/*>*/ + /*<BAZ:1-1*/b/*>*//*>*//*>*/ + /*<BAZ:0-1*/c/*>*//*>*/;
+
+

Moreover, when -v option is specified along with -K option, the marker for end of macro expansion and the marker for end of an argument expansion also output the macro name and its number same with their starting markers as:

+
+foo(/*<NULL 4:5-4:9*/0L/*NULL>*/);
+foo(/*<BAR 5:5-5:20*//*!BAR:0-0 5:9-5:14*//*!BAR:0-1 5:16-5:19*/some_var/*BAR>*/);
+foo = /*<BAZ 6:7-6:19*//*!BAZ:0-0 6:11-6:15*//*!BAZ:0-1 6:17-6:18*//*<BAZ:0-0*//*<NULL 6:11-6:15*/0L/*NULL>*//*BAZ:0-0>*/ + /*<BAZ:0-1*/2/*BAZ:0-1>*//*BAZ>*/;
+bar = /*<BAZ 7:7-7:23*//*!BAZ:0-0 7:11-7:19*//*!BAZ:0-1 7:21-7:22*//*<BAZ:0-0*//*<BAZ 7:11-7:19*//*!BAZ:1-0*//*!BAZ:1-1*//*<BAZ:1-0*/a/*BAZ:1-0>*/ + /*<BAZ:1-1*/b/*BAZ:1-1>*//*BAZ>*//*BAZ:0-0>*/ + /*<BAZ:0-1*/c/*BAZ:0-1>*//*BAZ>*/;
+
+

As you see in this example, all the ending markers correspond to the last preceding starting markers of the same nesting level. +Hence, you can judge their correspondence automatically even without -v option.

+ +

3.5.8.4. Comment on #if (#elif, #ifdef, #ifndef)

+

On #if (#elif, #ifdef, #ifndef) line, informations on the macros in the line are shown.

+

For example, this is bar.h:

+
+#define NULL 0L
+#define BAR(x, y) x ## y
+#define BAZ(a, b) a + b
+
+

And here is foo.c:

+
+#include "bar.h"
+#ifdef  BAR
+#ifndef BAZ
+#if 1 + BAR( 2, 3)
+#endif
+#else
+#if 1
+#endif
+#if BAZ( 1, BAR( 2, 3))
+#undef  BAZ
+#endif
+#endif
+#endif
+
+

Then, foo.c produces the following output:

+
+#line 1 "/dir/foo.c"
+#line 1 "/dir/bar.h"
+/*mNULL 1:9-1:16*/
+/*mBAR 2:9-2:25*/
+/*mBAZ 3:9-3:24*/
+#line 2 "/dir/foo.c"
+/*ifdef 2*//*BAR*//*i T*/
+/*ifndef 3*//*BAZ*//*i F*/
+
+
+/*else 6:T*/
+/*if 7*//*i T*/
+/*endif 8*/
+/*if 9*//*BAZ*//*BAR*//*i T*/
+/*undef 10*//*BAZ*/
+#line 11 "/dir/foo.c"
+/*endif 11*/
+/*endif 12*/
+/*endif 13*/
+
+

As you see, on #if line, an annotation starts with a /*if [lnum]*/ format where [lnum] indicates the current line number. +Then one or more /*[NAME]*/ markers follow, if some macros are found, a /*[NAME]*/ for each macro. +The annotation terminates with /*i T*/ or /*i F*/ which indicates that the directive is evaluated true or false, respectively. +The expansion result is not displayed, unlike a macro on lines other than directives. +On a line such as '#if 1' which has no macro, no /*[NAME]*/ is displayed.

+

Also annotations on #elif, #ifdef and #ifndef start with /*elif [lnum]*/, /*ifdef [lnum]*/ and /*ifndef [lnum]*/, respectively, followed by /*[NAME]*/, if some macros are found, and terminate with /*i T*/ or /*i F*/.

+

In any blocks where compilation is to be skipped, no annotation is displayed.

+ +

3.5.8.5. Comment on #else and #endif

+

On #else line, as the above examples, an information is displayed in /*else [lnum]:[C]*/ format where [lnum] is the current line number and [C] is 'T' or 'F' which indicates that the #else - #endif block is to be compiled or to be skipped.

+

On #endif line, as the above examples, an information is displayed in /*endif [lnum]*/ format where [lnum] indicates the current line number. +Of course, the #endif corresponds to the last #if (#ifdef, #ifndef) which is not yet closed.

+ +

3.5.8.6. #line Output

+

In addition, on the macro notification mode, the output format of filename in #line line differs from the default. +It outputs the filename in the "normalized" full-path-list. +See 3.2. +This is for the convenience of refactoring tool making.

+
+ +

3.6. #assert, #asm, #endasm

+

#assert is available in pre-Standard mode, except the GCC-specific-build. #assert provides the functionality equivalent to the #error directive in the Standard C. The following code in the Standard C:

+
+#if ULONG_MAX/2 < LONG_MAX
+#error Bad unsigned long handling.
+#endif
+
+

can be expressed as:

+
+#assert LONG_MAX <= ULONG_MAX/2
+
+

The argument of #assert is evaluated as a #if expression. If it evaluates to true (non-zero), mcpp does nothing and if false (0), it displays the following message and then the argument line (after processing line splicing and comments):

+
+Preprocessing assertion failed
+
+

mcpp counts this as error but continues processing.

+

This #assert is quite different from that of System V or GCC.

+

mcpp in pre-Standard mode regards a block enclosed with the #asm and #endasm directives as assembler coding. mcpp implements this functionality for Microware C/6809 only. To implement this functionality in other compiler systems, do_old() and put_asm() in system.c must be modified.

+

For a #asm block, mcpp performs trigraphs conversion and deletes <backslash><newline> sequence, but it neither performs comment processing, checks tokens or characters, nor deletes white-space characters at the beginning of a line. Also, it does not expand a token that happens to have the same name with a macro and outputs it as it is. Other directive lines have no meaning within the #asm block.

+

These #asm and #endasm directives do not conform to Standard C. In the first place, extension directives in the form other than "#pragma sub-directive" are not Standard C conforming. Changing their directive names to #pragma asm and #pragma endasm does not solve this problem. In Standard C, the source code must consist of a C token sequence (more precisely, a preprocessing token sequence), however, an assembler program is not a C token sequence. To use assembly code in the Standard C, there is no other way but to embed it in a string literal token. Then, you have to implement a built-in function that processes that string literal in the compiler-proper and call it as follows:

+
+asm (
+    " leax _iob+13,y\n"
+    " pshs x\n"
+);
+
+

However, this is not suitable for a longer assembly code, in which case, you had better write the assembly code as a separate file like a library function, and assemble and link the program. This seems to be inconvenient, but it is necessary to separate the assembler portion completely to write a portable C program. It is recommended that you should write assembly code in a separate file rather than using #asm.

+
+ +

3.7. New C99 Features (_Pragma() operator, Variadic Macro and others)

+

These features are available in Standard mode. The -V199901L option with __STDC_VERSION__ set to 199901L enables the following C99's features. The same thing can be said with C++ for the -V199901L option with __cplusplus set to 199901L or more. Although C++ Standard does not provides for the features other than 1 or 7, mcpp in Standard mode provides them for better compatibility with C99. Standard mode also allows variable argument macros even in the C90 and C++ modes. *1

+
    +
  1. Treats the text from // to the end of a line as a comment.
    +
    +
  2. Enables variable argument macros.
    +
    +
  3. Allows the sequence of p+, P+, p-, and P-, as well as e+, E+, e-, and E-, in the preprocessing-number. This is to represent a bit pattern of a floating-point number in Hex, like 0x1.FFFFFEp+128.
    +
    +
  4. Enables the _Pragma() operator.
    +
    +
  5. mcpp compiled with the EXPAND_PRAGMA macro set to TRUE macro-expands the argument of #pragma line that do not begin with STDC, MCPP nor GCC. (By default, mcpp is compiled with EXPAND_PRAGMA == FALSE, so it is not subject to macro expansion. It is macro expanded only in Visual C-specific-build and Borland C-specific-build.)
    +
    +
  6. For compiler-systems with long long, a #if expression is evaluated in long long or unsigned long long.
    +
    +
  7. Allows an escape sequence named UCN for Unicode in the forms of \unnnn and \Unnnnnnnn in identifiers, character constants, string literals and pp-numbers. The value of a UCN in #if expression is evaluated as a hexadecimal representation. (UCN cannot be used in POSTSTD mode.)
    +
+A variable argument macro takes a form of:
+
+#define debug(...)  fprintf(stderr, __VA_ARGS__)
+
+

Here is a macro invocation:

+
+debug( "X = %d\n", x);
+
+

This macro is expanded as follows:

+
+fprintf(stderr, "X = %d\n", x);
+
+

... in the parameter list corresponds to one or more parameters. In the above example, ... corresponds to __VA_ARGS__ in the replacement list. During a macro invocation, several arguments that correspond to the ..., including ",", are concatenated to be treated as one argument.

+

_Pragma( "foo bar") has the same effect as specifying #pragma foo bar. The argument of the _Pragma() operator must be one string literal or wide string literal. For a wide string, the prefix (L) is deleted and treated as same as a string literal. For a string literal, " enclosing that string literal is deleted, and \" and \\ in that literal is replaced with " and \, respectively, before it is treated as a #pragma argument.

+

#pragma must be written somewhere in one logical line and its argument is not macro-expanded at least for C90. On the other hand, the _Pragma() operator can be written anywhere in source code (even in a replacement list), which gives the same effect with #pragma written in a logical line. The _Pragma() operator generated during macro expansion is also valid. This flexibility provides the pragma directive with a wide range of portability and allows a header file to absorb the difference in #pragma among compiler systems. (For this sample, see pragmas.h and pragmas.t of "Validation Suite".) *2

+

C99 stipulates a #if expression is of maximum integer type. As "long long" and "unsigned long long" are required types, the type of an #if expression is "long long / unsigned long long" or larger. C90 and C++98 stipulate the type is long / unsigned long. mcpp, however, evaluates it by long long / unsigned long long even in C90 and C++98, and issues a warning when the value is out of range of long / unsigned long. *1

+

Note:

+

*1 This is for compatibility with GCC and Visual C++ 2005, 2008. It is difficult also for other compiler systems to implement C99 specifications all at once. Probably, they will begin to implement them little by little with __STDC_VERSION__ set to 199409L or so.

+

*2 C99 says that a #pragma argument that begins with STDC is not macro-expanded. For other #pragma arguments, whether macro is expanded is implementation-defined.

+
+ +

3.8. Particular specifications for certain compiler systems

+

mcpp of compiler-specific-builds have some specifications peculiar to each compiler system. +Such particular specifications, other than execution option and #pragma, are explained in this section.

+ +

3.8.1. Variadic macro of GCC and Visual C

+

GCC has variadic macro of its own specification from V.2 as shown in 3.9.1.6. +In this manual we call this as GCC2-spec variadic macro. +Moreover, GCC implemented one more spec of variadic from V.3 as shown in 3.9.6.3, which we call GCC3-spec variadic macro. +GCC V.2.95 and later implements C99 variadic, too. +Nevertheless, softwares such as glibc or Linux system headers do not use C99 variadic, nor even GCC3-spec one, and still use that of GCC2-spec.

+

mcpp of GCC-specific-build on STD mode implemented GCC3-spec variadic from V.2.6.3, and GCC2-spec one from V.2.7, in order to avoid inconveniences on Linux or some other softwares. +Yet, mcpp warns at use of them. +GCC-spec variadics, especially GCC2-spec one, are not only unportable, but also syntactically unclean. +Use of them in sources to write in future is not recommendable.

+

Visual C had not implemented variadic macro up to 2003. +But, Visual C 2005 finally implemented it. +Its specification is C99 one with a modification like GCC3-spec one. +When variable arguments are absent, Visual C removes their immediately preceding comma. +It does not use '##' token used in GCC3-spec. +The specification is illustrated as below. +Visual C document says that in the third example, a comma is not removed. +In actual, however, it removes even the comma in this case.

+
+#define EMPTY
+#define VC_VA( format, ...)     printf( format, __VA_ARGS__)
+VC_VA( "var_args: %s %d\n", "Hello", 2005);     /* printf( "var_args: %s %d\n", "Hello", 2005); */
+VC_VA( "absence of var_args:\n");               /* printf( "absence of var_args:\n");   */
+VC_VA( "empty var_args:\n", EMPTY);             /* printf( "empty var_args:\n", );  */  /* trailing comma   */
+
+

Visual C-specific-build of mcpp implemented in STD mode this special handling from V.2.7. +Still, it warns at use of the spec. +mcpp implements the behavior on the above third example as its spec, and does not remove the comma.

+ +

3.8.2. Handling of 'defined' by GCC

+

On a macro with 'defined' token in it, GCC expands it differently from usual when it is in #if line. +I explain this problem at 3.9.4.6.

+

mcpp of GCC-specific-build from V.2.7 onward handles this sort of macro like GCC in STD mode. +This behavior was implemented to cope with a few wrong macros used in Linux system headers. +Yet, it warns at use of 'defined' token in macro on #if line. +You should write correct #if expression.

+ +

3.8.3. Asm Statement in Borland C and Other Special Syntaxes

+

Borland C has the asm keyword. This keyword is used to write assembly code as follows:

+
+asm {
+    mov x,4;
+    ...;
+}
+
+

This is quite irregular and deviates from the C grammar. If there happen to be a token with the same name as a macro, it will be macro-expanded. The same can be said with Borland C itself and mcpp. It is recommended that an assembler program should be written in a separate .asm file. +mcpp does not treat this specially.

+

Visual C++ also has the __asm keyword, which provides the similar functionality to this.

+

GCC provide a Standard-conforming built-in function asm() which is used as asm( " mov x,4\n").

+ +

3.8.4. #import and Others

+ +

3.8.4.1. #import of Mac OS X / GCC

+

GCC has #import directive, which is a feature of Objective-C and imported to C/C++. +#import is a #include with an implicit '#pragma once'. +It is occasionally used in C/C++ sources on Mac OS X.

+

mcpp V.2.7 and later implements this directive only on Mac OS X, in both of GCC-specific-build and compiler-independent-build.

+ +

3.8.4.2. #import and #using of Visual C

+

Visual C has peculiar directives named #import and #using, which have form of preprocessing-directive, in fact, they are directives for compiler and linker. +The #import of Visual C has no relation to that of GCC.

+

mcpp of Visual-C-specific-build outputs these lines as they are.

+
+ +

3.9. Problems of GCC and Compatibility with GCC

+

Although I tried to develop mcpp in such manner that the GCC-specific-build provides compatibility with GCC / cpp (cc1) to the extent that it does not hinder practical use, it is still incompatible in many aspects.

+

First of all, as shown in Chapter 2, there are many differences in execution options. mcpp implements neither -A option nor non-conforming directives, including #assert and #ident. *1

+

Fortunately, there seems to be quite few sources that cannot be compiled due to a lack of this compatibility.

+

It is more problematic that there are some sources that assume special behaviors of old preprocessors. Most of such source code receives a warning when -pedantic is specified in GCC. mcpp in Standard mode, by default, provides almost the same behavior as GCC's -pedantic since it implements Standard conforming error checking. However, since GCC/cpp, by default, allows such Standard violations without issuing a diagnostic, there are some sources that take advantage of this.

+

It is very easy to rewrite such non-conforming code to Standard-conforming code in most cases, so it is meaningless to take the trouble to write non-conforming code only to impair portability and, what is worse, to provide a hotbed of bugs. When you find such code, do not hesitate to correct it. *2

+

Note:

+

*1 The functionality of #assert and #ident should be implemented using #pragma, if necessary. The same can be said with #include_next and #warning, but these directives seem to be sometimes used in GCC system, so I grudgingly implemented them in GCC-specific-build, however, a warning is issued when they are used.

+

*2 From 3.9 through 3.9.3 sections of this document was written in 1998, when the sources depending on traditional preprocessors were frequently found. +After that time, such sources have greatly decreased, +and on the other hand, sources depending on the local features and implementation trivialities of GCC have much increased. +The 3.9.4 and later, especially 3.9.8 and later sections describe mainly such problems. (2008/03)

+ +

3.9.1. Preprocessing FreeBSD 2/Kernel Source

+

Taking FreeBSD 2.2.2-R (1997/05) kernel source code as an example, this section explains some preprocessing problems. All the directories that appear in this section are installed in /sys (/usr/src/sys). Of the items I point out below, 3.9.1.7 and 3.9.1.8 are not necessarily Standard violations and work as expected in mcpp, but mcpp issues a warning because their coding is confusing. 3.9.1.6 is an enhancement and C99 provides the same functionality, but it differs from GNUC/cpp in notation.

+ +

3.9.1.1. Multi-Line String Literal

+

Assembly codes are embedded by the following manner in i386/apm/apm.c, i386/isa/npx.c, i386/isa/seagate.c, i386/scsi/aic7xxx.h, dev/aic7xxx/aic7xxx_asm.c, dev/aic7xxx/symbol.c, gnu/ext2fs/i386- bitops.h, pc98/pc98/npx.c:

+
+asm("
+    asm code0
+#ifdef PC98
+    asm code1
+#else
+    asm code2
+#endif
+    ...
+");
+
+

When no " closing a string literal appears by the end of line, GCC/cpp, by default, interprets that the string literal ends at the end of line. The above coding is based on this specification. In addition, the compiler-proper seems to interpret the whole content of asm() as a string literal spreading across lines.

+

I think that assembler source code should be written in a separate file, but if you want to embed it in ".c" file by all means, write it in the following manner, instead of using the confusing coding shown above.

+
+asm(
+    "  asm code0\n"
+#ifdef PC98
+    "  asm code1\n"
+#else
+    "  asm code2\n"
+#endif
+    "  ...\n"
+);
+
+

Standard C conforming preprocessors will accept it.

+ +

3.9.1.2. #else junk, #endif junk

+

The following line appears in ddb/db_run.c, netatalk/at.h, netatalk/aarp.c, net/if-ethersubr.c, i386/isa/isa.h, i386/isa/wdreg.h, i386/isa/tw.c, i386/isa/b004.c, i386/isa/matcd/matcd.c, i386/isa/sound/sound_calls.h, i386/isa/pcvt/pcvt_drv.c, pci/meteor.c, and pc98/pc98/pc98.h:

+
+#endif MACRO
+
+

This line should be changed to:

+
+#endif /* MACRO */
+
+ +

3.9.1.3. #ifdef 0

+

To my surprise, i386/apm/apm.c contains the following strange line:

+
+#ifdef 0
+
+

Of course, this should be written as:

+
+#if 0
+
+

This code must have been neither debugged nor used.

+ +

3.9.1.4. Duplicate Definition of Macro

+

gnu/i386/isa/dgb.c has a duplicate definition of the following macro:

+
+#define DEBUG
+
+

Some of header files have a macro definition conflicting with this.

+

The Standard C regards duplicate definitions as "violation of constraint", but how they are treated depends on compiler systems; some make the first definition valid after issuing an error message and others, like GCC 2/cpp, make the last definition valid without issuing any message by default. To make the last definition valid, the following code should be added immediately before the last definition.

+
+#undef DEBUG
+
+ +

3.9.1.5. #warning

+

i386/isa/if_ze.c, and i386/isa/if_zp.c have the #warning directive. This is the only Standard violation directive I found in the kernel source. To conform to the Standard C, there is no way but to comment out this line.

+

mcpp accepts #warning.

+ +

3.9.1.6. Variable Argument Macros

+

gnu/ext2fs/ext2_fs.h and i386/isa/mcd.c have the following macro that takes variable number of arguments:

+
+#define MCD_TRACE(fmt, a...)        \
+{                                   \
+    if (mcd_data[unit].debug) {     \
+        printf("mcd%d: status=0x%02x: ",    \
+            unit, mcd_data[unit].status);   \
+        printf(fmt, ## a);          \
+    }                               \
+}
+
+#   define ext2_debug(fmt, a...)  { \
+        printf("EXT2-fs DEBUG (%s, %d): %s:",   \
+            __FILE__, __LINE__, __FUNCTION__);  \
+        printf(fmt, ## a);          \
+        }
+
+

This is a GCC-specific enhanced specification and cannot be applied to other compiler systems. The above "## a" can be simply written as "a". With ## and in the absence of an argument corresponding to "a..." in a macro invocation, the preceding comma is deleted. C99 also provides for variable argument macros, but their notation differs from that of GCC. The above example is written as follows in C99:

+
+#define MCD_TRACE( ...)             \
+{                                   \
+    if (mcd_data[unit].debug) {     \
+        printf("mcd%d: status=0x%02x: ",    \
+            unit, mcd_data[unit].status);   \
+        printf( __VA_ARGS__);       \
+    }                               \
+}
+
+#  define ext2_debug( ...)     {    \
+       printf("EXT2-fs DEBUG (%s, %d): %s:",   \
+           __FILE__, __LINE__, __FUNCTION__);  \
+       printf( __VA_ARGS__);   \
+       }
+
+

The most annoying difference is that in C99 requires one or more arguments on a macro invocation corresponding to "..." while GNUC/cpp requires 0 or more arguments corresponding to "a...". To handle this, when there is no argument corresponding to "...", mcpp issues a warning, instead of making it an error. Therefore, you can change the above code as follows:

+
+#define MCD_TRACE(fmt, ...)         \
+{                                   \
+    if (mcd_data[unit].debug) {     \
+        printf("mcd%d: status=0x%02x: ",    \
+            unit, mcd_data[unit].status);   \
+        printf(fmt, __VA_ARGS__);   \
+    }                               \
+}
+
+#  define ext2_debug(fmt, ...)     {    \
+       printf("EXT2-fs DEBUG (%s, %d): %s:",   \
+           __FILE__, __LINE__, __FUNCTION__);  \
+       printf(fmt, __VA_ARGS__);   \
+       }
+
+

This is simpler with one-to-one correspondence. However, this way of writing has a disadvantage that a comma immediately before an empty argument remains, resulting in, for example, printf( fmt, ). In this case, there is no other way but to write a macro definition in accordance with C99 specifications, or avoid using an empty argument in a macro invocation. Harmless tokens, such as NULL or 0, are used to write, for example, MCD_TRACE(fmt, NULL). *1

+

Note:

+

*1

GCC 2.95.3 or later also implements variable argument macros based on the C99 syntax. It is recommended to use this syntax. GCC specific one provides the flexibility of allowing for zero number of variable argument, but its notation is bad in that (1) for the "args..." parameter, a white space must not be inserted between "args" and "...", but such a pp-token is not permitted in C/C++, and that (2) it is not desirable that the notation for a token concatenation operator is used for different meaning in a replacement list. It is desirable to allow zero number of variable arguments based on the C99 notation. GCC 3 introduced a notation for variable argument macros that is a mixture of GCC 2's traditional notation and C99 one. For details, refer to 3.9.6.3.

+ +

3.9.1.7. Empty Argument in Macro Call

+

The following macro invocations appear in nfs/nfs.h, nfs/nfsmount.h, nfs/nfsmode.h, netinet/if_ether.c, netinet/in.c, sys/proc.h, sys/socketvars.h, i386/scsi/aic7xxx.h, i386/include/pmap.h, dev/aic7xxx/scan.l, dev/aic7xxx/aic7xxx_asm.c, kern/vfs_cache.c, pci/wd82371.c, vm/vm_object.h, and vm/device/pager.c. So do in /usr/include/nfs/nfs.h.

+
+LIST_HEAD(, arg2)
+TAILQ_HEAD(, arg2)
+CIRCLEQ_HEAD(, arg2)
+SLIST_HEAD(, arg2)
+STAILQ_HAED(, arg2)
+
+

The first argument is empty. C99 approved empty arguments but C90 regarded them as undefined. Taking it consideration that an argument may happen to be empty during a nested macro invocation, empty arguments should be approved, however, it is neither necessary nor desirable to write an empty argument in source code. Note that for a one-argument macro, there is syntax ambiguity between an empty argument and a lack of argument.

+

Taking everything into consideration, the following notation is recommended:

+
+#define EMPTY
+
+LIST_HEAD(EMPTY, arg2)
+TAILQ_HEAD(EMPTY, arg2)
+CIRCLEQ_HEAD(EMPTY, arg2)
+SLIST_HEAD(EMPTY, arg2)
+STAILQ_HAED(EMPTY, arg2)
+
+

Any Standard C conforming preprocessor will accept this notation.

+

By the way, some of the header files (in the nfs directory) shown above neither have the macro definitions shown above nor #include any other header files. This is because such header files assume that these macro definitions exist in sys/queue.h and that *.c programs will #include sys/queue.h first. These files arise ambiguity.

+

kern/kern_mib.c has the following macro definitions:

+
+SYSCTL_NODE(, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
+
+

In this case, the first argument cannot be changed to EMPTY. Because the corresponding macro definition in the sys/sysctl.h is as follows:

+
+#define SYSCTL_NODE(parent, nbr, name, access, handler, descr)      \
+    extern struct linker_set sysctl_##parent##_##name;              \
+    SYSCTL_OID(parent, nbr, name, CTLTYPE_NODE|access,              \
+        (void*)&sysctl_##parent##_##name, 0, handler, "N", descr);  \
+    TEXT_SET(sysctl_##parent##_##name, sysctl__##parent##_##name);
+
+

In other words, these arguments are not macro-expanded. The arguments of the SYSCTL_OID macro shown above, including the first one, are not macro expanded. In this case, there is no way but to leave the empty argument as it is. *1

+

Note:

+

*1 C99 approves empty arguments as legitimate. Taking macros, such as SYSCTL_NODE() and SYSCTL_OID(), into consideration, the EMPTY macro is not almighty and using empty arguments has some reason. In addition, even if EMPTY is used, a nested macro invocation may cause empty arguments. However, for source readability, using EMPTY is recommended whenever possible.

+ +

3.9.1.8. Object-Like Macros Replaced with Function-like Macro Name

+

i386/include/endian.h, as well as /usr/include/machine/endian.h, has the following macro definitions. (There are four same kinds of definitions.)

+
+#define __byte_swap_long(x) (replacement text)
+#define NTOHL(x)            (x) = ntohl ((u_long)x)
+#define ntohl               __byte_swap_long
+
+

The problem is the ntohl definition. Although ntohl is an object-like macro, it is expanded to a function-like macro name, then rescanned with subsequent text, and is expanded as if it were a function-like macro. This way of macro-expansion has been regarded as an implicit specification since K&R 1st, and the Standard C somehow approved it as legitimate. However, as I discuss in other documents, it is this specification that makes macro-expansion unnecessarily complicated and brings confusion to Standard documents. This is a bug specification. *1

+

This ntohl is actually a function-like macro, written as an object-like macro omitting the parameter list. You had better define this like a function-like macro that it is:

+
+#define ntohl(x)    __byte_swap_long(x)
+
+

This causes no problem.

+

i386/isa/sound/os.h has the same kind of macro definitions:

+
+#define INB         inb
+#define INW         inb
+
+

This should be written as follows:

+
+#define INB(x)      inb(x)
+#define INW(x)      inb(x)
+
+

Note:

+

*1 ISO 9899:1990 Corrigendum 1:1994 regarded the notation as undefined. C99 replaced this article with other. However, Standard documents are still confusing about this. For details, see cpp-test.html#2.7.6.

+ +

3.9.1.9. Preprocessing .S File

+

Some kernel sources are contained in several ".S" files, that is, they are written in assembler. These sources contain #include's or #ifdef's, which require preprocessing. To preprocess them, in FreeBSD 2.2.2-R, 'cc' is called with the '-x assembler-with-cpp' option, and 'cc' calls '/usr/libexec/cpp' with the '-lang-asm' option and then calls 'as'.

+

Of course, this ways of using .S files is non-conforming. This assembler source code must not contain a token that happens to have the same name with a macro. White spaces between tokens and at the beginning of a line must be retained during preprocessing. In addition, if the first token at the beginning of a line is a # indicating an assembler comment, special processing is required on the preprocessor side. This not only considerably limits available preprocessors but also increases the possibility of unknowingly introducing bugs. So, using .S files in this way is not recommended. *1

+

To preprocess source code for use with several types of machines, the code should be written in the following manner and be saved in not ".S" but ".c" file. 4.4BSD-Lite actually adopts this way of coding.

+
+asm(
+    "  asm code0\n"
+#ifdef Machine_A
+    "  asm code1\n"
+#else
+    "  asm code2\n"
+#endif
+    "  ...\n"
+);
+
+

Note:

+

*1 In FreeBSD 2.0-R, these kernel sources are contained not in *.S but in *.s file. The Makefile is so defined as to call 'cpp', instead of 'cc', to process them. Then the 'cc' calls 'as'. When the 'cpp' is called, '/usr/bin/cpp' is invoked. '/usr/bin/cpp' is a shell-script that calls '/usr/libexec/cpp -traditional'. This method was more convenient in that it provides a way to change preprocessors to be used by modifying the script.

+ +

3.9.2. Preprocessing FreeBSD 2/libc Source

+

I compiled all the source files in /usr/src/lib/libc of FreeBSD 2.2.2R. There was no problem, probably because most of them comes from 4.4BSD-Lite without much modification. It is quite rare and surprising that a huge amount of source files in excellent quality is gathered together.

+

Only at one place, I found the following coding in gen/getgrent.c. Of course, ";" at the end of line is surplus.

+
+#endif;
+
+ +

3.9.3. Problems Concerning GCC 2/cpp

+

As seen so far, writing a Standard-conforming source code with better portability in a more secure manner neither requires much effort nor provides any demerits. In spite of it, why does source code less conforming to Standards still exist at all?

+

When comparing the FreeBSD 2.0-R kernel sources with those of 2.2.2-R, non-conforming ones do not decrease in number. The problem is that newer sources are not necessarily more conforming to the Standards. There are few non-conforming sources in 4.4BSD-Lite. This is probably because the 4.4BSD sources were rewritten to become conforming to the Standard C and POSIX. However, during the process of implementing these sources to FreeBSD, the old writing style revived in some sources. For example, although the ntohl shown above is written as ntohl(x) in 4.4BSD-Lite, it is written as ntohl in FreeBSD. Why did the notation once put away revive?

+

I blame GCC/cpp for this revival, which passes these non-conforming sources without issuing a diagnostic. If -pedantic had been a default behavior, the old style source would have never revived. If -pedantic-errors had been a default behavior, although, GCC/cpp would not have been put into practical use because too many sources failed to be compiled. The gcc's man page describes the -pedantic option as: "There is no reason to use this option except for satisfying pedants." Now that eight years have already passed since Standard C was established, it is a high time that GCC/cpp should set -pedantic as default, not go so far as to set -pedantic-errors. *1

+

In FreeBSD 2.0-R, nested comments were sometimes found, but in 2.2.2-R, they disappeared. This is because GCC/cpp no longer allowed them. This has nothing to do with -pedantic, but I want to say how influential preprocessor's source checking is.

+

Note:

+

*1 I wrote 3.9.3 subsection in 1998. After that, gcc's man page or info deleted this expression, however, the specification remains almost the same.

+ +

3.9.4. Preprocessing Linux/glibc 2.1

+

I compiled glibc (GNU LIBC) 2.1.3 sources (February, 2000). Different from those of FreeBSD libc, I found many problems. Some sources are written based on GCC/cpp's undocumented specifications, in which case it took me a lot of time to identify them.

+ +

3.9.4.1. Multi-Line String Literal

+

sysdeps/i386/dl-machine.h and stdlib/longlong.h have many multi-line string literals as shown below:

+
+#define MACRO asm("
+    instr 0
+    instr 1
+    instr 2
+")
+
+

Some string literals are very long. compile/csu/version-info.h created by make also has a multi-line string literal. Of course, it is non-conforming, but GCC treats it as a string literal with embedded <newline>.

+

The -lang-asm (-x assembler-with-cpp, -a) option allows mcpp to convert a multi-line string literal into the following code:

+
+#define MACRO asm("\n  instr 0\n  instr 1\n  instr 2\n")
+
+

However, this option cannot work properly for a string literal with a directive inserted in the middle as shown in 3.9.1.1, in which case there is no way but to rewrite the source.

+ +

3.9.4.2. #include_next, #warning

+

#include_next appears in the following files:

+

catgets/config.h, db2/config.h, include/fpu_control.h, include/limits.h, include/bits/ipc.h, include/sys/sysinfo.h, locale/programs/config.h, and sysdeps/unix/sysv/linux/a.out.h

+

sysvipc/sys/ipc.h has #warning.

+

Although these directives are not approved by the Standard C, #include_next, in particular, becomes indispensable for glibc 2. So, mcpp for GCC implements #include_next and #warning.

+

The problems concerning #include_next is that it is not only a standard violation but also that what headers are actually included depends on the setting of include directories and a search order, which are changed by users via environment variables.

+

When glibc is installed, some files in glibc's include directory are copied to the /usr/include directory. These files are used as system header files. That these header files contain #include_next means system headers become patchy. It seems to be time to reorganize them.

+ +

3.9.4.3. Variable Argument Macros

+

The following files contain definitions of macros with variable number of arguments based on the GCC specification, as well as macro invocations:

+

elf/dl-lookup.c, elf/dl-version.c, elf/ldsodefs.h, glibc-compat/nss_db/db-XXX.c, glibc-compat/nss_files/files-XXX.c, linuxthreads/internals.h, locale/loadlocale.c, locale/programs/linereader.h, locale/programs/locale.c, nss/nss_db/db-XXX.c, nss/nss_files/files-XXX.c, sysdeps/unix/sysdep.h, sysdeps/unix/sysv/linux/i386/sysdep.h, and sysdeps/i386/fpu/bits/mathinline.h

+

This is a deviation from the C99 Standard. You must rewrite the source code before you can use mcpp. *1

+ +

Note:

+

*1 This is a spec since GCC2. There is another spec of GCC3 which is a compromise of GCC2 and C99 specs. See 3.9.6.3.

+ +

3.9.4.4. Empty Argument During Macro Calls

+

The following files have macro invocations with empty arguments:

+

catgets/catgetsinfo.h, elf/dl-open.c, grp/fgetgrent_r.c, libio/clearerr_u.c, libio/rewind.c, libio/clearerr.c, libio/iosetbuffer.c, locale/programs/ld-ctype.c, locale/setlocale.c, login/getutent_r.c, malloc/thread-m.h, math/bits/mathcalls.h, misc/efgcvt_r.c, nss/nss_files/files-rpc.c, nss/nss_files/files-network.c, nss/nss_files/files-hosts.c, nss/nss_files/files-proto.c, pwd/fgetpwent_r.c, shadow/sgetspent_r.c, sysdeps/unix/sysv/linux/bits/sigset.h, sysdeps/unix/dirstream.h

+

math/bits/mathcalls.h, in particular, contains as much as 79 empty arguments. This header file is installed in /usr/include/bits/mathcalls.h and is #included by /usr/include/math.h. Even with an EMPTY macro, nested macro invocations generate a lot of empty arguments. Are there any other ways to write macros more clearly?

+ +

3.9.4.5. Object-Like Macros Replaced with Function-like Macro Name

+

The following files contain object-like macro definitions replaced with function-like macro names:

+

argp/argp-fmtstream.h, ctype/ctype.h, elf/sprof.c, elf/dl-runtime.c, elf/do-rel.h, elf/do-lookup.h, elf/dl-addr.c, io/ftw.c, io/ftw64.c, io/sys/stat.h, locale/programs/ld-ctype.c, malloc/mcheck.c, math/test-*.c, nss/nss_files/files-*.c, posix/regex.c, posix/getopt.c, stdlib/gmp-impl.h, string/bits/string2.h, string/strcoll.c, sysdeps/i386/i486/bits/string.h, sysdeps/generic/_G_config.h, sysdeps/unix/sysv/linux/_G_config.h

+

Of these, some function-like macros, like the ones in math/test-*.c , are first replaced with an object-like macro name and then further replaced with a function-like macro name. Why did these macros have to be written in this way?

+ +

3.9.4.6. Macros Expanded to 'defined'

+

sysdeps/generic/_G_config.h, sysdeps/unix/sysv/linux/_G_config.h, and malloc/malloc.c contain the following macro definition expanded to the "defined" pp-token.

+
+#define HAVE_MREMAP defined(__linux__) && !defined(__arm__)
+
+

The intention of this macro definition is that with the following directive,

+
+#if HAVE_MREMAP
+
+

the above line is expected to be expanded as follows:

+
+#if defined(__linux__) && !defined(__arm__)
+
+

However, the behavior is undefined in Standard C when a #if line has a "defined" pp-token in a macro expansion result. Apart from it, this macro definition is strange in the first place.

+

The HAVE_MREMAP macro is first replaced with the following,

+
+defined(__linux__) && !defined(__arm__)             (1)
+
+

and then the identifiers defined, __linux__ and __arm__ are rescanned for more macro replacement. If any of them is a macro, it is expanded. In this case, defined cannot be defined as a macro (Otherwise, it causes another undefined result), and if __linux__ is defined as 1 and __arm__ is not defined, this macro is finally expanded as follows:

+
+defined(1) && !defined(__arm__)
+
+

defined(1), of course, is a syntax error of a #if expression.

+

However, GCC/cpp stops macro expansion at (1) and regards it as the final macro expansion result of the #if line. Since this is "undefined" anyhow, this GNU specification cannot be described as wrong, but it lacks of consistency in that how to expand a macro differs between macros in a #if line and in other lines. At least, it lacks of portability. *1

+

The above code should be written as follows:

+
+#if defined(__linux__) && !defined(__arm__)
+#define HAVE_MREMAP 1
+#endif
+
+

I hope this kind of confusing code be eliminated as early as possible. *2

+

Note:

+

*1 GCC 2/cpp internally treats defined in a #if line as a special macro. For this reason, when GCC/cpp rescans the following sequence of tokens for macro expansion, it evaluates it as a #if expression, as a result of special handling of defined pseudo-macro, instead of expanding the original macro. In other words, distinction between macro expansion and #if expression evaluation is ambiguous.

+
+defined(__linux__) && !defined(__arm__) +
+

This problem relates to GCC/cpp' own program structure. GCC 2/cpp has a de facto main routine rescan(), which is a macro rescanning routine. This routine reads and processes source file from the beginning to the end, during the course of which, it calls a preprocessing directive processing routine. Although implementing everything using macros is a traditional program structure of a macro processor, this structure can be thought to cause mixture of macro expansion and other processing.

+

*2 In glibc 2.4, this macro was corrected. +Nevertheless, many other macros of the same sort were newly defined.

+ +

3.9.4.7. Preprocessing .S File

+

The files named *.S contain assembler source code requiring preprocessing. Some of these files have preprocessing directives, such as #include, #define, and #if. In addition, the file named compile/csu/crti.S generated by Make contains the following lines:

+
+#APP
+
+

or

+
+#NO_APP
+
+

From a syntax point of view, preprocessors cannot tell whether these lines are invalid preprocessing directives or valid assembler comments. GCC seems to leave these lines as they are during preprocessing and treat it as assembler comments.

+

Concatenation of pp-tokens using the ## operator sometimes generates an invalid pp-token. GCC/cpp outputs these pp-tokens without issuing a diagnostic.

+

For compatibility with GCC, I reluctantly decided that, with the -lang-asm (-x assembler-with-cpp, -a) option, mcpp does not treat these non-conforming directives and invalid pp-tokens generated by ## as error, and outputs them as they are and issues a warning.

+

Essentially, these sources should be processed with an assembler macro processor. GNU seems to provide a macro processor called gasp, but it seems to be scarcely used for some reason.

+ +

3.9.4.8. Problems of rpcgen and -dM Option

+

When invoked with the -dM option, GCC outputs only macro definitions, which is used by stdlib/isomac.c in 'make check' routine.

+

The problem of the isomac.c is that it accepts only GCC/cpp's macro definition file format and regards a comment or a blank line as an error.

+

Glibc make sometimes uses a program called rpcgen. The problem of rpcgen is that it accepts only GCC/cpp's output format of preprocessor line number information as follows:

+
+#123 "filename"
+
+

Rpcgen does accept neither:

+
+#line 123
+
+

nor

+
+#line 123 "filename"
+
+

Rpcgen regards them as error.

+

I reluctantly decided that GCC-specific-mcpp uses the GCC format by default. Rpcgen's specification is poor in that it is based on a particular compiler system's format and cannot accept the standard one.

+ +

3.9.4.9. -include, -isystem and -I- Options

+

Glibc 2.1 'makefile' often uses the -include option and sometimes uses -isystem and -I- options. The former can be substituted with #include at the beginning of source code. The latter two are less necessary; these are only necessary to update system headers.

+

Only GCC-specific-build of mcpp implements these two options, but I would like these less necessary options to be made obsolete. *1

+

Note:

+

*1 GCC/cpp provides several more options that specify include directories and their search orders, such as -iprefix, -iwithprefix, and -idirafter. It also provides the -remap option that specifies mapping between long-file-names and MS-DOS 8+3 format filenames. On CygWIN systems, specs files contain these options, but it is not necessary to use these options because include directories can be specified with environment variables and because such mapping is no longer necessary on CygWIN.

+ +

3.9.4.10. Undocumented Predefined Macros

+

This is not a problem of glibc, but of GCC. The following macros are GCC/cpp predefined macros although their names do not appear in documentation.

+
+__VERSION__,  __SIZE_TYPE__,  __PTRDIFF_TYPE__, __WCHAR_TYPE__
+
+

On Vine Linux 2.1 (egcs-1.1.2) systems, __VERSION__ is set to "egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)". On many systems, including Linux/i386, the values of other three macros have types unsigned int, int, and long int, respectively. However, on FreeBSD and CygWIN systems, their types are slightly different from them (I do not know why). Why does those predefines macros remain undocumented?

+ +

3.9.4.11. Undocumented Environment Variables

+

The most strange thing is the undocumented environment variable named SUNPRO_DEPENDENCIES. sysdeps/unix/sysv/linux/Makefile contains the following script:

+
+SUNPRO_DEPENDENCIES='$ (@:.h=.d)-t $@' \
+$ (CC) -E -x c $ (sysinclude) $< -D_LIBC -dM | \
+... \
+etc.
+
+

The intent of this script is to specify a file name with the environment variable SUNPRO_DEPENDENCIES, and to have cpp output macro definitions in source code and dependency description lines between source files to that file.

+

I had no other way but to read the GCC/cpp source code (egcs-1.1.2/gcc/cccp.c) to know how this environment variable works.

+

In addition, there is another environment variable, DEPENDENCIES_OUTPUT, which has a similar function. The difference between the two is that SUNPRO_DEPENDENCIES also outputs dependency description lines among system headers, but DEPENDENCIES_OUTPUT does not.

+

Only GCC-specific-build of mcpp enables these two environment variables, but I would like these undocumented specifications to be made obsolete as early as possible.

+ +

3.9.4.12. Other Problems

+

Linux (i386)/GCC 2 appends the -Asystem(unix), -Acpu(i386) or -Amachine(i386) to cpp invocation options by using specs file. As long as the glibc 2.1.3 for Linux/x86 is concerned, there seems to be no source code that utilizes this functionality.

+

It is a big problem that glibc's system headers have become patchy and very complicated. A small difference in settings may result in a big difference in preprocessing results.

+

On the other hand, Glibc 2.1.3 did not contain #else junk, #endif junk, or duplicate macro definitions that were found in FreeBSD 2.2.2/kernel sources. In some aspects, Glibc 2.1 source is better organized than FreeBSD 2/kernel source.

+

However, as a whole, there were not a few sources that are based on GCC-specific specifications in glibc 2.1, which impairs portability to other compiler systems although such sources form only a small portion of several thousand source files. Dependence on GCC local specifications is not desirable for program readability and maintainability. I hope that GCC V.3 will make obsolete these local specifications and that all the source code based on them will be completely rewritten.

+ +

3.9.5. To Use mcpp with GCC 2

+

You must modify some source code as follows before you can use mcpp to compile glibc 2.1 sources: *1

+
    +
  1. Macro definitions with variable number of arguments: Modify the 14 files in 3.9.4.3 as shown in 3.9.1.6. Of course, you had better save the original files.
    +
    +
  2. Macros contained in the three files shown in 3.9.4.6 that has defined in its replacement list: /usr/include/_G_config.h is a file generated when sysdeps/unix/sysv/linux/_G_config.h is installed and has the same contents with this. You had better modify /usr/include/_G_config.h.
    +
+

In addition to the options specified in Makefile or specs file, you must specify the -lang-asm (-xassembler-with-cpp) option to process *.S files containing multi-line string literals or assembler comments before you can invoke mcpp. Usually, you can leave this option specified when preprocessing other files.

+

When you want to use GCC/cpp or mcpp, or change the default options, you had better perform the following steps:

+
    +
  1. Become a super-user to move to the directory where cpp resides (here assuming /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66). Let me assume that this directory has GCC/cpp installed under the name of cpp and mcpp as mcpp.
    +
    +
  2. Create a file called mcpp.sh with the following contents. *2
    +
    +#!/bin/sh
    +/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/mcpp -Q -lang-asm "$@"
    +
    +The -Q options are optional, however, I recommend that you should use -Q to record a large amount of diagnostic messages.
    +
    +
  3. Enter the following commands:
    +
    +chmod a+x mcpp.sh
    +mv cpp cpp_gnuc
    +ln -sf mcpp.sh cpp
    +
    +These commands execute mcpp.sh linked to cpp when gcc calls cpp, and mcpp.sh calls mcpp using the above options before the ones specified by gcc.
    +
    +
  4. To change default options, modify mcpp.sh or call mcpp directly. To use GCC/cpp do:
    +
    +ln -sf cpp_gnuc cpp
    +
    +
+

Note:

+

*1 mcpp V.2.7 implemented these specs. +Hence, editing of sources are not necessarily required.

+

*2 If you use 'configure' and 'make' to compile GCC-specific-build of mcpp, the 'make install' command will set the script appropriately. The only thing left for you here is to add '-Q -lang-asm' options to the script.

+ +

3.9.5.1. To Sort mcpp's Warnings

+

Another problem of using mcpp is that it issues a huge amount of warning messages. You can redirect them to a file using the -Q option, but when you preprocess a large amount of source code, such as glibc, total of several hundred MB or more of 'mcpp.err' are created, so it is impossible for you to look through the whole files.

+

Taking a close look at mcpp.err, you will find same warnings being issued repeatedly. This is because the same *.h files are #included by many source programs. To make the files more readable, perform the following procedure:

+
    +
  1. To find error messages, enter the following command:
    +
    +grep 'fatal:' `find . -name mcpp.err`
    +grep 'error:' `find . -name mcpp.err`
    +
    +
  2. To sort warning messages, enter the following command:
    +
    +grep 'warning:' `find . -name mcpp.err` | sort -k3 -u > mcpp-warnings-sorted
    +
    +
  3. To find all the source lines causing a 'warning:', enter the following command:
    +
    +grep 'warning:' `find . -name mcpp.err` | sort -k3 | uniq > mcpp-warnings-all
    +
    +
  4. To find a particular type of 'warning:'s, enter the following command, for example:
    +
    +grep 'warning: Replacement' `find . -name mcpp.err` | sort -k3 | uniq | less
    +
    +After you get an overall idea of what source lines are causing what kinds of errors or warnings, you can see a particular mcpp.err by "less" and then, if necessary, see the source file in question.
    +
    +In addition, you can sandwich the source code in question with '#pragma MCPP debug expand' and '#pragma MCPP end_debug' and preprocess it again to see the output, in which case I recommend you to invoke mcpp in the following manner so that preprocessing results and diagnostic messages are output to the same file:
    +
    +mcpp <-opts> in-file.c > in-file.i 2>&1
    +
    +When you use "make", you must temporarily change the above shell-script.
    +
+ +

3.9.6. Preprocessing GCC 3.2 Source

+

I first compiled GCC 3.2 sources on Linux and FreeBSD, then I used the generated gcc to compile mcpp and then I recompiled GCC 3.2 sources using mcpp for preprocessing.

+

New GCC compilers are bootstrapped during various phases of make; gcc and cc1, etc generated in an earlier phase are used to recompile themselves, and those generated compiler drivers and compiler-propers are used again to recompile themselves, and so on. During the bootstrap, gcc exists under the name of xgcc.

+

Other than cc1 and cc1plus, GCC 2 has a separate preprocessor called cpp. In GCC 3, cpp was absorbed into cc1 and cc1plus. However, there still exists a separate preprocessor cpp0. To have cpp0 preprocess, the -no-integrated-cpp option must be specified when you invoke gcc or g++. Therefore, to have mcpp preprocess, you must use a shell-script that have gcc (xgcc) or g++ invoke mcpp first then invoke cc1 or cc1plus. *1

+

In the GCC compiler system, the settings of system headers and their search order are becoming very complex. So, a small difference in settings may result in a difference in preprocessing results. Even successful compilation was often difficult to attain. In addition, compilation and tests require a lot of other software. Older versions of such software may cause failure in compilation or tests. Actually, compilation sometimes failed due to some hardware problems on my machine.

+

Actually, I failed to compile GCC 3.2 source under FreeBSD 4.4R. I had to upgrade FreeBSD to 4.7R and changed software packages to those for FreeBSD 4.7R before I was able to succeed in compilation. *2

+

I used VineLinux 2.5 on two PCs. Although compilation of GCC 3.2 sources using GCC 2.95.3 was successful on one PC (K6/200MHz), recompilation of GCC 3.2 sources using the generated GCC 3.2/cc1 failed, and caused many segmentation faults. Then I changed CPU from K6 to AthlonXP. This time, recompilation was successful; no segmentation faults occurred. Hardware may have caused the problem.

+

When I compiled GCC 3.2 sources using GCC 2.95.4 under FreeBSD on K6, "make -k check" of the generated gcc was almost successful. When I recompiled GCC 3.2 itself using the generated GCC 3.2, in "make -k check" of g++ and libstdc++-v3, about 20 percent of testsuite was unsuccessful. However, when using AthlonXP, instead of K6, everything went OK. Hardware may have caused the problem.

+

On both VineLinux PCs, when I recompiled GCC 3.2 sources using GCC 3.2 itself and mcpp, "make -k check" of the generated gcc was successful. However, in "make -k check" of g++ and libstdc++-v3, 20 percent of testsuite failed. *3, *4, *5

+

In anyway, the cause of this testsuite failure seems to lie not in the generated compilers themselves, such as gcc, g++, cc1 and cc1plus, but in the header files or some other settings.

+

mcpp cannot be described as completely compatible with GCC/cpp, but is highly compatible. So, mcpp and GCC/cpp can be used interchangeably.

+

GCC 3.2 sources were compiled in the following environment:

+
+ + + + + +
OS make library CPU
VineLinux 2.5GNU makeglibc 2.2.4Celeron/1060MHz
VineLinux 2.5GNU makeglibc 2.2.4K6/200MHz, AthlonXP/2.0GHz
FreeBSD 4.7R UCB makelibc.so.4 K6/200MHz, AthlonXP/2.0GHz
+
+

Only C and C++ were compiled.

+

Note:

+

*1 I had to do this for each bootstrap stage. Since makefile is too large and too complex to change, I employed an inelegant method; I kept on sitting in front of PC screen during the entire process of bootstrap. At each end of the stages, I entered ^C and replaced xgcc and others with shell-scripts.

+

*2 Due to dependency between packages, the system falls into confusion unless appropriate versions are installed. Actually, for this reason, my FreeBSD temporarily failed to invoke kterm.

+

*3 "make -k check" cannot be used with mcpp because diagnostics of mcpp are different from those of GCC.

+

*4 "make -k check" seems to require an English environment, so the LANG environment variable should be set to C.

+

*5 All the testsuite failures were caused by inability of the pthread_* functions, such as pthread_getspecific and pthread_setspecific, to be linked in the library i686-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.5.0.0. When a correctly generated library was installed, "make -k check" was successful. On FreeBSD, this problem never happened. This is probably because of small differences in settings.

+ +

3.9.6.1. Multi-Line String Literal

+

This very old way of coding was no longer found in GCC 3.2 sources. Multi-line string literals were made obsolete as late as at GCC 3.2. GCC 3.2 processes a source with a multi-line string literal as you expect, but issues a warning.

+ +

3.9.6.2. #include_next and #warning

+

limits.h and syslimits.h in build/gcc/include generated during the course of make have #include_next. When GCC 3.2 is installed, these header files are copied to limits.h and syslimits.h in lib/gcc-lib/i686-pc-linux-gnu/3.2/include.

+

GCC 3.2 sources does not have #warnings.

+ +

3.9.6.3. Variable Argument Macros

+

GCC 3.2 sources have some variable argument macros, but most of them are found in testsuite and they are nothing but test samples. Although GCC 3.2 still supports variable argument macros in GCC 2 notation, the ones using __VA_ARGS__ (in C99 notation) are more frequently found in GCC 3.2 sources.

+

In GCC 3, variable argument macros in a mixed notation of GCC 2 and C99 are found: *1

+
+#define eprintf( fmt, ...)   fprintf( stderr, fmt, ##__VA_ARGS__)
+
+

This definition corresponds to the following one of GCC 2 spec.

+
+#define eprintf( fmt, args...)   fprintf( stderr, fmt, ##args)
+
+

According to the GCC specifications, in the absence of an argument corresponding to "...", the comma immediately before "##" is deleted. So, this is expanded as follows:

+
+eprintf( "success!\n")  ==>  fprintf( stderr, "success!\n")
+
+

As far as this example is concerned, this specification seems to be convenient, but is not desirable in that (1) a comma in a replacement list of a macro definition is not always used to delimit parameters, (2) it allows a token concatenation operator (##) to have other functionality, (3) it makes rules more complex by allowing exceptions. *2, *3, *4

+ +

Note:

+

*1 This manual calls the variadic macro of specification since GCC 2 as GCC2 spec, and that of created in GCC 3 as GCC3 spec.

+

*2 While on GCC 2.* 'args...' in definition of GCC2 spec variadic macro should not be separated as 'args ...', on GCC 3 the intervening spaces are allowed.

+

*3 When -ansi option (or any of -std=c* or -std=iso* option) is specified, GCC, however, does not remove the comma even if the variable argument is absent. +Nevertheless, the '##' disappears silently.

+

*4 mcpp V.2.6.3 implemented variadic macro of GCC3 spec for STD mode on GCC-specific-build only. +V.2.7 even implemented GCC2 spec one.

+ +

3.9.6.4. Empty Arguments in Macro Invocation

+

Apart from #include-ed system headers, such as /usr/include/bits/mathcalls.h and /usr/include/bits/sigset.h, empty arguments in a macro invocation are found only in gcc/libgcc2.h of GCC 3.2 sources themselves. *1

+

Note:

+

*1 These two header files are copied into the system header directory when glibc is installed. They do not exist on FreeBSD because glibc is not used.

+ +

3.9.6.5. Object-Like Macros Replaced with Function-Like Macros

+

gcc/fixinc/gnu-regex.c and libiberty/regex.c have object-like macros that are replaced with function-like macro name. /usr/lib/bison.simple, a #included file, also has such macros. These macros are all relevant to alloca. For example, libiberty/regex.c has the following macro definitions.

+
+#define REGEX_ALLOCATE  alloca
+#define alloca( size)   __builtin_alloca( size)
+
+

This should be written as follows:

+
+#define REGEX_ALLOCATE( size)   alloca( size)
+
+

Why did they omit (size)?

+

In addition, regex.c also has another alloca, which is defined as follows:

+
+#define alloca  __builtin_alloc
+
+

Their writing style is inconsistent.

+

Furthermore, regex.c has a #include "regex.c" line, which is including itself. regex.c is a strange and unnecessarily complicated source.

+ +

3.9.6.6. Macros Expanded to 'defined'

+

GCC 3.2 sources do not have macros expanded to 'defined'. According to GCC 3.2 documents, this type of macro is preprocessed in the same way as GCC 2/cpp, but GCC 3.2 issues a warning to indicate "may not portable". However, GCC 3.2 does not issue a warning to an example shown in 3.9.4.6.

+ +

3.9.6.7. Preprocessing of .S Files

+

cpp.info of GCC 3 says:

+
Wherever possible, you should use a preprocessor geared to the +language you are writing in. Modern versions of the GNU assembler have +macro facilities.
+

However, the gcc/config directory has several *.S files.

+ +

3.9.6.8. rpcgen and -dM Option

+

Make of GCC 3.2 uses neither rpcgen nor -dM option. However, specifications of rpcgen and the -dM option do not seem to change from the previous versions.

+ +

3.9.6.9. -include, -isystem and -I- Options

+

These options are frequently used in make of GCC 3.2. Sometimes, the -isystem option is used to specify several system include directories at one time. Is it inevitable to use the option during software compilation that updates system headers themselves? I think they had better use an environment variable to specify all the system include directories.

+

On the other hand, GCC 3/cpp documents discourage to use the -iwithprefix and -iwithprefixbefore options. GCC provides many options to specify include directories. Does GCC 3.2 move toward reorganization or reduction in number of them? *1

+

Note:

+

*1 GCC 3.2 Makefile uses the -iprefix option in a stand alone manner (without using -iwithprefix or -iwithprefixbefore), although the -iprefix option makes sense only when used with one of these two options following it.

+ +

3.9.6.10. Undocumented Predefined Macros

+

GCC 2 did not document predefined macros, such as __VERSION__, __SIZE_TYPE__, __PTRDIFF_TYPE__ and __WCHAR_TYPE__. Even with the -dM option, their existence was unknown. GCC 3 not only documents them but also enhances -dM to show their definitions.

+ +

3.9.6.11. Undocumented Environment Variables

+

GCC 3 documents the SUNPRO_DEPENDENCIES environment variable GCC 2 did not. (I do not know why this environment variable is needed.)

+ +

3.9.6.12. Other Problems

+

GCC 3 implements following #pragmas:

+
+#pragma GCC poison
+#pragma GCC dependency
+#pragma GCC system_header
+
+

Of these, GCC 3.2 sources use poison and system_header. mcpp does not support these #pragmas because I do not think them necessary. (I omit explanation of their specifications.) *1

+

GCC 3 deprecates assertion directives, such as #assert, although gcc, by default, specifies the -A option.

+

In GCC 2, the -traditional option is implemented in one and the same cpp, result in a strange mixture of very old specifications and C99 ones. In GCC 3, its preprocessor was divided into two: non-traditional cpp0 and tradcpp0. The -traditional option is valid only for gcc. cpp0 does not provides it. gcc -traditional invokes tradcpp0 for preprocessing.

+

tradcpp0 is getting closer to a true traditional preprocessor before C90. They say that they no longer maintain tradcpp0 except for serious bugs.

+

The strange specifications of GCC 2/cpp seem to have been significantly revised.

+

Note:

+

*1 mcpp V.2.7 onward supports #pragma GCC system_header on GCC-specific-build.

+ +

3.9.7. To Use mcpp with GCC 3 or 4

+

As seen above, as far as preprocessing is concerned, GCC 3.2 sources have been much improved than glibc 2.1.3 sources in that the traditional way of writing has been almost eliminated and that meaningless options are no longer used.

+

GCC 3.2/cpp0 itself is also much superior to GCC 2/cpp in that it regards traditional specifications as obsolete and articulates the token-based principle. Undocumented specifications have been significantly reduced. Although these improvements are not still sufficient, GCC is certainly moving toward the right direction.

+

However, GNU / Linux system headers become so complex that it is difficult to grasp their entire structure, which may one of the biggest causes of problems in the GNU / Linux system.

+

Another pitiful fact is that the preprocessor is absorbed into the compiler-proper. Therefore, to use mcpp, the -no-integrated-cpp option must be specified when invoking gcc or g++. If you compile a large amount of source files with complicated or many makefiles, or if some program automatically invoke gcc, you should create a shell-script that invokes gcc or g++ with the -no-integrated-cpp option automatically specified.

+

Let me take an example of this. Place the following shell-scripts in the directory where gcc and g++ reside (on my Linux, /usr/local/gcc-3.2/bin), under the names of gcc.sh and g++.sh, respectively.

+
+#!/bin/sh
+/usr/local/gcc-3.2/bin/gcc_proper -no-integrated-cpp "$@"
+
+#!/bin/sh
+/usr/local/gcc-3.2/bin/g++_proper -no-integrated-cpp "$@"
+
+

Move to this directory and enter the following commands:

+
+chmod a+x gcc.sh g++.sh
+mv gcc gcc_proper
+mv g++ g++_proper
+ln -sf gcc.sh gcc
+ln -sf g++.sh g++
+
+

In the directory where cpp is located (on my Linux, /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2), create a script that executes mcpp when cpp0 is invoked, as you did for GCC 2 (See 3.9.5). By doing this, gcc or g++ first invokes mcpp and then invokes cc1 or cc1plus with the -fpreprocessed option appended. -fpreprocessed indicates the source has been preprocessed already. *1

+

Note that when a GCC version other than the system standard one is installed, additional include directory settings may be required. mcpp embeds these settings when mcpp itself is compiled, thus eliminating the need to set them with environment variables.

+

If possible, I want to replace the cpplib source, the preprocessing part of cc1 or cc1plus, with mcpp. The source files that define the internal interface between cpplib and ccl or cc1plus, as well as the external interface between cpplib and user programs that use it, amount to as much as 46KB. It is impossible to replace. Why is the interfaces so complex? It is a pity.

+

Note:

+

*1 mcpp gets all the necessary informations by 'configure' and sets these scripts by 'make install'.

+ +

3.9.7.1. To Use mcpp with GCC 3.3 and 3.4-4.1

+

Although GCC 3.2 seemed to go in the direction of better portability, GCC turned its direction to a different goal on 3.3 and 3.4. V.3.3 and 3.4 differ from 3.2 in the following points.

+
    +
  1. Independent preprocessor cpp0 was abolished. The execution option '-no-integrated-cpp' changed its meaning, gcc invokes cc1 (cc1plus) instead of cpp0 as a preprocessor even if this option is specified, and gcc passes to the preprocessor some options which are irrelevant to preprocessing. (What a dirty implementation!)
    +
  2. Many (several dozen of) macros are predefined. The relationship between the system headers and GCC became more complicated.
    +
  3. Tradcpp was also abolished and absorbed to an execution option of cc1. Some old specifications, which were obsoleted or deprecated in V.3.2, were restored.
    +
+

GCC / cc1 is becoming one huge and complex compiler absorbing preprocessor and some system header's contents. I doubt whether this is a better way of compiler construction, especially of developing open source one.

+

As regards mcpp, it is a nuisance that gcc arbitrarily hands to preprocessor some irrelevant options. Since it is risky to ignore all the options unrecognized by mcpp, I didn't adopt this. Although mcpp ignores the wrong options such as -c or -m* which are frequently handed from gcc, it will get an error if other unexpected options are passed on.

+

In order to avoid conflicts with those wrong options, mcpp V.2.5 changed some options, -c to -@compat, -m to -e, and some others.

+

To use mcpp with GCC 3.2 or former, it is necessary only to replace invoking of cpp0 by mcpp. To use mcpp with GCC 3.3 or later, it is necessary to divide invoking of cc1 to mcpp and cc1. src/set_mcpp.sh will write shell-scripts for this purpose in the GCC libexec directory on mcpp installation. The 'make install' command will also get GCC predefined macros using -dM option and set those for mcpp. *1, *2, *3

+

In addition, GCC 3.4 changed processing of multi-byte characters. Its document says as: *4

+
    +
  1. It converts every encodings of multi-byte characters to UTF-8 at the first phase of preprocessing.
    +
  2. It uses libiconv functions for the conversion, therefore it can handle all the encodings iconv can do.
    +
  3. It has '-finput-charset=<encoding>' option to specify the source file's encoding. (In other words, the encoding is not converted without this option.)
    +
  4. It has also '-fexec-charset=<encoding>' option to specify the output encoding which defaults to UTF-8. *5
    +
+

There is a trend to identify "internationalization" with "unicodization", especially in the Western people who do not use multi-byte characters. It seems that this trend has reached to GCC.

+

What is worse, GCC 3.4 or later does not implement their specification sufficiently. In actual, it behaves as:

+
    +
  1. As for EUC-JP, GB2312, KSC-5601 and Big5, it converts these encodings to UTF-8 correctly with -finput-charset option, and it passes them as they are without this option. *6
    +
  2. The -fexec-charset option has no effect on V.3.4 nor V.4.0. On V.4.1-4.3, the option has effect, and works correctly.
    +
  3. With ISO2022-JP, GCC cannot preprocess on V.3.4 or 4.0, whereas on V.4.1-4.3 it can preprocess the encoding.
    +
  4. As for shift-JIS, all the versions confuse in preprocessing when -finput-charset is specified.
    +
+

mcpp takes -e <encoding> option to specify an encoding, and the GCC-specific-build inserts <backslash> to the byte in multi-byte character which has the same value with <backslash>, '"' or '\'', when the encoding is one of BIG-5, shift-JIS or ISO2022-JP, in order to complement GCC's inability. However, it does not convert the encoding to UTF-8. mcpp also treats -finput-charset as the same option as -e. I adopted these specifications because: *7

+
    +
  1. As for shift-JIS, GCC of any version cannot process it if -f*-charset options are specified. +But, as for shift-JIS, ISO2022-JP and Big5, if the encodings are not converted but supplemented with <backslash>es, the multi-byte characters are output as they are by cc1 on any version of GCC. +Also EUC-JP, GB2312, KSC-5601 and UTF-8 are passed as they are, if -f*-charset are not specified. +That is to say, the multi-byte characters are treated as single-byte character sequences.
    +
  2. GCC up to V.4.0 / cc1 does not convert back from UTF-8 to the original encodings.
    +
  3. I hope that GCC will change the multi-byte character handling in the near future.
    +
+

Note:

+

*1 The output of -dM option, however, slightly differs each other depending on other options. +What is worse, most of the predefined macros are undocumented ones. +As a result, the whole picture cannot be grasped easily.

+

*2 MinGW does not support symbolic link. Though the 'ln -s' command exists, it does not link but only copy. Moreover, MinGW's GCC rejects to invoke a shell-script even if it is named cc1. To cope with this, mcpp's MinGW GCC-specific-build generates a binary executable named cc1.exe (copied also to cc1plus.exe) which invokes mcpp.exe or GCC's cc1.exe/cc1plus.exe.

+

*3 CygWIN / GCC has -mno-cygwin option which alters system include directory and alters GCC's predefined macros. mcpp V.2.6.1 onward, CygWIN GCC-specific-build supports this option and generates two sets of header files for the predefined macros.

+

*4 On GCC in my FreeBSD 6.3, multi-byte character conversion to UTF-8 does not work at all, though libiconv seems to be linked to them. +It was the same with FreeBSD 5.3 and 6.2, too.

+

*5 This conversion seems not to be done in preprocessing phase, but in compilation phase. +Output of -E option is still UTF-8.

+

*6 GCC V.4.1-4.3 fail to compile due to a bug of GCC, if -save-temps or -no-integrated-cpp option is specified at the same time with -f*-charset option.

+

*7 When you pass the output of mcpp to cc1, you should not specify -fexec-charset option nor -finput-charset option.

+ +

3.9.8. Preprocessing Linux/glibc 2.4

+ +

I compiled glibc 2.4 (March, 2006) source, and checked preprocessing problems in it. +As a compiler system, I used GCC 4.1.1 with mcpp 2.6.3. +Since my machine is x86 type, I did not check the codes for other CPUs.

+This is a six years newer version than glibc 2.1.3 (February, 2000) which I checked formerly, so it has naturally some parts largely changed from the old version. +However, It has remarkably many parts unchanged. +On the whole, most of the problems I noticed in the old version have not been revised, on the contrary, unportable sources have increased.

+ +

3.9.8.1. Multi-Line String Literal

+ +

The old-fashioned "multi-line string literal" has disappeared.

+ +

3.9.8.2. #include_next, #warning

+ +

#include_next is found in the following source files. +Its occurrence has increased as compared with the six years older version.

+ +

+catgets/config.h, +elf/tls-macros.h, +include/bits/dlfcn.h, +include/bits/ipc.h, +include/fpu_control.h, +include/limits.h, +include/net/if.h, +include/pthread.h, +include/sys/sysctl.h, +include/sys/sysinfo.h, +include/tls.h, +locale/programs/config.h, +nptl/sysdeps/pthread/aio_misc.h, +nptl/sysdeps/unix/sysv/linux/aio_misc.h, +nptl/sysdeps/unix/sysv/linux/i386/clone.S, +nptl/sysdeps/unix/sysv/linux/i386/vfork.S, +nptl/sysdeps/unix/sysv/linux/sleep.c, +sysdeps/unix/sysv/linux/ldsodefs.h, +sysdeps/unix/sysv/linux/siglist.h +

+ +

Though the following is not a part of glibc itself but a testcase file to test glibc by 'make check', #include_next is found also in it.

+ +

sysdeps/i386/i686/tst-stack-align.h

+ +

#warning appears in sysvipc/sys/ipc.h. +This directive is in a block to be skipped in normal processing, and does not cause any problem.

+ +

3.9.8.3. Variable Argument Macros

+ +

There are definitions of variable argument macros in the following files. +All of these are that of the old spec since GCC2. +There is not any macro of C99 spec, nor even GCC3 spec one.

+ +

elf/dl-lookup.c, +elf/dl-version.c, +include/libc-symbols.h, +include/stdio.h, +locale/loadlocale.c, +locale/programs/ld-time.c, +locale/programs/linereader.h, +locale/programs/locale.c, +locale/programs/locfile.h, +nptl/sysdeps/pthread/setxid.h, +nss/nss_files/files-XXX.c, +nss/nss_files/files-hosts.c, +sysdeps/generic/ldsodefs.h, +sysdeps/i386/fpu/bits/mathinline.h, +sysdeps/unix/sysdep.h, +sysdeps/unix/sysv/linux/i386/sysdep.h

+ +

The following testcase files also have variadic macro definitions of GCC2 spec.

+ +

localedata/tst-ctype.c, +posix/bug-glob2.c, +posix/tst-gnuglob.c, +stdio-common/bug13.c

+ +

Moreover, many of the calls of these macros lack actual argument for variable argument. +As much as 142 files have such macro calls lacking variable argument, and 120 files of them have such unusual macro calls as the replacement list of which have ", ##" sequence immediately preceding variable argument and hence removal of the ',' happen.

+

As a variable argument macro specification, C99 one is portable and is recommendable. +However, it is not so easy to rewrite GCC specs macro to C99 one. +Both of GCC2 spec and GCC3 spec variadic macros do not necessarily correspond to C99 spec one-to-one, because GCC specs cause removal of the preceding comma in case of absence of variable argument. +If you rewrite GCC spec macro definition to C99 one, you also need to rewrite macro calls of absent variable argument and supplement an argument.

+

In glibc 2.1.3, GCC2 spec macros were not so many, and it was not a heavy work for a user to rewrite them with an editor. +In glibc 2.4, however, such macro definitions increased and especially their calls vastly increased. +As a consequence, it is impossible now for a user to rewrite them.

+

To cope with this situation, mcpp V.2.6.3 onward implemented GCC3 spec variadic macro for GCC-specific-build only. +Furthermore, mcpp V.2.7 implemented GCC2 spec one, too. +However, you should not write GCC2 spec macro in your sources, because the spec is too deviant from token-based principle. +Since GCC2 spec corresponds to GCC3 spec one-to-one, it is easy to rewrite a macro definition to GCC3 spec, and call of that macro need not be rewritten. +The already written macros with GCC2 spec will become a little clearer, if rewritten this way. *1

+

To rewrite a GCC2 spec variadic macro to GCC3 spec one, for example, change:

+ +
+#define libc_hidden_proto(name, attrs...)   hidden_proto (name, ##attrs)
+
+ +

to:

+ +
+#define libc_hidden_proto(name, ...)    hidden_proto (name, ## __VA_ARGS__)
+
+ +

That is, change the parameter attrs... to ..., and change attrs in the replacement-list to __VA_ARGS__.

+ +

Note:

+

*1 As for variadic macro of GCC2 spec and GCC3 spec, see 3.9.1.6, 3.9.6.3 respectively.

+ +

3.9.8.4. Empty Argument During Macro Calls

+ +

The macro calls with any empty argument are found in as many as 488 source files. +They have greatly increased since the old version. +C99 approval of empty macro argument may have influenced the tendency.

+ +

In particular, math/bits/mathcalls.h has as many as 79 macro calls with empty argument. +That is the same with the old version.

+ +

3.9.8.5. Object-Like Macros Replaced with Function-like Macro Name

+ +

The following files have object-like macro definitions replaced to function-like macro names:

+ +

argp/argp-fmtstream.h, +hesiod/nss_hesiod/hesiod-proto.c, +intl/plural.c, +libio/iopopen.c, +nis/nss_nis/nis-hosts.c, +nss/nss_files/files-hosts.c, +nss/nss_files/files-network.c, +nss/nss_files/files-proto.c, +nss/nss_files/files-rpc.c, +nss/nss_files/files-service.c, +resolv/arpa/nameser_compat.h, +stdlib/gmp-impl.h, +string/strcoll_l.c, +sysdeps/unix/sysv/linux/clock_getres.c, +sysdeps/unix/sysv/linux/clock_gettime.c

+ +

elf/link.h has function-like macro definitions replaced to function-like macro names. For example,:

+ +
+#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
+                                        /* sysdeps/generic/ldsodefs.h:46    */
+#define _ElfW(e,w,t)    _ElfW_1 (e, w, _##t)            /* elf/link.h:32    */
+#define _ElfW_1(e,w,t)  e##w##t                         /* elf/link.h:33    */
+#define __ELF_NATIVE_CLASS __WORDSIZE               /* bits/elfclass.h:11   */
+#define __WORDSIZE 32           /* sysdeps/wordsize-32/bits/wordsize.h:19   */
+#define ELF32_ST_TYPE(val) ((val) & 0xf)                /* elf/elf.h:429    */
+
+ +

with the above macro definitions,

+ +
+    && ELFW(ST_TYPE) (sym->st_info) != STT_TLS      /* elf/do-lookup.h:81   */
+
+ +

in this macro call, ELFW(ST_TYPE) is expanded with the following steps:

+ +
+    ELFW(ST_TYPE)
+    _ElfW(ELF, __ELF_NATIVE_CLASS, ST_TYPE)
+    _ElfW_1(ELF, 32, _ST_TYPE)
+    ELF32_ST_TYPE
+
+ +

Then, ELF32_ST_TYPE with the subsequent sequence (sym->st_info) is expanded to ((sym->st_info) & 0xf). +That is to say, a function-like macro call of _ElfW_1(ELF, 32, _ST_TYPE) is expanded to name of another function-like macro ELF32_ST_TYPE.

+ +

These macros become more clear, if the 3 definitions of above 6 are written as:

+ +
+#define ELFW( type, val)        _ElfW( ELF, __ELF_NATIVE_CLASS, type, val)
+#define _ElfW( e, w, t, val)    _ElfW_1( e, w, _##t, val)
+#define _ElfW_1( e, w, t, val)  e##w##t( val)
+
+ +

and if they are used as:

+ +
+    && ELFW(ST_TYPE, sym->st_info) != STT_TLS
+
+ +

Although these arguments may seem to be a little redundant, these are more natural than the original ones, if we think of function call syntax.

+ +

3.9.8.6. Macros Expanded to 'defined'

+ +

The following files contain macro definitions whose replacement-lists have the 'defined' token. *1

+ +

iconv/skeleton.c, +sysdeps/generic/_G_config.h, +sysdeps/gnu/_G_config.h, +sysdeps/i386/dl-machine.h, +sysdeps/i386/i686/memset.S, +sysdeps/mach/hurd/_G_config.h, +sysdeps/posix/sysconf.c

+ +

Those macros are used in some #if lines of the following files, and also some of the above files themselves.

+ +

elf/dl-conflict.c, +elf/dl-runtime.c, +elf/dynamic-link.h

+ +

In glibc 2.1.3, malloc/malloc.c had a macro definition of HAVE_MREMAP whose replacement-list contained the 'defined' token. +In glibc 2.4, that macro definition has been revised to portable one, nevertheless the unportable macros of the same sort have increased in other source files.

+

In a #if expression, the result of a macro expansion whose replacement-list has the 'defined' token is undefined according to the Standards, and it is only self-satisfaction of GCC to preprocess the expression plausibly and arbitrarily. +In order to make these sources portable among other preprocessors, at least the definitions of these macros should be rewritten, and in some cases the calls of the macros should be rewritten, too. *2

+

In most cases, the simple rewriting is sufficient as seen in 3.9.4.6. +In some cases, however, this method does not work. +Those are the cases where evaluation result of 'defined MACRO' differs depending on its timing. +For example, sysdeps/i386/dl-machine.h has the following macro definition, which is used in some #if expressions on other files.

+ +
+#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
+
+ +

Rewriting the definition as follows will not do.

+ +
+#if defined RTLD_BOOTSTRAP
+#define ELF_MACHINE_NO_RELA 1
+#endif
+
+ +

The macro RTLD_BOOTSTRAP is defined in elf/rtld.c, if and only that file is included before dl-machine.h. +In other words, the evaluation result of 'defined RTLD_BOOTSTRAP' depends on the order of including the two files. +In order to rewrite these sources portable, the macro ELF_MACHINE_NO_RELA should be abandoned since it is useless macro found only in #if lines, and the #if line:

+ +
+#if ELF_MACHINE_NO_RELA
+
+ +

should be rewritten as:

+ +
+#if defined RTLD_BOOTSTRAP
+
+ +

In glibc, this portable style of #if lines are found on many places, at the same time, the undefined style as above example are also found on some places. + +

Note:

+

*1 On Linux, /usr/include/_G_config.h is the header file installed from glibc's sysdeps/gnu/_G_config.h, therefore it has the same macro definition as:

+
+#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
+
+

This should be rewritten to:

+
+#if defined (_STATBUF_ST_BLKSIZE)
+#define _G_HAVE_ST_BLKSIZE 1
+#endif
+
+

*2 mcpp V.2.7 and later in STD mode on GCC-specific-build handles 'defined' token generated by macro expansion in #if line like GCC. +Yet, such a bug-to-bug handling should not be depended on.

+ +

3.9.8.7. Preprocessing .S File

+ +

*.S files are provided for each CPU type, so their number is very large and amounts to more than 1000. +The files for one CPU type as x86 are some portion of them.

+

*.S file is an assembler source with inserted preprocessing directives such as #if or #include, comments or macros of C. +Since assembler source is not consisted of C token sequence, it accompanies some risks to preprocess it by C preprocessor. +To process an assembler source, the preprocessor must pass such characters as % or $ (which are not used in C except in string literal or in character constant) as they are, and retain existence or non-existence of spaces as they are. +Furthermore, the preprocessor must relax syntax checking to pass a sequence which would be an error if it was in C source. +On the other hand, it must process #if lines or macros like C, and must do some sort of error checking, too. +What a nuisance! +These specifications have not any logical basis at all, these are GCC's local and mostly undocumented behaviors and no more.

+ +

To illustrate the problems, let me take an example of the following fragment from nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S.

+ +
+    .byte   8               # Return address register
+                            # column.
+#ifdef SHARED
+    .uleb128 7              # Augmentation value length.
+    .byte   0x9b            # Personality: DW_EH_PE_pcrel
+                            # + DW_EH_PE_sdata4
+
+ +

'#ifdef SHARED' intends to be a directive of C. +On the other hand, the latter part of each line starting with # are supposed to be comments. +'# column.' is, however, syntactically indistinguishable from invalid directive, since the # is the first non-white-space-character of the line. +'# + DW_EH_PE_sdata4' causes even syntax error in C.
+Another file has the following line, where a single character appears singly. +In C, a pair of the single quote is used to quote a character constant, and unmatched single quote causes a tokenization error.

+ +
+    movl 12(%esp), %eax     # that `fixup' takes its parameters in regs.
+
+ +

The above pthread_cond_wait.S also has the following line which is a macro call.

+ +
+versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+          GLIBC_2_3_2)
+
+ +

The macros are defined as:

+ +
+# define versioned_symbol(lib, local, symbol, version) \
+  versioned_symbol_1 (local, symbol, VERSION_##lib##_##version)
+                                    /* include/shlib-compat.h:65    */
+# define versioned_symbol_1(local, symbol, name) \
+  default_symbol_version (local, symbol, name)
+                                    /* include/shlib-compat.h:67    */
+# define default_symbol_version(real, name, version) \
+     _default_symbol_version(real, name, version)
+                                    /* include/libc-symbols.h:398   */
+#   define _default_symbol_version(real, name, version) \
+     .symver real, name##@##@##version
+                                    /* include/libc-symbols.h:411   */
+#define VERSION_libpthread_GLIBC_2_3_2  GLIBC_2.3.2
+                            /* Created by make: abi-versions.h:145  */
+
+ +

The line is expected to be expanded as:

+ +
+.symver __pthread_cond_wait, pthread_cond_wait@@GLIBC_2.3.2
+
+ +

The problem is the definition of _default_symbol_version. +There is no C token containing '@' (except string-literal or character-constant). +Though pthread_cond_wait@@GLIBC_2.3.2 is a sequence generated by concatenating some parts with ## operator, this is not a C token. +The concatenation generates illegal tokens also in midst of its processing. +The macro uses ## operator of C, nevertheless its syntax is far from C.

+

In order to do a sort of preprocessing on an assembler source, essentially an assembler macro processor should be used. +To process assembler codes with C, it is recommended that the asm() or __asm__() function should be used whenever possible, to embed the assembler code in a string literal, and that not *.S but *.c should be used as a file name.
+libc-symbols.h has another version of the above macro as follows which is used for *.c. +This macro can be processed by Standard-conforming C preprocessor without problem.

+ +
+#   define _default_symbol_version(real, name, version) \
+     __asm__ (".symver " #real "," #name "@@" #version)
+
+ +

glibc also has many *.c or *.h files which use asm() or __asm()__. +Nevertheless, it has much more *.S files.

+

If you process an assembler source by C preprocessor in any way, at least you should use /* */ or // as comment notation instead of #. +In actual, many sources of glibc use /* */ or //, whereas some sources use #.

+

Having said so, mcpp V.2.6.3 onward relaxed grammar checking largely in lang-asm mode to process these unusual sources, considering that glibc 2.4 has too many *.S files and out-of-C-grammar-sources has increased since 2.1.3.

+ +

3.9.8.8. Problems of versions.awk, rpcgen and -dM Option

+ +

The problem of stdlib/isomac.c which I referred to at 3.9.4.8 is the same in glibc 2.4.

+

Also the problem of rpcgen is unchanged.

+

In addition, glibc 2.4 has scripts/versions.awk file, which presupposes GCC's peculiar behavior about the number of line top spaces of preprocessed output. +In order to use mcpp or other preprocessors, this file should be revised as follows.

+ +
+$ diff -c versions.awk*
+*** versions.awk        2006-12-13 00:59:56.000000000 +0900
+--- versions.awk.orig   2005-03-23 10:46:29.000000000 +0900
+***************
+*** 50,56 ****
+  }
+
+  # This matches the beginning of a new version for the current library.
+! /^ *[A-Z]/ {
+    if (renamed[actlib "::" $1])
+      actver = renamed[actlib "::" $1];
+    else if (!versions[actlib "::" $1] && $1 != "GLIBC_PRIVATE") {
+--- 50,56 ----
+  }
+
+  # This matches the beginning of a new version for the current library.
+! /^  [A-Za-z_]/ {
+    if (renamed[actlib "::" $1])
+      actver = renamed[actlib "::" $1];
+    else if (!versions[actlib "::" $1] && $1 != "GLIBC_PRIVATE") {
+***************
+*** 65,71 ****
+  # This matches lines with names to be added to the current version in the
+  # current library.  This is the only place where we print something to
+  # the intermediate file.
+! /^ *[a-z_]/ {
+    sortver=actver
+    # Ensure GLIBC_ versions come always first
+    sub(/^GLIBC_/," GLIBC_",sortver)
+--- 65,71 ----
+  # This matches lines with names to be added to the current version in the
+  # current library.  This is the only place where we print something to
+  # the intermediate file.
+! /^   / {
+    sortver=actver
+    # Ensure GLIBC_ versions come always first
+    sub(/^GLIBC_/," GLIBC_",sortver)
+
+ +

3.9.8.9. -include, -isystem, -I- Options

+ +

-isystem and -I- options are no longer used.

+

On the other hand, -include option is used extremely frequently. +A header file include/libc-symbols.h is included by this option as many as 7000 times. +This -include is an option to push out a #include line from source to makefile. +It makes source incomplete, and is not recommendable.

+ +

3.9.8.10. Undocumented Predefined Macros

+ +

This is not a problem of glibc but of GCC. +While a few important predefined macros were undocumented in GCC 2, they got documented in GCC 3. +On the other hand, GCC 3.3 and later predefines many macros, and most of them are undocumented.

+ +

3.9.8.11. Other Problems

+ +

debug/tst-chk1.c has a queer part which is not processed as its intension by other preprocessor than GCC, unless revised as follows.

+ +
+$ diff -cw tst-chk1.c*
+*** tst-chk1.c  2007-01-11 00:31:45.000000000 +0900
+--- tst-chk1.c.orig     2005-08-23 00:12:34.000000000 +0900
+***************
+*** 113,119 ****
+  static int
+  do_test (void)
+  {
+-   int   arg;
+    struct sigaction sa;
+    sa.sa_handler = handler;
+    sa.sa_flags = 0;
+--- 113,118 ----
+***************
+*** 135,146 ****
+    struct A { char buf1[9]; char buf2[1]; } a;
+    struct wA { wchar_t buf1[9]; wchar_t buf2[1]; } wa;
+
+  #ifdef __USE_FORTIFY_LEVEL
+!   arg = (int) __USE_FORTIFY_LEVEL;
+  #else
+!   arg = 0;
+  #endif
+!   printf ("Test checking routines at fortify level %d\n", arg);
+
+    /* These ops can be done without runtime checking of object size.  */
+    memcpy (buf, "abcdefghij", 10);
+--- 134,146 ----
+    struct A { char buf1[9]; char buf2[1]; } a;
+    struct wA { wchar_t buf1[9]; wchar_t buf2[1]; } wa;
+
++   printf ("Test checking routines at fortify level %d\n",
+  #ifdef __USE_FORTIFY_LEVEL
+!         (int) __USE_FORTIFY_LEVEL
+  #else
+!         0
+  #endif
+!         );
+
+    /* These ops can be done without runtime checking of object size.  */
+    memcpy (buf, "abcdefghij", 10);
+
+ +

Contrary to its innocent looking, the original source defines printf() as a macro, and as its consequence, #ifdef and other directive-like lines are usually eaten as an argument of the macro call. +According to the Standards, the result is undefined when there is a line in an argument of a macro which would otherwise act as a directive. +Since directive processing and macro expansion should be done in the same translation phase, it is an arbitrariness of GCC to process directive first. +In the first place, processing of #ifdef __USE_FORTIFY_LEVEL line also contains macro processing, therefore it is extremely arbitrary to process this line and the other directive-like lines first then expand printf() macro. +C preprocessing should be done sequentially from the top.

+

The configure script of glibc also has a portion to use GCC's peculiar help message. +The script searches help message of compiler for "-z relro" option. +If you use mcpp as a preprocessor, this portion does not yield the expected result. +In spite of this problem, fortunately, compiling and test of glibc is done normally.

+

By the way, while GCC up to 3.2 appended many useless -A options by default on its invocation, GCC 3.3 onward ceased to do it.

+ +

3.9.8.12. Increasing Dependency on GCC

+ +

Most of the portability problems I had found in glibc 2.1.3 have not been cleared in glibc 2.4 the six years newer version. +On the contrary, number of sources lacking portability has increased.

+

There have been a few improvements such as disappearance of multi-line-string-literal, -isystem, -I- options and -A options on GCC side.

+

Meanwhile, sources with such unportable features have largely increased as #include_next, variadic macro of GCC2 spec, its call without variable argument, macro definition with 'defined' token in its replacement-list, *.S file and -include option. +Macro calls with an empty argument have also increased. +Above all it is most annoying that the writings which do not correspond to Standard C one-to-one, and hence cannot be easily converted to portable one, have increased.

+

All of these are problems of dependency on GCC's local specification and undocumented behavior. +In a large scale software as glibc, once such unportable sources are created, it becomes difficult to revise them because many source files are interrelated. +As a consequence, the same writings tend to be inherited for years, and even new sources are written so as to suit the old interfaces. +For example, it shows this relationship directly that only the variadic macros of GCC2 spec are used, and neither of C99 spec nor GCC3 spec are not used at all. +Besides, even if some unportable parts in a few sources are revised, at the same time the old unportable codings often appear newly in other sources. +The old style writings are not easily cleared.

+

On the other hand, change of GCC behavior breaks many sources, and the possible influence becomes greater with time, therefore GCC becomes difficult to change its behavior. +I think that both of GCC and glibc need to tidy up their old local specifications and old interfaces drastically in the near future.

+ +

3.9.9. The Problems of Linux / stddef.h, limits.h and #include_next

+

On Linux, the system compiler is GCC, and the standard library is glibc. +In these circumstances, there are some system headers which presuppose only GCC. +Those are the obstacles to use other compiling tools than GCC such as mcpp of compiler-independent-build. +For example, stddef.h and some other Standard header files are located only in GCC's version specific include directory, and are not found in /usr/include. +These are rude deficiencies of the system header structure, and mcpp needs some workarounds for them.

+

On Linux, GCC installs a version specific include directory such as /usr/lib/gcc-lib/SYSTEM/VERSION/include where the Standard headers stddef.h, limits.h and some others are located. These headers and GCC behavior on them are queer. The problems are the same on CygWIN as on Linux. Mac OS X also has a few problems on some Standard headers.

+ +

3.9.9.1. /usr/include Lacks Standard Headers

+

In the first place, on Linux, five of the Standard C header files float.h, iso646.h, stdarg.h, stdbool.h, stddef.h are located only in the GCC version specific directory, not in /usr/include nor /usr/local/include. The system headers on Linux seem to more or less intend that compiler systems other than GCC use only /usr/include and GCC uses its version specific directory in addition to /usr/include. In fact, /usr/include lacks some Standard headers, that is the problem for non-GCC compilers or preprocessors.

+

If non-GCC preprocessor uses also GCC version specific directory, then on limits.h in this directory, the preprocessor encounters #include_next which is a GCC specific directive. If that is the case, why doesn't the preprocessor implement #include_next? Then, the limits.h causes a problem, because it is not cleanly written. What is worse, GCC V.3.3 or later predefines practically by itself the macros to be defined by limits.h, hence the header is useless for other preprocessors.

+

Besides, as for GCC itself, it shows queer behavior with #include_next in this header.

+

Although these problems are complicated to explain, I will describe them here, because they have been neglected for years for some reason.

+

Note that only mcpp of compiler-independent-build suffers this problem. +GCC-specific-build is not affected. + +

3.9.9.2. Queer Handling of #include_next

+

The include directories for GCC are typically set as:

+
+/usr/local/include
+/usr/lib/gcc-lib/SYSTEM/VERSION/include
+/usr/include
+
+

These are searched from upper to lower. The second is the GCC specific include directory. SYSTEM is i386-vine-linux, i368-redhat-linux or such, VERSION is 3.3.2, 3.4.3 or such. If you install another version of GCC into /usr/local, the /usr/lib/gcc-lib part above will become /usr/local/lib/gcc. In C++, some other directories are set with higher priority than /usr/local/include. For GCC V.3.* and 4.*, those are:

+
+/usr/include/c++/VERSION
+/usr/include/c++/VERSION/SYSTEM
+/usr/include/c++/VERSION/backward
+
+

The name of these directories seem GCC specific, nevertheless no other C++ standard directories do not exist, so the other preprocessors can use no directories but these. For GCC 2.95, the include directory in C++ was:

+
+/usr/include/g++-3
+
+

In addition, the directories specified by -I option or by environment variables are prepended to the list.

+

Let me take an example of limits.h in C on GCC V.3.3 or later focusing on definition of LONG_MAX, in order to make the explanations below simple. There are two limits.h: one in /usr/include and another in the version specific directory.

+
+#include <limits.h>
+
+

By this line, GCC includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h. This header file starts as:

+
+#ifndef _GCC_LIMITS_H_
+#define _GCC_LIMITS_H_
+#ifndef _LIBC_LIMITS_H_
+#include "syslimits.h"
+#endif
+
+

Then, GCC includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h which is a short file as:

+
+#define _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#undef _GCC_NEXT_LIMITS_H
+
+

Now, limits.h is included again. Which limits.h? Since this directive is #include_next, it would skip the /usr/lib/gcc-lib/SYSTEM/VERSION/include, and would search /usr/include. GCC's cpp.info says:

+
+

This directive works like `#include' except in searching for the specified file: it starts searching the list of header file directories _after_ the directory in which the current file was found.

+
+

In fact, however, GCC does not include /usr/include/limits.h, but includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h again somehow.
+This time _GCC_LIMITS_H_ has been defined already, so the block beginning with the line:

+
+#ifndef _GCC_LIMITS_H_
+
+

is skipped, and the next block is evaluated:

+
+#else
+#ifdef _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#endif
+#endif
+
+

Again, just the same #include_next <limits.h> which were found in /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h. Does GCC include /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h again as the previous time, which is the current file, and run into infinite recursion? No, it does not, but it includes /usr/include/limits.h this time. The behavior of GCC is beyond my understanding.

+

In /usr/include/limits.h, <features.h> and some other headers are included. Also, /usr/include/limits.h has a block beginning with the line:

+
+#if !defined __GNUC__ || __GNUC__ < 2
+
+

In this block, <bits/wordsize.h> is included, and the Standard required macros are defined depending whether wordsize is 32 bit or 64 bit. For example, if wordsize is 32 bit, LONG_MAX is defined as:

+
+#define LONG_MAX     2147483647L
+
+

Of course, GCC skips this block. Then, going to the end of this file, it returns to /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h. Then, ending this file of the second inclusion, it returns to /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h. Then, this file ends too, and GCC returns to the first inclusion of /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h. In this file, after the above cited part, there are definitions of the Standard required macros. For instance, LONG_MAX is defined as:

+
+#undef LONG_MAX
+#define LONG_MAX __LONG_MAX__
+
+

Then, the file ends.

+
+#include <limits.h>
+
+

The processing of this line has ended. After all, LONG_MAX is defined to __LONG_MAX__ and it is the end. What is __LONG_MAX__? As a matter of fact, GCC V.3.3 or later predefines many macros including __LONG_MAX__ which is predefined to 2147483647L for 32 bit system. As with the other Standard required macros, the situations are almost the same as LONG_MAX, because they are defined using the predefined ones. If so, what is the purpose of these complicated header files and #include_next handling at all?

+

The behavior of GCC V.2.95, V.3.2, V.3.4, V.4.0 and V.4.1 on #include_next is the same as V.3.3. That is to say:

+
+#include_next <limits.h>
+
+

by this line in /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h, GCC includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h, and by the same line in this file:

+
+#include_next <limits.h>
+
+

it includes /usr/include/limits.h. As a result, in processing the line:

+
+#include <limits.h>
+
+

/usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h is included twice. This duplicate inclusion happens to produce the same result, nevertheless it is redundant, and first of all, the behavior differs from the specification and is not consistent. In addition, this part of the file is redundant if the behavior accords to the specification.

+
+#else
+#ifdef _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#endif
+
+

3.9.9.3. Standard Headers not Available for Preprocessors other than GCC

+

Now, what happens to compiler or preprocessor other than GCC using Linux standard headers? stddef.h and some other Standard headers are not found in /usr/include nor /usr/local/include. If so, how about using also GCC version specific directory?

+
+#include <limits.h>
+
+

By this line, the preprocessor includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h, and from this file it includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h, and in this file, it sees the line:

+
+#include_next <limits.h>
+
+

Then, how about implementing #include_next? If the #include_next is implemented as its specification, the preprocessor searches by this line the "next" include directory /usr/include, and includes /usr/include/limits.h. Then, this non-GCC preprocessor processes the block beginning with this line:

+
+#if !defined __GNUC__ || __GNUC__ < 2
+
+

In this block it defines LONG_MAX as:

+
+#define LONG_MAX     2147483647L
+
+

and defines also the other macros appropriately. Then, it ends this file, and returns to /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h. Then, it ends this file, and returns to /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h. And it encounters these lines:

+
+#undef LONG_MAX
+#define LONG_MAX __LONG_MAX__
+
+

At the end of the long run, all the correct definitions are canceled, and they become the undefined name __LONG_MAX__ or such!

+

Up to GCC V.3.2, the corresponding part of version specific limits.h had the lines like:

+
+#define __LONG_MAX__ 2147483647L
+
+

Hence, the canceled macros are redefined correctly. Although the most part of the processing is useless, the results were correct. With the header files of V.3.3 or later, a non-GCC preprocessor is taken around here and there to get vain results.

+ +

3.9.9.4. Workarounds for the Present

+

The problems are summarized as below: *1, *2, *3, *4

+
    +
  1. /usr/include lacks Standard C headers float.h, iso646.h, stdarg.h, stdbool.h and stddef.h which are necessary to make Linux system headers usable to non-GCC compiler system.
    +
  2. C++ include directories do not exist other than /usr/include/c++/VERSION/*. In order to make C++ standard include directories independent on GCC version, /usr/include/c++ should be used instead of /usr/include/c++/VERSION which should be limited to GCC specific headers. +Though, having said that, this is a difficult task, since the C++ standard library is libstdc++ distributed with GCC on all of FreeBSD, Linux and Mac OS X.
    +
  3. The behavior of GCC on #include_next differs from its specification and is inconsistent.
    +
  4. It is meaningless to process the complicated limits.h headers, since GCC predefines the Standard required macros by itself in effect. It is doubly meaningless, since /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h does #undef all. As far as Linux and CygWIN are concerned, there seems to be no necessity for splitting limits.h to two. Since these headers in this directory are auto-generated ones by GCC installation, some redundancies are inevitable. Yet, these are too dirty to install as system headers.
    +
+

Under these problems lies the excessively complicated system header structure. The extension directive #include_next enhances the complication. The use of this directive is very limited. Though GCC and glibc use it in compiling and installing of themselves, it does not exist in the installed system headers except for limits.h. The rare example in limits.h causes GCC above mentioned confusion. This presents a question on the reason of its existence.

+

Anyway, the compiler-independent-build of mcpp needs the following workarounds for the present. In order to avoid confusion, the compiler-independent-build does not implement #include_next nor uses GCC specific include directories.

+
    +
  1. Link /usr/include/stddef.h to /usr/lib/gcc-lib/SYSTEM/VERSION/include/stddef.h. In case of multiple versions of GCC have been installed, a link to any of them will work for mere preprocessing. This setting does no harm on GCC nor GCC-specific-build of mcpp. The same can be said about stdarg.h, though it expands macros to GCC built-in functions.
    +
  2. Copy or move iso646.h and stdbool.h from one of the GCC specific directories to /usr/include, since these are quite simple headers and independent on any system. As for limits.h, the existing /usr/include/limits.h is enough for non-GCC preprocessor.
    +
  3. float.h is useless for other preprocessor, such as DBL_MAX_EXP is defined to __DBL_MAX_EXP__. If required, you must write the header referring to the internal setting of GCC or some other source. *5
    +
  4. Do not set GCC specific include directory in C include directories list by environment variable.
    +
  5. Set C++ include directories by environment variable CPLUS_INCLUDE as /usr/include/c++/VERSION:/usr/include/c++/VERSION/SYSTEM:/usr/include/c++/VERSION/backward.
    +
+

For the GCC-specific-build of mcpp, no special setting is required, because it has GCC specific include directories list, implements #include_next as its specification, and predefines the macros as GCC does.

+

Note:

+

*1 I have checked the descriptions of this 3.9.9 section on Linux / GCC 2.95.3, 3.2, 3.3.2, 3.4.3, 4.0.2, 4.1.1, 4.3.0 and on CygWIN / GCC 2.95.3, 3.4.4. As with CygWIN, the behavior on #include_next was as its specification on GCC 2.95.3, but on 3.4.4 it changed to the same behavior as Linux. The C++ include directories in CygWIN was /usr/include/g++-3 on 2.95.3, while they are /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++ and its sub-directories on 3.4.4.

+

*2 On FreeBSD 6.2 or 6.3 and its bundled GCC 3.4.6, all the Standard C headers are present in /usr/include, #include_next is not used in any system headers, and GCC specific C include directory does not exist. However, C++ include directories are GCC version dependent as /usr/include/c++/3.4, /usr/include/c++/3.4/backward.
+Even on FreeBSD, an installation of another version of GCC makes GCC-version-specific include directory. Most of the headers in the directory are redundant. However, the headers in /usr/include remain unchanged.

+

*3 On Mac OS X Leopard / Apple-GCC 4.0.1, as on Linux, there is a GCC-version-specific include directory, #include_next is used in limits.h and a few other headers, also two limits.h are found. +However, #include_next in syslimits.h has been deleted by Apple. +float.h, iso646.h, stdarg.h, stdbool.h, stddef.h are all found in /usr/include, hence so much special settings are not necessary for mcpp. +But, float.h, stdarg.h are only for GCC and Metrowerks (for powerpc), so if you use them with mcpp, you must rewrite float.h yourself and make stdarg.h to include GCC-version-specific one. +Note that some definitions in float.h are different between x86 and powerpc.

+

*4 On MinGW / GCC 3.4.*, though the include directories and their precedence differ from the other systems, the behavior of GCC on #include_next is the same, and also some Standard headers are not in the standard include directory /mingw/include but in its version-specific-directory.

+

*5 float.h for i386 system can be written as follows referring to GCC's setting:

+
+/* float.h  */
+
+#ifndef _FLOAT_H___
+#define _FLOAT_H___
+
+#define FLT_ROUNDS      1
+#define FLT_RADIX       2
+
+#define FLT_MANT_DIG    24
+#define DBL_MANT_DIG    53
+#define LDBL_MANT_DIG   64
+
+#define FLT_DIG         6
+#define DBL_DIG         15
+#define LDBL_DIG        18
+
+#define FLT_MIN_EXP     (-125)
+#define DBL_MIN_EXP     (-1021)
+#define LDBL_MIN_EXP    (-16381)
+
+#define FLT_MIN_10_EXP  (-37)
+#define DBL_MIN_10_EXP  (-307)
+#define LDBL_MIN_10_EXP (-4931)
+
+#define FLT_MAX_EXP     128
+#define DBL_MAX_EXP     1024
+#define LDBL_MAX_EXP    16384
+
+#define FLT_MAX_10_EXP  38
+#define DBL_MAX_10_EXP  308
+#define LDBL_MAX_10_EXP 4932
+
+#define FLT_MAX         3.40282347e+38F
+#define DBL_MAX         1.7976931348623157e+308
+#define LDBL_MAX        1.18973149535723176502e+4932L
+
+#define FLT_EPSILON     1.19209290e-7F
+#define DBL_EPSILON     2.2204460492503131e-16
+#define LDBL_EPSILON    1.08420217248550443401e-19L
+
+#define FLT_MIN         1.17549435e-38F
+#define DBL_MIN         2.2250738585072014e-308
+#define LDBL_MIN        3.36210314311209350626e-4932L
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define FLT_EVAL_METHOD 2
+#define DECIMAL_DIG     21
+#endif /* C99 */
+
+#endif /* _FLOAT_H___ */
+
+
+ +

3.9.10. Problems of Mac OS X / Apple-GCC and its System Headers

+

On V.2.7, mcpp began to support Max OS X / GCC. +This section describes the problems of the system found by mcpp. +The author, however, does not know the system so much yet. +He has only compiled mcpp itself and firefox on the system. +He knows nothing about Objective C nor Objective C++.

+

Since GCC is practically the only compiler on this system now, some dependencies on GCC-local specs are found in some of its system headers. +Such dependencies are not so much as Linux, maybe because its standard library is not glibc. +But, they are not so few as FreeBSD. +Some tidy-ups are desirable.

+

Another characteristic of this system is that the system compiler is a GCC largely modified and extended by Apple. +In the system headers and some sources of Apple on Max OS X, dependencies on Apple-GCC-local specs are more conspicuous than those on general-GCC-local specs. +In particular, the extended specs to support both of Intel-Mac and PowerPC-Mac on a machine are the most characteristic.

+

Here, we refer to the system of Mac OS X Leopard / Apple-GCC 4.0.1.

+ +

3.9.10.1. #include_next, #warning

+

The GCC-local directive #include_next are not many, but found in float.h, stdarg.h, varargs.h in /usr/include/ and the files of the same name in /Developer/SDKs/MacOSX10.*.sdk/usr/include/. +All of them are to include different real header files depending on whether the compiler is GCC or Metrowerks. +When the compiler is GCC, stdarg.h, for example, does '#include_next <stdarg.h>'.
+The limits.h in GCC-version-specific include directory has #include_next as Linux, but the one in syslimits.h has been removed and a bit tidied up.

+

Though this directive is used modestly, it is a problem that float.h, stdarg.h presuppose only GCC and Metrowerks. +Those can be written more portable as on FreeBSD. *1
+In addition, #include_next for GCC on a header in /usr/include is a nonsense, because the priority of that include directory is lower than GCC-version-specific one. +Consequently this #include_next is never executed.

+

Another GCC-local directive #warning is sometimes found in objc/, wx-2.8/wx/ and a few other directories in /usr/include/, and their corresponding directories in /Developer/SDKs/MacOSX*.sdk/usr/include/. +Most of the directives are warnings against obsolete or deprecated files or usages.
+backward_warning.h in /usr/include/c++/VERSION/backward/ and its corresponding file in /Developer/SDKs/MacOSX*.sdk/ are to execute #warning against these deprecated headers. +And all the headers in the directories include this header. +This is the same with Linux or FreeBSD.

+

Note:

+

*1 About how to use these headers with compiler-independent-build of mcpp, refer 3.9.9.4 and its note 3.

+ +

3.9.10.2. A Macro Expanded to 'defined'

+

/usr/include/sys/cdefs.h and its corresponding file of the same name in /Developer/SDKs/MacOSX*.sdk/ have a macro definition as:

+
+#define __DARWIN_NO_LONG_LONG   (defined(__STRICT_ANSI__) \
+                && (__STDC_VERSION__-0 < 199901L) \
+                && !defined(__GNUG__))
+
+

And it is used in stdlib.h and a few others as: +

+#if __DARWIN_NO_LONG_LONG
+
+

This macro should be defined as: *1

+
+#if     defined(__STRICT_ANSI__) \
+                && (__STDC_VERSION__-0 < 199901L) \
+                && !defined(__GNUG__)
+#define __DARWIN_NO_LONG_LONG   1
+#endif
+
+

Note:

+

*1 As for its reason, see 3.9.4.6 and 3.9.8.6.

+ +

3.9.10.3. Tokens in #endif line

+

gssapi.h, krb5.h, profile.h in /System/Library/Frameworks/Kerberos.framework/Headers have queer #endif lines like:

+
+#endif \* __KERBEROS5__ */
+
+

This \* __KERBEROS5__ */ seems to intend to be a comment. +I cannot understand why they must invent such a writing. +Though GCC usually warns at it, Apple-GCC does not issue any warning even if -pedantic or any other options are specified. +Apple-GCC does not warn at the following case, too. +It still trails a sense of pre-C90.

+
+#endif __KERBEROS5__
+
+ +

3.9.10.4. Some Special Usages of Macro

+

As far as a compilation of firefox 3.0b3pre source is concerned, any of the following special usages of macro, which are frequently found in glibc sources and Linux system headers, is not found in the Mac OS X system headers included from the firefox source.

+
    +
  • GCC-specific variable argument macro.
    +While a few variadics of C99-spec are found, no GCC-specific one is found. +
  • Empty argument of macro call. +
  • Object-like macro replaced with a function-like macro name. +
+ +

3.9.10.5. Apple-GCC's Peculiar Specifications

+

Apple-GCC has some peculiar specifications different from the general GCC.

+
    +
  • Specs to generate binaries for both of Intel-Mac and PowerPC-Mac on either machine

    +

    Mac OS X has a pair of compilers for x86 and ppc. +(One is a native compiler, and other is a cross compiler.) +This pair of Apple-GCCs have their own option -arch. +If you specify multiple CPUs as '-arch i386 -arch ppc', gcc will be repeatedly invoked, binaries for the specified CPUs will be generated, and a "universal binary" which bundles all the binaries will be created. +Also they have another peculiar option -mmacosx-version-min=. +You can use this option along with -isysroot or --sysroot option, and widen the range of compatibility of the binary to the older versions of Mac OS X to some extent. +These specs are convenient to make a binary package for Mac OS X.

    +

    As for preprocessing, you should remember that some predefined macros differ depending on the CPU specified.

    +
  • "framework" directories

    +

    Mac OS X has "framework" directories inherited from NeXTstep. +Framework is a hierarchical directory that contains shared resources such as header files, library, documents, and some other resources. +To include a header file in these directories, such a directive is used as:

    +

    +
    +#include <Kerberos/Kerberos.h>
    +
    +

    This format is the same with:

    +
    +#include <sys/stat.h>
    +
    +

    However, these two have quite different meanings. +While the latter includes the file sys/stat.h in some include directory (in this case /usr/include), <Kerberos/Kerberos.h> is not a path-list, and Kerberos is not even a directory name. +This is a file Kerberos.framework/Headers/Kerberos.h in a framework directory /System/Library/Frameworks. +And in actual, Kerberos.framework/Headers is a symbolic-link to Kerberos.framework/Versions/Current/Headers. +This is the most simple case of framework header file location. +There are many other far more complex cases.

    +

    Who has invented such a complex system? +This system burdens a preprocessor, because it needs to search system headers in framework directories repeatedly building and rebuilding path-list. +Some headers further include many other headers.

    +
  • "header map" file

    +

    Xcode.app is an IDE on Max OS X. +It uses "header map" file, which is a list of include files. +One of the tools of Xcode checks source files, searches the files to be included, and records the path-list of the files into a file named *.hmap, and Apple-GCC refers to it instead of include directories. +This is an extended feature of Apple-GCC.

    +

    Header map file is a device to lessen burdens of header file searching. +However, it is a binary file of a peculiar specification and lacks transparency. +In order to lessen heavy burdens of framework header searching, it is more desired to reorganize the framework system.

    +
  • Tokens in #endif line

    +

    As shown in the previous section, Apple-GCC does not issue even a warning whatever junks are on a #endif line, regardless of whatever options specified. +It is quite an anachronism.

    +
  • Non-ASCII characters in comments

    +

    This is not a problem of GCC, but a problem of system headers in framework directory. +In many headers, some non-ASCII characters are frequently found in comments, such as the copyright mark (0xA9) and others of ISO-8859-* (?). +They are nuisances on an environment of multibyte characters, even if in comments. +A little bit of character encoding consciousness is desired. +Though the characters of this kind are sometimes found also in /usr/include of Linux, they are far more often found in framework headers of Mac OS.

+ +

3.9.11. Preprocessing firefox 3.0b3pre

+

I compiled source of firefox developing version 3.0b3pre (January, 2008), or 3.0-beta3-prerelease, by GCC replacing its preprocessor with mcpp V.2.7 on Linux/x86 + GCC 4.1.2 and Mac OS X + GCC 4.0.1. +mcpp were executed with -Kv option passing its output to cc1 (cc1plus). +As its results, the compilations successfully completed, and the firefox binaries were generated. *1

+

The preprocessing portability of firefox source on the whole is rather high. +The dependencies on GCC-local specifications, such as frequently found in glibc sources, are not found so many. +It is portable enough to officially support both of GCC on Linux, Mac OS X and Visual C++ on Windows.

+

Preprocessing portability of a source is, however, not necessarily sufficient, even if GCC and Visual C pass it. +In the sections below, I will check some problems, sometimes comparing them with glibc sources. +I omit explanations on GCC's problems here to avoid duplication. +For GCC's problems, refer to 3.9.4, 3.9.8 +, which also comment on glibc sources. *2

+

Note:

+

*1 I checked out the sources from CVS repository of mozilla.org. +One of the motivations to compile firefox source was to test -K option of mcpp. +This option was proposed by Taras Glek, and he was working on refactoring of C/C++ source at mozilla.com. +So, I also used firefox source to test -K option and other behaviors of mcpp. +About -K (-Kv) option, refer to 2.4.

+

*2 There is a list of coding-guidelines for firefox as below. +But, its content is too old.
+portable-cpp

+ +

3.9.11.1. GCC-local specifications are rarely used

+

The following GCC-local-specs, which are sometimes used in glibc sources, are not used in firefox sources. +Though compiling firefox on Linux includes system headers, and some of which contain such as GCC2-spec variadic macros, they are not firefox sources themselves.

+
    +
  • GCC-local variadic macro
    +Even C99 spec variadic macro is not yet used, too. +
+

The following features are not used even in recent glibc, and not used in firefox at all.

+
    +
  • Multi-line string-literal +
  • #warning +
  • -isystem, -I- options +
+ +

3.9.11.2. #include_next

+

However, a lot of #include_next are found only in one directory: config/system_wrappers/, which is generated by configure. +All of the 900 files generated in the directory are short header files of the same pattern. +For example, stdio.h is:

+
+#pragma GCC system_header
+#pragma GCC visibility push(default)
+#include_next <stdio.h>
+#pragma GCC visibility pop
+
+

This is a code to utilize '#pragma GCC visibility *' directive implemented in GCC 4.*. +At the same time, there is a file 'config/gcc_hidden.h' as below. +The file is specified by -include option for most of the translation units, and read in at the start of the units.

+
+#pragma GCC visibility push(hidden)
+
+

system_wrappers directory should be the include directory with the highest priority, so you should specify it as a first argument of -I option. +In spite of such a constraint, this usage of #include_next is simple and seems to has no problem.

+

On the other hand, for many sources in nsprpub directory, '-fvisibility=hidden' option is used instead of '-include gcc_hidden.h', and the headers in system_wrappers are not used. +This nsprpub directory seems still to be reorganized.

+ +

3.9.11.3. Using C99 specs without specifying C99

+

Many sources use C99 specifications without specifying C99. +GCC use "gnu89" spec by default on *.c source, which is a compromising spec of C90 plus some of C99 specs and GCC-local specs. +Some of firefox sources use the following C99 specs implicitly, depending on GCC's default behavior.

+
    +
  • Empty argument in macro call

    +

    Though empty argument in macro call is rare in firefox, these 3 files have it. +The actual macro called with any empty argument is only one named NS_ENSURE_TRUE.

    +

    layout/style/nsHTMLStyleSheet.cpp, layout/generic/nsObjectFrame.cpp, intl/uconv/src/nsGREResProperties.cpp

    +

    Also the following files in gfx/cairo/cairo/src/ have it. +The actual macro is only one: slim_hidden_ulp2.

    +

    cairoint.h, cairo-font-face.c, cairo-font-options.c, cairo-ft-font.c, cairo-ft-private.h, cairo-image-surface.c, cairo-matrix.c, cairo-matrix.c, cairo-pattern.c, cairo-scaled-font.c, cairo-surface.c, cairo-xlib-surface.c, cairo.c

    +

    Though these empty macro arguments are used on Linux, they are not used on Mac OS X. +Anyway, these are not tricky ones.

    +
  • Translation limits beyond C90

    +

    Length of an identifier, nesting level of #include, number of macro definitions and so forth often exceed C90 translation limits.
    +Identifiers longer than 31 bytes are found especially frequently in the directory gfx/cairo/cairo/src/. +Nesting of #include over than 8 level and macro definitions over than 1024 are often found, too. +These are almost inevitable on Linux and Mac OS X, since only inclusion of some system headers often reaches these limits.

    +
  • Using // comment in C source

    +

    Some C sources have this type of comments. +The list of guidelines prohibits this. +However, this causes few problem nowadays.

    +
+

Above specifications are also available on Visual C 2005, 2008. +Since GCC has -std=c99 option, we might use this to specify C99 explicitly. +Visual C, however, has no option to specify a version of Standard. +We cannot help to use C99 specs implicitly. +Therefore, firefox sources cannot be blamed for using C99 specs implicitly, in the current states of the major compiler-systems. *1

+

By the way, firefox sources do not use variadic macro for some reason, in spite of using some other C99 specs implicitly. +Visual C up to 2003 did not implement variadic macro. +Is that why firefox did not use the feature? +The circumstances has changed since Visual C 2005 implemented it.

+

Note:

+

*1 On C++, GCC defaults to "gnu++98" spec, which is explained as "C++98 plus GCC extensions". It has in actual, however, some C99 specs mixed. +Meanwhile, Visual C says that it is based on C90 and C++98 for C and C++ respectively. +In actual, both of C and C++ of Visual C have C99 features mixed in it as well as a few Visual C extensions, especially in Visual C 2005 and 2008. +Both of GCC and Visual C have such mixture of versions of Standard and their own extensions and modifications, thus bring about some ambiguities. +The absence of option in Visual C to specify a version of Standard is the most inconvenient problem.

+ +

3.9.11.4. Object-like macro replaced with function-like macro name

+

Object-like macro replaced with function-like macro name is found sometimes in many other programs, and is found also in firefox sources below, though not frequently.

+content/base/src/nsTextFragment.h, +modules/libimg/png/mozpngconf.h, +modules/libjar/zipstub.h, +modules/libpr0n/src/imgLoader.h, +nsprpub/pr/include/obsolete/protypes.h, +nsprpub/pr/include/private/primpl.h, +nsprpub/pr/include/prtypes.h, +parser/expat/lib/xmlparse.c, +security/nss/lib/jar/jarver.c +security/nss/lib/util/secport.h, +xpcom/glue/nsISupportsImpl.h + +

In addition, building of firefox creates, in a directory for developing environment, many links to header files, which are copied into /usr/include/firefox-VERSION/ when you install developing environment for firefox. +Some of these header files have symbolic links to the above files. +mozilla-confic.h, that is created by configure, has a macro definition of this kind, too.

+

These macros should be written as function-like macro to improve readability. +In actual, many other macros in firefox sources are defined as function-like macro replacing to another function-like macro with the same arguments. +There are coding style differences among the authors. +It would be better to set a coding guideline on this matter.

+ +

3.9.11.5. Macro expanded to 'defined'

+

A Macro with 'defined' token in its replacement text, sometimes found in glibc, is found in firefox only once.

+

modules/oji/src/nsJVMConfigManagerUnix.cpp +defines a macro as: +

+#define NS_COMPILER_GNUC3 defined(__GXX_ABI_VERSION) && \
+                          (__GXX_ABI_VERSION >= 102) /* G++ V3 ABI */
+
+and uses it in itself as:

+
+#if (NS_COMPILER_GNUC3)
+
+

This macro should be removed and the #if line should be rewritten as:

+
+#if defined(__GXX_ABI_VERSION) && (__GXX_ABI_VERSION >= 102) /* G++ V3 ABI */
+
+

Maybe this file is to be compiled only by GCC, nevertheless it is not good practice to depend on preprocessor's wrong implementation.

+

Note:

+

*1 GCC-specific-build of mcpp V.2.7 enabled GCC-like handling of 'defined' in macro on #if line. +But mcpp warns at it, and you would better to revise the code.

+ +

3.9.11.6. Tokens in #endif line

+

The following files in jpeg directory have #endif lines with comments without comment mark. +All of the lines has appeared by some recent updates.

+
+jmorecfg.h, jconfig.h, jdapimin.c, jdcolor.c, jdmaster.c
+
+

Though this style of writing was frequently seen in some sources for UNIX-like systems up until middle of 1990s, it has almost completely disappeared nowadays, and cannot be found even in that glibc sources. +GCC usually warns at it as expected. +For all that, these sources take such a writing style. +Only Apple-GCC does not warn at it. +Have these sources been edited on Mac OS?

+ +

3.9.11.7. Assembler Source Which Needs Preprocessing

+

The assembler sources are written as *.s (*.asm) files, and some of which contain macros, but in principle, they do not call for preprocessor.

+

On Mac OS X / ppc, however, there is only one exception. +xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_rhapsody.s calls for preprocessor, because it has a #if block containing only one line. +The block seems to be unnecessary already.

+ +

3.9.11.8. -include option

+

Compilation of firefox begins with configure, which generates mozilla-config.h. +In compilation of most of the sources, this header file is specified by -include option. +config/gcc_hidden.h is also specified similarly. +Why don't the sources #include these headers at their top?

+ +

3.9.11.9. Redefinition of macro

+

Some silent redefinition of macros are found, though they are rare.

+
    +
  • In compilation of most of the sources, -DZLIB_INTERNAL option is specified. +In other words, the macro is defined as 1. +It is, however, defined by some sources in modules/zlib/src/ as:

    +
    +#define ZLIB_INTERNAL
    +
    +

    It is defined to zero token. +And it is used as: +

    +#    ifdef ZLIB_INTERNAL
    +
    +

    Though the difference does not make different result in this case, different definitions of the same macro is not recommended. +Maybe the option by Makefile is redundant.

    +
  • xpcom/build/nsXPCOMPrivate.h defines a macro MAXPATHLEN differently from /usr/include/sys/param.h. +This discrepancy stems from an inconsistency among the related header files about whether include /usr/include/sys/param.h or not. +The related header files should be reorganized.

    +
  • On Mac OS X, assert macro, once defined in /usr/include/assert.h, is redefined in netwerk/dns/src/nsIDNKitInterface.h. +'#undef assert' should precede it.

    +
  • On Mac OS X, in modules/libreg/src/VerReg.c, queer redefinition of macro VR_FILE_SEP occurs as:

    +
    +#if defined(XP_MAC) || defined(XP_MACOSX)
    +#define VR_FILE_SEP ':'
    +#endif
    +#ifdef XP_UNIX
    +#define VR_FILE_SEP '/'
    +#endif
    +
    +

    , because on Mac OS X, configure defines both of XP_MACOSX and XP_UNIX. +This redefinition may be an intended one. +Anyway, it is misleading. +It would be better to write as below, clearly showing the priority of XP_UNIX. +

    +#ifdef XP_UNIX
    +#define VR_FILE_SEP '/'
    +#elif defined(XP_MAC) || defined(XP_MACOSX)
    +#define VR_FILE_SEP ':'
    +#endif
    +
    +
+ +

3.9.11.10. Too long comments

+

The following files have too long comments crossing over several hundred lines or more.

+

extensions/universalchardet/src/base/Big5Freq.tab, extensions/universalchardet/src/base/EUCKRFreq.tab,intl/unicharutil/src/ignorables_abjadpoints.x-ccmap, layout/generic/punct_marks.ccmap

+

Especially, in the directories intl/uconv/ucv*/, there are many files with too long comments. +There is even a case of single comment crossing over 8000 lines! +All of these files have name of *.uf or *.ut, and are mapping tables between Unicode and each Asian encodings, generated automatically by some tool. +They do not seem to be source of C/C++, but they are included from other C++ sources. +Most part of these files are comments, which seem to be a sort of document or table for some other tool.

+

It is not recommendable to include long documents or tables in source files. +They should be separated from source files, even if placed in source tree.

+

Though these files are used in Linux, they are not used in Mac OS X. +On the other hand, on Mac OS X, system headers in framework directories are frequently used, and some of them are queer files mostly occupied with comments.

+ +

3.9.11.11. Mixed encodings of newline

+

The encoding of newline in firefox source is [LF]. +A few files, however, have a small block of lines ending with [CR][LF]. +All of these [CR][LF] lines seem to be fragments inserted as patches. +Some conversion tools should be used when one edit source file on Windows.

+
+ +

3.10. Visual C++ System Header Problems

+

I used mcpp to preprocess some sample programs provided by Visual C++ 2003, 2005 and 2008. The system headers seem to have only a few compatibility problems shown below. These problems are often seen in other compile systems and do not have a serious impact on preprocessing.

+
    +
  1. Since when Visual C++ scarcely implemented the C99 specifications, // comments have often been used in C source code.
    +
  2. Object-like macro definitions that are expanded into function-like macro names are sometimes found.
    +
  3. On Visual C++ 2003, there was one wrong macro definition in limits.h. (It was revised on Visual C++ 2005. See Note 2 in cpp-test.html#5.1.3.1)
    +
+

Although the Linux system-headers and glibc sources often contain GCC local specification based coding, Visual C++ system headers has only a few Visual C++ local coding.

+ +

3.10.1. Comment Generating Macro?

+

I found only one outrageous macro in Visual C++. Vc7/PlatformSDK/Include/WTypes.h has the following macro definition: *1

+
+#define _VARIANT_BOOL   /##/
+
+

This macro definition is used in oaidl.h and propidl.h in Vc7/PlatformSDK/Include/ as follows:

+
+_VARIANT_BOOL bool;
+
+

What does this macro aim at?

+

This macro seems to expect _VARIANT_BOOL to be expanded into // and the line to be commented out. Actually, this expectation is met in Visual C cl.exe !

+

In the first place, // is not a token (preprocessing-token). Macro definitions should be processed and expanded after source are parsed into tokens and a comment is converted into one space. Therefore, it is irrational for a macro to generate comments. When this macro is expanded into //, the result is undefined because // is not a valid preprocessing-token.

+

In order to use these header files with mcpp, comment out these macro definitions and change many _VARIANT_BOOL occurrences as follows:

+
+#if !__STDC__ && (_MSC_VER <= 1000)
+    _VARIANT_BOOL bool;
+#endif
+
+

If you use only Visual C 5.0 or later, this line can be simply commented out as follows:

+
+// _VARIANT_BOOL bool;
+
+

This macro is, indeed, out of question, however, it is Visual C/cl.exe, which allows such an outrageous macro to be preprocessed as a comment, should be blamed. This example reveals the following serious problems this preprocessor has:

+
    +
  1. Preprocessing is not token-based but character-based at least in this example.
    +
  2. The macro expansion result is treated as comment, which indicates the translation phases are confusing.
    +
+

Probably, the cl.exe preprocessor was developed based on a very old somewhat character-based preprocessor. It is easy to presume that the preprocessor has been upgraded by repeating partial revision to the old preprocessor.

+

There are many preprocessors which presumably have a very old program structure. GCC 2/cpp, shown in 3.9, is one of such preprocessors. Repeated partial revision of such a preprocessor will only makes its program structure more complicated. However much such revision may be made, there are limits to quality such preprocessor can achieve. Unless a old source is given up and completely rewritten, a clear and well-structured preprocessor cannot be obtained.

+

At GCC 3/cpp0, a total revision was made to GCC 2; the entire source code was rewritten. So, GCC 3/cpp0 has become quite different from GCC 2. Although mcpp was initially developed based on the source of an old preprocessor, DECUS cpp, the source code was totally rewritten soon.

+

Note:

+

*1 Visual C++ 2005 Express Edition does not contain Platform SDK. However, you can download "Platform SDK for Windows 2003", and use it with VC2005. wtypes.h, oaidl.h, propidl.h in this PlatformSDK/Include directory also have the same macro definition and its usage as VC2003 Platform SDK.
+Also on Visual C++ 2008, in the header files of the same name in 'Microsoft SDKs/Windows/v6.0A/Include' directory, that macro definition and its usage are quite the same.

+ +

3.10.2. '$' in Identifiers

+

Another problem is use of '$' in identifiers. +Its use in macro names suddenly increased in the system headers on Visual C++ 2008. +Though such macros were also found on Visual C++ 2005, they were rare. +But, on Visual C++ 2008, they are found here and there.

+

'Microsoft Visual Studio 9.0/VC/include/sal.h' is the most conspicuous one. +This header defines macros for so-called SAL (standard source code annotation language) of Microsoft, and has many names containing '$'. +This file is included from many standard headers via 'Microsoft Visual Studio 9.0/VC/include/crtdefs.h', so most sources are compiled with these macros without knowing it.

+

If you specify -Za option to invoke the compiler cl, the SAL is disabled and all of the names with '$' in the sal.h disappear. +The necessity of this notation is, however, hard to understand. +Though GCC also enables '$' in identifiers by default, its actual use is rarely found nowadays.

+

This kind of names are also found in the system headers named specstrings*.h in 'Microsoft SDKs/Windows/v6.0A/Include' directory. +They are included from Windows.h via WinDef.h, and the names with '$' do not disappear even -Za option is specified. +The option causes only errors. +So, you cannot use the -Za option to compile a source which includes Windows.h.

+
+ +

4. Implementation-defined Behaviors

+

This chapter does not contain all the C preprocessor specifications. For details on Standard C preprocessing, refer to cpp-test.html. For mcpp behaviors in each mode, refer to 2.1. This chapter covers several preprocessor-related specifications, including those called implementation-defined by Standards. For more details on mcpp implementation-defined-behaviors, see Chapter 5, "Diagnostic Messages".

+
+ +

4.1. Status Value on Exit

+

The header file internal.H defines values returned by mcpp to a parent process. mcpp returns 0 on success, and errno for errno != 0 and 1 for errno == 0 on error. Success means that no error has occurred.

+
+ +

4.2. Include Directory Search Path

+

This section explains the order in which mcpp searches directories for an include file when it encounters a #include directive.

+
    +
  1. If a #include directive argument takes A Form of neither "file-name" nor <file-name>, and is a macro, the macro is expanded. The resulting filename must take a form of either "file-name" or <file-name>. Otherwise, it causes an error.
    +
    +
  2. If the resulting filename, either in form of "file-name" or <file-name>, is a full path name, mcpp tries to open it. If it fails, it causes an error.
    +
    +
  3. If the resulting filename is not a full path but takes a form of "file-name", mcpp regards it as a filename relative from the current directory or source file directory, and begins searching from that directory. The former is a directory from which mcpp was invoked and the latter is a directory where the source file that includes the "file-name" resides. Depending on the specified options and compiler systems, mcpp begins searching directories as follows:
    +
    +
      +
    1. If -I1 is specified, search begins from current directory. +
    2. If -I2 is specified, source file directory. +
    3. If -I3 is specified, current first and then source file directory. +
    +
    +By default, the compiler-specific-builds for UNIX compiler systems, GCC or Visual C begin searching from the source file directory. +The other compiler-specific-builds begin searching at the current directory. However, Borland C-specific-build searches current first and then source file directory. +The compiler-independent-build of mcpp begins search from the source file directory.
    +For GCC, the directories specified by -iqoute option are searched next. +For Visual C, also the directories of each ancestor file of source file are searched one by one.
    +If mcpp fails to find the desired file, it begins searching as shown in step 4.
    +
    +In case of a nested #include, if search begins at current directory, the base directory is always the same. If search begins at a source file directory, the base directory changes each time a header file resides in other directory.
    +
    +
  4. If the resulting filename is not a full path name but takes a form of <file-name>, mcpp searches directories in the following order. If any of these directories are specified as a relative path, then mcpp regards it as a relative directory from the current directory at mcpp startup. If mcpp fails to find or open the desired file after searching all the directories in these order, it causes an error.
    +
      +
      +
    1. Directory(s) specified with the -I <directory> option on mcpp invocation. If several directories are specified, they are searched in the order in which specified (with the left first). +
    2. For GCC-specific-build, directories specified with the -isystem option. If several directories are specified, they are searched in the order specified (from the left). +
    3. Directories specified with an environment variable. ENV_C_INCLUDE_DIR in noconfig.H (configed.H) defines environment variable names. In C++, ENV_CPLUS_INCLUDE_DIR, if defined, takes precedence over ENV_C_INCLUDE_DIR. GCC-specific-build uses C_INCLUDE_PATH (and also CPLUS_INCLUDE_PATH for C++) as default environment variable. Other mcpp uses INCLUDE (and also CPLUS_INCLUDE for C++) as default. If an environment variable specifies several directories with each separated with a delimiter, they are searched in the order in which specified. Windows and other OSs use ";" and ":" as delimiter, respectively. +
    4. Implementation-specific directories for C++ defined by the CPLUS_INCLUDE_DIR? macros in noconfig.H (configed.H). +
    5. Site-specific directories defined by setsysdirs() in system.c (For UNIX systems, /usr/local/include). +
    6. Implementation-specific directories defined by the C_INCLUDE_DIR? macros in noconfig.H (configed.H). +
    7. System-specific directories defined by setsysdirs() in system.c (For UNIX systems, /usr/include). +
    +
+

With the -I- option (-nostdinc option for GCC-specific-build and -X for Visual C-specific-build), the directories specified in 4.4 and later are not searched.

+

ANSI C Rationale says the ANSI committee intends to define a current directory as base directory. I think this is acceptable, in that the base directory is always constant and that the specification is clearer. However, some implementations, such as UNIX, seem to define a source file directory as base one at least for #include "header". The compiler-independent-build of mcpp also takes source file directory as base, according to the majority.

+
+ +

4.3. How to Construct Header Name

+

This section explains how to construct a header-name pp-token and extract a file name from it.

+
    +
  1. If source code contains a header file name in the string literal format, mcpp regards it as a header-name and removes the " at the both ends to construct a filename. This can be applied to a string literal resulting from macro expansion in source code.
    +
    +
  2. If source code contains a header file name in the <filename> format, mcpp regards it as a header-name and removes the < and > at the both ends to construct a filename. This can be applied to a <filename> format sequence resulting from macro expansion. The spaces in the macro are retained squeezing multiple spaces into one space.
    +
    +
  3. In any case, mcpp converts \ to /, although both of "\" and "/" can be used as path delimiters on Windows.
    +
    +
+
+ +

4.4. Evaluation of #if Expression

+

Evaluation of #if expression depends on the largest integer type of the host compiler (by which mcpp was compiled) and that of the target compiler (which uses mcpp). Since the compiler-independent-build has no target compiler, the type depends only on the host compiler.

+

mcpp in Standard mode evaluates #if expression in the common largest integer type of the host and target compiler. Nevertheless, mcpp in pre-Standard mode evaluates it in (signed) long.

+

In the compiler-systems having type "long long", if __STDC_VERSION__ is set to 199901L or higher using the -V199901L option, mcpp evaluates a #if expression in "long long" or "unsigned long long", according to the C99 specification. Although C90 and C++98 stipulate that #if expression is evaluated in long / unsigned long, mcpp evaluate it in long long / unsigned long long even in C90 or C++98 mode, and issues a warning in case of the value overflows the range of long / unsigned long. *1

+

Visual C and Borland C 5.5 do not have a "long long" type, but have an __int64 type of the same length. So, a #if expression is evaluated as __int64 / unsigned __int64. (However, since LL and ULL suffixes cannot be used in Visual C++ 2002 or earlier and Borland C 5.5, these suffixes must not be used in coding other than #if lines.)

+

In addition, when you invoke with the -+ option for C++ preprocessing, mcpp evaluates pp-tokens 'true' and 'false' in a #if expression to 1LL (or 1L) and 0LL (or 0L), respectively.

+

mcpp in Standard mode evaluates #if expression as follows. For a compiler without long long, please read "long long" and "unsigned long long" hereinafter, until the end of 4.5, as "long" and "unsigned long", respectively. For pre-Standard mode read all of them as "long".

+
    +
  1. An integer constant token with a U suffix, including character constants, is evaluated in unsigned long long. (Note that pre-Standard mode does not recognize the U suffix).
    +
  2. Otherwise, a token within the range of non-negative long long is evaluated in long long.
    +
  3. Otherwise, a token within the range of unsigned long long is evaluated in unsigned long long.
    +
  4. Otherwise, it is diagnosed as an out of range error.
    +
  5. In a binary operation, if either operand is unsigned long long, both are converted to unsigned long long. Otherwise, an operation is performed in signed long long.
    +
+

Anyway, an integer constant token always has a non-negative value.
+In pre-Standard mode, an integer constant token is evaluated within the range of non-negative long. A token beyond that range is diagnosed as an out of range error. All the operations are performed within the range of long.

+

If both of host and target compilers have type unsigned long long and the range of unsigned long long of the host is narrower than that of the target, a beyond that host range is evaluated to an out of range error.

+

If an operation using constant tokens produces a result out of range of long long, an out of range error occurs. If it produces a result out of range of unsigned long long, a warning is issued. This can be applied to intermediate operation results.

+

Since a bitwise right shift of a negative value or a division operation using it does not provide portability, mcpp issues a warning. If an operation using a mixture of unsigned and signed operands converts a signed negative value to an unsigned positive value, a warning is also issued. How these values are evaluated depends on the specification of the compiler-proper of the host system.

+

C90 and C++98 makes it a rule that a preprocessor evaluates a #if expression in long/unsigned long (in C99, the maximum integer type is used). These specifications are rougher than those of compiler-propers. A (#)if expression is often evaluated differently between preprocessor and compiler-proper, especially when sign extension is involved.

+

In addition, since keywords are not used during Standard C preprocessing, sizeof or cast cannot be used in a #if expression. Of course, neither variables, enumeration constants, nor floating point numbers can be used there. Standard mode allows the "defined" operator in a #if expression as well as the #elif directive. Except for these differences, mcpp evaluates a #if expression in accordance with priority of and the associative law among operators, just as compiler-propers do. In a binary operation, an arithmetic conversion often takes place to equalize the types on both-hand sides; If one operand is unsigned long long and the other is long long, the both are converted to unsigned long long.

+

Note:

+

*1 mcpp up to V.2.5 evaluated #if expression in C90 and C++98 by long long / unsigned long long internally, and issued an error on overflow of long / unsigned long. From V.2.6 onward, mcpp degraded the error to warning for compatibility with GCC or Visual C.

+
+ +

4.5. Character Constant Evaluation in #if Expression

+

Constant tokens in a #if expression includes identifiers (macros and non-macros), integer tokens and character constants. How to evaluate character constants is implementation-defined and lacks of portability. Even (#)if 'const' is sometimes evaluated differently between preprocessor and compiler-proper. Note that Standards does not even guarantee that (#)if 'const' is evaluated to the same.

+

mcpp in POSTSTD mode does not evaluate a character constant in a #if expression, which is almost meaningless, and makes it an error.

+

Like other integer constant tokens, mcpp evaluates a character constant in a #if expression within the range of long long or unsigned long long. (In pre-Standard mode, long only.)

+

A multi-byte character or a wide character is generally evaluated with 2-bytes type, except for the UTF-8 encoding, which is evaluated with 4-bytes type. Since UTF-8 has a variable length, mcpp evaluates it with 4-byte type. mcpp does not support EUC's 3 byte encoding scheme. (A 3-byte character is recognized as 1 byte + 2 bytes. As a consequence, its value is evaluated correctly.) Although there are some implementations using the 2-byte encoding scheme that define wchar_t as 4-byte, mcpp has no relevance to wchar_t. The following paragraphs describe two-byte multi-byte character encodings.

+

Multi-byte character constants, such as 'X', are evaluated to ((First byte value << 8) + Second byte value). (8 is the value of CHAR_BIT in <limits.h>.) Note that 'X' is used here to designate a multi-byte character. Though 'X' itself is not a multi-byte character, it is used here to avoid character garbling.

+

Let me take an example of multi-character character constants, such as 'ab', '\x12\x3', and '\x123\x45'. 'a', 'b', '\x12', '\x3' and '\x123' are regarded as one byte. When a multi-character character constant is evaluated, each one byte, starting from the highest one, is evaluated within the range of [0, 0xFF] and combined by shifting it to left by 8. (0xFF is the value of UCHAR_MAX in <limits.h>.) If the value of one escape sequence exceeds 0xFF, an out of range error occurs. Therefore, in the implementation of the ASCII character set, the above three tokens are evaluated to 0x6162, 0x1203 and error, respectively.

+

L'X' is evaluated to the same value as 'X'. Let me take an example of multi-character wide character constants, such as L'ab', L'\x12\x3', and L'\x123\x45'. L'a', L'b', L'\x12', L'\x3', L'\x123', and L'\x45' are regarded as one wide character. When a multi-character wide character constant is evaluated, each wide character, starting from the highest one, is evaluated within the range of [0, 0xFFFF] and combined by shifting it to left by 16. If the value of one escape sequence exceeds the maximum value of an unsigned 2-byte integer, an out of range error occurs. Therefore, in the implementation of the ASCII character set, the above three tokens are evaluated to 0x00610062, 0x00120003, and 0x01230045, respectively.

+

If the values of a multi-character character constant and a multi-character wide character constant exceed the range of unsigned long long, an out of range error occurs.

+

With __STDC_VERSION__ or __cplusplus set to 199901L or higher, mcpp evaluates a Universal Character Name (UCN) in the form of \uxxxx and \Uxxxxxxxx as a hex escape sequence. (I know this evaluation is nonsense but no other way.)

+

If the compiler-proper of the target compiler system uses a signed char or signed wchar_t, a character constant in a (#)if expression may be evaluated differently between mcpp and compiler-proper. The range that causes a range error may also differ between them. In addition, evaluation of multi-character character constants and multi-byte character constants varies even among preprocessors and among compilers. Standard C does not define whether, with CHAR_BIT set to 8, 'ab' is evaluated to 'a' * 256 +'b' or 'a' + 'b' * 256.

+

In general, character constants should not be used in an #if expression, as long as you have an alternative method. I think an alternative method always exists.

+
+ +

4.6. #if sizeof (type)

+

Standard C stipulates that preprocessing is a process independent of run-time environments or compiler-proper specifications, thus prohibiting it from using sizeof and cast in an #if expression. However, pre-Standard mode allows sizeof (type) in a #if expression. This was done as a part of my effort to add necessary modifications to DECUS cpp, such as adding long long and long double processing, while retaining its original functionality. As to cast, I neither implemented nor had a will to do so because it would require troublesome work.

+

A series of macros beginning with S_, such as S_CHAR, in eval.c define the size of each type. Under cross implementation, these macros must be modified to specify size of the types, in integer values, used in the target system.

+

I have to admit that mcpp does not provide the full functionality of #if sizeof. mcpp just ignores the letter of "signed" or "unsigned" preceding char, short, int, long, and long long when it appears in a #if sizeof. Also mcpp does not support sizeof (void *). I know this is a half-hearted implementation but I do not want to increase the number of flags in system.H in vain for this non-conforming function. I initially thought of removing the sizeof code from the original version because I did not intend to support cast at all, but on the second thought, I decided to make a small amount of modifications to make use of the existing code.

+
+ +

4.7. How to Handle White-Space Sequence

+

mcpp in principle compresses a white-space sequence, excluding <newline>, as a token separator into one space character during tokenization in the translation phase 3. If -k or -K option is specified in STD mode, however, it outputs horizontal white spaces as they are without compressing. It also deletes a white-space sequence at the end of a line.

+

A white-space sequence at the beginning of a line is deleted in POSTSTD mode, and putout as they are in other modes. The latter is special treatment for convenience of human reading. *1

+

This compression and deletion occurs during the intermediate phase. The next phase 4 involves macro expansion and preprocess-directive-line processing. Macro expansion may sometimes produce several space characters before and after the macro. Of course, the number of space characters does not affect compilation results.

+

Standard C says that whether implementation compresses a white-space sequence into one space character during the translation phase 3 is implementation-defined, but you usually do not have to worry about this. <Vertical-tab> or <form-feed> in a preprocessor directive line may adversely affect portability, since this is undefined in Standard C. mcpp converts it to one space character.

+

Note:

+

*1 Up to V.2.6.3 mcpp squeezed line top white spaces into one space. +In V.2.6.4, it changed the behavior.

+
+ +

4.8. Default Specifications for mcpp Executables

+

This section describes the specifications of mcpp executables generated when DIFfile and makefile for each compiler system in the noconfig directory are used to compile mcpp with default settings. When a configure script is used to compile mcpp, the generated mcpp may differ, depending on configure's results, however, as long as OS and compiler system versions are same, generated mcpps would be same except for include directories.

+

The compiler-independent-build of mcpp has the constant specifications regardless of the compiler system with which mcpp was compiled, except a few features dependent on OS and CPU.

+

There are compiler-independent-build and compiler-specific-build for mcpp executables, and each executable has several behavioral modes. For those, refer to 2.1. This section describes the settings centering on STD mode.

+

DIFfiles and makefiles are for the following compiler systems:

+
+ + + + + + + + + + + + +
FreeBSD 6.3 GCC V.3.4
Vine Linux 4.2 / x86 GCC V.2.95, V.3.2, V.3.3, V.3.4, V.4.1
Debian GNU/Linux 4.0 / x86 GCC V.4.1
Ubuntu Linux 8.04 / x86_64 GCC V.4.2
Fedora Linux 9 / x86 GCC V.4.3
Mac OS X Leopard / x86 GCC V.4.0
CygWIN 1.3.10 (GCC V.2.95), 1.5.18 (GCC 3.4)
MinGW & MSYS GCC 3.4
WIN32 LCC-Win32 2003-08, 2006-03
WIN32 Visual C++ 2003, 2005, 2008
WIN32 Borland C++ V.5.5
+
+

In addition, for the following compilers which I don't have, the difference files contributed from some users are contained here.

+
+ + + +
WIN32 Visual C++ V.6.0, 2002
WIN32 Borland C++ V.5.9 (C++Builder 2007)
+
+

Of all the macros defined in noconfig.H and system.H, the settings of those mentioned below are identical among every mcpp executable, regardless of their compiler systems.

+

Each mcpp is compiled with DIGRAPHS_INIT == FALSE, so enables digraph when the -2 (-digraphs) option is specified.
+With TRIGRAPHS_INIT == FALSE, trigraph is enabled with the -3 (-trigraphs) option.
+With OK_UCN set to TRUE, Universal Character Name (UCN) can be used in C99 and C++.
+With OK_MBIDENT set to FALSE, multi-byte-characters cannot be used in identifiers.

+

With STDC set to 1, the initial value of __STDC__ is 1.

+

The translation limits are set as follows.

+
+ + + + + + + + + + +
NMACPARS (Maximum number of macro arguments) 255
NEXP (Maximum number of nested levels of #if expressions) 256
BLK_NEST (Maximum number of nested levels of #if section) 256
RESCAN_LIMIT (Maximum number of nested levels of macro rescans)64
IDMAX (Valid length of identifier) 1024
INCLUDE_NEST (Maximum number of #include nest level) 256
NBUFF (Maximum length of a source line) *1 65536
NWORK (Maximum length of an output line) 65536
NMACWORK (Size of internal buffers used for macro expansion) 262144
+
+

On GCC-specific-build and Visual C-specific-build, however, NMACWORK is used as the maximum length of an output line.

+

This macro differs on OS regardless of build types.

+

MBCHAR (Default encoding of multibyte character):

+
+ + + +
Linux, FreeBSD, Mac OS X EUC-JP
WIN32, CygWIN, MinGW SJIS
+
+

The settings of the macros below are different among compiler systems.

+

STDC_VERSION (Initial value of __STDC_VERSION__):

+
+ + + +
Compiler-independent, GCC 2199409L
Others 0L
+
+

HAVE_DIGRAPHS (Is digraphs output as it is?):

+
+ + + +
Compiler-independent, GCC, Visual CTRUE
Others FALSE
+
+

EXPAND_PRAGMA (Is a #pragma line macro-expanded in C99?):

+
+ + + +
Visual C, Borland CTRUE
Others FALSE
+
+

GCC 2.7-2.95 defines __STDC_VERSION__ to 199409L. However, in GCC V.3.*,V.4.*, __STDC_VERSION__ is no longer predefined by default and is now defined in accordance with an execution option. mcpp setting for GCC follows these variations.

+

If STDC_VERSION is set to 0L, mcpp predefines __STDC_VERSION__ as 0L. So, specifying the -V199409L option sets __STDC__ and __STDC_VERSION__ to 1 and 199409L, respectively and allows only predefined macros that begin with '_', resulting in mcpp in the strictly C95 conforming mode. The -V199901L option specifies C99 mode.

+

In C99 mode, mcpp predefines __STDC_HOSTED__ as 1.

+

mcpp itself predefines neither __STDC_ISO_10646__, __STDC_IEC_559__ nor __STDC_IEC_559_COMPLEX__. These values are compiler-system-specific. In glibc 2 / x86, the system header defines __STDC_IEC_559__ and __STDC_IEC_559_COMPLEX__ as 1. Other compiler systems do not define them.

+

If HAVE_DIGRAPHS is set to FALSE, digraph is output after converting to usual token.

+

The argument of #pragma line beginning with STDC, MCPP or GCC is never macro-expanded even if EXPAND_PRAGMA == TRUE.

+

Include directories are set as follows:

+

System-specific or site-specific directories under UNIX-like OSs are as follows (common to compiler-independent-build and compiler-specific-build):

+
+ + +
FreeBSD, Linux, Mac OS X, CygWIN/usr/include, /usr/local/include
+
+

Mac OS X has also the framework directories set to /System/Library/Frameworks and /Library/Frameworks by default.

+

On MinGW, /mingw/include is the default include directory.

+

CygWIN GCC-specific-build changes /usr/include to /usr/include/mingw by -mno-cygwin option.

+

For the implementation-specific directories that vary among compiler systems and their versions, see the DIFfiles. The compiler-independent-build does not set implementation-specific directories. mcpp for the compiler systems on Windows does not preset any directory but uses the environment variables: INCLUDE, CPLUS_INCLUDE. These environment variables are used by the compiler-independent-build too.

+

If these default settings do not suit you, change settings to recompile mcpp, or use environment variables or the -I option.

+

When the length of a preprocessed line exceeds NWORK-1, mcpp generally divides it into several lines so that each line length becomes equal to or less than NWORK-1. A string literal length must be equal to or less than NWORK-2. +mcpp of GCC-specific-build and Visual C-specific-build, however, do not divide output line.

+

Again for confirmation, the macros mentioned above in italics are used only to compile mcpp, and are not built-in macros in a mcpp executable.

+

If you invoke mcpp without an input file and enter '#pragma MCPP put_defines', the built-in macros will be displayed.

+

With __STDC__ set to 1 or higher, the macros that do not begin with '_' are deleted. The -N (-undef) option deletes all the macros other than __MCPP. After -N, you can use -D to defines macro symbols over again. When you use a different compiler system version from those specified here, -N and -D allow you to redefine your version macro without recompiling mcpp. The -D option allows you to redefine a particular macro without using -N or -U.

+

When you use the -+ (-lang-c++) option to specify C++ preprocessing, __cplusplus is predefined with its initial value of 1L. In addition, some other macros are also predefined:

+

Although there are some predefined macros in GCC, those predefined by GCC were few, until GCC V.3.2. Most of them are passed from gcc to cpp by the -D option. So, it is not necessary for mcpp to define them for compatibility. However, mcpp predefines these macros for being used in a stand alone manner, such as pre-preprocessing.

+

GCC V.3.3 and later predefines 60 or 70 macros (suddenly). GCC-specific-build of mcpp V.2.5 and later for GCC V.3.3 or later also includes these predefined macros other than the above ones. These GCC-specific predefined macros are written in mcpp_g*.h header files, which is generated by installation of mcpp.

+

Since FreeBSD, Linux, CygWIN, MinGW / GCC and LCC-Win32, Visual C 2008 have a type long long, an #if expression is evaluated in long long or unsigned long long. Visual C 6.0, 2002, 2003, 2005 and Borland C 5.5 do not have a "long long" type but __int64 and unsigned __int64 instead. These types are used.

+

In the above compiler systems with type long ranges:

+
+[-2147483647-1, 2147483647] ([-0x7fffffff-1, 0x7fffffff])
+
+

and unsigned long ranges:

+
+[0, 4294967295] ([0, 0xffffffff]).
+
+

In the compiler systems with type long long ranges:

+
+[-9223372036854775807-1, 9223372036854775807]
+([-0x7fffffffffffffff-1, 0x7fffffffffffffff]),
+
+

and unsigned long long ranges:

+
+[0, 18446744073709551615] ([0, 0xffffffffffffffff]).
+
+

All the compiler-propers of the above compiler systems internally represent a signed integer as two's complement number. So do bit operations. This can be applied to mcpp's #if expression.

+

Right shift of a negative integer is an arithmetic shift. This can be applied to mcpp's #if expression. (Right shifting an integer by one bit halves the value with the sign retained)

+

In an integer division or modulus operation, if either or both operands are negative values, an algebraic operation like Standard C's ldiv() function is performed. This can be applied to mcpp's #if expression.

+

These OSs use the ASCII basic character set. So does mcpp.

+

There is a memory management routine, kmmalloc, that I developed. This routine has malloc(), free(), realloc() and other memory handling functions. If kmmalloc is installed in systems other than CygWIN or Visual C 2005 or 2008, kmmalloc is linked when the MALLOC=KMMALLOC (or -DKMMALLOC=1) option is specified in make. Also its heap memory debugging routine is linked. mcpp for Linux and LCC-Win32 uses EFREEP, EFREEBLK, EALLOCBLK, EFREEWRT and ETRAILWRT with an errno of 2120, 2121,2122, 2123 and 2124 assigned, and other mcpp uses 120, 121, 122, 123, and 124. (Refer to mcpp-porting.html#4.extra.) *2

+

On the systems other than GNU and Visual C, you should preset the environment variable TZ, for example JST-9 in Japan. Or, the __DATE__ and __TIME__ macros are not set correctly.

+

Note:

+

*1 This limit applies also to the line spliced by <backslash><newline> deletion. Moreover, it applies to the line after converting a comment into a space and possibly concatenated multiple logical lines by a comment spreading across the lines.

+

*2 CygWIN 1.3.10 and 1.5.18 provides malloc() that has an internal routine named _malloc_r() which is called by a few other library functions. So this malloc() cannot be replaced with other malloc(). Also in Visual C 2005 and 2008, the program terminating routine calls an internal routine of resident malloc(), hence other malloc() cannot be used.

+
+ +

5. Diagnostic Messages

+ +

5.1. Diagnostic Messages Format

+

This section covers diagnostic messages issued by mcpp, as well as their meaning. By default, these messages are output to stderr. With the -Q option, they are redirected to the mcpp.err file in the current directory. A diagnostic message is output in the following manner:

+
    +
  1. "filename: line: " is followed by "fatal error: ", "error: " or "warning: " and then by any of the diagnostic messages shown in sections 5.3 to 5.9. Although the specification that a diagnostic message has to fit in one line that begins with "filename: line:" seems to lack of flexibility, I followed because it is a traditional way of implementing messages in C on UNIX and because various tools have already assumed that. Some mcpp messages do not fit in a line of usual terminal.
    +
    +
  2. If an error occurs during macro expansion, the macro invocation is displayed. For nested macro invocation, mcpp shows each macro names and its definitions, as well as the source filename and line number where the macro is defined.
    +
    +
  3. The source file name, the line number and the line at which an error has occurred are displayed. If an error has occurred in an included file, the names, line numbers and the #include lines of all the including files are displayed. Usually, a logical line with comments replaced with a space character is displayed. The logical line is constructed from one or more physical lines with '\' at the line end. If a comment spreads over several lines, several logical lines are concatenated into one, which is displayed as the line. In this case, the line number of the last concatenated physical line is displayed. Note that if an error occurs during the translation phase before processing a comment, the line in the phase is displayed.
    +
+

If the -j option is specified, mcpp outputs neither the above 2 nor 3.

+

Diagnostic messages are divided into three levels:

+
+ + + + +
fatal errorIndicates an error is so serious that it is no longer meaningful to continue preprocessing.
error Indicates there is a syntax or usage error.
warning Indicates code lacks of portability or may contain a bug.
+
+

Warnings are further divided into five classes:

+
+ + + + + + +
Class 1 Source code may contain a bug or at least lack portability.
Class 2 Probably, source code will present no problem in practical use, but is problematic in terms of Standard conformance.
Class 4 Probably, source code will present no problem in practical use, but is problematic in terms of portability.
Class 8 Rather surplus warnings to #if groups skipped, sub-expression in #if expression whose evaluation is skipped, and etc.
Class 16Warning to trigraphs and digraphs.
+
+

Warnings other than Class 1 or 2 are rather specific to mcpp.

+

mcpp has various types of diagnostic messages. For example, STD mode provides the following types of diagnostics for each level and class.

+
+ + + + + + + + +
fatal error 17 types
error 76 types
warning class 1 49 types
warning class 2 15 types
warning class 4 17 types
warning class 8 30 types
warning class 16 2 types
+
+

Principally, these messages point the coding in question. The diagnostic messages below have a sample value embedded in a token or a numeric value from source code. For the messages with a macro name embedded, a value the macro is expanded into is shown in real messages.

+

Depending on cases, a same message is issued as warning or error, in which case, this manual gives the first occurrence a detailed description. For the subsequent occurrences, the message is only listed.

+
+ +

5.2. Translation Limits

+

Of all the errors shown below, some errors, such as a buffer overflow, occur due to mcpp specification restrictions. Some macros in system.H define translation limits, such as a buffer size. Enlarge the buffer size and recompile mcpp if necessary, however, be careful not to increase it too much. A large buffer in a system with a small amount of memory may cause an "out of memory" error frequently.

+
+ +

5.3. Fatal Errors

+

A fatal error occurs and preprocessing is terminated when it is no longer possible to continue preprocessing due to an I/O error or a shortage of memory, or it is no longer meaningful to do so due to a buffer overflow. A status value of failure is returned to a parent process.

+ +

5.3.1. mcpp's Own Bugs

+
    +
  • Bug:
    +This message has several types. Should it be issued, it would indicate mcpp's own bug. I think this message is rarely issued, but should it be issued, do not hesitate to let me know the situation.
    +
+ +

5.3.2. Physical Errors

+
    +
  • File read error
    +An error has occurred during reading a source file. Disk or file-system may have been damaged.
    +
    +
  • File write error
    +An error has occurred during writing to a file. Disk or file-system may have been damaged or full.
    +
    +
  • Out of memory (required size is 0x1234 bytes)
    +Runs short of memory. mcpp tried to obtain memory of 0x1234 bytes from the heap, but in vain. This error occurs when there are too many long macro definitions on a system with a small amount of memory. Divide your source file to decrease the number of macro definitions in one translation unit.
    +
+ +

5.3.3. Translation Limits and Internal Buffer Errors

+
    +
  • Too long header name "long-file-name"
    +The length of the full path name of a file to include (file name concatenated with the specified directory path) has exceeded PATHMAX.
    +
    +
  • Too long source line
    +The length of a physical line in source file has exceeded NBUFF-2. The source code may not be written in C.
    +
    +
  • Too long logical line
    +The length of a logical line, which is constructed from the several physical lines with \ at the line end, has exceeded NBUFF-2. This error may occur when a defined macro is too long. The code should be written not as a macro but as a function.
    +
    +
  • Too long line spliced by comments
    +The length of a preprocessed line with a comment replaced with a space character has exceeded NBUFF-2. This error occurs when several lines are concatenated into one if a comment spreads over several lines. Divide the comment into several parts and write each on a separate line.
    +
    +
  • Too long token
    +A preprocessed line has a token with a length more than NWORK-2. mcpp tries to divide the preprocessed line into a length NWORK that the compiler-proper can accept. However, if a line contains a extremely long token, it sometimes fails to do so.
    +
+

The following four errors may also be caused by a buffer overflow at a token that is not so particularly long during macro expansion, in which case, you should divide the macro invocation.

+
    +
  • Too long quotation "long-string"
    +A string literal, character constant or header-name is too long. In case of a string literal, divide it. Standard conforming compiler concatenate adjacent string literals for you.
    +
    +
  • Too long pp-number token "1234567890toolong"
    +A preprocessing-number token is too long. This error is issued in Standard mode.
    +
    +
  • Too long number token "12345678901234......"
    +A number token is too long. This error is issued in pre-Standard mode.
    +
    +
  • Buffer overflow scanning token "token"
    +A buffer overflow has occurred during token scan. This message is issued to tokens other than string literals, character constants, header-names and pp-numbers.
    +
    +
  • More than BLK_NEST nesting of #if (#ifdef) sections
    +The depth of nested #if, #ifdef, and #ifndef has exceeded BLK_NEST. (In real message, the macro name BLK_NEST is replaced with an actual numerical value. This is applied to all the messages below with a macro name embedded.) Divide the #if section.
    +
    +
  • More than INCLUDE_NEST nesting of #include
    +The depth of nested #included has exceeded INCLUDE_NEST. Probably the #includes are in infinite recursion.
    +
    +
+ +

5.3.4. #pragma MCPP preprocessed Related Errors

+
    +
  • This is not the preprocessed source
    +Although the "#pragma MCPP preprocessed" directive is found, this is not a source preprocessed by mcpp.
    +
    +
  • This preprocessed file is corrupted
    +This seems to be a source preprocessed by mcpp, but cannot be used because it is destroyed.
    +
+
+ +

5.4. Errors

+

mcpp issues an error message when it found a grammatical error. Standard C stipulates that a compiler system should issue a diagnostic message when they encounter a violation of syntax rules or constraints. Principally, Standard mode issues an error message to this type of violation, but sometimes issues a warning.

+

mcpp issues an error message or warning to most of undefined items in Standard C. However, mcpp issues neither an error nor a warning to the following undefined items:

+
    +
  1. ' or /* in a header name in the form of a string literal: mcpp regards them as characters, resulting in a file open error. (' or /* in a header name enclosed with < and > is regarded as the beginning of a character constant or a comment, resulting in some errors.) Although how to treat \ in a header name is undefined in Standard C, mcpp does not check it because it may eventually cause an error when mcpp actually tries to open the file. mcpp on Windows issues a class 2 warning to \ and converts it to /.
    +
    +
  2. #undef defined: Although #undef-ing a name "defined" yields an undefined result, mcpp does not issue a message because, in the first place, mcpp does not allow definition of a macro named "defined", so the macro to be undefined never exists.
    +
  3. Illegal multi-byte character sequence in a comment: Although how to deal with such character sequence is undefined in Standard C, mcpp does not issue a message because it does no harm. (mcpp issues a warning to an illegal multi-byte character sequence in string literals, character constants and header names.)
    +
    +
  4. Identifiers that begin with _ (Reserved for compiler systems): Although using these identifiers in a user program will cause an undefined result, mcpp does not check it because mcpp does not always have a means to decide whether these identifiers are used in a user program or the compiler-system.
    +
    +
  5. __STDC_ISO_10646__, __STDC_IEC_559__, and __STDC_IEC_559_COMPLEX__: Although #defining or #undef-ing these optional C99 predefined macros yields an undefined result, mcpp does not check it because mcpp does not always have a means to determine whether these macros appear in a user program or the compiler-system. (These macros are most likely to be defined in a header file of a compiler system.)
    +
    +
  6. UCN equivalent sequence: Although it is undefined in C99 how to deal with a UCN equivalent sequence generated by deleting <backslash><newline> during the translation phase 2 or by concatenating string literals, mcpp does not issue a message and regards it as a UCN.
    +
+

For details on what is a violation of syntax rule or constraint, undefined, unspecified or implementation-defined in Standard C preprocessing, refer to cpp-test.html.

+

Even if an error occurs, mcpp continues preprocessing as long as they are not fatal one. mcpp shows the number of errors and returns the status of failure to the parent process when it exits.

+ +

5.4.1. Character and Token Related Errors

+
    +
  • Illegal control character 0x1b, skipped the character
    +A control code other than a white space character is found in a string literal, character constant, header name or comment. mcpp skips it and continues preprocessing.
    +
+

The following several messages are all token-related errors. For the first four, mcpp skips the line in question and continues preprocessing. The first three are string literal or other token-related errors, indicating that a closing quotation mark is not found by the end of the logical line. This type of error occurs when you write a text that does not take a form of a preprocessing-token sequence in neither a string literal nor comment, as shown below:

+
+#error I can't understand.
+
+

As processing-tokens are not so strictly defined as C tokens in the compiler-proper, most character sequences are regarded as pp-token sequences, as long as they belong to a source character set. Therefore, it is only this type of coding that causes a preprocessing-token error. Pp-token errors may occur in a skipped #if group.

+
    +
  • Unterminated string literal "string
    +A string literal is unterminated. A string literal cannot spread over several logical lines. If necessary, write a string literal on each of several lines and have the compiler concatenate them. This error may occur during conversion into a string by a #operator, in which case the line in question is not skipped. mcpp in OLDPREP mode does not make an unterminated string literal an error. (Instead, it regards the line end as literal end.) Nor mcpp does when invoked with the -a (-lang-asm, -x assembler-with-cpp) option (it issues a warning); it regards an unterminated string literal as a literal spreading over several lines and concatenates a line with the next by inserting \n.
    +
    +
  • Unterminated character constant 't understand.
    +A character constant is not terminated. mcpp in OLDPREP mode and lang-asm mode does not make it an error. (Instead, it regards the line end as literal end.)
    +
    +
  • Unterminated header name <header.h
    +A header-name is not terminated. " or ' in a header-name enclosed with < and > causes the above two errors, not this one. If /* is found in a header-name enclosed with < and >, mcpp regards it and the following text as a comment.
    +
    +
  • Empty character constant ''
    +A character constant is empty. +In lang-asm mode, mcpp only issues a warning, but an error in other modes.
    +
    +
  • Illegal UCN sequence
    +mcpp in STD mode invoked with __STDC_VERSION__ set to 199901L or in C++ mode can recognizes UCN. This message is issued when the number of orders of a hex sequence that begins with \u and \U in an identifier is less than four and eight, respectively. (If this occurs in a character constant in a #if expression, an undefined escape sequence warning results. Other tokens are not checked by mcpp.)
    +
    +
  • UCN cannot specify the value "0000007f"
    +UCN cannot specify a hex value in the ranges of 0 to 9f, except for 0x24 ($), 0x40 (@) and 0x60 (`), and of d800 to dfff. The former range agrees with the range of the basic source character set. The latter range falls into the reserved area for special characters. Note C++ does not have the latter restriction. (Specifications slightly differ among Standards for an unknown reason.) However, when mcpp in STD mode is invoked as C++ with -V199901L to preset the __cplusplus macro to 199901L or higher, mcpp behaves in accordance with the C99 specifications in this respect.
    +
    +
  • Illegal multi-byte character sequence "XY"
    +mcpp in STD mode compiled with OK_MBIDENT == TRUE allows for a multi-byte character in an identifier in C99, however, it will cause an error when it finds a character sequence that cannot be regarded as a multi-byte character although the first byte of the sequence is that of a multi-byte character. (In other than identifier, this illegal sequence causes a warning.)
    +
+ +

5.4.2. Unterminated Source File Related Errors

+

This section covers messages issued when a source file ends with an unterminated #if section or macro invocation. If the file (not included file) marks the end of input, the message "End of input", not "End of file", is issued.

+

These diagnostic messages are issued as an error or warning, depending on mcpp modes.

+

Standard mode issues these messages as error, in which case mcpp skips the macro invocation in question and restores relationship between paired directives in a #if section to that of when the file is initially included.

+

On the other hand, pre-Standard mode issues warnings. OLDPREP mode does not even issue warning except on unterminated macro call.

+
    +
  • End of file within #if (#ifdef) section started at line 123
    +#if (#ifdef or #ifndef) on the line 123 does not have a corresponding #endif.
    +
    +
  • End of file within macro invocation started at line 123
    +A macro invocation that begins at the line 123 is not terminated by the end of the file. This error may occur when an argument has an ill-balanced parenthesis, or when a token error occurs between opening and closing parentheses, in which case, mcpp continues to read tokens for a corresponding parenthesis until it reaches to the file end. (Possibly, a buffer overflow may occur before reaching there.) In addition, since macro expansion specifications vary among modes, a macro that is successfully expanded in a mode may not in other modes.
    +
+ +

5.4.3. Ill-Balanced Preprocessing Group Related Errors

+

This section covers errors caused by ill balanced directives of #if, #else and etc. Even if mcpp finds ill balance among these directives, it continues processing, assuming that the processing group so far still continues. mcpp checks to see whether directives are balanced even in a skipped #if group.

+

The #if (#ifdef) section is a block between #if (#ifdef or #ifndef) and #endif. The #if (#elif, #else) group is a smaller block, say, between #if (#ifdef or #ifndef) and #elif, between #elif and #else, or between #else and #endif within the #if (#ifdef) section.

+
    +
  • Already seen #else at line 123
    +Another #else (#elif) is found after #else at the line 123. #endif may be missing.
    +
    +
  • Not in a #if (#ifdef) section
    +#else (#elif, #endif) is found without #if (#ifdef or #ifndef).
    +
    +
  • Not in a #if (#ifdef) section in a source file
    +An included file has #else (#elif or #endif) without #if (#ifdef or #ifndef). If the included file in question had been in the including source file, this error would never have occurred. In other words, each of these directives contained in a separate file is not balanced by itself. The only Standard mode issues this error. (pre-Standard mode issues a warning.)
    +
+

The following two errors occur when #asm and #endasm are not balanced. These messages are issued only by compiler-specific-build for a particular compiler system and in pre-Standard mode.

+
    +
  • In #asm block started at line 123
    +A #asm block that begins at the line 123 has another #asm. #asm cannot be nested. Maybe, the programmer forgot to write #endasm.
    +
    +
  • Without #asm
    +#endasm is found in a non #asm block.
    +
+ +

5.4.4. Simple Syntax Errors on Directive Lines

+

This section covers simple syntax errors on directive lines that begin with #. The errors hereinafter discussed until 5.4.12 do not occur within a skipped #if group. (mcpp invoked with the -W8 option issues a warning to an unknown directive.)

+

When mcpp finds a directive line with a syntax error, it ignores the line and continues processing, in which case, it neither regards #if as the beginning of a section nor changes line numbers even with a #line. If a #include or #line line has a macro argument, Standard mode expands the macro and checks the syntax. Pre-Standard mode does not expand the macro.

+

Although the messages below do not show the directive name in question, the source line that follows the message show it. (A directive line with a comment converted to a space character always becomes one line, which is called "preprocessed line" here.)

+
    +
  • Illegal #directive "123"
    +A token that immediately follows # is not a name. The token must be a directive name. (OLDPREP mode regards #123 as #line 123.)
    +
    +
  • Unknown #directive "pseudo-directive"
    +The directive "pseudo-directive" is not implemented. mcpp invoked with the -a (-lang-asm or -x assembler-with-cpp) option issues a warning, not an error.
    +
    +
  • No argument
    +#if, #elif, #ifdef, #ifndef, #assert or #line has no arguments.
    +
    +
  • No header name
    +A #include line does not have an argument, or expansion of a macro argument of a #include line results in no token.
    +
    +
  • Not a header name "UNDEFINED_MACRO"
    +The specified argument is not a header name. This message is issued when a macro that should define a header name is not defined. A header name must be enclosed with < and >, or ", ".
    +
    +
  • Not an identifier "123"
    +#ifdef, #ifndef, #define or #undef requires an identifier as an argument, but 123 is not an identifier.
    +
    +
  • No identifier
    +#define or #undef does not have an argument.
    +
    +
  • No line number
    +#line has a macro argument, but its expansion has resulted in no token.
    +
    +
  • Not a line number "name"
    +The first argument of a #line is not a numeric token (preprocessing number).
    +
    +
  • Line number "0x123" isn't a decimal digits sequence
    +The first argument of a #line must be a decimal integer. Standard mode issues this message. In pre-Standard mode, hex and octal integer tokens are allowed although a warning is issued.
    +
    +
  • Line number "2147483648" is out of range of [1,2147483647]
    +The first argument of a #line must be within the range of 1 to 2147483647. 0 is regarded as an error. This is applied to Standard mode.
    +
    +
  • Not a file name "name"
    +The second argument of a #line, if any, must be a string literal. An identifier or wide string literal is not allowed here.
    +
+

The following error occurs only in Standard mode and this directive is ignored. OLDPREP mode issues neither an error nor a warning. KR mode issues a warning and continues preprocessing as if there had been no "junk" text.

+
    +
  • Excessive token sequence "junk"
    +#else, #endif, #asm, or #endasm line has a junk text, or such text follows a valid argument of #ifdef, #ifndef, #include, #line or #undef line.
    +
+ +

5.4.5. Syntax Errors in #if Expressions

+

This section covers syntax-related errors in #if, #elif and #assert directives. If a #if (#elif) line has these errors, mcpp evaluates it to false, skips the #if (#elif) group, and continues processing.

+

For a skipped #if (#ifdef, #ifndef, #elif or #else) group, mcpp checks validity of C preprocessing tokens and balance of these directives, but not other grammatical errors.

+

A #if line has a sub-expression whose evaluation is skipped. For example, in case of #if a || b, if "a" is evaluated to true, "b" is not evaluated at all. However, the following 14 types of syntax errors or translation limit errors are checked, even if they are located in a sub-expression whose evaluation is skipped.

+
    +
  • More than NEXP*2-1 constants stacked at "12"
    +The number of constants in the stack has exceeded NEXP*2-1 when mcpp tried to evaluate "12" in a #if expression. The depth of nested #if expressions is too deep.
    +
    +
  • More than NEXP*3-1 operators and parens stacked at "+"
    +The total number of operators and parenthesis in the stack has exceeded NEXP*3-1 when mcpp tried to evaluate '+' in a #if expression. (A pair of parentheses is counted as two.) The depth of nested #if expressions is too deep.
    +
    +
  • Misplaced constant "12"
    +A #if expression has a constant '12' where no constant should be found. This error occurs when casting, such as (int)0x8000, is used in a #if expression, where casting is not allowed. In this case, (int)0x8000 is evaluated to (0)0x8000, causing this error. The int is regarded as an identifier that is not defined as macro and is evaluated to 0.
    +
    +
  • Operator ">" in incorrect context
    +A #if expression has a > operator where no > should be found. If a macro MACRO is defined as 0 token, #if MACRO > 0 will be expanded to #if > 0, causing this error, which is indicated by the preceding warning -- Macro "MACRO" is expanded to 0 token.
    +
    +
  • Unterminated expression
    +A #if expression is not terminated. This error is caused by, for example, #if a || MACRO with MACRO defined as 0 token.
    +
    +
  • Excessive ")"
    +A #if expression has a ")" that does not corresponds to "(".
    +
    +
  • Missing ")"
    +A #if expression does not have a ")" that corresponds to "(".
    +
    +
  • Misplaced ":", previous operator is "+"
    +: without a corresponding ?.
    +
    +
  • Bad defined syntax
    +A #if defined has a syntax error. This error is caused by an unbalanced parenthesis or missing identifier in an argument. When a macro expansion causes this error, mcpp displays this message followed by an expansion result.
    +
    +
  • Can't use a string literal "string"
    +A string literal is not allowed as a constant in a #if expression.
    +
    +
  • Can't use a character constant 'a'
    +In POSTSTD mode, a character constant, or a wide character constant is not allowed as a constant in a #if expression.
    +
    +
  • Can't use the operator "++"
    +A #if expression has an illegal operator, such as = or ++.
    +
    +
  • Not an integer "1.23"
    +Only integers, including character constants, are allowed as a constant in a #if expression.
    +
    +
  • Can't use the character 0x24
    +A #if expression contains an illegal character (code 0x24), which is not any of the preprocessing tokens: identifiers, operators, punctuators, string literals, character constants, and preprocessing numbers. (Control codes are excluded since they had been checked before.) +Even compiler-specific-builds for compiler systems that allow $ in an identifier disallow it depending options. +Of course, this is not checked in a skipped group.
    +
+

The following error messages are relevant to #if sizeof. Only pre-Standard mode issues this error.

+
    +
  • sizeof: Syntax error
    +A #if sizeof has a syntax error. This error is caused by an unbalanced parenthesis or missing arguments.
    +
    +
  • sizeof: No type specified
    +Like sizeof(*), the "type" of #if sizeof (type) is not specified. Note that sizeof ((*)()) is a valid syntax to determine the size of a pointer to a function.
    +
+ +

5.4.6. #if Expression Evaluation Errors

+

The following errors do not occur in a sub-expression whose evaluation is skipped. (mcpp invoked with the -W8 option issues a warning.)

+

The Standards say that #if expression is evaluated by the largest integer type in C99 and long / unsigned long in C90 and in C++98. mcpp evaluate it by long long / unsigned long long even if in C90 or C++98, and issues a warning on the value outside of long / unsigned long in C90 and in C++98. In this subsection, please read the following long long / unsigned long long as long / unsigned long for the compiler without long long, and as long in pre-Standard mode. In POSTSTD mode, character constant in #if expression is not available and causes a different error.

+
    +
  • Constant "123456789012345678901" is out of range
    +An integer constant has a value that exceeded the range of unsigned long long.
    +
    +
  • Integer character constant 'abcdefghi' is out of range
    +A character constant 'abcdefghi' has a value that exceeded the range of unsigned long long.
    +
    +
  • Wide character constant L'abcde' is out of range
    +A wide character constant L'abcde' has a value that exceeded the range of unsigned long long. This error occurs only in STD mode.
    +
    +
  • 8 bits can't represent escape sequence 'x123'
    +An escape sequence in a character constant has exceeded the range of 8 bits ([0, 0xFF]).
    +
    +
  • 16 bits can't represent escape sequence L'x12345'
    +An escape sequence in a wide character constant has exceeded the range of 16 bits (32 bits for UTF-8). This error occurs only in STD mode.
    +
    +
  • Division by zero
    +A #if expression contains a division by zero. A division can be expressed using / or %. This error may be caused by a #if dividend/divisor with the divisor not defined as a macro. To avoid this error, "#if defined divisor && (dividend/divisor ..)" is recommended.
    +
    +
  • Result of "op" is out of range
    +An operation result using the operator op is out of range of (unsigned) long long. Op is any of binary operators: *, /, %, +, and -. When two's complement representation is used, the unary operator '-' will cause an overflow with -LLONG_MIN. Unsigned long long will never cause an overflow, so it does not cause this error. If the result of an algebraic calculation is out of range, a warning is issued.
    +
+

The following errors are relevant to sizeof. They are not issued in a sub-expression whose evaluation is skipped (The -W8 option issues a warning). Only in pre-Standard mode.

+
    +
  • sizeof: Unknown type "type"
    +The "type" of #if sizeof (type) is unknown.
    +
    +
  • sizeof: Illegal type combination with "type"
    +A type combination, like #if sizeof (long float), is invalid.
    +
+ +

5.4.7. #define Related Errors

+

This section covers #define related errors. A macro will not be defined if an error occurs at #define. The # and ## operator related errors occurs in Standard mode. __VA_ARGS__ related errors also occur in Standard mode. Although variable argument macro is a C99 specification, mcpp allows these macros to be used in C90 and C++ modes for compatibility with GCC and Visual C++ 2005, 2008. (A warning is issued.)

+
    +
  • "defined" shouldn't be defined
    +A macro named "defined" cannot be defined. Standard mode checks this.
    +
    +
  • "__STDC__" shouldn't be redefined
    +The __STDC__ macro cannot be #defined. The same can be said with __STDC_VERSION__, __FILE__, __LINE__, __DATE__ and __TIME__ (__STDC_HOSTED__ in C99 mode, and __cplusplus when mcpp is invoked with -+ option). Standard mode checks these macros.
    +
    +
  • "__VA_ARGS__" shouldn't be defined
    +C99 allows a variable argument macro with the __VA_ARGS__ parameter in the replacement list, but this identifier cannot be defined as a macro.
    +
    +
  • More than NMACPARS parameters
    +The number of parameters of a macro definition has exceeded NMACPARS.
    +
    +
  • Empty parameter
    +A macro definition has an empty parameter.
    +
    +
  • Illegal parameter "123"
    +A token other than an identifier is used in a parameter of a macro definition. In Standard mode, even an identifier __VA_ARGS__ cannot be used.
    +
    +
  • Duplicate parameter name "a"
    +A macro definition has a duplicate parameter name "a".
    +
    +
  • Missing "," or ")" in parameter list "(a,b"
    +A macro definition does not have a parenthesis ")" that closes a parameter list. Or, a parameter is followed by neither ',' nor ')'.
    +
    +
  • No token before ##
    +No token precedes the ## operator in the replacement list of a macro definition.
    +
    +
  • No token after ##
    +No token follows the ## operator in the replacement list of a macro definition.
    +
    +
  • ## after ##
    +The replacement list of a macro definition has a token sequence of "## ##". Some may do not regard this as error, but since concatenation of ## with other token always generates an invalid token, when this happens in macro expansion, it always causes an error. mcpp makes it an error when it finds this in a macro definition.
    +
    +
  • Not a formal parameter "id"
    +A function-like macro definition has a # operator whose operand id is not a parameter name.
    +
    +
  • "..." isn't the last parameter
    +"..." must be the last parameter of a macro definition. In pre-Standard mode, "..." causes an illegal parameter error.
    +
    +
  • "__VA_ARGS__" without corresponding "..."
    +"__VA_ARGS__", an identifier in a replacement list, can be used only when it has a corresponding "..." parameter.
    +
+

In STD mode of GCC-specific-build, if you write GCC2-spec variadic using __VA_ARGS__, you will get this error. +__VA_ARGS__ should be used only in GCC3-spec or C99-spec variadic.

+
    +
  • __VA_ARGS__ cannot be used in GCC2-spec variadic macro
    +
+ +

5.4.8. #undef Related Errors

+

This section covers #undef related errors.

+
    +
  • "__STDC__" shouldn't be undefined
    +The __STDC__ macro cannot be #undefined. The same can be said with __STDC_VERSION__, __FILE__, __LINE__, __DATE__ and __TIME__ (__STDC_HOSTED__ in C99 mode, and __cplusplus when invoked with -+ option). Standard mode checks these macros.
    +
+ +

5.4.9. Macro Expansion Errors

+

This section covers macro expansion errors. mcpp displays a macro definition, as well as the source filename and line number where it is found. The errors related to # or ## operator can occur only in Standard mode.

+
    +
  • Less than necessary N argument (s) in macro call "macro( a)"
    +A macro invocation has an insufficient number of arguments. This macro requires N number of arguments. mcpp assigns a zero token to missing arguments and continues to process. mcpp does not regard a macro that takes only one parameter with zero number of arguments specified as error because it cannot distinguish an empty argument from a missing argument. OLDPREP mode issues a warning instead of an error on this case.
    +
    +
  • More than necessary N argument (s) in macro call "macro( a, b, c)"
    +A macro invocation has too many arguments. The macro should take N number of arguments. mcpp ignores surplus arguments and continues processing. In OLDPREP mode, a warning is issued instead of an error.
    +
    +
  • Not a valid preprocessing token "+12"
    +The ## operator has concatenated two pp-tokens, resulting in an invalid token "+12". The token may be separated at a later time. Standard mode continues processing. STD mode invoked with the -lang-asm (-x assembler-with-cpp, -a) option also issues a warning instead of an error.
    +
    +
  • Not a valid string literal "\\"str\""
    +When a # operator tried to convert macro invocation's argument into a string, a token sequence of "\\"str"" has resulted, instead of a single valid string literal. \ that precedes or follows the literal cause the error. (When STD mode tries to convert such an argument into a string, it may or may not cause an unterminated string literal error.) STD mode tries to continue processing but maybe an error occurs again in the compilation phase. This error can not occur in POSTSTD mode. (An unterminated string literal error may occur).
    +
+

When the following errors occur, the macro invocation will be skipped.

+
    +
  • Buffer overflow expanding macro "macro" at "something"
    +A buffer overflow has occurred at "something" during macro expansion. Divide the macro.
    +
    +
  • Unterminated macro call "macro( a, (b, c)"
    +A macro invocation is not terminated. This error usually occurs when a macro invocation on the directive line is not terminated at that line. In Standard mode, a macro in an argument is expanded before argument substitution, in which case the macro invocation must be terminated in the argument. In POSTSTD mode, a macro invocation unterminated in a replacement list also causes this error.
    +
    +
  • Rescanning macro "macro" more than RESCAN_LIMIT times at "something"
    +The depth of nested macros is so deep that the number of rescans has exceeded RESCAN_LIMIT at "something" during expansion. This error occurs only in Standard mode but it is quite rare.
    +
    +
  • Recursive macro definition of "macro" to "macro"
    +A macro definition is recursive. This error occurs only in pre-Standard mode. When the number of rescans has exceeded PRESTD_RESCAN_LIMIT, mcpp regards it as a recursive macro definition.
    +
+

The following errors can occur only with -K option in STD mode. +These errors mean that the macro is extremely complex and buffer for macro notification ran short. +Almost impossible to happen in real life.

+
    +
  • Too many magics nested in macro argument +
  • Too many nested macros in tracing MACRO +
+ +

5.4.10. #error and #assert

+
    +
  • #error
    +A #error directive has been executed. Following this message, the #error line is displayed. If an argument itself contains a token error, such as unterminated strings, #error is not executed. The only Standard mode has #error.
    +
    +
  • Preprocessing assertion failed:
    +A #assert directive has been executed. Following this message, #assert line arguments are displayed. If any of the arguments contains an error, mcpp regards assertion has failed. The only mcpp of other than GCC-specific-build in pre-Standard mode has #assert.
    +
+ +

5.4.11. Failure of #include

+
    +
  • Can't open include file "file-name"
    +This error occurs when a file to include does not exist. Probably, this is due to wrong spelling of the file name or an "include directory" should have been specified.
    +
+ +

5.4.12. Other Errors

+

The following two are checked when mcpp is invoked with the -V199901L option. The same thing can be said when mcpp is invoked with the -V199901L option in C++ mode.

+
    +
  • Operand of _Pragma() is not a string literal
    +The _Pragma() operator must take an argument of one string literal or wide string literal. +
  • _Pragma operator found in directive line
    +_Pragma() operator is an alternative to #pragma directive. +It cannot be used in a directive line. +
+
+ +

5.5. Warnings (Class 1)

+

A warning is issued when source, although syntactically correct, possibly contains some coding mistakes or has a portability problem. Warnings are divided into five classes: 1, 2, 4, 8, and 16. These classes are enabled when the -W <n> option is specified on mcpp invocation. <n> specifies a ORed value of any of 1, 2, 4, 8, and 16. Class 4, for example, can be specified explicitly with -W4, and implicitly with -W<n>, where <n> is 1|4, 1|2|4, 2|4, 1|4|8, 4|8, 4|16, etc., because the AND-ed value of <n> and 4 is 4 (non-0).

+

Standard mode issues an error message to most of the source code that causes a Standard C undefined behavior, but a warning to some.

+

Likewise, Standard mode always issues a warning to the source code which uses Standard C unspecified specifications, except for the following:

+
    +
  1. Evaluation order of sub-expressions in a #if expression: Although the evaluation order of the operands of operators other than ||, &&, ? , and : is unspecified in Standard C, mcpp does not issue a warning because #if expression does not cause side-effects and therefore the evaluation order does not affect results. mcpp always evaluates integer constant tokens from left to right in the order they appear and performs an operation in accordance with an operator grouping rule when their values are needed. +
+

Standard mode issues a warning to many implementation-defined behaviors, except for the following:

+
    +
  1. Directories the #include directive searches for a file to include and how to construct a header-name pp-token from #include's argument: mcpp does not issue a warning because there will be too many warnings if it actually does. Unless a header name is a macro, the source token sequence, including spaces, are used as it is. If it is a macro, the expanded result, including spaces, is used. (In POSTSTD mode, a space character is inserted between pp-tokens during macro expansion. A header-name is constructed by concatenating the resulting pp-tokens from < to > and then by removing space characters. Anyway, in POSTSTD, a header-name enclosed with < and > is obsolete.) When mcpp encounters '#pragma MCPP debug path' or '#debug path', it displays a search path, instead of issuing a warning.
    +
    +
  2. Evaluation of a single byte character constant, such as 'a', and of a wide character constant that consists of only one multi-byte character, such as L'X', in a #if expression.: mcpp does not issue a warning because even with the same basic character set used, there are an unlimited number of factors that limits the portability, such as single byte Katakana, presence or absence of a sign, encoding scheme of Kanji, and etc. The same thing can be said with UCN.
    +
    +
  3. Bit operations using negative numbers in a #if expression: Although bit operation results depend on internal representation of an integer on a machine, most of the machines use two's complement representation, thus causing no portability problem. However, mcpp issues a warning to a right bit shift operation of a negative value and a division operation involving either or both of negative operands because they lack of portability.
    +
    +
  4. A sequence of several white space characters as a token separator: Standard C states that it is implementation-defined whether a sequence of white space characters is replaced by one space character in the translation phase 3, but you do not have to worry about this. Portability becomes an issue only when a preprocessing directive line has <vertical-tab> or <form-feed>. mcpp converts it into one space character and issues a warning. For a sequence of several space characters and tabs, mcpp compresses it into one space character without a warning.
    +
    +
  5. Compiler system's own built-in macros will not cause warning.
    +
    +
  6. #pragma sub-directive: Principally, mcpp does not issue a warning to #pragma sub-directive, however, for #pragma once, #pragma __setlocale, #pragma MCPP * which mcpp itself processes, it issues a warning if they have an invalid argument. In addition, mcpp issues a warning to GCC V.3's #pragmas, such as #pragma GCC poison (dependency), that resident preprocessor processes but mcpp does not.
    +
    +
  7. Doubled \: Although it is implementation-defined in C99 whether a single \ is changed into double \ (\\) when the # operator converts a UCN sequence into a string, mcpp does not issue a warning to this. mcpp does not double \.
    +
+

As you see, mcpp can perform almost all the portability checks necessary at a preprocessing level.

+

POSTSTD mode is identical with STD mode except for some specification differences described in section 2.1.

+

Regardless of the number of warnings, mcpp always returns a status of success. mcpp invoked with the -W0 option does not issue a warning.

+ +

5.5.1. Character, Token and Comment Related Warnings

+
    +
  • Converted [CR+LF] to [LF]
    +Converted the newline code from [CR+LF] to [LF]. This warning is issued when the source file for Windows is compiled on UNIX-like systems. This warning is issued only once, on warning level of class 1 in compiler-independent-build and class 2 in compiler-specific-build.
    +
    +
  • Illegal control character 0x1b in quotation
    +A string literal, character constant or header name has a control code other than a white space character, which may cause an error in the compiler-proper. This way of coding is not desirable. A control code in string literals or character constants should be written using an escape sequence.
    +
    +
  • Illegal multi-byte character sequence "XY" in quotation
    +The first byte (X) of "XY" in a string literal, character constant or header name is the first byte of a multi-byte character (Kanji), while the second byte (Y) is not the second byte of a multi-byte character. "XY" may be displayed garbled. mcpp does not regard "XY" as a single multi-byte character. It treats the first byte as a single-byte character and the second byte as the next character.
    +
    +mcpp usually does not issue a warning to a character in an external character set, as long as it is within the proper range. Even within the proper range, there are some holes (no corresponding characters). mcpp does not check whether such a character is defined or not. The following table shows the range of each multi-byte character set:
    +
    + + + + + + + + +
    Encoding first byte second byte
    shift-JIS 0x81-0x9f, 0xe0-0xfc0x40-0x7e, 0x80-0xfc
    EUC-JP 0x8e, 0xa1-0xfe 0xa1-0xfe
    KS C 5601 0xa1-0xfe 0xa1-0xfe
    GB 2312-80 0xa1-0xfe 0xa1-0xfe
    Big Five 0xa1-0xfe 0x40-0x7e, 0xa1-0xfe
    ISO-2022-JP0x21-0x7e 0x21-0x7e
    +
    +Beside character codes, ISO-2022-JP has a shift sequence. Apart from the shift sequence, all the multi-byte characters other than UTF-8 are two bytes length.
    +
    +In UTF-8, multi-byte characters are mostly 2 or 3 bytes, and possibly 4 bytes length. +Most of kanji are encoded in 3 bytes. +The first byte is within the range of 0xc2 to 0xef, second, third and fourth 0x80 to 0xbf. +Details are omitted here. +Anyway, all the bytes must fall within these ranges. +In addition, there are some illegal sequences even in these ranges: mcpp warns at those sequences.
    +
    +Note that since mcpp is unable to recognize EUC-JP's three byte encoding (JIS X 0213), it regards 0x8f + 0xa1-0xfe + 0xa1-0xfe not as one character but as two characters of 0x8f and 0xa1-0xfe + 0xa1-0xfe. As a result, mcpp does not issue a warning to the three byte encoding and can evaluate it correctly, except for a wide character constant in a #if expression. In EUC-JP, a character with the first byte of 0x8e (a half-width Katakana) is encoded in two bytes, and treated as a multi-byte character.
    +
    +This warning is not issued in a skipped #if group.
    +
    +
  • "/*" in comment
    +A comment has a sequence of /*. Unless it is intended, the programmer may have forgot to enclose the comment. Comments cannot be nested.
    +
    +
  • Too long identifier, truncated to "very_long_identifier"
    +Since the length of an identifier has exceeded IDMAX, it is truncated to IDMAX.
    +
    +
  • Illegal digit in octal number "089"
    +An octal numeric token contains 8 or 9. The only pre-Standard mode issues this warning. Standard mode does not check whether a numerical token on lines other than #if directives is correct or not. If a #if expression has an octal numeric token of 8 or 9, it will cause a "Not an integer" error.
    +
    +
  • Unterminated string literal, catenated to the next line
    +Although an unterminated string literal in a logical line is normally regarded as an error, mcpp invoked with the -lang-asm (-x assembler-with-cpp, -a) option regards it as a multi-line string literal and concatenates the line with the next by inserting '\n'. This way of writing has no advantage. Using a functionality to concatenate adjacent string literals is preferable.
    +
  • Unterminated character constant 't understand.
    +mcpp in lang-asm mode does not regard this an error.
    +
  • Empty character constant ''
    +A character constant is empty. +In lang-asm mode, mcpp only issues a warning.
    +
+ +

5.5.2. Unterminated Source File Related Warnings

+

On unterminated line or comments, the following messages are issued. OLDPREP mode does not issue warning.

+
    +
  • End of file with no newline, supplemented newline
    +A file must be terminated with a newline. mcpp supplements the line with <newline>.
    +
    +
  • End of file with \, deleted the \
    +A file must not be terminated with <backslash><newline>. mcpp deletes the <backslash>.
    +
    +
  • End of file with unterminated comment, terminated the comment
    +A comment is not terminated. mcpp terminates the comment.
    +
+

The following warning messages are issued in pre-Standard mode. Pre-Standard mode ignores these warnings to continue processing until it reaches the end of input, causing many unexpected results. Standard mode issues an error. OLDPREP mode does not issue even warning, except on unterminated macro.

+
    +
  • End of file within #if (#ifdef) section starting from line 123
    +
    +
  • End of file within macro invocation starting from line 123
    +
    +
  • End of file with unterminated #asm block starting from line 123
    +#asm on the line 123 does not have a corresponding #endasm.
    +
+ +

5.5.3. Directive Line Related Warnings

+
    +
  • The macro is redefined
    +mcpp displays this message followed by the source filename and line number where this macro definition is found.
    +The macro has been redefined with a different content. Source must not be well organized. The following conditions must be met for macro definitions with the same name to exist. Or, the new definition is regarded as a redefinition, and a warning is issued.
    +
    +
      +
    1. Have the same number of parameters.
      +
    2. Have the same replacement list. (One or more white space character between tokens are regarded as one. In POSTSTD, the difference of the token separators does not matter because any number of space characters is changed into one, regardless of the presence or absence of the token separators.)
      +
    3. In Standard mode, parameter names must be the same. In POSTSTD mode and in pre-Standard mode, they are not checked.
      +
      +
    +
  • Unknown argument "name"
    +There is no such an argument of '#pragma MCPP debug' or '#debug' as "name".
    +
  • No argument
    +A '#pragma MCPP debug' or '#debug' does not have an argument.
    +
  • Not an identifier "123"
    +The argument of a '#pragma MCPP debug' or '#debug' is not an identifier.
    +
+

The following message is issued only in Standard mode.

+
    +
  • "and" is defined as macro
    +"and" is defined as a macro in C++.
    +Whereas in C95 "and" or other 11 names are defined as macros by <iso646.h>, those are operator tokens in C++,
    +
+

The following message is issued only in STD mode.

+
    +
  • No space between macro name "MACRO" and repl-text
    +There is no space between macro name and replacement list of a #define line. Normally, this does not happen, but it does happens when an illegal character is used in a macro name as follows:
    +
    +#define THIS$AND$THAT(a, b)   ((a) + (b))
    +
    +mcpp interprets this as follows:
    +
    +#define THIS  $AND$THAT(a, b) ((a) + (b))
    +
    +and issues a warning. Of course, this is a quite rare case.
    +
+

The following warnings are issued only in lang-asm mode.

+
    +
  • Illegal #directive "+" +
  • Unknown #directive "pseudo-directive"
    +Though these are usually errors, lang-asm mode issues only warnings.
    +
+

The following warnings on #pragma line are issued only in Standard mode. +The lines are outputted in principle in spite of the warnings. +However, the lines to be processed by preprocessor such as most of the lines starting with #pragma MCPP or #pragma GCC are not outputted. +The pragmas for compiler or linker such as #pragma GCC visibility * are outputted without warning.

+
    +
  • No sub-directive
    +A #pragma line does not have any argument. The line is ignored.
    +
    +
  • Unknown encoding "encoding"
    +The encoding name, "encoding", specified with #pragma __setlocale( "encoding") is not implemented. For the encoding name, refer to 2.8.
    +
    +
  • Too long encoding name "encoding"
    +The encoding name, "long-long-encoding", specified with #pragma __setlocale( "long-long-encoding") exceeds 19 bytes. mcpp ignores it.
    +
    +
  • Bad push_macro syntax
    +
  • Bad pop_macro syntax
    +There is a syntax error in #pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro or #pragma pop_macro. To use these #pragma directives, first enclose a macro name in an argument with ", " and then further enclose with ( ). For example, ("MACRO"). (A redundant specification for compatibility with Visual C.)
    +
    +
  • "MACRO" has not been defined
    +MACRO in the argument,("MACRO"), for #pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro, or #pragma pop_macro is not defined as a macro.
    +
  • "MACRO" is already pushed
    +MACRO of #pragma MCPP push_macro ("MACRO") has been pushed and then further #undef-ed. Without redefining the MACRO, push would not be possible.
    +
  • "MACRO" has not been pushed
    +MACRO in #pragma MCPP pop_macro( "MACRO") has not been pushed. It may have been already popped.
    +
+

The GCC-specific-build issues the following warnings:

+
    +
  • Ignored #ident
    +
  • Ignored #sccs
    +#ident or #sccs lines are ignored.
    +
+

GCC-specific-build issues a Class 2 warning to a line with #pragma GCC followed by either poison or dependency and does not output the line. GCC V.3 resident preprocessor process the line but mcpp does not.

+

The following warnings are issued only in pre-Standard mode. Standard mode regards them as errors.

+
    +
  • Not in a #if (#ifdef) section in a source file
    +
  • Line number "0x123" isn't a decimal digit sequence
    +
+

KR mode issues the following warning. Standard mode issues the same warning only to #pragma once, #pragma MCPP put_defines, #pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro, #pragma pop_macro, #pragma MCPP debug, #pragma MCPP end_debug, and #endif for GCC-specific-build on STD mode; for other directives, Standard mode issues an error. OLDPREP mode issues neither an error nor a warning.

+
    +
  • Excessive token sequence "junk"
    +
+ +

5.5.4. #if Expression Related Warnings

+

The following three warnings are relevant to an argument of #if, #elif, or #assert:

+
    +
  • Macro "MACRO" is expanded to "defined"
    +The macro MACRO in a #if expression has been expanded to "defined". mcpp treats this strange macro not as identifier but as operator. How to treat it is undefined in Standard C.
    +
    +
  • Macro "MACRO" is expanded to "sizeof"
    +The macro MACRO in a #if expression has been expanded to sizeof. mcpp treats this strange macro not as identifier but as operator. Pre-Standard mode issues this warning.
    +
    +
  • Macro "MACRO" is expanded to 0 token
    +The macro MACRO has been expanded to zero token. If this happens in a #if expression, it almost always causes an error. The purpose of this warning is to indicate the cause of an error.
    +
+

The followings warnings are also relevant to an argument of #if, #elif or #assert. They are not issued in a sub-expression whose evaluation is skipped. (mcpp invoked with the -W8 option issues them.)

+
    +
  • Undefined escape sequence '\x'
    +There is no such escape sequence as \x. \x is evaluated to a two byte sequence. (Of course, an escape sequence of "\x" followed by a hex string is valid.) This warning is also issued to a UCN with an insufficient number of orders.
    +
+

The followings warnings are relevant to operations and types in a constant expression on #if, #elif or #assert lines. No warnings are also issued in a skipped sub-expression. (mcpp invoked with -W8 issues them.)

+

mcpp evaluate #if expression by long long / unsigned long long even if in C90 or C++98, and issues a warning on the value outside of long / unsigned long in C90 and in C++98. Also on LL suffix in other than C99, mcpp issues a warning. These warnings are of class 1 in compiler-independent-build and class 2 in compiler-specific-build. In POSTSTD mode, character constants are not used in #if expression, hence no warning is issued. (Those make errors.)

+
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +An integer constant has a value that exceeded the range of unsigned long.
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +A character constant 'abcde' has a value that exceeded the range of unsigned long.
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +A wide character constant L'abc' has a value that exceeded the range of unsigned long. This error occurs only in STD mode.
    +
  • Result of "op" is out of range of (unsigned) long
    +An operation result using the operator op is out of range of (unsigned) long. Op is any of binary operators: *, /, %, +, and -. When two's complement representation is used, the unary operator '-' will cause an overflow with -LONG_MIN. Unsigned long will never cause an overflow, so it does not cause an error. If the result of an algebraic calculation is out of range, a warning is issued.
    +
  • LL suffix is used in other than C99 mode "123LL"
    +LL suffix is used for an integer in other than C99 mode.
    +
  • Shift count "40" is larger than bit count of long
    +The value of the right operand of a bit shift operator, << or >>, exceeds the bit count of long.
    +
    +
  • Negative value "-1" is converted to positive "18446744073709551615"
    +A mixture of signed and unsigned operations results in conversion of a signed negative value into an unsigned positive value. This is not an error, but indicates source code may contain a bug. For both operands of a binary operator, such as *, /, %, +, -, <, >, <=, >=, ==, !=, &, ^ and | , and the second and third operands of a ternary operator, ? and :, if one operand is unsigned and the other is signed, the signed one is always converted into unsigned.
    +
    +
  • Illegal shift count "-1"
    +The value of the right operand of a bit shift operator, << or >>, is a negative number or exceeds the bit count of long long. Probably, this is also a bug in source code.
    +
    +
  • "op" of negative number isn't portable
    +If an operation using a binary operator (op) results in either or both of negative operands, it lacks of portability. "Op" is any of /, %, and >>. The >> operator with a negative left operand provides portability across compiler systems on computers having an arithmetic shift command, where a one-bit shift means a division by 2. Otherwise, it does not provide portability.
    +
+ +

5.5.5. Macro Expansion Related Warnings

+

In these warnings, mcpp displays a macro definition followed by the source filename and line number where the macro is defined.

+
    +
  • Macro started at line 123 swallowed directive-like line
    +mcpp has read a line that begins with # as an argument of the macro that begins at the line 123. Maybe, the macro invocation has a bug. If it had not been for the macro, the line that begins with # would have been interpreted as a directive line. The same thing could be said if the macro had been located in a #if group whose evaluation is skipped, and the line is treated as a directive, because such macro is never expanded.
    +
    +
  • Replacement text "sub(" of macro "head" involved subsequent text
    +Rescanning of the replacement list "sub(" of the macro "head" has involved the text succeeding the macro invocation. K&R 1st to Standard C did not regard this as an error, but if you used this type of macro without having these standards in mind to receive this warning, your macro definition or macro invocation is probably not correct. If you are intended to use such macro, it is an unusual macro. The only STD mode issues this warning. COMPAT mode issues this warning only on class 8. In pre-Standard mode, the same situation may arise but no warning is issued. POSTSTD mode never issues this warning because rescanning does not involve the text succeeding the replacement list. (A macro may be expanded quite differently or causes an "unterminated macro call" error.)
    +
    +
  • Less than necessary N argument (s) in macro call "macro( a)"
    +An insufficient number of arguments of a macro invocation. Normally, this causes an error, but in case of missing only one argument of a macro that takes a variable number of arguments, mcpp issues a warning. This is to decrease migration problems of variable argument macros between GCC and C99.
    +
    +
  • Removed ',' preceding the absent variable argument
    +Since variable argument is absent and the replacement list has a sequence ", ## __VA_ARGS__", removed the comma immediately preceding "## __VA_ARGS__". +This warning is issued only in Standard mode of GCC-specific-build.
    +
    +
  • Old style predefined macro "linux" is used
    +The non-conforming predefined macro without leading '_' is used. +This warning is only on Standard mode of GCC-specific-build.
    +
+

The following two are issued only in OLDPREP mode. (In other mode it causes an error.) +

    +
  • Less than necessary N argument(s) in macro call "macro( a)"
  • More than necessary N argument(s) in macro call "macro( a, b, c)"
    +
+ +

5.5.6. Line Number Related Warnings

+

This section covers line number related warnings.

+
    +
  • Line number "32768" is out of range of [1,32767]
    +In C90 and C++, the first argument of a #line must be within the range of 1 to 32767. 0 is also out of range. With __STDC_VERSION__ >= 199901L or __cplusplus >= 199901L, the valid range is 1 to 2147483647. Therefore, in C90 or C++ mode, mcpp issues a warning, not an error, to the range of 32768 to 2147483647. Standard mode issues this warning.
    +
+

In C90, when you use #line to specify a value slightly below 32767, you won't receive an error, but sooner or later, the line number will exceed 32767, in which case, mcpp continues to increase the line number while issuing a warning. Some compiler-proper may not accept this large line number. It is not desirable to specify a large number with #line.

+
    +
  • Line number 32768 got beyond range
    +The source line number has reached 32768, at which a warning is issued one time.
    +
    +
  • Line number 32769 is out of range
    +When the __LINE__ macro is expanded, the lime number has exceeded 32767.
    +
+ +

5.5.7. #pragma MCPP warning, #warning

+
    +
  • #warning
    +
  • #pragma MCPP warning
    +A #pragma MCPP warning (#warning) directive has been executed. Following the above message, the line is displayed. (If an argument of #pragma MCPP warning has a token error, such as unterminated string, #pragma MCPP warning is not executed.) Although this directive appears in the Warning Level 1 section, this warning is issued at every warning level. Standard mode has #pragma MCPP warning, while pre-Standard mode has #warning.
    +
+
+ +

5.6. Warnings (Class 2)

+

This section covers warnings to code that does not contains a bug but causes a portability problem.

+
    +
  • Converted [CR+LF] to [LF]
    +Converted the newline code from [CR+LF] to [LF]. This warning is issued on warning level of class 1 in compiler-independent-build and class 2 in compiler-specific-build.
    +
+

mcpp evaluate #if expression by long long / unsigned long long even if in C90 or C++98, and issues a warning on the value outside of long / unsigned long in C90 and in C++98. Also LL suffix in other than C99 mode gets a warning as well as i64 suffix of compiler-specific-builds for Visual C and Borland C. These warnings are of class 1 in compiler-independent-build and class 2 in compiler-specific-build.

+
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +
  • Result of "op" is out of range of (unsigned) long
    +
  • LL suffix is used in other than C99 mode "123LL"
    +
  • I64 suffix is used in other than C99 mode "123i64"
    +
  • Shift count "40" is larger than bit count of long
    +
+

Only the Standard mode issues the following five warnings:

+
    +
  • Parsed "//" as comment
    +A text from // to the end of the line is interpreted as a comment. This is a legal notation in C99 and C++. In C90 mode mcpp treats it as a comment after issuing a warning.
    +
    +
  • Variable argument macro is defined
    +Although it is the C99 Standard that stipulates variable argument macros, a variable argument macro has been defined in C90 or C++ mode.
    +
    +
  • Empty argument in macro call "MACRO( a, ,"
    +A macro invocation has an empty argument, in which case, mcpp regards the argument as zero number of pp-token sequences and treats it as such. The empty argument is legal in C99, while it is undefined in C90, thus causing a lack of portability. (mcpp regards an empty argument even without a ',' not as an empty argument, but as a missing argument, thus issuing an error. Since zero number of arguments and one empty argument is syntactically indistinguishable, mcpp does not make both an error.) Writing an empty argument in source code is not generally preferable. I recommend that you should code:
    +
    +#define EMPTY
    +
    +, if possible, and then write EMPTY where an empty argument is written.
    +
    +
  • Skipped the #pragma line
    +GCC V.3 provides several #pragma directives in the form of #pragma GCC <args>. Its preprocessor processes some of them, but mcpp does not support #pragma GCC poison and #pragma GCC dependency. This warning is issued to a #pragma directive compiler-specific preprocessors process but mcpp does not.
    +
    +
  • Not a valid preprocessing token "+12"
    +Concatenating two pp-tokens with the ## operator results in an invalid token "+12", which normally causes an error. However, mcpp invoked with the -lang-asm (-x assembler-with-cpp, -a) option does not regard it as an error.
    +
+

The following warning is issued only in POSTSTD mode.

+
    +
  • Header-name enclosed by <, > is an obsolescent feature <stdio.h>
    +The header name in the form of <stdio.h> is one of the specifications I want to abolish. I recommend to use "stdio.h".
    +
+

The following two warnings are issued only in some compiler systems. Of course, the coding in question is valid in those particular systems, but it lacks of portability, so a warning is issued to remind users of it.

+
    +
  • #include_next is not allowed by Standard
    +
  • #warning is not allowed by Standard
    +These directives are valid in GCC but not Standard C-conforming and lack of portability.
    +
  • GCC2-spec variadic macro is defined
    +Though GCC2-spec variadic macro is valid in GCC-specific-build, this macro is not portable.
    +
    +
  • Converted to /
    +A #include directive contains \ in the header name. mcpp converts \ into /. "\" is a valid path delimiter in OSs, such as Windows, but undefined in Standard C. It is safe to use /. mcpp on Windows issues this warning only once. (mcpp does not regard " preceded by \ as a delimiter of a string literal, raising an "unterminated string literal" error.)
    +
    +
  • '$' in identifier "THIS$AND$THAT"
    +An identifier has a '$'. The only mcpp compiled with DOLLAR_IN_NAME set to TRUE issues this warning only once because '$' lacks of portability although it is valid in this mcpp. '$' being regarded as a pp-token, other mcpp parses THIS$AND$THAT into five components THIS, $, AND, $ and THAT, resulting in a compiler error.
    +
+
+ +

5.7. Warnings (Class 4)

+

Standard C guarantees some minimum translation limits. It is desirable that a preprocessor imposes translation limits that exceed these values, but source programs that uses preprocessor' own translation limits will restrict portability. mcpp provides some macros in "system.H" that allows you to set translation limits to any values you like. mcpp in Standard mode issues a warning to source code that exceeds a Standard C guaranteed limit. However, these messages are excluded from Class 1 and 2 because they may be issued frequently, depending on standard headers of compiler systems or source programs.

+
    +
  • Logical source line longer than 509 bytes
    +The length of a logical source line has exceeded 509 bytes.
    +
    +
  • Quotation longer than 509 bytes "very_very_long_string"
    +The length of a string literal, character constant or header name has exceeded 509 bytes.
    +
    +
  • More than 8 nesting of #include
    +The depth of nested #includes has exceeded 8. This warning is issued only when it reaches 9.
    +
    +
  • More than 8 nesting of #if (#ifdef) sections
    +The depth of nested #ifs, #ifdefs, or #ifndefs has exceeded 8. This warning is issued only when it reaches 9.
    +
    +
  • More than 1024 macros defined
    +The number of defined macros has reached 1024. This number includes both of pre-defined macros and those defined in header files.
    +
    +
  • String literal longer than 509 bytes "very_very_long_string"
    +Expansion of a macro using the # operator has generated a string literal longer than 509 bytes.
    +
+

The following warnings are not issued in a skipped #if group.

+
    +
  • More than 32 nesting of parens in #if expression
    +The depth of nested parentheses in a #if expression has exceeded 32. This warning is issued only when it reaches 33.
    +
    +
  • More than 31 parameters
    +The number of parameters of a macro definition has exceeded 31.
    +
    +
  • Identifier longer than 31 bytes "very_very_long_name"
    +The length of an identifier has exceeded 31 bytes.
    +
+

With __STDC_VERSION__ >= 199901L, the Standard specified translation limits are as follows:

+
+ + + + + + + + + +
Length of logical source line 4095 bytes
Length of string literal, character constant, or header name4095 bytes
Identifier length 63 characters
Depth of nested #includes 15
Depth of nested #ifs, #ifdefs, or #ifndefs 63
Depth of nested parentheses in #if expression 63
Number of macro parameters 127
Number of definable macros 4095
+
+

Note that the length of a UCN or multi-byte-character in an identifier is counted as the number of characters, not bytes. (A queer stipulation)

+

When mcpp is invoked with the -+ option to specify C++ preprocessing, the Standard guideline of translation limits are as follows:

+
+ + + + + + + + + +
Length of logical source line 65536 bytes
Length of string literal, character constant, or header name65536 bytes
Identifier length 1024 characters
Depth of nested #includes 256
Depth of nested #ifs, #ifdefs, or #ifndefs 256
Depth of nested parentheses in #if expression 256
Number of macro parameters 256
Number of definable macros 65536
+
+

Note that mcpp allows the maximum number of macro parameters of 255. So, when it reaches 256, mcpp issues an error.

+

The following warnings are excluded from class 1 and 2 because they are issued too frequently.

+
    +
  • Converted 0x0c to a space
    +[FF], [VT], [CR] (other than in [CR][LF] sequence) in source code as token separators are converted into a space character. How to deal with these token separators located on a directive line is undefined in Standard C. If they are located in comments, string literals, or character constants, mcpp does not convert them. (Of course, mcpp can do so, but I do not want mcpp to impose a greater restriction on a character set used since it essentially depends on the compiler-proper.) On the other hand, [TAB] as a token separator is converted into a space character, but no warning is issued because it does not affect compilation at all. ([TAB] means nothing but a space to both of preprocessor and compiler-proper.) [FF] are found sometimes in actual source to indicate "end of page". This is not a recommendable style.
    +
    +
  • Undefined symbol
    +In #if line the identifier "name" is not defined as a macro. It is evaluated to zero. This is not an error at all, but may be a program bug. No warning is issued to an argument of a #if defined. This warning can be avoided by writing #if defined name && (name ..), instead of #if name .., or by invoking mcpp with the -D name=0 option. C++ gives "true" and "false" tokens special treatment and evaluates to 1 and 0, respectively, without a warning.
    +
    +
  • Multi-character wide character constant L'ab' isn't portable
    +A wide character constant value varies even among compiler systems using the same character set because the encoding scheme of wide character constants and how to evaluate multi-characters depend on compiler systems. Therefore, #if expressions using them do not provide portability. The only STD mode issues this warning. POSTSTD mode does not permit character literal in #if expression, so this causes an error. (The next item is also treated the same way.)
    +
    +
  • Multi-character or multi-byte character constant 'XY' isn't portable
    +Since how to evaluate the value of a multi-character or multi-byte character constant depends on compiler systems, #if expressions using them do not provide portability. The only STD mode issues this warning.
    +
+

The following two warnings are issued only in Standard mode.

+
    +
  • Macro with mixing of ## and # operators isn't portable
    +A function-like macro has a token sequence of "## #" in the replacement list. This sequence of two operators lack of portability because their priority is unspecified in Standard C. mcpp takes precedence # over ##. Note that if a function-like macro has a token sequence in the reverse order "# ##", mcpp regards it as an error because the operand of the # operator must be a parameter.
    +
    +
  • Macro with multiple ## operators isn't portable
    +A macro definition has only one token or parameter inserted between ## operators in the replacement list. This macro may lack of portability because the evaluation order of ## operators is unspecified in Standard C. mcpp applies the ## operator from left to right.
    +
+

This warning is only with -K option in STD mode.

+
    +
  • Too long comment, discarded up to here
    +The comment is longer than 256 lines, mcpp discards it up to here. +It is not a good style to include long document in source.
    +
+
+ +

5.8. Warnings (Class 8)

+

There is little chance that the indicated source code contains a bug, but these messages are issued to call attention to it. mcpp invoked with the -W8 option issues these warnings.

+

In a skipped #if group, whether preprocessing directives, such as #ifdef, #ifndef, #elif, #else, and #endif, are balanced or not is checked. However, mcpp invoked with the -W8 option also checks non-conforming or unknown directives. Standard mode issues a warning when the depth of nested #ifs exceeds 8.

+
    +
  • Illegal #directive "+" (in skipped block)
    +
  • Unknown #directive "pseudo-directive" (in skipped block)
    +
  • More than 8 nesting of #if (#ifdef) sections (in skipped block)
    +
  • #include_next is not allowed by Standard (in skipped block)
    +
  • #warning is not allowed by Standard (in skipped block)
    +
+

The following warnings are related to #if expression. Given an expression of #if a || b, for example, if "a" is true, "b" is not evaluated. However, mcpp invoked with -W8 issues a warning to non-evaluated sub-expressions, in which case, the note saying "in non-evaluated sub-expression" is appended.

+
    +
  • Constant "123456789012345678901" is out of range
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +
  • LL suffix is used in other than C99 mode "123LL"
    +
  • I64 suffix is used in other than C99 mode "123i64"
    +
  • Shift count "40" is larger than bit count of long
    +
  • Integer character constant 'abcdefghi' is out of range
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +
  • Wide character constant L'abcdef' is out of range
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +
  • 8 bits can't represent escape sequence 'x123'
    +
  • 16 bits can't represent escape sequence L'x12345'
    +
  • Division by zero
    +
  • Undefined symbol "name", evaluated to 0
    +
  • sizeof: Unknown type "type"
    +
  • sizeof: Illegal type combination with "type"
    +
  • Multi-character wide character constant L'ab' isn't portable
    +
  • Multi-character or multi-byte character constant 'XY' isn't portable
    +
  • Undefined escape sequence '\x'
    +
  • UCN cannot specify the value "0000007f"
    +
  • Negative value "-1" is converted to positive "18446744073709551615"
    +
  • Result of "op" is out of range
    +
  • Result of "op" is out of range of (unsigned) long
    +
  • Illegal shift count "-1"
    +
  • "op" of negative number isn't portable
    +
    +
  • sizeof is disallowed in C Standard
    +The purpose of this warning is to remind users of the fact that Standard C does not allow for #if sizeof, although pre-Standard mode implements it.
    +
    +
  • "MACRO" wasn't defined
    +An undefined name is specified with #undef. Standard C does not regard it as an error.
    +
    +
  • Macro "macro" needs arguments
    +A token with the same name as a macro with arguments appears in a stand alone manner. mcpp does not expand it and leave it as it is. The only pre-Standard mode issues this warning. (Standard mode does not issue a warning since such a token does not cause any problem.)
    +
    +
  • Replacement text "sub(" of macro "head" involved subsequent text
    +Rescanning of the replacement list "sub(" of the macro "head" has involved the text succeeding the macro invocation. COMPAT mode issues this warning only on class 8, whereas STD mode issues on class 1.
    +
+
+ +

5.9. Warnings (Class 16)

+

Trigraphs and digraphs are not used at all in an environment where they are not need to. If they are found in such an environment, attention needs to be paid. The purpose of the -W16 option is to find such trigraphs and digraphs. On the other hand, these warnings are very bothersome in an environment where trigraphs or digraphs are used on a regular basis because they are issued very frequently. For this reason, I set up a separate class for these warnings. Anyway, mcpp issues these messages only in the state where the trigraphs or digraphs are enabled. Digraph is for Standard mode only, and trigraph is for STD mode only.

+
    +
  • 2 trigraph(s) converted
    +Two trigraph sequences in this physical line have been converted. Does the programmer really intend to write trigraph?
    +
    +
  • 2 digraph(s) converted
    +Two digraph sequences in this line have been converted. Does the programmer really intend to write digraphs? mcpp compiled with HAVE_DIGRAPHS == FALSE in STD mode converts a digraph into a regular token in the following manner after preprocessing:
    +
    +<% -> {      <: -> [      %:    -> #
    +%> -> }      :> -> ]      %:%:  -> ##
    +
    +Therefore, the compiler-proper is not necessary to be able to handle digraphs. However, POSTSTD mode converts a digraph into a regular pp-token during the translation phase 1. The difference of this behavior between the modes appears when a # operator converts a digraph into a string; STD mode directly converts a digraph sequence into a string, while POSTSTD mode converts it into a regular pp-token, and then into a string. In addition, if a string literal contains a character sequence which is equivalent to a digraph sequence, STD mode does not convert it, while POSTSTD mode converts it into a character sequence of the corresponding pp-tokens.
    +
    +STD mode does not issue a warning to a digraph that appears on a preprocessing-directive line and disappears in a due course because this warning is issued only to converted digraphs.
    +
+
+ +

5.10. Diagnostic Messages Index

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Diagnostic MessageFatal
error
ErrorWarning class
124816
"..." isn't the last parameter5.4.7
"/*" in comment5.5.1
"and" is defined as macro5.5.3
"defined" shouldn't be defined5.4.7
"MACRO" has not been defined5.5.3
"MACRO" has not been pushed5.5.3
"MACRO" is already pushed5.5.3
"MACRO" wasn't defined5.8
"op" of negative number isn't portable5.5.45.8
"__STDC__" shouldn't be redefined5.4.7
"__STDC__" shouldn't be undefined5.4.8
"__VA_ARGS__" without corresponding "..."5.4.7
"__VA_ARGS__" cannot be used in GCC2-spec variadic macro5.4.7
## after ##5.4.7
#error5.4.10
#include_next is not allowed by Standard5.65.8
#warning5.5.7
'$' in identifier "THIS$AND$THAT"5.6
16 bits can't represent escape sequence L'\x12345'5.4.65.8
2 digraph(s) converted5.9
2 trigraph(s) converted5.9
8 bits can't represent escape sequence '\x123'5.4.65.8
_Pragma operator found in directive line5.4.12
Already seen #else at line 1235.4.3
Bad defined syntax5.4.5
Bad pop_macro syntax5.5.3
Bad push_macro syntax5.5.3
Buffer overflow expanding macro "macro" at "something"5.4.9
Buffer overflow scanning token "token"5.3.3
Bug:5.3.1
Can't open include file "file-name"5.4.11
Can't use a character constant 'a'5.4.5
Can't use a string literal "string"5.4.5
Can't use the character 0x245.4.5
Can't use the operator "++"5.4.5
Constant "123456789012" is out of range of (unsigned) long5.5.45.65.8
Constant "1234567890123456789012" is out of range5.4.65.8
Converted 0x0c to a space5.7
Converted [CR+LF] to [LF]5.5.15.6
Converted \ to /5.6
Division by zero5.4.65.8
Duplicate parameter names "a"5.4.7
Empty argument in macro call "MACRO( a, ,"5.6
Empty character constant ''5.4.15.5.1
Empty parameter5.4.7
End of file with no newline, supplemented the newline5.5.2
End of file with unterminated #asm block started at line 1235.4.25.5.2
End of file with unterminated comment, terminated the comment5.5.2
End of file with \, deleted the \5.5.2
End of file within #if (#ifdef) section started at line 1235.4.25.5.2
End of file within macro call started at line 1235.4.25.5.2
Excessive ")"5.4.5
Excessive token sequence "junk"5.4.45.5.3
File read error5.3.2
File write error5.3.2
GCC2-spec variadic macro is defined5.6
Header-name enclosed by <, > is an obsolescent feature 5.6
I64 suffix is used in other than C99 mode "123i64"5.65.8
Identifier longer than 31 bytes "very_very_long_name"5.7
Ignored #ident5.5.35.8
Ignored #sccs5.5.35.8
Illegal #directive "123"5.4.45.5.35.8
Illegal control character 0x1b in quotation5.5.1
Illegal control character 0x1b, skipped the character5.4.1
Illegal digit in octal number "089"5.5.1
Illegal multi-byte character sequence "XY" in quotation5.5.1
Illegal multi-byte character sequence "XY"5.4.1
Illegal parameter "123"5.4.7
Illegal shift count "-1"5.5.45.8
Illegal UCN sequence5.4.1
In #asm block started at line 1235.4.3
Integer character constant 'abcde' is out of range of unsigned long5.5.45.65.8
Integer character constant 'abcdefghi' is out of range5.4.65.8
Less than necessary N argument(s) in macro call "macro( a)"5.4.95.5.5
Line number "0x123" isn't a decimal digits sequence5.4.45.5.6
Line number "2147483648" is out of range of 1,21474836475.4.4
Line number "32768" got beyond range5.5.6
Line number "32768" is out of range of 1,327675.5.6
Line number "32769" is out of range5.5.6
LL suffix is used in other than C99 mode "123LL"5.5.45.65.8
Logical source line longer than 509 bytes5.7
Macro "MACRO" is expanded to "defined"5.5.4
Macro "MACRO" is expanded to "sizeof"5.5.4
Macro "MACRO" is expanded to 0 token5.5.4
Macro "macro" needs arguments5.8
Macro started at line 123 swallowed directive-like line5.5.5
Macro with mixing of ## and # operators isn't portable5.7
Macro with multiple ## operators isn't portable5.7
Misplaced ":", previous operator is "+"5.4.5
Misplaced constant "12"5.4.5
Missing ")"5.4.5
Missing "," or ")" in parameter list "(a,b"5.4.7
More than 1024 macros defined5.7
More than 31 parameters5.7
More than 32 nesting of parens in #if expression5.7
More than 8 nesting of #if (#ifdef) sections5.75.8
More than 8 nesting of #include5.7
More than BLK_NEST nesting of #if (#ifdef) sections5.3.3
More than INCLUDE_NEST nesting of #include5.3.3
More than necessary N argument(s) in macro call "macro( a, b, c)5.4.9
More than NEXP*2-1 constants stacked at "12"5.4.5
More than NEXP*3-1 operators and parens stacked at "+"5.4.5
More than NMACPARS parameters5.4.7
Multi-character or multi-byte character constant 'XY' isn't portable5.75.8
Multi-character wide character constant L'ab' isn't portable5.75.8
Negative value "-1" is converted to positive "18446744073709551615"5.5.45.8
No argument5.4.45.5.3
No header name5.4.4
No identifier5.4.4
No line number5.4.4
No space between macro name "MACRO" and repl-text5.5.3
No sub-directive5.5.3
No token after ##5.4.7
No token before ##5.4.7
Not a file name "name"5.4.4
Not a formal parameter "id"5.4.7
Not a header name "UNDEFINED_MACRO"5.4.4
Not a line number "name"5.4.4
Not a valid preprocessing token "+12"5.4.95.6
Not a valid string literal5.4.9
Not an identifier "123"5.4.45.5.3
Not an integer "1.23"5.4.5
Not in a #if (#ifdef) section5.4.3
Not in a #if (#ifdef) section in a source file5.4.35.5.3
Operand of _Pragma() is not a string literal5.4.12
Operator ">" in incorrect context5.4.5
Old style predefined macro "linux" is used5.5.5
Out of memory (required size is 0x1234 bytes)5.3.2
Parsed "//" as comment5.6
Preprocessing assertion failed5.4.10
Quotation longer than 509 bytes "very_very_long_string"5.7
Recursive macro definition of "macro" to "macro"5.4.9
Removed ',' preceding the absent variable argument5.5.5
Replacement text "sub(" of macro "head" involved subsequent text5.5.55.8
Rescanning macro "macro" more than RESCAN_LIMIT times at "something"5.4.9
Result of "op" is out of range5.4.65.8
Result of "op" is out of range of (unsigned) long5.5.45.65.8
Shift count "40" is larger than bit count of long5.5.45.65.8
sizeof is disallowed in C Standard5.8
sizeof: Illegal type combination with "type"5.4.65.8
sizeof: No type specified5.4.5
sizeof: Syntax error5.4.5
sizeof: Unknown type "type"5.4.65.8
Skipped the #pragma line5.6
String literal longer than 509 bytes "very_very_long_string"5.7
The macro is redefined5.5.4
This is not a preprocessed source5.3.4
This preprocessed file is corrupted5.3.4
Too long comment, discarded up to here5.7
Too long header name "long-file-name"5.3.3
Too long identifier, truncated to "very_long_identifier"5.5.1
Too long line spliced by comments5.3.3
Too long logical line5.3.3
Too long number token "12345678901234"5.3.3
Too long pp-number token "1234toolong"5.3.3
Too long quotation "long-string"5.3.3
Too long source line5.3.3
Too long token5.3.3
Too many magics nested in macro argument5.4.9
Too many nested macros in tracing MACRO5.4.9
UCN cannot specify the value "0000007f"5.4.15.8
Undefined escape sequence '\x'5.5.45.8
Undefined symbol "name", evaluated to 05.75.8
Unknown #directive "pseudo-directive"5.4.45.5.45.8
Unknown argument "name"5.5.3
Unterminated character constant 't understand.5.4.1
Unterminated expression5.4.5
Unterminated header name 5.4.1
Unterminated macro call "macro( a, (b,c)"5.4.9
Unterminated string literal5.4.1
Unterminated string literal, catenated to the next line5.5.1
Variable argument macro is defined5.6
Wide character constant L'abc' is out of range of unsigned long5.5.45.65.8
Wide character constant L'abc' is out of range5.4.65.8

+
+ +

6. Reporting on Bugs and Others

+ +

I have developed the Validation Suite to verify conformance of preprocessing to Standard C/C++, and released it along with mcpp source. The Validation Suite is intended to allow you to verify all the Standard C preprocessing specifications. Of course, I used the Validation Suite to check mcpp. And what is more, I have compiled mcpp in many compiler systems to verify its behavior. Therefore, I am confident that mcpp is now almost flawless, free of bugs and misinterpretation of specifications, however, I cannot deny the possibility that it still contains some bugs.

+

If you find a strange behavior, do not hesitate to let me know. If you receive a diagnostic message saying "Bug: ...", it is undoubtedly a bug of mcpp or a compiler system. (Probably, it's mcpp's.) How illegal a user program may be, should mcpp lose control, it is mcpp that is to be blamed for it.

+ +

When you report a bug, please be sure to provide the following information:

+
    +
  1. Compiler system mcpp is ported to.
    +
  2. A sample source (shorter is better) that allows reproduction of what looks like a bug.
    +
  3. Preprocessing results.
    +
+ +

Other than bugs, I would appreciate if you give me feedback on mcpp usage, diagnostic messages or this manual.

+

For your feedback or information, please post to "Open Discussion Forum" at:

+

http://mcpp.sourceforge.net/

+

or send via e-mail.

+ + + diff --git a/libraries/mcpp/bin/mcpp-summary-272.pdf b/libraries/mcpp/bin/mcpp-summary-272.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b6f2b52fada74647ebdff5e579ff1902a6264c57 GIT binary patch literal 170539 zcmbTd1yo$i(kPtZPH@-YHZZsbcXx*Y1`F;I9D=*M6Wk%V2M8JXOl>#c9r+Vt+~>awn??zO9-Ru-3JW@F(%rQX_}oIyq6Pmy6%Zgt1;|_3 zfk94IUSKnFHb_^AoQ;(g(n^!-k+ZRLv5|ALa*-Q6*IUsL} zKMyCcIVwa#4hUV=fBhgle!r31p(6bOu>rXt zN<9Dme;AOJi~AoiAP>hsU>uyRe}}QNa{q%KJI6m^yg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-_x}GF|9^Y? zo!g&`zJL1%w=b+8{|m2Lh%+#nXYPFdP8=2PEZph2+yD38`lq-5hx2A%a5?+yZ@O>5 z<-O1UFPi@4eIW&x&{m(7&*r@Lel|_xyWbd!CTTJ)0 z#Z*+lbPJOca|C-x`Yk6L=T+SKtT0JHXq(Tfm#ZcY!|xz74zq zd>wcN_zLhc@N2-AfiD5KfaifVU)WO)|20eltsBj9_$zXN;mcL*2*Dn1O(b}4+g*ErKRFvE8+gZl?~durhS0Q^%e A>Hq)$ literal 0 HcmV?d00001 diff --git a/libraries/mcpp/config/compile b/libraries/mcpp/config/compile new file mode 100644 index 000000000..1b1d23216 --- /dev/null +++ b/libraries/mcpp/config/compile @@ -0,0 +1,142 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2005-05-14.22 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; +esac + +ofile= +cfile= +eat= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libraries/mcpp/config/config.guess b/libraries/mcpp/config/config.guess new file mode 100644 index 000000000..396482d6c --- /dev/null +++ b/libraries/mcpp/config/config.guess @@ -0,0 +1,1500 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-07-02' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/libraries/mcpp/config/config.sub b/libraries/mcpp/config/config.sub new file mode 100644 index 000000000..387c18d1a --- /dev/null +++ b/libraries/mcpp/config/config.sub @@ -0,0 +1,1608 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-07-02' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/libraries/mcpp/config/cygwin_root b/libraries/mcpp/config/cygwin_root new file mode 100644 index 000000000..a9474644f --- /dev/null +++ b/libraries/mcpp/config/cygwin_root @@ -0,0 +1,3 @@ +#! /bin/sh +# split from configure.ac to work around a problem of backslash handling +mount | grep ' on / ' | sed 's, on / .*,,' | tr '\\' '/' diff --git a/libraries/mcpp/config/depcomp b/libraries/mcpp/config/depcomp new file mode 100644 index 000000000..04701da53 --- /dev/null +++ b/libraries/mcpp/config/depcomp @@ -0,0 +1,530 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2005-07-09.11 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mecanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libraries/mcpp/config/install-sh b/libraries/mcpp/config/install-sh new file mode 100644 index 000000000..4d4a9519e --- /dev/null +++ b/libraries/mcpp/config/install-sh @@ -0,0 +1,323 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2005-05-14.22 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libraries/mcpp/config/ltmain.sh b/libraries/mcpp/config/ltmain.sh new file mode 100644 index 000000000..c715b5941 --- /dev/null +++ b/libraries/mcpp/config/ltmain.sh @@ -0,0 +1,6871 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="1.5.22 Debian 1.5.22-4" +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xdir="$my_gentop/$my_xlib" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + fi + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + else + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/libraries/mcpp/config/mb_big5 b/libraries/mcpp/config/mb_big5 new file mode 100644 index 000000000..57a46553d --- /dev/null +++ b/libraries/mcpp/config/mb_big5 @@ -0,0 +1,2 @@ +AC_CHECK_MBCHAR_IS_ESCAPE_FREE( [BIGFIVE], [bigfive], [\Z]) + diff --git a/libraries/mcpp/config/mb_jis b/libraries/mcpp/config/mb_jis new file mode 100644 index 000000000..448e682d3 --- /dev/null +++ b/libraries/mcpp/config/mb_jis @@ -0,0 +1,2 @@ +AC_CHECK_MBCHAR_IS_ESCAPE_FREE( [ISO2022_JP], [iso2022_jp], [$B0\F0(B]) + diff --git a/libraries/mcpp/config/mb_sjis b/libraries/mcpp/config/mb_sjis new file mode 100644 index 000000000..a124d77aa --- /dev/null +++ b/libraries/mcpp/config/mb_sjis @@ -0,0 +1,2 @@ +AC_CHECK_MBCHAR_IS_ESCAPE_FREE( [SJIS], [sjis], [\]) + diff --git a/libraries/mcpp/config/mingw_root b/libraries/mcpp/config/mingw_root new file mode 100644 index 000000000..394861880 --- /dev/null +++ b/libraries/mcpp/config/mingw_root @@ -0,0 +1,3 @@ +#! /bin/sh +# split from configure.ac to work around a problem of backslash handling +/tmp/a.exe | tr '\\' '/' diff --git a/libraries/mcpp/config/missing b/libraries/mcpp/config/missing new file mode 100644 index 000000000..894e786e1 --- /dev/null +++ b/libraries/mcpp/config/missing @@ -0,0 +1,360 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2005-06-08.21 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case "$1" in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libraries/mcpp/configure b/libraries/mcpp/configure new file mode 100644 index 000000000..763218820 --- /dev/null +++ b/libraries/mcpp/configure @@ -0,0 +1,23147 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for mcpp 2.7.2. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='mcpp' +PACKAGE_TARNAME='mcpp' +PACKAGE_VERSION='2.7.2' +PACKAGE_STRING='mcpp 2.7.2' +PACKAGE_BUGREPORT='kmatsui@t3.rim.or.jp' + +ac_unique_file="src/main.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +LN_S +ECHO +AR +RANLIB +DLLTOOL +AS +OBJDUMP +CXX +CXXFLAGS +ac_ct_CXX +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +target_cc +gcc_path +host_system +Target_Cpu +inc_dir +gcc_maj_ver +gcc_min_ver +cpp_call +gcc_testsuite_dir +GNUC_TRUE +GNUC_FALSE +MCPP_LIB_TRUE +MCPP_LIB_FALSE +REPLACE_CPP_TRUE +REPLACE_CPP_FALSE +MINGW_TRUE +MINGW_FALSE +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures mcpp 2.7.2 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/mcpp] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of mcpp 2.7.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-replace-cpp Replace the resident preprocessor with mcpp + --enable-SYSTEM-STD-macro=name[=replace] + specify the SYSTEM-specific STD-style predefined + macro. In all this and the following 5 options, + 'STD'-style name begins with an '_', 'OLD'-style + name begins with an alphabetic and if '=replace' is + missing the macro is defined as 1. + --enable-SYSTEM-OLD-macro=name[=replace] + specify the SYSTEM-specific OLD-style predefined + macro. + --enable-CPU-STD-macro=name[=replace] + specify the CPU-specific STD-style predefined macro. + --enable-CPU-OLD-macro=name[=replace] + specify the CPU-specific OLD-style predefined macro. + --enable-COMPILER-STD-macro=name[=replace] + specify the COMPILER-specific STD-style predefined + macro. + --enable-COMPILER-OLD-macro=name[=replace] + specify the COMPILER-specific OLD-style predefined + macro. + --enable-mcpplib Build libmcpp rather than stand-alone mcpp + + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] include additional configurations [automatic] + --with-target-cc Specify the target compiler to build mcpp into on + Mac OS X + --with-compiler-name=NAME + specify the compiler name which is used as the + definition of COMPILER macro + --with-cxx-include-dir=directory + specify the C++ include directory by absolute path + [none] + --with-gcc-testsuite-dir=directory + specify the gcc testsuite directory to do make + check. e.g. + /usr/src/rpm/SOURCES/gcc-2.95.4/gcc/testsuite, + /usr/local/src/gcc-3.2/gcc/testsuite, etc. The + testsuite of mcpp uses gcc testsuite, hence needs + gcc source or at least gcc testsuite. This option + needs --enable-replace-cpp option. + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +mcpp configure 2.7.2 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by mcpp $as_me 2.7.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_config_headers="$ac_config_headers src/config.h" + +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='mcpp' + VERSION='2.7.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + +# Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done + +fi + +SED=$lt_cv_path_SED +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 4539 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-cygwin* | *-*-mingw* | *-*-pw32*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +echo "${ECHO_T}$DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +echo "${ECHO_T}$ac_ct_AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +echo "${ECHO_T}$OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; + +esac + +need_locks="$enable_libtool_lock" + + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to kmatsui@t3.rim.or.jp ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=yes + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7222: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7226: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7490: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7494: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7594: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7598: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:12327: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:12331: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:12431: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:12435: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13992: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13996: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:14096: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14100: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_F77=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:16283: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16287: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:16551: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16555: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:16655: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:16659: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_GCJ=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + + +{ echo "$as_me:$LINENO: checking whether the cpp is target preprocessor" >&5 +echo $ECHO_N "checking whether the cpp is target preprocessor... $ECHO_C" >&6; } +mcpp=`$CPP $CFLAGS -xc -v /dev/null 2>&1 | grep 'MCPP'` +if test "x$mcpp" != x; then + { { echo "$as_me:$LINENO: error: Do 'make uninstall' before configuring again." >&5 +echo "$as_me: error: Do 'make uninstall' before configuring again." >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + +case $host_os in +linux*) + +cat >>confdefs.h <<\_ACEOF +#define HOST_SYSTEM SYS_LINUX +_ACEOF + + ac_c_define_HOST_SYSTEM=SYS_LINUX + ;; +freebsd*) + cat >>confdefs.h <<\_ACEOF +#define HOST_SYSTEM SYS_FREEBSD +_ACEOF + + ac_c_define_HOST_SYSTEM=SYS_FREEBSD + ;; +darwin*) + cat >>confdefs.h <<\_ACEOF +#define HOST_SYSTEM SYS_MAC +_ACEOF + + ac_c_define_HOST_SYSTEM=SYS_MAC + ;; +cygwin*) + cat >>confdefs.h <<\_ACEOF +#define HOST_SYSTEM SYS_CYGWIN +_ACEOF + + ac_c_define_HOST_SYSTEM=SYS_CYGWIN + ;; +mingw*) + cat >>confdefs.h <<\_ACEOF +#define HOST_SYSTEM SYS_MINGW +_ACEOF + + ac_c_define_HOST_SYSTEM=SYS_MINGW + ;; +*) + { echo "$as_me:$LINENO: WARNING: Unsupported host OS, assuming to be an UNIX variant" >&5 +echo "$as_me: WARNING: Unsupported host OS, assuming to be an UNIX variant" >&2;} + cat >>confdefs.h <<\_ACEOF +#define HOST_SYSTEM SYS_UNIX +_ACEOF + + ac_c_define_HOST_SYSTEM=SYS_UNIX + ;; +esac +host_system=$ac_c_define_HOST_SYSTEM + +case $target_os in +linux*) + +cat >>confdefs.h <<\_ACEOF +#define SYSTEM SYS_LINUX +_ACEOF + + ;; +freebsd*) + cat >>confdefs.h <<\_ACEOF +#define SYSTEM SYS_FREEBSD +_ACEOF + + ;; +darwin*) + cat >>confdefs.h <<\_ACEOF +#define SYSTEM SYS_MAC +_ACEOF + + ;; +cygwin*) + cat >>confdefs.h <<\_ACEOF +#define SYSTEM SYS_CYGWIN +_ACEOF + + ;; +mingw*) + cat >>confdefs.h <<\_ACEOF +#define SYSTEM SYS_MINGW +_ACEOF + + ;; +*) + { echo "$as_me:$LINENO: WARNING: Unsupported target OS" >&5 +echo "$as_me: WARNING: Unsupported target OS" >&2;} + cat >>confdefs.h <<\_ACEOF +#define SYSTEM SYS_UNIX +_ACEOF + + ;; +esac + +## --enable-replace-cpp option +# Check whether --enable-replace-cpp was given. +if test "${enable_replace_cpp+set}" = set; then + enableval=$enable_replace_cpp; +else + ## the compiler name will be defined later + +cat >>confdefs.h <<\_ACEOF +#define COMPILER INDEPENDENT +_ACEOF + + ## else define COMPILER as INDEPENDENT + +fi + + +## Generally this configure does not support cross-compiling. +## Nevertheless, it can configure cross-compiler of Apple-GCC (i686 vs ppc). +if test x$enable_replace_cpp = xyes \ + && test $ac_c_define_HOST_SYSTEM = SYS_MAC \ + && test $host_cpu != $target_cpu; then +## Enable to build mcpp into cross-compiler of Apple-GCC +## --with-target-cc option + +# Check whether --with-target_cc was given. +if test "${with_target_cc+set}" = set; then + withval=$with_target_cc; if test x${withval+set} = xset; then + target_cc=$withval + target_name=`echo $target_cc | sed 's/-gcc.*$//'` + if test $target_name != $target_alias; then + { { echo "$as_me:$LINENO: error: The argument of --with-target-cc option conflicts with --target option." >&5 +echo "$as_me: error: The argument of --with-target-cc option conflicts with --target option." >&2;} + { (exit 1); exit 1; }; } + fi + + fi + +fi + +fi + + +{ echo "$as_me:$LINENO: checking for target cpu" >&5 +echo $ECHO_N "checking for target cpu... $ECHO_C" >&6; } + +## These are not predefined macros of MCPP. MCPP will define predefined macros +## on compile time based on the CPU macro, and possibly redefine them at an +## execution time. + +case $target_cpu in +x86_64|amd64) + Target_Cpu=x86_64 + ;; +i?86*) + Target_Cpu=i386 + ;; +powerpc64|ppc64) + Target_Cpu=ppc64 + ;; +powerpc|ppc|ppc7400) + Target_Cpu=ppc + ;; +*) + Target_Cpu=$target_cpu + ;; +esac + +{ echo "$as_me:$LINENO: result: $Target_Cpu" >&5 +echo "${ECHO_T}$Target_Cpu" >&6; } + +cat >>confdefs.h <<_ACEOF +#define CPU "$Target_Cpu" +_ACEOF + + +## Build into cross-compiler on Mac OS +if test x$enable_replace_cpp = xyes \ + && test $ac_c_define_HOST_SYSTEM = SYS_MAC \ + && test x${target_cc+set} = xset; then + arch_opt="-arch $Target_Cpu" +fi + + + + + +for ac_header in unistd.h, stdint.h, inttypes.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to kmatsui@t3.rim.or.jp ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +{ echo "$as_me:$LINENO: checking for intmax_t" >&5 +echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6; } +if test "${ac_cv_type_intmax_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef intmax_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_intmax_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_intmax_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5 +echo "${ECHO_T}$ac_cv_type_intmax_t" >&6; } +if test $ac_cv_type_intmax_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTMAX_T 1 +_ACEOF + + +fi +{ echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6; } +if test "${ac_cv_type_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef long long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6; } +if test $ac_cv_type_long_long = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + + +fi + + + + +for ac_func in stpcpy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +{ echo "$as_me:$LINENO: checking if the cases of filename are folded" >&5 +echo $ECHO_N "checking if the cases of filename are folded... $ECHO_C" >&6; } +if test "${ac_cv_fname_fold+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + touch hJkL + ac_cv_fname_fold=no + if test "$cross_compiling" = yes; then + { echo "$as_me:$LINENO: WARNING: cannot run on cross-compiling so assumes that the cases of filename are not folded." >&5 +echo "$as_me: WARNING: cannot run on cross-compiling so assumes that the cases of filename are not folded." >&2;} + +else + cat >conftest.$ac_ext <<_ACEOF + +#include +#include + void exit(); +int main( void) +{ + if (fopen( "HjKl", "r") == NULL) + exit( errno); + else + exit( 0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_fname_fold=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm hJkL +fi +{ echo "$as_me:$LINENO: result: $ac_cv_fname_fold" >&5 +echo "${ECHO_T}$ac_cv_fname_fold" >&6; } +if test x$ac_cv_fname_fold = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define FNAME_FOLD 1 +_ACEOF + +fi + + + +cat >>confdefs.h <<_ACEOF +#define OBJEXT "$ac_cv_objext" +_ACEOF + + + +# AC_CHECK_MOD_LL( modifier, additional include header) +# Try the printf length modifier for the longest integer. +# The redundant sscanf() is for some compilers which cannot handle +# long long integer token. + + +if test x$ac_cv_type_intmax_t = xyes; then + + { echo "$as_me:$LINENO: checking printf length modifier for the longest integer" >&5 +echo $ECHO_N "checking printf length modifier for the longest integer... $ECHO_C" >&6; } +if test "${ac_cv_c_printf_modifier+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + { echo "$as_me:$LINENO: WARNING: cannot run on cross-compiling so assumes the length modifier of long long is \"%ll\"" >&5 +echo "$as_me: WARNING: cannot run on cross-compiling so assumes the length modifier of long long is \"%ll\"" >&2;} + +cat >>confdefs.h <<\_ACEOF +#define LL_FORM "ll" +_ACEOF + + ac_cv_c_printf_modifier=ll + +else + cat >conftest.$ac_ext <<_ACEOF + +#include +#include + int strcmp(); + void exit(); +#include +int main( void) +{ char buf[ 20]; + intmax_t num; + sscanf( "1234567890123456789", "%jd", &num); + sprintf( buf, "%jd", num); + assert( strcmp( buf, "1234567890123456789") == 0); + exit( 0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_printf_modifier=j +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_printf_modifier" >&5 +echo "${ECHO_T}$ac_cv_c_printf_modifier" >&6; } + + if test $ac_c_define_HOST_SYSTEM = SYS_CYGWIN \ + || test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + sleep 1 # wait for cleanup + fi +fi + +if test x$ac_cv_type_long_long = xyes; then + for modifier in ll I64 q L + do + + { echo "$as_me:$LINENO: checking printf length modifier for the longest integer" >&5 +echo $ECHO_N "checking printf length modifier for the longest integer... $ECHO_C" >&6; } +if test "${ac_cv_c_printf_modifier+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + { echo "$as_me:$LINENO: WARNING: cannot run on cross-compiling so assumes the length modifier of long long is \"%ll\"" >&5 +echo "$as_me: WARNING: cannot run on cross-compiling so assumes the length modifier of long long is \"%ll\"" >&2;} + +cat >>confdefs.h <<\_ACEOF +#define LL_FORM "ll" +_ACEOF + + ac_cv_c_printf_modifier=ll + +else + cat >conftest.$ac_ext <<_ACEOF + +#include +#include + int strcmp(); + void exit(); + +int main( void) +{ char buf[ 20]; + long long num; + sscanf( "1234567890123456789", "%${modifier}d", &num); + sprintf( buf, "%${modifier}d", num); + assert( strcmp( buf, "1234567890123456789") == 0); + exit( 0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_printf_modifier=${modifier} +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_printf_modifier" >&5 +echo "${ECHO_T}$ac_cv_c_printf_modifier" >&6; } + + if test x${ac_cv_c_printf_modifier+set} = xset; then + break + fi + if test $ac_c_define_HOST_SYSTEM = SYS_CYGWIN \ + || test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + sleep 1 # wait for cleanup + fi + done +fi + +if test x${ac_cv_c_printf_modifier+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define LL_FORM "$ac_cv_c_printf_modifier" +_ACEOF + +fi + +if test $ac_c_define_HOST_SYSTEM = SYS_FREEBSD && \ + test x$mcpp_ac_c_define_SYSTEM_SP_STD != x__FreeBSD__; then + fbsd_ver=`echo '__FreeBSD__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ .*//'` + +cat >>confdefs.h <<_ACEOF +#define SYSTEM_EXT_VAL "$fbsd_ver" +_ACEOF + +fi + +if test x$ac_cv_c_compiler_gnu = xyes; then + + +cat >>confdefs.h <<\_ACEOF +#define HOST_COMPILER GNUC +_ACEOF + + + +cat >>confdefs.h <<\_ACEOF +#define HOST_CMP_NAME "GCC" +_ACEOF + + + { echo "$as_me:$LINENO: checking for value of __GNUC__" >&5 +echo $ECHO_N "checking for value of __GNUC__... $ECHO_C" >&6; } + gcc_maj_ver=`echo '__GNUC__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *//'` + { echo "$as_me:$LINENO: result: $gcc_maj_ver" >&5 +echo "${ECHO_T}$gcc_maj_ver" >&6; } + +cat >>confdefs.h <<_ACEOF +#define GCC_MAJOR_VERSION "$gcc_maj_ver" +_ACEOF + + { echo "$as_me:$LINENO: checking for value of __GNUC_MINOR__" >&5 +echo $ECHO_N "checking for value of __GNUC_MINOR__... $ECHO_C" >&6; } + gcc_min_ver=`echo __GNUC_MINOR__ | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *//'` + { echo "$as_me:$LINENO: result: $gcc_min_ver" >&5 +echo "${ECHO_T}$gcc_min_ver" >&6; } + +cat >>confdefs.h <<_ACEOF +#define GCC_MINOR_VERSION "$gcc_min_ver" +_ACEOF + + + cw=`pwd` + if test x$srcdir = "x." || test x$srcdir = x; then + src_dir=$cw + else + src_dir=$srcdir + fi + if test $ac_c_define_HOST_SYSTEM = SYS_CYGWIN; then + { echo "$as_me:$LINENO: checking the root directory" >&5 +echo $ECHO_N "checking the root directory... $ECHO_C" >&6; } +if test "${ac_cv_cygwin_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_cygwin_root=`$src_dir/config/cygwin_root` + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cygwin_root" >&5 +echo "${ECHO_T}$ac_cv_cygwin_root" >&6; } + +cat >>confdefs.h <<_ACEOF +#define CYGWIN_ROOT_DIRECTORY "$ac_cv_cygwin_root" +_ACEOF + + fi + if test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + { echo "$as_me:$LINENO: checking the root directory" >&5 +echo $ECHO_N "checking the root directory... $ECHO_C" >&6; } +if test "${ac_cv_msys_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cd /tmp + cat > getcwd.c <<\_EOF +#include +#include +#include +int main( int argc, char ** argv) +{ char buf[ PATH_MAX]; + getcwd( buf, PATH_MAX); + puts( buf); + return 0; +} +_EOF + $CC getcwd.c + cd / + ac_cv_msys_root=`$src_dir/config/mingw_root` + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_msys_root" >&5 +echo "${ECHO_T}$ac_cv_msys_root" >&6; } + { echo "$as_me:$LINENO: checking the /mingw directory" >&5 +echo $ECHO_N "checking the /mingw directory... $ECHO_C" >&6; } +if test "${ac_cv_mingw_dir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cd /mingw + ac_cv_mingw_dir=`$src_dir/config/mingw_root` + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_mingw_dir" >&5 +echo "${ECHO_T}$ac_cv_mingw_dir" >&6; } + cd $cw + rm -f /tmp/getcwd.c /tmp/a.exe + +cat >>confdefs.h <<_ACEOF +#define MSYS_ROOT_DIRECTORY "$ac_cv_msys_root" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define MINGW_DIRECTORY "$ac_cv_mingw_dir" +_ACEOF + + fi + +else # not gcc + +# mcpp_AC_C_DEFINE( SYSTEM | CPU | COMPILER, STD | OLD, $enableval) +# Specify the target-specific predefined macro. + + +# mcpp_AC_C_PREDEF( SYSTEM | CPU | COMPILER, STD | OLD, additional description) +# Specify the target-specific predefined macro via mcpp_AC_C_DEFINE. + + + + # Check whether --enable-SYSTEM-STD-macro was given. +if test "${enable_SYSTEM_STD_macro+set}" = set; then + enableval=$enable_SYSTEM_STD_macro; if test x$enableval = xyes || test x$enableval = xno; then + { { echo "$as_me:$LINENO: error: This option requires an argument as 'name[=replace]'." >&5 +echo "$as_me: error: This option requires an argument as 'name[=replace]'." >&2;} + { (exit 1); exit 1; }; } + fi + + name=`echo $enableval | sed 's/=.*//'` + mcpp_macro=SYSTEM_SP_STD + stripped_mcpp_macro=`echo $mcpp_macro | sed 's/STD//'` + if test x$stripped_mcpp_macro != x$mcpp_macro; then + stripped_name=`echo $name | sed 's/^_//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with '_'." >&5 +echo "$as_me: error: The macro name '$name' should begin with '_'." >&2;} + { (exit 1); exit 1; }; } + fi + else + stripped_name=`echo $name | sed 's/^[A-Za-z]//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with an alphabetic letter." >&5 +echo "$as_me: error: The macro name '$name' should begin with an alphabetic letter." >&2;} + { (exit 1); exit 1; }; } + fi + fi + if test x$name = x$enableval; then + replace=1 + else + replace=`echo $enableval | sed 's/^.*=//'` + fi + cat >>confdefs.h <<_ACEOF +#define $mcpp_macro "$name" +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define ${mcpp_macro}_VAL "$replace" +_ACEOF + + mcpp_ac_c_define_SYSTEM_STD=$name + + + + + + +fi + + + + # Check whether --enable-SYSTEM-OLD-macro was given. +if test "${enable_SYSTEM_OLD_macro+set}" = set; then + enableval=$enable_SYSTEM_OLD_macro; if test x$enableval = xyes || test x$enableval = xno; then + { { echo "$as_me:$LINENO: error: This option requires an argument as 'name[=replace]'." >&5 +echo "$as_me: error: This option requires an argument as 'name[=replace]'." >&2;} + { (exit 1); exit 1; }; } + fi + + name=`echo $enableval | sed 's/=.*//'` + mcpp_macro=SYSTEM_SP_OLD + stripped_mcpp_macro=`echo $mcpp_macro | sed 's/STD//'` + if test x$stripped_mcpp_macro != x$mcpp_macro; then + stripped_name=`echo $name | sed 's/^_//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with '_'." >&5 +echo "$as_me: error: The macro name '$name' should begin with '_'." >&2;} + { (exit 1); exit 1; }; } + fi + else + stripped_name=`echo $name | sed 's/^[A-Za-z]//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with an alphabetic letter." >&5 +echo "$as_me: error: The macro name '$name' should begin with an alphabetic letter." >&2;} + { (exit 1); exit 1; }; } + fi + fi + if test x$name = x$enableval; then + replace=1 + else + replace=`echo $enableval | sed 's/^.*=//'` + fi + cat >>confdefs.h <<_ACEOF +#define $mcpp_macro "$name" +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define ${mcpp_macro}_VAL "$replace" +_ACEOF + + mcpp_ac_c_define_SYSTEM_OLD=$name + + + + + + +fi + + + + # Check whether --enable-CPU-STD-macro was given. +if test "${enable_CPU_STD_macro+set}" = set; then + enableval=$enable_CPU_STD_macro; if test x$enableval = xyes || test x$enableval = xno; then + { { echo "$as_me:$LINENO: error: This option requires an argument as 'name[=replace]'." >&5 +echo "$as_me: error: This option requires an argument as 'name[=replace]'." >&2;} + { (exit 1); exit 1; }; } + fi + + name=`echo $enableval | sed 's/=.*//'` + mcpp_macro=CPU_SP_STD + stripped_mcpp_macro=`echo $mcpp_macro | sed 's/STD//'` + if test x$stripped_mcpp_macro != x$mcpp_macro; then + stripped_name=`echo $name | sed 's/^_//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with '_'." >&5 +echo "$as_me: error: The macro name '$name' should begin with '_'." >&2;} + { (exit 1); exit 1; }; } + fi + else + stripped_name=`echo $name | sed 's/^[A-Za-z]//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with an alphabetic letter." >&5 +echo "$as_me: error: The macro name '$name' should begin with an alphabetic letter." >&2;} + { (exit 1); exit 1; }; } + fi + fi + if test x$name = x$enableval; then + replace=1 + else + replace=`echo $enableval | sed 's/^.*=//'` + fi + cat >>confdefs.h <<_ACEOF +#define $mcpp_macro "$name" +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define ${mcpp_macro}_VAL "$replace" +_ACEOF + + mcpp_ac_c_define_CPU_STD=$name + + + + + + +fi + + + + # Check whether --enable-CPU-OLD-macro was given. +if test "${enable_CPU_OLD_macro+set}" = set; then + enableval=$enable_CPU_OLD_macro; if test x$enableval = xyes || test x$enableval = xno; then + { { echo "$as_me:$LINENO: error: This option requires an argument as 'name[=replace]'." >&5 +echo "$as_me: error: This option requires an argument as 'name[=replace]'." >&2;} + { (exit 1); exit 1; }; } + fi + + name=`echo $enableval | sed 's/=.*//'` + mcpp_macro=CPU_SP_OLD + stripped_mcpp_macro=`echo $mcpp_macro | sed 's/STD//'` + if test x$stripped_mcpp_macro != x$mcpp_macro; then + stripped_name=`echo $name | sed 's/^_//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with '_'." >&5 +echo "$as_me: error: The macro name '$name' should begin with '_'." >&2;} + { (exit 1); exit 1; }; } + fi + else + stripped_name=`echo $name | sed 's/^[A-Za-z]//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with an alphabetic letter." >&5 +echo "$as_me: error: The macro name '$name' should begin with an alphabetic letter." >&2;} + { (exit 1); exit 1; }; } + fi + fi + if test x$name = x$enableval; then + replace=1 + else + replace=`echo $enableval | sed 's/^.*=//'` + fi + cat >>confdefs.h <<_ACEOF +#define $mcpp_macro "$name" +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define ${mcpp_macro}_VAL "$replace" +_ACEOF + + mcpp_ac_c_define_CPU_OLD=$name + + + + + + +fi + + + + # Check whether --enable-COMPILER-STD-macro was given. +if test "${enable_COMPILER_STD_macro+set}" = set; then + enableval=$enable_COMPILER_STD_macro; if test x$enableval = xyes || test x$enableval = xno; then + { { echo "$as_me:$LINENO: error: This option requires an argument as 'name[=replace]'." >&5 +echo "$as_me: error: This option requires an argument as 'name[=replace]'." >&2;} + { (exit 1); exit 1; }; } + fi + + name=`echo $enableval | sed 's/=.*//'` + mcpp_macro=COMPILER_SP_STD + stripped_mcpp_macro=`echo $mcpp_macro | sed 's/STD//'` + if test x$stripped_mcpp_macro != x$mcpp_macro; then + stripped_name=`echo $name | sed 's/^_//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with '_'." >&5 +echo "$as_me: error: The macro name '$name' should begin with '_'." >&2;} + { (exit 1); exit 1; }; } + fi + else + stripped_name=`echo $name | sed 's/^[A-Za-z]//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with an alphabetic letter." >&5 +echo "$as_me: error: The macro name '$name' should begin with an alphabetic letter." >&2;} + { (exit 1); exit 1; }; } + fi + fi + if test x$name = x$enableval; then + replace=1 + else + replace=`echo $enableval | sed 's/^.*=//'` + fi + cat >>confdefs.h <<_ACEOF +#define $mcpp_macro "$name" +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define ${mcpp_macro}_VAL "$replace" +_ACEOF + + mcpp_ac_c_define_COMPILER_STD=$name + + + + + + +fi + + + + # Check whether --enable-COMPILER-OLD-macro was given. +if test "${enable_COMPILER_OLD_macro+set}" = set; then + enableval=$enable_COMPILER_OLD_macro; if test x$enableval = xyes || test x$enableval = xno; then + { { echo "$as_me:$LINENO: error: This option requires an argument as 'name[=replace]'." >&5 +echo "$as_me: error: This option requires an argument as 'name[=replace]'." >&2;} + { (exit 1); exit 1; }; } + fi + + name=`echo $enableval | sed 's/=.*//'` + mcpp_macro=COMPILER_SP_OLD + stripped_mcpp_macro=`echo $mcpp_macro | sed 's/STD//'` + if test x$stripped_mcpp_macro != x$mcpp_macro; then + stripped_name=`echo $name | sed 's/^_//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with '_'." >&5 +echo "$as_me: error: The macro name '$name' should begin with '_'." >&2;} + { (exit 1); exit 1; }; } + fi + else + stripped_name=`echo $name | sed 's/^[A-Za-z]//'` + if test x$stripped_name = x$name; then + { { echo "$as_me:$LINENO: error: The macro name '$name' should begin with an alphabetic letter." >&5 +echo "$as_me: error: The macro name '$name' should begin with an alphabetic letter." >&2;} + { (exit 1); exit 1; }; } + fi + fi + if test x$name = x$enableval; then + replace=1 + else + replace=`echo $enableval | sed 's/^.*=//'` + fi + cat >>confdefs.h <<_ACEOF +#define $mcpp_macro "$name" +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define ${mcpp_macro}_VAL "$replace" +_ACEOF + + mcpp_ac_c_define_COMPILER_OLD=$name + + + + + + +fi + + + +fi + +## MacOS has "framework" directories. +if test $ac_c_define_HOST_SYSTEM = SYS_MAC; then + { echo "$as_me:$LINENO: checking for the MacOS-specific framework directory" >&5 +echo $ECHO_N "checking for the MacOS-specific framework directory... $ECHO_C" >&6; } + frameworks=`$CPP $CFLAGS $arch_opt -xc -v /dev/null 2>&1 | sed 's/^ *//' | sed 's/ .*$//' | $EGREP '/Frameworks$'` + n=1 + for dir in $frameworks + do + case $n in + 1) framework1=$dir;; + 2) framework2=$dir;; + 3) framework3=$dir;; + esac + let n=n+1 + done + if test x${framework1+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define FRAMEWORK1 "$framework1" +_ACEOF + + { echo "$as_me:$LINENO: result: $framework1" >&5 +echo "${ECHO_T}$framework1" >&6; } + else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } + fi + if test x${framework2+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define FRAMEWORK2 "$framework2" +_ACEOF + + { echo "$as_me:$LINENO: result: $framework2" >&5 +echo "${ECHO_T}$framework2" >&6; } + fi + if test x${framework3+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define FRAMEWORK3 "$framework3" +_ACEOF + + { echo "$as_me:$LINENO: result: $framework3" >&5 +echo "${ECHO_T}$framework3" >&6; } + fi +fi ## SYS_MAC + +## --enable-mcpplib option +# Check whether --enable-mcpplib was given. +if test "${enable_mcpplib+set}" = set; then + enableval=$enable_mcpplib; +fi + + +if test x$enable_mcpplib = xyes; then ## mcpplib mode + +cat >>confdefs.h <<\_ACEOF +#define MCPP_LIB 1 +_ACEOF + + if test x$enable_replace_cpp = xyes; then + { echo "$as_me:$LINENO: WARNING: Ignores enable-replace-cpp option" >&5 +echo "$as_me: WARNING: Ignores enable-replace-cpp option" >&2;} + enable_replace_cpp=no + fi + +else + +if test x$enable_replace_cpp = xyes; then ## replace-cpp mode + + + +# AC_C_INCLUDE_PREF( CURRENT | SOURCE | NEXT) +# Check the include preference ('NEXT' means CURRENT & SOURCE) + + +{ echo "$as_me:$LINENO: checking include preference - relative to current or source directory" >&5 +echo $ECHO_N "checking include preference - relative to current or source directory... $ECHO_C" >&6; } +if test "${ac_cv_c_include_pref+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + mkdir mcpp-tmp + cd mcpp-tmp + mkdir dir ../next ../next/dir + echo '#include "dir/what.h"' > ../next/header.h + echo '#include "next.h"' >> ../next/header.h + echo 'CURRENT' > dir/what.h + echo 'SOURCE' > ../next/dir/what.h + echo 'NEXT' > ../next/next.h + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include "../next/header.h" + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "SOURCE" >/dev/null 2>&1; then + ac_cv_c_include_pref=SOURCE +fi +rm -f conftest* + + + if test x$ac_cv_c_include_pref != xSOURCE; then + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include "../next/header.h" + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "CURRENT" >/dev/null 2>&1; then + ac_cv_c_include_pref=CURRENT +fi +rm -f conftest* + + + if test x$ac_cv_c_include_pref = xCURRENT; then + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include "../next/header.h" + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "NEXT" >/dev/null 2>&1; then + ac_cv_c_include_pref=NEXT +fi +rm -f conftest* + + + if test x$ac_cv_c_include_pref = xNEXT; then + ac_cv_c_include_pref="(CURRENT & SOURCE)" + fi + else + { { echo "$as_me:$LINENO: error: Failed to include header file." >&5 +echo "$as_me: error: Failed to include header file." >&2;} + { (exit 1); exit 1; }; } + fi + fi + cd .. + rm -rf mcpp-tmp next + if test $ac_c_define_HOST_SYSTEM = SYS_CYGWIN \ + || test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + sleep 1 # wait for cleanup + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_include_pref" >&5 +echo "${ECHO_T}$ac_cv_c_include_pref" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SEARCH_INIT $ac_cv_c_include_pref +_ACEOF + + +{ echo "$as_me:$LINENO: checking if the argument of pragma is macro expanded" >&5 +echo $ECHO_N "checking if the argument of pragma is macro expanded... $ECHO_C" >&6; } +if test "${ac_cv_c_pragma_is_expanded+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + +#define once +#pragma once +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_pragma_is_expanded=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_pragma_is_expanded=yes + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_pragma_is_expanded" >&5 +echo "${ECHO_T}$ac_cv_c_pragma_is_expanded" >&6; } +if test x$ac_cv_c_pragma_is_expanded = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define EXPAND_PRAGMA 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking if digraphs can be used" >&5 +echo $ECHO_N "checking if digraphs can be used... $ECHO_C" >&6; } +if test "${ac_cv_c_digraph+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + +%:if 1 +%:endif +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_cv_c_digraph=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_digraph=no + +fi + +rm -f conftest.err conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_digraph" >&5 +echo "${ECHO_T}$ac_cv_c_digraph" >&6; } +if test x$ac_cv_c_digraph = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIGRAPHS 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking preprocessor output format of line directive" >&5 +echo $ECHO_N "checking preprocessor output format of line directive... $ECHO_C" >&6; } +if test "${ac_cv_c_line_format+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_line_format=\"`echo '#line 4321' | $CPP - | grep 432 | sed 's/432.*$//'`\" +## Note: the output line number may be 4320 on GCC 2.* or other preprocessors. + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_line_format" >&5 +echo "${ECHO_T}$ac_cv_c_line_format" >&6; } + +cat >>confdefs.h <<_ACEOF +#define LINE_PREFIX $ac_cv_c_line_format +_ACEOF + +if test "x$ac_cv_c_line_format" = "x\"#line \""; then + ac_cv_c_std_line_prefix=1 +else + ac_cv_c_std_line_prefix=0 +fi + +cat >>confdefs.h <<_ACEOF +#define STD_LINE_PREFIX $ac_cv_c_std_line_prefix +_ACEOF + + +{ echo "$as_me:$LINENO: checking default value of __STDC__" >&5 +echo $ECHO_N "checking default value of __STDC__... $ECHO_C" >&6; } +if test "${ac_cv_c_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + stdc=`echo '__STDC__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ .*//'` + if test x"$stdc" = x"__STDC__"; then + ac_cv_c_stdc=0 + else + ac_cv_c_stdc=$stdc + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_stdc" >&5 +echo "${ECHO_T}$ac_cv_c_stdc" >&6; } + +cat >>confdefs.h <<_ACEOF +#define STDC $ac_cv_c_stdc +_ACEOF + + +{ echo "$as_me:$LINENO: checking default value of __STDC_VERSION__" >&5 +echo $ECHO_N "checking default value of __STDC_VERSION__... $ECHO_C" >&6; } +if test "${ac_cv_c_stdc_ver+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + stdc_ver=`echo '__STDC_VERSION__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ .*//'` + if test x"$stdc_ver" = x"__STDC_VERSION__"; then + ac_cv_c_stdc_ver=0 + else + ac_cv_c_stdc_ver=$stdc_ver + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_stdc_ver" >&5 +echo "${ECHO_T}$ac_cv_c_stdc_ver" >&6; } + +cat >>confdefs.h <<_ACEOF +#define STDC_VERSION $ac_cv_c_stdc_ver +_ACEOF + + +if test x${ac_cv_c_compiler_gnu} != xyes; then + +# Specify the compiler's name + +# Check whether --with-compiler-name was given. +if test "${with_compiler_name+set}" = set; then + withval=$with_compiler_name; +cat >>confdefs.h <<_ACEOF +#define COMPILER $compiler_name +_ACEOF + +else + { { echo "$as_me:$LINENO: error: --with-compiler-name=NAME option should be specified to define COMPILER macro." >&5 +echo "$as_me: error: --with-compiler-name=NAME option should be specified to define COMPILER macro." >&2;} + { (exit 1); exit 1; }; } + +fi + + +# Specify the C++ header file directory + +# Check whether --with-cxx-include-dir was given. +if test "${with_cxx_include_dir+set}" = set; then + withval=$with_cxx_include_dir; case "${withval}" in + \\/* | A-Za-z:\\/*) + cxx_include_dir=`echo $withval | sed 's,/$,,'; 's,\\$,,'` + +cat >>confdefs.h <<_ACEOF +#define CPLUS_INCLUDE_DIR1 $cxx_include_dir +_ACEOF + + ;; + *) { { echo "$as_me:$LINENO: error: $withval should be an absolute path." >&5 +echo "$as_me: error: $withval should be an absolute path." >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi + + +fi # not gcc + + +{ echo "$as_me:$LINENO: checking for some compiler specific elements" >&5 +echo "$as_me: checking for some compiler specific elements" >&6;} + +# Define GCC specific elements. +if test x$ac_cv_c_compiler_gnu = xyes; then + + +cat >>confdefs.h <<\_ACEOF +#define COMPILER GNUC +_ACEOF + + + cpp_call=`$CPP $CFLAGS $arch_opt -xc -v /dev/null 2>&1 | $EGREP '/cpp|/cc1' | sed 's/^ *//; s/ .*//'` + { echo "$as_me:$LINENO: checking for the directory to install mcpp" >&5 +echo $ECHO_N "checking for the directory to install mcpp... $ECHO_C" >&6; } + cpp_name=`expr $cpp_call : '.*/\(.*\)'` + bindir=`expr $cpp_call : "\(.*\)/$cpp_name"` + { echo "$as_me:$LINENO: result: $bindir" >&5 +echo "${ECHO_T}$bindir" >&6; } + + # Extract the first word of "$CC", so it can be a program name with args. +set dummy $CC; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_gcc_path+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_path in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_path="$gcc_path" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_gcc_path="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +gcc_path=$ac_cv_path_gcc_path +if test -n "$gcc_path"; then + { echo "$as_me:$LINENO: result: $gcc_path" >&5 +echo "${ECHO_T}$gcc_path" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + cc_path=`echo $CC | $EGREP "/"` + if test x$cc_path != x; then + { { echo "$as_me:$LINENO: error: Environment variables CC and CXX for GCC-specific-build should not contain a directory part." >&5 +echo "$as_me: error: Environment variables CC and CXX for GCC-specific-build should not contain a directory part." >&2;} + { (exit 1); exit 1; }; }; + fi + ## force to set $prefix to GCC's prefix + ## (i.e. "/usr/local" of "/usr/local/bin/gcc") + gcc_prefix=`echo $gcc_path | $EGREP "/bin/$CC\$" | sed "s,/bin/$CC\$,,"` + if test "x$gcc_prefix" != xNONE; then + if test "x$prefix" != xNONE && "x$gcc_prefix" != "x$prefix"; then + { echo "$as_me:$LINENO: WARNING: Ignored --prefix option, since it conflicts with GCC path" >&5 +echo "$as_me: WARNING: Ignored --prefix option, since it conflicts with GCC path" >&2;} + fi + prefix=$gcc_prefix + else + if test "x$prefix" = xNONE; then + prefix=$ac_default_prefix + fi + fi + lang_save=$LANG + export LANG=C + + { echo "$as_me:$LINENO: checking for the compiler-specific C include directory" >&5 +echo $ECHO_N "checking for the compiler-specific C include directory... $ECHO_C" >&6; } + exclude="^/usr(/local|)/include\$|^${prefix}(/local|)/include\$|/Frameworks|End of search list" + c_include_dirs=`$CPP $CFLAGS $arch_opt -xc -v /dev/null 2>&1 | sed '1,/<...> search starts here/d' | sed '/End of search list/q' | sed 's/^ *//' | $EGREP -v "$exclude"` + n=1 + for dir in $c_include_dirs + do + case $n in + 1) c_include_dir1=$dir;; + 2) c_include_dir2=$dir;; + 3) c_include_dir3=$dir;; + esac + let n=n+1 + done + if test x${c_include_dir1+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define C_INCLUDE_DIR1 "$c_include_dir1" +_ACEOF + + { echo "$as_me:$LINENO: result: $c_include_dir1" >&5 +echo "${ECHO_T}$c_include_dir1" >&6; } + else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } + fi + if test x${c_include_dir2+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define C_INCLUDE_DIR2 "$c_include_dir2" +_ACEOF + + { echo "$as_me:$LINENO: result: $c_include_dir2" >&5 +echo "${ECHO_T}$c_include_dir2" >&6; } + fi + if test x${c_include_dir3+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define C_INCLUDE_DIR3 "$c_include_dir3" +_ACEOF + + { echo "$as_me:$LINENO: result: $c_include_dir3" >&5 +echo "${ECHO_T}$c_include_dir3" >&6; } + fi + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + { echo "$as_me:$LINENO: checking for the compiler-specific C++ include directory" >&5 +echo $ECHO_N "checking for the compiler-specific C++ include directory... $ECHO_C" >&6; } + exclude="^/usr(/local|)/include\$|^${prefix}(/local|)/include\$|/Frameworks|^${c_include_dir1}\$|^${c_include_dir2}\$|^${c_include_dir3}\$" + cxx_include_dirs=`${CXXCPP} ${CXXFLAGS} $arch_opt -xc++ -v /dev/null 2>&1 | sed '1,/<...> search starts here/d' | sed '/End of search list/q' | sed '/End of search list/d' | sed 's/^ *//' | $EGREP -v "$exclude"` + n=1 + for dir in ${cxx_include_dirs} + do + case $n in + 1) cxx_include_dir1=$dir;; + 2) cxx_include_dir2=$dir;; + 3) cxx_include_dir3=$dir;; + 4) cxx_include_dir4=$dir;; + esac + let n=n+1 + done + if test x${cxx_include_dir1+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define CPLUS_INCLUDE_DIR1 "$cxx_include_dir1" +_ACEOF + + { echo "$as_me:$LINENO: result: $cxx_include_dir1" >&5 +echo "${ECHO_T}$cxx_include_dir1" >&6; } + fi + if test x${cxx_include_dir2+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define CPLUS_INCLUDE_DIR2 "$cxx_include_dir2" +_ACEOF + + { echo "$as_me:$LINENO: result: $cxx_include_dir2" >&5 +echo "${ECHO_T}$cxx_include_dir2" >&6; } + fi + if test x${cxx_include_dir3+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define CPLUS_INCLUDE_DIR3 "$cxx_include_dir3" +_ACEOF + + { echo "$as_me:$LINENO: result: $cxx_include_dir3" >&5 +echo "${ECHO_T}$cxx_include_dir3" >&6; } + fi + if test x${cxx_include_dir4+set} = xset; then + +cat >>confdefs.h <<_ACEOF +#define CPLUS_INCLUDE_DIR4 "$cxx_include_dir4" +_ACEOF + + { echo "$as_me:$LINENO: result: $cxx_include_dir4" >&5 +echo "${ECHO_T}$cxx_include_dir4" >&6; } + fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + export LANG=$lang_save + + ## the directory into which mcpp_g*.h header files are generated + ## '/mcpp-gcc' will be appended to 'inc_dir' + if test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + inc_dir=$c_include_dir2 + else + if test x${c_include_dir1+set} = xset; then + inc_dir=$c_include_dir1 + else + inc_dir="$prefix"/include + fi + fi + +cat >>confdefs.h <<_ACEOF +#define INC_DIR "$inc_dir" +_ACEOF + + + + + + + + + + { echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + + + if test x$gcc_maj_ver = x2; then + + { echo "$as_me:$LINENO: checking for value of predefined macro '__SIZE_TYPE__'" >&5 +echo $ECHO_N "checking for value of predefined macro '__SIZE_TYPE__'... $ECHO_C" >&6; } +if test "${size_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + size_type=`echo '__SIZE_TYPE__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *//'` + +fi +{ echo "$as_me:$LINENO: result: $size_type" >&5 +echo "${ECHO_T}$size_type" >&6; } + +cat >>confdefs.h <<_ACEOF +#define COMPILER_SP1_VAL "$size_type" +_ACEOF + + + { echo "$as_me:$LINENO: checking for value of predefined macro '__PTRDIFF_TYPE__'" >&5 +echo $ECHO_N "checking for value of predefined macro '__PTRDIFF_TYPE__'... $ECHO_C" >&6; } +if test "${ptrdiff_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ptrdiff_type=`echo '__PTRDIFF_TYPE__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *$//'` + +fi +{ echo "$as_me:$LINENO: result: $ptrdiff_type" >&5 +echo "${ECHO_T}$ptrdiff_type" >&6; } + +cat >>confdefs.h <<_ACEOF +#define COMPILER_SP2_VAL "$ptrdiff_type" +_ACEOF + + + { echo "$as_me:$LINENO: checking for value of predefined macro '__WCHAR_TYPE__'" >&5 +echo $ECHO_N "checking for value of predefined macro '__WCHAR_TYPE__'... $ECHO_C" >&6; } +if test "${wchar_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + wchar_type=`echo '__WCHAR_TYPE__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *$//'` + +fi +{ echo "$as_me:$LINENO: result: $wchar_type" >&5 +echo "${ECHO_T}$wchar_type" >&6; } + +cat >>confdefs.h <<_ACEOF +#define COMPILER_SP3_VAL "$wchar_type" +_ACEOF + + + fi +fi + +## Handling of multi-byte characters containing '0x5c' codes: +## These tests cannot be executed without appropriate options for the +## compiler. So, here we define all of these macros as FALSE. +## User should edit config.h by hand after executing this script. +## These should be 0 for GCC at least upto V.4.1. + +cat >>confdefs.h <<\_ACEOF +#define SJIS_IS_ESCAPE_FREE 0 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ISO2022_JP_IS_ESCAPE_FREE 0 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define BIGFIVE_IS_ESCAPE_FREE 0 +_ACEOF + + +fi ## replace-cpp mode +fi ## build-cpp mode or replace-cpp mode + + +# Check whether --with-gcc-testsuite-dir was given. +if test "${with_gcc_testsuite_dir+set}" = set; then + withval=$with_gcc_testsuite_dir; if test x${withval+set} = xset; then + if test x$enable_replace_cpp = xyes; then + gcc_testsuite_dir=`echo $withval | sed 's,/$,,'` + else + { { echo "$as_me:$LINENO: error: --with-gcc-testsuite-dir option requires --enable-replace-cpp option." >&5 +echo "$as_me: error: --with-gcc-testsuite-dir option requires --enable-replace-cpp option." >&2;} + { (exit 1); exit 1; }; } + fi + else + { { echo "$as_me:$LINENO: error: --with-gcc-testsuite-dir option requires an argument." >&5 +echo "$as_me: error: --with-gcc-testsuite-dir option requires an argument." >&2;} + { (exit 1); exit 1; }; } + fi + +fi + + + if test x$ac_cv_c_compiler_gnu = xyes; then + GNUC_TRUE= + GNUC_FALSE='#' +else + GNUC_TRUE='#' + GNUC_FALSE= +fi + + if test x$enable_mcpplib = xyes; then + MCPP_LIB_TRUE= + MCPP_LIB_FALSE='#' +else + MCPP_LIB_TRUE='#' + MCPP_LIB_FALSE= +fi + + if test x$enable_replace_cpp = xyes; then + REPLACE_CPP_TRUE= + REPLACE_CPP_FALSE='#' +else + REPLACE_CPP_TRUE='#' + REPLACE_CPP_FALSE= +fi + + if test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + MINGW_TRUE= + MINGW_FALSE='#' +else + MINGW_TRUE='#' + MINGW_FALSE= +fi + + + +ac_config_files="$ac_config_files Makefile src/Makefile tests/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${GNUC_TRUE}" && test -z "${GNUC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GNUC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GNUC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MCPP_LIB_TRUE}" && test -z "${MCPP_LIB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MCPP_LIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MCPP_LIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${REPLACE_CPP_TRUE}" && test -z "${REPLACE_CPP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"REPLACE_CPP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"REPLACE_CPP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MINGW_TRUE}" && test -z "${MINGW_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MINGW\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MINGW\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by mcpp $as_me 2.7.2, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +mcpp config.status 2.7.2 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +DLLTOOL!$DLLTOOL$ac_delim +AS!$AS$ac_delim +OBJDUMP!$OBJDUMP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +target_cc!$target_cc$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +gcc_path!$gcc_path$ac_delim +host_system!$host_system$ac_delim +Target_Cpu!$Target_Cpu$ac_delim +inc_dir!$inc_dir$ac_delim +gcc_maj_ver!$gcc_maj_ver$ac_delim +gcc_min_ver!$gcc_min_ver$ac_delim +cpp_call!$cpp_call$ac_delim +gcc_testsuite_dir!$gcc_testsuite_dir$ac_delim +GNUC_TRUE!$GNUC_TRUE$ac_delim +GNUC_FALSE!$GNUC_FALSE$ac_delim +MCPP_LIB_TRUE!$MCPP_LIB_TRUE$ac_delim +MCPP_LIB_FALSE!$MCPP_LIB_FALSE$ac_delim +REPLACE_CPP_TRUE!$REPLACE_CPP_TRUE$ac_delim +REPLACE_CPP_FALSE!$REPLACE_CPP_FALSE$ac_delim +MINGW_TRUE!$MINGW_TRUE$ac_delim +MINGW_FALSE!$MINGW_FALSE$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + + esac + +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/libraries/mcpp/configure.ac b/libraries/mcpp/configure.ac new file mode 100644 index 000000000..cdf1ebae3 --- /dev/null +++ b/libraries/mcpp/configure.ac @@ -0,0 +1,778 @@ +dnl configure.ac for MCPP 2003/11, 2008/11 kmatsui +dnl Process this file with autoconf to produce a configure script. + +dnl WARNING: This script does not assume cross-compiling. +dnl To cross-compile you must edit here and there of this file. + +AC_INIT( mcpp, 2.7.2, kmatsui@t3.rim.or.jp) +AC_CONFIG_SRCDIR( src/main.c) +AM_CONFIG_HEADER( src/config.h) +AC_CONFIG_AUX_DIR( config) +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE( no-dependencies) + +dnl Checks for programs. + +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_EGREP +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL + +dnl WARNING: Configure must check the characteristics of target compiler. +dnl MCPP may modify the behavior of the target compiler-system. +dnl You must uninstall MCPP before re-configuring. + +AC_MSG_CHECKING( [whether the cpp is target preprocessor]) +mcpp=`$CPP $CFLAGS -xc -v /dev/null 2>&1 | grep 'MCPP'` +if test "x$mcpp" != x; then + AC_MSG_ERROR( Do 'make uninstall' before configuring again.) +fi +AC_MSG_RESULT( yes) + +dnl Define host system and target system + +case $host_os in +linux*) + AC_DEFINE( [HOST_SYSTEM], [SYS_LINUX], [Define the host system.]) + ac_c_define_HOST_SYSTEM=[SYS_LINUX] + ;; +freebsd*) + AC_DEFINE( [HOST_SYSTEM], [SYS_FREEBSD]) + ac_c_define_HOST_SYSTEM=[SYS_FREEBSD] + ;; +darwin*) + AC_DEFINE( [HOST_SYSTEM], [SYS_MAC]) + ac_c_define_HOST_SYSTEM=[SYS_MAC] + ;; +cygwin*) + AC_DEFINE( [HOST_SYSTEM], [SYS_CYGWIN]) + ac_c_define_HOST_SYSTEM=[SYS_CYGWIN] + ;; +mingw*) + AC_DEFINE( [HOST_SYSTEM], [SYS_MINGW]) + ac_c_define_HOST_SYSTEM=[SYS_MINGW] + ;; +*) + AC_MSG_WARN( [Unsupported host OS, assuming to be an UNIX variant]) + AC_DEFINE( [HOST_SYSTEM], [SYS_UNIX]) + ac_c_define_HOST_SYSTEM=[SYS_UNIX] + ;; +esac +host_system=$ac_c_define_HOST_SYSTEM + +case $target_os in +linux*) + AC_DEFINE( [SYSTEM], [SYS_LINUX], [Define the target system.]) + ;; +freebsd*) + AC_DEFINE( [SYSTEM], [SYS_FREEBSD]) + ;; +darwin*) + AC_DEFINE( [SYSTEM], [SYS_MAC]) + ;; +cygwin*) + AC_DEFINE( [SYSTEM], [SYS_CYGWIN]) + ;; +mingw*) + AC_DEFINE( [SYSTEM], [SYS_MINGW]) + ;; +*) + AC_MSG_WARN( Unsupported target OS, assuming to be an UNIX variant) + AC_DEFINE( [SYSTEM], [SYS_UNIX]) + ;; +esac + +## --enable-replace-cpp option +AC_ARG_ENABLE( replace-cpp, + AC_HELP_STRING( [--enable-replace-cpp], + [Replace the resident preprocessor with mcpp]), + , ## the compiler name will be defined later + AC_DEFINE( [COMPILER], [INDEPENDENT], [Define the target compiler.]) + ## else define COMPILER as INDEPENDENT +) + +## Generally this configure does not support cross-compiling. +## Nevertheless, it can configure cross-compiler of Apple-GCC (i686 vs ppc). +if test x$enable_replace_cpp = xyes \ + && test $ac_c_define_HOST_SYSTEM = SYS_MAC \ + && test $host_cpu != $target_cpu; then +## Enable to build mcpp into cross-compiler of Apple-GCC +## --with-target-cc option +AC_ARG_WITH( target_cc, + AC_HELP_STRING( [--with-target-cc], + [Specify the target compiler to build mcpp into on Mac OS X]), + if test x${withval+set} = xset; then + target_cc=$withval + target_name=`echo $target_cc | sed 's/-gcc.*$//'` + if test $target_name != $target_alias; then + AC_MSG_ERROR( [The argument of --with-target-cc option conflicts with --target option.]) + fi + AC_SUBST( [target_cc]) + fi +) +fi + +dnl Define a target specific macro. + +AC_MSG_CHECKING( for target cpu) + +## These are not predefined macros of MCPP. MCPP will define predefined macros +## on compile time based on the CPU macro, and possibly redefine them at an +## execution time. + +case $target_cpu in +x86_64|amd64) + Target_Cpu=x86_64 + ;; +i?86*) + Target_Cpu=i386 + ;; +powerpc64|ppc64) + Target_Cpu=ppc64 + ;; +powerpc|ppc|ppc7400) + Target_Cpu=ppc + ;; +*) + Target_Cpu=$target_cpu + ;; +esac + +AC_MSG_RESULT( $Target_Cpu) +AC_DEFINE_UNQUOTED( [CPU], "$Target_Cpu", [Define the cpu-specific-macro.]) + +## Build into cross-compiler on Mac OS +if test x$enable_replace_cpp = xyes \ + && test $ac_c_define_HOST_SYSTEM = SYS_MAC \ + && test x${target_cc+set} = xset; then + arch_opt="-arch $Target_Cpu" +fi + +dnl Checks for header files. + +AC_CHECK_HEADERS( [unistd.h, stdint.h, inttypes.h]) + +dnl Checks for typedefs, and compiler characteristics. + +AC_CHECK_TYPES( [intmax_t, long long]) + +dnl Check for library functions. + +AC_CHECK_FUNCS( [stpcpy]) + +dnl Checks for some system characteristics. + +AC_CACHE_CHECK( if the cases of filename are folded, + ac_cv_fname_fold, + [touch hJkL + [ac_cv_fname_fold=no] + AC_RUN_IFELSE( [[ +#include +#include + void exit(); +int main( void) +{ + if (fopen( "HjKl", "r") == NULL) + exit( errno); + else + exit( 0); +} ]], + [ac_cv_fname_fold=yes], + [], + AC_MSG_WARN( cannot run on cross-compiling so assumes that the cases of filename are not folded.) + ) + rm hJkL], +) +if test x$ac_cv_fname_fold = xyes; then + AC_DEFINE( [FNAME_FOLD], 1, + [Define if the cases of file name are folded.]) +fi + +dnl Checks for some host compiler characteristics. + +AC_DEFINE_UNQUOTED( [OBJEXT], ["$ac_cv_objext"], + [Define the suffix of object file.]) + +dnl Check printf length modifier of the longest integer. + +# AC_CHECK_MOD_LL( modifier, additional include header) +# Try the printf length modifier for the longest integer. +# The redundant sscanf() is for some compilers which cannot handle +# long long integer token. +AC_DEFUN([AC_CHECK_MOD_LL], [ + AC_CACHE_CHECK( [printf length modifier for the longest integer], + [ac_cv_c_printf_modifier], + AC_RUN_IFELSE( [[ +#include +#include + int strcmp(); + void exit(); +$3 +int main( void) +{ char buf@<:@ 20@:>@; + $1 num; + sscanf( "1234567890123456789", "%$2d", &num); + sprintf( buf, "%$2d", num); + assert( strcmp( buf, "1234567890123456789") == 0); + exit( 0); +} ]], + [ac_cv_c_printf_modifier=$2], + , + AC_MSG_WARN( cannot run on cross-compiling so assumes the length modifier of long long is "%ll") + AC_DEFINE( [LL_FORM], "ll", + [Define printf length modifier for the longest integer.]) + [ac_cv_c_printf_modifier=ll] + ) + ) +] ) + +if test x$ac_cv_type_intmax_t = xyes; then + AC_CHECK_MOD_LL( [intmax_t], [j], [#include ]) + if test $ac_c_define_HOST_SYSTEM = SYS_CYGWIN \ + || test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + sleep 1 # wait for cleanup + fi +fi + +if test x$ac_cv_type_long_long = xyes; then + for modifier in ll I64 q L + do + AC_CHECK_MOD_LL( [long long], ${modifier}) + if test x${ac_cv_c_printf_modifier+set} = xset; then + break + fi + if test $ac_c_define_HOST_SYSTEM = SYS_CYGWIN \ + || test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + sleep 1 # wait for cleanup + fi + done +fi + +if test x${ac_cv_c_printf_modifier+set} = xset; then + AC_DEFINE_UNQUOTED( [LL_FORM], "$ac_cv_c_printf_modifier", + [Define printf length modifier for the longest integer.]) +fi + +if test $ac_c_define_HOST_SYSTEM = SYS_FREEBSD && \ + test x$mcpp_ac_c_define_SYSTEM_SP_STD != x__FreeBSD__; then + fbsd_ver=`echo '__FreeBSD__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ .*//'` + AC_DEFINE_UNQUOTED( [SYSTEM_EXT_VAL], "$fbsd_ver", + [Define the version of FreeBSD.]) +fi + +if test x$ac_cv_c_compiler_gnu = xyes; then + + AC_DEFINE( [HOST_COMPILER], [GNUC], [Define the host compiler.]) + + AC_DEFINE( [HOST_CMP_NAME], "GCC", [Define the host compiler name.]) + + AC_MSG_CHECKING( for value of __GNUC__) + gcc_maj_ver=`echo '__GNUC__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *//'` + AC_MSG_RESULT( $gcc_maj_ver) + AC_DEFINE_UNQUOTED( [GCC_MAJOR_VERSION], "$gcc_maj_ver", + [Define gcc major version.]) + AC_MSG_CHECKING( for value of __GNUC_MINOR__) + gcc_min_ver=`echo __GNUC_MINOR__ | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *//'` + AC_MSG_RESULT( $gcc_min_ver) + AC_DEFINE_UNQUOTED( [GCC_MINOR_VERSION], "$gcc_min_ver", + [Define gcc minor version.]) + + cw=`pwd` + if test x$srcdir = "x." || test x$srcdir = x; then + src_dir=$cw + else + src_dir=$srcdir + fi + if test $ac_c_define_HOST_SYSTEM = SYS_CYGWIN; then + AC_CACHE_CHECK( the root directory, + ac_cv_cygwin_root, + [ac_cv_cygwin_root=`$src_dir/config/cygwin_root`] + ) + AC_DEFINE_UNQUOTED( [CYGWIN_ROOT_DIRECTORY], "$ac_cv_cygwin_root", + [Define root directory of CYGWIN.]) + fi + if test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + AC_CACHE_CHECK( the root directory, + ac_cv_msys_root, + cd /tmp + cat > getcwd.c <<\_EOF +#include +#include +#include +int main( int argc, char ** argv) +{ char buf@<:@ PATH_MAX@:>@; + getcwd( buf, PATH_MAX); + puts( buf); + return 0; +} +_EOF + $CC getcwd.c + cd / + [ac_cv_msys_root=`$src_dir/config/mingw_root`] + ) + AC_CACHE_CHECK( the /mingw directory, + ac_cv_mingw_dir, + cd /mingw + [ac_cv_mingw_dir=`$src_dir/config/mingw_root`] + ) + cd $cw + rm -f /tmp/getcwd.c /tmp/a.exe + AC_DEFINE_UNQUOTED( [MSYS_ROOT_DIRECTORY], "$ac_cv_msys_root", + [Define root directory of MSYS.]) + AC_DEFINE_UNQUOTED( [MINGW_DIRECTORY], "$ac_cv_mingw_dir", + [Define /mingw directory.]) + fi + +else # not gcc + +# mcpp_AC_C_DEFINE( SYSTEM | CPU | COMPILER, STD | OLD, $enableval) +# Specify the target-specific predefined macro. +AC_DEFUN([mcpp_AC_C_DEFINE], [ + name=`echo $3 | sed 's/=.*//'` + mcpp_macro=$1_SP_$2 + stripped_mcpp_macro=`echo $mcpp_macro | sed 's/STD//'` + if test x$stripped_mcpp_macro != x$mcpp_macro; then + stripped_name=`echo $name | sed 's/^_//'` + if test x$stripped_name = x$name; then + AC_MSG_ERROR( The macro name '$name' should begin with '_'.) + fi + else + stripped_name=`echo $name | sed 's/^@<:@A-Za-z@:>@//'` + if test x$stripped_name = x$name; then + AC_MSG_ERROR( The macro name '$name' should begin with an alphabetic letter.) + fi + fi + if test x$name = x$3; then + [replace=1] + else + [replace=`echo $3 | sed 's/^.*=//'`] + fi + AC_DEFINE_UNQUOTED( [$mcpp_macro], "$name") + AC_DEFINE_UNQUOTED( [${mcpp_macro}_VAL], "$replace") + mcpp_ac_c_define_$1_$2=$name +]) + +# mcpp_AC_C_PREDEF( SYSTEM | CPU | COMPILER, STD | OLD, additional description) +# Specify the target-specific predefined macro via mcpp_AC_C_DEFINE. +AC_DEFUN([mcpp_AC_C_PREDEF], [ + AC_ARG_ENABLE( $1-$2-macro, + AC_HELP_STRING( --enable-$1-$2-macro=name@<:@=replace@:>@, + [specify the $1-specific $2-style predefined macro. $3]), + if test x$enableval = xyes || test x$enableval = xno; then + AC_MSG_ERROR( This option requires an argument as 'name@<:@=replace@:>@'.) + fi + mcpp_AC_C_DEFINE( $1, $2, $enableval) + AH_TEMPLATE( [$1_SP_$2], + [Define the name of $1-specific $2-style predefined macro.]) + AH_TEMPLATE( [$1_SP_$2_VAL], + [Define the value of $1-specific $2-style predefined macro.]) + ) +]) + +mcpp_AC_C_PREDEF( [SYSTEM], [STD], + [In all this and the following 5 options, + 'STD'-style name begins with an '_', + 'OLD'-style name begins with an alphabetic and + if '=replace' is missing the macro is defined as 1.] +) +mcpp_AC_C_PREDEF( [SYSTEM], [OLD]) +mcpp_AC_C_PREDEF( [CPU], [STD]) +mcpp_AC_C_PREDEF( [CPU], [OLD]) +mcpp_AC_C_PREDEF( [COMPILER], [STD]) +mcpp_AC_C_PREDEF( [COMPILER], [OLD]) + +fi + +## MacOS has "framework" directories. +if test $ac_c_define_HOST_SYSTEM = SYS_MAC; then + AC_MSG_CHECKING( for the MacOS-specific framework directory) + frameworks=`$CPP $CFLAGS $arch_opt -xc -v /dev/null 2>&1 | sed 's/^ *//' | sed 's/ .*$//' | $EGREP '/Frameworks$'` + n=1 + for dir in $frameworks + do + case $n in + 1) framework1=$dir;; + 2) framework2=$dir;; + 3) framework3=$dir;; + esac + let n=n+1 + done + if test x${framework1+set} = xset; then + AC_DEFINE_UNQUOTED( [FRAMEWORK1], "$framework1", + [Define MacOS-specific framework directory 1.]) + AC_MSG_RESULT( $framework1) + else + AC_MSG_RESULT( none) + fi + if test x${framework2+set} = xset; then + AC_DEFINE_UNQUOTED( [FRAMEWORK2], "$framework2", + [Define MacOS-specific framework directory 2.]) + AC_MSG_RESULT( $framework2) + fi + if test x${framework3+set} = xset; then + AC_DEFINE_UNQUOTED( [FRAMEWORK3], "$framework3", + [Define MacOS-specific framework directory 3.]) + AC_MSG_RESULT( $framework3) + fi +fi ## SYS_MAC + +## --enable-mcpplib option +AC_ARG_ENABLE( mcpplib, + AC_HELP_STRING( [--enable-mcpplib], + [Build libmcpp rather than stand-alone mcpp]) +) + +if test x$enable_mcpplib = xyes; then ## mcpplib mode + AC_DEFINE( [MCPP_LIB], 1, [Define if build libmcpp]) + if test x$enable_replace_cpp = xyes; then + AC_MSG_WARN( Ignores enable-replace-cpp option) + [enable_replace_cpp=no] + fi + +else + +if test x$enable_replace_cpp = xyes; then ## replace-cpp mode + +dnl Check the characteristics of target compiler. +dnl Note: The following 3 hundred and more lines are for replace-cpp-mode. +dnl Target-compiler-specific configuration need these lines. +dnl These lines are not used in compiler-independent configuration. + +dnl Check which header file CPP includes, +dnl relative to CURRENT or SOURCE directory. + +# AC_C_INCLUDE_PREF( CURRENT | SOURCE | NEXT) +# Check the include preference ('NEXT' means CURRENT & SOURCE) +AC_DEFUN([AC_C_INCLUDE_PREF], [ + AC_EGREP_CPP( $1, [ +#include "../next/header.h" +], + [ac_cv_c_include_pref=$1], + ) +]) + +AC_CACHE_CHECK( include preference - relative to current or source directory, + ac_cv_c_include_pref, + mkdir mcpp-tmp + cd mcpp-tmp + mkdir dir ../next ../next/dir + echo '#include "dir/what.h"' > ../next/header.h + echo '#include "next.h"' >> ../next/header.h + echo 'CURRENT' > dir/what.h + echo 'SOURCE' > ../next/dir/what.h + echo 'NEXT' > ../next/next.h + AC_C_INCLUDE_PREF( [SOURCE]) + if test x$ac_cv_c_include_pref != xSOURCE; then + AC_C_INCLUDE_PREF( [CURRENT]) + if test x$ac_cv_c_include_pref = xCURRENT; then + AC_C_INCLUDE_PREF( [NEXT]) + if test x$ac_cv_c_include_pref = xNEXT; then + [ac_cv_c_include_pref="(CURRENT & SOURCE)"] + fi + else + AC_MSG_ERROR( Failed to include header file.) + fi + fi + cd .. + rm -rf mcpp-tmp next + if test $ac_c_define_HOST_SYSTEM = SYS_CYGWIN \ + || test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + sleep 1 # wait for cleanup + fi +) +AC_DEFINE_UNQUOTED( [SEARCH_INIT], $ac_cv_c_include_pref, + [Define include preference.]) + +AC_CACHE_CHECK( if the argument of pragma is macro expanded, + ac_cv_c_pragma_is_expanded, + AC_COMPILE_IFELSE( [[ +#define once +#pragma once]], + [ac_cv_c_pragma_is_expanded=no], + [ac_cv_c_pragma_is_expanded=yes] + ) +) +if test x$ac_cv_c_pragma_is_expanded = xyes; then + AC_DEFINE( [EXPAND_PRAGMA], 1, + [Define if the argument of pragma is macro expanded.]) +fi + +AC_CACHE_CHECK( if digraphs can be used, + ac_cv_c_digraph, + [AC_PREPROC_IFELSE( [ +%:if 1 +%:endif], + [ac_cv_c_digraph=yes], + [ac_cv_c_digraph=no] + )] +) +if test x$ac_cv_c_digraph = xyes; then + AC_DEFINE( [HAVE_DIGRAPHS], 1, [Define if digraphs are available.]) +fi + +AC_CACHE_CHECK( preprocessor output format of line directive, + ac_cv_c_line_format, + [ac_cv_c_line_format=\"`echo '#line 4321' | $CPP - | grep 432 | sed 's/432.*$//'`\"] +## Note: the output line number may be 4320 on GCC 2.* or other preprocessors. +) +AC_DEFINE_UNQUOTED( [LINE_PREFIX], $ac_cv_c_line_format, + [Define output format of line directive.]) +if test "x$ac_cv_c_line_format" = "x\"#line \""; then + ac_cv_c_std_line_prefix=1 +else + ac_cv_c_std_line_prefix=0 +fi +AC_DEFINE_UNQUOTED( [STD_LINE_PREFIX], $ac_cv_c_std_line_prefix, + [Define whether output format of line directive is C source style.]) + +AC_CACHE_CHECK( default value of __STDC__, + ac_cv_c_stdc, + [stdc=`echo '__STDC__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ .*//'`] + if test x"$stdc" = x"__STDC__"; then + [ac_cv_c_stdc=0] + else + [ac_cv_c_stdc=$stdc] + fi +) +AC_DEFINE_UNQUOTED( [STDC], $ac_cv_c_stdc, + [Define the default value of __STDC__.]) + +AC_CACHE_CHECK( default value of __STDC_VERSION__, + ac_cv_c_stdc_ver, + [stdc_ver=`echo '__STDC_VERSION__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ .*//'`] + if test x"$stdc_ver" = x"__STDC_VERSION__"; then + [ac_cv_c_stdc_ver=0] + else + [ac_cv_c_stdc_ver=$stdc_ver] + fi +) +AC_DEFINE_UNQUOTED( [STDC_VERSION], $ac_cv_c_stdc_ver, + [Define the default value of __STDC_VERSION__.]) + +if test x${ac_cv_c_compiler_gnu} != xyes; then + +# Specify the compiler's name +AC_ARG_WITH( compiler-name, + AC_HELP_STRING( [--with-compiler-name=NAME], + [specify the compiler name which is used as the definition of COMPILER macro]), + AC_DEFINE_UNQUOTED( [COMPILER], $compiler_name, [specify the compiler name]), + AC_MSG_ERROR( --with-compiler-name=NAME option should be specified to define [COMPILER] macro.) +) + +# Specify the C++ header file directory +AC_ARG_WITH( cxx-include-dir, + AC_HELP_STRING( [--with-cxx-include-dir=directory], + [specify the C++ include directory by absolute path [[none]]]), + [case "${withval}" in + [\\/]* | [A-Za-z]:[\\/]*) + cxx_include_dir=`echo $withval | sed 's,/$,,'; 's,\\$,,'` + AC_DEFINE_UNQUOTED( [CPLUS_INCLUDE_DIR1], $cxx_include_dir, + [Define the C++ include directory.]) + ;; + *) AC_MSG_ERROR( $withval should be an absolute path.) ;; + esac] +) + +fi # not gcc + +dnl Define compiler specific elements. + +AC_MSG_NOTICE( checking for some compiler specific elements) + +# Define GCC specific elements. +if test x$ac_cv_c_compiler_gnu = xyes; then + + AC_DEFINE( [COMPILER], [GNUC], [Define the target compiler.]) + + cpp_call=`$CPP $CFLAGS $arch_opt -xc -v /dev/null 2>&1 | $EGREP '/cpp|/cc1' | sed 's/^ *//; s/ .*//'` + AC_MSG_CHECKING( for the directory to install mcpp) + cpp_name=`expr $cpp_call : '.*/\(.*\)'` + bindir=`expr $cpp_call : "\(.*\)/$cpp_name"` + AC_MSG_RESULT( $bindir) + + AC_PATH_PROG( [gcc_path], [$CC], , [$PATH]) + cc_path=`echo $CC | $EGREP "/"` + if test x$cc_path != x; then + AC_MSG_ERROR( [Environment variables CC and CXX for GCC-specific-build should not contain a directory part.]); + fi + ## force to set $prefix to GCC's prefix + ## (i.e. "/usr/local" of "/usr/local/bin/gcc") + gcc_prefix=`echo $gcc_path | $EGREP "/bin/$CC\$" | sed "s,/bin/$CC\$,,"` + if test "x$gcc_prefix" != xNONE; then + if test "x$prefix" != xNONE && "x$gcc_prefix" != "x$prefix"; then + AC_MSG_WARN( [Ignored --prefix option, since it conflicts with GCC path]) + fi + prefix=$gcc_prefix + else + if test "x$prefix" = xNONE; then + prefix=$ac_default_prefix + fi + fi + lang_save=$LANG + export LANG=C + + AC_MSG_CHECKING( for the compiler-specific C include directory) + exclude="^/usr(/local|)/include\$|^${prefix}(/local|)/include\$|/Frameworks|End of search list" + c_include_dirs=`$CPP $CFLAGS $arch_opt -xc -v /dev/null 2>&1 | sed '1,/<...> search starts here/d' | sed '/End of search list/q' | sed 's/^ *//' | $EGREP -v "$exclude"` + n=1 + for dir in $c_include_dirs + do + case $n in + 1) c_include_dir1=$dir;; + 2) c_include_dir2=$dir;; + 3) c_include_dir3=$dir;; + esac + let n=n+1 + done + if test x${c_include_dir1+set} = xset; then + AC_DEFINE_UNQUOTED( [C_INCLUDE_DIR1], "$c_include_dir1", + [Define compiler-specific C include directory 1.]) + AC_MSG_RESULT( $c_include_dir1) + else + AC_MSG_RESULT( none) + fi + if test x${c_include_dir2+set} = xset; then + AC_DEFINE_UNQUOTED( [C_INCLUDE_DIR2], "$c_include_dir2", + [Define compiler-specific C include directory 2.]) + AC_MSG_RESULT( $c_include_dir2) + fi + if test x${c_include_dir3+set} = xset; then + AC_DEFINE_UNQUOTED( [C_INCLUDE_DIR3], "$c_include_dir3", + [Define compiler-specific C include directory 3.]) + AC_MSG_RESULT( $c_include_dir3) + fi + + AC_PROG_CXX + AC_PROG_CXXCPP + AC_LANG_PUSH( C++) + AC_MSG_CHECKING( for the compiler-specific C++ include directory) + exclude="^/usr(/local|)/include\$|^${prefix}(/local|)/include\$|/Frameworks|^${c_include_dir1}\$|^${c_include_dir2}\$|^${c_include_dir3}\$" + cxx_include_dirs=`${CXXCPP} ${CXXFLAGS} $arch_opt -xc++ -v /dev/null 2>&1 | sed '1,/<...> search starts here/d' | sed '/End of search list/q' | sed '/End of search list/d' | sed 's/^ *//' | $EGREP -v "$exclude"` + n=1 + for dir in ${cxx_include_dirs} + do + case $n in + 1) cxx_include_dir1=$dir;; + 2) cxx_include_dir2=$dir;; + 3) cxx_include_dir3=$dir;; + 4) cxx_include_dir4=$dir;; + esac + let n=n+1 + done + if test x${cxx_include_dir1+set} = xset; then + AC_DEFINE_UNQUOTED( [CPLUS_INCLUDE_DIR1], "$cxx_include_dir1", + [Define compiler-specific C++ include directory 1.]) + AC_MSG_RESULT( $cxx_include_dir1) + fi + if test x${cxx_include_dir2+set} = xset; then + AC_DEFINE_UNQUOTED( [CPLUS_INCLUDE_DIR2], "$cxx_include_dir2", + [Define compiler-specific C++ include directory 2.]) + AC_MSG_RESULT( $cxx_include_dir2) + fi + if test x${cxx_include_dir3+set} = xset; then + AC_DEFINE_UNQUOTED( [CPLUS_INCLUDE_DIR3], "$cxx_include_dir3", + [Define compiler-specific C++ include directory 3.]) + AC_MSG_RESULT( $cxx_include_dir3) + fi + if test x${cxx_include_dir4+set} = xset; then + AC_DEFINE_UNQUOTED( [CPLUS_INCLUDE_DIR4], "$cxx_include_dir4", + [Define compiler-specific C++ include directory 4.]) + AC_MSG_RESULT( $cxx_include_dir4) + fi + AC_LANG_POP( C++) + + export LANG=$lang_save + + ## the directory into which mcpp_g*.h header files are generated + ## '/mcpp-gcc' will be appended to 'inc_dir' + if test $ac_c_define_HOST_SYSTEM = SYS_MINGW; then + inc_dir=$c_include_dir2 + else + if test x${c_include_dir1+set} = xset; then + inc_dir=$c_include_dir1 + else + inc_dir="$prefix"/include + fi + fi + AC_DEFINE_UNQUOTED( [INC_DIR], "$inc_dir", + [Define include directory to install mcpp_g*.h header files.]) + + AC_SUBST( [CPPFLAGS]) + AC_SUBST( [host_system]) + AC_SUBST( [Target_Cpu]) + AC_SUBST( [inc_dir]) + AC_SUBST( [gcc_maj_ver]) + AC_SUBST( [gcc_min_ver]) + AC_SUBST( [cpp_call]) + AC_PROG_LN_S + + if test x$gcc_maj_ver = x2; then + + AC_CACHE_CHECK( for value of predefined macro '__SIZE_TYPE__', + size_type, + [size_type=`echo '__SIZE_TYPE__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *//'`] + ) + AC_DEFINE_UNQUOTED( [COMPILER_SP1_VAL], "$size_type", + [Define the type of size_t.]) + + AC_CACHE_CHECK( for value of predefined macro '__PTRDIFF_TYPE__', + ptrdiff_type, + [ptrdiff_type=`echo '__PTRDIFF_TYPE__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *$//'`] + ) + AC_DEFINE_UNQUOTED( [COMPILER_SP2_VAL], "$ptrdiff_type", + [Define the type of ptrdiff_t.]) + + AC_CACHE_CHECK( for value of predefined macro '__WCHAR_TYPE__', + wchar_type, + [wchar_type=`echo '__WCHAR_TYPE__' | $CPP - | sed 's/^ *//' | $EGREP -v '^#|^$' | sed 's/ *$//'`] + ) + AC_DEFINE_UNQUOTED( [COMPILER_SP3_VAL], "$wchar_type", + [Define the type of wchar_t.]) + + fi +fi + +## Handling of multi-byte characters containing '0x5c' codes: +## These tests cannot be executed without appropriate options for the +## compiler. So, here we define all of these macros as FALSE. +## User should edit config.h by hand after executing this script. +## These should be 0 for GCC at least upto V.4.1. + AC_DEFINE( [SJIS_IS_ESCAPE_FREE], 0, + [Define if '0x5c' in SJIS multi-byte character is safe.]) + AC_DEFINE( [ISO2022_JP_IS_ESCAPE_FREE], 0, + [Define if '0x5c' in ISO2022-JP multi-byte character is safe.]) + AC_DEFINE( [BIGFIVE_IS_ESCAPE_FREE], 0, + [Define if '0x5c' in BIG5 multi-byte character is safe.]) + +fi ## replace-cpp mode +fi ## build-cpp mode or replace-cpp mode + +AC_ARG_WITH( [gcc-testsuite-dir], + AC_HELP_STRING( [--with-gcc-testsuite-dir=directory], + [specify the gcc testsuite directory to do make check. + e.g. /usr/src/rpm/SOURCES/gcc-2.95.4/gcc/testsuite, + /usr/local/src/gcc-3.2/gcc/testsuite, etc. + The testsuite of mcpp uses gcc testsuite, hence needs gcc source + or at least gcc testsuite. + This option needs --enable-replace-cpp option.]), + if test x${withval+set} = xset; then + if test x$enable_replace_cpp = xyes; then + [gcc_testsuite_dir=`echo $withval | sed 's,/$,,'`] + else + AC_MSG_ERROR( [--with-gcc-testsuite-dir option requires --enable-replace-cpp option.]) + fi + else + AC_MSG_ERROR( [--with-gcc-testsuite-dir option requires an argument.]) + fi +) +AC_SUBST( [gcc_testsuite_dir]) +AM_CONDITIONAL( [GNUC], test x$ac_cv_c_compiler_gnu = xyes) +AM_CONDITIONAL( [MCPP_LIB], test x$enable_mcpplib = xyes) +AM_CONDITIONAL( [REPLACE_CPP], test x$enable_replace_cpp = xyes) +AM_CONDITIONAL( [MINGW], test $ac_c_define_HOST_SYSTEM = SYS_MINGW) + +dnl Final output. + +AC_OUTPUT( Makefile src/Makefile tests/Makefile) diff --git a/libraries/mcpp/cpp-test/LICENSE b/libraries/mcpp/cpp-test/LICENSE new file mode 100644 index 000000000..5b617d281 --- /dev/null +++ b/libraries/mcpp/cpp-test/LICENSE @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * This software including the files in this directory is provided under + * the following license. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/libraries/mcpp/cpp-test/test-l/cpp-test.exp b/libraries/mcpp/cpp-test/test-l/cpp-test.exp new file mode 100644 index 000000000..ec62f3176 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/cpp-test.exp @@ -0,0 +1,22 @@ +# cpp-test.exp 2002/12 +# to test cpp-test +# imported from dg.exp of GNU C + +# Load support procs. +load_lib gcc-dg.exp + +# If a testcase doesn't have special options, use these. +global DEFAULT_CFLAGS +if ![info exists DEFAULT_CFLAGS] then { + set DEFAULT_CFLAGS " -ansi -pedantic-errors" +} + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \ + "" $DEFAULT_CFLAGS + +# All done. +dg-finish diff --git a/libraries/mcpp/cpp-test/test-l/ifdef127.h b/libraries/mcpp/cpp-test/test-l/ifdef127.h new file mode 100644 index 000000000..6c72441fb --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/ifdef127.h @@ -0,0 +1,389 @@ +/* ifdef127.h */ + +#ifdef X01 +#else +#ifdef X02 +#else +#ifdef X03 +#else +#ifdef X04 +#else +#ifdef X05 +#else +#ifdef X06 +#else +#ifdef X07 +#else +#ifdef X08 +#else +#ifdef X09 +#else +#ifdef X0A +#else +#ifdef X0B +#else +#ifdef X0C +#else +#ifdef X0D +#else +#ifdef X0E +#else +#ifdef X0F + ifdef_nest = 0x0f; +#else +#ifdef X10 +#else +#ifdef X11 +#else +#ifdef X12 +#else +#ifdef X13 +#else +#ifdef X14 +#else +#ifdef X15 +#else +#ifdef X16 +#else +#ifdef X17 +#else +#ifdef X18 +#else +#ifdef X19 +#else +#ifdef X1A +#else +#ifdef X1B +#else +#ifdef X1C +#else +#ifdef X1D +#else +#ifdef X1E +#else +#ifdef X1F + ifdef_nest = 0x1f; +#else +#ifdef X20 +#else +#ifdef X21 +#else +#ifdef X22 +#else +#ifdef X23 +#else +#ifdef X24 +#else +#ifdef X25 +#else +#ifdef X26 +#else +#ifdef X27 +#else +#ifdef X28 +#else +#ifdef X29 +#else +#ifdef X2A +#else +#ifdef X2B +#else +#ifdef X2C +#else +#ifdef X2D +#else +#ifdef X2E +#else +#ifdef X2F +#else +#ifdef X30 +#else +#ifdef X31 +#else +#ifdef X32 +#else +#ifdef X33 +#else +#ifdef X34 +#else +#ifdef X35 +#else +#ifdef X36 +#else +#ifdef X37 +#else +#ifdef X38 +#else +#ifdef X39 +#else +#ifdef X3A +#else +#ifdef X3B +#else +#ifdef X3C +#else +#ifdef X3D +#else +#ifdef X3E +#else +#ifdef X3F + ifdef_nest = 0x3f; +#else +#ifdef X40 +#else +#ifdef X41 +#else +#ifdef X42 +#else +#ifdef X43 +#else +#ifdef X44 +#else +#ifdef X45 +#else +#ifdef X46 +#else +#ifdef X47 +#else +#ifdef X48 +#else +#ifdef X49 +#else +#ifdef X4A +#else +#ifdef X4B +#else +#ifdef X4C +#else +#ifdef X4D +#else +#ifdef X4E +#else +#ifdef X4F +#else +#ifdef X50 +#else +#ifdef X51 +#else +#ifdef X52 +#else +#ifdef X53 +#else +#ifdef X54 +#else +#ifdef X55 +#else +#ifdef X56 +#else +#ifdef X57 +#else +#ifdef X58 +#else +#ifdef X59 +#else +#ifdef X5A +#else +#ifdef X5B +#else +#ifdef X5C +#else +#ifdef X5D +#else +#ifdef X5E +#else +#ifdef X5F +#else +#ifdef X60 +#else +#ifdef X61 +#else +#ifdef X62 +#else +#ifdef X63 +#else +#ifdef X64 +#else +#ifdef X65 +#else +#ifdef X66 +#else +#ifdef X67 +#else +#ifdef X68 +#else +#ifdef X69 +#else +#ifdef X6A +#else +#ifdef X6B +#else +#ifdef X6C +#else +#ifdef X6D +#else +#ifdef X6E +#else +#ifdef X6F +#else +#ifdef X70 +#else +#ifdef X71 +#else +#ifdef X72 +#else +#ifdef X73 +#else +#ifdef X74 +#else +#ifdef X75 +#else +#ifdef X76 +#else +#ifdef X77 +#else +#ifdef X78 +#else +#ifdef X79 +#else +#ifdef X7A +#else +#ifdef X7B +#else +#ifdef X7C +#else +#ifdef X7D +#else +#ifdef X7E +#else +#ifdef X7F + ifdef_nest = 0x7f; +#else +#include "ifdef255.h" +#endif /* X7F */ +#endif /* X7E */ +#endif /* X7D */ +#endif /* X7C */ +#endif /* X7B */ +#endif /* X7A */ +#endif /* X79 */ +#endif /* X78 */ +#endif /* X77 */ +#endif /* X76 */ +#endif /* X75 */ +#endif /* X74 */ +#endif /* X73 */ +#endif /* X72 */ +#endif /* X71 */ +#endif /* X70 */ +#endif /* X6F */ +#endif /* X6E */ +#endif /* X6D */ +#endif /* X6C */ +#endif /* X6B */ +#endif /* X6A */ +#endif /* X69 */ +#endif /* X68 */ +#endif /* X67 */ +#endif /* X66 */ +#endif /* X65 */ +#endif /* X64 */ +#endif /* X63 */ +#endif /* X62 */ +#endif /* X61 */ +#endif /* X60 */ +#endif /* X5F */ +#endif /* X5E */ +#endif /* X5D */ +#endif /* X5C */ +#endif /* X5B */ +#endif /* X5A */ +#endif /* X59 */ +#endif /* X58 */ +#endif /* X57 */ +#endif /* X56 */ +#endif /* X55 */ +#endif /* X54 */ +#endif /* X53 */ +#endif /* X52 */ +#endif /* X51 */ +#endif /* X50 */ +#endif /* X4F */ +#endif /* X4E */ +#endif /* X4D */ +#endif /* X4C */ +#endif /* X4B */ +#endif /* X4A */ +#endif /* X49 */ +#endif /* X48 */ +#endif /* X47 */ +#endif /* X46 */ +#endif /* X45 */ +#endif /* X44 */ +#endif /* X43 */ +#endif /* X42 */ +#endif /* X41 */ +#endif /* X40 */ +#endif /* X3F */ +#endif /* X3E */ +#endif /* X3D */ +#endif /* X3C */ +#endif /* X3B */ +#endif /* X3A */ +#endif /* X39 */ +#endif /* X38 */ +#endif /* X37 */ +#endif /* X36 */ +#endif /* X35 */ +#endif /* X34 */ +#endif /* X33 */ +#endif /* X32 */ +#endif /* X31 */ +#endif /* X30 */ +#endif /* X2F */ +#endif /* X2E */ +#endif /* X2D */ +#endif /* X2C */ +#endif /* X2B */ +#endif /* X2A */ +#endif /* X29 */ +#endif /* X28 */ +#endif /* X27 */ +#endif /* X26 */ +#endif /* X25 */ +#endif /* X24 */ +#endif /* X23 */ +#endif /* X22 */ +#endif /* X21 */ +#endif /* X20 */ +#endif /* X1F */ +#endif /* X1E */ +#endif /* X1D */ +#endif /* X1C */ +#endif /* X1B */ +#endif /* X1A */ +#endif /* X19 */ +#endif /* X18 */ +#endif /* X17 */ +#endif /* X16 */ +#endif /* X15 */ +#endif /* X14 */ +#endif /* X13 */ +#endif /* X12 */ +#endif /* X11 */ +#endif /* X10 */ +#endif /* X0F */ +#endif /* X0E */ +#endif /* X0D */ +#endif /* X0C */ +#endif /* X0B */ +#endif /* X0A */ +#endif /* X09 */ +#endif /* X08 */ +#endif /* X07 */ +#endif /* X06 */ +#endif /* X05 */ +#endif /* X04 */ +#endif /* X03 */ +#endif /* X02 */ +#endif /* X01 */ + diff --git a/libraries/mcpp/cpp-test/test-l/ifdef255.h b/libraries/mcpp/cpp-test/test-l/ifdef255.h new file mode 100644 index 000000000..2423d402f --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/ifdef255.h @@ -0,0 +1,388 @@ +/* ifdef255.h */ + +#ifdef X80 +#else +#ifdef X81 +#else +#ifdef X82 +#else +#ifdef X83 +#else +#ifdef X84 +#else +#ifdef X85 +#else +#ifdef X86 +#else +#ifdef X87 +#else +#ifdef X88 +#else +#ifdef X89 +#else +#ifdef X8A +#else +#ifdef X8B +#else +#ifdef X8C +#else +#ifdef X8D +#else +#ifdef X8E +#else +#ifdef X8F +#else +#ifdef X90 +#else +#ifdef X91 +#else +#ifdef X92 +#else +#ifdef X93 +#else +#ifdef X94 +#else +#ifdef X95 +#else +#ifdef X96 +#else +#ifdef X97 +#else +#ifdef X98 +#else +#ifdef X99 +#else +#ifdef X9A +#else +#ifdef X9B +#else +#ifdef X9C +#else +#ifdef X9D +#else +#ifdef X9E +#else +#ifdef X9F +#else +#ifdef XA0 +#else +#ifdef XA1 +#else +#ifdef XA2 +#else +#ifdef XA3 +#else +#ifdef XA4 +#else +#ifdef XA5 +#else +#ifdef XA6 +#else +#ifdef XA7 +#else +#ifdef XA8 +#else +#ifdef XA9 +#else +#ifdef XAA +#else +#ifdef XAB +#else +#ifdef XAC +#else +#ifdef XAD +#else +#ifdef XAE +#else +#ifdef XAF +#else +#ifdef XB0 +#else +#ifdef XB1 +#else +#ifdef XB2 +#else +#ifdef XB3 +#else +#ifdef XB4 +#else +#ifdef XB5 +#else +#ifdef XB6 +#else +#ifdef XB7 +#else +#ifdef XB8 +#else +#ifdef XB9 +#else +#ifdef XBA +#else +#ifdef XBB +#else +#ifdef XBC +#else +#ifdef XBD +#else +#ifdef XBE +#else +#ifdef XBF +#else +#ifdef XC0 +#else +#ifdef XC1 +#else +#ifdef XC2 +#else +#ifdef XC3 +#else +#ifdef XC4 +#else +#ifdef XC5 +#else +#ifdef XC6 +#else +#ifdef XC7 +#else +#ifdef XC8 +#else +#ifdef XC9 +#else +#ifdef XCA +#else +#ifdef XCB +#else +#ifdef XCC +#else +#ifdef XCD +#else +#ifdef XCE +#else +#ifdef XCF +#else +#ifdef XD0 +#else +#ifdef XD1 +#else +#ifdef XD2 +#else +#ifdef XD3 +#else +#ifdef XD4 +#else +#ifdef XD5 +#else +#ifdef XD6 +#else +#ifdef XD7 +#else +#ifdef XD8 +#else +#ifdef XD9 +#else +#ifdef XDA +#else +#ifdef XDB +#else +#ifdef XDC +#else +#ifdef XDD +#else +#ifdef XDE +#else +#ifdef XDF +#else +#ifdef XE0 +#else +#ifdef XE1 +#else +#ifdef XE2 +#else +#ifdef XE3 +#else +#ifdef XE4 +#else +#ifdef XE5 +#else +#ifdef XE6 +#else +#ifdef XE7 +#else +#ifdef XE8 +#else +#ifdef XE9 +#else +#ifdef XEA +#else +#ifdef XEB +#else +#ifdef XEC +#else +#ifdef XED +#else +#ifdef XEE +#else +#ifdef XEF +#else +#ifdef XF0 +#else +#ifdef XF1 +#else +#ifdef XF2 +#else +#ifdef XF3 +#else +#ifdef XF4 +#else +#ifdef XF5 +#else +#ifdef XF6 +#else +#ifdef XF7 +#else +#ifdef XF8 +#else +#ifdef XF9 +#else +#ifdef XFA +#else +#ifdef XFB +#else +#ifdef XFC +#else +#ifdef XFD +#else +#ifdef XFE +#else +#ifdef XFF + ifdef_nest = 0xff; +#else + ifdef_nest = 0xff; +#endif /* XFF */ +#endif /* XFE */ +#endif /* XFD */ +#endif /* XFC */ +#endif /* XFB */ +#endif /* XFA */ +#endif /* XF9 */ +#endif /* XF8 */ +#endif /* XF7 */ +#endif /* XF6 */ +#endif /* XF5 */ +#endif /* XF4 */ +#endif /* XF3 */ +#endif /* XF2 */ +#endif /* XF1 */ +#endif /* XF0 */ +#endif /* XEF */ +#endif /* XEE */ +#endif /* XED */ +#endif /* XEC */ +#endif /* XEB */ +#endif /* XEA */ +#endif /* XE9 */ +#endif /* XE8 */ +#endif /* XE7 */ +#endif /* XE6 */ +#endif /* XE5 */ +#endif /* XE4 */ +#endif /* XE3 */ +#endif /* XE2 */ +#endif /* XE1 */ +#endif /* XE0 */ +#endif /* XDF */ +#endif /* XDE */ +#endif /* XDD */ +#endif /* XDC */ +#endif /* XDB */ +#endif /* XDA */ +#endif /* XD9 */ +#endif /* XD8 */ +#endif /* XD7 */ +#endif /* XD6 */ +#endif /* XD5 */ +#endif /* XD4 */ +#endif /* XD3 */ +#endif /* XD2 */ +#endif /* XD1 */ +#endif /* XD0 */ +#endif /* XCF */ +#endif /* XCE */ +#endif /* XCD */ +#endif /* XCC */ +#endif /* XCB */ +#endif /* XCA */ +#endif /* XC9 */ +#endif /* XC8 */ +#endif /* XC7 */ +#endif /* XC6 */ +#endif /* XC5 */ +#endif /* XC4 */ +#endif /* XC3 */ +#endif /* XC2 */ +#endif /* XC1 */ +#endif /* XC0 */ +#endif /* XBF */ +#endif /* XBE */ +#endif /* XBD */ +#endif /* XBC */ +#endif /* XBB */ +#endif /* XBA */ +#endif /* XB9 */ +#endif /* XB8 */ +#endif /* XB7 */ +#endif /* XB6 */ +#endif /* XB5 */ +#endif /* XB4 */ +#endif /* XB3 */ +#endif /* XB2 */ +#endif /* XB1 */ +#endif /* XB0 */ +#endif /* XAF */ +#endif /* XAE */ +#endif /* XAD */ +#endif /* XAC */ +#endif /* XAB */ +#endif /* XAA */ +#endif /* XA9 */ +#endif /* XA8 */ +#endif /* XA7 */ +#endif /* XA6 */ +#endif /* XA5 */ +#endif /* XA4 */ +#endif /* XA3 */ +#endif /* XA2 */ +#endif /* XA1 */ +#endif /* XA0 */ +#endif /* X9F */ +#endif /* X9E */ +#endif /* X9D */ +#endif /* X9C */ +#endif /* X9B */ +#endif /* X9A */ +#endif /* X99 */ +#endif /* X98 */ +#endif /* X97 */ +#endif /* X96 */ +#endif /* X95 */ +#endif /* X94 */ +#endif /* X93 */ +#endif /* X92 */ +#endif /* X91 */ +#endif /* X90 */ +#endif /* X8F */ +#endif /* X8E */ +#endif /* X8D */ +#endif /* X8C */ +#endif /* X8B */ +#endif /* X8A */ +#endif /* X89 */ +#endif /* X88 */ +#endif /* X87 */ +#endif /* X86 */ +#endif /* X85 */ +#endif /* X84 */ +#endif /* X83 */ +#endif /* X82 */ +#endif /* X81 */ +#endif /* X80 */ diff --git a/libraries/mcpp/cpp-test/test-l/l_37_1.h b/libraries/mcpp/cpp-test/test-l/l_37_1.h new file mode 100644 index 000000000..3e91c17ef --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_1.h @@ -0,0 +1,24 @@ +/* l_37_1.h: Translation limits larger than C99 / 1. */ + +/* 37.1L: Number of parameters in macro. */ +#define glue255( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, \ + a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4, \ + a5, b5, c5, d5, e5, f5, g5, h5, i5, j5, k5, l5, m5, n5, o5, p5, \ + a6, b6, c6, d6, e6, f6, g6, h6, i6, j6, k6, l6, m6, n6, o6, p6, \ + a7, b7, c7, d7, e7, f7, g7, h7, i7, j7, k7, l7, m7, n7, o7, p7, \ + a8, b8, c8, d8, e8, f8, g8, h8, i8, j8, k8, l8, m8, n8, o8, p8, \ + a9, b9, c9, d9, e9, f9, g9, h9, i9, j9, k9, l9, m9, n9, o9, p9, \ + aa, ba, ca, da, ea, fa, ga, ha, ia, ja, ka, la, ma, na, oa, pa, \ + ab, bb, cb, db, eb, fb, gb, hb, ib, jb, kb, lb, mb, nb, ob, pb, \ + ac, bc, cc, dc, ec, fc, gc, hc, ic, jc, kc, lc, mc, nc, oc, pc, \ + ad, bd, cd, dd, ed, fd, gd, hd, id, jd, kd, ld, md, nd, od, pd, \ + ae, be, ce, de, ee, fe, ge, he, ie, je, ke, le, me, ne, oe, pe, \ + af, bf, cf, df, ef, ff, gf, hf, if, jf, kf, lf, mf, nf, of) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + p0 ## p1 ## p2 ## p3 ## p4 ## p5 ## p6 ## p7 ## \ + p8 ## p9 ## pa ## pb ## pc ## pd ## pe ## of + diff --git a/libraries/mcpp/cpp-test/test-l/l_37_2.c b/libraries/mcpp/cpp-test/test-l/l_37_2.c new file mode 100644 index 000000000..a1acf3883 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_2.c @@ -0,0 +1,33 @@ +/* l_37_2.c: Translation limits larger than C99 / 2. */ + +/* 37.2L: Number of arguments in macro call. */ +#include "l_37_1.h" + +/* A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6P7P8P9PAPBPCPDPEOF; */ + glue255( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3, P3, + A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, L4, M4, N4, O4, P4, + A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, L5, M5, N5, O5, P5, + A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, L6, M6, N6, O6, P6, + A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, L7, M7, N7, O7, P7, + A8, B8, C8, D8, E8, F8, G8, H8, I8, J8, K8, L8, M8, N8, O8, P8, + A9, B9, C9, D9, E9, F9, G9, H9, I9, J9, K9, L9, M9, N9, O9, P9, + AA, BA, CA, DA, EA, FA, GA, HA, IA, JA, KA, LA, MA, NA, OA, PA, + AB, BB, CB, DB, EB, FB, GB, HB, IB, JB, KB, LB, MB, NB, OB, PB, + AC, BC, CC, DC, EC, FC, GC, HC, IC, JC, KC, LC, MC, NC, OC, PC, + AD, BD, CD, DD, ED, FD, GD, HD, ID, JD, KD, LD, MD, ND, OD, PD, + AE, BE, CE, DE, EE, FE, GE, HE, IE, JE, KE, LE, ME, NE, OE, PE, + AF, BF, CF, DF, EF, FF, GF, HF, IF, JF, KF, LF, MF, NF, OF); + +/* { dg-do preprocess } + { dg-options "-std=c99 -pedantic" } + { dg-warning "| More than 127 (parameters|arguments)" "translation limit" { target *-*-* } 0 } + { dg-final { if ![file exist l_37_2.i] { return } } } + { dg-final { if \{ [grep l_37_2.i "A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6P7P8P9PAPBPCPDPEOF"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "more than 127 parameters" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-l/l_37_3.c b/libraries/mcpp/cpp-test/test-l/l_37_3.c new file mode 100644 index 000000000..b351631dc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_3.c @@ -0,0 +1,28 @@ +/* l_37_3.c: Translation limits larger than C99 / 3. */ + +/* 37.3L: Significant initial characters in an internal identifier or a + macro name. */ + +/* Name of 127 bytes long. */ + int +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde = 127; +#ifndef X7F +/* Name of 255 bytes long. */ + int +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +D123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde = 255; +#endif + +/* { dg-do preprocess } + { dg-options "-std=c99 -pedantic" } + { dg-warning "| Identifier longer than 63 bytes" "translation limit" { target *-*-* } 9 } + { dg-warning "| Identifier longer than 63 bytes" "translation limit" { target *-*-* } 16 } + { dg-final { if ![file exist l_37_3.i] { return } } } + { dg-final { if \{ [grep l_37_3.i "A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefB123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefC123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefD123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "l_37_3.c: identifier longer than 63 bytes" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-l/l_37_4.c b/libraries/mcpp/cpp-test/test-l/l_37_4.c new file mode 100644 index 000000000..b77332cdc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_4.c @@ -0,0 +1,18 @@ +/* l_37_4.c: Translation limits larger than C99 / 4. */ + +/* 37.4L: Nested conditional inclusion. */ +/* + * Define one of the macros X7F or XFF, or 255 nesting of #ifdef will be + * tested. + */ +#include "ifdef127.h" + +/* { dg-do preprocess } + { dg-options "-std=c99 -pedantic" } + { dg-warning "| More than 63 nesting of #if" "translation limit" { target *-*-* } 0 } + { dg-final { if ![file exist l_37_4_.i] { return } } } + { dg-final { if \{ [grep l_37_4_.i "ifdef_nest = 0xff"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "l_37_4_.c: more than 63 nesting of #if" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-l/l_37_5.c b/libraries/mcpp/cpp-test/test-l/l_37_5.c new file mode 100644 index 000000000..42aee03be --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_5.c @@ -0,0 +1,16 @@ +/* l_37_5.c: Translation limits larger than C99 / 5. */ + +/* 37.5L: Nested source file inclusion. */ +/* Define one of the macros X1F, X3F or it will test 127 levels of + #include */ +#include "nest1.h" + +/* { dg-do preprocess } + { dg-options "-std=c99 -pedantic" } + { dg-warning "| More than 15 nesting of #include" "translation limit" { target *-*-* } 0 } + { dg-final { if ![file exist l_37_5_.i] { return } } } + { dg-final { if \{ [grep l_37_5_.i "nest = 0x7f"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "l_37_5_.c: more than 15 nesting of #include" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-l/l_37_6.c b/libraries/mcpp/cpp-test/test-l/l_37_6.c new file mode 100644 index 000000000..e01fcc0db --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_6.c @@ -0,0 +1,84 @@ +/* l_37_6.c: Translation limits larger than C99 / 6. */ + +/* 37.6L: Parenthesized expression. */ +#ifndef X3F +/* nest = 127; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - (0x3E + (0x3F - \ + (0x40 + (0x41 - (0x42 + (0x43 - (0x44 + (0x45 - (0x46 + (0x47 - \ + (0x48 + (0x49 - (0x4A + (0x4B - (0x4C + (0x4D - (0x4E + (0x4F - \ + (0x50 + (0x51 - (0x52 + (0x53 - (0x54 + (0x55 - (0x56 + (0x57 - \ + (0x58 + (0x59 - (0x5A + (0x5B - (0x5C + (0x5D - (0x5E + (0x5F - \ + (0x60 + (0x61 - (0x62 + (0x63 - (0x64 + (0x65 - (0x66 + (0x67 - \ + (0x68 + (0x69 - (0x6A + (0x6B - (0x6C + (0x6D - (0x6E + (0x6F - \ + (0x70 + (0x71 - (0x72 + (0x73 - (0x74 + (0x75 - (0x76 + (0x77 - \ + (0x78 + (0x79 - (0x7A + (0x7B - (0x7C + (0x7D - (0x7E + 0x7F) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -0x80 + nest = 127; +#endif + +#ifndef X7F +/* nest = 255; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - (0x3E + (0x3F - \ + (0x40 + (0x41 - (0x42 + (0x43 - (0x44 + (0x45 - (0x46 + (0x47 - \ + (0x48 + (0x49 - (0x4A + (0x4B - (0x4C + (0x4D - (0x4E + (0x4F - \ + (0x50 + (0x51 - (0x52 + (0x53 - (0x54 + (0x55 - (0x56 + (0x57 - \ + (0x58 + (0x59 - (0x5A + (0x5B - (0x5C + (0x5D - (0x5E + (0x5F - \ + (0x60 + (0x61 - (0x62 + (0x63 - (0x64 + (0x65 - (0x66 + (0x67 - \ + (0x68 + (0x69 - (0x6A + (0x6B - (0x6C + (0x6D - (0x6E + (0x6F - \ + (0x70 + (0x71 - (0x72 + (0x73 - (0x74 + (0x75 - (0x76 + (0x77 - \ + (0x78 + (0x79 - (0x7A + (0x7B - (0x7C + (0x7D - (0x7E + (0x7F - \ + (0x80 + (0x81 - (0x82 + (0x83 - (0x84 + (0x85 - (0x86 + (0x87 - \ + (0x88 + (0x89 - (0x8A + (0x8B - (0x8C + (0x8D - (0x8E + (0x8F - \ + (0x90 + (0x91 - (0x92 + (0x93 - (0x94 + (0x95 - (0x96 + (0x97 - \ + (0x98 + (0x99 - (0x9A + (0x9B - (0x9C + (0x9D - (0x9E + (0x9F - \ + (0xA0 + (0xA1 - (0xA2 + (0xA3 - (0xA4 + (0xA5 - (0xA6 + (0xA7 - \ + (0xA8 + (0xA9 - (0xAA + (0xAB - (0xAC + (0xAD - (0xAE + (0xAF - \ + (0xB0 + (0xB1 - (0xB2 + (0xB3 - (0xB4 + (0xB5 - (0xB6 + (0xB7 - \ + (0xB8 + (0xB9 - (0xBA + (0xBB - (0xBC + (0xBD - (0xBE + (0xBF - \ + (0xC0 + (0xC1 - (0xC2 + (0xC3 - (0xC4 + (0xC5 - (0xC6 + (0xC7 - \ + (0xC8 + (0xC9 - (0xCA + (0xCB - (0xCC + (0xCD - (0xCE + (0xCF - \ + (0xD0 + (0xD1 - (0xD2 + (0xD3 - (0xD4 + (0xD5 - (0xD6 + (0xD7 - \ + (0xD8 + (0xD9 - (0xDA + (0xDB - (0xDC + (0xDD - (0xDE + (0xDF - \ + (0xE0 + (0xE1 - (0xE2 + (0xE3 - (0xE4 + (0xE5 - (0xE6 + (0xE7 - \ + (0xE8 + (0xE9 - (0xEA + (0xEB - (0xEC + (0xED - (0xEE + (0xEF - \ + (0xF0 + (0xF1 - (0xF2 + (0xF3 - (0xF4 + (0xF5 - (0xF6 + (0xF7 - \ + (0xF8 + (0xF9 - (0xFA + (0xFB - (0xFC + (0xFD - (0xFE + 0xFF) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -0x100 + nest = 255; +#endif +#endif +#endif + +/* { dg-do preprocess } + { dg-options "-std=c99 -pedantic" } + { dg-warning "| More than 63 nesting of parens" "translation limit" { target *-*-* } 25 } + { dg-warning "| More than 63 nesting of parens" "translation limit" { target *-*-* } 68 } + { dg-final { if ![file exist l_37_6_.i] { return } } } + { dg-final { if \{ [grep l_37_6_.i "nest = 127"] != "" \} \{ } } + { dg-final { if \{ [grep l_37_6_.i "nest = 255"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "l_37_6_.c: more than 63 nesting of parens" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-l/l_37_7.c b/libraries/mcpp/cpp-test/test-l/l_37_7.c new file mode 100644 index 000000000..65fbcb806 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_7.c @@ -0,0 +1,144 @@ +/* l_37_7.c: Translation limits larger than C99 / 7. */ + +/* 37.7L: Characters in a string (after concatenation). */ +/* 8191 bytes long. */ + char *string8189 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +D123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +E123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +F123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +G123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" +; + +/* { dg-do preprocess } + { dg-options "-std=c99 -pedantic" } + { dg-warning "| Quotation longer than 4095 bytes" "translation limit" { target *-*-* } 133 } + { dg-final { if ![file exist l_37_7_.i] { return } } } + { dg-final { if \{ [grep l_37_7_.i "abcd\""] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "l_37_7_.c: quotation longer than 4095 bytes" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-l/l_37_8.c b/libraries/mcpp/cpp-test/test-l/l_37_8.c new file mode 100644 index 000000000..57b49e879 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_8.c @@ -0,0 +1,18 @@ +/* l_37_8.c: Translation limits larger than C99 / 8. */ + +/* 37.8L: Length of logical source line. */ +/* Define one of the macros X03FF, X07FF, X0FFF, X1FFF or it will test + the line of 0x3fff bytes long. */ +#include "longline.t" + +/* { dg-do preprocess } + { dg-options "-std=c99 -pedantic" } + { dg-warning "| Logical source line longer than 4095 bytes" "translation limit" { target *-*-* } 673 } + { dg-warning "| Logical source line longer than 4095 bytes" "translation limit" { target *-*-* } 1532 } + { dg-final { if ![file exist l_37_8_.i] { return } } } + { dg-final { if \{ [grep l_37_8_.i "pushback"] != "" \} \{ } } + { dg-final { if \{ [grep l_37_8_.i "s_name"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "l_37_8_.c: logical source line longer than 4095 bytes" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-l/l_37_9.c b/libraries/mcpp/cpp-test/test-l/l_37_9.c new file mode 100644 index 000000000..e264d3245 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/l_37_9.c @@ -0,0 +1,23 @@ +/* l_37_9.c: Translation limits larger than C99 / 9. */ + +/* 37.9L: Number of macro definitions. */ + +#include "m8191.h" + +#ifdef X0FFF +/* 0x0fff; */ + GBM; +#else +/* 0x1fff; */ + MDA; +#endif + +/* { dg-do preprocess } + { dg-options "-std=c99 -pedantic" } + { dg-warning "| More than 4095 macros defined" "translation limit" { target *-*-* } 0 } + { dg-final { if ![file exist l_37_9_.i] { return } } } + { dg-final { if \{ [grep l_37_9_.i "0x1fff"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "l_37_9_.c: defining more than 4095 macros" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-l/longline.t b/libraries/mcpp/cpp-test/test-l/longline.t new file mode 100644 index 000000000..5e92926be --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/longline.t @@ -0,0 +1,1537 @@ +/* longline.t: source of long logical line. */ + +typedef unsigned int size_t; \ +typedef struct __sfpos { \ +char _pos[8]; \ +} fpos_t; \ +struct __sbuf { \ +unsigned char *_base; \ +int _size; \ +}; \ +typedef struct __sFILE { \ +unsigned char *_p; \ +int _r; \ +int _w; \ +short _flags; \ +short _file; \ +struct __sbuf _bf; \ +int _lbfsize; \ + \ + \ +void *_cookie; \ +int (*_close) (void *) ; \ +int (*_read) (void *, char *, int) ; \ +fpos_t (*_seek) (void *, fpos_t, int) ; \ +int (*_write) (void *, const char *, int) ; \ + \ + \ +struct __sbuf _ub; \ +unsigned char *_up; \ +int _ur; \ + \ + \ +unsigned char _ubuf[3]; \ +unsigned char _nbuf[1]; \ + \ + \ +struct __sbuf _lb; \ + \ + \ +int _blksize; \ +fpos_t _offset; \ +} FILE; \ + \ + \ +extern FILE __sF[]; \ + \ + \ +void clearerr (FILE *) ; \ +int fclose (FILE *) ; \ +int feof (FILE *) ; \ +int ferror (FILE *) ; \ +int fflush (FILE *) ; \ +int fgetc (FILE *) ; \ +int fgetpos (FILE *, fpos_t *) ; \ +char *fgets (char *, size_t, FILE *) ; \ +FILE *fopen (const char *, const char *) ; \ +int fprintf (FILE *, const char *, ...) ; \ +int fputc (int, FILE *) ; \ +int fputs (const char *, FILE *) ; \ + \ + +#ifndef X03FF + +size_t fread (void *, size_t, size_t, FILE *) ; \ +FILE *freopen (const char *, const char *, FILE *) ; \ +int fscanf (FILE *, const char *, ...) ; \ +int fseek (FILE *, long, int) ; \ +int fsetpos (FILE *, const fpos_t *) ; \ +long ftell (const FILE *) ; \ +size_t fwrite (const void *, size_t, size_t, FILE *) ; \ +int getc (FILE *) ; \ +int getchar (void) ; \ +char *gets (char *) ; \ + \ +extern int sys_nerr; \ +extern const char * const sys_errlist[]; \ + \ +void perror (const char *) ; \ +int printf (const char *, ...) ; \ +int putc (int, FILE *) ; \ +int putchar (int) ; \ +int puts (const char *) ; \ +int remove (const char *) ; \ +int rename (const char *, const char *) ; \ +void rewind (FILE *) ; \ +int scanf (const char *, ...) ; \ +void setbuf (FILE *, char *) ; \ +int setvbuf (FILE *, char *, int, size_t) ; \ +int sprintf (char *, const char *, ...) ; \ +int sscanf (const char *, const char *, ...) ; \ +FILE *tmpfile (void) ; \ +char *tmpnam (char *) ; \ +int ungetc (int, FILE *) ; \ +int vfprintf (FILE *, const char *, char * ) ; \ +int vprintf (const char *, char * ) ; \ +int vsprintf (char *, const char *, char * ) ; \ + \ + \ +char *ctermid (char *) ; \ +FILE *fdopen (int, const char *) ; \ +int fileno (FILE *) ; \ + \ + \ +char *fgetln (FILE *, size_t *) ; \ +int fpurge (FILE *) ; \ +int getw (FILE *) ; \ +int pclose (FILE *) ; \ +FILE *popen (const char *, const char *) ; \ +int putw (int, FILE *) ; \ +void setbuffer (FILE *, char *, int) ; \ +int setlinebuf (FILE *) ; \ +char *tempnam (const char *, const char *) ; \ +int snprintf (char *, size_t, const char *, ...) ; \ +int vsnprintf (char *, size_t, const char *, char * ) ; \ +int vscanf (const char *, char * ) ; \ +int vsscanf (const char *, const char *, char * ) ; \ +FILE *zopen (const char *, const char *, int) ; \ + \ + \ +FILE *funopen (const void *, int (*)(void *, char *, int), int (*)(void *, const char *, int), fpos_t (*)(void *, fpos_t, int), int (*)(void *)) ; \ + \ + \ +int __srget (FILE *) ; \ +int __svfscanf (FILE *, const char *, char * ) ; \ +int __swbuf (int, FILE *) ; \ + \ +typedef int rune_t; \ + \ + +#ifndef X07FF + +typedef int wchar_t; \ +typedef struct { \ +rune_t min; \ +rune_t max; \ +rune_t map; \ +unsigned long *types; \ +} _RuneEntry; \ + \ +typedef struct { \ +int nranges; \ +_RuneEntry *ranges; \ +} _RuneRange; \ + \ +typedef struct { \ +char magic[8]; \ +char encoding[32]; \ + \ +rune_t (*sgetrune) \ + (const char *, unsigned int, char const **) ; \ +int (*sputrune) \ + (rune_t, char *, unsigned int, char **) ; \ +rune_t invalid_rune; \ + \ +unsigned long runetype[ (1 <<8 ) ]; \ +rune_t maplower[ (1 <<8 ) ]; \ +rune_t mapupper[ (1 <<8 ) ]; \ +_RuneRange runetype_ext; \ +_RuneRange maplower_ext; \ +_RuneRange mapupper_ext; \ + \ +void *variable; \ +int variable_len; \ +} _RuneLocale; \ + \ + \ + \ +extern _RuneLocale _DefaultRuneLocale; \ +extern _RuneLocale *_CurrentRuneLocale; \ + \ +unsigned long ___runetype ( int ) ; \ + int ___tolower ( int ) ; \ + int ___toupper ( int ) ; \ + \ + \ +int __istype ( int , unsigned long) ; \ +int __isctype ( int , unsigned long) ; \ + int toupper ( int ) ; \ + int tolower ( int ) ; \ + \ +extern int errno; \ + \ +void *memchr (const void *, int, size_t) ; \ +int memcmp (const void *, const void *, size_t) ; \ +void *memcpy (void *, const void *, size_t) ; \ +void *memmove (void *, const void *, size_t) ; \ +void *memset (void *, int, size_t) ; \ +char *strcat (char *, const char *) ; \ +char *strchr (const char *, int) ; \ +int strcmp (const char *, const char *) ; \ +int strcoll (const char *, const char *) ; \ +char *strcpy (char *, const char *) ; \ +size_t strcspn (const char *, const char *) ; \ +char *strerror (int) ; \ +size_t strlen (const char *) ; \ +char *strncat (char *, const char *, size_t) ; \ +int strncmp (const char *, const char *, size_t) ; \ +char *strncpy (char *, const char *, size_t) ; \ +char *strpbrk (const char *, const char *) ; \ +char *strrchr (const char *, int) ; \ +size_t strspn (const char *, const char *) ; \ +char *strstr (const char *, const char *) ; \ +char *strtok (char *, const char *) ; \ +size_t strxfrm (char *, const char *, size_t) ; \ + \ + \ + \ +int bcmp (const void *, const void *, size_t) ; \ +void bcopy (const void *, void *, size_t) ; \ +void bzero (void *, size_t) ; \ +int ffs (int) ; \ +char *index (const char *, int) ; \ +void *memccpy (void *, const void *, int, size_t) ; \ +char *rindex (const char *, int) ; \ +int strcasecmp (const char *, const char *) ; \ +char *strdup (const char *) ; \ +void strmode (int, char *) ; \ +int strncasecmp (const char *, const char *, size_t) ; \ +char *strsep (char **, const char *) ; \ +void swab (const void *, void *, size_t) ; \ + \ + \ +typedef struct { \ +int quot; \ +int rem; \ +} div_t; \ + \ +typedef struct { \ +long quot; \ +long rem; \ +} ldiv_t; \ +extern int __mb_cur_max; \ + \ + \ + void \ +abort (void) ; \ + int \ +abs (int) ; \ +int atexit (void (*)(void)) ; \ +double atof (const char *) ; \ +int atoi (const char *) ; \ +long atol (const char *) ; \ +void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +void *calloc (size_t, size_t) ; \ + div_t \ +div (int, int) ; \ + void \ +exit (int) ; \ +void free (void *) ; \ +char *getenv (const char *) ; \ + long \ +labs (long) ; \ + ldiv_t \ +ldiv (long, long) ; \ +void *malloc (size_t) ; \ +void qsort (void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +int rand (void) ; \ +void *realloc (void *, size_t) ; \ +void srand (unsigned) ; \ +double strtod (const char *, char **) ; \ +long strtol (const char *, char **, int) ; \ +unsigned long \ +strtoul (const char *, char **, int) ; \ +int system (const char *) ; \ + \ + \ +int mblen (const char *, size_t) ; \ +size_t mbstowcs (wchar_t *, const char *, size_t) ; \ +int wctomb (char *, wchar_t) ; \ +int mbtowc (wchar_t *, const char *, size_t) ; \ +size_t wcstombs (char *, const wchar_t *, size_t) ; \ + \ + \ +int putenv (const char *) ; \ +int setenv (const char *, const char *, int) ; \ + \ + \ + \ +double drand48 (void) ; \ +double erand48 (unsigned short[3]) ; \ +long lrand48 (void) ; \ +long nrand48 (unsigned short[3]) ; \ +long mrand48 (void) ; \ +long jrand48 (unsigned short[3]) ; \ +void srand48 (long) ; \ +unsigned short *seed48 (unsigned short[3]) ; \ +void lcong48 (unsigned short[7]) ; \ + \ +void *alloca (size_t) ; \ + \ +char *getbsize (int *, long *) ; \ +char *cgetcap (char *, char *, int) ; \ +int cgetclose (void) ; \ + \ + +#ifndef X0FFF + +int cgetent (char **, char **, char *) ; \ +int cgetfirst (char **, char **) ; \ +int cgetmatch (char *, char *) ; \ +int cgetnext (char **, char **) ; \ +int cgetnum (char *, char *, long *) ; \ +int cgetset (char *) ; \ +int cgetstr (char *, char *, char **) ; \ +int cgetustr (char *, char *, char **) ; \ + \ +int daemon (int, int) ; \ +char *devname (int, int) ; \ +int getloadavg (double [], int) ; \ + \ +extern char *optarg; \ +extern int opterr, optind, optopt; \ +int getopt (int, char * const *, const char *) ; \ + \ +extern char *suboptarg; \ +int getsubopt (char **, char * const *, char **) ; \ + \ +char *group_from_gid (unsigned long, int) ; \ +int heapsort (void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +char *initstate (unsigned, char *, int) ; \ +int mergesort (void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +int radixsort (const unsigned char **, int, const unsigned char *, unsigned) ; \ +int sradixsort (const unsigned char **, int, const unsigned char *, unsigned) ; \ +long random (void) ; \ +char *realpath (const char *, char resolved_path[]) ; \ +char *setstate (char *) ; \ +void srandom (unsigned) ; \ +char *user_from_uid (unsigned long, int) ; \ +void unsetenv (const char *) ; \ + \ + \ +typedef int ptrdiff_t; \ +typedef unsigned long clock_t; \ + \ + \ + \ + \ +typedef long time_t; \ +struct tm { \ +int tm_sec; \ +int tm_min; \ +int tm_hour; \ +int tm_mday; \ +int tm_mon; \ +int tm_year; \ +int tm_wday; \ +int tm_yday; \ +int tm_isdst; \ +long tm_gmtoff; \ +char *tm_zone; \ +}; \ + \ +char *asctime (const struct tm *) ; \ +clock_t clock (void) ; \ +char *ctime (const time_t *) ; \ +double difftime (time_t, time_t) ; \ +struct tm *gmtime (const time_t *) ; \ +struct tm *localtime (const time_t *) ; \ +time_t mktime (struct tm *) ; \ +size_t strftime (char *, size_t, const char *, const struct tm *) ; \ +time_t time (time_t *) ; \ + \ + \ +void tzset (void) ; \ + \ + \ + \ +char *timezone (int, int) ; \ +void tzsetwall (void) ; \ + \ + \ +extern int getopt( int argc, char * const * argv, const char * opts); \ +extern char * stpcpy( char * dest, const char * src); \ +typedef struct defbuf { \ +struct defbuf * link; \ +short nargs; \ + \ +char * parmnames; \ + \ +char * repl; \ +char name[1]; \ +} DEFBUF; \ +typedef struct fileinfo { \ +char * bptr; \ +unsigned line; \ +FILE * fp; \ +long pos; \ +struct fileinfo * parent; \ +struct ifinfo * initif; \ +char * filename; \ +char * buffer; \ +} FILEINFO; \ +typedef struct ifinfo { \ +int stat; \ +unsigned ifline; \ +unsigned elseline; \ +} IFINFO; \ +typedef struct val_sign { \ +long val; \ +int sign; \ +} VAL_SIGN; \ +extern int cflag; \ +extern int eflag; \ +extern int iflag; \ +extern int lflag; \ +extern int pflag; \ +extern int qflag; \ + \ +extern int tflag; \ + \ + \ + \ +extern int digraphs; \ + \ +extern int stdc_val; \ +extern long cplus; \ +extern int stdc2; \ +extern int has_pragma; \ + \ +extern int std_line_prefix; \ +extern int warn_level; \ +extern int errors; \ +extern unsigned line; \ +extern int wrongline; \ +extern int keepcomments; \ +extern int no_output; \ +extern int in_directive; \ +extern int in_define; \ +extern unsigned macro_line; \ +extern int openum; \ +extern IFINFO * ifptr; \ +extern FILEINFO * infile; \ +extern int mkdep; \ + \ +extern char * workp; \ +extern char * const work_end; \ +extern char identifier[ 0xFF + 1]; \ +extern const char type[]; \ +extern IFINFO ifstack[]; \ +extern char work[]; \ +extern int debug; \ +extern void curfile( void); \ +extern int openfile( const char * filename, int local); \ +extern void unpredefine( int clearall); \ + \ +extern int control( int newlines); \ +extern DEFBUF * lookid( const char * name); \ +extern DEFBUF * install( const char * name, int nargs, const char * parmnames \ +, const char * repl); \ +extern int undefine( const char * name); \ +extern void dumpadef( const char * why, const DEFBUF * dp, int newdef); \ +extern void dumpdef( void); \ + \ +extern long eval( void); \ +extern VAL_SIGN * evalnum( const char * nump); \ + \ +extern DEFBUF * is_macro( char ** cp); \ +extern char * expand( DEFBUF * defp, char * out, char * out_end); \ + \ +extern int get_unexpandable( int c, int diag); \ +extern void skipnl( void); \ +extern int skipws( void); \ +extern int scantoken( int c, char ** out_pp, char * out_end); \ +extern char * scanquote( int delim, char * out, char * out_end, int diag); \ +extern int get( void); \ + \ +extern int trigraph( char * in); \ +extern void unget( void); \ +extern FILEINFO * ungetstring( const char * text, const char * name); \ +extern char * savestring( const char * text); \ +extern FILEINFO * getfile( const char * name, size_t bufsize); \ +extern char * (xmalloc)( size_t size); \ +extern char * (xrealloc)( char * ptr, size_t size); \ +extern void cfatal( const char * format, const char * arg1, int arg2 \ +, const char * arg3); \ +extern void cerror( const char * format, const char * arg1, int arg2 \ +, const char * arg3); \ +extern void cwarn( const char * format, const char * arg1, int arg2 \ +, const char * arg3); \ + \ +extern void dooptions( int argc, char ** argv, char ** in_pp \ +, char ** out_pp); \ +extern int reopen_stdout( const char * filename); \ +extern void setstdin( char * cp); \ +extern void put_start_file( char * filename); \ +extern void sharp( void); \ +extern void putfname( char * filename); \ +extern int getredirection( int argc, char ** argv); \ + \ +extern void put_depend( const char * filename); \ + \ +extern int doinclude( void); \ + \ +extern void dopragma( void); \ +extern void put_source( const char * src); \ +extern void alloc_mem( void); \ + \ + \ + \ +extern void dumpstring( const char * why, const char * text); \ +extern void dumpunget( const char * why); \ + \ +extern void print_heap( void); \ +static void scanid( int c); \ +static char * scannumber( int c, char * out, char * out_end); \ +static char * scanop( int c, char * out); \ +static char * parse_line( void); \ +static char * read_a_comment( char * sp); \ +static char * getline( int in_comment); \ +static void at_eof( int in_comment); \ +void dumptoken( int token_type, const char * cp); \ +int \ + \ +get_unexpandable( int c, int diag) \ +{ \ +DEFBUF * defp; \ +FILEINFO * file; \ +FILE * fp = 0 ; \ +int token_type = 0 ; \ + \ +while (c != '\0' && c != '\n' \ +&& (fp = infile->fp, \ +(token_type = scantoken( c, (workp = work, &workp), work_end)) == 65 ) \ +&& fp != 0 \ +&& (defp = is_macro( (char **) 0 )) != 0 ) { \ +expand( defp, work, work_end); \ +file = ungetstring( work, defp->name); \ +c = skipws(); \ +if (file != infile && macro_line != 65535U && (warn_level & 1)) \ +cwarn( "Macro \"%s\" is expanded to 0 token" \ +, defp->name, 0, ((char *) 0 ) ); \ +} \ + \ +if (c == '\n' || c == '\0' ) { \ +unget(); \ +return 0 ; \ +} \ + \ +if (diag && fp == 0 && token_type == 65 ) { \ + \ +if ( (strcmp(identifier, "defined") == 0) && (warn_level & 1)) \ +cwarn( "Macro \"%s\" is expanded to \"defined\"" \ +, defp->name, 0, ((char *) 0 ) ); \ +} \ +return token_type; \ +} \ + \ +void \ + \ +skipnl( void) \ +{ \ +while (infile && infile->fp == 0 ) { \ +infile->bptr += strlen( infile->bptr); \ +get(); \ +} \ +if (infile) \ +infile->bptr += strlen( infile->bptr); \ +} \ + \ +int \ + \ +skipws( void) \ +{ \ + int c; \ + \ +do { \ +c = get(); \ +} \ + \ +while (c == ' ' || c == 0x1F ); \ +return c; \ +} \ +int \ + \ +scantoken( int c, char ** out_pp, char * out_end) \ +{ \ + char * out = *out_pp; \ +int ch_type; \ +int token_type = 0; \ +int ch; \ + \ + \ +ch_type = type[ c] & (~ ((char)128) & 255 ); \ +switch (ch_type) { \ +case 1 : \ +switch (c) { \ + \ +case 'L': \ +ch = (*infile->bptr++ & 255 ) ; \ +if (type[ ch] & 16 ) { \ +if (ch == '"') \ +token_type = 68 ; \ +else \ +token_type = 70 ; \ +c = ch; \ +*out++ = 'L'; \ +break; \ +} else { \ + (infile->bptr--) ; \ +} \ + \ +default: \ +scanid( c); \ +out = stpcpy( out, identifier); \ +token_type = 65 ; \ +break; \ +} \ +if (token_type == 65 ) \ +break; \ + \ +case 16 : \ +out = scanquote( c, out, out_end, 0 ); \ +if (token_type == 0) { \ +if (c == '"') \ +token_type = 67 ; \ +else \ +token_type = 69 ; \ +} \ +break; \ +case 4 : \ +ch = (*infile->bptr++ & 255 ) ; \ + (infile->bptr--) ; \ +if (type[ ch] != 2 ) \ +goto operat; \ + \ +case 2 : \ +out = scannumber( c, out, out_end); \ +token_type = 66 ; \ +break; \ +case 8 : \ +operat: out = scanop( c, out); \ +token_type = 71 ; \ +break; \ +default: \ +if \ + \ + \ + \ +((type[ c] & 32 ) || c == 0x1E || c == 0x1D ) \ + \ +token_type = 73 ; \ +else \ +token_type = 72 ; \ +*out++ = c; \ +*out = '\0' ; \ +break; \ +} \ + \ +if (out_end < out) \ +cfatal( "Buffer overflow scanning token \"%s\"" \ +, *out_pp, 0, ((char *) 0 ) ); \ + \ +if (debug & 2 ) \ +dumptoken( token_type, *out_pp); \ +*out_pp = out; \ + \ +return token_type; \ +} \ + \ +static void \ + \ +scanid( int c) \ +{ \ +static char * const limit = &identifier[ 0xFF ]; \ +int long_ident = 0 ; \ + char * bp; \ + \ +bp = identifier; \ + \ +do { \ +*bp++ = c; \ + \ + +#ifndef X1FFF + +c = (*infile->bptr++ & 255 ) ; \ +} while ((type[ c] & ( 1 | 2 )) && bp < limit); \ +if (type[ c] & ( 1 | 2 )) { \ +long_ident = 1 ; \ +do { \ +c = (*infile->bptr++ & 255 ) ; \ +} while (type[ c] & ( 1 | 2 )); \ +} \ + (infile->bptr--) ; \ +*bp = '\0' ; \ + \ +if (long_ident && (warn_level & 1)) \ +cwarn( "Too long identifier truncated to \"%s\"" \ +, identifier, 0, ((char *) 0 ) ); \ + \ +if (infile->fp && bp - identifier > 0x1F && (warn_level & 2)) \ +cwarn( "Identifier longer than %.0s%d bytes \"%s\"" \ +, ((char *) 0 ) , 0x1F , identifier); \ +} \ + \ +char * \ + \ +scanquote( int delim, char * out, char * out_end, int diag) \ +{ \ +const char * const skip_line = ", skipped the line"; \ +const char * skip; \ + int c; \ +int c1; \ +char * out_p = out; \ + \ +*out_p++ = delim; \ + \ +if (delim == '<') \ +delim = '>'; \ + \ + \ +while ((c = (*infile->bptr++ & 255 ) ) != '\0' ) { \ + \ + \ +if (type[ c] & 64 ) { \ +c1 = (*infile->bptr++ & 255 ) ; \ +if (type[ c1] & ((char)128) ) { \ +*out_p++ = c; \ +*out_p++ = c1; \ +goto chk_limit; \ +} else { \ + (infile->bptr--) ; \ +*out_p++ = c; \ +if (infile->fp != 0 && ifstack[0].stat && diag) { \ +*out_p = c1; \ +*(out_p + 1) = '\0' ; \ +if (warn_level & 1) \ +cwarn( \ +"Illegal multi-byte character sequence \"%s\" in quotation", \ +out_p - 1, 0, ((char *) 0 ) ); \ +} \ +continue; \ +} \ +} \ + \ +if (c == delim) { \ +break; \ +} else if (c == '\\' \ + \ +&& delim != '>' \ + \ +) { \ +*out_p++ = c; \ +c = (*infile->bptr++ & 255 ) ; \ + \ +if (type[ c] & 64 ) { \ + (infile->bptr--) ; \ +continue; \ +} \ +} else if (c == ' ' && delim == '>' && infile->fp == 0 ) { \ +continue; \ + \ +} else if (c == '\n') { \ +break; \ +} \ +if (diag && __istype((c), 0x00000200L ) && ((type[ c] & 32 ) == 0) && (warn_level & 1)) \ +cwarn( \ +"Illegal control character %.0s0x%02x in quotation" \ +, ((char *) 0 ) , c, ((char *) 0 ) ); \ +*out_p++ = c; \ +chk_limit: \ +if (out_end < out_p) { \ +*out_end = '\0' ; \ +cfatal( "Too long quotation %s", out, 0, ((char *) 0 ) ); \ +} \ +} \ + \ +if (c == '\n' || c == '\0' ) \ + (infile->bptr--) ; \ +if (c == delim) \ +*out_p++ = delim; \ +*out_p = '\0' ; \ +if (diag) { \ +skip = (infile->fp == 0 ) ? ((char *) 0 ) : skip_line; \ +if (c != delim) { \ +if (delim == '"') \ +cerror( "Unterminated string literal %s%.0d%s" \ +, out, 0, skip); \ +else if (delim == '\'') \ +cerror( "Unterminated character constant %s%.0d%s" \ +, out, 0, skip); \ + \ +else \ +cerror( "Unterminated header name %s%.0d%s" \ +, out, 0, skip); \ + \ +out_p = 0 ; \ +} else if (delim == '\'' && out_p - out <= 2) { \ +cerror( "Empty character constant %s%.0d%s" \ +, out, 0, skip); \ +out_p = 0 ; \ +} \ +if (out_p - out > 0x1FD && (warn_level & 2)) \ +cwarn( "Quotation longer than %.0s%d bytes %s" \ +, ((char *) 0 ) , 0x1FD , out); \ + \ +} \ + \ +return out_p; \ +} \ +static char * \ + \ +scannumber( int c, char * out, char * out_end) \ +{ \ +char * out_p = out; \ + \ +do { \ +*out_p++ = c; \ +if (c == 'E' || c == 'e') { \ +c = (*infile->bptr++ & 255 ) ; \ +if (c == '+' || c == '-') { \ +*out_p++ = c; \ +c = (*infile->bptr++ & 255 ) ; \ +} \ +} else { \ +c = (*infile->bptr++ & 255 ) ; \ +} \ +} while (type[ c] & ( 2 | 4 | 1 )); \ + \ +*out_p = '\0' ; \ +if (out_end < out_p) \ +cfatal( "Too long pp-number token \"%s\"" \ +, out, 0, ((char *) 0 ) ); \ + (infile->bptr--) ; \ +return out_p; \ +} \ +static char * \ + \ +scanop( int c, char * out) \ +{ \ +int c2, c3; \ + \ +int c4; \ + \ + \ +*out++ = c; \ + \ +switch (c) { \ +case '~': openum = 5 ; break; \ +case '(': openum = 2 ; break; \ +case ')': openum = 27 ; break; \ +case '?': openum = 25 ; break; \ +case ';': case '[': case ']': case '{': \ +case '}': case ',': \ +openum = 32 ; \ +break; \ +default: \ +openum = 33 ; \ +} \ + \ +if (openum != 33 ) { \ +*out = '\0' ; \ +return out; \ +} \ + \ +c2 = (*infile->bptr++ & 255 ) ; \ +*out++ = c2; \ + \ +switch (c) { \ +case '=': \ +openum = ((c2 == '=') ? 18 : 32 ); \ +break; \ +case '!': \ +openum = ((c2 == '=') ? 19 : 6 ); \ +break; \ +case '&': \ +switch (c2) { \ +case '&': openum = 23 ; break; \ +case '=': break; \ +default : openum = 20 ; break; \ +} \ +break; \ +case '|': \ +switch (c2) { \ +case '|': openum = 24 ; break; \ +case '=': break; \ +default : openum = 22 ; break; \ +} \ +break; \ +case '<': \ +switch (c2) { \ +case '<': c3 = (*infile->bptr++ & 255 ) ; \ +if (c3 == '=') { \ +openum = 34 ; \ +*out++ = c3; \ +} else { \ +openum = 12 ; \ + (infile->bptr--) ; \ +} \ +break; \ +case '=': openum = 15 ; break; \ + \ +case ':': \ +if (digraphs) \ +openum = 0x42 ; \ +else \ +openum = 14 ; \ +break; \ +case '%': \ +if (digraphs) \ +openum = 0x40 ; \ +else \ +openum = 14 ; \ +break; \ + \ +default : openum = 14 ; break; \ +} \ +break; \ +case '>': \ +switch (c2) { \ +case '>': c3 = (*infile->bptr++ & 255 ) ; \ +if (c3 == '=') { \ +openum = 34 ; \ +*out++ = c3; \ +} else { \ +openum = 13 ; \ + (infile->bptr--) ; \ +} \ +break; \ +case '=': openum = 17 ; break; \ +default : openum = 16 ; break; \ +} \ +break; \ +case '#': \ + \ +if (in_define) \ +openum = ((c2 == '#') ? 31 : 30 ); \ +else \ + \ +openum = 32 ; \ +break; \ +case '+': \ +switch (c2) { \ +case '+': \ +case '=': break; \ +default : openum = 10 ; break; \ +} \ +break; \ +case '-': \ +switch (c2) { \ +case '-': \ +case '=': \ + \ +break; \ +case '>': \ + \ +if (cplus) { \ +if ((c3 = (*infile->bptr++ & 255 ) ) == '*') { \ +openum = 34 ; \ +*out++ = c3; \ +} else { \ + \ + (infile->bptr--) ; \ +} \ +} \ +break; \ +default : openum = 11 ; break; \ +} \ +break; \ +case '%': \ +switch (c2) { \ +case '=': break; \ + \ +case '>': \ +if (digraphs) \ +openum = 0x41 ; \ +else \ +openum = 9 ; \ +break; \ +case ':': \ +if (! digraphs || ! in_define) { \ +openum = 9 ; \ +} else if ((c3 = (*infile->bptr++ & 255 ) ) == '%') { \ +if ((c4 = (*infile->bptr++ & 255 ) ) == ':') { \ +openum = 31 ; \ +*out++ = c3; \ +*out++ = c4; \ +} else { \ + (infile->bptr--) ; \ + (infile->bptr--) ; \ +openum = 30 ; \ +} \ +} else { \ + (infile->bptr--) ; \ +openum = 30 ; \ +} \ +break; \ + \ +default : openum = 9 ; break; \ +} \ +break; \ +case '*': \ +if (c2 != '=') \ +openum = 7 ; \ + \ +break; \ +case '/': \ +if (c2 != '=') \ +openum = 8 ; \ + \ +break; \ +case '^': \ +if (c2 != '=') \ +openum = 21 ; \ + \ +break; \ +case '.': \ + \ +if (c2 == '.') { \ +c3 = (*infile->bptr++ & 255 ) ; \ +if (c3 == '.') { \ +openum = 34 ; \ +*out++ = c3; \ +break; \ +} else { \ + (infile->bptr--) ; \ +openum = 32 ; \ +} \ +} \ + \ +else if (cplus && c2 == '*') \ +; \ + \ +else \ +openum = 32 ; \ +break; \ +case ':': \ + \ +if (stdc2 && c2 == ':') \ +; \ + \ +else if (c2 == '>' && digraphs) \ +openum = 0x43 ; \ + \ +else \ +openum = 26 ; \ +break; \ +default: \ + \ +cfatal( "Bug: Punctuator is mis-implemented %.0s0x%x" \ +, ((char *) 0 ) , c, ((char *) 0 ) ); \ + \ +openum = 32 ; \ +break; \ +} \ + \ +switch (openum) { \ + \ +case 30 : \ + \ +if (c == '%') break; \ + \ + \ +case 32 : \ +case 6 : case 20 : case 22 : case 14 : \ +case 16 : case 10 : case 11 : case 9 : \ +case 7 : case 8 : case 21 : case 5 : \ +case 26 : \ + \ + (infile->bptr--) ; \ +out--; \ +break; \ +default: \ +break; \ +} \ + \ +*out = '\0' ; \ +return out; \ +} \ +int \ + \ +get( void) \ +{ \ +int len; \ + int c; \ + FILEINFO * file; \ + \ +if ((file = infile) == 0 ) \ +return 0 ; \ +if (debug & 32 ) { \ +printf( "get(%s), line %u, bptr = %d, buffer" \ +, file->filename ? file->filename : "NULL" \ +, line, (int) (file->bptr - file->buffer)); \ +dumpstring( ((char *) 0 ) , file->buffer); \ +dumpunget( "get entrance"); \ +} \ +if ((c = (*file->bptr++ & 255 )) != '\0' ) { \ + \ +return c; \ +} \ +if (file->fp && \ +parse_line() != 0 ) \ +return get(); \ +infile = file->parent; \ +if (infile == 0 ) \ +return 0 ; \ +free(( char *)file->buffer); \ +if (file->filename) \ +free( file->filename); \ +if (file->fp) { \ +fclose( file->fp); \ +if (! (strcmp("stdin", infile->filename) == 0) ) { \ +infile->fp = fopen( infile->filename, "r"); \ +fseek( infile->fp, infile->pos, 0 ); \ +} \ +len = (int) (infile->bptr - infile->buffer); \ +infile->buffer = xrealloc( infile->buffer, 0x4000 ); \ + \ +infile->bptr = infile->buffer + len; \ +line = infile->line; \ +wrongline = 1 ; \ +} \ +free(( char *)file); \ +return get(); \ +} \ + \ +static char * \ + \ +parse_line( void) \ +{ \ +char * temp; \ +char * limit; \ +char * tp; \ +char * sp; \ + int c; \ + \ +if ((sp = getline( 0 )) == 0 ) \ +return 0 ; \ +tp = temp = xmalloc( (size_t) 0x4000 ); \ +limit = temp + 0x4000 - 2; \ + \ +while ((c = *sp++ & 255 ) != '\n') { \ + \ +switch (c) { \ +case '/': \ +switch (*sp++) { \ +case '*': \ +if ((sp = read_a_comment( sp)) == 0 ) { \ +free( temp); \ +return 0 ; \ +} \ + \ + \ + \ + \ + \ +if (temp < tp && *(tp - 1) != ' ') \ +*tp++ = ' '; \ +break; \ + \ +case '/': \ +if (stdc2) { \ + \ +if (keepcomments) { \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('/')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('/'), (&__sF[1])) : (*((&__sF[1]))->_p = ('/'), (int)*((&__sF[1]))->_p++)) ; \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('*')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('*'), (&__sF[1])) : (*((&__sF[1]))->_p = ('*'), (int)*((&__sF[1]))->_p++)) ; \ +while ((c = *sp++) != '\n') \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = (c)), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)(c), (&__sF[1])) : (*((&__sF[1]))->_p = (c), (int)*((&__sF[1]))->_p++)) ; \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('*')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('*'), (&__sF[1])) : (*((&__sF[1]))->_p = ('*'), (int)*((&__sF[1]))->_p++)) ; \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('/')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('/'), (&__sF[1])) : (*((&__sF[1]))->_p = ('/'), (int)*((&__sF[1]))->_p++)) ; \ +} \ +goto end_line; \ +} \ + \ +default: \ +*tp++ = '/'; \ +sp--; \ +break; \ +} \ +break; \ +case '\r': \ +case '\f': \ + \ + \ + \ +case '\v': \ + \ +if (warn_level & 1) \ +cwarn( "Converted %.0s0x%02x to a space" \ +, ((char *) 0 ) , c, ((char *) 0 ) ); \ +case '\t': \ +case ' ': \ + \ +if (temp < tp && *(tp - 1) != ' ') \ +*tp++ = ' '; \ +break; \ +case '"': \ +case '\'': \ +infile->bptr = sp; \ + \ +tp = scanquote( c, tp, limit, 1 ); \ +if (tp == 0 ) { \ +free( temp); \ +return parse_line(); \ +} \ +sp = infile->bptr; \ +break; \ +default: \ +if ( __istype((c), 0x00000200L ) ) { \ +cerror( \ +"Illegal control character %.0s0x%x, skipped the character" \ +, ((char *) 0 ) , c, ((char *) 0 ) ); \ +} else { \ +*tp++ = c; \ +} \ +break; \ +} \ + \ +if (limit < tp) { \ +*tp = '\0' ; \ +cfatal( "Too long line spliced by comments :%s" \ +, temp, 0, ((char *) 0 ) ); \ +} \ +} \ + \ + \ +end_line: \ + \ +if (temp < tp && *(tp - 1) == ' ') \ +tp--; \ +*tp++ = '\n'; \ +*tp = '\0' ; \ +infile->bptr = strcpy( infile->buffer, temp); \ +free( temp); \ +if (macro_line != 0 && macro_line != 65535U ) { \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +if (*(infile->buffer) == '#' \ + \ +|| (*(infile->buffer) == '%' && *(infile->buffer + 1) == ':') \ + \ +) \ + \ +if (warn_level & 1) \ +cwarn( \ +"Macro started at line %.0s%u swallowed directive-like line" \ +, ((char *) 0 ) , macro_line, ((char *) 0 ) ); \ +} \ +return infile->buffer; \ +} \ + \ +static char * \ + \ +read_a_comment( char * sp) \ +{ \ + int c; \ + \ +if (keepcomments) { \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('/')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('/'), (&__sF[1])) : (*((&__sF[1]))->_p = ('/'), (int)*((&__sF[1]))->_p++)) ; \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('*')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('*'), (&__sF[1])) : (*((&__sF[1]))->_p = ('*'), (int)*((&__sF[1]))->_p++)) ; \ +} \ +c = *sp++; \ + \ +while (1) { \ +if (keepcomments) \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = (c)), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)(c), (&__sF[1])) : (*((&__sF[1]))->_p = (c), (int)*((&__sF[1]))->_p++)) ; \ + \ +switch (c) { \ +case '/': \ +if ((c = *sp++) != '*') \ +continue; \ +if (warn_level & 1) \ +cwarn( "\"/*\" in comment", ((char *) 0 ) , 0, ((char *) 0 ) ); \ +if (keepcomments) \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = (c)), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)(c), (&__sF[1])) : (*((&__sF[1]))->_p = (c), (int)*((&__sF[1]))->_p++)) ; \ + \ +case '*': \ +if ((c = *sp++) != '/') \ +continue; \ +if (keepcomments) \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = (c)), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)(c), (&__sF[1])) : (*((&__sF[1]))->_p = (c), (int)*((&__sF[1]))->_p++)) ; \ +return sp; \ +case '\n': \ +if (! keepcomments) \ +wrongline = 1 ; \ +if ((sp = getline( 1 )) == 0 ) \ +return 0 ; \ +break; \ +default: \ +break; \ +} \ + \ +c = *sp++; \ +} \ + \ +return sp; \ +} \ + \ +static char * \ + \ +getline( int in_comment) \ +{ \ + \ +int converted = 0 ; \ + \ + \ +int esc; \ + \ +int len; \ +char * ptr; \ + \ +if (infile == 0 ) \ +return 0 ; \ +ptr = infile->bptr = infile->buffer; \ + \ +while (fgets( ptr, (int) (infile->buffer + 0x4000 - ptr), infile->fp) \ +!= 0 ) { \ + \ +line++; \ +if (line == 32768U && (warn_level & 1)) \ +cwarn( "Line number %.0s\"%u\" got beyond range" \ +, ((char *) 0 ) , line, ((char *) 0 ) ); \ + \ +if (debug & ( 2 | 32 )) { \ +printf( "\n#line %u (%s)", line \ +, infile->filename ? infile->filename : "NULL"); \ +dumpstring( ((char *) 0 ) , ptr); \ +} \ + \ +len = strlen( ptr); \ +if ( 0x4000 - 1 <= ptr - infile->buffer + len \ +&& *(ptr + len - 1) != '\n') { \ +if ( 0x4000 - 1 <= len) \ +cfatal( "Too long source line" \ +, ((char *) 0 ) , 0, ((char *) 0 ) ); \ +else \ +cfatal( "Too long logical line" \ +, ((char *) 0 ) , 0, ((char *) 0 ) ); \ +} \ +if (*(ptr + len - 1) != '\n') \ +break; \ +if (lflag) \ +put_source( ptr); \ + \ +if (tflag) \ +converted = trigraph( ptr); \ +if (converted) \ +len = strlen( ptr); \ + \ + \ + \ +len -= 2; \ +if (len >= 0) { \ +esc = (*(ptr + len) == '\\'); \ +if (esc) { \ +ptr = infile->bptr += len; \ +wrongline = 1 ; \ +continue; \ +} \ +} \ + \ + \ +if (ptr - infile->buffer + len + 2 > 0x1FD + 1 && (warn_level & 2)) \ + \ +cwarn( "Logical source line longer than %.0s%d bytes" \ +, ((char *) 0 ) , 0x1FD , ((char *) 0 ) ); \ + \ +return infile->bptr = infile->buffer; \ +} \ + \ + \ +if ( (((infile->fp)->_flags & 0x0040 ) != 0) ) \ +cfatal( "File read error", ((char *) 0 ) , 0, ((char *) 0 ) ); \ +at_eof( in_comment); \ +if (iflag) { \ +no_output--; \ +keepcomments = cflag && ifstack[0].stat && !no_output; \ +} \ +return 0 ; \ +} \ + \ + \ + \ + \ + \ +int \ + \ +trigraph( char * in) \ +{ \ +const char * const tritext = "=(/)'-\0#[\\]^{|}~"; \ +int count = 0; \ + const char * tp; \ + \ +while ((in = strchr( in, '?')) != 0 ) { \ +if (*++in != '?') \ +continue; \ +while (*++in == '?') \ +; \ +if ((tp = strchr( tritext, *in)) == 0 ) \ +continue; \ +in[ -2] = tp[ 10 ]; \ +in--; \ +memmove( in, in + 2, strlen( in + 1)); \ +count++; \ +} \ + \ +if (count && (warn_level & 8)) \ +cwarn( "%.0s%d trigraph(s) converted" \ +, ((char *) 0 ) , count, ((char *) 0 ) ); \ +return count; \ +} \ +static void \ + \ +at_eof( int in_comment) \ +{ \ + const char * const format \ += "End of %s with %.0d%s"; \ +const char * const unterm_if_format \ += "End of %s within #if (#ifdef) section started at line %u"; \ +const char * const unterm_macro_format \ += "End of %s within macro call started at line %u"; \ +const char * const input \ += infile->parent ? "file" : "input"; \ +const char * const no_newline \ += "no newline, skipped the line"; \ +const char * const unterm_com \ += "unterminated comment, skipped the line"; \ + \ +const char * const backsl = "\\, skipped the line"; \ +int len; \ +char * cp = infile->buffer; \ +IFINFO * ifp; \ + \ +len = strlen( cp); \ +if (len && *(cp += (len - 1)) != '\n') { \ +line++; \ +*++cp = '\n'; \ +*++cp = '\0' ; \ +cerror( format, input, 0, no_newline); \ +} \ + \ + \ +if (infile->buffer < infile->bptr) \ +cerror( format, input, 0, backsl); \ + \ + \ +if (in_comment) \ +cerror( format, input, 0, unterm_com); \ + \ +if (infile->initif < ifptr) { \ +ifp = infile->initif + 1; \ + \ +cerror( unterm_if_format, input, ifp->ifline, ((char *) 0 ) ); \ +ifptr = infile->initif; \ + ifstack[0].stat = ifptr->stat; \ +} \ + \ +if (macro_line != 0 && macro_line != 65535U ) { \ + \ +cerror( unterm_macro_format, input, macro_line, ((char *) 0 ) ); \ +macro_line = 65535U ; \ +} \ +} \ + \ +void \ + \ +unget( void) \ +{ \ +if (infile != 0 ) { \ +--infile->bptr; \ + \ +if (infile->bptr < infile->buffer) \ +cfatal( "Bug: Too much pushback", ((char *) 0 ) , 0, ((char *) 0 ) ); \ + \ +} \ + \ + \ +if (debug & 32 ) \ +dumpunget( "after unget"); \ + \ +} \ + \ +FILEINFO * \ + \ +ungetstring( const char * text, const char * name) \ +{ \ + FILEINFO * file; \ +size_t size; \ + \ +if (text) \ +size = strlen( text) + 1; \ +else \ +size = 1; \ +file = getfile( name, size); \ +if (text) \ +memcpy( file->buffer, text, size); \ +else \ +*file->buffer = '\0' ; \ +return file; \ +} \ + \ +char * \ + \ +savestring( const char * text) \ +{ \ + char * result; \ +size_t size; \ + \ +size = strlen( text) + 1; \ +result = xmalloc( size); \ +memcpy( result, text, size); \ +return result; \ +} \ + \ +FILEINFO * \ + \ +getfile( const char * name, size_t bufsize) \ +{ \ + FILEINFO * file; \ +size_t s_name; \ + \ +file = (FILEINFO *) xmalloc( sizeof (FILEINFO)); \ +file->buffer = xmalloc( bufsize); \ +if (name) { \ +s_name = strlen( name) + 1; \ +file->filename = (char *) xmalloc( s_name); \ +memcpy( file->filename, name, s_name); \ +} else { \ +file->filename = 0 ; \ +} \ + \ +file->bptr = file->buffer; \ +return file; } \ + +#endif +#endif +#endif +#endif + diff --git a/libraries/mcpp/cpp-test/test-l/m8191.h b/libraries/mcpp/cpp-test/test-l/m8191.h new file mode 100644 index 000000000..f64b156e7 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/m8191.h @@ -0,0 +1,8196 @@ +/* m8191.h */ +#define AAA +#define AAB +#define AAC +#define AAD +#define AAE +#define AAF +#define AAG +#define AAH +#define AAI +#define AAJ +#define AAK +#define AAL +#define AAM +#define AAN +#define AAO +#define AAP +#define AAQ +#define AAR +#define AAS +#define AAT +#define AAU +#define AAV +#define AAW +#define AAX +#define AAY +#define AAZ +#define ABA +#define ABB +#define ABC +#define ABD +#define ABE +#define ABF +#define ABG +#define ABH +#define ABI +#define ABJ +#define ABK +#define ABL +#define ABM +#define ABN +#define ABO +#define ABP +#define ABQ +#define ABR +#define ABS +#define ABT +#define ABU +#define ABV +#define ABW +#define ABX +#define ABY +#define ABZ +#define ACA +#define ACB +#define ACC +#define ACD +#define ACE +#define ACF +#define ACG +#define ACH +#define ACI +#define ACJ +#define ACK +#define ACL +#define ACM +#define ACN +#define ACO +#define ACP +#define ACQ +#define ACR +#define ACS +#define ACT +#define ACU +#define ACV +#define ACW +#define ACX +#define ACY +#define ACZ +#define ADA +#define ADB +#define ADC +#define ADD +#define ADE +#define ADF +#define ADG +#define ADH +#define ADI +#define ADJ +#define ADK +#define ADL +#define ADM +#define ADN +#define ADO +#define ADP +#define ADQ +#define ADR +#define ADS +#define ADT +#define ADU +#define ADV +#define ADW +#define ADX +#define ADY +#define ADZ +#define AEA +#define AEB +#define AEC +#define AED +#define AEE +#define AEF +#define AEG +#define AEH +#define AEI +#define AEJ +#define AEK +#define AEL +#define AEM +#define AEN +#define AEO +#define AEP +#define AEQ +#define AER +#define AES +#define AET +#define AEU +#define AEV +#define AEW +#define AEX +#define AEY +#define AEZ +#define AFA +#define AFB +#define AFC +#define AFD +#define AFE +#define AFF +#define AFG +#define AFH +#define AFI +#define AFJ +#define AFK +#define AFL +#define AFM +#define AFN +#define AFO +#define AFP +#define AFQ +#define AFR +#define AFS +#define AFT +#define AFU +#define AFV +#define AFW +#define AFX +#define AFY +#define AFZ +#define AGA +#define AGB +#define AGC +#define AGD +#define AGE +#define AGF +#define AGG +#define AGH +#define AGI +#define AGJ +#define AGK +#define AGL +#define AGM +#define AGN +#define AGO +#define AGP +#define AGQ +#define AGR +#define AGS +#define AGT +#define AGU +#define AGV +#define AGW +#define AGX +#define AGY +#define AGZ +#define AHA +#define AHB +#define AHC +#define AHD +#define AHE +#define AHF +#define AHG +#define AHH +#define AHI +#define AHJ +#define AHK +#define AHL +#define AHM +#define AHN +#define AHO +#define AHP +#define AHQ +#define AHR +#define AHS +#define AHT +#define AHU +#define AHV +#define AHW +#define AHX +#define AHY +#define AHZ +#define AIA +#define AIB +#define AIC +#define AID +#define AIE +#define AIF +#define AIG +#define AIH +#define AII +#define AIJ +#define AIK +#define AIL +#define AIM +#define AIN +#define AIO +#define AIP +#define AIQ +#define AIR +#define AIS +#define AIT +#define AIU +#define AIV +#define AIW +#define AIX +#define AIY +#define AIZ +#define AJA +#define AJB +#define AJC +#define AJD +#define AJE +#define AJF +#define AJG +#define AJH +#define AJI +#define AJJ +#define AJK +#define AJL +#define AJM +#define AJN +#define AJO +#define AJP +#define AJQ +#define AJR +#define AJS +#define AJT +#define AJU +#define AJV +#define AJW +#define AJX +#define AJY +#define AJZ +#define AKA +#define AKB +#define AKC +#define AKD +#define AKE +#define AKF +#define AKG +#define AKH +#define AKI +#define AKJ +#define AKK +#define AKL +#define AKM +#define AKN +#define AKO +#define AKP +#define AKQ +#define AKR +#define AKS +#define AKT +#define AKU +#define AKV +#define AKW +#define AKX +#define AKY +#define AKZ +#define ALA +#define ALB +#define ALC +#define ALD +#define ALE +#define ALF +#define ALG +#define ALH +#define ALI +#define ALJ +#define ALK +#define ALL +#define ALM +#define ALN +#define ALO +#define ALP +#define ALQ +#define ALR +#define ALS +#define ALT +#define ALU +#define ALV +#define ALW +#define ALX +#define ALY +#define ALZ +#define AMA +#define AMB +#define AMC +#define AMD +#define AME +#define AMF +#define AMG +#define AMH +#define AMI +#define AMJ +#define AMK +#define AML +#define AMM +#define AMN +#define AMO +#define AMP +#define AMQ +#define AMR +#define AMS +#define AMT +#define AMU +#define AMV +#define AMW +#define AMX +#define AMY +#define AMZ +#define ANA +#define ANB +#define ANC +#define AND +#define ANE +#define ANF +#define ANG +#define ANH +#define ANI +#define ANJ +#define ANK +#define ANL +#define ANM +#define ANN +#define ANO +#define ANP +#define ANQ +#define ANR +#define ANS +#define ANT +#define ANU +#define ANV +#define ANW +#define ANX +#define ANY +#define ANZ +#define AOA +#define AOB +#define AOC +#define AOD +#define AOE +#define AOF +#define AOG +#define AOH +#define AOI +#define AOJ +#define AOK +#define AOL +#define AOM +#define AON +#define AOO +#define AOP +#define AOQ +#define AOR +#define AOS +#define AOT +#define AOU +#define AOV +#define AOW +#define AOX +#define AOY +#define AOZ +#define APA +#define APB +#define APC +#define APD +#define APE +#define APF +#define APG +#define APH +#define API +#define APJ +#define APK +#define APL +#define APM +#define APN +#define APO +#define APP +#define APQ +#define APR +#define APS +#define APT +#define APU +#define APV +#define APW +#define APX +#define APY +#define APZ +#define AQA +#define AQB +#define AQC +#define AQD +#define AQE +#define AQF +#define AQG +#define AQH +#define AQI +#define AQJ +#define AQK +#define AQL +#define AQM +#define AQN +#define AQO +#define AQP +#define AQQ +#define AQR +#define AQS +#define AQT +#define AQU +#define AQV +#define AQW +#define AQX +#define AQY +#define AQZ +#define ARA +#define ARB +#define ARC +#define ARD +#define ARE +#define ARF +#define ARG +#define ARH +#define ARI +#define ARJ +#define ARK +#define ARL +#define ARM +#define ARN +#define ARO +#define ARP +#define ARQ +#define ARR +#define ARS +#define ART +#define ARU +#define ARV +#define ARW +#define ARX +#define ARY +#define ARZ +#define ASA +#define ASB +#define ASC +#define ASD +#define ASE +#define ASF +#define ASG +#define ASH +#define ASI +#define ASJ +#define ASK +#define ASL +#define ASM +#define ASN +#define ASO +#define ASP +#define ASQ +#define ASR +#define ASS +#define AST +#define ASU +#define ASV +#define ASW +#define ASX +#define ASY +#define ASZ +#define ATA +#define ATB +#define ATC +#define ATD +#define ATE +#define ATF +#define ATG +#define ATH +#define ATI +#define ATJ +#define ATK +#define ATL +#define ATM +#define ATN +#define ATO +#define ATP +#define ATQ +#define ATR +#define ATS +#define ATT +#define ATU +#define ATV +#define ATW +#define ATX +#define ATY +#define ATZ +#define AUA +#define AUB +#define AUC +#define AUD +#define AUE +#define AUF +#define AUG +#define AUH +#define AUI +#define AUJ +#define AUK +#define AUL +#define AUM +#define AUN +#define AUO +#define AUP +#define AUQ +#define AUR +#define AUS +#define AUT +#define AUU +#define AUV +#define AUW +#define AUX +#define AUY +#define AUZ +#define AVA +#define AVB +#define AVC +#define AVD +#define AVE +#define AVF +#define AVG +#define AVH +#define AVI +#define AVJ +#define AVK +#define AVL +#define AVM +#define AVN +#define AVO +#define AVP +#define AVQ +#define AVR +#define AVS +#define AVT +#define AVU +#define AVV +#define AVW +#define AVX +#define AVY +#define AVZ +#define AWA +#define AWB +#define AWC +#define AWD +#define AWE +#define AWF +#define AWG +#define AWH +#define AWI +#define AWJ +#define AWK +#define AWL +#define AWM +#define AWN +#define AWO +#define AWP +#define AWQ +#define AWR +#define AWS +#define AWT +#define AWU +#define AWV +#define AWW +#define AWX +#define AWY +#define AWZ +#define AXA +#define AXB +#define AXC +#define AXD +#define AXE +#define AXF +#define AXG +#define AXH +#define AXI +#define AXJ +#define AXK +#define AXL +#define AXM +#define AXN +#define AXO +#define AXP +#define AXQ +#define AXR +#define AXS +#define AXT +#define AXU +#define AXV +#define AXW +#define AXX +#define AXY +#define AXZ +#define AYA +#define AYB +#define AYC +#define AYD +#define AYE +#define AYF +#define AYG +#define AYH +#define AYI +#define AYJ +#define AYK +#define AYL +#define AYM +#define AYN +#define AYO +#define AYP +#define AYQ +#define AYR +#define AYS +#define AYT +#define AYU +#define AYV +#define AYW +#define AYX +#define AYY +#define AYZ +#define AZA +#define AZB +#define AZC +#define AZD +#define AZE +#define AZF +#define AZG +#define AZH +#define AZI +#define AZJ +#define AZK +#define AZL +#define AZM +#define AZN +#define AZO +#define AZP +#define AZQ +#define AZR +#define AZS +#define AZT +#define AZU +#define AZV +#define AZW +#define AZX +#define AZY +#define AZZ +#define BAA +#define BAB +#define BAC +#define BAD +#define BAE +#define BAF +#define BAG +#define BAH +#define BAI +#define BAJ +#define BAK +#define BAL +#define BAM +#define BAN +#define BAO +#define BAP +#define BAQ +#define BAR +#define BAS +#define BAT +#define BAU +#define BAV +#define BAW +#define BAX +#define BAY +#define BAZ +#define BBA +#define BBB +#define BBC +#define BBD +#define BBE +#define BBF +#define BBG +#define BBH +#define BBI +#define BBJ +#define BBK +#define BBL +#define BBM +#define BBN +#define BBO +#define BBP +#define BBQ +#define BBR +#define BBS +#define BBT +#define BBU +#define BBV +#define BBW +#define BBX +#define BBY +#define BBZ +#define BCA +#define BCB +#define BCC +#define BCD +#define BCE +#define BCF +#define BCG +#define BCH +#define BCI +#define BCJ +#define BCK +#define BCL +#define BCM +#define BCN +#define BCO +#define BCP +#define BCQ +#define BCR +#define BCS +#define BCT +#define BCU +#define BCV +#define BCW +#define BCX +#define BCY +#define BCZ +#define BDA +#define BDB +#define BDC +#define BDD +#define BDE +#define BDF +#define BDG +#define BDH +#define BDI +#define BDJ +#define BDK +#define BDL +#define BDM +#define BDN +#define BDO +#define BDP +#define BDQ +#define BDR +#define BDS +#define BDT +#define BDU +#define BDV +#define BDW +#define BDX +#define BDY +#define BDZ +#define BEA +#define BEB +#define BEC +#define BED +#define BEE +#define BEF +#define BEG +#define BEH +#define BEI +#define BEJ +#define BEK +#define BEL +#define BEM +#define BEN +#define BEO +#define BEP +#define BEQ +#define BER +#define BES +#define BET +#define BEU +#define BEV +#define BEW +#define BEX +#define BEY +#define BEZ +#define BFA +#define BFB +#define BFC +#define BFD +#define BFE +#define BFF +#define BFG +#define BFH +#define BFI +#define BFJ +#define BFK +#define BFL +#define BFM +#define BFN +#define BFO +#define BFP +#define BFQ +#define BFR +#define BFS +#define BFT +#define BFU +#define BFV +#define BFW +#define BFX +#define BFY +#define BFZ +#define BGA +#define BGB +#define BGC +#define BGD +#define BGE +#define BGF +#define BGG +#define BGH +#define BGI +#define BGJ +#define BGK +#define BGL +#define BGM +#define BGN +#define BGO +#define BGP +#define BGQ +#define BGR +#define BGS +#define BGT +#define BGU +#define BGV +#define BGW +#define BGX +#define BGY +#define BGZ +#define BHA +#define BHB +#define BHC +#define BHD +#define BHE +#define BHF +#define BHG +#define BHH +#define BHI +#define BHJ +#define BHK +#define BHL +#define BHM +#define BHN +#define BHO +#define BHP +#define BHQ +#define BHR +#define BHS +#define BHT +#define BHU +#define BHV +#define BHW +#define BHX +#define BHY +#define BHZ +#define BIA +#define BIB +#define BIC +#define BID +#define BIE +#define BIF +#define BIG +#define BIH +#define BII +#define BIJ +#define BIK +#define BIL +#define BIM +#define BIN +#define BIO +#define BIP +#define BIQ +#define BIR +#define BIS +#define BIT +#define BIU +#define BIV +#define BIW +#define BIX +#define BIY +#define BIZ +#define BJA +#define BJB +#define BJC +#define BJD +#define BJE +#define BJF +#define BJG +#define BJH +#define BJI +#define BJJ +#define BJK +#define BJL +#define BJM +#define BJN +#define BJO +#define BJP +#define BJQ +#define BJR +#define BJS +#define BJT +#define BJU +#define BJV +#define BJW +#define BJX +#define BJY +#define BJZ +#define BKA +#define BKB +#define BKC +#define BKD +#define BKE +#define BKF +#define BKG +#define BKH +#define BKI +#define BKJ +#define BKK +#define BKL +#define BKM +#define BKN +#define BKO +#define BKP +#define BKQ +#define BKR +#define BKS +#define BKT +#define BKU +#define BKV +#define BKW +#define BKX +#define BKY +#define BKZ +#define BLA +#define BLB +#define BLC +#define BLD +#define BLE +#define BLF +#define BLG +#define BLH +#define BLI +#define BLJ +#define BLK +#define BLL +#define BLM +#define BLN +#define BLO +#define BLP +#define BLQ +#define BLR +#define BLS +#define BLT +#define BLU +#define BLV +#define BLW +#define BLX +#define BLY +#define BLZ +#define BMA +#define BMB +#define BMC +#define BMD +#define BME +#define BMF +#define BMG +#define BMH +#define BMI +#define BMJ +#define BMK +#define BML +#define BMM +#define BMN +#define BMO +#define BMP +#define BMQ +#define BMR +#define BMS +#define BMT +#define BMU +#define BMV +#define BMW +#define BMX +#define BMY +#define BMZ +#define BNA +#define BNB +#define BNC +#define BND +#define BNE +#define BNF +#define BNG +#define BNH +#define BNI +#define BNJ +#define BNK +#define BNL +#define BNM +#define BNN +#define BNO +#define BNP +#define BNQ +#define BNR +#define BNS +#define BNT +#define BNU +#define BNV +#define BNW +#define BNX +#define BNY +#define BNZ +#define BOA +#define BOB +#define BOC +#define BOD +#define BOE +#define BOF +#define BOG +#define BOH +#define BOI +#define BOJ +#define BOK +#define BOL +#define BOM +#define BON +#define BOO +#define BOP +#define BOQ +#define BOR +#define BOS +#define BOT +#define BOU +#define BOV +#define BOW +#define BOX +#define BOY +#define BOZ +#define BPA +#define BPB +#define BPC +#define BPD +#define BPE +#define BPF +#define BPG +#define BPH +#define BPI +#define BPJ +#define BPK +#define BPL +#define BPM +#define BPN +#define BPO +#define BPP +#define BPQ +#define BPR +#define BPS +#define BPT +#define BPU +#define BPV +#define BPW +#define BPX +#define BPY +#define BPZ +#define BQA +#define BQB +#define BQC +#define BQD +#define BQE +#define BQF +#define BQG +#define BQH +#define BQI +#define BQJ +#define BQK +#define BQL +#define BQM +#define BQN +#define BQO +#define BQP +#define BQQ +#define BQR +#define BQS +#define BQT +#define BQU +#define BQV +#define BQW +#define BQX +#define BQY +#define BQZ +#define BRA +#define BRB +#define BRC +#define BRD +#define BRE +#define BRF +#define BRG +#define BRH +#define BRI +#define BRJ +#define BRK +#define BRL +#define BRM +#define BRN +#define BRO +#define BRP +#define BRQ +#define BRR +#define BRS +#define BRT +#define BRU +#define BRV +#define BRW +#define BRX +#define BRY +#define BRZ +#define BSA +#define BSB +#define BSC +#define BSD +#define BSE +#define BSF +#define BSG +#define BSH +#define BSI +#define BSJ +#define BSK +#define BSL +#define BSM +#define BSN +#define BSO +#define BSP +#define BSQ +#define BSR +#define BSS +#define BST +#define BSU +#define BSV +#define BSW +#define BSX +#define BSY +#define BSZ +#define BTA +#define BTB +#define BTC +#define BTD +#define BTE +#define BTF +#define BTG +#define BTH +#define BTI +#define BTJ +#define BTK +#define BTL +#define BTM +#define BTN +#define BTO +#define BTP +#define BTQ +#define BTR +#define BTS +#define BTT +#define BTU +#define BTV +#define BTW +#define BTX +#define BTY +#define BTZ +#define BUA +#define BUB +#define BUC +#define BUD +#define BUE +#define BUF +#define BUG +#define BUH +#define BUI +#define BUJ +#define BUK +#define BUL +#define BUM +#define BUN +#define BUO +#define BUP +#define BUQ +#define BUR +#define BUS +#define BUT +#define BUU +#define BUV +#define BUW +#define BUX +#define BUY +#define BUZ +#define BVA +#define BVB +#define BVC +#define BVD +#define BVE +#define BVF +#define BVG +#define BVH +#define BVI +#define BVJ +#define BVK +#define BVL +#define BVM +#define BVN +#define BVO +#define BVP +#define BVQ +#define BVR +#define BVS +#define BVT +#define BVU +#define BVV +#define BVW +#define BVX +#define BVY +#define BVZ +#define BWA +#define BWB +#define BWC +#define BWD +#define BWE +#define BWF +#define BWG +#define BWH +#define BWI +#define BWJ +#define BWK +#define BWL +#define BWM +#define BWN +#define BWO +#define BWP +#define BWQ +#define BWR +#define BWS +#define BWT +#define BWU +#define BWV +#define BWW +#define BWX +#define BWY +#define BWZ +#define BXA +#define BXB +#define BXC +#define BXD +#define BXE +#define BXF +#define BXG +#define BXH +#define BXI +#define BXJ +#define BXK +#define BXL +#define BXM +#define BXN +#define BXO +#define BXP +#define BXQ +#define BXR +#define BXS +#define BXT +#define BXU +#define BXV +#define BXW +#define BXX +#define BXY +#define BXZ +#define BYA +#define BYB +#define BYC +#define BYD +#define BYE +#define BYF +#define BYG +#define BYH +#define BYI +#define BYJ +#define BYK +#define BYL +#define BYM +#define BYN +#define BYO +#define BYP +#define BYQ +#define BYR +#define BYS +#define BYT +#define BYU +#define BYV +#define BYW +#define BYX +#define BYY +#define BYZ +#define BZA +#define BZB +#define BZC +#define BZD +#define BZE +#define BZF +#define BZG +#define BZH +#define BZI +#define BZJ +#define BZK +#define BZL +#define BZM +#define BZN +#define BZO +#define BZP +#define BZQ +#define BZR +#define BZS +#define BZT +#define BZU +#define BZV +#define BZW +#define BZX +#define BZY +#define BZZ +#define CAA +#define CAB +#define CAC +#define CAD +#define CAE +#define CAF +#define CAG +#define CAH +#define CAI +#define CAJ +#define CAK +#define CAL +#define CAM +#define CAN +#define CAO +#define CAP +#define CAQ +#define CAR +#define CAS +#define CAT +#define CAU +#define CAV +#define CAW +#define CAX +#define CAY +#define CAZ +#define CBA +#define CBB +#define CBC +#define CBD +#define CBE +#define CBF +#define CBG +#define CBH +#define CBI +#define CBJ +#define CBK +#define CBL +#define CBM +#define CBN +#define CBO +#define CBP +#define CBQ +#define CBR +#define CBS +#define CBT +#define CBU +#define CBV +#define CBW +#define CBX +#define CBY +#define CBZ +#define CCA +#define CCB +#define CCC +#define CCD +#define CCE +#define CCF +#define CCG +#define CCH +#define CCI +#define CCJ +#define CCK +#define CCL +#define CCM +#define CCN +#define CCO +#define CCP +#define CCQ +#define CCR +#define CCS +#define CCT +#define CCU +#define CCV +#define CCW +#define CCX +#define CCY +#define CCZ +#define CDA +#define CDB +#define CDC +#define CDD +#define CDE +#define CDF +#define CDG +#define CDH +#define CDI +#define CDJ +#define CDK +#define CDL +#define CDM +#define CDN +#define CDO +#define CDP +#define CDQ +#define CDR +#define CDS +#define CDT +#define CDU +#define CDV +#define CDW +#define CDX +#define CDY +#define CDZ +#define CEA +#define CEB +#define CEC +#define CED +#define CEE +#define CEF +#define CEG +#define CEH +#define CEI +#define CEJ +#define CEK +#define CEL +#define CEM +#define CEN +#define CEO +#define CEP +#define CEQ +#define CER +#define CES +#define CET +#define CEU +#define CEV +#define CEW +#define CEX +#define CEY +#define CEZ +#define CFA +#define CFB +#define CFC +#define CFD +#define CFE +#define CFF +#define CFG +#define CFH +#define CFI +#define CFJ +#define CFK +#define CFL +#define CFM +#define CFN +#define CFO +#define CFP +#define CFQ +#define CFR +#define CFS +#define CFT +#define CFU +#define CFV +#define CFW +#define CFX +#define CFY +#define CFZ +#define CGA +#define CGB +#define CGC +#define CGD +#define CGE +#define CGF +#define CGG +#define CGH +#define CGI +#define CGJ +#define CGK +#define CGL +#define CGM +#define CGN +#define CGO +#define CGP +#define CGQ +#define CGR +#define CGS +#define CGT +#define CGU +#define CGV +#define CGW +#define CGX +#define CGY +#define CGZ +#define CHA +#define CHB +#define CHC +#define CHD +#define CHE +#define CHF +#define CHG +#define CHH +#define CHI +#define CHJ +#define CHK +#define CHL +#define CHM +#define CHN +#define CHO +#define CHP +#define CHQ +#define CHR +#define CHS +#define CHT +#define CHU +#define CHV +#define CHW +#define CHX +#define CHY +#define CHZ +#define CIA +#define CIB +#define CIC +#define CID +#define CIE +#define CIF +#define CIG +#define CIH +#define CII +#define CIJ +#define CIK +#define CIL +#define CIM +#define CIN +#define CIO +#define CIP +#define CIQ +#define CIR +#define CIS +#define CIT +#define CIU +#define CIV +#define CIW +#define CIX +#define CIY +#define CIZ +#define CJA +#define CJB +#define CJC +#define CJD +#define CJE +#define CJF +#define CJG +#define CJH +#define CJI +#define CJJ +#define CJK +#define CJL +#define CJM +#define CJN +#define CJO +#define CJP +#define CJQ +#define CJR +#define CJS +#define CJT +#define CJU +#define CJV +#define CJW +#define CJX +#define CJY +#define CJZ +#define CKA +#define CKB +#define CKC +#define CKD +#define CKE +#define CKF +#define CKG +#define CKH +#define CKI +#define CKJ +#define CKK +#define CKL +#define CKM +#define CKN +#define CKO +#define CKP +#define CKQ +#define CKR +#define CKS +#define CKT +#define CKU +#define CKV +#define CKW +#define CKX +#define CKY +#define CKZ +#define CLA +#define CLB +#define CLC +#define CLD +#define CLE +#define CLF +#define CLG +#define CLH +#define CLI +#define CLJ +#define CLK +#define CLL +#define CLM +#define CLN +#define CLO +#define CLP +#define CLQ +#define CLR +#define CLS +#define CLT +#define CLU +#define CLV +#define CLW +#define CLX +#define CLY +#define CLZ +#define CMA +#define CMB +#define CMC +#define CMD +#define CME +#define CMF +#define CMG +#define CMH +#define CMI +#define CMJ +#define CMK +#define CML +#define CMM +#define CMN +#define CMO +#define CMP +#define CMQ +#define CMR +#define CMS +#define CMT +#define CMU +#define CMV +#define CMW +#define CMX +#define CMY +#define CMZ +#define CNA +#define CNB +#define CNC +#define CND +#define CNE +#define CNF +#define CNG +#define CNH +#define CNI +#define CNJ +#define CNK +#define CNL +#define CNM +#define CNN +#define CNO +#define CNP +#define CNQ +#define CNR +#define CNS +#define CNT +#define CNU +#define CNV +#define CNW +#define CNX +#define CNY +#define CNZ +#define COA +#define COB +#define COC +#define COD +#define COE +#define COF +#define COG +#define COH +#define COI +#define COJ +#define COK +#define COL +#define COM +#define CON +#define COO +#define COP +#define COQ +#define COR +#define COS +#define COT +#define COU +#define COV +#define COW +#define COX +#define COY +#define COZ +#define CPA +#define CPB +#define CPC +#define CPD +#define CPE +#define CPF +#define CPG +#define CPH +#define CPI +#define CPJ +#define CPK +#define CPL +#define CPM +#define CPN +#define CPO +#define CPP +#define CPQ +#define CPR +#define CPS +#define CPT +#define CPU +#define CPV +#define CPW +#define CPX +#define CPY +#define CPZ +#define CQA +#define CQB +#define CQC +#define CQD +#define CQE +#define CQF +#define CQG +#define CQH +#define CQI +#define CQJ +#define CQK +#define CQL +#define CQM +#define CQN +#define CQO +#define CQP +#define CQQ +#define CQR +#define CQS +#define CQT +#define CQU +#define CQV +#define CQW +#define CQX +#define CQY +#define CQZ +#define CRA +#define CRB +#define CRC +#define CRD +#define CRE +#define CRF +#define CRG +#define CRH +#define CRI +#define CRJ +#define CRK +#define CRL +#define CRM +#define CRN +#define CRO +#define CRP +#define CRQ +#define CRR +#define CRS +#define CRT +#define CRU +#define CRV +#define CRW +#define CRX +#define CRY +#define CRZ +#define CSA +#define CSB +#define CSC +#define CSD +#define CSE +#define CSF +#define CSG +#define CSH +#define CSI +#define CSJ +#define CSK +#define CSL +#define CSM +#define CSN +#define CSO +#define CSP +#define CSQ +#define CSR +#define CSS +#define CST +#define CSU +#define CSV +#define CSW +#define CSX +#define CSY +#define CSZ +#define CTA +#define CTB +#define CTC +#define CTD +#define CTE +#define CTF +#define CTG +#define CTH +#define CTI +#define CTJ +#define CTK +#define CTL +#define CTM +#define CTN +#define CTO +#define CTP +#define CTQ +#define CTR +#define CTS +#define CTT +#define CTU +#define CTV +#define CTW +#define CTX +#define CTY +#define CTZ +#define CUA +#define CUB +#define CUC +#define CUD +#define CUE +#define CUF +#define CUG +#define CUH +#define CUI +#define CUJ +#define CUK +#define CUL +#define CUM +#define CUN +#define CUO +#define CUP +#define CUQ +#define CUR +#define CUS +#define CUT +#define CUU +#define CUV +#define CUW +#define CUX +#define CUY +#define CUZ +#define CVA +#define CVB +#define CVC +#define CVD +#define CVE +#define CVF +#define CVG +#define CVH +#define CVI +#define CVJ +#define CVK +#define CVL +#define CVM +#define CVN +#define CVO +#define CVP +#define CVQ +#define CVR +#define CVS +#define CVT +#define CVU +#define CVV +#define CVW +#define CVX +#define CVY +#define CVZ +#define CWA +#define CWB +#define CWC +#define CWD +#define CWE +#define CWF +#define CWG +#define CWH +#define CWI +#define CWJ +#define CWK +#define CWL +#define CWM +#define CWN +#define CWO +#define CWP +#define CWQ +#define CWR +#define CWS +#define CWT +#define CWU +#define CWV +#define CWW +#define CWX +#define CWY +#define CWZ +#define CXA +#define CXB +#define CXC +#define CXD +#define CXE +#define CXF +#define CXG +#define CXH +#define CXI +#define CXJ +#define CXK +#define CXL +#define CXM +#define CXN +#define CXO +#define CXP +#define CXQ +#define CXR +#define CXS +#define CXT +#define CXU +#define CXV +#define CXW +#define CXX +#define CXY +#define CXZ +#define CYA +#define CYB +#define CYC +#define CYD +#define CYE +#define CYF +#define CYG +#define CYH +#define CYI +#define CYJ +#define CYK +#define CYL +#define CYM +#define CYN +#define CYO +#define CYP +#define CYQ +#define CYR +#define CYS +#define CYT +#define CYU +#define CYV +#define CYW +#define CYX +#define CYY +#define CYZ +#define CZA +#define CZB +#define CZC +#define CZD +#define CZE +#define CZF +#define CZG +#define CZH +#define CZI +#define CZJ +#define CZK +#define CZL +#define CZM +#define CZN +#define CZO +#define CZP +#define CZQ +#define CZR +#define CZS +#define CZT +#define CZU +#define CZV +#define CZW +#define CZX +#define CZY +#define CZZ +#define DAA +#define DAB +#define DAC +#define DAD +#define DAE +#define DAF +#define DAG +#define DAH +#define DAI +#define DAJ +#define DAK +#define DAL +#define DAM +#define DAN +#define DAO +#define DAP +#define DAQ +#define DAR +#define DAS 0x07ff +#ifndef X07FF +#define DAT +#define DAU +#define DAV +#define DAW +#define DAX +#define DAY +#define DAZ +#define DBA +#define DBB +#define DBC +#define DBD +#define DBE +#define DBF +#define DBG +#define DBH +#define DBI +#define DBJ +#define DBK +#define DBL +#define DBM +#define DBN +#define DBO +#define DBP +#define DBQ +#define DBR +#define DBS +#define DBT +#define DBU +#define DBV +#define DBW +#define DBX +#define DBY +#define DBZ +#define DCA +#define DCB +#define DCC +#define DCD +#define DCE +#define DCF +#define DCG +#define DCH +#define DCI +#define DCJ +#define DCK +#define DCL +#define DCM +#define DCN +#define DCO +#define DCP +#define DCQ +#define DCR +#define DCS +#define DCT +#define DCU +#define DCV +#define DCW +#define DCX +#define DCY +#define DCZ +#define DDA +#define DDB +#define DDC +#define DDD +#define DDE +#define DDF +#define DDG +#define DDH +#define DDI +#define DDJ +#define DDK +#define DDL +#define DDM +#define DDN +#define DDO +#define DDP +#define DDQ +#define DDR +#define DDS +#define DDT +#define DDU +#define DDV +#define DDW +#define DDX +#define DDY +#define DDZ +#define DEA +#define DEB +#define DEC +#define DED +#define DEE +#define DEF +#define DEG +#define DEH +#define DEI +#define DEJ +#define DEK +#define DEL +#define DEM +#define DEN +#define DEO +#define DEP +#define DEQ +#define DER +#define DES +#define DET +#define DEU +#define DEV +#define DEW +#define DEX +#define DEY +#define DEZ +#define DFA +#define DFB +#define DFC +#define DFD +#define DFE +#define DFF +#define DFG +#define DFH +#define DFI +#define DFJ +#define DFK +#define DFL +#define DFM +#define DFN +#define DFO +#define DFP +#define DFQ +#define DFR +#define DFS +#define DFT +#define DFU +#define DFV +#define DFW +#define DFX +#define DFY +#define DFZ +#define DGA +#define DGB +#define DGC +#define DGD +#define DGE +#define DGF +#define DGG +#define DGH +#define DGI +#define DGJ +#define DGK +#define DGL +#define DGM +#define DGN +#define DGO +#define DGP +#define DGQ +#define DGR +#define DGS +#define DGT +#define DGU +#define DGV +#define DGW +#define DGX +#define DGY +#define DGZ +#define DHA +#define DHB +#define DHC +#define DHD +#define DHE +#define DHF +#define DHG +#define DHH +#define DHI +#define DHJ +#define DHK +#define DHL +#define DHM +#define DHN +#define DHO +#define DHP +#define DHQ +#define DHR +#define DHS +#define DHT +#define DHU +#define DHV +#define DHW +#define DHX +#define DHY +#define DHZ +#define DIA +#define DIB +#define DIC +#define DID +#define DIE +#define DIF +#define DIG +#define DIH +#define DII +#define DIJ +#define DIK +#define DIL +#define DIM +#define DIN +#define DIO +#define DIP +#define DIQ +#define DIR +#define DIS +#define DIT +#define DIU +#define DIV +#define DIW +#define DIX +#define DIY +#define DIZ +#define DJA +#define DJB +#define DJC +#define DJD +#define DJE +#define DJF +#define DJG +#define DJH +#define DJI +#define DJJ +#define DJK +#define DJL +#define DJM +#define DJN +#define DJO +#define DJP +#define DJQ +#define DJR +#define DJS +#define DJT +#define DJU +#define DJV +#define DJW +#define DJX +#define DJY +#define DJZ +#define DKA +#define DKB +#define DKC +#define DKD +#define DKE +#define DKF +#define DKG +#define DKH +#define DKI +#define DKJ +#define DKK +#define DKL +#define DKM +#define DKN +#define DKO +#define DKP +#define DKQ +#define DKR +#define DKS +#define DKT +#define DKU +#define DKV +#define DKW +#define DKX +#define DKY +#define DKZ +#define DLA +#define DLB +#define DLC +#define DLD +#define DLE +#define DLF +#define DLG +#define DLH +#define DLI +#define DLJ +#define DLK +#define DLL +#define DLM +#define DLN +#define DLO +#define DLP +#define DLQ +#define DLR +#define DLS +#define DLT +#define DLU +#define DLV +#define DLW +#define DLX +#define DLY +#define DLZ +#define DMA +#define DMB +#define DMC +#define DMD +#define DME +#define DMF +#define DMG +#define DMH +#define DMI +#define DMJ +#define DMK +#define DML +#define DMM +#define DMN +#define DMO +#define DMP +#define DMQ +#define DMR +#define DMS +#define DMT +#define DMU +#define DMV +#define DMW +#define DMX +#define DMY +#define DMZ +#define DNA +#define DNB +#define DNC +#define DND +#define DNE +#define DNF +#define DNG +#define DNH +#define DNI +#define DNJ +#define DNK +#define DNL +#define DNM +#define DNN +#define DNO +#define DNP +#define DNQ +#define DNR +#define DNS +#define DNT +#define DNU +#define DNV +#define DNW +#define DNX +#define DNY +#define DNZ +#define DOA +#define DOB +#define DOC +#define DOD +#define DOE +#define DOF +#define DOG +#define DOH +#define DOI +#define DOJ +#define DOK +#define DOL +#define DOM +#define DON +#define DOO +#define DOP +#define DOQ +#define DOR +#define DOS +#define DOT +#define DOU +#define DOV +#define DOW +#define DOX +#define DOY +#define DOZ +#define DPA +#define DPB +#define DPC +#define DPD +#define DPE +#define DPF +#define DPG +#define DPH +#define DPI +#define DPJ +#define DPK +#define DPL +#define DPM +#define DPN +#define DPO +#define DPP +#define DPQ +#define DPR +#define DPS +#define DPT +#define DPU +#define DPV +#define DPW +#define DPX +#define DPY +#define DPZ +#define DQA +#define DQB +#define DQC +#define DQD +#define DQE +#define DQF +#define DQG +#define DQH +#define DQI +#define DQJ +#define DQK +#define DQL +#define DQM +#define DQN +#define DQO +#define DQP +#define DQQ +#define DQR +#define DQS +#define DQT +#define DQU +#define DQV +#define DQW +#define DQX +#define DQY +#define DQZ +#define DRA +#define DRB +#define DRC +#define DRD +#define DRE +#define DRF +#define DRG +#define DRH +#define DRI +#define DRJ +#define DRK +#define DRL +#define DRM +#define DRN +#define DRO +#define DRP +#define DRQ +#define DRR +#define DRS +#define DRT +#define DRU +#define DRV +#define DRW +#define DRX +#define DRY +#define DRZ +#define DSA +#define DSB +#define DSC +#define DSD +#define DSE +#define DSF +#define DSG +#define DSH +#define DSI +#define DSJ +#define DSK +#define DSL +#define DSM +#define DSN +#define DSO +#define DSP +#define DSQ +#define DSR +#define DSS +#define DST +#define DSU +#define DSV +#define DSW +#define DSX +#define DSY +#define DSZ +#define DTA +#define DTB +#define DTC +#define DTD +#define DTE +#define DTF +#define DTG +#define DTH +#define DTI +#define DTJ +#define DTK +#define DTL +#define DTM +#define DTN +#define DTO +#define DTP +#define DTQ +#define DTR +#define DTS +#define DTT +#define DTU +#define DTV +#define DTW +#define DTX +#define DTY +#define DTZ +#define DUA +#define DUB +#define DUC +#define DUD +#define DUE +#define DUF +#define DUG +#define DUH +#define DUI +#define DUJ +#define DUK +#define DUL +#define DUM +#define DUN +#define DUO +#define DUP +#define DUQ +#define DUR +#define DUS +#define DUT +#define DUU +#define DUV +#define DUW +#define DUX +#define DUY +#define DUZ +#define DVA +#define DVB +#define DVC +#define DVD +#define DVE +#define DVF +#define DVG +#define DVH +#define DVI +#define DVJ +#define DVK +#define DVL +#define DVM +#define DVN +#define DVO +#define DVP +#define DVQ +#define DVR +#define DVS +#define DVT +#define DVU +#define DVV +#define DVW +#define DVX +#define DVY +#define DVZ +#define DWA +#define DWB +#define DWC +#define DWD +#define DWE +#define DWF +#define DWG +#define DWH +#define DWI +#define DWJ +#define DWK +#define DWL +#define DWM +#define DWN +#define DWO +#define DWP +#define DWQ +#define DWR +#define DWS +#define DWT +#define DWU +#define DWV +#define DWW +#define DWX +#define DWY +#define DWZ +#define DXA +#define DXB +#define DXC +#define DXD +#define DXE +#define DXF +#define DXG +#define DXH +#define DXI +#define DXJ +#define DXK +#define DXL +#define DXM +#define DXN +#define DXO +#define DXP +#define DXQ +#define DXR +#define DXS +#define DXT +#define DXU +#define DXV +#define DXW +#define DXX +#define DXY +#define DXZ +#define DYA +#define DYB +#define DYC +#define DYD +#define DYE +#define DYF +#define DYG +#define DYH +#define DYI +#define DYJ +#define DYK +#define DYL +#define DYM +#define DYN +#define DYO +#define DYP +#define DYQ +#define DYR +#define DYS +#define DYT +#define DYU +#define DYV +#define DYW +#define DYX +#define DYY +#define DYZ +#define DZA +#define DZB +#define DZC +#define DZD +#define DZE +#define DZF +#define DZG +#define DZH +#define DZI +#define DZJ +#define DZK +#define DZL +#define DZM +#define DZN +#define DZO +#define DZP +#define DZQ +#define DZR +#define DZS +#define DZT +#define DZU +#define DZV +#define DZW +#define DZX +#define DZY +#define DZZ +#define EAA +#define EAB +#define EAC +#define EAD +#define EAE +#define EAF +#define EAG +#define EAH +#define EAI +#define EAJ +#define EAK +#define EAL +#define EAM +#define EAN +#define EAO +#define EAP +#define EAQ +#define EAR +#define EAS +#define EAT +#define EAU +#define EAV +#define EAW +#define EAX +#define EAY +#define EAZ +#define EBA +#define EBB +#define EBC +#define EBD +#define EBE +#define EBF +#define EBG +#define EBH +#define EBI +#define EBJ +#define EBK +#define EBL +#define EBM +#define EBN +#define EBO +#define EBP +#define EBQ +#define EBR +#define EBS +#define EBT +#define EBU +#define EBV +#define EBW +#define EBX +#define EBY +#define EBZ +#define ECA +#define ECB +#define ECC +#define ECD +#define ECE +#define ECF +#define ECG +#define ECH +#define ECI +#define ECJ +#define ECK +#define ECL +#define ECM +#define ECN +#define ECO +#define ECP +#define ECQ +#define ECR +#define ECS +#define ECT +#define ECU +#define ECV +#define ECW +#define ECX +#define ECY +#define ECZ +#define EDA +#define EDB +#define EDC +#define EDD +#define EDE +#define EDF +#define EDG +#define EDH +#define EDI +#define EDJ +#define EDK +#define EDL +#define EDM +#define EDN +#define EDO +#define EDP +#define EDQ +#define EDR +#define EDS +#define EDT +#define EDU +#define EDV +#define EDW +#define EDX +#define EDY +#define EDZ +#define EEA +#define EEB +#define EEC +#define EED +#define EEE +#define EEF +#define EEG +#define EEH +#define EEI +#define EEJ +#define EEK +#define EEL +#define EEM +#define EEN +#define EEO +#define EEP +#define EEQ +#define EER +#define EES +#define EET +#define EEU +#define EEV +#define EEW +#define EEX +#define EEY +#define EEZ +#define EFA +#define EFB +#define EFC +#define EFD +#define EFE +#define EFF +#define EFG +#define EFH +#define EFI +#define EFJ +#define EFK +#define EFL +#define EFM +#define EFN +#define EFO +#define EFP +#define EFQ +#define EFR +#define EFS +#define EFT +#define EFU +#define EFV +#define EFW +#define EFX +#define EFY +#define EFZ +#define EGA +#define EGB +#define EGC +#define EGD +#define EGE +#define EGF +#define EGG +#define EGH +#define EGI +#define EGJ +#define EGK +#define EGL +#define EGM +#define EGN +#define EGO +#define EGP +#define EGQ +#define EGR +#define EGS +#define EGT +#define EGU +#define EGV +#define EGW +#define EGX +#define EGY +#define EGZ +#define EHA +#define EHB +#define EHC +#define EHD +#define EHE +#define EHF +#define EHG +#define EHH +#define EHI +#define EHJ +#define EHK +#define EHL +#define EHM +#define EHN +#define EHO +#define EHP +#define EHQ +#define EHR +#define EHS +#define EHT +#define EHU +#define EHV +#define EHW +#define EHX +#define EHY +#define EHZ +#define EIA +#define EIB +#define EIC +#define EID +#define EIE +#define EIF +#define EIG +#define EIH +#define EII +#define EIJ +#define EIK +#define EIL +#define EIM +#define EIN +#define EIO +#define EIP +#define EIQ +#define EIR +#define EIS +#define EIT +#define EIU +#define EIV +#define EIW +#define EIX +#define EIY +#define EIZ +#define EJA +#define EJB +#define EJC +#define EJD +#define EJE +#define EJF +#define EJG +#define EJH +#define EJI +#define EJJ +#define EJK +#define EJL +#define EJM +#define EJN +#define EJO +#define EJP +#define EJQ +#define EJR +#define EJS +#define EJT +#define EJU +#define EJV +#define EJW +#define EJX +#define EJY +#define EJZ +#define EKA +#define EKB +#define EKC +#define EKD +#define EKE +#define EKF +#define EKG +#define EKH +#define EKI +#define EKJ +#define EKK +#define EKL +#define EKM +#define EKN +#define EKO +#define EKP +#define EKQ +#define EKR +#define EKS +#define EKT +#define EKU +#define EKV +#define EKW +#define EKX +#define EKY +#define EKZ +#define ELA +#define ELB +#define ELC +#define ELD +#define ELE +#define ELF +#define ELG +#define ELH +#define ELI +#define ELJ +#define ELK +#define ELL +#define ELM +#define ELN +#define ELO +#define ELP +#define ELQ +#define ELR +#define ELS +#define ELT +#define ELU +#define ELV +#define ELW +#define ELX +#define ELY +#define ELZ +#define EMA +#define EMB +#define EMC +#define EMD +#define EME +#define EMF +#define EMG +#define EMH +#define EMI +#define EMJ +#define EMK +#define EML +#define EMM +#define EMN +#define EMO +#define EMP +#define EMQ +#define EMR +#define EMS +#define EMT +#define EMU +#define EMV +#define EMW +#define EMX +#define EMY +#define EMZ +#define ENA +#define ENB +#define ENC +#define END +#define ENE +#define ENF +#define ENG +#define ENH +#define ENI +#define ENJ +#define ENK +#define ENL +#define ENM +#define ENN +#define ENO +#define ENP +#define ENQ +#define ENR +#define ENS +#define ENT +#define ENU +#define ENV +#define ENW +#define ENX +#define ENY +#define ENZ +#define EOA +#define EOB +#define EOC +#define EOD +#define EOE +#define EOF +#define EOG +#define EOH +#define EOI +#define EOJ +#define EOK +#define EOL +#define EOM +#define EON +#define EOO +#define EOP +#define EOQ +#define EOR +#define EOS +#define EOT +#define EOU +#define EOV +#define EOW +#define EOX +#define EOY +#define EOZ +#define EPA +#define EPB +#define EPC +#define EPD +#define EPE +#define EPF +#define EPG +#define EPH +#define EPI +#define EPJ +#define EPK +#define EPL +#define EPM +#define EPN +#define EPO +#define EPP +#define EPQ +#define EPR +#define EPS +#define EPT +#define EPU +#define EPV +#define EPW +#define EPX +#define EPY +#define EPZ +#define EQA +#define EQB +#define EQC +#define EQD +#define EQE +#define EQF +#define EQG +#define EQH +#define EQI +#define EQJ +#define EQK +#define EQL +#define EQM +#define EQN +#define EQO +#define EQP +#define EQQ +#define EQR +#define EQS +#define EQT +#define EQU +#define EQV +#define EQW +#define EQX +#define EQY +#define EQZ +#define ERA +#define ERB +#define ERC +#define ERD +#define ERE +#define ERF +#define ERG +#define ERH +#define ERI +#define ERJ +#define ERK +#define ERL +#define ERM +#define ERN +#define ERO +#define ERP +#define ERQ +#define ERR +#define ERS +#define ERT +#define ERU +#define ERV +#define ERW +#define ERX +#define ERY +#define ERZ +#define ESA +#define ESB +#define ESC +#define ESD +#define ESE +#define ESF +#define ESG +#define ESH +#define ESI +#define ESJ +#define ESK +#define ESL +#define ESM +#define ESN +#define ESO +#define ESP +#define ESQ +#define ESR +#define ESS +#define EST +#define ESU +#define ESV +#define ESW +#define ESX +#define ESY +#define ESZ +#define ETA +#define ETB +#define ETC +#define ETD +#define ETE +#define ETF +#define ETG +#define ETH +#define ETI +#define ETJ +#define ETK +#define ETL +#define ETM +#define ETN +#define ETO +#define ETP +#define ETQ +#define ETR +#define ETS +#define ETT +#define ETU +#define ETV +#define ETW +#define ETX +#define ETY +#define ETZ +#define EUA +#define EUB +#define EUC +#define EUD +#define EUE +#define EUF +#define EUG +#define EUH +#define EUI +#define EUJ +#define EUK +#define EUL +#define EUM +#define EUN +#define EUO +#define EUP +#define EUQ +#define EUR +#define EUS +#define EUT +#define EUU +#define EUV +#define EUW +#define EUX +#define EUY +#define EUZ +#define EVA +#define EVB +#define EVC +#define EVD +#define EVE +#define EVF +#define EVG +#define EVH +#define EVI +#define EVJ +#define EVK +#define EVL +#define EVM +#define EVN +#define EVO +#define EVP +#define EVQ +#define EVR +#define EVS +#define EVT +#define EVU +#define EVV +#define EVW +#define EVX +#define EVY +#define EVZ +#define EWA +#define EWB +#define EWC +#define EWD +#define EWE +#define EWF +#define EWG +#define EWH +#define EWI +#define EWJ +#define EWK +#define EWL +#define EWM +#define EWN +#define EWO +#define EWP +#define EWQ +#define EWR +#define EWS +#define EWT +#define EWU +#define EWV +#define EWW +#define EWX +#define EWY +#define EWZ +#define EXA +#define EXB +#define EXC +#define EXD +#define EXE +#define EXF +#define EXG +#define EXH +#define EXI +#define EXJ +#define EXK +#define EXL +#define EXM +#define EXN +#define EXO +#define EXP +#define EXQ +#define EXR +#define EXS +#define EXT +#define EXU +#define EXV +#define EXW +#define EXX +#define EXY +#define EXZ +#define EYA +#define EYB +#define EYC +#define EYD +#define EYE +#define EYF +#define EYG +#define EYH +#define EYI +#define EYJ +#define EYK +#define EYL +#define EYM +#define EYN +#define EYO +#define EYP +#define EYQ +#define EYR +#define EYS +#define EYT +#define EYU +#define EYV +#define EYW +#define EYX +#define EYY +#define EYZ +#define EZA +#define EZB +#define EZC +#define EZD +#define EZE +#define EZF +#define EZG +#define EZH +#define EZI +#define EZJ +#define EZK +#define EZL +#define EZM +#define EZN +#define EZO +#define EZP +#define EZQ +#define EZR +#define EZS +#define EZT +#define EZU +#define EZV +#define EZW +#define EZX +#define EZY +#define EZZ +#define FAA +#define FAB +#define FAC +#define FAD +#define FAE +#define FAF +#define FAG +#define FAH +#define FAI +#define FAJ +#define FAK +#define FAL +#define FAM +#define FAN +#define FAO +#define FAP +#define FAQ +#define FAR +#define FAS +#define FAT +#define FAU +#define FAV +#define FAW +#define FAX +#define FAY +#define FAZ +#define FBA +#define FBB +#define FBC +#define FBD +#define FBE +#define FBF +#define FBG +#define FBH +#define FBI +#define FBJ +#define FBK +#define FBL +#define FBM +#define FBN +#define FBO +#define FBP +#define FBQ +#define FBR +#define FBS +#define FBT +#define FBU +#define FBV +#define FBW +#define FBX +#define FBY +#define FBZ +#define FCA +#define FCB +#define FCC +#define FCD +#define FCE +#define FCF +#define FCG +#define FCH +#define FCI +#define FCJ +#define FCK +#define FCL +#define FCM +#define FCN +#define FCO +#define FCP +#define FCQ +#define FCR +#define FCS +#define FCT +#define FCU +#define FCV +#define FCW +#define FCX +#define FCY +#define FCZ +#define FDA +#define FDB +#define FDC +#define FDD +#define FDE +#define FDF +#define FDG +#define FDH +#define FDI +#define FDJ +#define FDK +#define FDL +#define FDM +#define FDN +#define FDO +#define FDP +#define FDQ +#define FDR +#define FDS +#define FDT +#define FDU +#define FDV +#define FDW +#define FDX +#define FDY +#define FDZ +#define FEA +#define FEB +#define FEC +#define FED +#define FEE +#define FEF +#define FEG +#define FEH +#define FEI +#define FEJ +#define FEK +#define FEL +#define FEM +#define FEN +#define FEO +#define FEP +#define FEQ +#define FER +#define FES +#define FET +#define FEU +#define FEV +#define FEW +#define FEX +#define FEY +#define FEZ +#define FFA +#define FFB +#define FFC +#define FFD +#define FFE +#define FFF +#define FFG +#define FFH +#define FFI +#define FFJ +#define FFK +#define FFL +#define FFM +#define FFN +#define FFO +#define FFP +#define FFQ +#define FFR +#define FFS +#define FFT +#define FFU +#define FFV +#define FFW +#define FFX +#define FFY +#define FFZ +#define FGA +#define FGB +#define FGC +#define FGD +#define FGE +#define FGF +#define FGG +#define FGH +#define FGI +#define FGJ +#define FGK +#define FGL +#define FGM +#define FGN +#define FGO +#define FGP +#define FGQ +#define FGR +#define FGS +#define FGT +#define FGU +#define FGV +#define FGW +#define FGX +#define FGY +#define FGZ +#define FHA +#define FHB +#define FHC +#define FHD +#define FHE +#define FHF +#define FHG +#define FHH +#define FHI +#define FHJ +#define FHK +#define FHL +#define FHM +#define FHN +#define FHO +#define FHP +#define FHQ +#define FHR +#define FHS +#define FHT +#define FHU +#define FHV +#define FHW +#define FHX +#define FHY +#define FHZ +#define FIA +#define FIB +#define FIC +#define FID +#define FIE +#define FIF +#define FIG +#define FIH +#define FII +#define FIJ +#define FIK +#define FIL +#define FIM +#define FIN +#define FIO +#define FIP +#define FIQ +#define FIR +#define FIS +#define FIT +#define FIU +#define FIV +#define FIW +#define FIX +#define FIY +#define FIZ +#define FJA +#define FJB +#define FJC +#define FJD +#define FJE +#define FJF +#define FJG +#define FJH +#define FJI +#define FJJ +#define FJK +#define FJL +#define FJM +#define FJN +#define FJO +#define FJP +#define FJQ +#define FJR +#define FJS +#define FJT +#define FJU +#define FJV +#define FJW +#define FJX +#define FJY +#define FJZ +#define FKA +#define FKB +#define FKC +#define FKD +#define FKE +#define FKF +#define FKG +#define FKH +#define FKI +#define FKJ +#define FKK +#define FKL +#define FKM +#define FKN +#define FKO +#define FKP +#define FKQ +#define FKR +#define FKS +#define FKT +#define FKU +#define FKV +#define FKW +#define FKX +#define FKY +#define FKZ +#define FLA +#define FLB +#define FLC +#define FLD +#define FLE +#define FLF +#define FLG +#define FLH +#define FLI +#define FLJ +#define FLK +#define FLL +#define FLM +#define FLN +#define FLO +#define FLP +#define FLQ +#define FLR +#define FLS +#define FLT +#define FLU +#define FLV +#define FLW +#define FLX +#define FLY +#define FLZ +#define FMA +#define FMB +#define FMC +#define FMD +#define FME +#define FMF +#define FMG +#define FMH +#define FMI +#define FMJ +#define FMK +#define FML +#define FMM +#define FMN +#define FMO +#define FMP +#define FMQ +#define FMR +#define FMS +#define FMT +#define FMU +#define FMV +#define FMW +#define FMX +#define FMY +#define FMZ +#define FNA +#define FNB +#define FNC +#define FND +#define FNE +#define FNF +#define FNG +#define FNH +#define FNI +#define FNJ +#define FNK +#define FNL +#define FNM +#define FNN +#define FNO +#define FNP +#define FNQ +#define FNR +#define FNS +#define FNT +#define FNU +#define FNV +#define FNW +#define FNX +#define FNY +#define FNZ +#define FOA +#define FOB +#define FOC +#define FOD +#define FOE +#define FOF +#define FOG +#define FOH +#define FOI +#define FOJ +#define FOK +#define FOL +#define FOM +#define FON +#define FOO +#define FOP +#define FOQ +#define FOR +#define FOS +#define FOT +#define FOU +#define FOV +#define FOW +#define FOX +#define FOY +#define FOZ +#define FPA +#define FPB +#define FPC +#define FPD +#define FPE +#define FPF +#define FPG +#define FPH +#define FPI +#define FPJ +#define FPK +#define FPL +#define FPM +#define FPN +#define FPO +#define FPP +#define FPQ +#define FPR +#define FPS +#define FPT +#define FPU +#define FPV +#define FPW +#define FPX +#define FPY +#define FPZ +#define FQA +#define FQB +#define FQC +#define FQD +#define FQE +#define FQF +#define FQG +#define FQH +#define FQI +#define FQJ +#define FQK +#define FQL +#define FQM +#define FQN +#define FQO +#define FQP +#define FQQ +#define FQR +#define FQS +#define FQT +#define FQU +#define FQV +#define FQW +#define FQX +#define FQY +#define FQZ +#define FRA +#define FRB +#define FRC +#define FRD +#define FRE +#define FRF +#define FRG +#define FRH +#define FRI +#define FRJ +#define FRK +#define FRL +#define FRM +#define FRN +#define FRO +#define FRP +#define FRQ +#define FRR +#define FRS +#define FRT +#define FRU +#define FRV +#define FRW +#define FRX +#define FRY +#define FRZ +#define FSA +#define FSB +#define FSC +#define FSD +#define FSE +#define FSF +#define FSG +#define FSH +#define FSI +#define FSJ +#define FSK +#define FSL +#define FSM +#define FSN +#define FSO +#define FSP +#define FSQ +#define FSR +#define FSS +#define FST +#define FSU +#define FSV +#define FSW +#define FSX +#define FSY +#define FSZ +#define FTA +#define FTB +#define FTC +#define FTD +#define FTE +#define FTF +#define FTG +#define FTH +#define FTI +#define FTJ +#define FTK +#define FTL +#define FTM +#define FTN +#define FTO +#define FTP +#define FTQ +#define FTR +#define FTS +#define FTT +#define FTU +#define FTV +#define FTW +#define FTX +#define FTY +#define FTZ +#define FUA +#define FUB +#define FUC +#define FUD +#define FUE +#define FUF +#define FUG +#define FUH +#define FUI +#define FUJ +#define FUK +#define FUL +#define FUM +#define FUN +#define FUO +#define FUP +#define FUQ +#define FUR +#define FUS +#define FUT +#define FUU +#define FUV +#define FUW +#define FUX +#define FUY +#define FUZ +#define FVA +#define FVB +#define FVC +#define FVD +#define FVE +#define FVF +#define FVG +#define FVH +#define FVI +#define FVJ +#define FVK +#define FVL +#define FVM +#define FVN +#define FVO +#define FVP +#define FVQ +#define FVR +#define FVS +#define FVT +#define FVU +#define FVV +#define FVW +#define FVX +#define FVY +#define FVZ +#define FWA +#define FWB +#define FWC +#define FWD +#define FWE +#define FWF +#define FWG +#define FWH +#define FWI +#define FWJ +#define FWK +#define FWL +#define FWM +#define FWN +#define FWO +#define FWP +#define FWQ +#define FWR +#define FWS +#define FWT +#define FWU +#define FWV +#define FWW +#define FWX +#define FWY +#define FWZ +#define FXA +#define FXB +#define FXC +#define FXD +#define FXE +#define FXF +#define FXG +#define FXH +#define FXI +#define FXJ +#define FXK +#define FXL +#define FXM +#define FXN +#define FXO +#define FXP +#define FXQ +#define FXR +#define FXS +#define FXT +#define FXU +#define FXV +#define FXW +#define FXX +#define FXY +#define FXZ +#define FYA +#define FYB +#define FYC +#define FYD +#define FYE +#define FYF +#define FYG +#define FYH +#define FYI +#define FYJ +#define FYK +#define FYL +#define FYM +#define FYN +#define FYO +#define FYP +#define FYQ +#define FYR +#define FYS +#define FYT +#define FYU +#define FYV +#define FYW +#define FYX +#define FYY +#define FYZ +#define FZA +#define FZB +#define FZC +#define FZD +#define FZE +#define FZF +#define FZG +#define FZH +#define FZI +#define FZJ +#define FZK +#define FZL +#define FZM +#define FZN +#define FZO +#define FZP +#define FZQ +#define FZR +#define FZS +#define FZT +#define FZU +#define FZV +#define FZW +#define FZX +#define FZY +#define FZZ +#define GAA +#define GAB +#define GAC +#define GAD +#define GAE +#define GAF +#define GAG +#define GAH +#define GAI +#define GAJ +#define GAK +#define GAL +#define GAM +#define GAN +#define GAO +#define GAP +#define GAQ +#define GAR +#define GAS +#define GAT +#define GAU +#define GAV +#define GAW +#define GAX +#define GAY +#define GAZ +#define GBA +#define GBB +#define GBC +#define GBD +#define GBE +#define GBF +#define GBG +#define GBH +#define GBI +#define GBJ +#define GBK +#define GBL +#define GBM 0x0fff +#ifndef X0FFF +#define GBN +#define GBO +#define GBP +#define GBQ +#define GBR +#define GBS +#define GBT +#define GBU +#define GBV +#define GBW +#define GBX +#define GBY +#define GBZ +#define GCA +#define GCB +#define GCC +#define GCD +#define GCE +#define GCF +#define GCG +#define GCH +#define GCI +#define GCJ +#define GCK +#define GCL +#define GCM +#define GCN +#define GCO +#define GCP +#define GCQ +#define GCR +#define GCS +#define GCT +#define GCU +#define GCV +#define GCW +#define GCX +#define GCY +#define GCZ +#define GDA +#define GDB +#define GDC +#define GDD +#define GDE +#define GDF +#define GDG +#define GDH +#define GDI +#define GDJ +#define GDK +#define GDL +#define GDM +#define GDN +#define GDO +#define GDP +#define GDQ +#define GDR +#define GDS +#define GDT +#define GDU +#define GDV +#define GDW +#define GDX +#define GDY +#define GDZ +#define GEA +#define GEB +#define GEC +#define GED +#define GEE +#define GEF +#define GEG +#define GEH +#define GEI +#define GEJ +#define GEK +#define GEL +#define GEM +#define GEN +#define GEO +#define GEP +#define GEQ +#define GER +#define GES +#define GET +#define GEU +#define GEV +#define GEW +#define GEX +#define GEY +#define GEZ +#define GFA +#define GFB +#define GFC +#define GFD +#define GFE +#define GFF +#define GFG +#define GFH +#define GFI +#define GFJ +#define GFK +#define GFL +#define GFM +#define GFN +#define GFO +#define GFP +#define GFQ +#define GFR +#define GFS +#define GFT +#define GFU +#define GFV +#define GFW +#define GFX +#define GFY +#define GFZ +#define GGA +#define GGB +#define GGC +#define GGD +#define GGE +#define GGF +#define GGG +#define GGH +#define GGI +#define GGJ +#define GGK +#define GGL +#define GGM +#define GGN +#define GGO +#define GGP +#define GGQ +#define GGR +#define GGS +#define GGT +#define GGU +#define GGV +#define GGW +#define GGX +#define GGY +#define GGZ +#define GHA +#define GHB +#define GHC +#define GHD +#define GHE +#define GHF +#define GHG +#define GHH +#define GHI +#define GHJ +#define GHK +#define GHL +#define GHM +#define GHN +#define GHO +#define GHP +#define GHQ +#define GHR +#define GHS +#define GHT +#define GHU +#define GHV +#define GHW +#define GHX +#define GHY +#define GHZ +#define GIA +#define GIB +#define GIC +#define GID +#define GIE +#define GIF +#define GIG +#define GIH +#define GII +#define GIJ +#define GIK +#define GIL +#define GIM +#define GIN +#define GIO +#define GIP +#define GIQ +#define GIR +#define GIS +#define GIT +#define GIU +#define GIV +#define GIW +#define GIX +#define GIY +#define GIZ +#define GJA +#define GJB +#define GJC +#define GJD +#define GJE +#define GJF +#define GJG +#define GJH +#define GJI +#define GJJ +#define GJK +#define GJL +#define GJM +#define GJN +#define GJO +#define GJP +#define GJQ +#define GJR +#define GJS +#define GJT +#define GJU +#define GJV +#define GJW +#define GJX +#define GJY +#define GJZ +#define GKA +#define GKB +#define GKC +#define GKD +#define GKE +#define GKF +#define GKG +#define GKH +#define GKI +#define GKJ +#define GKK +#define GKL +#define GKM +#define GKN +#define GKO +#define GKP +#define GKQ +#define GKR +#define GKS +#define GKT +#define GKU +#define GKV +#define GKW +#define GKX +#define GKY +#define GKZ +#define GLA +#define GLB +#define GLC +#define GLD +#define GLE +#define GLF +#define GLG +#define GLH +#define GLI +#define GLJ +#define GLK +#define GLL +#define GLM +#define GLN +#define GLO +#define GLP +#define GLQ +#define GLR +#define GLS +#define GLT +#define GLU +#define GLV +#define GLW +#define GLX +#define GLY +#define GLZ +#define GMA +#define GMB +#define GMC +#define GMD +#define GME +#define GMF +#define GMG +#define GMH +#define GMI +#define GMJ +#define GMK +#define GML +#define GMM +#define GMN +#define GMO +#define GMP +#define GMQ +#define GMR +#define GMS +#define GMT +#define GMU +#define GMV +#define GMW +#define GMX +#define GMY +#define GMZ +#define GNA +#define GNB +#define GNC +#define GND +#define GNE +#define GNF +#define GNG +#define GNH +#define GNI +#define GNJ +#define GNK +#define GNL +#define GNM +#define GNN +#define GNO +#define GNP +#define GNQ +#define GNR +#define GNS +#define GNT +#define GNU +#define GNV +#define GNW +#define GNX +#define GNY +#define GNZ +#define GOA +#define GOB +#define GOC +#define GOD +#define GOE +#define GOF +#define GOG +#define GOH +#define GOI +#define GOJ +#define GOK +#define GOL +#define GOM +#define GON +#define GOO +#define GOP +#define GOQ +#define GOR +#define GOS +#define GOT +#define GOU +#define GOV +#define GOW +#define GOX +#define GOY +#define GOZ +#define GPA +#define GPB +#define GPC +#define GPD +#define GPE +#define GPF +#define GPG +#define GPH +#define GPI +#define GPJ +#define GPK +#define GPL +#define GPM +#define GPN +#define GPO +#define GPP +#define GPQ +#define GPR +#define GPS +#define GPT +#define GPU +#define GPV +#define GPW +#define GPX +#define GPY +#define GPZ +#define GQA +#define GQB +#define GQC +#define GQD +#define GQE +#define GQF +#define GQG +#define GQH +#define GQI +#define GQJ +#define GQK +#define GQL +#define GQM +#define GQN +#define GQO +#define GQP +#define GQQ +#define GQR +#define GQS +#define GQT +#define GQU +#define GQV +#define GQW +#define GQX +#define GQY +#define GQZ +#define GRA +#define GRB +#define GRC +#define GRD +#define GRE +#define GRF +#define GRG +#define GRH +#define GRI +#define GRJ +#define GRK +#define GRL +#define GRM +#define GRN +#define GRO +#define GRP +#define GRQ +#define GRR +#define GRS +#define GRT +#define GRU +#define GRV +#define GRW +#define GRX +#define GRY +#define GRZ +#define GSA +#define GSB +#define GSC +#define GSD +#define GSE +#define GSF +#define GSG +#define GSH +#define GSI +#define GSJ +#define GSK +#define GSL +#define GSM +#define GSN +#define GSO +#define GSP +#define GSQ +#define GSR +#define GSS +#define GST +#define GSU +#define GSV +#define GSW +#define GSX +#define GSY +#define GSZ +#define GTA +#define GTB +#define GTC +#define GTD +#define GTE +#define GTF +#define GTG +#define GTH +#define GTI +#define GTJ +#define GTK +#define GTL +#define GTM +#define GTN +#define GTO +#define GTP +#define GTQ +#define GTR +#define GTS +#define GTT +#define GTU +#define GTV +#define GTW +#define GTX +#define GTY +#define GTZ +#define GUA +#define GUB +#define GUC +#define GUD +#define GUE +#define GUF +#define GUG +#define GUH +#define GUI +#define GUJ +#define GUK +#define GUL +#define GUM +#define GUN +#define GUO +#define GUP +#define GUQ +#define GUR +#define GUS +#define GUT +#define GUU +#define GUV +#define GUW +#define GUX +#define GUY +#define GUZ +#define GVA +#define GVB +#define GVC +#define GVD +#define GVE +#define GVF +#define GVG +#define GVH +#define GVI +#define GVJ +#define GVK +#define GVL +#define GVM +#define GVN +#define GVO +#define GVP +#define GVQ +#define GVR +#define GVS +#define GVT +#define GVU +#define GVV +#define GVW +#define GVX +#define GVY +#define GVZ +#define GWA +#define GWB +#define GWC +#define GWD +#define GWE +#define GWF +#define GWG +#define GWH +#define GWI +#define GWJ +#define GWK +#define GWL +#define GWM +#define GWN +#define GWO +#define GWP +#define GWQ +#define GWR +#define GWS +#define GWT +#define GWU +#define GWV +#define GWW +#define GWX +#define GWY +#define GWZ +#define GXA +#define GXB +#define GXC +#define GXD +#define GXE +#define GXF +#define GXG +#define GXH +#define GXI +#define GXJ +#define GXK +#define GXL +#define GXM +#define GXN +#define GXO +#define GXP +#define GXQ +#define GXR +#define GXS +#define GXT +#define GXU +#define GXV +#define GXW +#define GXX +#define GXY +#define GXZ +#define GYA +#define GYB +#define GYC +#define GYD +#define GYE +#define GYF +#define GYG +#define GYH +#define GYI +#define GYJ +#define GYK +#define GYL +#define GYM +#define GYN +#define GYO +#define GYP +#define GYQ +#define GYR +#define GYS +#define GYT +#define GYU +#define GYV +#define GYW +#define GYX +#define GYY +#define GYZ +#define GZA +#define GZB +#define GZC +#define GZD +#define GZE +#define GZF +#define GZG +#define GZH +#define GZI +#define GZJ +#define GZK +#define GZL +#define GZM +#define GZN +#define GZO +#define GZP +#define GZQ +#define GZR +#define GZS +#define GZT +#define GZU +#define GZV +#define GZW +#define GZX +#define GZY +#define GZZ +#define HAA +#define HAB +#define HAC +#define HAD +#define HAE +#define HAF +#define HAG +#define HAH +#define HAI +#define HAJ +#define HAK +#define HAL +#define HAM +#define HAN +#define HAO +#define HAP +#define HAQ +#define HAR +#define HAS +#define HAT +#define HAU +#define HAV +#define HAW +#define HAX +#define HAY +#define HAZ +#define HBA +#define HBB +#define HBC +#define HBD +#define HBE +#define HBF +#define HBG +#define HBH +#define HBI +#define HBJ +#define HBK +#define HBL +#define HBM +#define HBN +#define HBO +#define HBP +#define HBQ +#define HBR +#define HBS +#define HBT +#define HBU +#define HBV +#define HBW +#define HBX +#define HBY +#define HBZ +#define HCA +#define HCB +#define HCC +#define HCD +#define HCE +#define HCF +#define HCG +#define HCH +#define HCI +#define HCJ +#define HCK +#define HCL +#define HCM +#define HCN +#define HCO +#define HCP +#define HCQ +#define HCR +#define HCS +#define HCT +#define HCU +#define HCV +#define HCW +#define HCX +#define HCY +#define HCZ +#define HDA +#define HDB +#define HDC +#define HDD +#define HDE +#define HDF +#define HDG +#define HDH +#define HDI +#define HDJ +#define HDK +#define HDL +#define HDM +#define HDN +#define HDO +#define HDP +#define HDQ +#define HDR +#define HDS +#define HDT +#define HDU +#define HDV +#define HDW +#define HDX +#define HDY +#define HDZ +#define HEA +#define HEB +#define HEC +#define HED +#define HEE +#define HEF +#define HEG +#define HEH +#define HEI +#define HEJ +#define HEK +#define HEL +#define HEM +#define HEN +#define HEO +#define HEP +#define HEQ +#define HER +#define HES +#define HET +#define HEU +#define HEV +#define HEW +#define HEX +#define HEY +#define HEZ +#define HFA +#define HFB +#define HFC +#define HFD +#define HFE +#define HFF +#define HFG +#define HFH +#define HFI +#define HFJ +#define HFK +#define HFL +#define HFM +#define HFN +#define HFO +#define HFP +#define HFQ +#define HFR +#define HFS +#define HFT +#define HFU +#define HFV +#define HFW +#define HFX +#define HFY +#define HFZ +#define HGA +#define HGB +#define HGC +#define HGD +#define HGE +#define HGF +#define HGG +#define HGH +#define HGI +#define HGJ +#define HGK +#define HGL +#define HGM +#define HGN +#define HGO +#define HGP +#define HGQ +#define HGR +#define HGS +#define HGT +#define HGU +#define HGV +#define HGW +#define HGX +#define HGY +#define HGZ +#define HHA +#define HHB +#define HHC +#define HHD +#define HHE +#define HHF +#define HHG +#define HHH +#define HHI +#define HHJ +#define HHK +#define HHL +#define HHM +#define HHN +#define HHO +#define HHP +#define HHQ +#define HHR +#define HHS +#define HHT +#define HHU +#define HHV +#define HHW +#define HHX +#define HHY +#define HHZ +#define HIA +#define HIB +#define HIC +#define HID +#define HIE +#define HIF +#define HIG +#define HIH +#define HII +#define HIJ +#define HIK +#define HIL +#define HIM +#define HIN +#define HIO +#define HIP +#define HIQ +#define HIR +#define HIS +#define HIT +#define HIU +#define HIV +#define HIW +#define HIX +#define HIY +#define HIZ +#define HJA +#define HJB +#define HJC +#define HJD +#define HJE +#define HJF +#define HJG +#define HJH +#define HJI +#define HJJ +#define HJK +#define HJL +#define HJM +#define HJN +#define HJO +#define HJP +#define HJQ +#define HJR +#define HJS +#define HJT +#define HJU +#define HJV +#define HJW +#define HJX +#define HJY +#define HJZ +#define HKA +#define HKB +#define HKC +#define HKD +#define HKE +#define HKF +#define HKG +#define HKH +#define HKI +#define HKJ +#define HKK +#define HKL +#define HKM +#define HKN +#define HKO +#define HKP +#define HKQ +#define HKR +#define HKS +#define HKT +#define HKU +#define HKV +#define HKW +#define HKX +#define HKY +#define HKZ +#define HLA +#define HLB +#define HLC +#define HLD +#define HLE +#define HLF +#define HLG +#define HLH +#define HLI +#define HLJ +#define HLK +#define HLL +#define HLM +#define HLN +#define HLO +#define HLP +#define HLQ +#define HLR +#define HLS +#define HLT +#define HLU +#define HLV +#define HLW +#define HLX +#define HLY +#define HLZ +#define HMA +#define HMB +#define HMC +#define HMD +#define HME +#define HMF +#define HMG +#define HMH +#define HMI +#define HMJ +#define HMK +#define HML +#define HMM +#define HMN +#define HMO +#define HMP +#define HMQ +#define HMR +#define HMS +#define HMT +#define HMU +#define HMV +#define HMW +#define HMX +#define HMY +#define HMZ +#define HNA +#define HNB +#define HNC +#define HND +#define HNE +#define HNF +#define HNG +#define HNH +#define HNI +#define HNJ +#define HNK +#define HNL +#define HNM +#define HNN +#define HNO +#define HNP +#define HNQ +#define HNR +#define HNS +#define HNT +#define HNU +#define HNV +#define HNW +#define HNX +#define HNY +#define HNZ +#define HOA +#define HOB +#define HOC +#define HOD +#define HOE +#define HOF +#define HOG +#define HOH +#define HOI +#define HOJ +#define HOK +#define HOL +#define HOM +#define HON +#define HOO +#define HOP +#define HOQ +#define HOR +#define HOS +#define HOT +#define HOU +#define HOV +#define HOW +#define HOX +#define HOY +#define HOZ +#define HPA +#define HPB +#define HPC +#define HPD +#define HPE +#define HPF +#define HPG +#define HPH +#define HPI +#define HPJ +#define HPK +#define HPL +#define HPM +#define HPN +#define HPO +#define HPP +#define HPQ +#define HPR +#define HPS +#define HPT +#define HPU +#define HPV +#define HPW +#define HPX +#define HPY +#define HPZ +#define HQA +#define HQB +#define HQC +#define HQD +#define HQE +#define HQF +#define HQG +#define HQH +#define HQI +#define HQJ +#define HQK +#define HQL +#define HQM +#define HQN +#define HQO +#define HQP +#define HQQ +#define HQR +#define HQS +#define HQT +#define HQU +#define HQV +#define HQW +#define HQX +#define HQY +#define HQZ +#define HRA +#define HRB +#define HRC +#define HRD +#define HRE +#define HRF +#define HRG +#define HRH +#define HRI +#define HRJ +#define HRK +#define HRL +#define HRM +#define HRN +#define HRO +#define HRP +#define HRQ +#define HRR +#define HRS +#define HRT +#define HRU +#define HRV +#define HRW +#define HRX +#define HRY +#define HRZ +#define HSA +#define HSB +#define HSC +#define HSD +#define HSE +#define HSF +#define HSG +#define HSH +#define HSI +#define HSJ +#define HSK +#define HSL +#define HSM +#define HSN +#define HSO +#define HSP +#define HSQ +#define HSR +#define HSS +#define HST +#define HSU +#define HSV +#define HSW +#define HSX +#define HSY +#define HSZ +#define HTA +#define HTB +#define HTC +#define HTD +#define HTE +#define HTF +#define HTG +#define HTH +#define HTI +#define HTJ +#define HTK +#define HTL +#define HTM +#define HTN +#define HTO +#define HTP +#define HTQ +#define HTR +#define HTS +#define HTT +#define HTU +#define HTV +#define HTW +#define HTX +#define HTY +#define HTZ +#define HUA +#define HUB +#define HUC +#define HUD +#define HUE +#define HUF +#define HUG +#define HUH +#define HUI +#define HUJ +#define HUK +#define HUL +#define HUM +#define HUN +#define HUO +#define HUP +#define HUQ +#define HUR +#define HUS +#define HUT +#define HUU +#define HUV +#define HUW +#define HUX +#define HUY +#define HUZ +#define HVA +#define HVB +#define HVC +#define HVD +#define HVE +#define HVF +#define HVG +#define HVH +#define HVI +#define HVJ +#define HVK +#define HVL +#define HVM +#define HVN +#define HVO +#define HVP +#define HVQ +#define HVR +#define HVS +#define HVT +#define HVU +#define HVV +#define HVW +#define HVX +#define HVY +#define HVZ +#define HWA +#define HWB +#define HWC +#define HWD +#define HWE +#define HWF +#define HWG +#define HWH +#define HWI +#define HWJ +#define HWK +#define HWL +#define HWM +#define HWN +#define HWO +#define HWP +#define HWQ +#define HWR +#define HWS +#define HWT +#define HWU +#define HWV +#define HWW +#define HWX +#define HWY +#define HWZ +#define HXA +#define HXB +#define HXC +#define HXD +#define HXE +#define HXF +#define HXG +#define HXH +#define HXI +#define HXJ +#define HXK +#define HXL +#define HXM +#define HXN +#define HXO +#define HXP +#define HXQ +#define HXR +#define HXS +#define HXT +#define HXU +#define HXV +#define HXW +#define HXX +#define HXY +#define HXZ +#define HYA +#define HYB +#define HYC +#define HYD +#define HYE +#define HYF +#define HYG +#define HYH +#define HYI +#define HYJ +#define HYK +#define HYL +#define HYM +#define HYN +#define HYO +#define HYP +#define HYQ +#define HYR +#define HYS +#define HYT +#define HYU +#define HYV +#define HYW +#define HYX +#define HYY +#define HYZ +#define HZA +#define HZB +#define HZC +#define HZD +#define HZE +#define HZF +#define HZG +#define HZH +#define HZI +#define HZJ +#define HZK +#define HZL +#define HZM +#define HZN +#define HZO +#define HZP +#define HZQ +#define HZR +#define HZS +#define HZT +#define HZU +#define HZV +#define HZW +#define HZX +#define HZY +#define HZZ +#define IAA +#define IAB +#define IAC +#define IAD +#define IAE +#define IAF +#define IAG +#define IAH +#define IAI +#define IAJ +#define IAK +#define IAL +#define IAM +#define IAN +#define IAO +#define IAP +#define IAQ +#define IAR +#define IAS +#define IAT +#define IAU +#define IAV +#define IAW +#define IAX +#define IAY +#define IAZ +#define IBA +#define IBB +#define IBC +#define IBD +#define IBE +#define IBF +#define IBG +#define IBH +#define IBI +#define IBJ +#define IBK +#define IBL +#define IBM +#define IBN +#define IBO +#define IBP +#define IBQ +#define IBR +#define IBS +#define IBT +#define IBU +#define IBV +#define IBW +#define IBX +#define IBY +#define IBZ +#define ICA +#define ICB +#define ICC +#define ICD +#define ICE +#define ICF +#define ICG +#define ICH +#define ICI +#define ICJ +#define ICK +#define ICL +#define ICM +#define ICN +#define ICO +#define ICP +#define ICQ +#define ICR +#define ICS +#define ICT +#define ICU +#define ICV +#define ICW +#define ICX +#define ICY +#define ICZ +#define IDA +#define IDB +#define IDC +#define IDD +#define IDE +#define IDF +#define IDG +#define IDH +#define IDI +#define IDJ +#define IDK +#define IDL +#define IDM +#define IDN +#define IDO +#define IDP +#define IDQ +#define IDR +#define IDS +#define IDT +#define IDU +#define IDV +#define IDW +#define IDX +#define IDY +#define IDZ +#define IEA +#define IEB +#define IEC +#define IED +#define IEE +#define IEF +#define IEG +#define IEH +#define IEI +#define IEJ +#define IEK +#define IEL +#define IEM +#define IEN +#define IEO +#define IEP +#define IEQ +#define IER +#define IES +#define IET +#define IEU +#define IEV +#define IEW +#define IEX +#define IEY +#define IEZ +#define IFA +#define IFB +#define IFC +#define IFD +#define IFE +#define IFF +#define IFG +#define IFH +#define IFI +#define IFJ +#define IFK +#define IFL +#define IFM +#define IFN +#define IFO +#define IFP +#define IFQ +#define IFR +#define IFS +#define IFT +#define IFU +#define IFV +#define IFW +#define IFX +#define IFY +#define IFZ +#define IGA +#define IGB +#define IGC +#define IGD +#define IGE +#define IGF +#define IGG +#define IGH +#define IGI +#define IGJ +#define IGK +#define IGL +#define IGM +#define IGN +#define IGO +#define IGP +#define IGQ +#define IGR +#define IGS +#define IGT +#define IGU +#define IGV +#define IGW +#define IGX +#define IGY +#define IGZ +#define IHA +#define IHB +#define IHC +#define IHD +#define IHE +#define IHF +#define IHG +#define IHH +#define IHI +#define IHJ +#define IHK +#define IHL +#define IHM +#define IHN +#define IHO +#define IHP +#define IHQ +#define IHR +#define IHS +#define IHT +#define IHU +#define IHV +#define IHW +#define IHX +#define IHY +#define IHZ +#define IIA +#define IIB +#define IIC +#define IID +#define IIE +#define IIF +#define IIG +#define IIH +#define III +#define IIJ +#define IIK +#define IIL +#define IIM +#define IIN +#define IIO +#define IIP +#define IIQ +#define IIR +#define IIS +#define IIT +#define IIU +#define IIV +#define IIW +#define IIX +#define IIY +#define IIZ +#define IJA +#define IJB +#define IJC +#define IJD +#define IJE +#define IJF +#define IJG +#define IJH +#define IJI +#define IJJ +#define IJK +#define IJL +#define IJM +#define IJN +#define IJO +#define IJP +#define IJQ +#define IJR +#define IJS +#define IJT +#define IJU +#define IJV +#define IJW +#define IJX +#define IJY +#define IJZ +#define IKA +#define IKB +#define IKC +#define IKD +#define IKE +#define IKF +#define IKG +#define IKH +#define IKI +#define IKJ +#define IKK +#define IKL +#define IKM +#define IKN +#define IKO +#define IKP +#define IKQ +#define IKR +#define IKS +#define IKT +#define IKU +#define IKV +#define IKW +#define IKX +#define IKY +#define IKZ +#define ILA +#define ILB +#define ILC +#define ILD +#define ILE +#define ILF +#define ILG +#define ILH +#define ILI +#define ILJ +#define ILK +#define ILL +#define ILM +#define ILN +#define ILO +#define ILP +#define ILQ +#define ILR +#define ILS +#define ILT +#define ILU +#define ILV +#define ILW +#define ILX +#define ILY +#define ILZ +#define IMA +#define IMB +#define IMC +#define IMD +#define IME +#define IMF +#define IMG +#define IMH +#define IMI +#define IMJ +#define IMK +#define IML +#define IMM +#define IMN +#define IMO +#define IMP +#define IMQ +#define IMR +#define IMS +#define IMT +#define IMU +#define IMV +#define IMW +#define IMX +#define IMY +#define IMZ +#define INA +#define INB +#define INC +#define IND +#define INE +#define INF +#define ING +#define INH +#define INI +#define INJ +#define INK +#define INL +#define INM +#define INN +#define INO +#define INP +#define INQ +#define INR +#define INS +#define INT +#define INU +#define INV +#define INW +#define INX +#define INY +#define INZ +#define IOA +#define IOB +#define IOC +#define IOD +#define IOE +#define IOF +#define IOG +#define IOH +#define IOI +#define IOJ +#define IOK +#define IOL +#define IOM +#define ION +#define IOO +#define IOP +#define IOQ +#define IOR +#define IOS +#define IOT +#define IOU +#define IOV +#define IOW +#define IOX +#define IOY +#define IOZ +#define IPA +#define IPB +#define IPC +#define IPD +#define IPE +#define IPF +#define IPG +#define IPH +#define IPI +#define IPJ +#define IPK +#define IPL +#define IPM +#define IPN +#define IPO +#define IPP +#define IPQ +#define IPR +#define IPS +#define IPT +#define IPU +#define IPV +#define IPW +#define IPX +#define IPY +#define IPZ +#define IQA +#define IQB +#define IQC +#define IQD +#define IQE +#define IQF +#define IQG +#define IQH +#define IQI +#define IQJ +#define IQK +#define IQL +#define IQM +#define IQN +#define IQO +#define IQP +#define IQQ +#define IQR +#define IQS +#define IQT +#define IQU +#define IQV +#define IQW +#define IQX +#define IQY +#define IQZ +#define IRA +#define IRB +#define IRC +#define IRD +#define IRE +#define IRF +#define IRG +#define IRH +#define IRI +#define IRJ +#define IRK +#define IRL +#define IRM +#define IRN +#define IRO +#define IRP +#define IRQ +#define IRR +#define IRS +#define IRT +#define IRU +#define IRV +#define IRW +#define IRX +#define IRY +#define IRZ +#define ISA +#define ISB +#define ISC +#define ISD +#define ISE +#define ISF +#define ISG +#define ISH +#define ISI +#define ISJ +#define ISK +#define ISL +#define ISM +#define ISN +#define ISO +#define ISP +#define ISQ +#define ISR +#define ISS +#define IST +#define ISU +#define ISV +#define ISW +#define ISX +#define ISY +#define ISZ +#define ITA +#define ITB +#define ITC +#define ITD +#define ITE +#define ITF +#define ITG +#define ITH +#define ITI +#define ITJ +#define ITK +#define ITL +#define ITM +#define ITN +#define ITO +#define ITP +#define ITQ +#define ITR +#define ITS +#define ITT +#define ITU +#define ITV +#define ITW +#define ITX +#define ITY +#define ITZ +#define IUA +#define IUB +#define IUC +#define IUD +#define IUE +#define IUF +#define IUG +#define IUH +#define IUI +#define IUJ +#define IUK +#define IUL +#define IUM +#define IUN +#define IUO +#define IUP +#define IUQ +#define IUR +#define IUS +#define IUT +#define IUU +#define IUV +#define IUW +#define IUX +#define IUY +#define IUZ +#define IVA +#define IVB +#define IVC +#define IVD +#define IVE +#define IVF +#define IVG +#define IVH +#define IVI +#define IVJ +#define IVK +#define IVL +#define IVM +#define IVN +#define IVO +#define IVP +#define IVQ +#define IVR +#define IVS +#define IVT +#define IVU +#define IVV +#define IVW +#define IVX +#define IVY +#define IVZ +#define IWA +#define IWB +#define IWC +#define IWD +#define IWE +#define IWF +#define IWG +#define IWH +#define IWI +#define IWJ +#define IWK +#define IWL +#define IWM +#define IWN +#define IWO +#define IWP +#define IWQ +#define IWR +#define IWS +#define IWT +#define IWU +#define IWV +#define IWW +#define IWX +#define IWY +#define IWZ +#define IXA +#define IXB +#define IXC +#define IXD +#define IXE +#define IXF +#define IXG +#define IXH +#define IXI +#define IXJ +#define IXK +#define IXL +#define IXM +#define IXN +#define IXO +#define IXP +#define IXQ +#define IXR +#define IXS +#define IXT +#define IXU +#define IXV +#define IXW +#define IXX +#define IXY +#define IXZ +#define IYA +#define IYB +#define IYC +#define IYD +#define IYE +#define IYF +#define IYG +#define IYH +#define IYI +#define IYJ +#define IYK +#define IYL +#define IYM +#define IYN +#define IYO +#define IYP +#define IYQ +#define IYR +#define IYS +#define IYT +#define IYU +#define IYV +#define IYW +#define IYX +#define IYY +#define IYZ +#define IZA +#define IZB +#define IZC +#define IZD +#define IZE +#define IZF +#define IZG +#define IZH +#define IZI +#define IZJ +#define IZK +#define IZL +#define IZM +#define IZN +#define IZO +#define IZP +#define IZQ +#define IZR +#define IZS +#define IZT +#define IZU +#define IZV +#define IZW +#define IZX +#define IZY +#define IZZ +#define JAA +#define JAB +#define JAC +#define JAD +#define JAE +#define JAF +#define JAG +#define JAH +#define JAI +#define JAJ +#define JAK +#define JAL +#define JAM +#define JAN +#define JAO +#define JAP +#define JAQ +#define JAR +#define JAS +#define JAT +#define JAU +#define JAV +#define JAW +#define JAX +#define JAY +#define JAZ +#define JBA +#define JBB +#define JBC +#define JBD +#define JBE +#define JBF +#define JBG +#define JBH +#define JBI +#define JBJ +#define JBK +#define JBL +#define JBM +#define JBN +#define JBO +#define JBP +#define JBQ +#define JBR +#define JBS +#define JBT +#define JBU +#define JBV +#define JBW +#define JBX +#define JBY +#define JBZ +#define JCA +#define JCB +#define JCC +#define JCD +#define JCE +#define JCF +#define JCG +#define JCH +#define JCI +#define JCJ +#define JCK +#define JCL +#define JCM +#define JCN +#define JCO +#define JCP +#define JCQ +#define JCR +#define JCS +#define JCT +#define JCU +#define JCV +#define JCW +#define JCX +#define JCY +#define JCZ +#define JDA +#define JDB +#define JDC +#define JDD +#define JDE +#define JDF +#define JDG +#define JDH +#define JDI +#define JDJ +#define JDK +#define JDL +#define JDM +#define JDN +#define JDO +#define JDP +#define JDQ +#define JDR +#define JDS +#define JDT +#define JDU +#define JDV +#define JDW +#define JDX +#define JDY +#define JDZ +#define JEA +#define JEB +#define JEC +#define JED +#define JEE +#define JEF +#define JEG +#define JEH +#define JEI +#define JEJ +#define JEK +#define JEL +#define JEM +#define JEN +#define JEO +#define JEP +#define JEQ +#define JER +#define JES +#define JET +#define JEU +#define JEV +#define JEW +#define JEX +#define JEY +#define JEZ +#define JFA +#define JFB +#define JFC +#define JFD +#define JFE +#define JFF +#define JFG +#define JFH +#define JFI +#define JFJ +#define JFK +#define JFL +#define JFM +#define JFN +#define JFO +#define JFP +#define JFQ +#define JFR +#define JFS +#define JFT +#define JFU +#define JFV +#define JFW +#define JFX +#define JFY +#define JFZ +#define JGA +#define JGB +#define JGC +#define JGD +#define JGE +#define JGF +#define JGG +#define JGH +#define JGI +#define JGJ +#define JGK +#define JGL +#define JGM +#define JGN +#define JGO +#define JGP +#define JGQ +#define JGR +#define JGS +#define JGT +#define JGU +#define JGV +#define JGW +#define JGX +#define JGY +#define JGZ +#define JHA +#define JHB +#define JHC +#define JHD +#define JHE +#define JHF +#define JHG +#define JHH +#define JHI +#define JHJ +#define JHK +#define JHL +#define JHM +#define JHN +#define JHO +#define JHP +#define JHQ +#define JHR +#define JHS +#define JHT +#define JHU +#define JHV +#define JHW +#define JHX +#define JHY +#define JHZ +#define JIA +#define JIB +#define JIC +#define JID +#define JIE +#define JIF +#define JIG +#define JIH +#define JII +#define JIJ +#define JIK +#define JIL +#define JIM +#define JIN +#define JIO +#define JIP +#define JIQ +#define JIR +#define JIS +#define JIT +#define JIU +#define JIV +#define JIW +#define JIX +#define JIY +#define JIZ +#define JJA +#define JJB +#define JJC +#define JJD +#define JJE +#define JJF +#define JJG +#define JJH +#define JJI +#define JJJ +#define JJK +#define JJL +#define JJM +#define JJN +#define JJO +#define JJP +#define JJQ +#define JJR +#define JJS +#define JJT +#define JJU +#define JJV +#define JJW +#define JJX +#define JJY +#define JJZ +#define JKA +#define JKB +#define JKC +#define JKD +#define JKE +#define JKF +#define JKG +#define JKH +#define JKI +#define JKJ +#define JKK +#define JKL +#define JKM +#define JKN +#define JKO +#define JKP +#define JKQ +#define JKR +#define JKS +#define JKT +#define JKU +#define JKV +#define JKW +#define JKX +#define JKY +#define JKZ +#define JLA +#define JLB +#define JLC +#define JLD +#define JLE +#define JLF +#define JLG +#define JLH +#define JLI +#define JLJ +#define JLK +#define JLL +#define JLM +#define JLN +#define JLO +#define JLP +#define JLQ +#define JLR +#define JLS +#define JLT +#define JLU +#define JLV +#define JLW +#define JLX +#define JLY +#define JLZ +#define JMA +#define JMB +#define JMC +#define JMD +#define JME +#define JMF +#define JMG +#define JMH +#define JMI +#define JMJ +#define JMK +#define JML +#define JMM +#define JMN +#define JMO +#define JMP +#define JMQ +#define JMR +#define JMS +#define JMT +#define JMU +#define JMV +#define JMW +#define JMX +#define JMY +#define JMZ +#define JNA +#define JNB +#define JNC +#define JND +#define JNE +#define JNF +#define JNG +#define JNH +#define JNI +#define JNJ +#define JNK +#define JNL +#define JNM +#define JNN +#define JNO +#define JNP +#define JNQ +#define JNR +#define JNS +#define JNT +#define JNU +#define JNV +#define JNW +#define JNX +#define JNY +#define JNZ +#define JOA +#define JOB +#define JOC +#define JOD +#define JOE +#define JOF +#define JOG +#define JOH +#define JOI +#define JOJ +#define JOK +#define JOL +#define JOM +#define JON +#define JOO +#define JOP +#define JOQ +#define JOR +#define JOS +#define JOT +#define JOU +#define JOV +#define JOW +#define JOX +#define JOY +#define JOZ +#define JPA +#define JPB +#define JPC +#define JPD +#define JPE +#define JPF +#define JPG +#define JPH +#define JPI +#define JPJ +#define JPK +#define JPL +#define JPM +#define JPN +#define JPO +#define JPP +#define JPQ +#define JPR +#define JPS +#define JPT +#define JPU +#define JPV +#define JPW +#define JPX +#define JPY +#define JPZ +#define JQA +#define JQB +#define JQC +#define JQD +#define JQE +#define JQF +#define JQG +#define JQH +#define JQI +#define JQJ +#define JQK +#define JQL +#define JQM +#define JQN +#define JQO +#define JQP +#define JQQ +#define JQR +#define JQS +#define JQT +#define JQU +#define JQV +#define JQW +#define JQX +#define JQY +#define JQZ +#define JRA +#define JRB +#define JRC +#define JRD +#define JRE +#define JRF +#define JRG +#define JRH +#define JRI +#define JRJ +#define JRK +#define JRL +#define JRM +#define JRN +#define JRO +#define JRP +#define JRQ +#define JRR +#define JRS +#define JRT +#define JRU +#define JRV +#define JRW +#define JRX +#define JRY +#define JRZ +#define JSA +#define JSB +#define JSC +#define JSD +#define JSE +#define JSF +#define JSG +#define JSH +#define JSI +#define JSJ +#define JSK +#define JSL +#define JSM +#define JSN +#define JSO +#define JSP +#define JSQ +#define JSR +#define JSS +#define JST +#define JSU +#define JSV +#define JSW +#define JSX +#define JSY +#define JSZ +#define JTA +#define JTB +#define JTC +#define JTD +#define JTE +#define JTF +#define JTG +#define JTH +#define JTI +#define JTJ +#define JTK +#define JTL +#define JTM +#define JTN +#define JTO +#define JTP +#define JTQ +#define JTR +#define JTS +#define JTT +#define JTU +#define JTV +#define JTW +#define JTX +#define JTY +#define JTZ +#define JUA +#define JUB +#define JUC +#define JUD +#define JUE +#define JUF +#define JUG +#define JUH +#define JUI +#define JUJ +#define JUK +#define JUL +#define JUM +#define JUN +#define JUO +#define JUP +#define JUQ +#define JUR +#define JUS +#define JUT +#define JUU +#define JUV +#define JUW +#define JUX +#define JUY +#define JUZ +#define JVA +#define JVB +#define JVC +#define JVD +#define JVE +#define JVF +#define JVG +#define JVH +#define JVI +#define JVJ +#define JVK +#define JVL +#define JVM +#define JVN +#define JVO +#define JVP +#define JVQ +#define JVR +#define JVS +#define JVT +#define JVU +#define JVV +#define JVW +#define JVX +#define JVY +#define JVZ +#define JWA +#define JWB +#define JWC +#define JWD +#define JWE +#define JWF +#define JWG +#define JWH +#define JWI +#define JWJ +#define JWK +#define JWL +#define JWM +#define JWN +#define JWO +#define JWP +#define JWQ +#define JWR +#define JWS +#define JWT +#define JWU +#define JWV +#define JWW +#define JWX +#define JWY +#define JWZ +#define JXA +#define JXB +#define JXC +#define JXD +#define JXE +#define JXF +#define JXG +#define JXH +#define JXI +#define JXJ +#define JXK +#define JXL +#define JXM +#define JXN +#define JXO +#define JXP +#define JXQ +#define JXR +#define JXS +#define JXT +#define JXU +#define JXV +#define JXW +#define JXX +#define JXY +#define JXZ +#define JYA +#define JYB +#define JYC +#define JYD +#define JYE +#define JYF +#define JYG +#define JYH +#define JYI +#define JYJ +#define JYK +#define JYL +#define JYM +#define JYN +#define JYO +#define JYP +#define JYQ +#define JYR +#define JYS +#define JYT +#define JYU +#define JYV +#define JYW +#define JYX +#define JYY +#define JYZ +#define JZA +#define JZB +#define JZC +#define JZD +#define JZE +#define JZF +#define JZG +#define JZH +#define JZI +#define JZJ +#define JZK +#define JZL +#define JZM +#define JZN +#define JZO +#define JZP +#define JZQ +#define JZR +#define JZS +#define JZT +#define JZU +#define JZV +#define JZW +#define JZX +#define JZY +#define JZZ +#define KAA +#define KAB +#define KAC +#define KAD +#define KAE +#define KAF +#define KAG +#define KAH +#define KAI +#define KAJ +#define KAK +#define KAL +#define KAM +#define KAN +#define KAO +#define KAP +#define KAQ +#define KAR +#define KAS +#define KAT +#define KAU +#define KAV +#define KAW +#define KAX +#define KAY +#define KAZ +#define KBA +#define KBB +#define KBC +#define KBD +#define KBE +#define KBF +#define KBG +#define KBH +#define KBI +#define KBJ +#define KBK +#define KBL +#define KBM +#define KBN +#define KBO +#define KBP +#define KBQ +#define KBR +#define KBS +#define KBT +#define KBU +#define KBV +#define KBW +#define KBX +#define KBY +#define KBZ +#define KCA +#define KCB +#define KCC +#define KCD +#define KCE +#define KCF +#define KCG +#define KCH +#define KCI +#define KCJ +#define KCK +#define KCL +#define KCM +#define KCN +#define KCO +#define KCP +#define KCQ +#define KCR +#define KCS +#define KCT +#define KCU +#define KCV +#define KCW +#define KCX +#define KCY +#define KCZ +#define KDA +#define KDB +#define KDC +#define KDD +#define KDE +#define KDF +#define KDG +#define KDH +#define KDI +#define KDJ +#define KDK +#define KDL +#define KDM +#define KDN +#define KDO +#define KDP +#define KDQ +#define KDR +#define KDS +#define KDT +#define KDU +#define KDV +#define KDW +#define KDX +#define KDY +#define KDZ +#define KEA +#define KEB +#define KEC +#define KED +#define KEE +#define KEF +#define KEG +#define KEH +#define KEI +#define KEJ +#define KEK +#define KEL +#define KEM +#define KEN +#define KEO +#define KEP +#define KEQ +#define KER +#define KES +#define KET +#define KEU +#define KEV +#define KEW +#define KEX +#define KEY +#define KEZ +#define KFA +#define KFB +#define KFC +#define KFD +#define KFE +#define KFF +#define KFG +#define KFH +#define KFI +#define KFJ +#define KFK +#define KFL +#define KFM +#define KFN +#define KFO +#define KFP +#define KFQ +#define KFR +#define KFS +#define KFT +#define KFU +#define KFV +#define KFW +#define KFX +#define KFY +#define KFZ +#define KGA +#define KGB +#define KGC +#define KGD +#define KGE +#define KGF +#define KGG +#define KGH +#define KGI +#define KGJ +#define KGK +#define KGL +#define KGM +#define KGN +#define KGO +#define KGP +#define KGQ +#define KGR +#define KGS +#define KGT +#define KGU +#define KGV +#define KGW +#define KGX +#define KGY +#define KGZ +#define KHA +#define KHB +#define KHC +#define KHD +#define KHE +#define KHF +#define KHG +#define KHH +#define KHI +#define KHJ +#define KHK +#define KHL +#define KHM +#define KHN +#define KHO +#define KHP +#define KHQ +#define KHR +#define KHS +#define KHT +#define KHU +#define KHV +#define KHW +#define KHX +#define KHY +#define KHZ +#define KIA +#define KIB +#define KIC +#define KID +#define KIE +#define KIF +#define KIG +#define KIH +#define KII +#define KIJ +#define KIK +#define KIL +#define KIM +#define KIN +#define KIO +#define KIP +#define KIQ +#define KIR +#define KIS +#define KIT +#define KIU +#define KIV +#define KIW +#define KIX +#define KIY +#define KIZ +#define KJA +#define KJB +#define KJC +#define KJD +#define KJE +#define KJF +#define KJG +#define KJH +#define KJI +#define KJJ +#define KJK +#define KJL +#define KJM +#define KJN +#define KJO +#define KJP +#define KJQ +#define KJR +#define KJS +#define KJT +#define KJU +#define KJV +#define KJW +#define KJX +#define KJY +#define KJZ +#define KKA +#define KKB +#define KKC +#define KKD +#define KKE +#define KKF +#define KKG +#define KKH +#define KKI +#define KKJ +#define KKK +#define KKL +#define KKM +#define KKN +#define KKO +#define KKP +#define KKQ +#define KKR +#define KKS +#define KKT +#define KKU +#define KKV +#define KKW +#define KKX +#define KKY +#define KKZ +#define KLA +#define KLB +#define KLC +#define KLD +#define KLE +#define KLF +#define KLG +#define KLH +#define KLI +#define KLJ +#define KLK +#define KLL +#define KLM +#define KLN +#define KLO +#define KLP +#define KLQ +#define KLR +#define KLS +#define KLT +#define KLU +#define KLV +#define KLW +#define KLX +#define KLY +#define KLZ +#define KMA +#define KMB +#define KMC +#define KMD +#define KME +#define KMF +#define KMG +#define KMH +#define KMI +#define KMJ +#define KMK +#define KML +#define KMM +#define KMN +#define KMO +#define KMP +#define KMQ +#define KMR +#define KMS +#define KMT +#define KMU +#define KMV +#define KMW +#define KMX +#define KMY +#define KMZ +#define KNA +#define KNB +#define KNC +#define KND +#define KNE +#define KNF +#define KNG +#define KNH +#define KNI +#define KNJ +#define KNK +#define KNL +#define KNM +#define KNN +#define KNO +#define KNP +#define KNQ +#define KNR +#define KNS +#define KNT +#define KNU +#define KNV +#define KNW +#define KNX +#define KNY +#define KNZ +#define KOA +#define KOB +#define KOC +#define KOD +#define KOE +#define KOF +#define KOG +#define KOH +#define KOI +#define KOJ +#define KOK +#define KOL +#define KOM +#define KON +#define KOO +#define KOP +#define KOQ +#define KOR +#define KOS +#define KOT +#define KOU +#define KOV +#define KOW +#define KOX +#define KOY +#define KOZ +#define KPA +#define KPB +#define KPC +#define KPD +#define KPE +#define KPF +#define KPG +#define KPH +#define KPI +#define KPJ +#define KPK +#define KPL +#define KPM +#define KPN +#define KPO +#define KPP +#define KPQ +#define KPR +#define KPS +#define KPT +#define KPU +#define KPV +#define KPW +#define KPX +#define KPY +#define KPZ +#define KQA +#define KQB +#define KQC +#define KQD +#define KQE +#define KQF +#define KQG +#define KQH +#define KQI +#define KQJ +#define KQK +#define KQL +#define KQM +#define KQN +#define KQO +#define KQP +#define KQQ +#define KQR +#define KQS +#define KQT +#define KQU +#define KQV +#define KQW +#define KQX +#define KQY +#define KQZ +#define KRA +#define KRB +#define KRC +#define KRD +#define KRE +#define KRF +#define KRG +#define KRH +#define KRI +#define KRJ +#define KRK +#define KRL +#define KRM +#define KRN +#define KRO +#define KRP +#define KRQ +#define KRR +#define KRS +#define KRT +#define KRU +#define KRV +#define KRW +#define KRX +#define KRY +#define KRZ +#define KSA +#define KSB +#define KSC +#define KSD +#define KSE +#define KSF +#define KSG +#define KSH +#define KSI +#define KSJ +#define KSK +#define KSL +#define KSM +#define KSN +#define KSO +#define KSP +#define KSQ +#define KSR +#define KSS +#define KST +#define KSU +#define KSV +#define KSW +#define KSX +#define KSY +#define KSZ +#define KTA +#define KTB +#define KTC +#define KTD +#define KTE +#define KTF +#define KTG +#define KTH +#define KTI +#define KTJ +#define KTK +#define KTL +#define KTM +#define KTN +#define KTO +#define KTP +#define KTQ +#define KTR +#define KTS +#define KTT +#define KTU +#define KTV +#define KTW +#define KTX +#define KTY +#define KTZ +#define KUA +#define KUB +#define KUC +#define KUD +#define KUE +#define KUF +#define KUG +#define KUH +#define KUI +#define KUJ +#define KUK +#define KUL +#define KUM +#define KUN +#define KUO +#define KUP +#define KUQ +#define KUR +#define KUS +#define KUT +#define KUU +#define KUV +#define KUW +#define KUX +#define KUY +#define KUZ +#define KVA +#define KVB +#define KVC +#define KVD +#define KVE +#define KVF +#define KVG +#define KVH +#define KVI +#define KVJ +#define KVK +#define KVL +#define KVM +#define KVN +#define KVO +#define KVP +#define KVQ +#define KVR +#define KVS +#define KVT +#define KVU +#define KVV +#define KVW +#define KVX +#define KVY +#define KVZ +#define KWA +#define KWB +#define KWC +#define KWD +#define KWE +#define KWF +#define KWG +#define KWH +#define KWI +#define KWJ +#define KWK +#define KWL +#define KWM +#define KWN +#define KWO +#define KWP +#define KWQ +#define KWR +#define KWS +#define KWT +#define KWU +#define KWV +#define KWW +#define KWX +#define KWY +#define KWZ +#define KXA +#define KXB +#define KXC +#define KXD +#define KXE +#define KXF +#define KXG +#define KXH +#define KXI +#define KXJ +#define KXK +#define KXL +#define KXM +#define KXN +#define KXO +#define KXP +#define KXQ +#define KXR +#define KXS +#define KXT +#define KXU +#define KXV +#define KXW +#define KXX +#define KXY +#define KXZ +#define KYA +#define KYB +#define KYC +#define KYD +#define KYE +#define KYF +#define KYG +#define KYH +#define KYI +#define KYJ +#define KYK +#define KYL +#define KYM +#define KYN +#define KYO +#define KYP +#define KYQ +#define KYR +#define KYS +#define KYT +#define KYU +#define KYV +#define KYW +#define KYX +#define KYY +#define KYZ +#define KZA +#define KZB +#define KZC +#define KZD +#define KZE +#define KZF +#define KZG +#define KZH +#define KZI +#define KZJ +#define KZK +#define KZL +#define KZM +#define KZN +#define KZO +#define KZP +#define KZQ +#define KZR +#define KZS +#define KZT +#define KZU +#define KZV +#define KZW +#define KZX +#define KZY +#define KZZ +#define LAA +#define LAB +#define LAC +#define LAD +#define LAE +#define LAF +#define LAG +#define LAH +#define LAI +#define LAJ +#define LAK +#define LAL +#define LAM +#define LAN +#define LAO +#define LAP +#define LAQ +#define LAR +#define LAS +#define LAT +#define LAU +#define LAV +#define LAW +#define LAX +#define LAY +#define LAZ +#define LBA +#define LBB +#define LBC +#define LBD +#define LBE +#define LBF +#define LBG +#define LBH +#define LBI +#define LBJ +#define LBK +#define LBL +#define LBM +#define LBN +#define LBO +#define LBP +#define LBQ +#define LBR +#define LBS +#define LBT +#define LBU +#define LBV +#define LBW +#define LBX +#define LBY +#define LBZ +#define LCA +#define LCB +#define LCC +#define LCD +#define LCE +#define LCF +#define LCG +#define LCH +#define LCI +#define LCJ +#define LCK +#define LCL +#define LCM +#define LCN +#define LCO +#define LCP +#define LCQ +#define LCR +#define LCS +#define LCT +#define LCU +#define LCV +#define LCW +#define LCX +#define LCY +#define LCZ +#define LDA +#define LDB +#define LDC +#define LDD +#define LDE +#define LDF +#define LDG +#define LDH +#define LDI +#define LDJ +#define LDK +#define LDL +#define LDM +#define LDN +#define LDO +#define LDP +#define LDQ +#define LDR +#define LDS +#define LDT +#define LDU +#define LDV +#define LDW +#define LDX +#define LDY +#define LDZ +#define LEA +#define LEB +#define LEC +#define LED +#define LEE +#define LEF +#define LEG +#define LEH +#define LEI +#define LEJ +#define LEK +#define LEL +#define LEM +#define LEN +#define LEO +#define LEP +#define LEQ +#define LER +#define LES +#define LET +#define LEU +#define LEV +#define LEW +#define LEX +#define LEY +#define LEZ +#define LFA +#define LFB +#define LFC +#define LFD +#define LFE +#define LFF +#define LFG +#define LFH +#define LFI +#define LFJ +#define LFK +#define LFL +#define LFM +#define LFN +#define LFO +#define LFP +#define LFQ +#define LFR +#define LFS +#define LFT +#define LFU +#define LFV +#define LFW +#define LFX +#define LFY +#define LFZ +#define LGA +#define LGB +#define LGC +#define LGD +#define LGE +#define LGF +#define LGG +#define LGH +#define LGI +#define LGJ +#define LGK +#define LGL +#define LGM +#define LGN +#define LGO +#define LGP +#define LGQ +#define LGR +#define LGS +#define LGT +#define LGU +#define LGV +#define LGW +#define LGX +#define LGY +#define LGZ +#define LHA +#define LHB +#define LHC +#define LHD +#define LHE +#define LHF +#define LHG +#define LHH +#define LHI +#define LHJ +#define LHK +#define LHL +#define LHM +#define LHN +#define LHO +#define LHP +#define LHQ +#define LHR +#define LHS +#define LHT +#define LHU +#define LHV +#define LHW +#define LHX +#define LHY +#define LHZ +#define LIA +#define LIB +#define LIC +#define LID +#define LIE +#define LIF +#define LIG +#define LIH +#define LII +#define LIJ +#define LIK +#define LIL +#define LIM +#define LIN +#define LIO +#define LIP +#define LIQ +#define LIR +#define LIS +#define LIT +#define LIU +#define LIV +#define LIW +#define LIX +#define LIY +#define LIZ +#define LJA +#define LJB +#define LJC +#define LJD +#define LJE +#define LJF +#define LJG +#define LJH +#define LJI +#define LJJ +#define LJK +#define LJL +#define LJM +#define LJN +#define LJO +#define LJP +#define LJQ +#define LJR +#define LJS +#define LJT +#define LJU +#define LJV +#define LJW +#define LJX +#define LJY +#define LJZ +#define LKA +#define LKB +#define LKC +#define LKD +#define LKE +#define LKF +#define LKG +#define LKH +#define LKI +#define LKJ +#define LKK +#define LKL +#define LKM +#define LKN +#define LKO +#define LKP +#define LKQ +#define LKR +#define LKS +#define LKT +#define LKU +#define LKV +#define LKW +#define LKX +#define LKY +#define LKZ +#define LLA +#define LLB +#define LLC +#define LLD +#define LLE +#define LLF +#define LLG +#define LLH +#define LLI +#define LLJ +#define LLK +#define LLL +#define LLM +#define LLN +#define LLO +#define LLP +#define LLQ +#define LLR +#define LLS +#define LLT +#define LLU +#define LLV +#define LLW +#define LLX +#define LLY +#define LLZ +#define LMA +#define LMB +#define LMC +#define LMD +#define LME +#define LMF +#define LMG +#define LMH +#define LMI +#define LMJ +#define LMK +#define LML +#define LMM +#define LMN +#define LMO +#define LMP +#define LMQ +#define LMR +#define LMS +#define LMT +#define LMU +#define LMV +#define LMW +#define LMX +#define LMY +#define LMZ +#define LNA +#define LNB +#define LNC +#define LND +#define LNE +#define LNF +#define LNG +#define LNH +#define LNI +#define LNJ +#define LNK +#define LNL +#define LNM +#define LNN +#define LNO +#define LNP +#define LNQ +#define LNR +#define LNS +#define LNT +#define LNU +#define LNV +#define LNW +#define LNX +#define LNY +#define LNZ +#define LOA +#define LOB +#define LOC +#define LOD +#define LOE +#define LOF +#define LOG +#define LOH +#define LOI +#define LOJ +#define LOK +#define LOL +#define LOM +#define LON +#define LOO +#define LOP +#define LOQ +#define LOR +#define LOS +#define LOT +#define LOU +#define LOV +#define LOW +#define LOX +#define LOY +#define LOZ +#define LPA +#define LPB +#define LPC +#define LPD +#define LPE +#define LPF +#define LPG +#define LPH +#define LPI +#define LPJ +#define LPK +#define LPL +#define LPM +#define LPN +#define LPO +#define LPP +#define LPQ +#define LPR +#define LPS +#define LPT +#define LPU +#define LPV +#define LPW +#define LPX +#define LPY +#define LPZ +#define LQA +#define LQB +#define LQC +#define LQD +#define LQE +#define LQF +#define LQG +#define LQH +#define LQI +#define LQJ +#define LQK +#define LQL +#define LQM +#define LQN +#define LQO +#define LQP +#define LQQ +#define LQR +#define LQS +#define LQT +#define LQU +#define LQV +#define LQW +#define LQX +#define LQY +#define LQZ +#define LRA +#define LRB +#define LRC +#define LRD +#define LRE +#define LRF +#define LRG +#define LRH +#define LRI +#define LRJ +#define LRK +#define LRL +#define LRM +#define LRN +#define LRO +#define LRP +#define LRQ +#define LRR +#define LRS +#define LRT +#define LRU +#define LRV +#define LRW +#define LRX +#define LRY +#define LRZ +#define LSA +#define LSB +#define LSC +#define LSD +#define LSE +#define LSF +#define LSG +#define LSH +#define LSI +#define LSJ +#define LSK +#define LSL +#define LSM +#define LSN +#define LSO +#define LSP +#define LSQ +#define LSR +#define LSS +#define LST +#define LSU +#define LSV +#define LSW +#define LSX +#define LSY +#define LSZ +#define LTA +#define LTB +#define LTC +#define LTD +#define LTE +#define LTF +#define LTG +#define LTH +#define LTI +#define LTJ +#define LTK +#define LTL +#define LTM +#define LTN +#define LTO +#define LTP +#define LTQ +#define LTR +#define LTS +#define LTT +#define LTU +#define LTV +#define LTW +#define LTX +#define LTY +#define LTZ +#define LUA +#define LUB +#define LUC +#define LUD +#define LUE +#define LUF +#define LUG +#define LUH +#define LUI +#define LUJ +#define LUK +#define LUL +#define LUM +#define LUN +#define LUO +#define LUP +#define LUQ +#define LUR +#define LUS +#define LUT +#define LUU +#define LUV +#define LUW +#define LUX +#define LUY +#define LUZ +#define LVA +#define LVB +#define LVC +#define LVD +#define LVE +#define LVF +#define LVG +#define LVH +#define LVI +#define LVJ +#define LVK +#define LVL +#define LVM +#define LVN +#define LVO +#define LVP +#define LVQ +#define LVR +#define LVS +#define LVT +#define LVU +#define LVV +#define LVW +#define LVX +#define LVY +#define LVZ +#define LWA +#define LWB +#define LWC +#define LWD +#define LWE +#define LWF +#define LWG +#define LWH +#define LWI +#define LWJ +#define LWK +#define LWL +#define LWM +#define LWN +#define LWO +#define LWP +#define LWQ +#define LWR +#define LWS +#define LWT +#define LWU +#define LWV +#define LWW +#define LWX +#define LWY +#define LWZ +#define LXA +#define LXB +#define LXC +#define LXD +#define LXE +#define LXF +#define LXG +#define LXH +#define LXI +#define LXJ +#define LXK +#define LXL +#define LXM +#define LXN +#define LXO +#define LXP +#define LXQ +#define LXR +#define LXS +#define LXT +#define LXU +#define LXV +#define LXW +#define LXX +#define LXY +#define LXZ +#define LYA +#define LYB +#define LYC +#define LYD +#define LYE +#define LYF +#define LYG +#define LYH +#define LYI +#define LYJ +#define LYK +#define LYL +#define LYM +#define LYN +#define LYO +#define LYP +#define LYQ +#define LYR +#define LYS +#define LYT +#define LYU +#define LYV +#define LYW +#define LYX +#define LYY +#define LYZ +#define LZA +#define LZB +#define LZC +#define LZD +#define LZE +#define LZF +#define LZG +#define LZH +#define LZI +#define LZJ +#define LZK +#define LZL +#define LZM +#define LZN +#define LZO +#define LZP +#define LZQ +#define LZR +#define LZS +#define LZT +#define LZU +#define LZV +#define LZW +#define LZX +#define LZY +#define LZZ +#define MAA +#define MAB +#define MAC +#define MAD +#define MAE +#define MAF +#define MAG +#define MAH +#define MAI +#define MAJ +#define MAK +#define MAL +#define MAM +#define MAN +#define MAO +#define MAP +#define MAQ +#define MAR +#define MAS +#define MAT +#define MAU +#define MAV +#define MAW +#define MAX +#define MAY +#define MAZ +#define MBA +#define MBB +#define MBC +#define MBD +#define MBE +#define MBF +#define MBG +#define MBH +#define MBI +#define MBJ +#define MBK +#define MBL +#define MBM +#define MBN +#define MBO +#define MBP +#define MBQ +#define MBR +#define MBS +#define MBT +#define MBU +#define MBV +#define MBW +#define MBX +#define MBY +#define MBZ +#define MCA +#define MCB +#define MCC +#define MCD +#define MCE +#define MCF +#define MCG +#define MCH +#define MCI +#define MCJ +#define MCK +#define MCL +#define MCM +#define MCN +#define MCO +#define MCP +#define MCQ +#define MCR +#define MCS +#define MCT +#define MCU +#define MCV +#define MCW +#define MCX +#define MCY +#define MCZ +#define MDA 0x1fff +#endif +#endif diff --git a/libraries/mcpp/cpp-test/test-l/nest1.h b/libraries/mcpp/cpp-test/test-l/nest1.h new file mode 100644 index 000000000..7a5f0135a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest1.h @@ -0,0 +1,2 @@ +/* nest1.h */ +#include "nest2.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest10.h b/libraries/mcpp/cpp-test/test-l/nest10.h new file mode 100644 index 000000000..f97de2ab3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest10.h @@ -0,0 +1,2 @@ +/* nest10.h */ +#include "nest11.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest100.h b/libraries/mcpp/cpp-test/test-l/nest100.h new file mode 100644 index 000000000..4f06e0ae6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest100.h @@ -0,0 +1,2 @@ +/* nest100.h */ +#include "nest101.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest101.h b/libraries/mcpp/cpp-test/test-l/nest101.h new file mode 100644 index 000000000..959a083d8 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest101.h @@ -0,0 +1,2 @@ +/* nest101.h */ +#include "nest102.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest102.h b/libraries/mcpp/cpp-test/test-l/nest102.h new file mode 100644 index 000000000..25365b21a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest102.h @@ -0,0 +1,2 @@ +/* nest102.h */ +#include "nest103.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest103.h b/libraries/mcpp/cpp-test/test-l/nest103.h new file mode 100644 index 000000000..d6802b37d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest103.h @@ -0,0 +1,2 @@ +/* nest103.h */ +#include "nest104.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest104.h b/libraries/mcpp/cpp-test/test-l/nest104.h new file mode 100644 index 000000000..39a674dca --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest104.h @@ -0,0 +1,2 @@ +/* nest104.h */ +#include "nest105.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest105.h b/libraries/mcpp/cpp-test/test-l/nest105.h new file mode 100644 index 000000000..1835bc6c7 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest105.h @@ -0,0 +1,2 @@ +/* nest105.h */ +#include "nest106.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest106.h b/libraries/mcpp/cpp-test/test-l/nest106.h new file mode 100644 index 000000000..6ca91dc21 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest106.h @@ -0,0 +1,2 @@ +/* nest106.h */ +#include "nest107.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest107.h b/libraries/mcpp/cpp-test/test-l/nest107.h new file mode 100644 index 000000000..3322c44e9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest107.h @@ -0,0 +1,2 @@ +/* nest107.h */ +#include "nest108.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest108.h b/libraries/mcpp/cpp-test/test-l/nest108.h new file mode 100644 index 000000000..626ec4efa --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest108.h @@ -0,0 +1,2 @@ +/* nest108.h */ +#include "nest109.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest109.h b/libraries/mcpp/cpp-test/test-l/nest109.h new file mode 100644 index 000000000..b167467dc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest109.h @@ -0,0 +1,2 @@ +/* nest109.h */ +#include "nest110.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest11.h b/libraries/mcpp/cpp-test/test-l/nest11.h new file mode 100644 index 000000000..ca40f3811 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest11.h @@ -0,0 +1,2 @@ +/* nest11.h */ +#include "nest12.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest110.h b/libraries/mcpp/cpp-test/test-l/nest110.h new file mode 100644 index 000000000..a2eaeb3f1 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest110.h @@ -0,0 +1,2 @@ +/* nest110.h */ +#include "nest111.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest111.h b/libraries/mcpp/cpp-test/test-l/nest111.h new file mode 100644 index 000000000..d233d47ff --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest111.h @@ -0,0 +1,2 @@ +/* nest111.h */ +#include "nest112.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest112.h b/libraries/mcpp/cpp-test/test-l/nest112.h new file mode 100644 index 000000000..8b78ea6f3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest112.h @@ -0,0 +1,2 @@ +/* nest112.h */ +#include "nest113.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest113.h b/libraries/mcpp/cpp-test/test-l/nest113.h new file mode 100644 index 000000000..e324c1111 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest113.h @@ -0,0 +1,2 @@ +/* nest113.h */ +#include "nest114.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest114.h b/libraries/mcpp/cpp-test/test-l/nest114.h new file mode 100644 index 000000000..6ef69e7d8 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest114.h @@ -0,0 +1,2 @@ +/* nest114.h */ +#include "nest115.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest115.h b/libraries/mcpp/cpp-test/test-l/nest115.h new file mode 100644 index 000000000..4ba0c096f --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest115.h @@ -0,0 +1,2 @@ +/* nest115.h */ +#include "nest116.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest116.h b/libraries/mcpp/cpp-test/test-l/nest116.h new file mode 100644 index 000000000..a152b1e72 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest116.h @@ -0,0 +1,2 @@ +/* nest116.h */ +#include "nest117.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest117.h b/libraries/mcpp/cpp-test/test-l/nest117.h new file mode 100644 index 000000000..68752f5a6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest117.h @@ -0,0 +1,2 @@ +/* nest117.h */ +#include "nest118.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest118.h b/libraries/mcpp/cpp-test/test-l/nest118.h new file mode 100644 index 000000000..2f2e325b6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest118.h @@ -0,0 +1,2 @@ +/* nest118.h */ +#include "nest119.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest119.h b/libraries/mcpp/cpp-test/test-l/nest119.h new file mode 100644 index 000000000..a485bf82d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest119.h @@ -0,0 +1,2 @@ +/* nest119.h */ +#include "nest120.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest12.h b/libraries/mcpp/cpp-test/test-l/nest12.h new file mode 100644 index 000000000..c3dba7244 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest12.h @@ -0,0 +1,2 @@ +/* nest12.h */ +#include "nest13.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest120.h b/libraries/mcpp/cpp-test/test-l/nest120.h new file mode 100644 index 000000000..b51201360 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest120.h @@ -0,0 +1,2 @@ +/* nest120.h */ +#include "nest121.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest121.h b/libraries/mcpp/cpp-test/test-l/nest121.h new file mode 100644 index 000000000..68ef48cec --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest121.h @@ -0,0 +1,2 @@ +/* nest121.h */ +#include "nest122.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest122.h b/libraries/mcpp/cpp-test/test-l/nest122.h new file mode 100644 index 000000000..02a882765 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest122.h @@ -0,0 +1,2 @@ +/* nest122.h */ +#include "nest123.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest123.h b/libraries/mcpp/cpp-test/test-l/nest123.h new file mode 100644 index 000000000..5edc93188 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest123.h @@ -0,0 +1,2 @@ +/* nest123.h */ +#include "nest124.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest124.h b/libraries/mcpp/cpp-test/test-l/nest124.h new file mode 100644 index 000000000..96d4339e8 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest124.h @@ -0,0 +1,2 @@ +/* nest124.h */ +#include "nest125.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest125.h b/libraries/mcpp/cpp-test/test-l/nest125.h new file mode 100644 index 000000000..dbd2153f9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest125.h @@ -0,0 +1,2 @@ +/* nest125.h */ +#include "nest126.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest126.h b/libraries/mcpp/cpp-test/test-l/nest126.h new file mode 100644 index 000000000..4bf031ee0 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest126.h @@ -0,0 +1,2 @@ +/* nest126.h */ +#include "nest127.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest127.h b/libraries/mcpp/cpp-test/test-l/nest127.h new file mode 100644 index 000000000..f08bb4433 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest127.h @@ -0,0 +1,2 @@ +/* nest127.h */ + nest = 0x7f; diff --git a/libraries/mcpp/cpp-test/test-l/nest13.h b/libraries/mcpp/cpp-test/test-l/nest13.h new file mode 100644 index 000000000..4f8355f38 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest13.h @@ -0,0 +1,2 @@ +/* nest13.h */ +#include "nest14.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest14.h b/libraries/mcpp/cpp-test/test-l/nest14.h new file mode 100644 index 000000000..b3ab47406 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest14.h @@ -0,0 +1,2 @@ +/* nest14.h */ +#include "nest15.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest15.h b/libraries/mcpp/cpp-test/test-l/nest15.h new file mode 100644 index 000000000..fef741cd6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest15.h @@ -0,0 +1,6 @@ +/* nest15.h */ +#ifdef X0F + nest = 0x0f; +#else +#include "nest16.h" +#endif diff --git a/libraries/mcpp/cpp-test/test-l/nest16.h b/libraries/mcpp/cpp-test/test-l/nest16.h new file mode 100644 index 000000000..a8b1427e8 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest16.h @@ -0,0 +1,2 @@ +/* nest16.h */ +#include "nest17.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest17.h b/libraries/mcpp/cpp-test/test-l/nest17.h new file mode 100644 index 000000000..ad73f0bdc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest17.h @@ -0,0 +1,2 @@ +/* nest17.h */ +#include "nest18.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest18.h b/libraries/mcpp/cpp-test/test-l/nest18.h new file mode 100644 index 000000000..e0accb9d9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest18.h @@ -0,0 +1,2 @@ +/* nest18.h */ +#include "nest19.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest19.h b/libraries/mcpp/cpp-test/test-l/nest19.h new file mode 100644 index 000000000..a46b9d171 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest19.h @@ -0,0 +1,2 @@ +/* nest19.h */ +#include "nest20.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest2.h b/libraries/mcpp/cpp-test/test-l/nest2.h new file mode 100644 index 000000000..11a92f314 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest2.h @@ -0,0 +1,2 @@ +/* nest2.h */ +#include "nest3.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest20.h b/libraries/mcpp/cpp-test/test-l/nest20.h new file mode 100644 index 000000000..94df58798 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest20.h @@ -0,0 +1,2 @@ +/* nest20.h */ +#include "nest21.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest21.h b/libraries/mcpp/cpp-test/test-l/nest21.h new file mode 100644 index 000000000..c60b510dc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest21.h @@ -0,0 +1,2 @@ +/* nest21.h */ +#include "nest22.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest22.h b/libraries/mcpp/cpp-test/test-l/nest22.h new file mode 100644 index 000000000..8ca7ae5ab --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest22.h @@ -0,0 +1,2 @@ +/* nest22.h */ +#include "nest23.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest23.h b/libraries/mcpp/cpp-test/test-l/nest23.h new file mode 100644 index 000000000..9125a7bf3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest23.h @@ -0,0 +1,2 @@ +/* nest23.h */ +#include "nest24.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest24.h b/libraries/mcpp/cpp-test/test-l/nest24.h new file mode 100644 index 000000000..cb6fc840f --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest24.h @@ -0,0 +1,2 @@ +/* nest24.h */ +#include "nest25.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest25.h b/libraries/mcpp/cpp-test/test-l/nest25.h new file mode 100644 index 000000000..e47f7f89b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest25.h @@ -0,0 +1,2 @@ +/* nest25.h */ +#include "nest26.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest26.h b/libraries/mcpp/cpp-test/test-l/nest26.h new file mode 100644 index 000000000..ed964fbc9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest26.h @@ -0,0 +1,2 @@ +/* nest26.h */ +#include "nest27.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest27.h b/libraries/mcpp/cpp-test/test-l/nest27.h new file mode 100644 index 000000000..a1868e145 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest27.h @@ -0,0 +1,2 @@ +/* nest27.h */ +#include "nest28.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest28.h b/libraries/mcpp/cpp-test/test-l/nest28.h new file mode 100644 index 000000000..46c5822b6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest28.h @@ -0,0 +1,2 @@ +/* nest28.h */ +#include "nest29.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest29.h b/libraries/mcpp/cpp-test/test-l/nest29.h new file mode 100644 index 000000000..8516bc408 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest29.h @@ -0,0 +1,2 @@ +/* nest29.h */ +#include "nest30.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest3.h b/libraries/mcpp/cpp-test/test-l/nest3.h new file mode 100644 index 000000000..7b77090e3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest3.h @@ -0,0 +1,2 @@ +/* nest3.h */ +#include "nest4.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest30.h b/libraries/mcpp/cpp-test/test-l/nest30.h new file mode 100644 index 000000000..654abec17 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest30.h @@ -0,0 +1,2 @@ +/* nest30.h */ +#include "nest31.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest31.h b/libraries/mcpp/cpp-test/test-l/nest31.h new file mode 100644 index 000000000..71e235d4d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest31.h @@ -0,0 +1,6 @@ +/* nest31.h */ +#ifdef X1F + nest = 0x1f; +#else +#include "nest32.h" +#endif diff --git a/libraries/mcpp/cpp-test/test-l/nest32.h b/libraries/mcpp/cpp-test/test-l/nest32.h new file mode 100644 index 000000000..fec362bf6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest32.h @@ -0,0 +1,2 @@ +/* nest32.h */ +#include "nest33.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest33.h b/libraries/mcpp/cpp-test/test-l/nest33.h new file mode 100644 index 000000000..a58741770 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest33.h @@ -0,0 +1,2 @@ +/* nest33.h */ +#include "nest34.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest34.h b/libraries/mcpp/cpp-test/test-l/nest34.h new file mode 100644 index 000000000..29ac2af66 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest34.h @@ -0,0 +1,2 @@ +/* nest34.h */ +#include "nest35.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest35.h b/libraries/mcpp/cpp-test/test-l/nest35.h new file mode 100644 index 000000000..989391ccd --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest35.h @@ -0,0 +1,2 @@ +/* nest35.h */ +#include "nest36.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest36.h b/libraries/mcpp/cpp-test/test-l/nest36.h new file mode 100644 index 000000000..02895e7a0 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest36.h @@ -0,0 +1,2 @@ +/* nest36.h */ +#include "nest37.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest37.h b/libraries/mcpp/cpp-test/test-l/nest37.h new file mode 100644 index 000000000..01d91cc45 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest37.h @@ -0,0 +1,2 @@ +/* nest37.h */ +#include "nest38.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest38.h b/libraries/mcpp/cpp-test/test-l/nest38.h new file mode 100644 index 000000000..2c99265de --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest38.h @@ -0,0 +1,2 @@ +/* nest38.h */ +#include "nest39.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest39.h b/libraries/mcpp/cpp-test/test-l/nest39.h new file mode 100644 index 000000000..ea9cee011 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest39.h @@ -0,0 +1,2 @@ +/* nest39.h */ +#include "nest40.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest4.h b/libraries/mcpp/cpp-test/test-l/nest4.h new file mode 100644 index 000000000..8c5241ce2 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest4.h @@ -0,0 +1,2 @@ +/* nest4.h */ +#include "nest5.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest40.h b/libraries/mcpp/cpp-test/test-l/nest40.h new file mode 100644 index 000000000..ff4cc5f71 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest40.h @@ -0,0 +1,2 @@ +/* nest40.h */ +#include "nest41.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest41.h b/libraries/mcpp/cpp-test/test-l/nest41.h new file mode 100644 index 000000000..ee37de4f2 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest41.h @@ -0,0 +1,2 @@ +/* nest41.h */ +#include "nest42.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest42.h b/libraries/mcpp/cpp-test/test-l/nest42.h new file mode 100644 index 000000000..4810b3b90 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest42.h @@ -0,0 +1,2 @@ +/* nest42.h */ +#include "nest43.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest43.h b/libraries/mcpp/cpp-test/test-l/nest43.h new file mode 100644 index 000000000..a8dd2ff5e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest43.h @@ -0,0 +1,2 @@ +/* nest43.h */ +#include "nest44.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest44.h b/libraries/mcpp/cpp-test/test-l/nest44.h new file mode 100644 index 000000000..7a86490a3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest44.h @@ -0,0 +1,2 @@ +/* nest44.h */ +#include "nest45.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest45.h b/libraries/mcpp/cpp-test/test-l/nest45.h new file mode 100644 index 000000000..ab7dff2aa --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest45.h @@ -0,0 +1,2 @@ +/* nest45.h */ +#include "nest46.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest46.h b/libraries/mcpp/cpp-test/test-l/nest46.h new file mode 100644 index 000000000..c4b1d1a0a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest46.h @@ -0,0 +1,2 @@ +/* nest46.h */ +#include "nest47.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest47.h b/libraries/mcpp/cpp-test/test-l/nest47.h new file mode 100644 index 000000000..ee820e204 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest47.h @@ -0,0 +1,2 @@ +/* nest47.h */ +#include "nest48.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest48.h b/libraries/mcpp/cpp-test/test-l/nest48.h new file mode 100644 index 000000000..a3aef7ca6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest48.h @@ -0,0 +1,2 @@ +/* nest48.h */ +#include "nest49.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest49.h b/libraries/mcpp/cpp-test/test-l/nest49.h new file mode 100644 index 000000000..f52f16eba --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest49.h @@ -0,0 +1,2 @@ +/* nest49.h */ +#include "nest50.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest5.h b/libraries/mcpp/cpp-test/test-l/nest5.h new file mode 100644 index 000000000..57d8e03bb --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest5.h @@ -0,0 +1,2 @@ +/* nest5.h */ +#include "nest6.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest50.h b/libraries/mcpp/cpp-test/test-l/nest50.h new file mode 100644 index 000000000..6da002177 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest50.h @@ -0,0 +1,2 @@ +/* nest50.h */ +#include "nest51.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest51.h b/libraries/mcpp/cpp-test/test-l/nest51.h new file mode 100644 index 000000000..0cb0e02ee --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest51.h @@ -0,0 +1,2 @@ +/* nest51.h */ +#include "nest52.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest52.h b/libraries/mcpp/cpp-test/test-l/nest52.h new file mode 100644 index 000000000..e6f087dd7 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest52.h @@ -0,0 +1,2 @@ +/* nest52.h */ +#include "nest53.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest53.h b/libraries/mcpp/cpp-test/test-l/nest53.h new file mode 100644 index 000000000..07cf5dc22 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest53.h @@ -0,0 +1,2 @@ +/* nest53.h */ +#include "nest54.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest54.h b/libraries/mcpp/cpp-test/test-l/nest54.h new file mode 100644 index 000000000..d7822bed2 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest54.h @@ -0,0 +1,2 @@ +/* nest54.h */ +#include "nest55.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest55.h b/libraries/mcpp/cpp-test/test-l/nest55.h new file mode 100644 index 000000000..73970642d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest55.h @@ -0,0 +1,2 @@ +/* nest55.h */ +#include "nest56.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest56.h b/libraries/mcpp/cpp-test/test-l/nest56.h new file mode 100644 index 000000000..f9c541c2d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest56.h @@ -0,0 +1,2 @@ +/* nest56.h */ +#include "nest57.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest57.h b/libraries/mcpp/cpp-test/test-l/nest57.h new file mode 100644 index 000000000..2e0224a0b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest57.h @@ -0,0 +1,2 @@ +/* nest57.h */ +#include "nest58.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest58.h b/libraries/mcpp/cpp-test/test-l/nest58.h new file mode 100644 index 000000000..e0b0d6631 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest58.h @@ -0,0 +1,2 @@ +/* nest58.h */ +#include "nest59.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest59.h b/libraries/mcpp/cpp-test/test-l/nest59.h new file mode 100644 index 000000000..2e5d640fa --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest59.h @@ -0,0 +1,2 @@ +/* nest59.h */ +#include "nest60.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest6.h b/libraries/mcpp/cpp-test/test-l/nest6.h new file mode 100644 index 000000000..fc31c8e5f --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest6.h @@ -0,0 +1,2 @@ +/* nest6.h */ +#include "nest7.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest60.h b/libraries/mcpp/cpp-test/test-l/nest60.h new file mode 100644 index 000000000..460d89054 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest60.h @@ -0,0 +1,2 @@ +/* nest60.h */ +#include "nest61.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest61.h b/libraries/mcpp/cpp-test/test-l/nest61.h new file mode 100644 index 000000000..ecdfdfbd3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest61.h @@ -0,0 +1,2 @@ +/* nest61.h */ +#include "nest62.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest62.h b/libraries/mcpp/cpp-test/test-l/nest62.h new file mode 100644 index 000000000..ecab0cd36 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest62.h @@ -0,0 +1,2 @@ +/* nest62.h */ +#include "nest63.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest63.h b/libraries/mcpp/cpp-test/test-l/nest63.h new file mode 100644 index 000000000..c745ed521 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest63.h @@ -0,0 +1,6 @@ +/* nest63.h */ +#ifdef X3F + nest = 0x3f; +#else +#include "nest64.h" +#endif diff --git a/libraries/mcpp/cpp-test/test-l/nest64.h b/libraries/mcpp/cpp-test/test-l/nest64.h new file mode 100644 index 000000000..3975dec7e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest64.h @@ -0,0 +1,2 @@ +/* nest64.h */ +#include "nest65.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest65.h b/libraries/mcpp/cpp-test/test-l/nest65.h new file mode 100644 index 000000000..f7caf1fbc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest65.h @@ -0,0 +1,2 @@ +/* nest65.h */ +#include "nest66.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest66.h b/libraries/mcpp/cpp-test/test-l/nest66.h new file mode 100644 index 000000000..a5340423b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest66.h @@ -0,0 +1,2 @@ +/* nest66.h */ +#include "nest67.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest67.h b/libraries/mcpp/cpp-test/test-l/nest67.h new file mode 100644 index 000000000..e07332218 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest67.h @@ -0,0 +1,2 @@ +/* nest67.h */ +#include "nest68.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest68.h b/libraries/mcpp/cpp-test/test-l/nest68.h new file mode 100644 index 000000000..4bf3d753a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest68.h @@ -0,0 +1,2 @@ +/* nest68.h */ +#include "nest69.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest69.h b/libraries/mcpp/cpp-test/test-l/nest69.h new file mode 100644 index 000000000..5e5b962ae --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest69.h @@ -0,0 +1,2 @@ +/* nest69.h */ +#include "nest70.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest7.h b/libraries/mcpp/cpp-test/test-l/nest7.h new file mode 100644 index 000000000..eb5280baf --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest7.h @@ -0,0 +1,2 @@ +/* nest7.h */ +#include "nest8.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest70.h b/libraries/mcpp/cpp-test/test-l/nest70.h new file mode 100644 index 000000000..650dafbd1 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest70.h @@ -0,0 +1,2 @@ +/* nest70.h */ +#include "nest71.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest71.h b/libraries/mcpp/cpp-test/test-l/nest71.h new file mode 100644 index 000000000..94531ee8e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest71.h @@ -0,0 +1,2 @@ +/* nest71.h */ +#include "nest72.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest72.h b/libraries/mcpp/cpp-test/test-l/nest72.h new file mode 100644 index 000000000..3d5d70c49 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest72.h @@ -0,0 +1,2 @@ +/* nest72.h */ +#include "nest73.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest73.h b/libraries/mcpp/cpp-test/test-l/nest73.h new file mode 100644 index 000000000..58350ed97 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest73.h @@ -0,0 +1,2 @@ +/* nest73.h */ +#include "nest74.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest74.h b/libraries/mcpp/cpp-test/test-l/nest74.h new file mode 100644 index 000000000..ff01bb385 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest74.h @@ -0,0 +1,2 @@ +/* nest74.h */ +#include "nest75.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest75.h b/libraries/mcpp/cpp-test/test-l/nest75.h new file mode 100644 index 000000000..5036eef36 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest75.h @@ -0,0 +1,2 @@ +/* nest75.h */ +#include "nest76.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest76.h b/libraries/mcpp/cpp-test/test-l/nest76.h new file mode 100644 index 000000000..79158b660 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest76.h @@ -0,0 +1,2 @@ +/* nest76.h */ +#include "nest77.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest77.h b/libraries/mcpp/cpp-test/test-l/nest77.h new file mode 100644 index 000000000..34e67efc1 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest77.h @@ -0,0 +1,2 @@ +/* nest77.h */ +#include "nest78.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest78.h b/libraries/mcpp/cpp-test/test-l/nest78.h new file mode 100644 index 000000000..be509fc09 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest78.h @@ -0,0 +1,2 @@ +/* nest78.h */ +#include "nest79.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest79.h b/libraries/mcpp/cpp-test/test-l/nest79.h new file mode 100644 index 000000000..b652fe17e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest79.h @@ -0,0 +1,2 @@ +/* nest79.h */ +#include "nest80.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest8.h b/libraries/mcpp/cpp-test/test-l/nest8.h new file mode 100644 index 000000000..a8791cb30 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest8.h @@ -0,0 +1,2 @@ +/* nest8.h */ +#include "nest9.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest80.h b/libraries/mcpp/cpp-test/test-l/nest80.h new file mode 100644 index 000000000..254436893 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest80.h @@ -0,0 +1,2 @@ +/* nest80.h */ +#include "nest81.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest81.h b/libraries/mcpp/cpp-test/test-l/nest81.h new file mode 100644 index 000000000..f85309acc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest81.h @@ -0,0 +1,2 @@ +/* nest81.h */ +#include "nest82.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest82.h b/libraries/mcpp/cpp-test/test-l/nest82.h new file mode 100644 index 000000000..4585753bc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest82.h @@ -0,0 +1,2 @@ +/* nest82.h */ +#include "nest83.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest83.h b/libraries/mcpp/cpp-test/test-l/nest83.h new file mode 100644 index 000000000..9378f6902 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest83.h @@ -0,0 +1,2 @@ +/* nest83.h */ +#include "nest84.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest84.h b/libraries/mcpp/cpp-test/test-l/nest84.h new file mode 100644 index 000000000..d763d2cbb --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest84.h @@ -0,0 +1,2 @@ +/* nest84.h */ +#include "nest85.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest85.h b/libraries/mcpp/cpp-test/test-l/nest85.h new file mode 100644 index 000000000..e086a8634 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest85.h @@ -0,0 +1,2 @@ +/* nest85.h */ +#include "nest86.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest86.h b/libraries/mcpp/cpp-test/test-l/nest86.h new file mode 100644 index 000000000..89e897e9b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest86.h @@ -0,0 +1,2 @@ +/* nest86.h */ +#include "nest87.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest87.h b/libraries/mcpp/cpp-test/test-l/nest87.h new file mode 100644 index 000000000..1b3f5ecdf --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest87.h @@ -0,0 +1,2 @@ +/* nest87.h */ +#include "nest88.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest88.h b/libraries/mcpp/cpp-test/test-l/nest88.h new file mode 100644 index 000000000..1d5ff425a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest88.h @@ -0,0 +1,2 @@ +/* nest88.h */ +#include "nest89.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest89.h b/libraries/mcpp/cpp-test/test-l/nest89.h new file mode 100644 index 000000000..3cabc5113 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest89.h @@ -0,0 +1,2 @@ +/* nest89.h */ +#include "nest90.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest9.h b/libraries/mcpp/cpp-test/test-l/nest9.h new file mode 100644 index 000000000..5f84e46fe --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest9.h @@ -0,0 +1,2 @@ +/* nest9.h */ +#include "nest10.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest90.h b/libraries/mcpp/cpp-test/test-l/nest90.h new file mode 100644 index 000000000..77f6a40c3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest90.h @@ -0,0 +1,2 @@ +/* nest90.h */ +#include "nest91.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest91.h b/libraries/mcpp/cpp-test/test-l/nest91.h new file mode 100644 index 000000000..287b18991 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest91.h @@ -0,0 +1,2 @@ +/* nest91.h */ +#include "nest92.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest92.h b/libraries/mcpp/cpp-test/test-l/nest92.h new file mode 100644 index 000000000..c4a82e801 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest92.h @@ -0,0 +1,2 @@ +/* nest92.h */ +#include "nest93.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest93.h b/libraries/mcpp/cpp-test/test-l/nest93.h new file mode 100644 index 000000000..243547ab7 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest93.h @@ -0,0 +1,2 @@ +/* nest93.h */ +#include "nest94.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest94.h b/libraries/mcpp/cpp-test/test-l/nest94.h new file mode 100644 index 000000000..828075109 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest94.h @@ -0,0 +1,2 @@ +/* nest94.h */ +#include "nest95.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest95.h b/libraries/mcpp/cpp-test/test-l/nest95.h new file mode 100644 index 000000000..ecdeea54f --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest95.h @@ -0,0 +1,2 @@ +/* nest95.h */ +#include "nest96.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest96.h b/libraries/mcpp/cpp-test/test-l/nest96.h new file mode 100644 index 000000000..aed069f4d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest96.h @@ -0,0 +1,2 @@ +/* nest96.h */ +#include "nest97.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest97.h b/libraries/mcpp/cpp-test/test-l/nest97.h new file mode 100644 index 000000000..7ebfa0e42 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest97.h @@ -0,0 +1,2 @@ +/* nest97.h */ +#include "nest98.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest98.h b/libraries/mcpp/cpp-test/test-l/nest98.h new file mode 100644 index 000000000..cd9c6d0f3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest98.h @@ -0,0 +1,2 @@ +/* nest98.h */ +#include "nest99.h" diff --git a/libraries/mcpp/cpp-test/test-l/nest99.h b/libraries/mcpp/cpp-test/test-l/nest99.h new file mode 100644 index 000000000..d928a7409 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-l/nest99.h @@ -0,0 +1,2 @@ +/* nest99.h */ +#include "nest100.h" diff --git a/libraries/mcpp/cpp-test/test-t/cpp-test.exp b/libraries/mcpp/cpp-test/test-t/cpp-test.exp new file mode 100644 index 000000000..fe1ff74cc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/cpp-test.exp @@ -0,0 +1,22 @@ +# cpp-test.exp 2002/12 +# to test cpp-test +# imported and modified from dg.exp of GNU C + +# Load support procs. +load_lib gcc-dg.exp + +# If a testcase doesn't have special options, use these. +global DEFAULT_CFLAGS +if ![info exists DEFAULT_CFLAGS] then { + set DEFAULT_CFLAGS " -ansi -pedantic-errors" +} + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cSC\]]] \ + "" $DEFAULT_CFLAGS + +# All done. +dg-finish diff --git a/libraries/mcpp/cpp-test/test-t/e_12_8.c b/libraries/mcpp/cpp-test/test-t/e_12_8.c new file mode 100644 index 000000000..2ea8d71fa --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_12_8.c @@ -0,0 +1,8 @@ +/* e_12_8.c: Out of range of integer pp-token in #if expression. */ + +/* { dg-do preprocess } */ + +/* 12.8: Preprocessing number perhaps out of range of unsigned long. */ +#if 123456789012345678901 /* { dg-error "(C|c)onstant (\"\[0-9\]*\" is |)(out of range|is too large for its type)" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_14.c b/libraries/mcpp/cpp-test/test-t/e_14.c new file mode 100644 index 000000000..28fc976cd --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_14.c @@ -0,0 +1,12 @@ +/* e_14.c: Illegal #if expressions. */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic-errors -w" } */ + +#define A 1 +#define B 1 + +/* 14.1: String literal is not allowed in #if expression. */ +#if "string" /* { dg-error "not (valid|allowed) in (#if|preprocessor)( expressions|)| Can't use a string literal" } */ +#endif /* The second error ? */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_14_10.c b/libraries/mcpp/cpp-test/test-t/e_14_10.c new file mode 100644 index 000000000..0c76f7e30 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_14_10.c @@ -0,0 +1,22 @@ +/* e_14_10.c: Overflow of constant expression in #if directive. */ + +/* { dg-do preprocess } + { dg-options "-ansi -pedantic-errors" } + { dg-excess-errors "" } + */ + +/* 14.10: */ +/* In C99, #if expression is evaluated in intmax_t */ +#if __STDC_VERSION__ < 199901L +#include + +#if LONG_MAX - LONG_MIN /* { dg-error "integer overflow in preprocessor expression| Result of \"-\" is out of range" } */ +#endif +#if LONG_MAX + 1 > SHRT_MAX /* { dg-error "integer overflow in preprocessor expression| Result of \"\\+\" is out of range" } */ +#endif +#if LONG_MIN - 1 /* { dg-error "integer overflow in preprocessor expression| Result of \"-\" is out of range" } */ +#endif +#if LONG_MAX * 2 /* { dg-error "integer overflow in preprocessor expression| Result of \"\\*\" is out of range" } */ +#endif +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_14_2.c b/libraries/mcpp/cpp-test/test-t/e_14_2.c new file mode 100644 index 000000000..8369af7fc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_14_2.c @@ -0,0 +1,17 @@ +/* e_14_2.c: Illegal #if expressions-2. */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic-errors -w" } */ + +#define A 1 +#define B 1 + +/* 14.2: Operators =, +=, ++, etc. are not allowed in #if expression.*/ + +#if A = B /* { dg-error "is not valid| (parse|syntax) error| Can't use the operator" } */ +#endif +#if A++ B /* { dg-error "is not (valid|allowed)| Can't use the operator" } */ +#endif +#if A.B /* { dg-error "is not valid| (parse|syntax) error| empty #if expression| Can't use the operator" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_14_3.c b/libraries/mcpp/cpp-test/test-t/e_14_3.c new file mode 100644 index 000000000..82efa5a36 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_14_3.c @@ -0,0 +1,27 @@ +/* e_14_3.c: Illegal #if expressions-3. */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic-errors -w" } */ + +#define A 1 +#define B 1 + +/* 14.3: Unterminated #if expression. */ +#if 0 < /* { dg-error "no right operand| (parse|syntax) error| Unterminated expression" } */ +#endif +#if ( (A == B) /* { dg-error "missing '\\)' in expression| (parse|syntax) error| Missing \"\\)\"" } */ +#endif + +/* 14.4: Unbalanced parenthesis in #if defined operator. */ +#if defined ( MACRO /* { dg-error "missing '\\)' after \"defined\"| Bad defined syntax" } */ +#endif + +/* 14.5: No argument. */ +#if /* { dg-error "#if with no expression| (parse|syntax) error| No argument" } */ +#endif + +/* 14.6: Macro expanding to 0 token in #if expression. */ +#define ZERO_TOKEN +#if ZERO_TOKEN /* { dg-error "#if with no expression| (parse|syntax) error| Unterminated expression" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_14_7.c b/libraries/mcpp/cpp-test/test-t/e_14_7.c new file mode 100644 index 000000000..69195c57d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_14_7.c @@ -0,0 +1,18 @@ +/* e_14_7.c: There is no keyword in #if expression. */ + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + */ + +/* 14.7: sizeof operator is disallowed. */ +/* Evaluated as: 0 (0) + Constant expression syntax error. */ +#if sizeof (int) /* { dg-error "missing binary operator|(parse|syntax) error| Operator \"\\(\" in incorrect context" } */ +#endif + +/* 14.8: type cast is disallowed. */ +/* Evaluated as: (0)0x8000 + Also a constant expression error. */ +#if (int)0x8000 < 0 /* { dg-error "missing binary operator|(parse|syntax) error| Misplaced constant" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_14_9.c b/libraries/mcpp/cpp-test/test-t/e_14_9.c new file mode 100644 index 000000000..1eb24a4bd --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_14_9.c @@ -0,0 +1,8 @@ +/* e_14_9.c: Out of range in #if expression (division by 0). */ + +/* { dg-do preprocess } */ + +/* 14.9: Divided by 0. */ +#if 1 / 0 /* { dg-error "(D|d)ivision by zero" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_15_3.c b/libraries/mcpp/cpp-test/test-t/e_15_3.c new file mode 100644 index 000000000..fdb512f60 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_15_3.c @@ -0,0 +1,18 @@ +/* e_15_3.c: #ifdef, #ifndef syntax errors. */ + +/* { dg-do preprocess } */ + +/* 15.3: Not an identifier. */ +#ifdef "string" /* { dg-error "macro names must be identifiers|argument starts with punctuation| Not an identifier" } */ +#endif +#ifdef 123 /* { dg-error "macro names must be identifiers|argument starts with a digit| Not an identifier" } */ +#endif + +/* 15.4: Excessive token sequence. */ +#ifdef MACRO Junk /* { dg-error "extra tokens|garbage at end| Excessive token sequence" } */ +#endif + +/* 15.5: No argument. */ +#ifndef /* { dg-error "no macro name given| (N|n)o argument" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_16.c b/libraries/mcpp/cpp-test/test-t/e_16.c new file mode 100644 index 000000000..6d0f9ec3b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_16.c @@ -0,0 +1,12 @@ +/* e_16.c: Trailing junk of #else, #endif. */ + +/* { dg-do preprocess } */ + +/* 16.1: Trailing junk of #else. */ +#define MACRO_0 0 +#if MACRO_0 +#else MACRO_0 /* { dg-error "extra tokens|text following| Excessive token sequence" } */ + +/* 16.2: Trailing junk of #endif. */ +#endif MACRO_0 /* { dg-error "extra tokens|text following| Excessive token sequence" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_17.c b/libraries/mcpp/cpp-test/test-t/e_17.c new file mode 100644 index 000000000..29a16fb0a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_17.c @@ -0,0 +1,32 @@ +/* e_17.c: Ill-formed group in a source file. */ + +/* { dg-do preprocess } */ + +#define MACRO_1 1 + +/* 17.1: Error of #endif without #if. */ +#endif /* { dg-error "#endif without #if| unbalanced `#endif'| Not in a #if \\(#ifdef\\) section" } */ + +/* 17.2: Error of #else without #if. */ +#else /* { dg-error "#else without #if| `#else' not within a conditional| Not in a #if \\(#ifdef\\) section" } */ + +/* 17.3: Error of #else after #else. */ +#if MACRO_1 +#else /* line 15 */ +#if 1 +#else +#endif +#else /* { dg-error "#else after #else\n\[\^ \]*( error:|) the conditional began here| `#else' after `#else'\n (matches line 14)| Already seen #else at line 15" } */ +#endif + +/* 17.4: Error of #elif after #else. */ +#if MACRO_1 == 1 +#else /* line 24 */ +#elif MACRO_1 == 0 /* { dg-error "#elif after #else\n\[\^ \]*( error:|) the conditional began here| `#elif' after `#else'\n (matches line 23)| Already seen #else at line 24" } */ +#endif + +/* 17.7: Error of unterminated #if section. */ +#if MACRO_1 == 0 /* line 29 */ +#else +/* { dg-error "unterminated #else| unterminated `#else'| End of input within #if \\(#ifdef\\) section" "" { target *-*-* } 0 } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_17_5.c b/libraries/mcpp/cpp-test/test-t/e_17_5.c new file mode 100644 index 000000000..e49ea8ef2 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_17_5.c @@ -0,0 +1,14 @@ +/* e_17_5.c: Imbalance of #if - #endif in included files. */ + +/* { dg-do preprocess } */ + +/* 17.5: Error of #endif without #if in an included file. */ +#if 1 +#include "unbal1.h" +/* { dg-error "e_17_5.c:7:\n\[\^ \]*( error:|) (#endif without #if|unbalanced `#endif')| Not in a #if \\(#ifdef\\) section in a source file" "" { target *-*-* } 0 } */ + +/* 17.6: Error of unterminated #if section in an included file. */ +#include "unbal2.h" +/* { dg-error "e_17_5.c:11:\n\[\^ \]*( error:|) unterminated (#else|`#else')| End of file within #if \\(#ifdef\\) section" "" { target *-*-* } 0 } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_18_4.c b/libraries/mcpp/cpp-test/test-t/e_18_4.c new file mode 100644 index 000000000..4d95e25f3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_18_4.c @@ -0,0 +1,34 @@ +/* e_18_4.c: #define syntax errors. */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic" } */ + +/* 18.4: Not an identifier. */ +#define "string" /* { dg-error "macro names must be identifiers| invalid macro name| Not an identifier" } */ +#define 123 /* { dg-error "macro names must be identifiers| invalid macro name| Not an identifier" } */ + +/* 18.5: No argument. */ +#define /* { dg-error "no macro name given| No identifier" } */ + +/* 18.6: Empty parameter list. */ +#define math( op, a, ) op( (a), (b)) /* { dg-error "parameter name missing| badly punctuated parameter list| Empty parameter" } */ + +/* 18.7: Duplicate parameter names. */ +#define math( op, a, a) op( (a), (b)) /* { dg-error "duplicate macro parameter| duplicate argument name| Duplicate parameter name" } */ + +/* 18.8: Argument is not an identifier. */ +#define NUMARGS( 1, +, 2) (1 + 2) /* { dg-error "may not appear in macro parameter list| invalid character in macro parameter name| Illegal parameter" } */ + +/* 18.9: No space between macro name and replacement text. */ +/* + C90 (Corrigendum 1) forbids this if and only the replacement text begins + with a non-basic-character. + C99 forbids this even when the replacement text begins with basic- + character. +*/ +/* From ISO 9899:1990 / Corrigendum 1. */ +#define THIS$AND$THAT(a, b) ((a) + (b)) /* { dg-error "ISO C requires whitespace after the macro name| '\\$' in identifier| No space between macro name" } */ +/* Note: the following definition is legal (object-like macro). +#define THIS $AND$THAT(a, b) ((a) + (b)) +*/ + diff --git a/libraries/mcpp/cpp-test/test-t/e_19_3.c b/libraries/mcpp/cpp-test/test-t/e_19_3.c new file mode 100644 index 000000000..4702c15ce --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_19_3.c @@ -0,0 +1,40 @@ +/* e_19_3.c: Redefinitions of macros. */ + +/* { dg-do preprocess } */ + +/* Excerpts from ISO C 3.8.3 "Examples". */ + +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* The following redefinitions should be diagnosed. */ + +/* 19.3: */ +/* different token sequence */ +#define OBJ_LIKE (0) /* { dg-error "redefined\n\[\^ \]*( error:|) this is the location | The macro is redefined" } */ + +/* (1-1); */ + OBJ_LIKE; + +/* 19.4: */ +#undef OBJ_LIKE +#define OBJ_LIKE (1-1) +/* different white space */ +#define OBJ_LIKE (1 - 1) /* { dg-error "redefined\n\[\^ \]*( error:|) this is the location | The macro is redefined" } */ + +/* 19.5: */ +/* different parameter usage */ +#define FTN_LIKE(b) ( a ) /* { dg-error "redefined\n\[\^ \]*( error:|) this is the location | The macro is redefined" } */ + +/* ( x ); */ + FTN_LIKE(x); + +/* 19.6: */ +#undef FTN_LIKE +#define FTN_LIKE(a) ( a ) +/* different parameter spelling */ +#define FTN_LIKE(b) ( b ) /* { dg-error "redefined\n\[\^ \]*( error:|) this is the location | The macro is redefined" } */ + +/* 19.7: Not in ISO C "Examples" */ +#define FTN_LIKE OBJ_LIKE /* { dg-error "redefined\n\[\^ \]*( error:|) this is the location | The macro is redefined" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_23_3.c b/libraries/mcpp/cpp-test/test-t/e_23_3.c new file mode 100644 index 000000000..4d7b8c529 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_23_3.c @@ -0,0 +1,13 @@ +/* e_23_3.c: ## operator shall not occur at the beginning or at the end of + replacement list for either form of macro definition. */ + +/* { dg-do preprocess } */ + +/* 23.3: In object-like macro. */ +#define con ## name /* { dg-error "'##' cannot appear at either end of a macro expansion| `##' at start of macro definition| No token before ##" } */ +#define cat 12 ## /* { dg-error "'##' cannot appear at either end of a macro expansion| No token after ##" } */ + +/* 23.4: In function-like macro. */ +#define CON( a, b) ## a ## b /* { dg-error "'##' cannot appear at either end of a macro expansion| `##' at start of macro definition| No token before ##" } */ +#define CAT( b, c) b ## c ## /* { dg-error "'##' cannot appear at either end of a macro expansion| No token after ##" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_24_6.c b/libraries/mcpp/cpp-test/test-t/e_24_6.c new file mode 100644 index 000000000..035f583e3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_24_6.c @@ -0,0 +1,8 @@ +/* e_24_6.c: Operand of # operator in function-like macro definition shall + be a parameter name. */ + +/* { dg-do preprocess } */ + +/* 24.6: */ +#define FUNC( a) # b /* { dg-error "not followed by a macro parameter| should be followed by a macro argument name| Not a formal parameter" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_25_6.c b/libraries/mcpp/cpp-test/test-t/e_25_6.c new file mode 100644 index 000000000..a02026295 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_25_6.c @@ -0,0 +1,17 @@ +/* e_25_6.c: Macro arguments are pre-expanded separately. */ + +/* { dg-do preprocess } */ + +#define sub( x, y) (x - y) + +/* 25.6: */ +#define head sub( +#define body(x,y) x,y +#define tail ) +#define head_body_tail( a, b, c) a b c +/* "head" is once replaced to "sub(", then rescanning of "sub(" causes an + uncompleted macro call. Expansion of an argument should complete + within the argument. */ + head_body_tail( head, body(a,b), tail); +/* { dg-error "unterminated argument list| (U|u)nterminated macro call" "" { target *-*-* } 15 } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_27_7.c b/libraries/mcpp/cpp-test/test-t/e_27_7.c new file mode 100644 index 000000000..0d5220419 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_27_7.c @@ -0,0 +1,14 @@ +/* e_27_7.c: Error of rescanning. */ + +/* { dg-do preprocess } */ + +#define sub( x, y) (x - y) + +/* 27.7: */ +#define TWO_TOKENS a,b +#define SUB( x, y) sub( x, y) +/* Too many arguments error while rescanning after once replaced to: + sub( a,b, 1); */ + SUB( TWO_TOKENS, 1); +/* { dg-error "passed 3 arguments, but takes just 2| used with too many \\(3\\) args| More than necessary 2 argument\\(s\\) in macro call" "too many arguments in rescanning" { target *-*-* } 12 } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_29_3.c b/libraries/mcpp/cpp-test/test-t/e_29_3.c new file mode 100644 index 000000000..d5a356c78 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_29_3.c @@ -0,0 +1,14 @@ +/* e_29_3.c: #undef errors. */ + +/* { dg-do preprocess } */ + +/* 29.3: Not an identifier. */ +#undef "string" /* { dg-error "macro names must be identifiers| invalid macro name| Not an identifier" } */ +#undef 123 /* { dg-error "macro names must be identifiers| invalid macro name| Not an identifier" } */ + +/* 29.4: Excessive token sequence. */ +#undef MACRO_0 Junk /* { dg-error "extra tokens| garbage after| Excessive token sequence" } */ + +/* 29.5: No argument. */ +#undef /* { dg-error "no macro name| invalid macro name| No identifier" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_31.c b/libraries/mcpp/cpp-test/test-t/e_31.c new file mode 100644 index 000000000..b92c4d01c --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_31.c @@ -0,0 +1,12 @@ +/* e_31.c: Illegal macro calls. */ + +/* { dg-do preprocess } */ + +#define sub( a, b) (a - b) + +/* 31.1: Too many arguments error. */ + sub( x, y, z); /* { dg-error "passed 3 arguments, but takes just 2| used with too many \\(3\\) args| More than necessary 2 argument\\(s\\) in macro call" } */ + +/* 31.2: Too few arguments error. */ + sub( x); /* { dg-error "requires 2 arguments, but only 1 given| used with just one arg| Less than necessary 2 argument\\(s\\) in macro call" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_31_3.c b/libraries/mcpp/cpp-test/test-t/e_31_3.c new file mode 100644 index 000000000..3257668e3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_31_3.c @@ -0,0 +1,14 @@ +/* e_31_3.c: Macro call in control line should complete in the line. */ + +/* { dg-do preprocess } */ + +#define glue( a, b) a ## b +#define str( s) # s +#define xstr( s) str( s) + +/* 31.3: Unterminated macro call. */ +#include xstr( glue( header, + .h)) +/* [ dg-error "unterminated argument list| (U|u)nterminated macro call" "" { target *-*-* } 10 } */ +/* { dg-excess-errors "" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_32_5.c b/libraries/mcpp/cpp-test/test-t/e_32_5.c new file mode 100644 index 000000000..37d07d267 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_32_5.c @@ -0,0 +1,10 @@ +/* e_32_5.c: Range error of character constant. */ + +/* { dg-do preprocess } */ + +/* 32.5: Value of a numerical escape sequence in character constant should + be in the range of char. */ +/* Out of range */ +#if '\x123' == 0x123 /* { dg-error "escape sequence out of range| hex character constant does not fit in a byte| 8 bits can't represent escape sequence" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_33_2.c b/libraries/mcpp/cpp-test/test-t/e_33_2.c new file mode 100644 index 000000000..456456964 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_33_2.c @@ -0,0 +1,11 @@ +/* e_33_2.c: Out of range of numerical escape sequence in wide-char. */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic-errors -Wall" } */ + +/* 33.2: Value of a numerical escape sequence in wide-character constant + should be in the range of wchar_t. */ +#if L'\xabcdef012' == 0xbcdef012 /* Perhaps out of range. */ +/* { dg-error "escape sequence out of range| (16|32) bits can't represent escape sequence" "" { target *-*-* } 8 } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_35_2.c b/libraries/mcpp/cpp-test/test-t/e_35_2.c new file mode 100644 index 000000000..135273041 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_35_2.c @@ -0,0 +1,9 @@ +/* e_35_2.c: Out of range of character constant. */ + +/* { dg-do preprocess } */ + +/* 35.2: */ +/* Perhaps out of range. */ +#if 'abcdefghi' /* { dg-error "character constant too long| out of range" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_4_3.c b/libraries/mcpp/cpp-test/test-t/e_4_3.c new file mode 100644 index 000000000..61dc831fc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_4_3.c @@ -0,0 +1,8 @@ +/* e_4_3.c: Illegal pp-token. */ + +/* { dg-do preprocess } */ + +/* 4.3: Empty character constant is an error. */ +#if '' == 0 /* { dg-error "empty character constant| Empty character constant '', skipped the line\n\[^ \]* error:" "" } */ +#endif /* Maybe the second error */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_7_4.c b/libraries/mcpp/cpp-test/test-t/e_7_4.c new file mode 100644 index 000000000..7d7102d41 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_7_4.c @@ -0,0 +1,11 @@ +/* e_7_4.c: #line error. */ + +/* { dg-do preprocess } */ + +/* 7.4: string literal in #line directive shall be a character string + literal. */ + +#line 123 L"wide" /* { dg-error "not a valid filename| invalid format| Not a file name" } */ +/* 10; "e_7_4.c"; */ + __LINE__; __FILE__; + diff --git a/libraries/mcpp/cpp-test/test-t/e_intmax.c b/libraries/mcpp/cpp-test/test-t/e_intmax.c new file mode 100644 index 000000000..e7e7ca214 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_intmax.c @@ -0,0 +1,18 @@ +/* e_intmax.c: Overflow of constant expression in #if directive. */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -pedantic-errors -w" } */ + +#define INTMAX_MAX 0x7FFFFFFFFFFFFFFF +#define INTMAX_MIN (-INTMAX_MAX-1) +#define SHRT_MAX 0x7FFF + +#if INTMAX_MAX - INTMAX_MIN /* { dg-error "integer overflow in preprocessor expression| Result of \"-\" is out of range" } */ +#endif +#if INTMAX_MAX + 1 > SHRT_MAX /* { dg-error "integer overflow in preprocessor expression| Result of \"\\+\" is out of range" } */ +#endif +#if INTMAX_MIN - 1 /* { dg-error "integer overflow in preprocessor expression| Result of \"-\" is out of range" } */ +#endif +#if INTMAX_MAX * 2 /* { dg-error "integer overflow in preprocessor expression| Result of \"\\*\" is out of range" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/e_operat.C b/libraries/mcpp/cpp-test/test-t/e_operat.C new file mode 100644 index 000000000..9659ab4ea --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_operat.C @@ -0,0 +1,13 @@ +/* e_operat.C */ +/* + * In C++98 the 11 identifier-like tokens are operators, not identifiers. + * Note: in C95 these are defined as macros by . + */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c++98 -pedantic-errors" } */ + +/* Cannot define operator as a macro. */ +#define and && /* { dg-error "cannot be used as a macro name| is defined as macro" } */ +#define xor_eq ^= /* { dg-error "cannot be used as a macro name| is defined as macro" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_pragma.c b/libraries/mcpp/cpp-test/test-t/e_pragma.c new file mode 100644 index 000000000..a6fa59a8a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_pragma.c @@ -0,0 +1,9 @@ +/* e_pragma.c: Erroneous use of _Pragma() operator */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -pedantic-errors" } */ + +/* Operand of _Pragma() should be a string literal */ + _Pragma( This is not a string literal) +/* { dg-error "_Pragma takes a parenthesized string literal| Operand of _Pragma\\(\\) is not a string literal" "" { target *-*-* } 7 } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_ucn.c b/libraries/mcpp/cpp-test/test-t/e_ucn.c new file mode 100644 index 000000000..b66f9a0e0 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_ucn.c @@ -0,0 +1,14 @@ +/* e_ucn.c: Errors of Universal-character-name sequense. */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -pedantic-errors" } */ + +#define macro\U0000001F /* violation of constraint */ +/* { dg-error "universal-character-name| UCN cannot specify the value" "" { target *-*-* } 6 } */ +#define macro\uD800 /* violation of constraint (only C, not for C++) */ +/* { dg-error "universal-character-name| UCN cannot specify the value" "" { target *-*-* } 8 } */ +#define macro\u123 /* too short sequence (violation of syntax rule) */ +/* { dg-error "incomplete universal-character-name| Illegal UCN sequence" "" { target *-*-* } 10 } */ +#define macro\U1234567 /* also too short sequence */ +/* { dg-error "incomplete universal-character-name| Illegal UCN sequence" "" { target *-*-* } 12 } */ + diff --git a/libraries/mcpp/cpp-test/test-t/e_vargs.c b/libraries/mcpp/cpp-test/test-t/e_vargs.c new file mode 100644 index 000000000..40f386a21 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/e_vargs.c @@ -0,0 +1,24 @@ +/* e_vargs.c: Error of variable arguments macro */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -pedantic-errors" } */ + +/* e_vargs1: Erroneous usage of __VA_ARGS__ */ + +/* __VA_ARGS__ should not be defined. */ + #define __VA_ARGS__ (x, y, z) +/* { dg-error "__VA_ARGS__| shouldn't be defined" "" { target *-*-* } 9 } */ + +/* + * __VA_ARGS__ should be the parameter name in replacement list + * corresponding to '...'. + */ + #define wrong_macro( a, b, __VA_ARGS__) (a + b - __VA_ARGS__) +/* { dg-error "variadic macro\n\[\^ \]*( error:|) __VA_ARGS__| reserved name `__VA_ARGS__'| Illegal parameter" "" { target *-*-* } 16 } */ + +/* e_vargs2: Erroneous macro invocation of variable arguments */ + /* No argument to correspond __VA_ARGS__ */ + #define debug( ...) fprintf( stderr, __VA_ARGS__) + debug(); +/* { dg-warning "Empty argument" "" { target *-*-* } 22 } */ +/* dg-warning, not dg-error to avoid a problem of GCC 4.3 testsuite */ diff --git a/libraries/mcpp/cpp-test/test-t/header.h b/libraries/mcpp/cpp-test/test-t/header.h new file mode 100644 index 000000000..bc9a9fd12 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/header.h @@ -0,0 +1,5 @@ +/* header.h */ + +#define MACRO_xyz xyz +#define MACRO_zyx zyx + diff --git a/libraries/mcpp/cpp-test/test-t/i_32_3.c b/libraries/mcpp/cpp-test/test-t/i_32_3.c new file mode 100644 index 000000000..39472d524 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/i_32_3.c @@ -0,0 +1,15 @@ +/* i_32_3.c: Character constant in #if expression. */ + +/* In ASCII character set. */ +/* 32.3: */ +#if 'a' != 0x61 +#error Not ASCII character set, or bad evaluation of character constant. +#endif + +/* 32.4: '\a' and '\v' */ +#if '\a' != 7 || '\v' != 11 +#error Not ASCII character set, or bad evaluation of escape sequences. +#endif + +/* { dg-do preprocess } */ + diff --git a/libraries/mcpp/cpp-test/test-t/i_35.c b/libraries/mcpp/cpp-test/test-t/i_35.c new file mode 100644 index 000000000..626229bda --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/i_35.c @@ -0,0 +1,11 @@ +/* i_35.c: Multi-character character constant. */ + +/* In ASCII character set. */ +/* 35.1: */ +#if ('ab' != '\x61\x62') || ('\aa' != '\7\x61') +#error Bad handling of multi-character character constant. +#endif + +/* { dg-do preprocess } + { dg-options -w } */ + diff --git a/libraries/mcpp/cpp-test/test-t/ifdef15.h b/libraries/mcpp/cpp-test/test-t/ifdef15.h new file mode 100644 index 000000000..9f457bfaa --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/ifdef15.h @@ -0,0 +1,50 @@ +/* ifdef15.h */ + +#ifdef X01 +#else +#ifdef X02 +#else +#ifdef X03 +#else +#ifdef X04 +#else +#ifdef X05 +#else +#ifdef X06 +#else +#ifdef X07 +#else +#ifdef X08 +#else +#ifdef X09 +#else +#ifdef X0A +#else +#ifdef X0B +#else +#ifdef X0C +#else +#ifdef X0D +#else +#ifdef X0E +#else +#ifdef X0F + ifdef_nest = 0x0f; +#else +#include "ifdef31.h" +#endif /* X0F */ +#endif /* X0E */ +#endif /* X0D */ +#endif /* X0C */ +#endif /* X0B */ +#endif /* X0A */ +#endif /* X09 */ +#endif /* X08 */ +#endif /* X07 */ +#endif /* X06 */ +#endif /* X05 */ +#endif /* X04 */ +#endif /* X03 */ +#endif /* X02 */ +#endif /* X01 */ + diff --git a/libraries/mcpp/cpp-test/test-t/ifdef31.h b/libraries/mcpp/cpp-test/test-t/ifdef31.h new file mode 100644 index 000000000..9923fbbc5 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/ifdef31.h @@ -0,0 +1,52 @@ +/* ifdef31.h */ + +#ifdef X10 +#else +#ifdef X11 +#else +#ifdef X12 +#else +#ifdef X13 +#else +#ifdef X14 +#else +#ifdef X15 +#else +#ifdef X16 +#else +#ifdef X17 +#else +#ifdef X18 +#else +#ifdef X19 +#else +#ifdef X1A +#else +#ifdef X1B +#else +#ifdef X1C +#else +#ifdef X1D +#else +#ifdef X1E +#else +#ifdef X1F + ifdef_nest = 0x1f; +#else +#include "ifdef63.h" +#endif /* X1F */ +#endif /* X1E */ +#endif /* X1D */ +#endif /* X1C */ +#endif /* X1B */ +#endif /* X1A */ +#endif /* X19 */ +#endif /* X18 */ +#endif /* X17 */ +#endif /* X16 */ +#endif /* X15 */ +#endif /* X14 */ +#endif /* X13 */ +#endif /* X12 */ +#endif /* X11 */ +#endif /* X10 */ diff --git a/libraries/mcpp/cpp-test/test-t/ifdef63.h b/libraries/mcpp/cpp-test/test-t/ifdef63.h new file mode 100644 index 000000000..85aac0e6b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/ifdef63.h @@ -0,0 +1,99 @@ +/* ifdef63.h */ + +#ifdef X20 +#else +#ifdef X21 +#else +#ifdef X22 +#else +#ifdef X23 +#else +#ifdef X24 +#else +#ifdef X25 +#else +#ifdef X26 +#else +#ifdef X27 +#else +#ifdef X28 +#else +#ifdef X29 +#else +#ifdef X2A +#else +#ifdef X2B +#else +#ifdef X2C +#else +#ifdef X2D +#else +#ifdef X2E +#else +#ifdef X2F +#else +#ifdef X30 +#else +#ifdef X31 +#else +#ifdef X32 +#else +#ifdef X33 +#else +#ifdef X34 +#else +#ifdef X35 +#else +#ifdef X36 +#else +#ifdef X37 +#else +#ifdef X38 +#else +#ifdef X39 +#else +#ifdef X3A +#else +#ifdef X3B +#else +#ifdef X3C +#else +#ifdef X3D +#else +#ifdef X3E +#else +#ifdef X3F + ifdef_nest = 0x3f; +#endif /* X3F */ +#endif /* X3E */ +#endif /* X3D */ +#endif /* X3C */ +#endif /* X3B */ +#endif /* X3A */ +#endif /* X39 */ +#endif /* X38 */ +#endif /* X37 */ +#endif /* X36 */ +#endif /* X35 */ +#endif /* X34 */ +#endif /* X33 */ +#endif /* X32 */ +#endif /* X31 */ +#endif /* X30 */ +#endif /* X2F */ +#endif /* X2E */ +#endif /* X2D */ +#endif /* X2C */ +#endif /* X2B */ +#endif /* X2A */ +#endif /* X29 */ +#endif /* X28 */ +#endif /* X27 */ +#endif /* X26 */ +#endif /* X25 */ +#endif /* X24 */ +#endif /* X23 */ +#endif /* X22 */ +#endif /* X21 */ +#endif /* X20 */ + diff --git a/libraries/mcpp/cpp-test/test-t/line.h b/libraries/mcpp/cpp-test/test-t/line.h new file mode 100644 index 000000000..4ebdafd33 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/line.h @@ -0,0 +1,3 @@ +/* line.h */ + + __LINE__; __FILE__; diff --git a/libraries/mcpp/cpp-test/test-t/long4095.h b/libraries/mcpp/cpp-test/test-t/long4095.h new file mode 100644 index 000000000..294b304b9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/long4095.h @@ -0,0 +1,166 @@ +/* long4095.c: logical source line of 4095 bytes long. */ + +typedef int wchar_t; \ +typedef struct { \ +rune_t min; \ +rune_t max; \ +rune_t map; \ +unsigned long *types; \ +} _RuneEntry; \ + \ +typedef struct { \ +int nranges; \ +_RuneEntry *ranges; \ +} _RuneRange; \ + \ +typedef struct { \ +char magic[8]; \ +char encoding[32]; \ + \ +rune_t (*sgetrune) \ + (const char *, unsigned int, char const **) ; \ +int (*sputrune) \ + (rune_t, char *, unsigned int, char **) ; \ +rune_t invalid_rune; \ + \ +unsigned long runetype[ (1 <<8 ) ]; \ +rune_t maplower[ (1 <<8 ) ]; \ +rune_t mapupper[ (1 <<8 ) ]; \ +_RuneRange runetype_ext; \ +_RuneRange maplower_ext; \ +_RuneRange mapupper_ext; \ + \ +void *variable; \ +int variable_len; \ +} _RuneLocale; \ + \ + \ + \ +extern _RuneLocale _DefaultRuneLocale; \ +extern _RuneLocale *_CurrentRuneLocale; \ + \ +unsigned long ___runetype ( int ) ; \ + int ___tolower ( int ) ; \ + int ___toupper ( int ) ; \ + \ + \ +int __istype ( int , unsigned long) ; \ +int __isctype ( int , unsigned long) ; \ + int toupper ( int ) ; \ + int tolower ( int ) ; \ + \ +extern int errno; \ + \ +void *memchr (const void *, int, size_t) ; \ +int memcmp (const void *, const void *, size_t) ; \ +void *memcpy (void *, const void *, size_t) ; \ +void *memmove (void *, const void *, size_t) ; \ +void *memset (void *, int, size_t) ; \ +char *strcat (char *, const char *) ; \ +char *strchr (const char *, int) ; \ +int strcmp (const char *, const char *) ; \ +int strcoll (const char *, const char *) ; \ +char *strcpy (char *, const char *) ; \ +size_t strcspn (const char *, const char *) ; \ +char *strerror (int) ; \ +size_t strlen (const char *) ; \ +char *strncat (char *, const char *, size_t) ; \ +int strncmp (const char *, const char *, size_t) ; \ +char *strncpy (char *, const char *, size_t) ; \ +char *strpbrk (const char *, const char *) ; \ +char *strrchr (const char *, int) ; \ +size_t strspn (const char *, const char *) ; \ +char *strstr (const char *, const char *) ; \ +char *strtok (char *, const char *) ; \ +size_t strxfrm (char *, const char *, size_t) ; \ + \ + \ + \ +int bcmp (const void *, const void *, size_t) ; \ +void bcopy (const void *, void *, size_t) ; \ +void bzero (void *, size_t) ; \ +int ffs (int) ; \ +char *index (const char *, int) ; \ +void *memccpy (void *, const void *, int, size_t) ; \ +char *rindex (const char *, int) ; \ +int strcasecmp (const char *, const char *) ; \ +char *strdup (const char *) ; \ +void strmode (int, char *) ; \ +int strncasecmp (const char *, const char *, size_t) ; \ +char *strsep (char **, const char *) ; \ +void swab (const void *, void *, size_t) ; \ + \ + \ +typedef struct { \ +int quot; \ +int rem; \ +} div_t; \ + \ +typedef struct { \ +long quot; \ +long rem; \ +} ldiv_t; \ +extern int __mb_cur_max; \ + \ + \ + void \ +abort (void) ; \ + int \ +abs (int) ; \ +int atexit (void (*)(void)) ; \ +double atof (const char *) ; \ +int atoi (const char *) ; \ +long atol (const char *) ; \ +void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +void *calloc (size_t, size_t) ; \ + div_t \ +div (int, int) ; \ + void \ +exit (int) ; \ +void free (void *) ; \ +char *getenv (const char *) ; \ + long \ +labs (long) ; \ + ldiv_t \ +ldiv (long, long) ; \ +void *malloc (size_t) ; \ +void qsort (void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +int rand (void) ; \ +void *realloc (void *, size_t) ; \ +void srand (unsigned) ; \ +double strtod (const char *, char **) ; \ +long strtol (const char *, char **, int) ; \ +unsigned long \ +strtoul (const char *, char **, int) ; \ +int system (const char *) ; \ + \ + \ +int mblen (const char *, size_t) ; \ +size_t mbstowcs (wchar_t *, const char *, size_t) ; \ +int wctomb (char *, wchar_t) ; \ +int mbtowc (wchar_t *, const char *, size_t) ; \ +size_t wcstombs (char *, const wchar_t *, size_t) ; \ + \ + \ +int putenv (const char *) ; \ +int setenv (const char *, const char *, int) ; \ + \ + \ + \ +double drand48 (void) ; \ +double erand48 (unsigned short[3]) ; \ +long lrand48 (void) ; \ +long nrand48 (unsigned short[3]) ; \ +long mrand48 (void) ; \ +long jrand48 (unsigned short[3]) ; \ +void srand48 (long) ; \ +unsigned short *seed48 (unsigned short[3]) ; \ +void lcong48 (unsigned short[7]) ; \ + \ +void *alloca (size_t) ; \ + \ +char *getbsize (int *, long *) ; \ +char *cgetcap (char *, char *, int) ; \ +int cgetclose (void) ; \ + \ + diff --git a/libraries/mcpp/cpp-test/test-t/m4095.h b/libraries/mcpp/cpp-test/test-t/m4095.h new file mode 100644 index 000000000..4ba3a025e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/m4095.h @@ -0,0 +1,4101 @@ +/* m4095.h */ +#define AAA +#define AAB +#define AAC +#define AAD +#define AAE +#define AAF +#define AAG +#define AAH +#define AAI +#define AAJ +#define AAK +#define AAL +#define AAM +#define AAN +#define AAO +#define AAP +#define AAQ +#define AAR +#define AAS +#define AAT +#define AAU +#define AAV +#define AAW +#define AAX +#define AAY +#define AAZ +#define ABA +#define ABB +#define ABC +#define ABD +#define ABE +#define ABF +#define ABG +#define ABH +#define ABI +#define ABJ +#define ABK +#define ABL +#define ABM +#define ABN +#define ABO +#define ABP +#define ABQ +#define ABR +#define ABS +#define ABT +#define ABU +#define ABV +#define ABW +#define ABX +#define ABY +#define ABZ +#define ACA +#define ACB +#define ACC +#define ACD +#define ACE +#define ACF +#define ACG +#define ACH +#define ACI +#define ACJ +#define ACK +#define ACL +#define ACM +#define ACN +#define ACO +#define ACP +#define ACQ +#define ACR +#define ACS +#define ACT +#define ACU +#define ACV +#define ACW +#define ACX +#define ACY +#define ACZ +#define ADA +#define ADB +#define ADC +#define ADD +#define ADE +#define ADF +#define ADG +#define ADH +#define ADI +#define ADJ +#define ADK +#define ADL +#define ADM +#define ADN +#define ADO +#define ADP +#define ADQ +#define ADR +#define ADS +#define ADT +#define ADU +#define ADV +#define ADW +#define ADX +#define ADY +#define ADZ +#define AEA +#define AEB +#define AEC +#define AED +#define AEE +#define AEF +#define AEG +#define AEH +#define AEI +#define AEJ +#define AEK +#define AEL +#define AEM +#define AEN +#define AEO +#define AEP +#define AEQ +#define AER +#define AES +#define AET +#define AEU +#define AEV +#define AEW +#define AEX +#define AEY +#define AEZ +#define AFA +#define AFB +#define AFC +#define AFD +#define AFE +#define AFF +#define AFG +#define AFH +#define AFI +#define AFJ +#define AFK +#define AFL +#define AFM +#define AFN +#define AFO +#define AFP +#define AFQ +#define AFR +#define AFS +#define AFT +#define AFU +#define AFV +#define AFW +#define AFX +#define AFY +#define AFZ +#define AGA +#define AGB +#define AGC +#define AGD +#define AGE +#define AGF +#define AGG +#define AGH +#define AGI +#define AGJ +#define AGK +#define AGL +#define AGM +#define AGN +#define AGO +#define AGP +#define AGQ +#define AGR +#define AGS +#define AGT +#define AGU +#define AGV +#define AGW +#define AGX +#define AGY +#define AGZ +#define AHA +#define AHB +#define AHC +#define AHD +#define AHE +#define AHF +#define AHG +#define AHH +#define AHI +#define AHJ +#define AHK +#define AHL +#define AHM +#define AHN +#define AHO +#define AHP +#define AHQ +#define AHR +#define AHS +#define AHT +#define AHU +#define AHV +#define AHW +#define AHX +#define AHY +#define AHZ +#define AIA +#define AIB +#define AIC +#define AID +#define AIE +#define AIF +#define AIG +#define AIH +#define AII +#define AIJ +#define AIK +#define AIL +#define AIM +#define AIN +#define AIO +#define AIP +#define AIQ +#define AIR +#define AIS +#define AIT +#define AIU +#define AIV +#define AIW +#define AIX +#define AIY +#define AIZ +#define AJA +#define AJB +#define AJC +#define AJD +#define AJE +#define AJF +#define AJG +#define AJH +#define AJI +#define AJJ +#define AJK +#define AJL +#define AJM +#define AJN +#define AJO +#define AJP +#define AJQ +#define AJR +#define AJS +#define AJT +#define AJU +#define AJV +#define AJW +#define AJX +#define AJY +#define AJZ +#define AKA +#define AKB +#define AKC +#define AKD +#define AKE +#define AKF +#define AKG +#define AKH +#define AKI +#define AKJ +#define AKK +#define AKL +#define AKM +#define AKN +#define AKO +#define AKP +#define AKQ +#define AKR +#define AKS +#define AKT +#define AKU +#define AKV +#define AKW +#define AKX +#define AKY +#define AKZ +#define ALA +#define ALB +#define ALC +#define ALD +#define ALE +#define ALF +#define ALG +#define ALH +#define ALI +#define ALJ +#define ALK +#define ALL +#define ALM +#define ALN +#define ALO +#define ALP +#define ALQ +#define ALR +#define ALS +#define ALT +#define ALU +#define ALV +#define ALW +#define ALX +#define ALY +#define ALZ +#define AMA +#define AMB +#define AMC +#define AMD +#define AME +#define AMF +#define AMG +#define AMH +#define AMI +#define AMJ +#define AMK +#define AML +#define AMM +#define AMN +#define AMO +#define AMP +#define AMQ +#define AMR +#define AMS +#define AMT +#define AMU +#define AMV +#define AMW +#define AMX +#define AMY +#define AMZ +#define ANA +#define ANB +#define ANC +#define AND +#define ANE +#define ANF +#define ANG +#define ANH +#define ANI +#define ANJ +#define ANK +#define ANL +#define ANM +#define ANN +#define ANO +#define ANP +#define ANQ +#define ANR +#define ANS +#define ANT +#define ANU +#define ANV +#define ANW +#define ANX +#define ANY +#define ANZ +#define AOA +#define AOB +#define AOC +#define AOD +#define AOE +#define AOF +#define AOG +#define AOH +#define AOI +#define AOJ +#define AOK +#define AOL +#define AOM +#define AON +#define AOO +#define AOP +#define AOQ +#define AOR +#define AOS +#define AOT +#define AOU +#define AOV +#define AOW +#define AOX +#define AOY +#define AOZ +#define APA +#define APB +#define APC +#define APD +#define APE +#define APF +#define APG +#define APH +#define API +#define APJ +#define APK +#define APL +#define APM +#define APN +#define APO +#define APP +#define APQ +#define APR +#define APS +#define APT +#define APU +#define APV +#define APW +#define APX +#define APY +#define APZ +#define AQA +#define AQB +#define AQC +#define AQD +#define AQE +#define AQF +#define AQG +#define AQH +#define AQI +#define AQJ +#define AQK +#define AQL +#define AQM +#define AQN +#define AQO +#define AQP +#define AQQ +#define AQR +#define AQS +#define AQT +#define AQU +#define AQV +#define AQW +#define AQX +#define AQY +#define AQZ +#define ARA +#define ARB +#define ARC +#define ARD +#define ARE +#define ARF +#define ARG +#define ARH +#define ARI +#define ARJ +#define ARK +#define ARL +#define ARM +#define ARN +#define ARO +#define ARP +#define ARQ +#define ARR +#define ARS +#define ART +#define ARU +#define ARV +#define ARW +#define ARX +#define ARY +#define ARZ +#define ASA +#define ASB +#define ASC +#define ASD +#define ASE +#define ASF +#define ASG +#define ASH +#define ASI +#define ASJ +#define ASK +#define ASL +#define ASM +#define ASN +#define ASO +#define ASP +#define ASQ +#define ASR +#define ASS +#define AST +#define ASU +#define ASV +#define ASW +#define ASX +#define ASY +#define ASZ +#define ATA +#define ATB +#define ATC +#define ATD +#define ATE +#define ATF +#define ATG +#define ATH +#define ATI +#define ATJ +#define ATK +#define ATL +#define ATM +#define ATN +#define ATO +#define ATP +#define ATQ +#define ATR +#define ATS +#define ATT +#define ATU +#define ATV +#define ATW +#define ATX +#define ATY +#define ATZ +#define AUA +#define AUB +#define AUC +#define AUD +#define AUE +#define AUF +#define AUG +#define AUH +#define AUI +#define AUJ +#define AUK +#define AUL +#define AUM +#define AUN +#define AUO +#define AUP +#define AUQ +#define AUR +#define AUS +#define AUT +#define AUU +#define AUV +#define AUW +#define AUX +#define AUY +#define AUZ +#define AVA +#define AVB +#define AVC +#define AVD +#define AVE +#define AVF +#define AVG +#define AVH +#define AVI +#define AVJ +#define AVK +#define AVL +#define AVM +#define AVN +#define AVO +#define AVP +#define AVQ +#define AVR +#define AVS +#define AVT +#define AVU +#define AVV +#define AVW +#define AVX +#define AVY +#define AVZ +#define AWA +#define AWB +#define AWC +#define AWD +#define AWE +#define AWF +#define AWG +#define AWH +#define AWI +#define AWJ +#define AWK +#define AWL +#define AWM +#define AWN +#define AWO +#define AWP +#define AWQ +#define AWR +#define AWS +#define AWT +#define AWU +#define AWV +#define AWW +#define AWX +#define AWY +#define AWZ +#define AXA +#define AXB +#define AXC +#define AXD +#define AXE +#define AXF +#define AXG +#define AXH +#define AXI +#define AXJ +#define AXK +#define AXL +#define AXM +#define AXN +#define AXO +#define AXP +#define AXQ +#define AXR +#define AXS +#define AXT +#define AXU +#define AXV +#define AXW +#define AXX +#define AXY +#define AXZ +#define AYA +#define AYB +#define AYC +#define AYD +#define AYE +#define AYF +#define AYG +#define AYH +#define AYI +#define AYJ +#define AYK +#define AYL +#define AYM +#define AYN +#define AYO +#define AYP +#define AYQ +#define AYR +#define AYS +#define AYT +#define AYU +#define AYV +#define AYW +#define AYX +#define AYY +#define AYZ +#define AZA +#define AZB +#define AZC +#define AZD +#define AZE +#define AZF +#define AZG +#define AZH +#define AZI +#define AZJ +#define AZK +#define AZL +#define AZM +#define AZN +#define AZO +#define AZP +#define AZQ +#define AZR +#define AZS +#define AZT +#define AZU +#define AZV +#define AZW +#define AZX +#define AZY +#define AZZ +#define BAA +#define BAB +#define BAC +#define BAD +#define BAE +#define BAF +#define BAG +#define BAH +#define BAI +#define BAJ +#define BAK +#define BAL +#define BAM +#define BAN +#define BAO +#define BAP +#define BAQ +#define BAR +#define BAS +#define BAT +#define BAU +#define BAV +#define BAW +#define BAX +#define BAY +#define BAZ +#define BBA +#define BBB +#define BBC +#define BBD +#define BBE +#define BBF +#define BBG +#define BBH +#define BBI +#define BBJ +#define BBK +#define BBL +#define BBM +#define BBN +#define BBO +#define BBP +#define BBQ +#define BBR +#define BBS +#define BBT +#define BBU +#define BBV +#define BBW +#define BBX +#define BBY +#define BBZ +#define BCA +#define BCB +#define BCC +#define BCD +#define BCE +#define BCF +#define BCG +#define BCH +#define BCI +#define BCJ +#define BCK +#define BCL +#define BCM +#define BCN +#define BCO +#define BCP +#define BCQ +#define BCR +#define BCS +#define BCT +#define BCU +#define BCV +#define BCW +#define BCX +#define BCY +#define BCZ +#define BDA +#define BDB +#define BDC +#define BDD +#define BDE +#define BDF +#define BDG +#define BDH +#define BDI +#define BDJ +#define BDK +#define BDL +#define BDM +#define BDN +#define BDO +#define BDP +#define BDQ +#define BDR +#define BDS +#define BDT +#define BDU +#define BDV +#define BDW +#define BDX +#define BDY +#define BDZ +#define BEA +#define BEB +#define BEC +#define BED +#define BEE +#define BEF +#define BEG +#define BEH +#define BEI +#define BEJ +#define BEK +#define BEL +#define BEM +#define BEN +#define BEO +#define BEP +#define BEQ +#define BER +#define BES +#define BET +#define BEU +#define BEV +#define BEW +#define BEX +#define BEY +#define BEZ +#define BFA +#define BFB +#define BFC +#define BFD +#define BFE +#define BFF +#define BFG +#define BFH +#define BFI +#define BFJ +#define BFK +#define BFL +#define BFM +#define BFN +#define BFO +#define BFP +#define BFQ +#define BFR +#define BFS +#define BFT +#define BFU +#define BFV +#define BFW +#define BFX +#define BFY +#define BFZ +#define BGA +#define BGB +#define BGC +#define BGD +#define BGE +#define BGF +#define BGG +#define BGH +#define BGI +#define BGJ +#define BGK +#define BGL +#define BGM +#define BGN +#define BGO +#define BGP +#define BGQ +#define BGR +#define BGS +#define BGT +#define BGU +#define BGV +#define BGW +#define BGX +#define BGY +#define BGZ +#define BHA +#define BHB +#define BHC +#define BHD +#define BHE +#define BHF +#define BHG +#define BHH +#define BHI +#define BHJ +#define BHK +#define BHL +#define BHM +#define BHN +#define BHO +#define BHP +#define BHQ +#define BHR +#define BHS +#define BHT +#define BHU +#define BHV +#define BHW +#define BHX +#define BHY +#define BHZ +#define BIA +#define BIB +#define BIC +#define BID +#define BIE +#define BIF +#define BIG +#define BIH +#define BII +#define BIJ +#define BIK +#define BIL +#define BIM +#define BIN +#define BIO +#define BIP +#define BIQ +#define BIR +#define BIS +#define BIT +#define BIU +#define BIV +#define BIW +#define BIX +#define BIY +#define BIZ +#define BJA +#define BJB +#define BJC +#define BJD +#define BJE +#define BJF +#define BJG +#define BJH +#define BJI +#define BJJ +#define BJK +#define BJL +#define BJM +#define BJN +#define BJO +#define BJP +#define BJQ +#define BJR +#define BJS +#define BJT +#define BJU +#define BJV +#define BJW +#define BJX +#define BJY +#define BJZ +#define BKA +#define BKB +#define BKC +#define BKD +#define BKE +#define BKF +#define BKG +#define BKH +#define BKI +#define BKJ +#define BKK +#define BKL +#define BKM +#define BKN +#define BKO +#define BKP +#define BKQ +#define BKR +#define BKS +#define BKT +#define BKU +#define BKV +#define BKW +#define BKX +#define BKY +#define BKZ +#define BLA +#define BLB +#define BLC +#define BLD +#define BLE +#define BLF +#define BLG +#define BLH +#define BLI +#define BLJ +#define BLK +#define BLL +#define BLM +#define BLN +#define BLO +#define BLP +#define BLQ +#define BLR +#define BLS +#define BLT +#define BLU +#define BLV +#define BLW +#define BLX +#define BLY +#define BLZ +#define BMA +#define BMB +#define BMC +#define BMD +#define BME +#define BMF +#define BMG +#define BMH +#define BMI +#define BMJ +#define BMK +#define BML +#define BMM +#define BMN +#define BMO +#define BMP +#define BMQ +#define BMR +#define BMS +#define BMT +#define BMU +#define BMV +#define BMW +#define BMX +#define BMY +#define BMZ +#define BNA +#define BNB +#define BNC +#define BND +#define BNE +#define BNF +#define BNG +#define BNH +#define BNI +#define BNJ 0x0400 +#ifndef X0400 +#define BNK +#define BNL +#define BNM +#define BNN +#define BNO +#define BNP +#define BNQ +#define BNR +#define BNS +#define BNT +#define BNU +#define BNV +#define BNW +#define BNX +#define BNY +#define BNZ +#define BOA +#define BOB +#define BOC +#define BOD +#define BOE +#define BOF +#define BOG +#define BOH +#define BOI +#define BOJ +#define BOK +#define BOL +#define BOM +#define BON +#define BOO +#define BOP +#define BOQ +#define BOR +#define BOS +#define BOT +#define BOU +#define BOV +#define BOW +#define BOX +#define BOY +#define BOZ +#define BPA +#define BPB +#define BPC +#define BPD +#define BPE +#define BPF +#define BPG +#define BPH +#define BPI +#define BPJ +#define BPK +#define BPL +#define BPM +#define BPN +#define BPO +#define BPP +#define BPQ +#define BPR +#define BPS +#define BPT +#define BPU +#define BPV +#define BPW +#define BPX +#define BPY +#define BPZ +#define BQA +#define BQB +#define BQC +#define BQD +#define BQE +#define BQF +#define BQG +#define BQH +#define BQI +#define BQJ +#define BQK +#define BQL +#define BQM +#define BQN +#define BQO +#define BQP +#define BQQ +#define BQR +#define BQS +#define BQT +#define BQU +#define BQV +#define BQW +#define BQX +#define BQY +#define BQZ +#define BRA +#define BRB +#define BRC +#define BRD +#define BRE +#define BRF +#define BRG +#define BRH +#define BRI +#define BRJ +#define BRK +#define BRL +#define BRM +#define BRN +#define BRO +#define BRP +#define BRQ +#define BRR +#define BRS +#define BRT +#define BRU +#define BRV +#define BRW +#define BRX +#define BRY +#define BRZ +#define BSA +#define BSB +#define BSC +#define BSD +#define BSE +#define BSF +#define BSG +#define BSH +#define BSI +#define BSJ +#define BSK +#define BSL +#define BSM +#define BSN +#define BSO +#define BSP +#define BSQ +#define BSR +#define BSS +#define BST +#define BSU +#define BSV +#define BSW +#define BSX +#define BSY +#define BSZ +#define BTA +#define BTB +#define BTC +#define BTD +#define BTE +#define BTF +#define BTG +#define BTH +#define BTI +#define BTJ +#define BTK +#define BTL +#define BTM +#define BTN +#define BTO +#define BTP +#define BTQ +#define BTR +#define BTS +#define BTT +#define BTU +#define BTV +#define BTW +#define BTX +#define BTY +#define BTZ +#define BUA +#define BUB +#define BUC +#define BUD +#define BUE +#define BUF +#define BUG +#define BUH +#define BUI +#define BUJ +#define BUK +#define BUL +#define BUM +#define BUN +#define BUO +#define BUP +#define BUQ +#define BUR +#define BUS +#define BUT +#define BUU +#define BUV +#define BUW +#define BUX +#define BUY +#define BUZ +#define BVA +#define BVB +#define BVC +#define BVD +#define BVE +#define BVF +#define BVG +#define BVH +#define BVI +#define BVJ +#define BVK +#define BVL +#define BVM +#define BVN +#define BVO +#define BVP +#define BVQ +#define BVR +#define BVS +#define BVT +#define BVU +#define BVV +#define BVW +#define BVX +#define BVY +#define BVZ +#define BWA +#define BWB +#define BWC +#define BWD +#define BWE +#define BWF +#define BWG +#define BWH +#define BWI +#define BWJ +#define BWK +#define BWL +#define BWM +#define BWN +#define BWO +#define BWP +#define BWQ +#define BWR +#define BWS +#define BWT +#define BWU +#define BWV +#define BWW +#define BWX +#define BWY +#define BWZ +#define BXA +#define BXB +#define BXC +#define BXD +#define BXE +#define BXF +#define BXG +#define BXH +#define BXI +#define BXJ +#define BXK +#define BXL +#define BXM +#define BXN +#define BXO +#define BXP +#define BXQ +#define BXR +#define BXS +#define BXT +#define BXU +#define BXV +#define BXW +#define BXX +#define BXY +#define BXZ +#define BYA +#define BYB +#define BYC +#define BYD +#define BYE +#define BYF +#define BYG +#define BYH +#define BYI +#define BYJ +#define BYK +#define BYL +#define BYM +#define BYN +#define BYO +#define BYP +#define BYQ +#define BYR +#define BYS +#define BYT +#define BYU +#define BYV +#define BYW +#define BYX +#define BYY +#define BYZ +#define BZA +#define BZB +#define BZC +#define BZD +#define BZE +#define BZF +#define BZG +#define BZH +#define BZI +#define BZJ +#define BZK +#define BZL +#define BZM +#define BZN +#define BZO +#define BZP +#define BZQ +#define BZR +#define BZS +#define BZT +#define BZU +#define BZV +#define BZW +#define BZX +#define BZY +#define BZZ +#define CAA +#define CAB +#define CAC +#define CAD +#define CAE +#define CAF +#define CAG +#define CAH +#define CAI +#define CAJ +#define CAK +#define CAL +#define CAM +#define CAN +#define CAO +#define CAP +#define CAQ +#define CAR +#define CAS +#define CAT +#define CAU +#define CAV +#define CAW +#define CAX +#define CAY +#define CAZ +#define CBA +#define CBB +#define CBC +#define CBD +#define CBE +#define CBF +#define CBG +#define CBH +#define CBI +#define CBJ +#define CBK +#define CBL +#define CBM +#define CBN +#define CBO +#define CBP +#define CBQ +#define CBR +#define CBS +#define CBT +#define CBU +#define CBV +#define CBW +#define CBX +#define CBY +#define CBZ +#define CCA +#define CCB +#define CCC +#define CCD +#define CCE +#define CCF +#define CCG +#define CCH +#define CCI +#define CCJ +#define CCK +#define CCL +#define CCM +#define CCN +#define CCO +#define CCP +#define CCQ +#define CCR +#define CCS +#define CCT +#define CCU +#define CCV +#define CCW +#define CCX +#define CCY +#define CCZ +#define CDA +#define CDB +#define CDC +#define CDD +#define CDE +#define CDF +#define CDG +#define CDH +#define CDI +#define CDJ +#define CDK +#define CDL +#define CDM +#define CDN +#define CDO +#define CDP +#define CDQ +#define CDR +#define CDS +#define CDT +#define CDU +#define CDV +#define CDW +#define CDX +#define CDY +#define CDZ +#define CEA +#define CEB +#define CEC +#define CED +#define CEE +#define CEF +#define CEG +#define CEH +#define CEI +#define CEJ +#define CEK +#define CEL +#define CEM +#define CEN +#define CEO +#define CEP +#define CEQ +#define CER +#define CES +#define CET +#define CEU +#define CEV +#define CEW +#define CEX +#define CEY +#define CEZ +#define CFA +#define CFB +#define CFC +#define CFD +#define CFE +#define CFF +#define CFG +#define CFH +#define CFI +#define CFJ +#define CFK +#define CFL +#define CFM +#define CFN +#define CFO +#define CFP +#define CFQ +#define CFR +#define CFS +#define CFT +#define CFU +#define CFV +#define CFW +#define CFX +#define CFY +#define CFZ +#define CGA +#define CGB +#define CGC +#define CGD +#define CGE +#define CGF +#define CGG +#define CGH +#define CGI +#define CGJ +#define CGK +#define CGL +#define CGM +#define CGN +#define CGO +#define CGP +#define CGQ +#define CGR +#define CGS +#define CGT +#define CGU +#define CGV +#define CGW +#define CGX +#define CGY +#define CGZ +#define CHA +#define CHB +#define CHC +#define CHD +#define CHE +#define CHF +#define CHG +#define CHH +#define CHI +#define CHJ +#define CHK +#define CHL +#define CHM +#define CHN +#define CHO +#define CHP +#define CHQ +#define CHR +#define CHS +#define CHT +#define CHU +#define CHV +#define CHW +#define CHX +#define CHY +#define CHZ +#define CIA +#define CIB +#define CIC +#define CID +#define CIE +#define CIF +#define CIG +#define CIH +#define CII +#define CIJ +#define CIK +#define CIL +#define CIM +#define CIN +#define CIO +#define CIP +#define CIQ +#define CIR +#define CIS +#define CIT +#define CIU +#define CIV +#define CIW +#define CIX +#define CIY +#define CIZ +#define CJA +#define CJB +#define CJC +#define CJD +#define CJE +#define CJF +#define CJG +#define CJH +#define CJI +#define CJJ +#define CJK +#define CJL +#define CJM +#define CJN +#define CJO +#define CJP +#define CJQ +#define CJR +#define CJS +#define CJT +#define CJU +#define CJV +#define CJW +#define CJX +#define CJY +#define CJZ +#define CKA +#define CKB +#define CKC +#define CKD +#define CKE +#define CKF +#define CKG +#define CKH +#define CKI +#define CKJ +#define CKK +#define CKL +#define CKM +#define CKN +#define CKO +#define CKP +#define CKQ +#define CKR +#define CKS +#define CKT +#define CKU +#define CKV +#define CKW +#define CKX +#define CKY +#define CKZ +#define CLA +#define CLB +#define CLC +#define CLD +#define CLE +#define CLF +#define CLG +#define CLH +#define CLI +#define CLJ +#define CLK +#define CLL +#define CLM +#define CLN +#define CLO +#define CLP +#define CLQ +#define CLR +#define CLS +#define CLT +#define CLU +#define CLV +#define CLW +#define CLX +#define CLY +#define CLZ +#define CMA +#define CMB +#define CMC +#define CMD +#define CME +#define CMF +#define CMG +#define CMH +#define CMI +#define CMJ +#define CMK +#define CML +#define CMM +#define CMN +#define CMO +#define CMP +#define CMQ +#define CMR +#define CMS +#define CMT +#define CMU +#define CMV +#define CMW +#define CMX +#define CMY +#define CMZ +#define CNA +#define CNB +#define CNC +#define CND +#define CNE +#define CNF +#define CNG +#define CNH +#define CNI +#define CNJ +#define CNK +#define CNL +#define CNM +#define CNN +#define CNO +#define CNP +#define CNQ +#define CNR +#define CNS +#define CNT +#define CNU +#define CNV +#define CNW +#define CNX +#define CNY +#define CNZ +#define COA +#define COB +#define COC +#define COD +#define COE +#define COF +#define COG +#define COH +#define COI +#define COJ +#define COK +#define COL +#define COM +#define CON +#define COO +#define COP +#define COQ +#define COR +#define COS +#define COT +#define COU +#define COV +#define COW +#define COX +#define COY +#define COZ +#define CPA +#define CPB +#define CPC +#define CPD +#define CPE +#define CPF +#define CPG +#define CPH +#define CPI +#define CPJ +#define CPK +#define CPL +#define CPM +#define CPN +#define CPO +#define CPP +#define CPQ +#define CPR +#define CPS +#define CPT +#define CPU +#define CPV +#define CPW +#define CPX +#define CPY +#define CPZ +#define CQA +#define CQB +#define CQC +#define CQD +#define CQE +#define CQF +#define CQG +#define CQH +#define CQI +#define CQJ +#define CQK +#define CQL +#define CQM +#define CQN +#define CQO +#define CQP +#define CQQ +#define CQR +#define CQS +#define CQT +#define CQU +#define CQV +#define CQW +#define CQX +#define CQY +#define CQZ +#define CRA +#define CRB +#define CRC +#define CRD +#define CRE +#define CRF +#define CRG +#define CRH +#define CRI +#define CRJ +#define CRK +#define CRL +#define CRM +#define CRN +#define CRO +#define CRP +#define CRQ +#define CRR +#define CRS +#define CRT +#define CRU +#define CRV +#define CRW +#define CRX +#define CRY +#define CRZ +#define CSA +#define CSB +#define CSC +#define CSD +#define CSE +#define CSF +#define CSG +#define CSH +#define CSI +#define CSJ +#define CSK +#define CSL +#define CSM +#define CSN +#define CSO +#define CSP +#define CSQ +#define CSR +#define CSS +#define CST +#define CSU +#define CSV +#define CSW +#define CSX +#define CSY +#define CSZ +#define CTA +#define CTB +#define CTC +#define CTD +#define CTE +#define CTF +#define CTG +#define CTH +#define CTI +#define CTJ +#define CTK +#define CTL +#define CTM +#define CTN +#define CTO +#define CTP +#define CTQ +#define CTR +#define CTS +#define CTT +#define CTU +#define CTV +#define CTW +#define CTX +#define CTY +#define CTZ +#define CUA +#define CUB +#define CUC +#define CUD +#define CUE +#define CUF +#define CUG +#define CUH +#define CUI +#define CUJ +#define CUK +#define CUL +#define CUM +#define CUN +#define CUO +#define CUP +#define CUQ +#define CUR +#define CUS +#define CUT +#define CUU +#define CUV +#define CUW +#define CUX +#define CUY +#define CUZ +#define CVA +#define CVB +#define CVC +#define CVD +#define CVE +#define CVF +#define CVG +#define CVH +#define CVI +#define CVJ +#define CVK +#define CVL +#define CVM +#define CVN +#define CVO +#define CVP +#define CVQ +#define CVR +#define CVS +#define CVT +#define CVU +#define CVV +#define CVW +#define CVX +#define CVY +#define CVZ +#define CWA +#define CWB +#define CWC +#define CWD +#define CWE +#define CWF +#define CWG +#define CWH +#define CWI +#define CWJ +#define CWK +#define CWL +#define CWM +#define CWN +#define CWO +#define CWP +#define CWQ +#define CWR +#define CWS +#define CWT +#define CWU +#define CWV +#define CWW +#define CWX +#define CWY +#define CWZ +#define CXA +#define CXB +#define CXC +#define CXD +#define CXE +#define CXF +#define CXG +#define CXH +#define CXI +#define CXJ +#define CXK +#define CXL +#define CXM +#define CXN +#define CXO +#define CXP +#define CXQ +#define CXR +#define CXS +#define CXT +#define CXU +#define CXV +#define CXW +#define CXX +#define CXY +#define CXZ +#define CYA +#define CYB +#define CYC +#define CYD +#define CYE +#define CYF +#define CYG +#define CYH +#define CYI +#define CYJ +#define CYK +#define CYL +#define CYM +#define CYN +#define CYO +#define CYP +#define CYQ +#define CYR +#define CYS +#define CYT +#define CYU +#define CYV +#define CYW +#define CYX +#define CYY +#define CYZ +#define CZA +#define CZB +#define CZC +#define CZD +#define CZE +#define CZF +#define CZG +#define CZH +#define CZI +#define CZJ +#define CZK +#define CZL +#define CZM +#define CZN +#define CZO +#define CZP +#define CZQ +#define CZR +#define CZS +#define CZT +#define CZU +#define CZV +#define CZW +#define CZX +#define CZY +#define CZZ +#define DAA +#define DAB +#define DAC +#define DAD +#define DAE +#define DAF +#define DAG +#define DAH +#define DAI +#define DAJ +#define DAK +#define DAL +#define DAM +#define DAN +#define DAO +#define DAP +#define DAQ +#define DAR +#define DAS 0x07ff +#ifndef X07FF +#define DAT +#define DAU +#define DAV +#define DAW +#define DAX +#define DAY +#define DAZ +#define DBA +#define DBB +#define DBC +#define DBD +#define DBE +#define DBF +#define DBG +#define DBH +#define DBI +#define DBJ +#define DBK +#define DBL +#define DBM +#define DBN +#define DBO +#define DBP +#define DBQ +#define DBR +#define DBS +#define DBT +#define DBU +#define DBV +#define DBW +#define DBX +#define DBY +#define DBZ +#define DCA +#define DCB +#define DCC +#define DCD +#define DCE +#define DCF +#define DCG +#define DCH +#define DCI +#define DCJ +#define DCK +#define DCL +#define DCM +#define DCN +#define DCO +#define DCP +#define DCQ +#define DCR +#define DCS +#define DCT +#define DCU +#define DCV +#define DCW +#define DCX +#define DCY +#define DCZ +#define DDA +#define DDB +#define DDC +#define DDD +#define DDE +#define DDF +#define DDG +#define DDH +#define DDI +#define DDJ +#define DDK +#define DDL +#define DDM +#define DDN +#define DDO +#define DDP +#define DDQ +#define DDR +#define DDS +#define DDT +#define DDU +#define DDV +#define DDW +#define DDX +#define DDY +#define DDZ +#define DEA +#define DEB +#define DEC +#define DED +#define DEE +#define DEF +#define DEG +#define DEH +#define DEI +#define DEJ +#define DEK +#define DEL +#define DEM +#define DEN +#define DEO +#define DEP +#define DEQ +#define DER +#define DES +#define DET +#define DEU +#define DEV +#define DEW +#define DEX +#define DEY +#define DEZ +#define DFA +#define DFB +#define DFC +#define DFD +#define DFE +#define DFF +#define DFG +#define DFH +#define DFI +#define DFJ +#define DFK +#define DFL +#define DFM +#define DFN +#define DFO +#define DFP +#define DFQ +#define DFR +#define DFS +#define DFT +#define DFU +#define DFV +#define DFW +#define DFX +#define DFY +#define DFZ +#define DGA +#define DGB +#define DGC +#define DGD +#define DGE +#define DGF +#define DGG +#define DGH +#define DGI +#define DGJ +#define DGK +#define DGL +#define DGM +#define DGN +#define DGO +#define DGP +#define DGQ +#define DGR +#define DGS +#define DGT +#define DGU +#define DGV +#define DGW +#define DGX +#define DGY +#define DGZ +#define DHA +#define DHB +#define DHC +#define DHD +#define DHE +#define DHF +#define DHG +#define DHH +#define DHI +#define DHJ +#define DHK +#define DHL +#define DHM +#define DHN +#define DHO +#define DHP +#define DHQ +#define DHR +#define DHS +#define DHT +#define DHU +#define DHV +#define DHW +#define DHX +#define DHY +#define DHZ +#define DIA +#define DIB +#define DIC +#define DID +#define DIE +#define DIF +#define DIG +#define DIH +#define DII +#define DIJ +#define DIK +#define DIL +#define DIM +#define DIN +#define DIO +#define DIP +#define DIQ +#define DIR +#define DIS +#define DIT +#define DIU +#define DIV +#define DIW +#define DIX +#define DIY +#define DIZ +#define DJA +#define DJB +#define DJC +#define DJD +#define DJE +#define DJF +#define DJG +#define DJH +#define DJI +#define DJJ +#define DJK +#define DJL +#define DJM +#define DJN +#define DJO +#define DJP +#define DJQ +#define DJR +#define DJS +#define DJT +#define DJU +#define DJV +#define DJW +#define DJX +#define DJY +#define DJZ +#define DKA +#define DKB +#define DKC +#define DKD +#define DKE +#define DKF +#define DKG +#define DKH +#define DKI +#define DKJ +#define DKK +#define DKL +#define DKM +#define DKN +#define DKO +#define DKP +#define DKQ +#define DKR +#define DKS +#define DKT +#define DKU +#define DKV +#define DKW +#define DKX +#define DKY +#define DKZ +#define DLA +#define DLB +#define DLC +#define DLD +#define DLE +#define DLF +#define DLG +#define DLH +#define DLI +#define DLJ +#define DLK +#define DLL +#define DLM +#define DLN +#define DLO +#define DLP +#define DLQ +#define DLR +#define DLS +#define DLT +#define DLU +#define DLV +#define DLW +#define DLX +#define DLY +#define DLZ +#define DMA +#define DMB +#define DMC +#define DMD +#define DME +#define DMF +#define DMG +#define DMH +#define DMI +#define DMJ +#define DMK +#define DML +#define DMM +#define DMN +#define DMO +#define DMP +#define DMQ +#define DMR +#define DMS +#define DMT +#define DMU +#define DMV +#define DMW +#define DMX +#define DMY +#define DMZ +#define DNA +#define DNB +#define DNC +#define DND +#define DNE +#define DNF +#define DNG +#define DNH +#define DNI +#define DNJ +#define DNK +#define DNL +#define DNM +#define DNN +#define DNO +#define DNP +#define DNQ +#define DNR +#define DNS +#define DNT +#define DNU +#define DNV +#define DNW +#define DNX +#define DNY +#define DNZ +#define DOA +#define DOB +#define DOC +#define DOD +#define DOE +#define DOF +#define DOG +#define DOH +#define DOI +#define DOJ +#define DOK +#define DOL +#define DOM +#define DON +#define DOO +#define DOP +#define DOQ +#define DOR +#define DOS +#define DOT +#define DOU +#define DOV +#define DOW +#define DOX +#define DOY +#define DOZ +#define DPA +#define DPB +#define DPC +#define DPD +#define DPE +#define DPF +#define DPG +#define DPH +#define DPI +#define DPJ +#define DPK +#define DPL +#define DPM +#define DPN +#define DPO +#define DPP +#define DPQ +#define DPR +#define DPS +#define DPT +#define DPU +#define DPV +#define DPW +#define DPX +#define DPY +#define DPZ +#define DQA +#define DQB +#define DQC +#define DQD +#define DQE +#define DQF +#define DQG +#define DQH +#define DQI +#define DQJ +#define DQK +#define DQL +#define DQM +#define DQN +#define DQO +#define DQP +#define DQQ +#define DQR +#define DQS +#define DQT +#define DQU +#define DQV +#define DQW +#define DQX +#define DQY +#define DQZ +#define DRA +#define DRB +#define DRC +#define DRD +#define DRE +#define DRF +#define DRG +#define DRH +#define DRI +#define DRJ +#define DRK +#define DRL +#define DRM +#define DRN +#define DRO +#define DRP +#define DRQ +#define DRR +#define DRS +#define DRT +#define DRU +#define DRV +#define DRW +#define DRX +#define DRY +#define DRZ +#define DSA +#define DSB +#define DSC +#define DSD +#define DSE +#define DSF +#define DSG +#define DSH +#define DSI +#define DSJ +#define DSK +#define DSL +#define DSM +#define DSN +#define DSO +#define DSP +#define DSQ +#define DSR +#define DSS +#define DST +#define DSU +#define DSV +#define DSW +#define DSX +#define DSY +#define DSZ +#define DTA +#define DTB +#define DTC +#define DTD +#define DTE +#define DTF +#define DTG +#define DTH +#define DTI +#define DTJ +#define DTK +#define DTL +#define DTM +#define DTN +#define DTO +#define DTP +#define DTQ +#define DTR +#define DTS +#define DTT +#define DTU +#define DTV +#define DTW +#define DTX +#define DTY +#define DTZ +#define DUA +#define DUB +#define DUC +#define DUD +#define DUE +#define DUF +#define DUG +#define DUH +#define DUI +#define DUJ +#define DUK +#define DUL +#define DUM +#define DUN +#define DUO +#define DUP +#define DUQ +#define DUR +#define DUS +#define DUT +#define DUU +#define DUV +#define DUW +#define DUX +#define DUY +#define DUZ +#define DVA +#define DVB +#define DVC +#define DVD +#define DVE +#define DVF +#define DVG +#define DVH +#define DVI +#define DVJ +#define DVK +#define DVL +#define DVM +#define DVN +#define DVO +#define DVP +#define DVQ +#define DVR +#define DVS +#define DVT +#define DVU +#define DVV +#define DVW +#define DVX +#define DVY +#define DVZ +#define DWA +#define DWB +#define DWC +#define DWD +#define DWE +#define DWF +#define DWG +#define DWH +#define DWI +#define DWJ +#define DWK +#define DWL +#define DWM +#define DWN +#define DWO +#define DWP +#define DWQ +#define DWR +#define DWS +#define DWT +#define DWU +#define DWV +#define DWW +#define DWX +#define DWY +#define DWZ +#define DXA +#define DXB +#define DXC +#define DXD +#define DXE +#define DXF +#define DXG +#define DXH +#define DXI +#define DXJ +#define DXK +#define DXL +#define DXM +#define DXN +#define DXO +#define DXP +#define DXQ +#define DXR +#define DXS +#define DXT +#define DXU +#define DXV +#define DXW +#define DXX +#define DXY +#define DXZ +#define DYA +#define DYB +#define DYC +#define DYD +#define DYE +#define DYF +#define DYG +#define DYH +#define DYI +#define DYJ +#define DYK +#define DYL +#define DYM +#define DYN +#define DYO +#define DYP +#define DYQ +#define DYR +#define DYS +#define DYT +#define DYU +#define DYV +#define DYW +#define DYX +#define DYY +#define DYZ +#define DZA +#define DZB +#define DZC +#define DZD +#define DZE +#define DZF +#define DZG +#define DZH +#define DZI +#define DZJ +#define DZK +#define DZL +#define DZM +#define DZN +#define DZO +#define DZP +#define DZQ +#define DZR +#define DZS +#define DZT +#define DZU +#define DZV +#define DZW +#define DZX +#define DZY +#define DZZ +#define EAA +#define EAB +#define EAC +#define EAD +#define EAE +#define EAF +#define EAG +#define EAH +#define EAI +#define EAJ +#define EAK +#define EAL +#define EAM +#define EAN +#define EAO +#define EAP +#define EAQ +#define EAR +#define EAS +#define EAT +#define EAU +#define EAV +#define EAW +#define EAX +#define EAY +#define EAZ +#define EBA +#define EBB +#define EBC +#define EBD +#define EBE +#define EBF +#define EBG +#define EBH +#define EBI +#define EBJ +#define EBK +#define EBL +#define EBM +#define EBN +#define EBO +#define EBP +#define EBQ +#define EBR +#define EBS +#define EBT +#define EBU +#define EBV +#define EBW +#define EBX +#define EBY +#define EBZ +#define ECA +#define ECB +#define ECC +#define ECD +#define ECE +#define ECF +#define ECG +#define ECH +#define ECI +#define ECJ +#define ECK +#define ECL +#define ECM +#define ECN +#define ECO +#define ECP +#define ECQ +#define ECR +#define ECS +#define ECT +#define ECU +#define ECV +#define ECW +#define ECX +#define ECY +#define ECZ +#define EDA +#define EDB +#define EDC +#define EDD +#define EDE +#define EDF +#define EDG +#define EDH +#define EDI +#define EDJ +#define EDK +#define EDL +#define EDM +#define EDN +#define EDO +#define EDP +#define EDQ +#define EDR +#define EDS +#define EDT +#define EDU +#define EDV +#define EDW +#define EDX +#define EDY +#define EDZ +#define EEA +#define EEB +#define EEC +#define EED +#define EEE +#define EEF +#define EEG +#define EEH +#define EEI +#define EEJ +#define EEK +#define EEL +#define EEM +#define EEN +#define EEO +#define EEP +#define EEQ +#define EER +#define EES +#define EET +#define EEU +#define EEV +#define EEW +#define EEX +#define EEY +#define EEZ +#define EFA +#define EFB +#define EFC +#define EFD +#define EFE +#define EFF +#define EFG +#define EFH +#define EFI +#define EFJ +#define EFK +#define EFL +#define EFM +#define EFN +#define EFO +#define EFP +#define EFQ +#define EFR +#define EFS +#define EFT +#define EFU +#define EFV +#define EFW +#define EFX +#define EFY +#define EFZ +#define EGA +#define EGB +#define EGC +#define EGD +#define EGE +#define EGF +#define EGG +#define EGH +#define EGI +#define EGJ +#define EGK +#define EGL +#define EGM +#define EGN +#define EGO +#define EGP +#define EGQ +#define EGR +#define EGS +#define EGT +#define EGU +#define EGV +#define EGW +#define EGX +#define EGY +#define EGZ +#define EHA +#define EHB +#define EHC +#define EHD +#define EHE +#define EHF +#define EHG +#define EHH +#define EHI +#define EHJ +#define EHK +#define EHL +#define EHM +#define EHN +#define EHO +#define EHP +#define EHQ +#define EHR +#define EHS +#define EHT +#define EHU +#define EHV +#define EHW +#define EHX +#define EHY +#define EHZ +#define EIA +#define EIB +#define EIC +#define EID +#define EIE +#define EIF +#define EIG +#define EIH +#define EII +#define EIJ +#define EIK +#define EIL +#define EIM +#define EIN +#define EIO +#define EIP +#define EIQ +#define EIR +#define EIS +#define EIT +#define EIU +#define EIV +#define EIW +#define EIX +#define EIY +#define EIZ +#define EJA +#define EJB +#define EJC +#define EJD +#define EJE +#define EJF +#define EJG +#define EJH +#define EJI +#define EJJ +#define EJK +#define EJL +#define EJM +#define EJN +#define EJO +#define EJP +#define EJQ +#define EJR +#define EJS +#define EJT +#define EJU +#define EJV +#define EJW +#define EJX +#define EJY +#define EJZ +#define EKA +#define EKB +#define EKC +#define EKD +#define EKE +#define EKF +#define EKG +#define EKH +#define EKI +#define EKJ +#define EKK +#define EKL +#define EKM +#define EKN +#define EKO +#define EKP +#define EKQ +#define EKR +#define EKS +#define EKT +#define EKU +#define EKV +#define EKW +#define EKX +#define EKY +#define EKZ +#define ELA +#define ELB +#define ELC +#define ELD +#define ELE +#define ELF +#define ELG +#define ELH +#define ELI +#define ELJ +#define ELK +#define ELL +#define ELM +#define ELN +#define ELO +#define ELP +#define ELQ +#define ELR +#define ELS +#define ELT +#define ELU +#define ELV +#define ELW +#define ELX +#define ELY +#define ELZ +#define EMA +#define EMB +#define EMC +#define EMD +#define EME +#define EMF +#define EMG +#define EMH +#define EMI +#define EMJ +#define EMK +#define EML +#define EMM +#define EMN +#define EMO +#define EMP +#define EMQ +#define EMR +#define EMS +#define EMT +#define EMU +#define EMV +#define EMW +#define EMX +#define EMY +#define EMZ +#define ENA +#define ENB +#define ENC +#define END +#define ENE +#define ENF +#define ENG +#define ENH +#define ENI +#define ENJ +#define ENK +#define ENL +#define ENM +#define ENN +#define ENO +#define ENP +#define ENQ +#define ENR +#define ENS +#define ENT +#define ENU +#define ENV +#define ENW +#define ENX +#define ENY +#define ENZ +#define EOA +#define EOB +#define EOC +#define EOD +#define EOE +#define EOF +#define EOG +#define EOH +#define EOI +#define EOJ +#define EOK +#define EOL +#define EOM +#define EON +#define EOO +#define EOP +#define EOQ +#define EOR +#define EOS +#define EOT +#define EOU +#define EOV +#define EOW +#define EOX +#define EOY +#define EOZ +#define EPA +#define EPB +#define EPC +#define EPD +#define EPE +#define EPF +#define EPG +#define EPH +#define EPI +#define EPJ +#define EPK +#define EPL +#define EPM +#define EPN +#define EPO +#define EPP +#define EPQ +#define EPR +#define EPS +#define EPT +#define EPU +#define EPV +#define EPW +#define EPX +#define EPY +#define EPZ +#define EQA +#define EQB +#define EQC +#define EQD +#define EQE +#define EQF +#define EQG +#define EQH +#define EQI +#define EQJ +#define EQK +#define EQL +#define EQM +#define EQN +#define EQO +#define EQP +#define EQQ +#define EQR +#define EQS +#define EQT +#define EQU +#define EQV +#define EQW +#define EQX +#define EQY +#define EQZ +#define ERA +#define ERB +#define ERC +#define ERD +#define ERE +#define ERF +#define ERG +#define ERH +#define ERI +#define ERJ +#define ERK +#define ERL +#define ERM +#define ERN +#define ERO +#define ERP +#define ERQ +#define ERR +#define ERS +#define ERT +#define ERU +#define ERV +#define ERW +#define ERX +#define ERY +#define ERZ +#define ESA +#define ESB +#define ESC +#define ESD +#define ESE +#define ESF +#define ESG +#define ESH +#define ESI +#define ESJ +#define ESK +#define ESL +#define ESM +#define ESN +#define ESO +#define ESP +#define ESQ +#define ESR +#define ESS +#define EST +#define ESU +#define ESV +#define ESW +#define ESX +#define ESY +#define ESZ +#define ETA +#define ETB +#define ETC +#define ETD +#define ETE +#define ETF +#define ETG +#define ETH +#define ETI +#define ETJ +#define ETK +#define ETL +#define ETM +#define ETN +#define ETO +#define ETP +#define ETQ +#define ETR +#define ETS +#define ETT +#define ETU +#define ETV +#define ETW +#define ETX +#define ETY +#define ETZ +#define EUA +#define EUB +#define EUC +#define EUD +#define EUE +#define EUF +#define EUG +#define EUH +#define EUI +#define EUJ +#define EUK +#define EUL +#define EUM +#define EUN +#define EUO +#define EUP +#define EUQ +#define EUR +#define EUS +#define EUT +#define EUU +#define EUV +#define EUW +#define EUX +#define EUY +#define EUZ +#define EVA +#define EVB +#define EVC +#define EVD +#define EVE +#define EVF +#define EVG +#define EVH +#define EVI +#define EVJ +#define EVK +#define EVL +#define EVM +#define EVN +#define EVO +#define EVP +#define EVQ +#define EVR +#define EVS +#define EVT +#define EVU +#define EVV +#define EVW +#define EVX +#define EVY +#define EVZ +#define EWA +#define EWB +#define EWC +#define EWD +#define EWE +#define EWF +#define EWG +#define EWH +#define EWI +#define EWJ +#define EWK +#define EWL +#define EWM +#define EWN +#define EWO +#define EWP +#define EWQ +#define EWR +#define EWS +#define EWT +#define EWU +#define EWV +#define EWW +#define EWX +#define EWY +#define EWZ +#define EXA +#define EXB +#define EXC +#define EXD +#define EXE +#define EXF +#define EXG +#define EXH +#define EXI +#define EXJ +#define EXK +#define EXL +#define EXM +#define EXN +#define EXO +#define EXP +#define EXQ +#define EXR +#define EXS +#define EXT +#define EXU +#define EXV +#define EXW +#define EXX +#define EXY +#define EXZ +#define EYA +#define EYB +#define EYC +#define EYD +#define EYE +#define EYF +#define EYG +#define EYH +#define EYI +#define EYJ +#define EYK +#define EYL +#define EYM +#define EYN +#define EYO +#define EYP +#define EYQ +#define EYR +#define EYS +#define EYT +#define EYU +#define EYV +#define EYW +#define EYX +#define EYY +#define EYZ +#define EZA +#define EZB +#define EZC +#define EZD +#define EZE +#define EZF +#define EZG +#define EZH +#define EZI +#define EZJ +#define EZK +#define EZL +#define EZM +#define EZN +#define EZO +#define EZP +#define EZQ +#define EZR +#define EZS +#define EZT +#define EZU +#define EZV +#define EZW +#define EZX +#define EZY +#define EZZ +#define FAA +#define FAB +#define FAC +#define FAD +#define FAE +#define FAF +#define FAG +#define FAH +#define FAI +#define FAJ +#define FAK +#define FAL +#define FAM +#define FAN +#define FAO +#define FAP +#define FAQ +#define FAR +#define FAS +#define FAT +#define FAU +#define FAV +#define FAW +#define FAX +#define FAY +#define FAZ +#define FBA +#define FBB +#define FBC +#define FBD +#define FBE +#define FBF +#define FBG +#define FBH +#define FBI +#define FBJ +#define FBK +#define FBL +#define FBM +#define FBN +#define FBO +#define FBP +#define FBQ +#define FBR +#define FBS +#define FBT +#define FBU +#define FBV +#define FBW +#define FBX +#define FBY +#define FBZ +#define FCA +#define FCB +#define FCC +#define FCD +#define FCE +#define FCF +#define FCG +#define FCH +#define FCI +#define FCJ +#define FCK +#define FCL +#define FCM +#define FCN +#define FCO +#define FCP +#define FCQ +#define FCR +#define FCS +#define FCT +#define FCU +#define FCV +#define FCW +#define FCX +#define FCY +#define FCZ +#define FDA +#define FDB +#define FDC +#define FDD +#define FDE +#define FDF +#define FDG +#define FDH +#define FDI +#define FDJ +#define FDK +#define FDL +#define FDM +#define FDN +#define FDO +#define FDP +#define FDQ +#define FDR +#define FDS +#define FDT +#define FDU +#define FDV +#define FDW +#define FDX +#define FDY +#define FDZ +#define FEA +#define FEB +#define FEC +#define FED +#define FEE +#define FEF +#define FEG +#define FEH +#define FEI +#define FEJ +#define FEK +#define FEL +#define FEM +#define FEN +#define FEO +#define FEP +#define FEQ +#define FER +#define FES +#define FET +#define FEU +#define FEV +#define FEW +#define FEX +#define FEY +#define FEZ +#define FFA +#define FFB +#define FFC +#define FFD +#define FFE +#define FFF +#define FFG +#define FFH +#define FFI +#define FFJ +#define FFK +#define FFL +#define FFM +#define FFN +#define FFO +#define FFP +#define FFQ +#define FFR +#define FFS +#define FFT +#define FFU +#define FFV +#define FFW +#define FFX +#define FFY +#define FFZ +#define FGA +#define FGB +#define FGC +#define FGD +#define FGE +#define FGF +#define FGG +#define FGH +#define FGI +#define FGJ +#define FGK +#define FGL +#define FGM +#define FGN +#define FGO +#define FGP +#define FGQ +#define FGR +#define FGS +#define FGT +#define FGU +#define FGV +#define FGW +#define FGX +#define FGY +#define FGZ +#define FHA +#define FHB +#define FHC +#define FHD +#define FHE +#define FHF +#define FHG +#define FHH +#define FHI +#define FHJ +#define FHK +#define FHL +#define FHM +#define FHN +#define FHO +#define FHP +#define FHQ +#define FHR +#define FHS +#define FHT +#define FHU +#define FHV +#define FHW +#define FHX +#define FHY +#define FHZ +#define FIA +#define FIB +#define FIC +#define FID +#define FIE +#define FIF +#define FIG +#define FIH +#define FII +#define FIJ +#define FIK +#define FIL +#define FIM +#define FIN +#define FIO +#define FIP +#define FIQ +#define FIR +#define FIS +#define FIT +#define FIU +#define FIV +#define FIW +#define FIX +#define FIY +#define FIZ +#define FJA +#define FJB +#define FJC +#define FJD +#define FJE +#define FJF +#define FJG +#define FJH +#define FJI +#define FJJ +#define FJK +#define FJL +#define FJM +#define FJN +#define FJO +#define FJP +#define FJQ +#define FJR +#define FJS +#define FJT +#define FJU +#define FJV +#define FJW +#define FJX +#define FJY +#define FJZ +#define FKA +#define FKB +#define FKC +#define FKD +#define FKE +#define FKF +#define FKG +#define FKH +#define FKI +#define FKJ +#define FKK +#define FKL +#define FKM +#define FKN +#define FKO +#define FKP +#define FKQ +#define FKR +#define FKS +#define FKT +#define FKU +#define FKV +#define FKW +#define FKX +#define FKY +#define FKZ +#define FLA +#define FLB +#define FLC +#define FLD +#define FLE +#define FLF +#define FLG +#define FLH +#define FLI +#define FLJ +#define FLK +#define FLL +#define FLM +#define FLN +#define FLO +#define FLP +#define FLQ +#define FLR +#define FLS +#define FLT +#define FLU +#define FLV +#define FLW +#define FLX +#define FLY +#define FLZ +#define FMA +#define FMB +#define FMC +#define FMD +#define FME +#define FMF +#define FMG +#define FMH +#define FMI +#define FMJ +#define FMK +#define FML +#define FMM +#define FMN +#define FMO +#define FMP +#define FMQ +#define FMR +#define FMS +#define FMT +#define FMU +#define FMV +#define FMW +#define FMX +#define FMY +#define FMZ +#define FNA +#define FNB +#define FNC +#define FND +#define FNE +#define FNF +#define FNG +#define FNH +#define FNI +#define FNJ +#define FNK +#define FNL +#define FNM +#define FNN +#define FNO +#define FNP +#define FNQ +#define FNR +#define FNS +#define FNT +#define FNU +#define FNV +#define FNW +#define FNX +#define FNY +#define FNZ +#define FOA +#define FOB +#define FOC +#define FOD +#define FOE +#define FOF +#define FOG +#define FOH +#define FOI +#define FOJ +#define FOK +#define FOL +#define FOM +#define FON +#define FOO +#define FOP +#define FOQ +#define FOR +#define FOS +#define FOT +#define FOU +#define FOV +#define FOW +#define FOX +#define FOY +#define FOZ +#define FPA +#define FPB +#define FPC +#define FPD +#define FPE +#define FPF +#define FPG +#define FPH +#define FPI +#define FPJ +#define FPK +#define FPL +#define FPM +#define FPN +#define FPO +#define FPP +#define FPQ +#define FPR +#define FPS +#define FPT +#define FPU +#define FPV +#define FPW +#define FPX +#define FPY +#define FPZ +#define FQA +#define FQB +#define FQC +#define FQD +#define FQE +#define FQF +#define FQG +#define FQH +#define FQI +#define FQJ +#define FQK +#define FQL +#define FQM +#define FQN +#define FQO +#define FQP +#define FQQ +#define FQR +#define FQS +#define FQT +#define FQU +#define FQV +#define FQW +#define FQX +#define FQY +#define FQZ +#define FRA +#define FRB +#define FRC +#define FRD +#define FRE +#define FRF +#define FRG +#define FRH +#define FRI +#define FRJ +#define FRK +#define FRL +#define FRM +#define FRN +#define FRO +#define FRP +#define FRQ +#define FRR +#define FRS +#define FRT +#define FRU +#define FRV +#define FRW +#define FRX +#define FRY +#define FRZ +#define FSA +#define FSB +#define FSC +#define FSD +#define FSE +#define FSF +#define FSG +#define FSH +#define FSI +#define FSJ +#define FSK +#define FSL +#define FSM +#define FSN +#define FSO +#define FSP +#define FSQ +#define FSR +#define FSS +#define FST +#define FSU +#define FSV +#define FSW +#define FSX +#define FSY +#define FSZ +#define FTA +#define FTB +#define FTC +#define FTD +#define FTE +#define FTF +#define FTG +#define FTH +#define FTI +#define FTJ +#define FTK +#define FTL +#define FTM +#define FTN +#define FTO +#define FTP +#define FTQ +#define FTR +#define FTS +#define FTT +#define FTU +#define FTV +#define FTW +#define FTX +#define FTY +#define FTZ +#define FUA +#define FUB +#define FUC +#define FUD +#define FUE +#define FUF +#define FUG +#define FUH +#define FUI +#define FUJ +#define FUK +#define FUL +#define FUM +#define FUN +#define FUO +#define FUP +#define FUQ +#define FUR +#define FUS +#define FUT +#define FUU +#define FUV +#define FUW +#define FUX +#define FUY +#define FUZ +#define FVA +#define FVB +#define FVC +#define FVD +#define FVE +#define FVF +#define FVG +#define FVH +#define FVI +#define FVJ +#define FVK +#define FVL +#define FVM +#define FVN +#define FVO +#define FVP +#define FVQ +#define FVR +#define FVS +#define FVT +#define FVU +#define FVV +#define FVW +#define FVX +#define FVY +#define FVZ +#define FWA +#define FWB +#define FWC +#define FWD +#define FWE +#define FWF +#define FWG +#define FWH +#define FWI +#define FWJ +#define FWK +#define FWL +#define FWM +#define FWN +#define FWO +#define FWP +#define FWQ +#define FWR +#define FWS +#define FWT +#define FWU +#define FWV +#define FWW +#define FWX +#define FWY +#define FWZ +#define FXA +#define FXB +#define FXC +#define FXD +#define FXE +#define FXF +#define FXG +#define FXH +#define FXI +#define FXJ +#define FXK +#define FXL +#define FXM +#define FXN +#define FXO +#define FXP +#define FXQ +#define FXR +#define FXS +#define FXT +#define FXU +#define FXV +#define FXW +#define FXX +#define FXY +#define FXZ +#define FYA +#define FYB +#define FYC +#define FYD +#define FYE +#define FYF +#define FYG +#define FYH +#define FYI +#define FYJ +#define FYK +#define FYL +#define FYM +#define FYN +#define FYO +#define FYP +#define FYQ +#define FYR +#define FYS +#define FYT +#define FYU +#define FYV +#define FYW +#define FYX +#define FYY +#define FYZ +#define FZA +#define FZB +#define FZC +#define FZD +#define FZE +#define FZF +#define FZG +#define FZH +#define FZI +#define FZJ +#define FZK +#define FZL +#define FZM +#define FZN +#define FZO +#define FZP +#define FZQ +#define FZR +#define FZS +#define FZT +#define FZU +#define FZV +#define FZW +#define FZX +#define FZY +#define FZZ +#define GAA +#define GAB +#define GAC +#define GAD +#define GAE +#define GAF +#define GAG +#define GAH +#define GAI +#define GAJ +#define GAK +#define GAL +#define GAM +#define GAN +#define GAO +#define GAP +#define GAQ +#define GAR +#define GAS +#define GAT +#define GAU +#define GAV +#define GAW +#define GAX +#define GAY +#define GAZ +#define GBA +#define GBB +#define GBC +#define GBD +#define GBE +#define GBF +#define GBG +#define GBH +#define GBI +#define GBJ +#define GBK +#define GBL +#define GBM 0x0fff +#endif +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/n_1.c b/libraries/mcpp/cpp-test/test-t/n_1.c new file mode 100644 index 000000000..85f5ebed9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_1.c @@ -0,0 +1,19 @@ +/* n_1.c: Conversion of trigraph sequences. */ + +/* 1.1: The following 9 sequences are valid trigraph sequences. */ +/* [ ] \ ^ { } | ~ #; */ + ??( ??) ??/ ??' ??< ??> ??! ??- ??=; + +/* 1.2: In directive line. */ +/* ab | cd; */ +??= define OR( a, b) a ??! b + OR( ab, cd); + +/* { dg-do preprocess } + { dg-final { if ![file exist n_1.i] { return } } } + { dg-final { if \{ [grep n_1.i "\[ \] \\ \^ \{ \} \| ~ #"] != "" \} \{ } } + { dg-final { if \{ [grep n_1.i "ab *\| *cd"] != "" \} \{ } } + { dg-final { return \} \} \} } } + { dg-final { fail "n_1.c: trigraphs conversion" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_10.c b/libraries/mcpp/cpp-test/test-t/n_10.c new file mode 100644 index 000000000..8638930a0 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_10.c @@ -0,0 +1,35 @@ +/* n_10.c: #if, #elif, #else and #endif pp-directive. */ + +#define MACRO_0 0 +#define MACRO_1 1 + +/* 10.1: */ +/* Note: an undefined identifier in #if expression is replaced to 0. */ +/* 1; */ +#if a + a; +#elif MACRO_0 + MACRO_0; +#elif MACRO_1 /* Valid block */ + MACRO_1; +#else + 0; +#endif + +/* 10.2: Comments must be processed even if in skipped #if block. */ +/* At least tokenization of string literal and character constant is necessary + to process comments, e.g. /* is not a comment mark in string literal. + */ +#ifdef UNDEFINED + /* Comment */ + "in literal /* is not a comment" +#endif /* No excess-errors */ + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + { dg-final { if ![file exist n_10.i] { return } } } + { dg-final { if \{ [grep n_10.i "1" ] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_10.c: #if, #elif, #else and #endif" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_11.c b/libraries/mcpp/cpp-test/test-t/n_11.c new file mode 100644 index 000000000..078229a3b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_11.c @@ -0,0 +1,37 @@ +/* n_11.c: Operator "defined" in #if or #elif directive. */ + +#define MACRO_abc abc +#define MACRO_xyz xyz +#define MACRO_0 0 +#define ZERO_TOKEN + +/* 11.1: */ +/* abc; */ +/* xyz; */ +#if defined a + a; +#else + MACRO_abc; +#endif +#if defined (MACRO_xyz) + MACRO_xyz; +#else + 0; +#endif + +/* 11.2: "defined" is an unary operator whose result is 1 or 0. */ +#if defined MACRO_0 * 3 != 3 +#error Bad handling of "defined" operator. +#endif +#if (!defined ZERO_TOKEN != 0) || (-defined ZERO_TOKEN != -1) +#error Bad grouping of "defined", !, - operator. +#endif + +/* { dg-do preprocess } + { dg-final { if ![file exist n_11.i] { return } } } + { dg-final { if \{ [grep n_11.i "abc"] != "" \} \{ } } + { dg-final { if \{ [grep n_11.i "xyz"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_11.c: 'defined' operator" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_12.c b/libraries/mcpp/cpp-test/test-t/n_12.c new file mode 100644 index 000000000..c266ab552 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_12.c @@ -0,0 +1,46 @@ +/* n_12.c: Integer preprocessing number token and type of #if expression. */ + +#include + +/* 12.1: Type long. */ +#if LONG_MAX <= LONG_MIN +#error Bad evaluation of long. +#endif +#if LONG_MAX <= 1073741823 /* 0x3FFFFFFF */ +#error Bad evaluation of long. +#endif + +/* 12.2: Type unsigned long. */ +#if ULONG_MAX / 2 < LONG_MAX +#error Bad evaluation of unsigned long. +#endif + +/* 12.3: Octal number. */ +#if 0177777 != 65535 +#error Bad evaluation of octal number. +#endif + +/* 12.4: Hexadecimal number. */ +#if 0Xffff != 65535 || 0xFfFf != 65535 +#error Bad evaluation of hexadecimal number. +#endif + +/* 12.5: Suffix 'L' or 'l'. */ +#if 0L != 0 || 0l != 0 +#error Bad evaluation of 'L' suffix. +#endif + +/* 12.6: Suffix 'U' or 'u'. */ +#if 1U != 1 || 1u != 1 +#error Bad evaluation of 'U' suffix. +#endif + +/* 12.7: Negative integer. */ +#if 0 <= -1 +#error Bad evaluation of negative number. +#endif + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_13.c b/libraries/mcpp/cpp-test/test-t/n_13.c new file mode 100644 index 000000000..5e8cdce62 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_13.c @@ -0,0 +1,39 @@ +/* n_13.c: Valid operators in #if expression. */ + +/* Valid operators are (precedence in this order) : + defined, (unary)+, (unary)-, ~, !, + *, /, %, + +, -, + <<, >>, + <, >, <=, >=, + ==, !=, + &, + ^, + |, + &&, + ||, + ? : + */ + +/* 13.1: Bit shift. */ +#if 1 << 2 != 4 || 8 >> 1 != 4 +#error Bad arithmetic of <<, >> operators. +#endif + +/* 13.2: Bitwise operators. */ +#if (3 ^ 5) != 6 || (3 | 5) != 7 || (3 & 5) != 1 +#error Bad arithmetic of ^, |, & operators. +#endif + +/* 13.3: Result of ||, && operators is either of 1 or 0. */ +#if (2 || 3) != 1 || (2 && 3) != 1 || (0 || 4) != 1 || (0 && 5) != 0 +#error Bad arithmetic of ||, && operators. +#endif + +/* 13.4: ?, : operator. */ +#if (0 ? 1 : 2) != 2 +#error Bad arithmetic of ?: operator. +#endif + +/* { dg-do preprocess } */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_13_13.c b/libraries/mcpp/cpp-test/test-t/n_13_13.c new file mode 100644 index 000000000..116de963e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_13_13.c @@ -0,0 +1,37 @@ +/* n_13_13.c: #if expression with macros. */ + +#define ZERO_TOKEN +#define MACRO_0 0 +#define MACRO_1 1 +#define and && +#define or || +#define not_eq != +#define bitor | + +/* 13.13: With macros expanding to operators. */ +/* Valid block */ +#if (1 bitor 2) == 3 and 4 not_eq 5 or 0 + /* #if (1 | 2) == 3 && 4 != 5 || 0 */ + Valid block 1 +#else + Block to be skipped +#endif + +/* 13.14: With macros expanding to 0 token, nonsence but legal expression.*/ +/* Valid block */ +#if ZERO_TOKEN MACRO_1 ZERO_TOKEN > ZERO_TOKEN MACRO_0 ZERO_TOKEN + /* #if 1 > 0 */ + Valid block 2 +#else + Block to be skipped +#endif + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + { dg-final { if ![file exist n_13_13.i] { return } } } + { dg-final { if \{ [grep n_13_13.i "Valid block 1"] != "" \} \{ } } + { dg-final { if \{ [grep n_13_13.i "Valid block 2"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_13_13.c: #if expression with macros" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_13_5.c b/libraries/mcpp/cpp-test/test-t/n_13_5.c new file mode 100644 index 000000000..1a658f646 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_13_5.c @@ -0,0 +1,25 @@ +/* n_13_5.c: Arithmetic conversion in #if expressions. */ + +/* 13.5: The usual arithmetic conversion is not performed on bit shift. */ +#if -1 << 3U > 0 +#error Bad conversion of bit shift operands. +#endif + +/* 13.6: Usual arithmetic conversions. */ +#if -1 <= 0U /* -1 is converted to unsigned long. */ +#error Bad arithmetic conversion. +#endif + +#if -1 * 1U <= 0 +#error Bad arithmetic conversion. +#endif + +/* Second and third operands of conditional operator are converted to the +#error same type, thus -1 is converted to unsigned long. */ +#if (1 ? -1 : 0U) <= 0 +#error Bad arithmetic conversion. +#endif + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + */ diff --git a/libraries/mcpp/cpp-test/test-t/n_13_7.c b/libraries/mcpp/cpp-test/test-t/n_13_7.c new file mode 100644 index 000000000..709bc376b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_13_7.c @@ -0,0 +1,33 @@ +/* n_13_7.c: Short-circuit evaluation of #if expression. */ + +/* 13.7: 10/0 or 10/MACRO_0 are never evaluated, "divide by zero" error + cannot occur. */ +#define MACRO_0 0 + +/* Valid block */ +#if 0 && 10 / 0 + Block to be skipped +#endif +#if not_defined && 10 / not_defined + Block to be skipped +#endif +#if MACRO_0 && 10 / MACRO_0 > 1 + Block to be skipped +#endif +#if MACRO_0 ? 10 / MACRO_0 : 0 + Block to be skipped +#endif +#if MACRO_0 == 0 || 10 / MACRO_0 > 1 + Valid block +#else + Block to be skipped +#endif + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + { dg-final { if ![file exist n_13_7.i] { return } } } + { dg-final { if \{ [grep n_13_7.i "Valid block"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_13_7.c: short-circuit evaluation of #if expression" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_13_8.c b/libraries/mcpp/cpp-test/test-t/n_13_8.c new file mode 100644 index 000000000..a3ce08a07 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_13_8.c @@ -0,0 +1,33 @@ +/* n_13_8.t: Grouping of sub-expressions in #if expression. */ + +/* 13.8: Unary operators are grouped from right to left. */ +#if (- -1 != 1) || (!!9 != 1) || (-!+!9 != -1) || (~~1 != 1) +#error Bad grouping of -, +, !, ~ in #if expression. +#endif + +/* 13.9: ?: operators are grouped from right to left. */ +#if (1 ? 2 ? 3 ? 3 : 2 : 1 : 0) != 3 +#error Bad grouping of ? : in #if expression. +#endif + +/* 13.10: Other operators are grouped from left to right. */ +#if (15 >> 2 >> 1 != 1) || (3 << 2 << 1 != 24) +#error Bad grouping of >>, << in #if expression. +#endif + +/* 13.11: Test of precedence. */ +#if 3*10/2 >> !0*2 >> !+!-9 != 1 +#error Bad grouping of -, +, !, *, /, >> in #if expression. +#endif + +/* 13.12: Overall test. Grouped as: + ((((((+1 - -1 - ~~1 - -!0) & 6) | ((8 % 9) ^ (-2 * -2))) >> 1) == 7) + ? 7 : 0) != 7 + evaluated to FALSE. + */ +#if (((+1- -1-~~1- -!0&6|8%9^-2*-2)>>1)==7?7:0)!=7 +#error Bad arithmetic of #if expression. +#endif + +/* { dg-do preprocess } */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_15.c b/libraries/mcpp/cpp-test/test-t/n_15.c new file mode 100644 index 000000000..75709601c --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_15.c @@ -0,0 +1,28 @@ +/* n_15.c: #ifdef, #ifndef directives. */ + +#define MACRO_1 1 + +/* 15.1: #ifdef directive. */ +/* Valid block */ +#ifdef MACRO_1 + Valid block 1 +#else + Block to be skipped +#endif + +/* 15.2: #ifndef directive. */ +/* Valid block */ +#ifndef MACRO_1 + Block to be skipped +#else + Valid block 2 +#endif + +/* { dg-do preprocess } + { dg-final { if ![file exist n_15.i] { return } } } + { dg-final { if \{ [grep n_15.i "Valid block 1"] != "" \} \{ } } + { dg-final { if \{ [grep n_15.i "Valid block 2"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_15.c: #ifdef, #ifndef directives" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_18.c b/libraries/mcpp/cpp-test/test-t/n_18.c new file mode 100644 index 000000000..1ef4b6746 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_18.c @@ -0,0 +1,34 @@ +/* n_18.c: #define directive. */ + +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +#define ZERO_TOKEN + +/* 18.1: Definition of an object-like macro. */ +/* (1-1); */ + OBJ_LIKE; +/* Macro defined to no token. */ +/* ; */ + ZERO_TOKEN; + +/* 18.2: Definition of a function-like macro. */ +/* ( c ); */ + FTN_LIKE( c); + +/* 18.3: Spelling in string identical to parameter is not a parameter. */ +/* "n1:n2"; */ +#define STR( n1, n2) "n1:n2" + STR( 1, 2); + +/* { dg-do preprocess } + { dg-final { if ![file exist n_18.i] { return } } } + { dg-final { if \{ [grep n_18.i "\\(1-1\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_18.i "^\[ \]*;\[ \]*$"] != "" \} \{ } } + { dg-final { if \{ [grep n_18.i "\\( *c *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_18.i "\"n1:n2\""] != "" \} \{ } } + { dg-final { return \} \} \} \} } } + { dg-final { fail "n_18.c: #define directive" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_19.c b/libraries/mcpp/cpp-test/test-t/n_19.c new file mode 100644 index 000000000..42518431f --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_19.c @@ -0,0 +1,23 @@ +/* n_19.c: Valid re-definitions of macros. */ + +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* 19.1: */ +#define OBJ_LIKE /* white space */ (1-1) /* other */ + +/* 19.2: */ +#define FTN_LIKE( a )( /* note the white space */ \ + a /* other stuff on this line + */ ) +/* ( c ); */ + FTN_LIKE( c); + +/* { dg-do preprocess } + { dg-final { if ![file exist n_19.i] { return } } } + { dg-final { if \{ [grep n_19.i "\\( *c *\\)"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_19.c: valid re-definition of macros" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_1_3_run.c b/libraries/mcpp/cpp-test/test-t/n_1_3_run.c new file mode 100644 index 000000000..dd2ec6966 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_1_3_run.c @@ -0,0 +1,26 @@ +/* n_1_3_run.c: Trigraph-like sequences. */ + +#include +#include + +int main( void) +{ +/* 1.3: Any sequence other than the specified 9 sequences is not a trigraph.*/ + char quasi_trigraph[] = { '?', '?', ' ', '?', '?', '?', ' ', '?', + '?', '%', ' ', '?', '?', '^', ' ', '?', '#', '\0' }; + + assert( strcmp( "?? ??? ??% ??^ ???=", quasi_trigraph) == 0); + return 0; +} + +/* { dg-do run } + * { dg-options "-ansi -no-integrated-cpp" } + */ + +/* + * Note: It is troublesome and unreadable to write preprocessor output of + * many '?' sequence for DajaGnu. So, we test this testcase by strcmp(). + * Note: -no-integrated-cpp is necessary for MCPP on GCC 3. GCC 2, however, + * does not recognize this option. Remove this option on GCC 2. + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_1_3_run.c.gcc2 b/libraries/mcpp/cpp-test/test-t/n_1_3_run.c.gcc2 new file mode 100644 index 000000000..158dde8c3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_1_3_run.c.gcc2 @@ -0,0 +1,26 @@ +/* n_1_3_run.c: Trigraph-like sequences. */ + +#include +#include + +int main( void) +{ +/* 1.3: Any sequence other than the specified 9 sequences is not a trigraph.*/ + char quasi_trigraph[] = { '?', '?', ' ', '?', '?', '?', ' ', '?', + '?', '%', ' ', '?', '?', '^', ' ', '?', '#', '\0' }; + + assert( strcmp( "?? ??? ??% ??^ ???=", quasi_trigraph) == 0); + return 0; +} + +/* { dg-do run } + * { dg-options "-ansi" } + */ + +/* + * Note: It is troublesome and unreadable to write preprocessor output of + * many '?' sequence for DajaGnu. So, we test this testcase by strcmp(). + * Note: -no-integrated-cpp is necessary for MCPP on GCC 3. GCC 2, however, + * does not recognize this option. Remove this option on GCC 2. + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_1_3_run.c.gcc3 b/libraries/mcpp/cpp-test/test-t/n_1_3_run.c.gcc3 new file mode 100644 index 000000000..dd2ec6966 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_1_3_run.c.gcc3 @@ -0,0 +1,26 @@ +/* n_1_3_run.c: Trigraph-like sequences. */ + +#include +#include + +int main( void) +{ +/* 1.3: Any sequence other than the specified 9 sequences is not a trigraph.*/ + char quasi_trigraph[] = { '?', '?', ' ', '?', '?', '?', ' ', '?', + '?', '%', ' ', '?', '?', '^', ' ', '?', '#', '\0' }; + + assert( strcmp( "?? ??? ??% ??^ ???=", quasi_trigraph) == 0); + return 0; +} + +/* { dg-do run } + * { dg-options "-ansi -no-integrated-cpp" } + */ + +/* + * Note: It is troublesome and unreadable to write preprocessor output of + * many '?' sequence for DajaGnu. So, we test this testcase by strcmp(). + * Note: -no-integrated-cpp is necessary for MCPP on GCC 3. GCC 2, however, + * does not recognize this option. Remove this option on GCC 2. + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_2.c b/libraries/mcpp/cpp-test/test-t/n_2.c new file mode 100644 index 000000000..43fe12bdf --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_2.c @@ -0,0 +1,44 @@ +/* n_2.c: Line splicing by sequence. */ + +/* 2.1: In a #define directive line, between the parameter list and the + replacement text. */ +/* ab + cd + ef; */ +#define FUNC( a, b, c) \ + a + b + c + FUNC( ab, cd, ef); + +/* 2.2: In a #define directive line, among the parameter list and among the + replacement text. */ +/* gh + ij + kl; */ +#undef FUNC +#define FUNC( a, b \ + , c) \ + a + b \ + + c + FUNC( gh, ij, kl); + +/* 2.3: In a string literal. */ +/* "abcde" */ + "abc\ +de" + +/* 2.4: in midst of an identifier. */ +/* abcde */ + abc\ +de + +/* 2.5: by trigraph. */ +/* ghijk */ + ghi??/ +jk + +/* { dg-do preprocess } + { dg-final { if ![file exist n_2.i] { return } } } + { dg-final { if \{ [grep n_2.i "ab *\\+ *cd *\\+ *ef"] != "" \} \{ } } + { dg-final { if \{ [grep n_2.i "gh *\\+ *ij *\\+ *kl"] != "" \} \{ } } + { dg-final { if \{ [grep n_2.i "\"abcde\""] != "" \} \{ } } + { dg-final { if \{ [grep n_2.i "abcde"] != "" \} \{ } } + { dg-final { if \{ [grep n_2.i "ghijk"] != "" \} \{ } } + { dg-final { return \} \} \} \} \} } } + { dg-final { fail "n_2.c: deletion" } } + */ diff --git a/libraries/mcpp/cpp-test/test-t/n_20.c b/libraries/mcpp/cpp-test/test-t/n_20.c new file mode 100644 index 000000000..c9d4212aa --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_20.c @@ -0,0 +1,14 @@ +/* n_20.c: Definition of macro lexically identical to keyword. */ + +/* 20.1: */ +/* double fl; */ +#define float double + float fl; + +/* { dg-do preprocess } + { dg-final { if ![file exist n_20.i] { return } } } + { dg-final { if \{ [grep n_20.i "double +fl"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_20.c: macro identical to keyword" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_21.c b/libraries/mcpp/cpp-test/test-t/n_21.c new file mode 100644 index 000000000..4ccb242cd --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_21.c @@ -0,0 +1,21 @@ +/* n_21.c: Tokenization (No preprocessing tokens are merged implicitly). */ + +/* 21.1: */ +/* - - -a; */ +#define MINUS - + -MINUS-a; + +/* 21.2: */ +#define sub( a, b) a-b /* '(a)-(b)' is better */ +#define Y -y /* '(-y)' is better */ +/* x- -y; */ + sub( x, Y); + +/* { dg-do preprocess } + { dg-final { if ![file exist n_21.i] { return } } } + { dg-final { if \{ [grep n_21.i "- +- +- *a"] != "" \} \{ } } + { dg-final { if \{ [grep n_21.i "x *- +- *y"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_21.c: tokenization of expanded macro" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_22.c b/libraries/mcpp/cpp-test/test-t/n_22.c new file mode 100644 index 000000000..bc15973df --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_22.c @@ -0,0 +1,26 @@ +/* n_22.c: Tokenization of preprocessing number. */ + +#define EXP 1 + +/* 22.1: 12E+EXP is a preprocessing number, EXP is not expanded. */ +/* 12E+EXP; */ + 12E+EXP; + +/* 22.2: .2e-EXP is also a preprocessing number. */ +/* .2e-EXP; */ + .2e-EXP; + +/* 22.3: + or - is allowed only following E or e, 12+EXP is not a + preprocessing number. */ +/* Three tokens: 12 + 1; */ + 12+EXP; + +/* { dg-do preprocess } + { dg-final { if ![file exist n_22.i] { return } } } + { dg-final { if \{ [grep n_22.i "12E\\+EXP"] != "" \} \{ } } + { dg-final { if \{ [grep n_22.i "\.2e-EXP"] != "" \} \{ } } + { dg-final { if \{ [grep n_22.i "12\[ \]*\\+\[ \]*1"] != "" \} \{ } } + { dg-final { return \} \} \} } } + { dg-final { fail "n_22.c: tokenization of pp-number" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_23.c b/libraries/mcpp/cpp-test/test-t/n_23.c new file mode 100644 index 000000000..f8c47b513 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_23.c @@ -0,0 +1,22 @@ +/* n_23.c: ## operator in macro definition. */ + +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) + +/* 23.1: */ +/* xy; */ + glue( x, y); + +/* 23.2: Generate a preprocessing number. */ +/* .12e+2; */ +#define EXP 2 + xglue( .12e+, EXP); + +/* { dg-do preprocess } + { dg-final { if ![file exist n_23.i] { return } } } + { dg-final { if \{ [grep n_23.i "xy"] != "" \} \{ } } + { dg-final { if \{ [grep n_23.i "\.12e\\+2"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_23.c: ## operator" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_24.c b/libraries/mcpp/cpp-test/test-t/n_24.c new file mode 100644 index 000000000..7fedcdf23 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_24.c @@ -0,0 +1,30 @@ +/* n_24.c: # operator in macro definition / 1. */ + +#define str( a) # a + +/* 24.1: */ +/* "a+b"; */ + str( a+b); + +/* 24.2: White spaces between tokens of operand are converted to one space. + */ +/* "ab + cd"; */ + str( ab /* comment */ + + cd ); + +/* 24.5: Token separator inserted by macro expansion should be removed. + (Meanwhile, tokens should not be merged. See 21.2.) */ +#define xstr( a) str( a) +#define f(a) a +/* "x-y"; */ + xstr( x-f(y)); + +/* { dg-do preprocess } + { dg-final { if ![file exist n_24.i] { return } } } + { dg-final { if \{ [grep n_24.i "\"a\\+b\""] != "" \} \{ } } + { dg-final { if \{ [grep n_24.i "\"ab \\+ cd\""] != "" \} \{ } } + { dg-final { if \{ [grep n_24.i "\"x-y\""] != "" \} \{ } } + { dg-final { return \} \} \} } } + { dg-final { fail "n_24.c: #operator" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_24_3_run.c b/libraries/mcpp/cpp-test/test-t/n_24_3_run.c new file mode 100644 index 000000000..74a81f67e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_24_3_run.c @@ -0,0 +1,33 @@ +/* n_24_3_run.c: # operator in macro definition. */ + +#include +#include +#include + +#define str( a) # a + +int main( void) +{ +/* 24.3: \ is inserted before \ and " in or surrounding literals and no + other character is inserted to anywhere. */ + assert( strcmp( str( '"' + "' \""), "'\"' + \"' \\\"\"") == 0); + +/* 24.4: Line splicing by is done prior to token + parsing. */ + assert( strcmp( str( "ab\ +c"), "\"abc\"") == 0); + + return 0; +} + +/* { dg-do run } + * { dg-options "-ansi -no-integrated-cpp -w" } + */ + +/* + * Note: DejaGnu cannot handle the preprocessor output which contains a + * doubly stringized string literal. + * So, we test this testcase with strcmp(). + * Note: -no-integrated-cpp is necessary for MCPP on GCC 3. GCC 2, however, + * does not recognize this option. Remove this option on GCC 2. + */ diff --git a/libraries/mcpp/cpp-test/test-t/n_24_3_run.c.gcc2 b/libraries/mcpp/cpp-test/test-t/n_24_3_run.c.gcc2 new file mode 100644 index 000000000..d5b4a3523 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_24_3_run.c.gcc2 @@ -0,0 +1,33 @@ +/* n_24_3_run.c: # operator in macro definition. */ + +#include +#include +#include + +#define str( a) # a + +int main( void) +{ +/* 24.3: \ is inserted before \ and " in or surrounding literals and no + other character is inserted to anywhere. */ + assert( strcmp( str( '"' + "' \""), "'\"' + \"' \\\"\"") == 0); + +/* 24.4: Line splicing by is done prior to token + parsing. */ + assert( strcmp( str( "ab\ +c"), "\"abc\"") == 0); + + return 0; +} + +/* { dg-do run } + * { dg-options "-ansi -w" } + */ + +/* + * Note: DejaGnu cannot handle the preprocessor output which contains a + * doubly stringized string literal. + * So, we test this testcase with strcmp(). + * Note: -no-integrated-cpp is necessary for MCPP on GCC 3. GCC 2, however, + * does not recognize this option. Remove this option on GCC 2. + */ diff --git a/libraries/mcpp/cpp-test/test-t/n_24_3_run.c.gcc3 b/libraries/mcpp/cpp-test/test-t/n_24_3_run.c.gcc3 new file mode 100644 index 000000000..74a81f67e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_24_3_run.c.gcc3 @@ -0,0 +1,33 @@ +/* n_24_3_run.c: # operator in macro definition. */ + +#include +#include +#include + +#define str( a) # a + +int main( void) +{ +/* 24.3: \ is inserted before \ and " in or surrounding literals and no + other character is inserted to anywhere. */ + assert( strcmp( str( '"' + "' \""), "'\"' + \"' \\\"\"") == 0); + +/* 24.4: Line splicing by is done prior to token + parsing. */ + assert( strcmp( str( "ab\ +c"), "\"abc\"") == 0); + + return 0; +} + +/* { dg-do run } + * { dg-options "-ansi -no-integrated-cpp -w" } + */ + +/* + * Note: DejaGnu cannot handle the preprocessor output which contains a + * doubly stringized string literal. + * So, we test this testcase with strcmp(). + * Note: -no-integrated-cpp is necessary for MCPP on GCC 3. GCC 2, however, + * does not recognize this option. Remove this option on GCC 2. + */ diff --git a/libraries/mcpp/cpp-test/test-t/n_25.c b/libraries/mcpp/cpp-test/test-t/n_25.c new file mode 100644 index 000000000..b78f17460 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_25.c @@ -0,0 +1,46 @@ +/* n_25.c: Macro arguments are pre-expanded (unless the argument is an + operand of # or ## operator) separately, that is, are macro-replaced + completely prior to rescanning. */ + +#define MACRO_0 0 +#define MACRO_1 1 +#define ZERO_TOKEN +#define TWO_ARGS a,b +#define sub( x, y) (x - y) +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) +#define str( a) # a + +/* 25.1: "TWO_ARGS" is read as one argument to "sub" then expanded to + "a,b", then "x" is substituted by "a,b". */ +/* (a,b - 1); */ + sub( TWO_ARGS, 1); + +/* 25.2: An argument pre-expanded to 0-token. */ +/* ( - 1); */ + sub( ZERO_TOKEN, 1); + +/* 25.3: "glue( a, b)" is pre-expanded. */ +/* abc; */ + xglue( glue( a, b), c); + +/* 25.4: Operands of ## operator are not pre-expanded. */ +/* MACRO_0MACRO_1; */ + glue( MACRO_0, MACRO_1); + +/* 25.5: Operand of # operator is not pre-expanded. */ +/* "ZERO_TOKEN"; */ +#define ZERO_TOKEN + str( ZERO_TOKEN); + +/* { dg-do preprocess } + { dg-final { if ![file exist n_25.i] { return } } } + { dg-final { if \{ [grep n_25.i "\\( *a *, *b *- *1 *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_25.i "\\( *- *1 *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_25.i "abc"] != "" \} \{ } } + { dg-final { if \{ [grep n_25.i "MACRO_0MACRO_1"] != "" \} \{ } } + { dg-final { if \{ [grep n_25.i "\"ZERO_TOKEN\""] != "" \} \{ } } + { dg-final { return \} \} \} \} \} } } + { dg-final { fail "n_25.c: pre-expansion of macro arguments" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_26.c b/libraries/mcpp/cpp-test/test-t/n_26.c new file mode 100644 index 000000000..c215a57df --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_26.c @@ -0,0 +1,39 @@ +/* n_26.c: The name once replaced is not furthur replaced. */ + +/* 26.1: Directly recursive object-like macro definition. */ +/* Z(0); */ +#define Z Z(0) + Z; + +/* 26.2: Intermediately recursive object-like macro definition. */ +/* AB; */ +#define AB BA +#define BA AB + AB; + +/* 26.3: Directly recursive function-like macro definition. */ +/* x + f(x); */ +#define f(a) a + f(a) + f( x); + +/* 26.4: Intermediately recursive function-like macro definition. */ +/* x + x + g( x); */ +#define g(a) a + h( a) +#define h(a) a + g( a) + g( x); + +/* 26.5: Rescanning encounters the non-replaced macro name. */ +/* Z(0) + f( Z(0)); */ + f( Z); + +/* { dg-do preprocess } + { dg-final { if ![file exist n_26.i] { return } } } + { dg-final { if \{ [grep n_26.i "Z\\(0\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_26.i "AB"] != "" \} \{ } } + { dg-final { if \{ [grep n_26.i "x *\\+ f\\( *x *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_26.i "x *\\+ *x *\\+ *g\\( *x *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_26.i "Z\\(0\\) *\\+ f\\( *Z\\(0\\) *\\)"] != "" \} \{ } } + { dg-final { return \} \} \} \} \} } } + { dg-final { fail "n_26.c: recursive macro" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_27.c b/libraries/mcpp/cpp-test/test-t/n_27.c new file mode 100644 index 000000000..875fb01e9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_27.c @@ -0,0 +1,64 @@ +/* n_27.t: Rescanning of a macro replace any macro call in the replacement + text after substitution of parameters by pre-expanded-arguments. This + re-examination may involve the succeding sequences from the source + file (what a queer thing!). */ + +/* 27.1: Cascaded use of object-like macros. */ +/* 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8; */ +#define NEST8 NEST7 + 8 +#define NEST7 NEST6 + 7 +#define NEST6 NEST5 + 6 +#define NEST5 NEST4 + 5 +#define NEST4 NEST3 + 4 +#define NEST3 NEST2 + 3 +#define NEST2 NEST1 + 2 +#define NEST1 1 + NEST8; + +/* 27.2: Cascaded use of function-like macros. */ +/* (1) + (1 + 2) + 1 + 2 + 1 + 2 + 3 + 1 + 2 + 3 + 4; */ +#define FUNC4( a, b) FUNC3( a, b) + NEST4 +#define FUNC3( a, b) FUNC2( a, b) + NEST3 +#define FUNC2( a, b) FUNC1( a, b) + NEST2 +#define FUNC1( a, b) (a) + (b) + FUNC4( NEST1, NEST2); + +/* 27.3: An identifier generated by ## operator is subject to expansion. */ +/* 1; */ +#define glue( a, b) a ## b +#define MACRO_1 1 + glue( MACRO_, 1); + +#define sub( x, y) (x - y) +#define head sub( +#define math( op, a, b) op( (a), (b)) + +/* 27.4: 'sub' as an argument of math() is not pre-expanded, since '(' is + missing. */ +/* ((a) - (b)); */ + math( sub, a, b); + +/* 27.5: Queer thing. */ +/* (a - b); */ + head a,b ); + +/* 27.6: Recursive macro (the 2nd 'm' is expanded to 'n' since it is in + source file). */ +/* n; */ +#define m n +#define n( a) a + m( m); + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + { dg-final { if ![file exist n_27.i] { return } } } + { dg-final { if \{ [grep n_27.i "1 *\\+ *2 *\\+ *3 *\\+ *4 *\\+ *5 *\\+ *6 *\\+ *7 *\\+ *8"] != "" \} \{ } } + { dg-final { if \{ [grep n_27.i "\\( *1 *\\) *\\+ *\\( *1 *\\+ *2 *\\) *\\+ *1 *\\+ *2 *\\+ *1 *\\+ *2 *\\+ *3 *\\+ *1 *\\+ *2 *\\+ *3 *\\+ *4"] != "" \} \{ } } + { dg-final { if \{ [grep n_27.i "^ *1 *;"] != "" \} \{ } } + { dg-final { if \{ [grep n_27.i "\\( *\\( *a *\\) *- *\\( *b *\\) *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_27.i "\\( *a *- *b *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_27.i " *n *;"] != "" \} \{ } } + { dg-final { return \} \} \} \} \} \} } } + { dg-final { fail "n_27.c: macro rescanning" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_28.c b/libraries/mcpp/cpp-test/test-t/n_28.c new file mode 100644 index 000000000..55dc1baf6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_28.c @@ -0,0 +1,47 @@ +/* n_28.c: __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ and + __STDC_VERSION__ are predefined. */ + +/* 28.1: */ +/* "n_28.c"; or "path/n_28.c" */ + __FILE__; + +/* 28.2: */ +/* 10; */ + __LINE__; + +/* 28.3: */ +/* "Aug 1 2001"; */ + __DATE__; + +/* 28.4: */ +/* "21:42:22"; */ + __TIME__; + +/* 28.5: */ +/* 1; */ + __STDC__; + +/* 28.6: */ +/* 199409L; */ +/* In C99, the value of this macro is 199901L */ + __STDC_VERSION__; + +/* 28.7: __LINE__, __FILE__ in an included file. */ +/* 3; "line.h"; or "path/line.h"; */ +#include "line.h" + +/* { dg-do preprocess } + { dg-options "-std=iso9899:199409" } + { dg-final { if ![file exist n_28.i] { return } } } + { dg-final { if \{ [grep n_28.i "n_28\.c"] != "" \} \{ } } + { dg-final { if \{ [grep n_28.i "^\[ \]*10\[ \]*;"] != "" \} \{ } } + { dg-final { if \{ [grep n_28.i "\"\[ADFJMNOS\]\[aceopu\]\[bcglnprtvy\] \[ 123\]\[0-9\] 20\[0-9\]\[0-9\]\""] != "" \} \{ } } + { dg-final { if \{ [grep n_28.i "\"\[0-2\]\[0-9\]:\[0-5\]\[0-9\]:\[0-6\]\[0-9\]\""] != "" \} \{ } } + { dg-final { if \{ [grep n_28.i "^\[ \]*1\[ \]*;"] != "" \} \{ } } + { dg-final { if \{ [grep n_28.i "199409L"] != "" \} \{ } } + { dg-final { if \{ [grep n_28.i "^\[ \]*3\[ \]*;"] != "" \} \{ } } + { dg-final { if \{ [grep n_28.i "line\.h"] != "" \} \{ } } + { dg-final { return \} \} \} \} \} \} \} \} } } + { dg-final { fail "n_28.c: standard predefined macros" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_29.c b/libraries/mcpp/cpp-test/test-t/n_29.c new file mode 100644 index 000000000..754439a21 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_29.c @@ -0,0 +1,18 @@ +/* n_29.c: #undef directive. */ + +/* 29.1: Undefined macro is not a macro. */ +/* DEFINED; */ +#define DEFINED +#undef DEFINED + DEFINED; + +/* 29.2: Undefining undefined name is not an error. */ +#undef UNDEFINED + +/* { dg-do preprocess } + { dg-final { if ![file exist n_29.i] { return } } } + { dg-final { if \{ [grep n_29.i "DEFINED"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_29.c: #undef" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_3.c b/libraries/mcpp/cpp-test/test-t/n_3.c new file mode 100644 index 000000000..0f12ab46d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_3.c @@ -0,0 +1,34 @@ +/* n_3.c: Handling of comment. */ + +/* 3.1: A comment is converted to one space. */ +/* abc de */ + abc/* comment */de + +/* 3.2: // is not a comment of C. */ +#if 0 /* This feature is obsolete now. */ +/* // is not a comment of C */ + // is not a comment of C +#endif + +/* 3.3: Comment is parsed prior to the parsing of preprocessing directive. */ +/* abcd */ +#if 0 + "nonsence"; /* +#else + still in + comment */ +#else +#define MACRO_abcd /* + in comment + */ abcd +#endif + MACRO_abcd + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + { dg-final { if ![file exist n_3.i] { return } } } + { dg-final { if \{ [grep n_3.i "abc de"] != "" \} \{ } } + { dg-final { if \{ [grep n_3.i "abcd"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_3.c: handling of comments" } } + */ diff --git a/libraries/mcpp/cpp-test/test-t/n_30.c b/libraries/mcpp/cpp-test/test-t/n_30.c new file mode 100644 index 000000000..a732c735e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_30.c @@ -0,0 +1,29 @@ +/* n_30.c: Macro call. */ +/* Note: Comma separate the arguments of function-like macro call, + but comma between matching inner parenthesis doesn't. This feature + is tested on so many places in this suite especially on *.c samples + which use assert() macro, that no separete item to test this feature + is provided. */ + +/* 30.1: A macro call may cross the lines. */ +#define FUNC( a, b, c) a + b + c +/* a + b + c; */ + FUNC + ( + a, + b, + c + ) + ; + +/* { dg-do preprocess } + { dg-final { if ![file exist n_30.i] { return } } } + { dg-final { if \{ [grep n_30.i "a *\\+ *b *\\+ *c"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { if \{ [grep n_30.i "a *\\+ *"] != "" \} \{ } } + { dg-final { if \{ [grep n_30.i "b *\\+ *"] != "" \} \{ } } + { dg-final { if \{ [grep n_30.i "c"] != "" \} \{ } } + { dg-final { return \} \} \} } } + { dg-final { fail "n_30.c: macro call on multi-line" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_32.c b/libraries/mcpp/cpp-test/test-t/n_32.c new file mode 100644 index 000000000..d1102b4a4 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_32.c @@ -0,0 +1,14 @@ +/* n_32.c: Escape sequence in character constant in #if expression. */ + +/* 32.1: Character octal escape sequence. */ +#if '\123' != 83 +#error Bad evaluation of octal escape sequence. +#endif + +/* 32.2: Character hexadecimal escape sequence. */ +#if '\x1b' != '\033' +#error Bad evaluation of hexadecimal escape sequence. +#endif + +/* { dg-do preprocess } */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_37.c b/libraries/mcpp/cpp-test/test-t/n_37.c new file mode 100644 index 000000000..a9feaf1c4 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_37.c @@ -0,0 +1,101 @@ +/* n_37.t: Translation limits. */ + +/* 37.1: Number of parameters in macro: at least 31. */ +#define glue31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E) \ + a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p##q##r##s##t##u##v##w##x##y##z##A##B##C##D##E + +/* 37.2: Number of arguments of macro call: at least 31. */ +/* ABCDEFGHIJKLMNOPQRSTUVWXYZabcde; */ + glue31( A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R + , S, T, U, V, W, X, Y, Z, a, b, c, d, e); + +/* 37.3: Significant initial characters in an internal identifier or a + macro name: at least 31. */ +/* ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_; */ + ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_; + +/* 37.4: Nested conditional inclusion: at least 8 levels. */ +/* ifdef_nest = 8; */ +#ifdef A +#else +# ifdef B +# else +# ifdef C +# else +# ifdef D +# else +# ifdef E +# else +# ifdef F +# else +# ifdef G +# else +# ifdef H +# else + ifdef_nest = 8; +# endif +# endif +# endif +# endif +# endif +# endif +# endif +#endif + +/* 37.5: Nested source file inclusion: at least 8 levels. */ +#define X8 +/* nest = 1; nest = 2; nest = 3; nest = 4; + nest = 5; nest = 6; nest = 7; nest = 8; */ +#include "nest1.h" + +/* 37.6: Parenthesized expression: at least 32 levels. */ +/* nest = 32; */ +#if 0 + (1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + (9 - (10 + (11 - (12 + \ + (13 - (14 + (15 - (16 + (17 - (18 + (19 - (20 + (21 - (22 + (23 - \ + (24 + (25 - (26 + (27 - (28 + (29 - (30 + (31 - (32 + 0)))))))))) \ + )))))))))))))))))))))) == 0 + nest = 32; +#endif + +/* 37.7: Characters in a string (after concatenation): at least 509. */ +"123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +012345678901234567" + ; + +/* 37.8: Characters in a logical source line: at least 509. */ + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int A123456789012345678901234567890 = 123456; \ + int B123456789012345678901234567890 = 123457; \ + int C123456789012345678901234567890 = 123458; \ + int D1234567890123456789012 = 123459; + +/* 37.9: Macro definitions: at least 1024. */ +#define X0400 +#include "m4095.h" +/* 0x0400; */ + BNJ; + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + { dg-final { if ![file exist n_37.i] { return } } } + { dg-final { if \{ [grep n_37.i "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"] != "" \} \{ } } + { dg-final { if \{ [grep n_37.i "ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_"] != "" \} \{ } } + { dg-final { if \{ [grep n_37.i "ifdef_nest = 8"] != "" \} \{ } } + { dg-final { if \{ [grep n_37.i "nest = 8"] != "" \} \{ } } + { dg-final { if \{ [grep n_37.i "nest = 32"] != "" \} \{ } } + { dg-final { if \{ [grep n_37.i "0x0400"] != "" \} \{ } } + { dg-final { return \} \} \} \} \} \} } } + { dg-final { fail "n_37.c: translation limits" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_3_4.c b/libraries/mcpp/cpp-test/test-t/n_3_4.c new file mode 100644 index 000000000..32841581a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_3_4.c @@ -0,0 +1,13 @@ +/* n_3_4.c: Handling of comment and . */ + +/* 3.4: Comment and in #error line. */ +#error Message of first physical line. \ + Message of second physical and first logical line. /* + this comment splices the lines + */ Message of forth physical and third logical line. + +/* { dg-do preprocess } + { dg-options "-ansi -w" } + { dg-error "Message of first physical line\. *Message of second physical and first logical line\. *Message of forth physical and third logical line\." "n_3_4.c" { target *-*-* } 0 } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_4.c b/libraries/mcpp/cpp-test/test-t/n_4.c new file mode 100644 index 000000000..357de79bf --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_4.c @@ -0,0 +1,21 @@ +/* n_4.c: Special tokens. */ + +/* 4.1: Digraph spellings in directive line. */ +/* "abc"; */ +%: define stringize( a) %: a + + stringize( abc); + +/* 4.2: Digraph spellings are retained in stringization. */ +/* "<:"; */ + stringize( <:); + +/* { dg-do preprocess } + { dg-options "-std=iso9899:199409" } + { dg-final { if ![file exist n_4.i] { return } } } + { dg-final { if \{ [grep n_4.i "\"abc\""] != "" \} \{ } } + { dg-final { if \{ [grep n_4.i "\"<:\""] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_4.c: digraphs conversion" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_5.c b/libraries/mcpp/cpp-test/test-t/n_5.c new file mode 100644 index 000000000..8d9e3222e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_5.c @@ -0,0 +1,17 @@ +/* n_5.t: Spaces or tabs are allowed at any place in pp-directive line, + including between the top of a pp-directive line and '#', and between + the '#' and the directive. */ + +/* 5.1: */ +/* |**|[TAB]# |**|[TAB]define |**| MACRO_abcde[TAB]|**| abcde |**| */ +/**/ # /**/ define /**/ MACRO_abcde /**/ abcde /**/ +/* abcde */ + MACRO_abcde + +/* { dg-do preprocess } + { dg-final { if ![file exist n_5.i] { return } } } + { dg-final { if \{ [grep n_5.i "abcde"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_5.c: spaces and tabs in directive line" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_6.c b/libraries/mcpp/cpp-test/test-t/n_6.c new file mode 100644 index 000000000..5ac444d9c --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_6.c @@ -0,0 +1,31 @@ +/* n_6.c: #include directive. */ + +/* 6.1: Header-name quoted by " and " as well as by < and > can include + standard headers. */ +/* Note: Standard headers can be included any times. */ +#include "ctype.h" +#include + +/* 6.2: Macro is allowed in #include line. */ +#define HEADER "header.h" +/* Before file inclusion: #include "header.h" */ +#include HEADER +/* xyz */ + MACRO_xyz + +/* 6.3: With macro nonsence but legal. */ +#undef MACRO_zyx +#define ZERO_TOKEN +#include ZERO_TOKEN HEADER ZERO_TOKEN +/* zyx */ + MACRO_zyx + +/* { dg-do preprocess } + { dg-options "-std=c89 -w" } + { dg-final { if ![file exist n_6.i] { return } } } + { dg-final { if \{ [grep n_6.i "xyz"] != "" \} \{ } } + { dg-final { if \{ [grep n_6.i "zyx"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_6.c: #includes" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_7.c b/libraries/mcpp/cpp-test/test-t/n_7.c new file mode 100644 index 000000000..f2689ce35 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_7.c @@ -0,0 +1,27 @@ +/* n_7.c: #line directive. */ + +/* 7.1: Line number and filename. */ +/* 1234; "cpp"; */ +#line 1234 "cpp" + __LINE__; __FILE__; + +/* 7.2: Filename argument is optional. */ +/* 2345; "cpp"; */ +#line 2345 + __LINE__; __FILE__; + +/* 7.3: Argument with macro. */ +/* 3456; "n_7.c" or "prefix/n_7.c"; */ +#define LINE_AND_FILENAME 3456 "n_7.c" +#line LINE_AND_FILENAME + __LINE__; __FILE__; + +/* { dg-do preprocess } + { dg-final { if ![file exist n_7.i] { return } } } + { dg-final { if \{ [grep n_7.i "1234 *; *\"cpp\" *;"] != "" \} \{ } } + { dg-final { if \{ [grep n_7.i "2345 *; *\"cpp\" *;"] != "" \} \{ } } + { dg-final { if \{ [grep n_7.i "3456 *; *\"\[^ \]*n_7.c\" *;"] != "" \} \{ } } + { dg-final { return \} \} \} } } + { dg-final { fail "n_7.c: #lines" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_8.c b/libraries/mcpp/cpp-test/test-t/n_8.c new file mode 100644 index 000000000..a4334ef12 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_8.c @@ -0,0 +1,16 @@ +/* n_8.c: #error directive. */ + +/* 8.1: Argument of #error directive is not a subject of macro expansion. + Output to stderr as an example: + Preprocessing error directive: MACRO is not a positive number. + from line 10 of file "n_8.c" + */ +#define MACRO 0 +#if MACRO <= 0 +#error MACRO is not a positive number. +#endif + +/* { dg-do preprocess } + { dg-error "MACRO is not a positive number." "n_8.c" { target *-*-* } 10 } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_8_2.c b/libraries/mcpp/cpp-test/test-t/n_8_2.c new file mode 100644 index 000000000..e840cf7f1 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_8_2.c @@ -0,0 +1,6 @@ +/* n_8_2.c: Argument of #error is optional. */ +/* { dg-do preprocess } */ + +/* 8.2: #error should be executed. */ +#error /* { dg-error "#error" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_9.c b/libraries/mcpp/cpp-test/test-t/n_9.c new file mode 100644 index 000000000..c6fcbac23 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_9.c @@ -0,0 +1,9 @@ +/* n_9.t: #pragma directive. */ + +/* 9.1: Any #pragma directive should be processed or ignored, should not + be diagnosed as an error. */ +#pragma __once +#pragma who knows ? + +/* { dg-do preprocess } */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_bool.C b/libraries/mcpp/cpp-test/test-t/n_bool.C new file mode 100644 index 000000000..cdab26cff --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_bool.C @@ -0,0 +1,32 @@ +/* n_bool.C */ +/* + * On C++: 'true' and 'false' are evaluated 1 and 0 respectively. + * and logical AND, logical OR are evaluated boolean. + */ + +/* Valid block; */ + +#define MACRO 1 +#define MACRO3 3 + +#if MACRO == true + Valid block 1 +#else + non-Valid block; +#endif + +#if (MACRO && MACRO3) == true + Valid block 2 +#else + non-Valid block; +#endif + +/* { dg-do preprocess } + { dg-options "-std=c++98" } + { dg-final { if ![file exist n_bool.i] { return } } } + { dg-final { if \{ [grep n_bool.i "Valid block 1"] != "" \} \{ } } + { dg-final { if \{ [grep n_bool.i "Valid block 2"] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_bool.C: boolean literal" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_cnvucn.C b/libraries/mcpp/cpp-test/test-t/n_cnvucn.C new file mode 100644 index 000000000..7f3f0cb99 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_cnvucn.C @@ -0,0 +1,16 @@ +/* n_cnvucn.C: C++ Conversion from multi-byte character to UCN. */ +/* This conversion takes place in the translation phase 1. */ + +#define str( a) # a + + /* "\"\u6F22\u5B57\"" or "\"\\u6F22\\u5B57\"" */ + str( "") + +/* { dg-do preprocess } + { dg-options "-std=c++98 -finput-charset=EUC-JP" } + { dg-final { if ![file exist n_cnvucn.i] { return } } } + { dg-final { if \{ [grep n_cnvucn.i "\"\\\"\\\\u6F22\\\\u5B57\\\"\"|\"\\\"\\\\\\\\u6F22\\\\\\\\u5B57\\\"\""] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_cnvucn.C: UCN conversion" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_cplus.C b/libraries/mcpp/cpp-test/test-t/n_cplus.C new file mode 100644 index 000000000..f648c19fd --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_cplus.C @@ -0,0 +1,11 @@ +/* n_cplus.C: C++98 pre-defined macro __cplusplus. */ + +/* 199711L */ +#if __cplusplus < 199711L +#error __cplusplus not conforms to C++98 +#endif + +/* { dg-do preprocess } + { dg-options "-std=c++98" } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_dslcom.c b/libraries/mcpp/cpp-test/test-t/n_dslcom.c new file mode 100644 index 000000000..27601505b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_dslcom.c @@ -0,0 +1,12 @@ +/* n_dslcom.c: // is a comment of C++ and C99. */ +/* a; */ + a; // is a comment of C++ and C99 + +/* { dg-do preprocess } + { dg-options "-std=c99" } + { dg-final { if ![file exist n_dslcom.i] { return } } } + { dg-final { if \{ [grep n_dslcom.i "^\[ \]*a;\[ \]*$"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_dslcom.c: double slash comment" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_dslcom_cplus.C b/libraries/mcpp/cpp-test/test-t/n_dslcom_cplus.C new file mode 100644 index 000000000..078bc7e91 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_dslcom_cplus.C @@ -0,0 +1,12 @@ +/* n_dslcom_cplus.C: // is a comment of C++ and C99. */ +/* a; */ + a; // is a comment of C++ and C99 + +/* { dg-do preprocess } + { dg-options "-std=c++98" } + { dg-final { if ![file exist n_dslcom_cplus.i] { return } } } + { dg-final { if \{ [grep n_dslcom_cplus.i "^\[ \]*a;\[ \]*$"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_dslcom_cplus.C: double slash comment" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_line.c b/libraries/mcpp/cpp-test/test-t/n_line.c new file mode 100644 index 000000000..4aa566e11 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_line.c @@ -0,0 +1,15 @@ +/* n_line.c: line number argument of #line */ +/* C99: Range of line number in #line directive is [1..2147483647] */ + +/* 2147483647; */ +#line 2147483647 + __LINE__; + +/* { dg-do preprocess } + { dg-options "-std=c99 -w" } + { dg-final { if ![file exist n_line.i] { return } } } + { dg-final { if \{ [grep n_line.i "2147483647"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_line.c: line number in C99" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_llong.c b/libraries/mcpp/cpp-test/test-t/n_llong.c new file mode 100644 index 000000000..3d3c4add0 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_llong.c @@ -0,0 +1,24 @@ +/* n_llong.c: long long in #if expression */ + +#if 12345678901234567890U < 13345678901234567890U + "long long #if expression is implemented." +#else + "long long #if expression is not implemented." +#endif + +#if 12345678901234567890ULL < 13345678901234567890ULL + Valid block +#else + Block to be skipped +#endif + +#if (0x7FFFFFFFFFFFFFFFULL - 0x6FFFFFFFFFFFFFFFULL) >> 60 == 1 + Valid block +#else + Block to be skipped +#endif + +/* { dg-do preprocess } + { dg-options "-std=c99" } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_nularg.c b/libraries/mcpp/cpp-test/test-t/n_nularg.c new file mode 100644 index 000000000..49c3e8fb0 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_nularg.c @@ -0,0 +1,34 @@ +/* n_nularg.c: Empty argument of macro call. */ + +#define ARG( a) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); */ + SHOWN( math( sub, , y)); + +/* printf( "%s : %s\n", "EMPTY", ""); */ + SHOWS( EMPTY); + +/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ + SHOWS( APPEND( CON, 1)); + +/* printf( "%s : %s\n", "APPEND( , )", ""); */ + SHOWS( APPEND( , )); + +/* { dg-do preprocess } + { dg-options "-std=c99 -w" } + { dg-final { if ![file exist n_nularg.i] { return } } } + { dg-final { if \{ [grep n_nularg.i "printf\\( \"%s : %d\\\\n\", \"math\\( sub, , y\\)\", *\\( *- *y *\\) *\\)" ] != "" \} \{ } } + { dg-final { if \{ [grep n_nularg.i "printf\\( \"%s : %s\\\\n\", \"EMPTY\", *\"\" *\\)" ] != "" \} \{ } } + { dg-final { if \{ [grep n_nularg.i "printf\\( \"%s : %s\\\\n\", \"APPEND\\( CON, 1\\)\", *\"CON1\" *\\)" ] != "" \} \{ } } + { dg-final { if \{ [grep n_nularg.i "printf\\( \"%s : %s\\\\n\", \"APPEND\\( , \\)\", *\"\" *\\)" ] != "" \} \{ } } + { dg-final { return \} \} \} \} } } + { dg-final { fail "n_nularg.c: empty argument" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_ppnum.c b/libraries/mcpp/cpp-test/test-t/n_ppnum.c new file mode 100644 index 000000000..1894cd3ae --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_ppnum.c @@ -0,0 +1,16 @@ +/* n_ppnum.c: Preprocessing number token *p+* */ +/* Undefined on C90, because '+A' is not a valid pp-token. */ + +#define A 3 +#define glue( a, b) a ## b +/* 12p+A; */ + glue( 12p+, A); + +/* { dg-do preprocess } + { dg-options "-std=c99" } + { dg-final { if ![file exist n_ppnum.i] { return } } } + { dg-final { if \{ [grep n_ppnum.i "12p\\+A"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_ppnum.c: pp-number including p+" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_pragma.c b/libraries/mcpp/cpp-test/test-t/n_pragma.c new file mode 100644 index 000000000..9f9a8af07 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_pragma.c @@ -0,0 +1,42 @@ +/* n_pragma.c: _Pragma() operator */ +/* based on the proposal to C99 by Bill Homer */ + +#define Machine_B + +#include "pragmas.h" + +/* #pragma vfunction */ +Fast_call +void f(int n, double * a, double * b) { +/* #pragma ivdep */ + Independent + while(n-- > 0) { + *a++ += *b++; + } +} + +#define f(N, A, B) \ +{ int n = (N), double * a = (A), double * b = (B); \ + Independent while(n-- > 0) { *a++ += *b++; } \ +} + +#define EXPRAG(x) _Pragma(#x) +#define PRAGMA(x) EXPRAG(x) +#define LIBFUNC xyz + +int libfunc() { ... } + +/* Direct the linker to define alternate entry points for libfunc. */ +/* #pragma duplicate libfunc as (lib_func,xyz) */ +PRAGMA( duplicate libfunc as (lib_func,LIBFUNC) ) + +/* { dg-do preprocess } + { dg-options "-std=c99" } + { dg-final { if ![file exist n_pragma.i] { return } } } + { dg-final { if \{ [grep n_pragma.i "#pragma ivdep"] != "" \} \{ } } + { dg-final { if \{ [grep n_pragma.i "#pragma vfunction"] != "" \} \{ } } + { dg-final { if \{ [grep n_pragma.i "#pragma duplicate libfunc as \\(lib_func,xyz\\)"] != "" \} \{ } } + { dg-final { return \} \} \} } } + { dg-final { fail "n_pragma.c: _Pragma operator" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_stdmac.c b/libraries/mcpp/cpp-test/test-t/n_stdmac.c new file mode 100644 index 000000000..e9774fdc9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_stdmac.c @@ -0,0 +1,18 @@ +/* n_stdmac.c: C99 Standard pre-defined macros. */ + +/* 199901L */ + __STDC_VERSION__ + +/* 1 or 0 */ + __STDC_HOSTED__ + +/* { dg-do preprocess } + { dg-options "-std=c99" } + { dg-final { if ![file exist n_stdmac.i] { return } } } + { dg-final { if \{ [grep n_stdmac.i "199901L"] != "" \} \{ } } + { dg-final { if \{ [grep n_stdmac.i "1|0"] != "" \} \{ } } + { dg-final { if \{ [grep n_stdmac.i "__STDC_HOSTED__"] == "" \} \{ } } + { dg-final { return \} \} \} } } + { dg-final { fail "n_stdmac.c: standard pre-defined macro in C99" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_tlimit.c b/libraries/mcpp/cpp-test/test-t/n_tlimit.c new file mode 100644 index 000000000..4917e549d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_tlimit.c @@ -0,0 +1,160 @@ +/* n_tlimit.c: Tests of translation limits of C99. */ + +/* n_tlim_1: Number of parameters of macro definition: at least 127. */ + +#define glue127( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, \ + a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4, \ + a5, b5, c5, d5, e5, f5, g5, h5, i5, j5, k5, l5, m5, n5, o5, p5, \ + a6, b6, c6, d6, e6, f6, g6, h6, i6, j6, k6, l6, m6, n6, o6, p6, \ + a7, b7, c7, d7, e7, f7, g7, h7, i7, j7, k7, l7, m7, n7, o7) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + p0 ## p1 ## p2 ## p3 ## p4 ## p5 ## p6 ## o7 + +/* n_tlim_2: Number of arguments of macro call: at least 127. */ + +/* A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6O7; */ + glue127( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3, P3, + A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, L4, M4, N4, O4, P4, + A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, L5, M5, N5, O5, P5, + A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, L6, M6, N6, O6, P6, + A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, L7, M7, N7, O7); + +/* n_tlim_3: Significant initial characters in an internal identifier or a + macro name: at least 63 bytes. */ + + int +A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef = 63; + +/* n_tlim_4: Nested conditional inclusion: at least 63 level. */ + +/* ifdef_nest = 0x3f; */ +#define X3F +#include "ifdef15.h" + +/* n_tlim_5: Nested source file inclusion: at least 15 level. */ + +/* nest = 0x0f; */ +#define X0F +#include "nest1.h" + +/* n_tlim_6: Parenthesized expression: at least 63 level. */ + +/* nest = 63; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - 0x3E) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -1 + nest = 63; +#endif + +/* n_tlim_7: Characters in a string (after concatenation) + : at least 4095 bytes. */ + +/* 4095 bytes long. */ + char *string4093 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" +; + +/* n_tlim_8: Length of logical source line: at least 4095 bytes. */ + +#include "long4095.h" + +/* n_tlim_9: Number of macro definitions: at least 4095. */ + +#undef ARG +#include "m4095.h" + +/* 0x0fff; */ + GBM; + +/* { dg-do preprocess } + { dg-options -std=c99 } + { dg-final { if ![file exist n_tlimit.i] { return } } } + { dg-final { if \{ [grep n_tlimit.i "A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6O7"] != "" \} \{ } } + { dg-final { if \{ [grep n_tlimit.i "A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef "] != "" \} \{ } } + { dg-final { if \{ [grep n_tlimit.i "ifdef_nest = 0x3f"] != "" \} \{ } } + { dg-final { if \{ [grep n_tlimit.i "nest = 0x0f"] != "" \} \{ } } + { dg-final { if \{ [grep n_tlimit.i "nest = 63"] != "" \} \{ } } + { dg-final { if \{ [grep n_tlimit.i "0x0fff"] != "" \} \{ } } + { dg-final { return \} \} \} \} \} \} } } + { dg-final { fail "n_tlimit.c: translation limits of C99" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_token.C b/libraries/mcpp/cpp-test/test-t/n_token.C new file mode 100644 index 000000000..e5f5d2771 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_token.C @@ -0,0 +1,27 @@ +/* n_token.C: special pp-token in C++ */ + +#define str( a) xstr( a) +#define xstr( a) # a +#define paste( a, b) a ## b + +/* token.1: '::' is a token in C++, although illegal token sequence + in C */ + /* "::"; */ + str( paste( :, :)); + +/* token.2: 'and', 'or', 'not', etc. are tokens in C++, although in C + these are macros defined by */ + /* "xor"; */ +#if 1 and 2 or not 3 + str( xor); +#endif + +/* { dg-do preprocess } + { dg-options "-std=c++98" } + { dg-final { if ![file exist n_token.i] { return } } } + { dg-final { if \{ [grep n_token.i "\"::\""] != "" \} \{ } } + { dg-final { if \{ [grep n_token.i "\"xor\""] != "" \} \{ } } + { dg-final { return \} \} } } + { dg-final { fail "n_token.C: C++ tokens" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_ucn1.c b/libraries/mcpp/cpp-test/test-t/n_ucn1.c new file mode 100644 index 000000000..a3f258c5d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_ucn1.c @@ -0,0 +1,37 @@ +/* n_ucn1.c: Universal-character-name */ + +/* UCN in character constant */ + +#if '\u5B57' + UCN-16bits is implemented +#endif + +#if '\U00006F22' + UCN-32bits is implemented +#endif + +/* UCN in string literal */ + + "abc\u6F22\u5B57xyz"; /* i.e. "abcxyx"; */ + +/* UCN in identifier */ + +#define macro\u5B57 9 +#define macro\U00006F22 99 + + macro\u5B57 /* 9 */ + macro\U00006F22 = macro\U00006f22 /* 99 = 99 */ + /* '6F22' and '6f22' have the same value */ + +/* { dg-do preprocess } + { dg-options "-std=c99 -w" } + { dg-final { if ![file exist n_ucn1.i] { return } } } + { dg-final { if \{ [grep n_ucn1.i "UCN-16bits is implemented"] != "" \} \{ } } + { dg-final { if \{ [grep n_ucn1.i "UCN-32bits is implemented"] != "" \} \{ } } + { dg-final { if \{ [grep n_ucn1.i "\"abc\\\\u6\[Ff\]22\\\\u5\[Bb\]57xyz\""] != "" \} \{ } } + { dg-final { if \{ [grep n_ucn1.i "9"] != "" \} \{ } } + { dg-final { if \{ [grep n_ucn1.i "99 *= *99"] != "" \} \{ } } + { dg-final { return \} \} \} \} \} } } + { dg-final { fail "n_ucn1.c: UCN in tokens" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_ucn1_cplus.C b/libraries/mcpp/cpp-test/test-t/n_ucn1_cplus.C new file mode 100644 index 000000000..dca9d6a0a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_ucn1_cplus.C @@ -0,0 +1,37 @@ +/* n_ucn1_cplus.C: Universal-character-name */ + +/* UCN in character constant */ + +#if '\u5B57' + UCN-16bits is implemented +#endif + +#if '\U00006F22' + UCN-32bits is implemented +#endif + +/* UCN in string literal */ + + "abc\u6F22\u5B57xyz"; /* i.e. "abcxyx"; */ + +/* UCN in identifier */ + +#define macro\u5B57 9 +#define macro\U00006F22 99 + + macro\u5B57 /* 9 */ + macro\U00006F22 = macro\U00006f22 /* 99 = 99 */ + /* '6F22' and '6f22' have the same value */ + +/* { dg-do preprocess } + { dg-options "-std=c++98 -w" } + { dg-final { if ![file exist n_ucn1_cplus.i] { return } } } + { dg-final { if \{ [grep n_ucn1_cplus.i "UCN-16bits is implemented"] != "" \} \{ } } + { dg-final { if \{ [grep n_ucn1_cplus.i "UCN-32bits is implemented"] != "" \} \{ } } + { dg-final { if \{ [grep n_ucn1_cplus.i "\"abc\\\\u6\[Ff\]22\\\\u5\[Bb\]57xyz\""] != "" \} \{ } } + { dg-final { if \{ [grep n_ucn1_cplus.i "9"] != "" \} \{ } } + { dg-final { if \{ [grep n_ucn1_cplus.i "99 *= *99"] != "" \} \{ } } + { dg-final { return \} \} \} \} \} } } + { dg-final { fail "n_ucn1_cplus.C: UCN in tokens" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_ucn2.c b/libraries/mcpp/cpp-test/test-t/n_ucn2.c new file mode 100644 index 000000000..dfdd68ded --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_ucn2.c @@ -0,0 +1,16 @@ +/* n_ucn2.c: Universal-character-name */ + +/* UCN in pp-number */ + +#define mkint( a) a ## 1\u5B57 + + int mkint( abc) = 0; /* int abc1\u5B57 = 0; */ + +/* { dg-do preprocess } + { dg-options "-std=c99" } + { dg-final { if ![file exist n_ucn2.i] { return } } } + { dg-final { if \{ [grep n_ucn2.i "int *abc1\\\\u5\[Bb\]57 *= *0"] != "" \} \{ } } + { dg-final { return \} } } + { dg-final { fail "n_ucn2.c: UCN in pp-number" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/n_vargs.c b/libraries/mcpp/cpp-test/test-t/n_vargs.c new file mode 100644 index 000000000..8a1acfda2 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/n_vargs.c @@ -0,0 +1,28 @@ +/* n_vargs.c: Macro of variable arguments */ +/* from C99 Standard 6.10.3 Examples */ + #define debug( ...) fprintf( stderr, __VA_ARGS__) + #define showlist( ...) puts( #__VA_ARGS__) + #define report( test, ...) ((test) ? puts( #test) \ + : printf( __VA_ARGS__)) + { + /* fprintf( stderr, "Flag"); */ + debug( "Flag"); + /* fprintf( stderr, "X = %d\n", x); */ + debug( "X = %d\n", x); + /* puts( "The first, second, and third items."); */ + showlist( The first, second, and third items.); + /* ((x>y) ? puts( "x>y") : printf( "x is %d but y is %d", x, y)); */ + report( x>y, "x is %d but y is %d", x, y); + } + +/* { dg-do preprocess } + { dg-options "-std=c99" } + { dg-final { if ![file exist n_vargs.i] { return } } } + { dg-final { if \{ [grep n_vargs.i "fprintf\\( stderr, *\"Flag\" *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_vargs.i "fprintf\\( stderr, *\"X = %d\\\\n\", x *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_vargs.i "puts\\( \"The first, second, and third items\.\" *\\)"] != "" \} \{ } } + { dg-final { if \{ [grep n_vargs.i "\\(\\( *x>y *\\) \[?\] puts\\( \"x>y\" *\\) : printf\\( *\"x is %d but y is %d\", x, y *\\)\\)"] != "" \} \{ } } + { dg-final { return \} \} \} \} } } + { dg-final { fail "n_vargs.c: macro of variable arguments" } } + */ + diff --git a/libraries/mcpp/cpp-test/test-t/nest1.h b/libraries/mcpp/cpp-test/test-t/nest1.h new file mode 100644 index 000000000..6db0e2b83 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest1.h @@ -0,0 +1,5 @@ +/* nest1.h */ + + nest = 1; + +#include "nest2.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest10.h b/libraries/mcpp/cpp-test/test-t/nest10.h new file mode 100644 index 000000000..f97de2ab3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest10.h @@ -0,0 +1,2 @@ +/* nest10.h */ +#include "nest11.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest11.h b/libraries/mcpp/cpp-test/test-t/nest11.h new file mode 100644 index 000000000..ca40f3811 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest11.h @@ -0,0 +1,2 @@ +/* nest11.h */ +#include "nest12.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest12.h b/libraries/mcpp/cpp-test/test-t/nest12.h new file mode 100644 index 000000000..c3dba7244 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest12.h @@ -0,0 +1,2 @@ +/* nest12.h */ +#include "nest13.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest13.h b/libraries/mcpp/cpp-test/test-t/nest13.h new file mode 100644 index 000000000..4f8355f38 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest13.h @@ -0,0 +1,2 @@ +/* nest13.h */ +#include "nest14.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest14.h b/libraries/mcpp/cpp-test/test-t/nest14.h new file mode 100644 index 000000000..b3ab47406 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest14.h @@ -0,0 +1,2 @@ +/* nest14.h */ +#include "nest15.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest15.h b/libraries/mcpp/cpp-test/test-t/nest15.h new file mode 100644 index 000000000..aeab3feb7 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest15.h @@ -0,0 +1,4 @@ +/* nest15.h */ +#ifdef X0F + nest = 0x0f; +#endif diff --git a/libraries/mcpp/cpp-test/test-t/nest2.h b/libraries/mcpp/cpp-test/test-t/nest2.h new file mode 100644 index 000000000..89056cde6 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest2.h @@ -0,0 +1,5 @@ +/* nest2.h */ + + nest = 2; + +#include "nest3.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest3.h b/libraries/mcpp/cpp-test/test-t/nest3.h new file mode 100644 index 000000000..724e99069 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest3.h @@ -0,0 +1,5 @@ +/* nest3.h */ + + nest = 3; + +#include "nest4.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest4.h b/libraries/mcpp/cpp-test/test-t/nest4.h new file mode 100644 index 000000000..5f0cb4865 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest4.h @@ -0,0 +1,5 @@ +/* nest4.h */ + + nest = 4; + +#include "nest5.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest5.h b/libraries/mcpp/cpp-test/test-t/nest5.h new file mode 100644 index 000000000..56efbcf19 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest5.h @@ -0,0 +1,5 @@ +/* nest5.h */ + + nest = 5; + +#include "nest6.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest6.h b/libraries/mcpp/cpp-test/test-t/nest6.h new file mode 100644 index 000000000..00040c78a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest6.h @@ -0,0 +1,5 @@ +/* nest6.h */ + + nest = 6; + +#include "nest7.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest7.h b/libraries/mcpp/cpp-test/test-t/nest7.h new file mode 100644 index 000000000..ba005dc4e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest7.h @@ -0,0 +1,5 @@ +/* nest7.h */ + + nest = 7; + +#include "nest8.h" diff --git a/libraries/mcpp/cpp-test/test-t/nest8.h b/libraries/mcpp/cpp-test/test-t/nest8.h new file mode 100644 index 000000000..7fcdb8740 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest8.h @@ -0,0 +1,7 @@ +/* nest8.h */ + + nest = 8; +#ifndef X8 +#include "nest9.h" +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/nest9.h b/libraries/mcpp/cpp-test/test-t/nest9.h new file mode 100644 index 000000000..5f84e46fe --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/nest9.h @@ -0,0 +1,2 @@ +/* nest9.h */ +#include "nest10.h" diff --git a/libraries/mcpp/cpp-test/test-t/pragmas.h b/libraries/mcpp/cpp-test/test-t/pragmas.h new file mode 100644 index 000000000..6bf181e3e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/pragmas.h @@ -0,0 +1,24 @@ +/* pragmas.h based on the proposal to C99 by Bill Homer */ + +#if defined(Machine_A) + /* Request fastest calling sequence for machine A */ +# define Fast_call \ + _Pragma("fast_call") +#elif defined(Machine_B) + /* Request fastest calling sequence for machine B */ +# define Fast_call \ + _Pragma("vfunction") +#else +# define Fast_call +#endif + +#if defined(Machine_B) + /* Vectorization hint (ignore vector dependencies) */ +# define Independent _Pragma("ivdep") +#elif defined(Machine_C) + /* Parallelization hint (iterations are independent) */ +# define Independent _Pragma("independent") +#else +# define Independent +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_1.c b/libraries/mcpp/cpp-test/test-t/u_1_1.c new file mode 100644 index 000000000..27822a442 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_1.c @@ -0,0 +1,24 @@ +/* u_1_1.c: Undefined behaviors on unterminated line, comment or macro. */ + +/* { dg-do preprocess } */ + +/* u.1.1: End of a source file without . */ +#include "unbal3.h" +/* { dg-error "u_1_1\.c:6:\n\[^ \]*( error:|) (no newline at end of file|file does not end in newline)| End of file with no newline" "" { target *-*-* } 0 } */ +int e_1; + +/* u.1.2: End of a source file with . */ +#include "unbal4.h" +/* { dg-error "u_1_1\.c:11:\n\[^ \]*( error:|) backslash-newline at end of file| End of file with \\\\" "" { target *-*-* } 0 } */ +; + +/* u.1.3: End of a source file with an unterminated comment. */ +#include "unbal5.h" +/* { dg-error "u_1_1\.c:16:\n\[^ \]*( error:|) unterminated comment| End of file with unterminated comment" "" { target *-*-* } 0 } */ +*/ + +/* u.1.4: End of a source file with an uncompleted macro call. */ +#include "unbal6.h" +/* { dg-error "u_1_1\.c:21:\n\[^ \]*( error:|) unterminated (argument list|macro call)| End of file within macro call" "" { target *-*-* } 0 } */ + y); + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_11.c b/libraries/mcpp/cpp-test/test-t/u_1_11.c new file mode 100644 index 000000000..f73a3e9d5 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_11.c @@ -0,0 +1,11 @@ +/* u_1_11.c: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* { dg-do preprocess } */ + +/* u.1.11: Header-name containing ', ", \ or / followed by *. */ +/* Probably illegal filename and fails to open. */ +#include "../*line.h" /* { dg-error "No such file or directory| Can't open include file" } */ +/* \ is a legal path-delimiter in DOS/Windows or some other OS's. */ +#include "..\test-t\line.h" /* { dg-error "No such file or directory| Can't open include file" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_12.c b/libraries/mcpp/cpp-test/test-t/u_1_12.c new file mode 100644 index 000000000..63dd377df --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_12.c @@ -0,0 +1,8 @@ +/* u_1_12.c: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* { dg-do preprocess } */ + +/* u.1.12: Argument of #include other than header-name. */ +#include filename /* { dg-error "(#include|`#include') expects | Not a header name" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_13.c b/libraries/mcpp/cpp-test/test-t/u_1_13.c new file mode 100644 index 000000000..fb7548675 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_13.c @@ -0,0 +1,8 @@ +/* u_1_13.c: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* { dg-do preprocess } */ + +/* u.1.13: Excessive argument in #include directive. */ +#include Junk /* { dg-error "extra tokens | `#include' expects | Excessive token sequence" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_14.c b/libraries/mcpp/cpp-test/test-t/u_1_14.c new file mode 100644 index 000000000..dec8732ce --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_14.c @@ -0,0 +1,14 @@ +/* u_1_14.c: Undefined behaviors on undefined #line syntax. */ + +/* { dg-do preprocess } */ + +/* u.1.14: #line directive without an argument of line number. */ +#line "filename" /* { dg-error "not a positive integer| invalid format | Not a line number" } */ + +/* u.1.15: #line directive with the second argument of other than string + literal. */ +#line 1234 filename /* { dg-error "not a valid filename| invalid format | Not a file name" } */ + +/* u.1.16: Excessive argument in #line directive. */ +#line 2345 "filename" Junk /* { dg-error "extra tokens| garbage | Excessive token sequence" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_17.c b/libraries/mcpp/cpp-test/test-t/u_1_17.c new file mode 100644 index 000000000..7d1fc77cc --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_17.c @@ -0,0 +1,17 @@ +/* u_1_17.c: Undefined behaviors on out-of-range #line number. */ + +/* { dg-do preprocess } */ + +/* u.1.17: Line number argument of #line directive should be in range of + [1,32767]. */ +#line 0 /* { dg-error "line number out of range| Line number \"0\" is out of range" } */ +#line 32767 /* valid here */ +/* line 32767 */ + __LINE__; +/* { dg-warning "line number out of range| got beyond range\n\[^ \]* warning: Line number" "" { target *-*-* } 0 } */ +#line 13 /* Restore to correct line number */ + +/* u.1.18: Line number argument of #line directive should be written in + decimal digits. */ +#line 0x1000 /* { dg-error "not a decimal integer| invalid format | isn't a decimal digits sequence" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_17s.c b/libraries/mcpp/cpp-test/test-t/u_1_17s.c new file mode 100644 index 000000000..97f0f5293 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_17s.c @@ -0,0 +1,14 @@ +/* u_1_17s.c: Undefined behavior on out-of-range #line number. */ + +/* { dg-do preprocess } */ + +/* u.1.17s: Line number argument of #line directive should be in range of + [1,32767]. */ +#line 32768 /* { dg-error "line number out of range| Line number \"32768\" is out of range of \[^ \]*\n\[\^ \]* warning: Line number" } */ + +/* + * Note: DejaGnu sometimes fails to handle one of the dg-error lines of + * #line 0 and #line 32768, when those are tested in a single testcase file. + * So, we separated this testcase from u_1_17.c. + */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_19.c b/libraries/mcpp/cpp-test/test-t/u_1_19.c new file mode 100644 index 000000000..3a8348db7 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_19.c @@ -0,0 +1,35 @@ +/* u_1_19.c: Undefined behaviors on undefined #define and #undef syntax. */ + +/* { dg-do preprocess } */ + +/* u.1.19: A macro expanded to "defined" in #if expression. */ +#define DEFINED defined +#if DEFINED DEFINED /* { dg-warning "this use of \"defined\" may not be portable| is expanded to \"defined\"" } */ +#endif + +#undef __linux__ +#undef __arm__ +#define __linux__ 1 +#define HAVE_MREMAP defined(__linux__) && !defined(__arm__) +/* Wrong macro definition. + * This macro should be defined as follows. + * #if defined(__linux__) && !defined(__arm__) + * #define HAVE_MREMAP 1 + * #endif + */ +#if HAVE_MREMAP /* { dg-warning "this use of \"defined\" may not be portable| is expanded to \"defined\"" } */ + mremap(); +#endif + +/* u.1.20: Undefining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ or + "defined" in #undef directive. */ +#undef __LINE__ /* { dg-error "undefining| shouldn't be undefined" } */ + +/* u.1.21: Defining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ or + "defined" in #define directive. */ +#define __LINE__ 1234 /* { dg-error "defining| shouldn't be redefined" } */ +#define defined defined /* { dg-error "cannot be used as a macro name| invalid macro name | shouldn't be defined" } */ +#if defined defined +# error I am not a good preprocessor. +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_22.c b/libraries/mcpp/cpp-test/test-t/u_1_22.c new file mode 100644 index 000000000..944727472 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_22.c @@ -0,0 +1,24 @@ +/* u_1_22.c: Undefined behaviors on generating invalid pp-token by # and + ## operators. */ + +/* { dg-do preprocess } */ + +/* u.1.22: Result of ## operator is not a valid pp-token. */ +#define NUM( dig, exp) dig ## E+ ## exp +/* + * "E+" is a sequence of two pp-tokens "E" and "+", not a single pp-token. + * The first ## concatenates the last pp-token of first argument with "E", + * and the second ## concatenates "+" with the first pp-token of the second + * argument. + * While "12E" (one of the sequence generated by the token concatenation) + * is a valid pp-token, "+34" (the another sequence) is not a valid pp-token + * and causes an undefined behavior. + */ + NUM( 12, 34); /* { dg-error "(n|N)ot (give |)a valid preprocessing token" } */ + +/* u.1.23: Result of # operator is not a valid string literal. */ +/* "\\"\""; This sequence is parsed to three tokens "\\" \ "", and will be + diagnosed by compiler-proper unless diagnosed by preprocessor. */ +#define str( a) #a + str( \""); /* { dg-error "(n|N)ot (give |)a valid string literal" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_24.c b/libraries/mcpp/cpp-test/test-t/u_1_24.c new file mode 100644 index 000000000..444332326 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_24.c @@ -0,0 +1,36 @@ +/* u_1_24.c: Undefined behaviors on empty argument of macro call. */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic -Wall" } */ + +/* u.1.24: Empty argument of macro call. */ +/* + * Note: Since no argument and one empty argument cannot be distinguished + * syntactically, additional dummy argument may be necessary for an + * intermediate macro to process one empty argument (if possible). + */ + +#define ARG( a, dummy) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s, dummy)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); + or other undefined behavior. */ + SHOWN( math( sub, , y)); /* { dg-warning "(e|E)mpty argument" } */ + +/* printf( "%s : %s\n", "EMPTY", ""); + or other undefined behavior. */ + SHOWS( EMPTY); /* { dg-warning "(e|E)mpty argument" } */ + +/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ + SHOWS( APPEND( CON, 1)); + +/* printf( "%s : %s\n", "APPEND( , )", ""); + or other undefined behavior. */ + SHOWS( APPEND( , )); /* { dg-warning "(e|E)mpty argument" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_25.c b/libraries/mcpp/cpp-test/test-t/u_1_25.c new file mode 100644 index 000000000..0ae87d446 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_25.c @@ -0,0 +1,21 @@ +/* u_1_25.c: Miscelaneous undefined macros. */ + +/* { dg-do preprocess } */ + +#define str( a) # a +#define sub( x, y) (x - y) +#define SUB sub + +/* u.1.25: Macro argument otherwise parsed as a directive. */ +/* "#define NAME"; or other undefined behaviour. */ + str( +#define NAME +/* { dg-error "directives may not be used \[a-z \]*\n\[\^ \]* unterminated| embedding a directive within macro arguments | directive-like line" "" { target *-*-* } 12 } */ + ); + +#if 0 /* Added by C90: Corrigendum 1 (1994) and deleted by C99 */ +/* u.1.26: Expanded macro replacement list end with name of function-like + macro. */ + SUB( a, b); +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_27.c b/libraries/mcpp/cpp-test/test-t/u_1_27.c new file mode 100644 index 000000000..5eb03eed8 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_27.c @@ -0,0 +1,9 @@ +/* u_1_27.c: Pseudo-directive-line. */ + +/* { dg-do preprocess } */ + +/* u.1.27: Unknown preprocessing directive (other than #pragma). */ +#ifdefined MACRO /* { dg-error "invalid preprocessing directive| Unknown #directive" } */ +/* The second error. */ +#endif /* { dg-error "#endif without #if| unbalanced `#endif'| Not in a #if \\(#ifdef\\) section" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_28.c b/libraries/mcpp/cpp-test/test-t/u_1_28.c new file mode 100644 index 000000000..b89617218 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_28.c @@ -0,0 +1,15 @@ +/* u_1_28.c: Macro expanding to name identical to directive. */ + +/* { dg-do preprocess } */ + +#define D define +/* u.1.28: There are following two ways of preprocessing. + 1: "D" isn't expanded, because # is the first token of the line. + Preprocessor reports that "D" is an unknown directive. + 2: "D" is expanded, because that is not a directive. + Compiler-phase will diagnose the output of preprocess. + Anyway, preprocessor should not interprete this line as a preprocessing + directive. + */ +#D A B /* { dg-error "invalid preprocessing directive| Unknown #directive" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_5.c b/libraries/mcpp/cpp-test/test-t/u_1_5.c new file mode 100644 index 000000000..f18c6b01d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_5.c @@ -0,0 +1,18 @@ +/* u_1_5.c: Undefined behaviors on illegal characters. */ + +/* { dg-do preprocess } */ + +/* u.1.5: Illegal characters (in other than string literal, character + constant, header-name or comment). */ +#if 1 ||2 +/* 0x1e ^ ^ 0x1f */ +/* { dg-error "invalid character| Invalid token| is not valid | Illegal control character 0x1e, \[a-z \]*\n\[\^ \]* error: Illegal" "" { target *-*-* } 7 } */ +#endif /* Maybe the second error. */ + +/* u.1.6: [VT], [FF] in directive line. */ +#if 1 || 2 +/* [VT] ^ ^ [FF] */ +/* { dg-error "vertical tab in preprocessing directive| Converted 0x0b to a space" "" { target *-*-* } 13 } */ +/* { dg-error "form feed in preprocessing directive| Converted 0x0c to a space" "" { target *-*-* } 13 } */ +#endif /* Maybe the second error. */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_1_8.c b/libraries/mcpp/cpp-test/test-t/u_1_8.c new file mode 100644 index 000000000..dc880bfd5 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_1_8.c @@ -0,0 +1,21 @@ +/* u_1_8.c: Undefined behaviors on unterminated quotations. */ + +/* { dg-do preprocess } + { dg-excess-errors "" } */ + +/* u.1.8: Unterminated character constant. */ +/* The following "comment" may not interpreted as a comment but swallowed by + the unterminated character constant. */ +#error I can't understand. /* Token error prior to execution of #error. */ +/* { dg-error "missing terminating ' character| unterminated string or character constant| Unterminated character constant" "" { target *-*-* } 9 } */ + +/* u.1.9: Unterminated string literal. */ + "String literal + across the lines. +" +/* { dg-error "multi-line string literals are deprecated| missing terminating \" character| string constant runs past end of line| Unterminated string literal, skipped the line" "" { target *-*-* } 13 } */ + +/* u.1.10: Unterminated header-name. */ +#include character| (`#include'|#include) expects | Unterminated header name" "" { target *-*-* } 19 } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_2.c b/libraries/mcpp/cpp-test/test-t/u_2.c new file mode 100644 index 000000000..b76eb4f87 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_2.c @@ -0,0 +1,15 @@ +/* u_2.c: Undefined behaviors on undefined constant expression. */ + +/* { dg-do preprocess } */ + +/* u.2.1: Undefined escape sequence. */ +#if '\x' /* { dg-error "no following hex digits| Undefined escape sequence '\\\\x'\n\[^ \]* warning:" } */ +#endif + +/* u.2.2: Illegal bit shift count. */ +/* dg-warning, not dg-error to avoid a problem of GCC 4.3 testsuite */ +#if 1 << -1 /* { dg-warning "Illegal shift count" } */ +#endif +#if 1 << 64 /* { dg-error "integer overflow | Illegal shift count" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/u_concat.c b/libraries/mcpp/cpp-test/test-t/u_concat.c new file mode 100644 index 000000000..91715b24a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_concat.c @@ -0,0 +1,13 @@ +/* u_concat.c: Invalid pp-token generated by ## operator. */ + +/* { dg-do preprocess } */ + +#define _VARIANT_BOOL /##/ +/* + * The following line intends to be commented out. '//' generated by the + * macro is, however, not a valid pp-token. Since any comment is removed + * before macro definition or macro expansion, a comment is never generated + * by macro. + */ + _VARIANT_BOOL bool; /* { dg-error "does not give a valid preprocessing token| Not a valid preprocessing token" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_cplus.C b/libraries/mcpp/cpp-test/test-t/u_cplus.C new file mode 100644 index 000000000..a6372b568 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_cplus.C @@ -0,0 +1,8 @@ +/* u_cplus.C: C++: #undef or #define __cplusplus causes undefined + behavior. */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c++98 -pedantic-errors" } */ + +#undef __cplusplus /* { dg-error "undefining | shouldn't be undefined" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_line.c b/libraries/mcpp/cpp-test/test-t/u_line.c new file mode 100644 index 000000000..5e5a3af1c --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_line.c @@ -0,0 +1,17 @@ +/* u_line.c: Undefined behaviors on out-of-range #line number. */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -pedantic-errors" } */ + +/* C99: Line number argument of #line directive should be in range of + [1..2147483647] */ + +#line 0 /* { dg-error "out of range" } */ +#line 11 /* Restore to correct line number */ +#line 2147483647 /* valid here */ +/* line 2147483647 */ +/* line 2147483648 ? : out of range */ + __LINE__; /* 2147483649 ? or -2147483647 ?, + maybe warned as an out-of-range */ +/* { dg-warning "out of range| got beyond range\n\[\^ \]* warning: Line number \"\[\-0-9\]*\" is out of range" "" { target *-*-* } 0 } */ + diff --git a/libraries/mcpp/cpp-test/test-t/u_line_s.c b/libraries/mcpp/cpp-test/test-t/u_line_s.c new file mode 100644 index 000000000..cb9105d7b --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/u_line_s.c @@ -0,0 +1,16 @@ +/* u_line_s.c: Undefined behavior on out-of-range #line number. */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -pedantic-errors" } */ + +/* C99: Line number argument of #line directive should be in range of + [1..2147483647] */ + +#line 2147483648 /* { dg-error "out of range" } */ + +/* + * Note: DejaGnu sometimes fails to handle one of the dg-error lines of + * #line 0 and #line 2147483648, when those are tested in a single testcase + * file. + * So, we separated this testcase from u_line.c. + */ diff --git a/libraries/mcpp/cpp-test/test-t/unbal1.h b/libraries/mcpp/cpp-test/test-t/unbal1.h new file mode 100644 index 000000000..820a948b9 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/unbal1.h @@ -0,0 +1,2 @@ +/* unbal1.h */ +#endif diff --git a/libraries/mcpp/cpp-test/test-t/unbal2.h b/libraries/mcpp/cpp-test/test-t/unbal2.h new file mode 100644 index 000000000..b781f2d7c --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/unbal2.h @@ -0,0 +1,6 @@ +/* unbal2.h */ + +#define UNBAL2 1 + +#if UNBAL2 /* line 5 */ +#else diff --git a/libraries/mcpp/cpp-test/test-t/unbal3.h b/libraries/mcpp/cpp-test/test-t/unbal3.h new file mode 100644 index 000000000..58a7f7e3c --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/unbal3.h @@ -0,0 +1,2 @@ +/* unbal3.h */ +int unbal3; \ No newline at end of file diff --git a/libraries/mcpp/cpp-test/test-t/unbal4.h b/libraries/mcpp/cpp-test/test-t/unbal4.h new file mode 100644 index 000000000..3e2d0f10a --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/unbal4.h @@ -0,0 +1,2 @@ +/* unbal4.h */ +int unbal4\ diff --git a/libraries/mcpp/cpp-test/test-t/unbal5.h b/libraries/mcpp/cpp-test/test-t/unbal5.h new file mode 100644 index 000000000..f0a671530 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/unbal5.h @@ -0,0 +1,2 @@ +/* unbal5.h */ +int unbal5; /* unterminated comment diff --git a/libraries/mcpp/cpp-test/test-t/unbal6.h b/libraries/mcpp/cpp-test/test-t/unbal6.h new file mode 100644 index 000000000..192a4dd41 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/unbal6.h @@ -0,0 +1,6 @@ +/* unbal6.h */ +#define UNBAL6( a, b) ((a) + (b)) + UNBAL6 + ( + x + , diff --git a/libraries/mcpp/cpp-test/test-t/unspcs.c b/libraries/mcpp/cpp-test/test-t/unspcs.c new file mode 100644 index 000000000..0e24be8a3 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/unspcs.c @@ -0,0 +1,34 @@ +/* + * unspcs.c: + * 1998/08 kmatsui + * + * These texts are unportable ones, because the order of the evaluation is + * unspecified. Good preprocessor will warn at these texts even if the + * results are valid. Good preprocessor will also document the order of + * evaluation and the behavior on invalid results. + * Note: Order of evaluation of sub-expressions (other than operands of &&, + * ||, ? :) of #if expression is also unspecified. The order, however, never + * affects the result, because #if expression never cause side effect, so no + * warning is necessary. Precedence and grouping rules of operators are other + * things than order of evaluation, and shall be obeyed by preprocessor. + * + * 2003/03 Rewritten for testsuite. kmatsui + */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic -Wall" } */ + +#define str( a) # a +#define xstr( a) str( a) + +/* s.1.1: Order of evaluation of #, ## operators. */ +#define MAKWIDESTR( s) L ## # s /* { dg-warning "Macro with mixing of ## and # operators isn't portable" } */ +/* Either of L"name"; or L# name; ("L#" is not a valid pp-token). */ + MAKWIDESTR( name); + +/* s.1.2: Order of evaluation of ## operators. */ +#define glue3( a, b, c) a ## b ## c /* { dg-warning "Macro with multiple ## operators isn't portable" } */ +/* "1.a" or undefined, since .a is not a valid pp-token, while 1. and 1.a are + valid pp-tokens. */ + xstr( glue3( 1, ., a)); + diff --git a/libraries/mcpp/cpp-test/test-t/vers2.h b/libraries/mcpp/cpp-test/test-t/vers2.h new file mode 100644 index 000000000..91963420c --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/vers2.h @@ -0,0 +1,12 @@ +/* vers2.h */ + +/* comment */ # /**/ pragma /**/ once /**/ + +#include +#include + +/* + * , might have the line + * #pragma once + * near the beginning. + */ diff --git a/libraries/mcpp/cpp-test/test-t/warn_1_1.c b/libraries/mcpp/cpp-test/test-t/warn_1_1.c new file mode 100644 index 000000000..5c48bf61e --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/warn_1_1.c @@ -0,0 +1,13 @@ +/* warn_1_1.c */ + +/* + * The following text is legal but suspicious one. Good preprocessor + * will warn at this text. + */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic -Wall" } */ + +/* w.1.1: "/*" in comment. */ /* { dg-warning "(\"/\\*\"|`/\\*') within comment" } */ +/* comment /* nested comment and no closing */ /* { dg-warning "(\"/\\*\"|`/\\*') within comment" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/warn_1_2.c b/libraries/mcpp/cpp-test/test-t/warn_1_2.c new file mode 100644 index 000000000..8c292fa77 --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/warn_1_2.c @@ -0,0 +1,20 @@ +/* warn_1_2.c */ + +/* + * The following text is legal but suspicious one. Good preprocessor + * will warn at this text. + */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic -Wall" } */ + +/* w.1.2: Rescanning of replacement text involves succeding text. */ +#define sub( x, y) (x - y) +#define head sub( + int a = 1, b = 2, c; + c = head a,b ); /* { dg-warning "involved subsequent text" "macro call involves subsequent text" } */ + +#define OBJECT_LIKE FUNCTION_LIKE +#define FUNCTION_LIKE( x, y) (x + y) + c = OBJECT_LIKE( a, b); /* { dg-warning "involved subsequent text" "macro call involves subsequent text" } */ + diff --git a/libraries/mcpp/cpp-test/test-t/warn_2.c b/libraries/mcpp/cpp-test/test-t/warn_2.c new file mode 100644 index 000000000..330887c7d --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/warn_2.c @@ -0,0 +1,19 @@ +/* warn_2.c */ + +/* + * The following texts are legal but suspicious ones. Good preprocessor + * will warn at these texts. + */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic -Wall" } */ + +/* w.2.1: Negative number converted to positive in #if expression. */ +#if -1 < 0U /* { dg-warning "changes sign when promoted| converted to positive" } */ +#endif + +/* w.2.2: Out of range of unsigned type (wraps around and never overflow) + in #if expression. */ +#if 0U - 1 /* { dg-warning "out of range" } */ +#endif + diff --git a/libraries/mcpp/cpp-test/test-t/warn_3.c b/libraries/mcpp/cpp-test/test-t/warn_3.c new file mode 100644 index 000000000..053d560df --- /dev/null +++ b/libraries/mcpp/cpp-test/test-t/warn_3.c @@ -0,0 +1,117 @@ +/* warn_3.c */ + +/* { dg-do preprocess } */ +/* { dg-options "-ansi -pedantic -Wall" } */ +/* { dg-excess-errors "" } */ + +/* + * The following texts are legal but non-portable ones, since these requires + * translation limits greater than the minima quaranteed by C90. Good + * preprocessor will warn at these texts (at least when user wants), unless + * it diagnose these as errors. + */ + +/* w.3.1: Number of parameters in macro: more than 31. */ +#define glue63( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + o0 ## o1 ## o2 ## o3 ## p0 ## p1 ## p2 + +/* w.3.2: Number of arguments in macro call: more than 31. */ +/* A0B0C0D0E0F0G0H0O0O1O2O3P0P1P2; */ + glue63( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3); +/* { dg-warning "More than 31 (parameters|arguments)" "" { target *-*-* } 0 } */ + +/* w.3.3: Initial significant characters in an identifier: more than 31. */ + int +A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef = 63; +/* { dg-warning "Identifier longer than 31 characters" "" { target *-*-* } 34 } */ + + +/* w.3.4: Nested conditional inclusion: more than 8 levels. */ +#define X0F +/* nest = 0x0f; */ +#include "ifdef15.h" +/* { dg-warning "More than 8 nesting of #if" "" { target *-*-* } 0 } */ + +/* w.3.5: Nested source file inclusion: more than 8 levels. */ +#define X0F +/* nest = 0x0f; */ +#include "nest1.h" +/* { dg-warning "More than 8 nesting of #include" "" { target *-*-* } 0 } */ + +/* w.3.6: Parenthesized expression: more than 32 levels. */ +/* nest = 63; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - 0x3E) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -1 + nest = 63; +#endif +/* { dg-warning "More than 32 nesting of parens" "" { target *-*-* } 0 } */ + +/* w.3.7: Characters in a string (after concatenation): more than 509. */ + char *string1023 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" +; +/* { dg-warning "string length `\[0-9\]*' is greater than the length `509'| Quotation longer than 509 bytes" "" { target *-*-* } 0 } */ + +/* w.3.8: Characters in a logical source line: more than 509. */ + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int g123456789012345678901234567890 = 123456; \ + int h123456789012345678901234567890 = 123457; \ + int i123456789012345678901234567890 = 123458; \ + int j123456789012345678901234567890 = 123459; \ + int k123456789012345678901234567890 = 123460; \ + int l123456789012345678901234567890 = 123461; \ + int m123456789012345678901234567890 = 123462; \ + int n123456789012345678901234567890 = 123463; \ + int o123456789012345678901234567890 = 123464; \ + int p123456789012345678901234567890 = 123465; \ + int q123456789012345678901234567890 = 123466; \ + int r123456789012345678901234567890 = 123467; \ + int s123456789012345678901234567890 = 123468; \ + int t1234567890123456 = 123469; +/* { dg-warning "Logical source line longer than 509 bytes" "" { target *-*-* } 0 } */ + +/* w.3.9: Macro definitions: more than 1024 (including predefined ones). */ +#define X0400 +#include "m4095.h" +/* 0x0400; */ + BNJ; +/* { dg-warning "More than 1024 macros defined" "" { target *-*-* } 0 } */ + diff --git a/libraries/mcpp/doc-jp/LICENSE b/libraries/mcpp/doc-jp/LICENSE new file mode 100644 index 000000000..5b617d281 --- /dev/null +++ b/libraries/mcpp/doc-jp/LICENSE @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * This software including the files in this directory is provided under + * the following license. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/libraries/mcpp/doc-jp/cpp-test.html b/libraries/mcpp/doc-jp/cpp-test.html new file mode 100644 index 000000000..e5571eeef --- /dev/null +++ b/libraries/mcpp/doc-jp/cpp-test.html @@ -0,0 +1,4137 @@ + + + + + + + + +
+

CPP-TEST

+

== Validation Suite for Standard C Conformance of Preprocessing ==

+
+
+

for V.1.5.5 (2008/11)
+ (kmatsui@t3.rim.or.jp)

+
+
+

== ܼ ==

+
+ +

1. Standard C Validation Suite +
1.1. +
1.2. +
1.3. ΥɥȤɽˡ +
+
+
2. Standard C ץץħ +
2.1. K&R 1st. Standard C Υץץ +
2.2. Translation phases +
2.2.1. ³ tokenization
+
2.3. Preprocessing token +
2.3.1. Keyword ʤ +
2.3.2. Preprocessing-number +
2.3.3. Token-base ư token Ϣ
+
2.4. #if ɾη +
2.5. Portable ʥץץå +
2.6. ؿͥޥŸˡ +
2.6.1. ؿƤӽФƱ +
2.6.2. ֤Ÿ +
2.6.2.1. #, ## 黻Ҥ operand Ÿʤ
+
2.6.3. Ȥ +
2.6.4. ƱޥκƵŪŸɻ
+
2.7. +
2.7.1. <stdio.h> η header name +
2.7.2. Character-base ΤʤĤ # 黻Ҥε +
2.7.3. ޥ white spaces ΰ +
2.7.4. ؿͥޥΥѥ᡼̾ +
2.7.5. ɾΤ狼ʤ #if ʸ +
2.7.6. ޥδؿͤǤʤ +
2.7.7. C90 Corrigendum 1, Amendment 1 Ǥɲ +
2.7.8. Ĺʵ
+
2.8. C99 Υץץ +
2.9. ʥץץ +
+
+
3. Validation Suite +
3.1. Validation Suite for Conformance of Preprocessing +
3.2. ƥˡ +
3.2.1. ưƥ +
3.2.2. cpp_test ˤ뼫ưƥ +
3.2.3. GCC / testsuite ˤ뼫ưƥ +
3.2.3.1. TestSuite Ȥ +
3.2.3.2. TestSuite ؤΥ󥹥ȡȥƥ +
3.2.3.3. mcpp μưƥ +
3.2.3.4. TestSuite ȸڥå
+
3.3. Violation of syntax rule or constraint ȿǥå +
3.4. ܺ +
3.4.1. Trigraphs +
3.4.2. <backslash><newline> ˤ³ +
3.4.3. +
3.4.4. üʥȡ (digraphs) ʸ (UCN) +
3.4.5. Preprocessing directive line space, tab +
3.4.6. #include +
3.4.7. #line +
3.4.8. #error +
3.4.9. #pragma, _Pragma() operator +
3.4.10. #if, #elif, #else, #endif +
3.4.11. #if defined +
3.4.12. #if η +
3.4.13. #if α黻 +
3.4.14. #if Υ顼 +
3.4.15. #ifdef, #ifndef +
3.4.16. #else, #endif Υ顼 +
3.4.17. #if, #elif, #else, #endif бطΥ顼 +
3.4.18. #define +
3.4.19. ޥκ +
3.4.20. Keyword Ʊ̾Υޥ +
3.4.21. Pp-token ʬΥפޥŸ +
3.4.22. Pp-number Υޥ sequence +
3.4.23. ## 黻ҤȤäޥ +
3.4.24. # 黻ҤȤäޥ +
3.4.25. ޥΥޥŸ +
3.4.26. ޥƱ̾ޥ +
3.4.27. ޥκ +
3.4.28. ޥ +
3.4.29. #undef +
3.4.30. ޥƤӽФ +
3.4.31. ޥƤӽФΥ顼 +
3.4.32. #if ʸ +
3.4.33. #if Υ磻ʸ +
3.4.35. #if multi-character ʸ +
3.4.37. Translation limits
+
3.5. ʬΥɥ +
+
+
4. ꤵƤʤ¦̤ɾ +
4.1. Multi-byte character encoding +
4.2. Undefined behavior +
4.3. Unspecified behavior +
4.4. ˥󥰤˾ޤ¾Υ +
4.5. ¾γƼʼ +
4.5.1. ư˴ؤʼ +
4.5.2. ץȳĥǽ +
4.5.3. ¹ԸΨ +
4.5.4. ɥȤʼ
+
4.6. C++ Υץץ +
+
+
5. C ץץμ +
5.1. ɸإåե +
5.1.1. Ū +
5.1.2. <assert.h> +
5.1.3. <limits.h> +
5.1.4. <iso646.h>
+
+
6. ƼץץåΥƥȷ +
6.1. ƥȤץץå +
6.2. ɽ +
6.3. ƥץץåħ +
6.4. ɾ +
6.5. ƥȤո +
+
+ +

1. Standard C Validation Suite

+

Martin Minow DECUS cpp Ū˽ľ mcpp V.2 ȾΤ portable ʣåץץåޤΥץץåϥ󶡤Τǡѥ뤹˥إåեΤĤΥޥؤ뤳ȤdzƼνѤ˰ܿǤ褦ˤʤäƤޤޤ Standard C (ISO/ANSI/JIS C) ȤƼư⡼ɤäƤޤΤ Standard C ⡼ɤϡʸ̤θ̩ Standard C ץץ¸ƤĤǤ

+

ΥץץåʤϡΥƥȤΤ "Validation Suite for Standard C Conformance of Preprocessing" ʥץץɸŬ򸡾ڤ륽եȥ켰ˤȾΤΤޤC ФǤʤ C++ ⥫СƤޤΥɥȤϤθڥå (Validation Suite) βǤθڥåȤϤΥɥȤȤȤˡBSD 饤󥹤ˤ륪ץ󥽡եȥȤƸޤ

+
+ +

1.1.

+

θڥåȤ 1998/08 NIFTY SERVE / FC / LIB 2 Ǹ졢http://www.vector.co.jp/pack ˤžܤޤˤ version number ޤǤ version 1.0 ǤäȤˤޤ

+

V.1.1 ϡC99 1997/08 draft б V.1.0 update ΤǤ1998/09 ˡϤ NIFTY SERVE / FC / LIB 2 vector / software pack Ǹޤ

+

V.1.2 ˷ꤷ C++ Standard бơV.1.1 ˤ updates äΤǤ1998/11 ˡϤ NIFTY SERVE / FC / LIB 2 vector / software pack Ǹޤ

+

V.1.3 ˷ꤷ C99 бơV.1.2 updates äΤǤޤưƥȤΥץϡGCC / testsuite ѤǤ褦˽ľ edition ɲäޤ

+

V.1.3 ϳȯǡmcpp V.2.3 ȤȤˡʵ(IPA) ʿǯ١̤Ƨեȥ¤ȡפ˿ ͵ץȥޥ͡ˤäƺ򤵤졢2002/07 - 2003/02 δ֤ IPA λȿУͤνΤȤ˳ȯʤޤѸǥɥȤ⤳ΥץȤǡͭ²ҡϥ˻䤬ȥƥäƤǤäΤǤ2003/02 ˤ mcpp V.2.3 ȸڥå V.1.3 m17n.org Ǹޤ

+

mcpp ȸڥåȤʿǯ١̤Ƨեȥ¤ȡפˤ PM ˤäƷ³ƺ򤵤졢줾 V.2.4, V.1.4 ؤ update Ȥʤޤ*1, *2

+

θ mcpp ȸڥåȤϤ˲ɤκȤ³Ƥޤ2005/03 ˤϤ줾 V.2.5, V.1.5 ꡼ޤڥå V.1.5 Ǥѹʤɤޤ2006/07 ˤϤ줾 V.2.6, V.1.5.1 ޤڥå V.1.5.1 ǤϳƽϤοСΥץץåΥƥȷ̤ɲä줿ʳˤ礭ѹϤޤ󡣤θ塢2006/11 mcpp V.2.6.2 ȸڥå V.1.5.2 2007/04 mcpp V.2.6.3 V.1.5.3 ꡼Ƥޤڥå V.1.5.2, V.1.5.3 ǤϤΥɥȤμ㴳ιäǡ¼ŪѹϤޤ +ˡ2007/05 mcpp V.2.6.4 2008/03 mcpp V.2.7 ȸڥå V.1.5.4 ꡼ޤ +ڥå V.1.5.4 ǤϾΥƥȥ˽ɲääۤVisual C++ 2008 Υƥȷ̤ɲäޤ +2008/05 ˤ mcpp V.2.7.1 2008/11 ˤ mcpp V.2.7.2 ȸڥå V.1.5.5 ꡼ޤ +ڥå V.1.5.5 Ǥ Wave V.2.0 Υƥȷ̤ɲäޤ

+

:

+

*1 cpp V.2.2 ޤǤñ cpp ȸƤǤ̤ cpp ʶ路Τǡ V.2.3 mcpp ȸƤ֤ȤˤMatsui CPP ΰ̣Ǥ롣ΥɥȤǤ V.2.2 ޤǤΥС mcpp ȸƤ֡ޤΥɥȤ̾ V.1.2 ޤǤ cpp_test.doc ȤƤV.1.3 cpp-test.txt ѹ V.1.5.2 cpp-test.html Ȥʤä伫Ȥ̾⡢V.1.2 ޤǤ Psycho ȤƤV.1.3 kmatsui ѹ

+

*2 ̤Ƨեȥ¤ȡ(Exploratory Software Project) γפϼΤȤΤ뤳ȤǤ롣

+
+

http://www.ipa.go.jp/jinzai/esp/

+
+

mcpp V.2.3 V.2.5 ޤǤϼΤȤ֤Ƥ

+
+

http://www.m17n.org/mcpp/

+
+

2006/04 ˼ΤȤ˰ܤä

+
+

http://mcpp.sourceforge.net/

+
+

cpp V.2.2 Ӹڥå V.1.2 ϥ٥ҤΥȤμΤȤˤ롣dos/prog/c Ȥǥ쥯ȥƤ뤬MS-DOS ѤǤϤʤ UNIX, WIN32/MS-DOS, OS-9 бƤ롣

+
+http://www.vector.co.jp/soft/dos/prog/se081188.html
+http://www.vector.co.jp/soft/dos/prog/se081189.html
+http://www.vector.co.jp/soft/dos/prog/se081186.html
+
+

Υ֥եΥƥȥեϡVector ΤΤ DOS/Windows Ϥ˹碌ơԥɤ [CR]+[LF] shift-JIS encode Ƥ롣SourceForge ΤΤ V.2.5 ޤǤ UNIX Ϥ˹碌Ʋԥɤ [LF] EUC-JP Ǥ롣V.2.6 [CR]+[LF] / shift-JIS zip Ǥ[LF] / EUC-JP tar.gz ǤΣΥ֥ե֤褦ˤ

+
+ +

1.2.

+

øεʤȤƤ ISO/IEC 9899:1990 (JIS X 3010-1993) ĹȤƤޤ1999 ǯˤ ISO/IEC 9899:1999 򤵤ޤǤԤ C90Ԥ C99 ȸƤӤޤԤ ANSI X3.159-1989 ܹԤΤʤΤǡ̤ˤ ANSI C ޤ C89 ȸƤФ뤳Ȥ⤢ޤޤISO/IEC 9899:1990 + Amendment 1995 C95 ȸƤ֤Ȥޤ

+

βǻȤֵʽפϼΤΤǤ

+
+  C90:
+    ANSI X3.159-1989        (ANSI, New York, 1989)
+    ISO/IEC 9899:1990(E)    (ISO/IEC, Switzerland, 1990)
+        ibid.   Technical Corrigendum 1     (ibid., 1994)
+        ibid.   Amendment 1: C Integrity    (ibid., 1995)
+        ibid.   Technical Corrigendum 2     (ibid., 1996)
+    JIS X 3010-1993 ܵʶJIS ϥɥ֥å 59-1994ס1994
+  C99:
+    ISO/IEC 9899:1999(E)
+        ibid.   Technical Corrigendum 1 (2001)
+        ibid.   Technical Corrigendum 2 (2004)
+  C++:
+    ISO/IEC 14882:1998(E)
+    ISO/IEC 14882:2003(E)
+
+

ANSI X3.159 ˤ "Rationale"ͳˤ°Ƥޤ ISO C90 ˤϤʤѤޤǤISO C99 Ǥ褷ޤ "Rationale" ޤ˿ƻȤޤ
+C++ 1998 ǯǤΤȤ 2003 ǯǤꤵޤʸνǤʤȤץץˤĤƤѹϤޤ󡣤ǡʸǤ 2003 ǯǤޤ C++98 ȸƤӤޤ

+

C99, C++ εʽ PDF ǥեޥåȤ줿饤ǤΤȤǤޤopen-std.org γƼ draft ̵ˡ

+

C99, C++98, C++03:

+
+

http://webstore.ansi.org/ansidocstore/default.asp

+
+

C99+TC1+TC2:

+
+

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf

+
+

C99 Rationale 1999/10 final draft:

+
+

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n897.pdf

+
+
+ +

1.3. ΥɥȤɽˡ

+

ΥɥȤϤĤƤϥƥȥեǤV.1.5.2 html ե +Ѥޤ
+ΥɥȤǤϼΤ褦˥եȤȤʬƤޤ

+
    +
  • source:
    +եȤϡɤҡޥɥ饤ϡץνϤ򼨤Τ˻Ȥޤ
    +
  • __STDC__:
    +եȤϡɸޥ򼨤Τ˻Ȥޤ
    +
+
+ +

2. Standard C ץץħ

+

Validation Suite β򤹤ˡStandard C (ISO C) ΥץץŪħƤޤ϶ʽŪǤϤʤK&R 1st. Ӥʤ Standard C Υץץιͤ餫ˤ褦ȤΤǤ

+

λȤƤϡK&R 1st. C90 Ȥ濴Ȥ C90 C99, C++ ȤդäȤȤޤߤϵʤȤƤ C99 ͭʤΤǤ¤νϤˤ C99 ϤޤȾʬƤʤΤǡC90 濴ȤۤºŪȻפ뤫Ǥ

+

ʤξϤǤϥץۤȤɼƤޤ󤬡Validation Suite ΤΤץʤΤǡ򻲾ȤƤ

+
+ +

2.1. K&R 1st. Standard C Υץץ

+

Pre-Standard ΣøϤˤ麹̤ޤǤץץˤϤۤȤɴबʤȸäƤ褤餤ξǤʤäϡȤʤ٤ Kernighan & Ritchie "The C Programming Language", 1st. edition Υץץε꤬ޤˤñʤޤʤΤǤäȤˤޤˤطʤˤϡץץϸΤФ֤ޤפΤ褦ʤΤȤͤäȻפޤK&R 1st. ʹߡƽϤˤäƥץץˤ¿εǽդäƤޤƤˤϸΤ䤦ΤΤȡۤʤϴ֤Ǥ portability ݤ褦ȤΤȤޤɤˤƤϴ֤㤬¿portable Ǥˤ󤤤Τ¾Ǥ

+

C90 ǤĹǯκθǤäΥץץΤʵ꤬Ϳޤɲä줿ǽ⤤ĤꡢˤĤƤϤ褯ΤƤޤäʤȤϡC90 ץץ˴ؤ¾ƤŪʵǤȤȤǤεˤϡޤǤޤǤä֥ץץȤϲפȤŪʤȤˤĤƤιͤ˸ƤޤC90 Υץץ K&R 1st. + ǤϤʤΤǤ򤹤ˤϡֿǽפǤʤܤΤİ뤳ȤɬפȻפޤǰʤȤˤϵʽʸˤϤΤȤޤȤƽҤ٤ƤϤ餺ʽǤ "Rationale" Ǥ⥵ȿƤǤ˻ǰʤȤˤϡΥץץȤŶη̤ȻפӤʤʬĤƤޤǡʲ C90 ץץδŪħޤȤƽҤ١ˤƤ뤳Ȥˤޤ

+

Pre-Standard ΥץץȰۤʤ롢뤤ϽΤˤ줿 Standard C ץץħϡΣˤޤȤ뤳ȤǤޤ

+
    +
  1. Τνϰ¸ʬʤ¹ԻĶ execution environ-mentˤΩʸ̤ΥץץǤ롣Ϥˤäƥץץճʷ̤ˤʤ붲ϤƾʤޤˤäơץץåΤΤΥ portable ˽񤯤ȤǽˤʤäƱΣϣӤǤСץץåμ¹ԥץϣĤǤ⤹ȸäɤ餤Ǥ롣
    +
    +
  2. Translation phases εˤäơ token ʬ䤹ޤǤμ礬ΤƤ롣Token ץץޤǤ pre-processing token ȤŪʷǰ롣Preprocessing token ȤΤ token ̤˵ꤷȤ⡢ץץΤνϰ¸ʬڤΥȤΩäƤ롣
    +
    +
  3. ץץ preprocessing token ñ̤Ȥ롢§Ȥ token-oriented ʤΤǤ롣Ф pre-Standard Υץץ token-oriented ʷˤʤ顢Ūаޤ餯 character-oriented ʽ򤹤ʬ򾯤ʤ餺ȾüʤΤǤä
    +
    +
  4. ؿͥޥŸϴؿƤӽФǥˤ뤳ȤǡʸˡƤ롣ؿͥޥθƤӽФϴؿƤӽФλȤȤʤɤǤȤ롣˥ޥƤӽФν⡢ؿΰ˴ؿƤӽФɾȥѥǤꡢΥޥŸƤִꥹΥѥ᡼֤롣λΥޥƤӽФϤΰǴ뤷ƤʤФʤʤ
    +
+

θ§ʲ˽缡ƤƤޤ

+
+ +

2.2. Translation phases

+

ץץμ K&R 1st. ǤϤޤäܤƤʤäˡ¿κθȤʤäƤޤC90 Ǥ translation phases ȤΤꤵơ줬Τˤޤ󤹤ȼΤ褦ʤΤǤ*1

+
    +
  1. եʸɬפʤ饽ʸåȤ map 롣Trigraph ִ򤹤롣*2
    +
  2. <backslash><newline> 롣ˤäʪԤ³Ԥˤ롣
    +
  3. Preprocessing token white spaces Ȥʬ򤹤롣Ȥ one space character ִ롣ԥɤݻ롣
    +
  4. Preprocessing directive ¹ԤޥƤӽФŸ롣#include directive Сꤵ줿եˤĤ phase 1 phase 4 ƵŪ˽롣
    +
  5. ʸåȤ¹ԻʸåȤؤѴ򤹤롣Ʊͤˡʸʸƥ escape sequence Ѵ롣
    +
  6. ܤʸƥϢ뤷ܤ磻ʸƥϢ뤹롣
    +
  7. Preprocessing token token Ѵѥ뤹롣
    +
  8. 󥯤롣
    +
+

󡢤ϼºݤ̡ phase ˤʤäƤɬפϤʤƱ̤ˤʤ褦˽ɤȤˤʤäƤޤ

+

Τ phase 1 phase 4 ޤ 6 ޤǤץץϰϤ°ޤץץåΩץˤʤäƤƥץץ̤֥եȤƽϤϡԥ token separator ¸ɬפ뤿ᡢphase 4 ޤǤôΤ̤Ǥphase 5 \n escape sequence ѴƤޤȡ줬 token separator ȤƤβԥȶ̤Ĥʤʤˡ Validation Suite ǥƥȤΤ phase 4 ޤǤǤ

+

:

+
+*1 C90 5.1.1.2 Translation phases ե
+   C99 5.1.1.2 Translation phases
+
+C99 Ǥ phase 4 _Pragma() operator νդä줿 +Τۤ㴳λ礬ɲäƤ뤬̣ѲϤʤ

+

*2 C99 1997/11 draft Ǥϡtrigraphs Ѵˡbasic source character set ˴ޤޤʤ multi-byte character \Uxxxxxxxx Ȥ Unicode Σ sequence ʤ universal character name Ѵ롢ȤˤʤäƤơphase 5 Ǥ¹ԻʸåȤ˺ѴȤΤǤ롣C++ Standard ǤۤƱͤǤ롣ͤޤǤ뤦ˡϤˤȤäƤô礭ȤǤ롣ʤȤ 1999/01 draft phase 1 νϺ졢C99 ǤǤ⤽̤Ȥʤä

+ +

2.2.1. ³ tokenization

+

<backslash><newline> ˤ³ K&R 1st. Ǥϡ

+
    +
  1. Ĺ #define ԤˤΡ
    +
  2. ĹʸƥˤΡ
    +
+

ΣĤܤƤǡ¾ξϤɤʤΤ餫ǤϤޤǤ

+

C90 Ǥϡphase 3 preprocessing token token separator ȤƤ white spaces ؤʬ䤬Ԥˡphase 2 <backslash><newline> κԤ뤳ȤΤˤ졢ɤʹԤǤ⡢ɤ token ǤͭȤʤޤ

+

ޤtrigraph ν phase 1 ǹԤΤǡ??/<newline> Ȥ sequence Ʊͤ˺ޤ¾ǡʸåȤ ASCII multi-byte character encoding shift-JIS ǤϤǤϡĤ multi-byte character ǤΤǡХܤ 0x5c Υɤ <backslash> ǤϤޤ

+

Translation phase ΤˤʤäΤɤΤǤϤ token Ǥι³ʤɤȤΤǧɬפΤɤϡǤK&R 1st. Ǥϲ̣ԤˤޤʤĹʸƥ̤ˤޤ褦˽񤯤ˤϤˡʤä櫓ǤC90 Ǥܤʸƥ뤬Ϣ뤵뤳ȤˤʤäΤǡ虜虜 token DzԤɬפϤʤʤäƤޤ³ɬפʤΤĹȥԤ񤯻ǤǤСphase 2 3 ϵդΤۤɤäΤǤ

+

ˤ⤫餺줬ߤεΤ褦˷ޤäΤϡK&R 1st. ʸƥι³ˤϢȤͤȤƽ񤫤줿Ǥ褦ˤȤbackward compatibilityʸߴˤΤȻפޤˤĤƤϼѾϤۤȤɰ̣ΤʤǤñʡκǤưפʤΤǤΤǡǤ礦

+
+ +

2.3. Preprocessing token

+

Preprocessing tokenʰʸ塢pp-token άˤȤǰ C90 ǽƳ줿ΤǤˤĤƤ֤ǤޤΤƤʤ褦ʤΤǡƤ󤫤ϤʤФʤޤpp-token ȤƵꤵƤΤϼ̤Ǥ*1

+
header-name
+identifier
+preprocessing-number
+character-constant
+string-literal
+operator
+punctuator
+嵭ΤɤˤƤϤޤʤ non-white-space character
+

ʤΤ褦ǸᤴƤޤǤ token ȤϤʤäƤޤToken ϼΤ褦ʤΤǤ

+
keyword
+identifier
+constant (floating-constant, integer-constant, enumeration-constant, character-constant)
+string-literal
+operator
+punctuator
+

Pp-token token ȰäƤΤϼǤ

+
    +
  1. Keyword ¸ߤʤ +keyword Ʊ̾ identifier Ȥư롣
    +
  2. Constant Τ character-constant ƱǤ뤬floating-constant, integer-constant, enumeration constant ¸ߤfloating-constant, integer-constant preprocessing-number ȤΤ롣
    +
  3. Header-name pp-token ȤƤ¸ߤʤ
    +
  4. Operator punctuator ϤۤƱǤ뤬operator #, ## punctuator # pp-token ȤƤ¸ߤʤʤ preprocessing directive ԤǤͭˡ
    +
+

ȡƱʤΤ string-literal character-constant ʤΤǤǤפʤΤ keyword ¸ߤʤȤȡ token pre-processing-number ¸ߤǤΣˤĤơ˸Ƥޤ

+

:

+
+*1 C90 6.1 Lexical elements 
+   C99 6.4 Lexical elements
+
+C99 Ǥ pp-token Ǥ token Ǥ operator punctuator ˵ۼ줿Operator ȤѸ token μȤƤǤϤʤñˡֱ黻ҡפȤǽɽѸȤʤäƱ punctuator token (punctuator pp-token) ʸ̮ˤä punctuator ʶڤҡˤȤƵǽꡢoperator ȤƵǽꤹ뤳Ȥˤʤ롣ޤpp-token α黻ҤȤ _Pragma ɲä줿

+ +

2.3.1. Keyword ʤ

+

Keyword phase 7 ǽǧޤץץ phases Ǥ keyword identifier ȤưޤơץץˤȤäƤ identifier ϥޥ̾Ǥ뤫ޥȤƤʤ identifier Ǥ뤫Τɤ餫Ǥ (*1)ȤȤϡkeyword Ʊ̾ΥޥȤȤȤˤʤޤ

+

εϡץץϰ¸ʬڤΥԲķΤΤȻפޤˤä㤨 #if ˥㥹Ȥ sizeof ȤȤػߤޤ*2

+

:

+

*1 äΤ˸СޥΥѥ᡼̾ identifier Ǥ롣ޤpreprocessing directive ̾ü identifier Ǥꡢkeyword ȻʤäƤ롣줬 directive Ǥ뤫ɤϹʸȽǤΤǤꡢdirective ǤʤˤСޥŸоݤȤʤꤦñʤ identifier Ǥ롣

+

*2 3.4.14.7, 3.4.14.8 ȡ +

+ +

2.3.2. Preprocessing-number

+

Preprocessing-numberʰʸ塢pp-number άˤϼΤ褦˵ꤵƤޤ +*1, *2

+
+digit
+. digit
+pp-number digit
+pp-number nondigit
+pp-number e sign
+pp-number E sign
+pp-number .
+
+

Non-digit ȤΤ letter underscore Ǥ +

+

󤹤Ȥʤޤ +

+
    +
  1. Ƭ digit ޤ . digit Ǥ롣 +
    +
  2. Ȥ letter (alphabet), underscore, digit, period e+, e-, E+, E- sequence Ĥɤ¤ǤƤ⤫ޤʤ
    +
+

Pp-number floating-constant, integer-constant Τ٤Ƥޤߤޤ㤨 3E+xy ȤäͤǤϤʤΤޤǤޤPp-number ϥץץñˤ뤿˺Ѥ줿Τạ̇̄ΩĤμ sequence tokenization ΩĤȤƤޤ*3

+

Tokenization ñˤʤΤϳΤǤ pp-number ͭ token ǤϤޤ󡣤äơϥץץνޤǤ˾ǤƤʤФʤޤ pp-number ȤΤ虜虜ǻȤɬפϤޤޤ󤬡ƻȤȤͣͤΤϡ## 黻ҤȤä줿ޥǿ pp-number Ȳ pp-token ȤϢ뤵 pp-number Ȥʤꡢ # 黻ҤȤä줿ޥˤäƤ줬ʸ󲽤ǤʸƥƤޤСɤ pp-token valid token ˤʤޤ pp-number ¸ߤǧʤȡϢˤä줿Τ valid pp-token ǤϤʤʤäƤޤޤʤη̤ undefined Ȥʤˡ

+

Ȥƻ϶ˤüʤΤǤܺ٤˸ƤɬפϤޤ󤬡 pp-number token-oriented ʥץץͤ뤦Ƕ̣󶡤Ƥޤ

+

:

+
+*1 C90 6.1.8 Preprocessing numbers 
+   C99 6.4.8 Preprocessing numbers
+
+

*2 C99 ǤưΣɽǽˤ뤿ˡpp-number p sign, pp-number P sign Ȥ sequence ɲäƤ롣

+

ޤ嵭 nondigit identifier-nondigit ֤줿 identifier UCN (universal character name) Ƚ multi-byte character λѤǧ줿ΤȼѹǤ2.8 ȡˡʤpp-number UCN ȤȤǤmulti-byte character ȤǽǤ롣ͥȡ UCN multi-byte character ޤޤ뤳ȤϤʤΤǤ뤬Ϥ ##, # 黻ҤȤäʸ󲽤ΤȤͤơ줬ǧ줿ΤǤ

+
+*3 C89 Rationale 3.1.8 Preprocessing numbers
+   C99 Rationale 6.4.8 Preprocessing numbers
+
+ +

2.3.3. Token-base ư token Ϣ

+

C90 Ǥϥޥ黻 ## ˤä pp-token Ϣ뤹뤳ȤǤ褦ˤʤޤΤȤ C90 ΡֿǽפȤƤ褯ΤƤޤɲä줿ǽȤϡ΢Ūˡؤ뤿Ƴ줿ΤǤܤΤϡ줬 token-oriented ʥץץΤɬܤΤΤȤʤäƤ뤳ȤǤ

+

token ϢˡȤƤϡ "Reiser" cpp ǤΡȤ 0 Ĥ character ִȤͤѤΤΤƤޤޤʳˤ character-oriented ư򤹤ץץåǤϡտޤʤˤޤ token Ϣ뤬ȯƤޤȤꡢѤ΢ŪˡʤǤϤޤǤϤ⡢character-oriented ʥץץη٤Ѥˡȸޤ

+

Ф C90 Ǥϡtoken-oriented ưˤäŪ token Ϣ뤹뤳ȤǤ褦ˤʤäƤޤTranslation phase 3 ǥ pp-token white spaces sequence ʬ򤵤ޤθ pp-token ȤΤϡ## 黻ҤˤϢ # 黻Ҥˤʸ󲽡header-name ܤʸƥϢȥ磻ʸƥϢ뤷ޤ pp-number ¸ߤ⤳ʸ̮֤ƹͤȡΰΤˤʤޤʤC90 tokenization ˤĤƤϡΤ褦ʸ§¸ߤƤȸǤ礦

+
    +
  1. Pp-token ۤΤϢ뤵뤳ȤϤʤϢ ## 黻ҤˤäʤФʤʤ
    +
  2. äϢ뤵줿 pp-token ƤʬΥ뤳ȤϤʤ
    +
+

Pre-Standard character-oriented ʥץץǤϡޥƤӽФŸȡη̤ token sequence token ȰտޤʤϢȤޤ token-oriented Standard C ΥץץǤϵäƤϤʤʤȤȹͤޤ*1

+

:

+

*1 3.4.21 ȡ +

+
+ +

2.4. #if ɾη

+

C90 Ǥ #if ɾ long ʤ unsigned long ΣΥǹԤ뤳Ȥˤʤޤ (*1)⡢ץץñ㲽ȤȤˡϰ¸ʬ򾯤ʤΤΩäƤޤint ΥϤˤä礭ѤΤ٤ơlong / unsigned long ȾνϤӥåȡνϤӥåȤޤϣӥåȤǤ顢̤ #if ˤϤʤ portability ݤǤޤ*2, *3

+

:

+
+*1 C90 6.8.1 Conditional inclusion դ -- Semantics ̣§
+
+*2 C99 6.10.1 Conditional inclusion
+
+

C99 Ǥ #if ηϤνϤκȤ줿 +C99 Ǥ long long / unsigned long long ɬܤǤΤǡ long long / unsigned long long ޤϤʾȤȤˤʤ롣ˤä #if portability Ϥʤ㲼뤳Ȥˤʤä

+

*3 long ӥåȤνϤƤ뤫⤷ʤɤȤȤ ;̤Ǥ뤬ΥϼΤ褦˷ۤɤȻפäƤ롣

+
    +
  1. short ϣХȡlong ϣХȤȤ롣
    +
  2. longlonglong long ǤϤʤˤޤ quadra 򣸥ХȤȤ롣
    +
  3. int CPU ˤȤäƤμʥȤ롣ʤ short, long, longlong Τɤ줫ĤȰפ롣
    +
  4. short int, long int Ȥդ short, long int ν˻ȤȤϤ롣
    +
+

ʤӥåȤνϤνи衢sizeof (short) <= sizeof (int) <= sizeof (long) Ȥ󤬤뤿ˤ٤ƤԼˤʤꡢɤη portability ʤʤäƤƤΤǤ롣ϤơХǷΤɤ

+
+ +

2.5. Portable ʥץץå

+

ʾΤ褦 Standard C ץץεϡץץåΤΤΥ portable ˽񤯤ȤǽˤƤޤץץåѥΤνϰ¸ʬˤĤΤʤФʤʤȤϡʤǤºݤ Standard C νϤǥץץå portable ˽񤳤ȤȤʤΤϡΤ褦ʼŪʬǤ

+
    +
  1. #include ΤΣϣӤΥѥꥹȵҷɸإåեΤ꤫
    +
  2. ե̾ȹֹξ򥳥ѥΤϤη
    +
  3. ¹Իץ
    +
  4. ʸåȡ
    +
  5. ϤǤϡC90 Ǥ long / unsigned long ΡC99 ǤϺΥåȽϤΤ򲼲äƤƤϤʤʤȡ
    +
+

Τȣϴ¸νϤ˼Ȥʤǡ⤤ϥƱ #line 123 "filename" Ȥ줵ƤȴԤޤ̵ƤʻȤϤȤ⤫ŪˤϡStandard C ΥץץϲǽǤ⥽νˤäƤϡ̤ implementation ɬפȤʤǽ񤱤ʤϤޤʤʸåȤϥ˥ơ֥񤯤ۤڤǤ뤬ˡϼºݤˤϡۥȽϤΤۤåȽϤΥȤȤϤۤȤɤʤǤ礦顢ȤϤʤʤǤ礦

+

mcpp 󡢤 Standard C ץץλͤΤΩƤ뤳ȤưȤƤޤʤmcpp ¿νϤ˰ܿ뤳ȤŪȤƤΤǡportability ݤΤ #if section ʤ¿ʤäƤ뤬ˡ

+
+ +

2.6. ؿͥޥŸˡ

+

դΥޥŸˡ C90 ǤϴؿƤӽФǥˤƵꤵ졢function-likeʴؿ͡˥ޥȸƤФ褦ˤʤޤ˥ޥޤޤƤϡ§Ȥơϥѥ᡼ȤִäŸޤ

+

Pre-Standard ǤϤ餫ǤϤޤǤºݤˤϡΥޥŸ˥ѥ᡼ִŸȤˡȤΤ¿äΤǤϤʤȻפޤŸˡطʤˤΤϡХǥͤΥƥִη֤ȤȯۤǤäȿ¬ޤʤޥŸϰ̤˥ǥͤΥƥִη֤Ǥޤʤ櫓ǤդޥŸˤ⹭Τ¿ΥץץåΥޥŸˡäΤǤϤʤǤ礦

+

ˡϥǤδؿƤӽФͤγѤȤϤޤäۤʤä̯ʥޥλȤͶȯͥȤ줿դޥθƤӽФκݤˤϡɤ줬ɤΰʤΤ狼ʤʤ֤ȯޤᤰäƽϰ¸ʬƤޤǸСäΥޥŸϹ٤ʵǽô褦ˤʤäˡǥͤΥƥִη֤ȤȯۤǤϤϤ٤ŤʤꤹȸǤ礦

+ +

2.6.1. ؿƤӽФƱ

+

Ƨޤ Standard C ϡfunction-like ޥθƤӽФؿƤӽФؤǤΤȤưդ뤳ȤǡʸˡȹͤޤRationale Standard C Υޥ˴ؤ뵬꤬ɤȤ§򤤤Ĥ󤲤Ƥǡ§򼨤Ƥޤ*1

+
    +
  • ؿȤȤǤϤɤǤޥȤ褦ˤ뤳ȡ
    +
  • ޥƤӽФϤɤˤäƤ⡢ʤϤʸˤäƤ⡢ޥΰˤäƤ⡢ޥˤäƤ⡢Ʊ token sequence 褦˥ޥŸꤹ뤳ȡ
    +
+

ϴؿƤӽФʤΤȤǤդޥθƤӽФǤǤϤʤäΤǤǥͥƥִη֤ǤϡʤʤȤ餫Ǥ

+

:

+
+*1 C89 Rationale 3.8.3 Macro replacement
+   C99 Rationale 6.10.3 Macro replacement
+
+ +

2.6.2. ֤Ÿ

+

ؿƤӽФȥѥʥޥŸȤ§¸뤿˴οʤΤϡΥޥŸƤѥ᡼֤뤳ȤǤơΤˤϰΥޥƤӽФϤΰǴ뤷ƤʤФʤޤʴ뤷Ƥʤϥ顼ȤʤˡΥޥθΥƥȤ򿩤äƤޤʤɤȤȤäƤϤʤޤ󡣤ˤäơͥȤ줿ؿͥޥθƤӽФŪݤĤȤǤޤ*1

+

:

+

*1 3.4.25 ȡ +

+ +

2.6.2.1. #, ## 黻Ҥ operand Ÿʤ

+

# 黻Ҥ operand ϥޥŸʤȤˤʤäƤޤ +ޤ## 黻Ҥ operand ޥŸ줺Ϣˤä줿 pp-token Ϻ˥ޥŸоݤȤʤޤεϤʤɬפʤΤǤ礦

+

ε꤬̣ĤΤϡޥޤǤǤޥޤ token sequence 򤽤Τޤʸ󲽤Ϣ뤷ꤷˡε꤬ΩĤȤˤʤޤդŸƤʸ󲽤Ϣ뤷ꤷϡ#, ## 黻ҤȤʤޥ⤦Ĥ֤뤳ȤˤʤޤΤɤǤץޤǤ褦ˤ뤿ˤϡ#, ## 黻Ҥ operand ϥޥŸʤȤ꤬ɬפʤΤǤ*1

+

:

+

*1 3.4.25, misc.t / PART 3, 5 ȡ# 黻Ҥ operand ޥŸʤȤ꤬ΩɽŪ assert() ޥǤ롣5.1.2 ȡ

+ +

2.6.3. Ȥ

+

ơޥŸϥޥƤӽФִꥹȤ֤졢function-like ޥΰ§ȤŸƤִꥹΥѥ᡼֤줿塢ִꥹΥޥƤӽФ򤵤ƺ뤳ȤˤʤäƤޤ

+

κ K&R 1st. λͤǤơطʤˤϡ֥ǥͤΥƥִη֤פȤȯۤäȻפޤStandard C Ǥ function-like ޥΰ ## 黻Ҥ operand ʳ˴ŸƤޤäƤޤǤϤäŸΤǤ礦

+

ɬפʤΤϡִꥹΥѥ᡼ʳʬ˥ޥ硢 ## 黻Ҥޤޥξ硢⤦ĤϥޥΡפŤˤʤä cascaded macro ǤޥƤӽФΡְפŤˤͥȤƤϡϺҹ¤ŸƤΤǡ̾ϺǿŸ뤳ȤϤޤʤ㳰Ϥ롣2.7.6, 3.4.27 ȡˡ +

+ +

2.6.4. ƱޥκƵŪŸɻ

+

Cascaded macro ϼŸƤޤʤäƤϺ礬ޤϥޥȤƵŪˤʤäƤǤ򤽤ΤޤŸ̵ºƵ˴٤äƤޤޤȤˤΥޥޤޤƤľܺƵξϤ󡢣İʾŪ˺ƵƤƱҤޤ򤱤뤿ᡢStandard C ǤϡŸΥޥƱ̾Υޥִꥹ˸Ƥ⡢ִʤפȤղäƤޤʸϤǤΰտޤϤ狼䤹ΤǤ

+

ϴؿͥޥξ硢ؿȤϰäʸˡˤʤǤǥִȤޤäƤޤޥͭλͤǤꡢޥǤǤʤʽȤƽȤƤΤʤΤǡλͤβƻĤΤʤȤǤ礦

+
+ +

2.7.

+

ơʾǤ Standard C Υץץɤ̡ñ̤夲Ƥޤܺ٤˸ƤȡԵ§ʤȤ䡢ϤΥСإåɤγͭܿ˳Ȥ˴ޤޤƤޤ¿ pre-Standard ŪŪʥץץˡ줺˻ĤäƤޤäΤȻפޤΩʤIJŪʬ¸ߤͤ狼ˤäˤƤޤޤStandard C ˤäƿ̵ѤѻˤʤäȤ鷺ʤ餢ޤʲˤФƤߤޤ

+ +

2.7.1. <stdio.h> η header-name

+

<, > ǰϤޤ줿 header-name K&R 1st. Ū˻ȤƤƤΤǤȡȤƤϤ㳰ŪԵ§ʤΤǤΤ Standard C Ǥ header-name Ȥ pp-token ˴ؤƤ undefined ʬ implementation-defined ʬ¿ʤäƤޤäƤޤ㤨 /* Ȥ sequence ޤޤƤ undefined Ǥޤ<stdio.h> Τ褦ˡheader-name Ǥʤ <, stdio, ., h, > ȤĤ pp-token ʬ򤵤Ȥ#include Ԥ˸¤äƣĤ pp-token ˹ʤФʤޤ󡣤ˡ implementation-defined ǤTokenization translation phase 3 ǹԤΤˡphase 4 ǤιԤ #include directive ǤȤ狼ȡtokenization ʤʤФʤʤΤǤϤʤϤŪʻͤȸ虜򤨤ޤPhase 3 Ǥäʬ򤵤줿ʲΡpp-token δ֤ space νȤʤޤ#include <stdio.h> ʤɤȤǥ쥯ƥ֤ϺǤ portability ι⤤ΤΤ褦˸ޤץץμͤȤʤ portability 㤤ΤʤΤǤ#include ԤΰޥǤȡԵ§ޤ

+

", " ǰϤޤ줿 header-name ˤϡϤޤ󡣤\ escape ʸȤưʤȤȤ <, > ˤ header-name ƱͤǡʸƥȤϰä̤äƤޤescape sequence phase 6 ǽΤʤΤǡphase 4 ǽƤޤ header-name escape sequence ¸ߤʤΤϡŪʤȤǤϤޤʵʤǤ header-name \ undefined Ǥ롣ϼڤˤ뤿θǤºݡ", " Ǥ \ " ľˤΤǤʤ¤ꡢʤ<, > ǤϤ⤦ʣǤ뤬ˡ*1

+

ޤ#include <stdio.h> #include "stdio.h" Ȥΰ㤤ϡԤϽξõΤФơԤϥȥǥ쥯ȥʤХѥˤõơ̵ <stdio.h> ƱõȤΤȤˤޤStandard C ǤϣϣӤ˴ؤ֤ƤʤΤǡ֥ȥǥ쥯ȥפȤѸϻȤäƤʤ¿ΣϣӤˤĤƤϤᤵˡʤ#include <stdio.h> #include "stdio.h" Ƚ񤱤ФळȤʤΤǤ

+

Header-name ηˣ濫뤳Ȥϡ桼Υإåȥƥ󶡤إåȤζ̤ܤǤ狼Ȥ readability ޤΤˤϤ虜虜Ե§ʥȡѰդʤƤ⡢"stdio.h" "usr.H" Ȥդ suffix Ƕ̤­ޤǰΤոȡ readability Ǥ뤫顢ƥबե̾ʸȾʸ̤ʤƤ⤫ޤʤ"usr.hdr", "usr.usr", "usr.u" Ǥ⤫ޤʤˡ

+

<, > ǰϤޤ줿 header-name ϸͤȤƤ̵ѤǤꡢץץ tokenization ݤˤʤΤǡѻߤۤɤȻפޤΥ򥳥ѥ뤹뤿ˤϤʤѻߤ櫓ˤϤ椭ޤ󤬡obsolescent feature ȵꤷƤۤΤǤ

+

*1 ȤC99 Ǥ \ ǻϤޤ UCN Ƴ줿ˡäˤʤä

+ +

2.7.2. Character-base ΤʤĤ # 黻Ҥε

+

ϡ# 黻Ҥ operand pp-token δ֤ token separator ȤƤ white spaces ΰǤİʾ white spaces ϣĤ space ˰̤Ĥʤ space ʤȤˤʤäƤޤ

+

ȾüʵǤToken-based ưŰ줹뤿ˤϡtoken separator ̵ͭ˺ʤȤɬפǤꡢΤˤ token separator 򤹤٤ƺ뤫Ȥ⤢ pp-token δ֤ one space ֤ɤ餫˵ꤹ٤ǤC89 Rationale 3.8.3.2 (C99 Rationale 6.10.3.2) The # operator ϤεˤĤơ"As a compromise between token-based and character-based preprocessing discipline"token-based ʥץץˡ character-based ʤȤƤȤơ˷ꤵ줿ȽҤ٤Ƥޤ

+

ϥץץåμưפˤɤ;פô򤫤̤ˤʤäƤꡢޤʣʥޥŸˡˤޤ⤿餷ƤޤC90 6.8.3, C99 6.10.3 Macro replacement ޥִ -- Examples 4. ˤ㤬ܤäƤޤ

+
+#define str(s)      # s
+#define xstr(s)     str(s)
+#define INCFILE(n)  vers ## n
+
+#include xstr(INCFILE(2).h)
+
+

#include ԤϤŸȤΤǤ

+
+#include "vers2.h"
+
+

¿ϤǤޤ +INCFILE(2) vers2 ִ뤳ȤˤϤޤϤޤ󡣤xstr() ΰǤ INCFILE(2).h Ÿ̤ vers2, ., h ȤĤ pp-token sequence ǤʽŸϤΣĤ pp-token δ֤ white spaces ʤΤȤưäƤޤˤϼΤ褦꤬ޤ

+
    +
  1. vers2 ϥˤä pp-token ǤϤʤޥִˤä줿ΤǤ롣vers2 θ white spaces ʤȤݾڤ뤿ˤϡޥִ white spaces ʤ褦ˤʤФʤʤޥִˤǤȡʤȤץץåѥ餫ΩץǤ硢ޥŸη̤Ȥ pp-token ۤΤϢ뤷ƤޤȤȯ롣 token-based ʥץץθ§ȿ롣
    +
    +
  2. # 黻Ҥ operand ˤʤꤦޥִ white spaces pp-token ۤΤϢ뤹ΤɤˤϡؿͥޥƤӽФΰ¸ߤޥִǤϡŪ˲ white space ִ̤򤯤Ǥ줬 # 黻Ҥ operand ˤʤäϲ white space ٤ƤִäƤǸ˻Ĥä white space ʪ space ֤롢Ȥäٹɬפˤʤ (*1)ϥץץμˤȤäƤʤôǤ롣ơ˸礦åȤʤ⡢ɬפǤ뤳Ȥϵʽʸ餫ǤϤʤǤΤΤǤ롣
    +
+

ޤʤ䤳Ϥ٤ơ# 黻Ҥ operand token separator ΰȾüͳ褷Ƥޤ

+

# 黻ҤǤϤ٤Ƥ pp-token single space ʬΥʸ󲽤Ȥͤpp-token ΰۤϢɤ䤳ȯ뤳Ȥʤʸ󲽤줿ɤ pp-token sequence Ǥä狼ΤǡɤȻפޤꤹȡΥޥ "vers2 . h" Ÿ뤳Ȥˤʤޤ󡢤ŬڤʥޥǤϤޤ

+

Ǥ狼褦ˡspace ΤʤȤˤ줬ƤϺۤȤͣξ礬#include ԤΥޥ #, ## 黻ҤȤ줿ǤTranslation phase 4 ǽ #include ԤǤϡphase 6 ǽʸƥϢϻȤޤ󡣤#include ԤΥޥ϶ #, ## 黻ҤȤäƥѥ᡼ʤƤ⡢ñʸƥФǤळȤǤäΤ token-based ʸ§ΤϡޤˤХ󥹤򼺤Ƥޤ

+

Standard C ΥץץǤ syntax token-based ʤΤǤʤ顢# 黻Ҥ semantics ΤȤ character-based ʵ꤬ơŪʰ»ʤäƤޤ*2

+

ξ塢ʽΤϵʸɬ餫ǤϤʤͤȤƤޤŬڤǤꡢ٤Ǥ礦

+

:

+

*1 mcpp ⤷礦ʤΤǤƤ롣

+

*2 JIS C ISO C ΤΤǡƤѹϲäƤʤȤˤʤäƤ롣JIS ϥɥ֥åפ X 3010 / 6.8.3 4. ΰˤϡfputs( ..) ȤޥŸ̤ʸȤ space ̵ͭäƤȤߥ롣ΰ space ΰ̵ФǤꡢ# 黻Ҥε褯򤷤ƤͤƤ뤤ϰåȤϻפʤꤽΤΤ̵ѤѻǤ뤳ȤΤǤ롣

+ +

2.7.3. ޥ white spaces ΰ

+

# 黻Ҥ operand white spaces ΰƱͤε꤬ޥ˴ؤƤ⤢ޤݡݥޥκϸΥޥʤΤǤʤФʤʤǤ뤿ˤϡѥ᡼ο̾ƱǡִꥹȤƱ spelling ǤʤФʤʤִꥹ white spaces ˤĤƤϡ̵ͭƱǤʤФʤʤϰäƤƤɤݡݤȵꤵƤޤ

+

# 黻Ҥε꤬嵭Τ褦ǤСִꥹ white spaces ˤĤƤƱ򤷤ʤФʤʤΤǡεǤϤꡢͳ # 黻Ҥεˤޤ

+

# 黻Ҥ operand pp-token δ֤ˤϤ٤ one space ΤȤưȤȤˤСޥκ˺ݤƤ white spaces ̵ͭˤʤʤʤޤ

+

ˡץץåμǤϤ̲ơΤ٤Ƥ pp-token δ֤§Ȥ one space ֤褦ˤ뤳ȤǤޤ뤳ȤˤäơޥŸ˺ݤƤ tokenization ñΤ˹ԤȤǤޤθ§㳰ĤޤĤ preprocessing directive ԤǤβԥɤǤꡢ⤦ĤϥޥǤΥޥ̾Ȥ³ '(' δ֤ white spaces ̵ͭǤФŪˣäΥץץκƤΤǤꡢޤѤ櫓ˤϤޤ

+ +

2.7.4. ؿͥޥΥѥ᡼̾

+

ޥκ˺ݤƤϥѥ᡼̾פƤʤФʤʤȵꤵƤ뤳Ȥ 2.7.3 ǿޤϲʵȻפޤѥ᡼̾ϡޥŸ˲ΰ㤤⤿餷ޤ󡣤˺ݤƤå뤿ˤϡץץåϤ٤ƤΥޥΥѥ᡼̾򵭲ƤɬפޤȤƤ⤽λȤƻϡʤȤ⵬ϰϤǤϡΥåʳ˲⤢ޤ󡣤äΤۤȤɰ̣ΤʤåΤˡϤ˥ХˤʤʤСإåɤ򤫤Τϡޤ

+

ޥκǤϥѥ᡼̾פƤʤФʤʤȤϡۤɤȻפޤ

+ +

2.7.5. ɾΤ狼ʤ #if ʸ

+

#if ԤΰǤ #if ǤɾϥץץǹԤΤǼ¹ԻĶΩΤǤʤФʤޤ󡣤Τᡢ̤顢¹ԻĶФ䤤碌ɬפȤ륭㥹ȡsizeof 黻ҡƤޤʤ translation phase 7 ǽɾˡʸʤӥ磻ʸˤϽƤޤ

+

ʸɾϼΤ褦˲ŤˤǤꡢportability ϤۤȤɤޤ

+
    +
  1. ʸͤʸåȡASCII, EBCDIC ˤˤäưۤʤ롣
    +
    +
  2. ʸåȤƱǤäƤ⡢single-character character con-stant ΰϽǤʥѥΤǤ char ʤĤˤˡ
    +
    +
  3. Multi-character character constant ɾϽǤꡢʸåȤΰƱǤ⡢ͤƱȤϸ¤ʤCHAR_BIT char ʤȤƤ⡢'ab' 'a' * 256 + 'b' ȤʤΤȤ 'a' + 'b' * 256 ȤʤΤϡꤵƤʤ
    +
    +
  4. Multi-byte character encoding ϽǤ롣Wide char-acter encoding multi-byte character encoding ˽wchar_t Υ̵ͭǤ롣
    +
    +
  5. Multi-byte character encoding ƱǤäƤ⡢ͤɾƱȤϸ¤ʤƱ꤬롣
    +
    +
  6. ʾϤ⥳ѥΤǤʸɾˤⶦ̤Ǥ뤬˥ץץǤʸåȤϥѥΤȰäƤƤ褤ȤˤʤäƤ롣
    +Translation phase 4 ޤǤоݤȤΤϥʸåȤǤꡢphase 6 ʹߤоݤȤΤϼ¹ԻʸåȤǤ롣phase 5 ʸʸƥʸΥʸåȤ¹ԻʸåȤؤѴԤʤʸåȤ⡢multi-byte character encoding ⡢ȼ¹ԻȤǰޤäƤ뤫⤷ʤ
    +#if ʸɾΤ phase 4 Ǥ뤬ϥʸåȤͤǤ¹ԻʸåȤͤ򥷥ߥ졼ȤƤ⡢ɤǤ褤ȤˤʤäƤ롣ʸåȤȤƤʤ
    +
    +
  7. #if ɾʸåȤȼ¹ԻʸåȤƱǤäƤ⡢ɾΤϰäƤƤ褤ȤˤʤäƤ롣ʤΰ⡢multi-character character constant, multi-byte character constant ɾΥХȥ⡢phase 4 phase 7 ȤǰäƤ뤫⤷ʤ
    +
    +
  8. ⡢ʸɾηϡphase 7 Ǥ multi-byte character ޤ character constant intwide character constant wchar_t ǤΤФơphase 4 Ǥ C90 Ǥ long ޤ unsigned long Ǥ롣ʤphase 4 Ǥ int long ƱɽĤΤ褦˰졢unsigned int unsigned long ƱɽĤΤ褦˰롣äơʸåȡΰɾΥХȥ phase 4 7 ȤǤޤäƱǤäƤ⡢INT_MAX < LONG_MAX νϤǤϡphase 4 ǥСեʤʸ phase 7 ǤϥСե뤳Ȥ⤢ꤦ뤷phase 7 int ˤʤΤ phase 4 Ǥ long ˤʤ뤫⤷줺ˤʤ뤫ˤʤ뤫ޤäƤϤʤʸǤʤȡˤʤ뤳ȤϤʤʸˤĤƤϰŪˤϤۤȤͽ¬Ǥʤ
    +
    +
  9. C99 Ǥ #if ηϤνϤκȤ줿ʤɾηϤˤäưۤʤ뤫⤷ʤ
    +
    +
  10. ˥ץץǤʤѥˤⶦ̤Ǥ뤬multi-byte character ˤ encoding ꤬롣Ȥ UTF-8 ϣХȤ unicode ʸ򣱥ХȤʤХȤ encode 뤬ʸΡ͡פȤϤäǤ ͤ UTF-8 ΣХȤ sequence ɾ͡פǤȤ⸵ unicode Ρ͡פǤȤȤˤʤΤǤɤͤŪǤΤȽȤʤ
    +
    +
  11. ⥳ѥȶ̤Ǥ뤬C99, C++98 Ǥ UCN ȤΤޤƳ줿Ʊʸ UCN ɽΤ multi-byte character Ȥƽ񤤤ΤȤƱʸפǤƱʸΤϤǤ뤬Ρ͡פ multi-byte character encoding ˤäƤ줾äƤǤ
    +
+

Ȥǡ#if ʸͤϽϴ֤Ǥ portability ʤСƱϤΥѥեȤδ֤Ǥ㤦⤷ʤȤ¿ɤɾ뤫ۤȤͽ¬Ǥޤ

+

̤ˤϣøεˤϤޤʬϾʤ黻˴ؤƤΰǤΤΡ CPU ǷޤΤǤꡢϺԤǤդ˷뤳ȤΤǤʬϤޤʤΤǤʸɾ㳰Ǥ CPU λ͡ʸåȡmulti-byte character encoding Ȥƥ¦װǷޤ¦̤ΤۤˡϺԤκ̤ˤޤƤ̤¿ޤ

+

줬 #if ʸȤʤȡϤκ̤ϰϤѥեȤΰפݾڤ줺ɾƤ⤤äɾΤۤȤɤ狼ޤʸɾϼ¹ԻĶؤ䤤碌ɬפȤΤȹͤޤStandard C ΥץץǤϤ䤤碌ɬפȤϽ줿ˤ⤫餺ʤʸϽޤǤơ䤤碌򤷤ʤǤ⤹൬̵˺äˡ̣ʤΤȤʤäƤޤäȻפޤ

+

#if ʸˤɤʻȤƻΤǤ礦 ѥեǤ char ѿͤʸӤ뤳Ȥ褯ԤޤѿȤʤץץեǤϤλȤƻ⤢ޤ#if ʸλȤƻȤƤϡˤŬڤϻפդޤ󡣤̵ѤĹʪǤꡢ㥹Ȥ sizeof Ʊͤˡ#if оݤ٤Ǥ礦Ƥ⡢㥹Ȥ sizeof 줿Τ٤С륽ϤϤ뤫˾ʤϤǤ

+ +

2.7.6. ޥδؿͤǤʤ

+

ޥƤӽФϤäִꥹȤ֤줿塢줬˺ޤStandard C κεǤƱΤϡΥޥƤӽФθΥȡ󤬤ִꥹȤ³Ƥ뤫Τ褦ˡִꥹȤϢ³뤳ȤǤϴؿƤӽФǥȤؿͥޥεθ§ޤäæƤꡢޥŸ狼ˤװȤʤäƤޤϡ³ΥȡоݤȤȤεϺоݤִꥹȤ˸ꤹ٤ȹͤƤޤ

+

¤ϸ³ΥȡоݤȤΤϡ餯 K&R 1st. ΤĹǯΰۤλͤäȻפޤStandard C ǤϤλͤɬפʤʤäϤʤΤǤIJΤ褦ĤäƤޤäƤΤǤϥޥŸκˤǤΤǡʲ˾ܺ٤˸Ƥ뤳Ȥˤޤ

+

ޥ rescanʺˤˡʸϤΤ˵ҤΤϡưפʤȤǤϤޤ󡣵ʽʸϤ⡢K&R 2nd. ʸϤ狼䤹ΤǤϤޤ󡣤ȤСK&R 2nd. A.12 ˤϡִꥹȤϷ֤פȤޤʽˤϷ֤ȤϽ񤫤ƤޤRescan ϣԤ褦ˤɤޤƵŪ˹Ԥ褦ˤɤޤƤ櫓ǤϤޤ

+

ϼȤʤȡΤ뤳ȤǤʤΤǤϤʤȻפޤˡˡʤȡľŪǤ褦ˤϤʤʤǤ礦Τ餤ޥ rescanning ȤΤϥޥŸŪʼˡ̩夷ΤʤΤǤ

+

ޤΥХƤƤߤޤñˤ뤿ˡ x, y ϥޥǤϤʤȤޤΥޥƤӽФϤɤŸΤǤ礦

+
+#define FUNC1( a, b)    ((a) + (b))
+#define FUNC2( a, b)    FUNC1 OP_LPA a OP_CMA b OP_RPA
+#define OP_LPA          (
+#define OP_RPA          )
+#define OP_CMA          ,
+
+FUNC2( x, y)
+
+1:  FUNC2( x, y)
+2:  FUNC1 OP_LPA x OP_CMA y OP_RPA
+3:  FUNC1 ( x , y )
+
+

1: 2: ִ졢2: rescan ˤä 3: 뤳Ȥϡ狼ޤǤϡ3: ϥޥƤӽФǤ礦 ʤƬ⤦ rescan ٤Ǥ礦

+

Rescan Ƭ鲿٤Ǥ֤ⷫΤʤΤǤ礦ȤоϰϤƵŪˤ˶Ƥ椯ΤʤΤǤ礦 ¤ϡΤɤǤʤΤǤ

+

Rescan ȤΤμºݤŪˤ§ŪʺƵǡ뤤ϤƱ̤ˤʤ뤢η֤ǹԤƤȻפޤθŵŪ㤬 Kernighan & Plauger "Software Tools"ʡ֥եȥˡסˤ Macro Processing ξϤ˺ܤäƤΤǤϸ M4 ޥץåȯŸƤ椯Τǡ켫ΤϣåץץåǤϤޤ󤬡Ritchie äǽ񤤤ޥץåפΤȽ񤤤Ƥꡢåץץåμˡθ򤦤Τ뤳ȤǤޤ

+

ΥޥץåǤϡޥƤӽФȤִꥹȤϤ֤ɤľȤˡ rescanning ¸ƤޤִꥹˤޤޥƤӽФäϡ֤줬ϤˤäΤ褦ˡפοʥޥִꥹȤƱ褦֤ɤľޤ֤ϥޥִƥȤ륨쥬Ȥˡ󶡤סϤҹ¤ߤƵ򡢤Ϥμǽ褦ȤΤǤȤ褦ˡˡϥޥץåΥץ¤狼䤹뤿ˡ礤ΩäƤޤ

+

åץץå¿⤳Ʊ褦ˡŪϡʤΥåִꥹȤѤǡɤľȤˡǥޥ re-scan 򤷤ƤΤȻפޤ

+

嵭Ǥϡ2: rescan ˡFUNC1 λǤϥޥƤӽФǤʤȤ狼ȡƱˤΥȡ󤬳ꤷʸִϷ֤ˤƵˤ OP_LPA ʹߤоݤȤʤޤOP_LPA ( ִơ줬ޥǤʤȤ狼ȡ x ʹߤоݤȤʤ롢ȤդˤƬ缡ꤷƤ椭3: ǽ̤ȤʤޤϤϤޥƤӽФǤϤޤ

+

"Software Tools" Ρʤ뤤ϤΡˤˡϳΤ re-scan δʼˡǤ"Software Tools" ϿƤϤޤ󤬡ˤޤȤ⤢ޤϡϤ֤줿ִꥹȤϥϢ³ɤ߹ޤ뤿ˡrescan ִꥹȤۤƸΥޥƤӽФθʬޤǥ󤷤Ƥޤǽ뤳ȤǤͥȤ줿ޥǤϡrescan Ƥ뤦ˤĤδ֤ˤͥȥ٥뤬ƤƤޤȤ⤢ꤨޤĤޥ̾Ÿʤޥ䡢ִꥹȤ̤ΰĤޥθƤӽФȾʬȤ֥ޥλ֤Ҥޤ

+
+#define add( x, y)      ((x) + (y))
+#define head            add(
+
+head a, b)
+
+

줬Ǥδ̯ʥޥƤӽФ ((a) + (b)) ŸޤȤStandard C ǤϤ줬ǧΤƤޤޤĤޤꡢΥޥ undefined ɤˡŪʤΤʤΤǤ

+

衢åץץåϤޤ֥ޥŸտޤƤȤϻפޤ󡣤֤󸶽Σåץץåμ嵭Τ褦ʤΤǤäˡޥۤäƤ餷Ÿ̤ȤʤꡢηռŪѤץޤǸ졢줬¾ɸͤȤʤäƤޤĤ Standard C Ǥ⤳ǧ뤳ȤˤʤäΤǤϤʤǤ礦ʤΣåץץåμΤʷ٤̯ de facto standard ͶƳStandard C ˤޤƤΤǤ줬IJIJ椨Ǥ

+

ơrescan ϺƵ֤Ȥäȡ§ŪʺƵǤꡢ֤ȸäƤ⤢ʤְ㤤ǤϤʤΤǤ롢ȤȤˤʤ뤫ȻפޤƵϺƵǤ̤κƵΤ褦оϰϤ˶Ƥ椯Ȥϸ¤餺षоϰϤ˸˥Ƥ椯Ȥ̯äƵʤΤǤϺƵǤʤƤ֤ⷫǼ¸뤳ȤǤޤƬη֤ǤϤʤ椫η֤ǡ˸ʬǤ椯ΤǤ

+

äơեΥȤץץǥ쥯ƥ֤٤ƽ줿ΥƥȤͤȡΥ쥺 rescan ǥƥȤκǽ餫Ǹޤ̤ƽƤޤȤǽǤºݡ"Software Tools" ǤϤˡȤäƤꡢߤΣåץץåΥˤ򤷤ƤΤޤʤrescan ȤϥޥŸexpandˤƱǤꡢϤޤƥΤΥޥŸȤƱʤΤǤ

+

Rescan оݤ˸˥Ƥ椯Ȥϡ¿ޤϤɤŸ٤ΤʥޥȤ C89 Rationale 3.8.3.4. (C99 Rationale 6.10.3.4) ˺ܤäƤΤǤνꤵʤäΤϡ֥ץץΤ quirksʵޤ졢ʡˤޤǤꤷƤⲿˤΩʤפȤƤޤϼŪǤϤषꤹ뤳ȤǤʤäΤǤ

+
+#define f(a)    a*g
+#define g(a)    f(a)
+
+f(2)(9)
+
+

Ǥϡޤ f(2) 2*g ִޤָ³ȡפ rescan оݤȤʤСޥŸϤǤޤǡf(2)(9) 2*g(9) ȤȡȤʤޤȤָ³ȡפоݤȤ뤿ˡ g(9) ޥƤӽФƤޤf(9) ִޤǡ f(9) Ϥ 9*g ִ٤ȤƱ̾ޥκִػߤεŬѤִʤǤ٤ΤǤf(9) Ȥȡ f(2) κǽִ̤θ g ȡָ³ȡפǤ (9) ΤĤʤäΤ rescan ˤä줿ΤǤΤǡ줬 f(2) θƤӽФΥͥȤˤΤˤΤȽȤʤǤ

+

ˤĤƤ C90 Corrigendum 1 ԤޤAnnex G.2 Undefined behavior ˼ɲäȤΤǤ

+

-- A fully expanded macro replacement list contains a function-like macro name as its last preprocessing token (6.8.3).
+-- Ÿ줿ޥִꥹȤκǸ礬ؿޥ̾Ǥ (6.8.3)

+

Ϻؤ򤫤ΤǤޤ

+

ޤ"fully expanded macro replacement list" Ȥʸ̣ǤϡְаΥޥŸ줿ִꥹȡפȲ᤹뤷ޤ󤬡 f(2)(9) ǤϡƱ̾ޥκִ򱾡ˡf(2) 2*g ִ졢 g function-like ޥ̾ǤȤ狼äȤǤǤ undefined Ȥʤޤʤ f g ΥޥǤϡf θƤӽФɬ undefined ȤʤΤǤ

+

ΡפŬѤȡISO/IEC 9899:1990 6.8.3 Examples ˤ뼡Τ褦ʥޥ㼨⤽ undefined ȤʤäƤޤޤ

+
+#define f(a)    f(x * (a))
+#define x       2
+#define g       f
+#define w       0,1
+#define t(a)    a
+
+t(t(g)(0) + t)(1);      /* f(2 * (0)) + t(1);   */
+g(x+(3,4)-w)            /* f(2 * (2+(3,4)-0,1)) */
+
+

ʽϤΥޥƤӽФϥȤ˽񤤤褦ŸȤƤޤCorrigendum ŬѤȤϤʤޤ󡣤 f g ΥޥǤϡg Ȥ identifier ФƤɬ undefined Ȥʤޤg ִꥹȤǤ function-like ޥ̾Ǥ f ͣǺǸ pp-token Ǥ顣

+
+t(t(g)(0) + t)(1)
+
+

Ϥޤ t θƤӽФΰŸޤ

+
+    t(g)(0) + t
+
+

ˤޤ t(g) ȤޥƤӽФΤǡ줬ŸޤΤˤϤޤŸʤФʤޤ

+
+        g
+
+

Ƥ줬 f ִȡ undefined ȤʤΤǤ

+

⤷򤳤Τޤޤˤơִ³Ƥ⡢

+
+    t(f)
+    f
+
+

Ȥʤꡢt(f) Ÿ̤κǸ pp-token f ǤΤǡƤ undefined Ǥִ³ȡʤޤ

+
+    f(0) + t
+        f(x * (0))
+        f(2 * (0))
+    f(2 * (0)) + t
+t(f(2 * (0)) + t)
+f(2 * (0)) + t
+
+

ǽ t θƤӽФŸޤִꥹȤκǸ夬Ϥ t Ȥ function-like ޥ̾ǤΤǡ undefined Ȥʤޤ

+

ǤϡϤɤǤ礦

+
+g(x+(3,4)-w)
+
+

g f ִ줿ȤǤǤ undefined Ǥ

+

Examples G.2 Ȥ̷⤹Ȥ˴٤äƤޤäƤޤ +

+

⤷ Examples Τ㤬ä줿ȤƤ⡢ Corrigendum ǤϷ褷ƺϲäޤˡG.2 ϵʸǤϤʤɲäʸ˺ʤΤǤʸǤϡָ³ȡפ rescan оݤȤȤ񤤤ƤʤΤǤˡ⤷ Corrigendum ʸ˼ȤƤ⡢

+
+#define head            add(
+
+

add ִꥹȤκǸǤϤʤΤ

+
+#define head            add
+
+

undefined ȤΤǤϡޤˤ⥢Х󥹤Ǥ"fully expanded" Ȥʸ̣ǤȤ⤢ޤ*1, *2

+

줬ָ³ȡפ rescan оݤȤȤˤäƤ⤿餵줿 quirks Ǥ뤳ȤϡޤǤ⤢ޤ󡣤ĤĤޤ碌褦ȤФۤɡ𤷤ƤޤΤǤʽˤƱ̾ޥִػߤε꤬ʸϤǽ񤫤Ƥޤ򤵤ΰ⤳ˤޤ

+

¾ Standard C function-like ޥθƤӽФ˺ݤƤϡΥޥŸϤΰǹԤȵꤷƤޤΥޥŸθΥƥȤޤǿäƤޤäΤǤ纮Ǥ顢εȸǤ

+

η̡ƱޥǤˤȤǤʤȤǰä̤ˤʤȤХ󥹤ȯޤ

+
+#define add( x, y)      ((x) + (y))
+#define head            add(
+#define quirk1( w, x, y)    w x, y)
+#define quirk2( x, y)       head x, y)
+
+head a, b);
+quirk1( head, a, b);
+quirk2( a, b);
+
+

quirk1() θƤӽФǤϡ裱Ǥ head add( ִ줿塢 rescan Ǵ뤷ʤޥƤӽФȤ violation of constraintʿХ顼ȤʤϤǤquirk2() head a, b) ϥ顼ˤʤ餺

+
+((a) + (b))
+
+

Ÿ뤳Ȥˤʤޤ

+

Ĥ褦ǤХȤϤ٤ơ̤˥ޥ re- scan ǡָ³ΥȡפޤǤоݤȤʤäƤޤȤȯƤΤǤϡŸ¾ΥƥʬΩƹԤ뤿ˤϡȤִꥹȤϤ֤ˡǤäƤ⡢ɤΥͥȥ٥Ǥ뤫ȤղäɬפޤȤа̤ˤָ³Υȡפ rescan оݤ˼ޤʤ褦ˤ뤳Ȥưפ˼¸ǤϤǤषߤȾüʵǤϡȤǤʤȤǽѤɬפꡢˤ;פô򤫤̤ˤʤäƤޤ

+

äΥޥŸŪ˥ǥͤʸִκפȤɤƤޤǥͤʸִü˹ⵡǽʣΤ pre-Standard ΥޥŸȸǤ礦

+

Ф Standard C ǤϡĤޥˤ虜虜 function-like ޥȤ̾ޤդơθƤӽФιʸؿƤӽФ˶դ褦ȤȹͤޤΥޥϴŸƤѥ᡼֤Ȥ⡢ŸϰǹԤȤ⡢θ§˹äΤǤȤ̤˥ޥ rescan ϸ³ΥȡȤ꤬θ§֥亮Ƥޤƥִη֤ȤĤΰʪǤ

+

³Υȡ rescan оݤƤޤСޥŸϴ˺ƵŪˡʤоϰϤˤˤƵΤӤ˶Ƥ椯褦ˡʾʤȤ⹭뤳ȤϤʤ褦ˡ˵ꤹ뤳ȤǤΤǤơfunction-like ޥϤ̾ˤդ路ޥȤơʤΤˤʤäȤǤ礦ƤϺȤϤäˤȤϻפʤΤǡʤʤäΤñ ANSI C Ѱ񤬡ĤѤIJڤȤǤĤʤäȤͤޤ*3

+

C99 ǤϤ򥹥åѥڤȤƤ餤äΤǤޤ䤳IJĤäƤޤޤ

+

:

+

*1 ԤΤ褦 function-like ޥ̾Ÿ object-like ޥȤΤϡºݤΥץǤܤˤΤǤ롣Τ褦ʤΤǤ롣

+
+#define add( x, y)      ((x) + (y))
+#define sub( x, y)      ((x) - (y))
+#define OP  add
+    OP( x, y);
+
+

ԤΤ褦 function-like ޥθƤӽФȾʬŸΤۤŪʤΤǤϤʤʤФʤʤͳϲʤFunction-like ޥΥͥȤϼΤ褦 function-like ޥǤΤɤ

+
+#define OP( x, y)       add( x, y)
+
+

*2 Corrigendum ˤФƤͳϡC90 ISO C ѰSC 22 / WG 14ˤ "Record of Responses to Defect Reports" ȤʸǤ狼#017 / Question 19ˡANSI C Rationale 3.8.3.4 f(2)(9) ΥޥŸ˴ؤǾ֤줿ΤǤ롣ľܤϡƱ̾ޥִػߡפεŬϰϤäϤǤ뤬ѰƱ̾ޥ˸¤ʤŪȤƲƤޤäΤǤ롣β᤬ Examples Ȥδ̷֤ȯ뤳Ȥˤϵդʤä褦Ǥ롣

+

ˡ "fully expanded" Ȥʸ̯Ǥ롣f(2) 2*g ִ졢g ޤǺ줿 fully expanded ʤΤǤ

+

⤷ʤ顢ʾִϵʤ顢undefined ˤʤʤϤǤ롣⤷ޤ fully expanded Ǥʤʤ顢g ³ (9) ȤȤ˺졢f(9) ִ롣⤷줬 fully expanded Ǥʤ顢2*f(9) κǸ pp-token function-like ޥ̾ǤϤʤ顢βϤƤϤޤʤ

+

ʤޥŸϤĽΤȤʤäƤȤǡ֥ޥŸäפȸäƤΤǤ롣Ͻ۴ˡǤ롣ơޥŸϤĽΤޤޤ狼ʤʤäƤޤäΤǤ롣

+

C99 1997/11 draft Ǥ Corrigendum Τιܤ Annex K.2 Undefined behavior ˼ޤƤ1998/08 draft ǤϺơؤä Annex J.1 Unspecified behavior ˼Τ褦ʰ᤬ɲä줿ơɤ줬 C99 ˺Ѥ줿

+
+

When a fully expanded macro replacement list contains a function-like macro name as its last preprocessing token and the next preprocessing token from the source file is a (, and the fully expanded replacement of that macro ends with the name of the first macro and the next preprocessing token from the source file is again a (, whether that is considered a nested replacement.

+
+

ѰϤ褦䤯 Corrigendum ̷˵Ť褦Ǥ롣ʸκŪϤΤޤޤǤ롣ޤޥŸĽΤ⡢ɤ unspecified Ǥ롣⡢'(' ˤ뤫ɤǶ̤ȤΤǤϡƱޥˤ¾ΥޥִꥹˤȤǷ̤äƤȤȤǤꡢӤʤͤǤ롣

+

ˤĤƤϡ3.4.26 ⻲ȤΤȡ +

+

ʤC++ Standard ǤϥޥŸ˴ؤ뵬 C90 ƱǤꡢC90 Corrigendum 1 Τ C99 Annex J.1 ɲä줿ʤ

+

*3 Ƥ⡢ FUNC2( x, y) Ϥ⤷줬¾ΥޥƤӽФΰˤäϡŸ FUNC1 ( x, y) Ȥʤꡢ˸Υޥ rescan ((x) + (y)) Ÿ뤳Ȥˤʤ롣ʤˤȤǤʤȤǺǽŪŸ̤ۤʤ롣Ϥޤ̤μǤꡢԹǤϤʤǤ

+ +

2.7.7. C90 Corrigendum 1, 2, Amendment 1 Ǥɲ

+

ISO/IEC 9899:1990 ˤĤƤϡ1994 Corrigendum 1ˤ1995 Amendment 1ˤФ졢 1996 Corrigendum 2 Фޤ

+

Corrigendum 1 ΤۤϤʸۤȤɤǤĤץץ˱ƶͿΤޤޤƤޤΣĤ 2.7.6 Υޥκ˴ؤΤǤ

+

⤦ĤϥޥΥޥ̾ $ ޤޤƤˤĤƤΡüʵǤ

+

Standard C Ǥ identifier ʸȤ $ ǧƤޤ󤬡ǧϤŪ¸ߤƤޤtest-t/e_18_4.t ˤ 18.9 ϡStandard C Ǥ $ ʸǣĤ pp-token ȲᤵΤǡޥ̾ THIS $ ʹߤ object-like ޥִꥹȤȤʤꡢTHIS$AND$THAT Ȥ̾ function-like ޥȤץΰտޤȤϤޤää̤ˤʤޤ

+

Corrigendum 1 Ǥϡ˴ؤ㳰Ū꤬ɲäޤʤobject-like ޥִꥹȤ non-basic character ǻϤޤϡޥִ̾ꥹȤȤ white-space ʬΥƤʤФʤʤפȤΤǤ 18.9 ФƤ Standard C ϿǥåФʤФʤʤΤǤˤäơ$ @ ޥ̾˻ȤƤ륽ۤäưտޤʤ̤˥ץץ֤ɤȤ櫓Ǥ쿴εǤ㳰ΤϺäΤǤ$ @ identifier ǧʤϤǤϡޥϤȤץץǥ顼ȤʤʤƤ⡢ѥեɬ顼ˤʤϤʤΤǡ㳰ɬפϤʤȻפޤ*1

+

ΤۤISO 9899:1990 Ǥ header-name Ȥ pp-token #include directive ˤƤϤʤʤȤ̣ constraint ޤCorrigendum 1 ǡheader-name #include directive Ǥǧʤޤ

+

Amendment 1 multi-byte character, wide character Ӥʸ饤֥ؿɲä濴ǡȼä <wchar.h>, <wctype.h> ȤɸإåɲäޤޤISO 646 ʸåȤ˴ޤޤʤʸ䤽Ȥä token, pp-token ɽˡȤơtrigraph ¤֤⤦ĤȤ <iso646.h> Ȥɸإå digraph ε꤬ɲäޤ<iso646.h> ϤĤ operator ޥ뤴ñʥإåǡäϤޤ*2

+

digraph Ǥ trigraph Ȥ褯ƤơӤϤۤȤƱʤΤǤץץǤΰ֤ŤϤޤääƤޤTrigraph character Ǥꡢtranslation phase 1 ̾ character ѴΤФơdigraph token, pp-token ʤΤǤDigraph sequence # 黻Ҥˤäʸ󲽤ϡѴˤΤޤʸ󲽤ʤФʤޤʤ # ΤΤ digraph Ǥ %: Ƚ񤯤ΤǤ뤬ˡΤᡢƤΤˡϤϾʤȤ phase 4 ޤǤϤ pp-token ȤݤäƤɬפޤѴȤСθǤʸƥ digraph ǤϤʤtoken ȤƻĤä digraph sequence Ѵˡ

+

ϽϤ̵Ѥô򤫤ΤǤTrigraph Ʊͤ character Ȥǧphase 1 ѴƤޤۤˤʤޤ pp-token Ȥݤϲ⤢ޤAmendment ⡢digraph ̾ token Ȥΰ㤤ʸ󲽤ˤȯʤƤޤPhase 1 Ѵ褦ˤ "%:" Ȥäʸƥ񤯤Τ˺Ȥ뤫⤷ޤ󤬡 trigraph ǤƱͤǤꡢ夲ˤϤޤˤüǤɤƤ񤭤 "%" ":" ȤФߤޤDigraph trigraph alternative Ȥ phase 1 Ѵ褦˰֤Ťʤ٤Ǥ礦

+

:

+

*1 C99, C++ Standard ǤϤεϾäƤ롣

+

C99 ǤϤΤˡ6.10.3 Macro replacement / Constraints ˼ΰ̲꤬դä줿

+
+

There shall be white-space between the identifier and the replacement list in the definition of an object-like macro.

+
+

tokenization 㳰ǤΤǡʤ

+

*2 C++ Standard Ǥϡ identifier operator ϥޥǤϤʤ token Ǥ롣ʤΤ򤷤ʥץץ٤Ȥϸ餹ȤȯۤˡȤˤϤˤȤäƤϤäʤȤǤ롣

+ +

2.7.8. Ĺʵ

+

C90 5.1.1.2, C99 5.1.1.2 Translation phasesեˤ 3 ˤϡ³ϤʤΤξĹʵ꤬ޤ

+
A source file shall not end in a partial preprocessing token or comment.
+

Translation phase 2 ǡե <newline> ̵Ǥޤ <backslash> <newline> ǽäƤϤʤʤȤΤǡphase 2 ̤äեɬ <backslash> Τʤ <newline> ǽޤPartial preprocessing token ǽ뤳ȤϷ褷ƤޤPartial preprocessing token षΤȤƤϡ " ' <, > бΤȤƤʤΤޤ C90 6.1 Lexical Elementsʻǡ/ Semanticsʰ̣§ˤ undefined ȤƤΤǤꡢޤ˸¤äǤϤޤ"partial preprocessing token or" פʸǤ

+

C90 6.8.1, C99 6.10.1 Conditional inclusionʾդߡ/ Constraintsˤˤϸ򾷤ɽޤ

+
it shall not contain a cast; identifiers (including those lexically identical to keywords) are interpreted as described below;
+

"it shall not contain a cast; " ϼ­Ǥ³ʬ Semanticsʰ̣§ˤǡkeyword Ʊ identifier ޤह٤Ƥ identifier ϥޥǤŸ졢Ĥä identifier 0 ɾ뤳Ȥ餫ˤƤޤCast 򤽤󤷤̤˼夲ɬפϤޤ(type) ȤʸǤ type ñʤ identifier Ȥư뤳Ȥ餫Ǥ

+

դˡ줬 constraint ˤȡϤ cast ιʸǧơФǥåФʤФʤʤȤ⡢ᤵޤϵʽΰտޤǤϤʤǤ礦Translation phase 4 Ǥ keyword ¸ߤʤΤǡcast ǧΤ褦ʤΤǤsizeof ⤳ǤƱǤ sizeof ˸ڤcast 夲ƤΤ̯ʤȤǤʸּ­פȸޤ

+
+ +

2.8. C99 Υץץ

+

C99 Ǥϡץץ˴ؤƤϼλͤɲäƤޤ

+
    +
  1. ̻ҡʸƥ롢ʸpp-number \uxxxx, \Uxxxxxxxx η 16 sequence UCN (universal-character-name) ȸUnicode ʸ̣ͤ롣 basic source character set ˴ޤޤʤ extended character ꤹΤǤʤФʤʤ# 黻Ҥˤä UCN ʸ󲽤줿 \ Ťͤ뤫ɤ implementation-defined Ȥ롣
    +
    +
  2. ̻ implementation-defined ʸȤȤǤ롣äơΤ褦 multi-byte-characters ̻˻Ȥ imple-mentation ǽȤʤä
    +
    +
  3. // ޤǤ򥳥ȤȤư
    +
    +
  4. Pp-number e+, E+, e-, E- Ʊͤ p+, P+, p-, P- Ȥ sequence ǧ롣 0x1.FFFFFEp+128 ȤդˡưΥӥåȥѥ򣱣ʤɽ뤿ΤΤǤ롣
    +
    +
  5. #if ηϤνϤκȤ롣long long / unsigned long long ɬܤǤΤǡ#if η long long ޤϤʾΥȤʤ롣
    +
    +
  6. ѸĤΥޥȤ롣
    +
    +
  7. ޥƤӽФΥͭʰȤ롣
    +
    +
  8. ޥ __STDC_HOSTED__ ɲä롣 hosted implementation Ǥ 1 ˡǤʤ 0 롣ޥ __STDC_VERSION__ 199901L 롣
    +
    +
  9. ޥ __STDC_ISO_10646__, __STDC_IEC_559__, __STDC_IEC_559_COMPLEX__ 򥪥ץȤɲä롣
    +
    +
  10. _Pragma operator ߤ롣
    +
    +
  11. #pragma STDC ǻϤޤǥ쥯ƥ̾򵬳ʤȽѤͽ󤷡ư黻ɽĤ #pragma STDC ǥ쥯ƥ֤ɲä롣#pragma STDC ǻϤޤǥ쥯ƥ֤ϥޥŸоݤȤʤǤʤ #pragma ԤϥޥŸоݤȤ뤫ɤ implementation-defined Ǥ롣
    +
    +
  12. Wide-character-string-literal character-string-literal ȤܤƤΤ C90 Ǥ undefined Ǥä Wide-character-string-literal ȤϢ뤹롣
    +
    +
  13. #line ΰȤƻȤֹϰϤ [1,2147483647] ˳礹롣
    +
    +
  14. Translation limits 򼡤Τ褦˰夲롣
    +
    + + + + + + + + + +
    ԤĹ 4095 Х
    ʸƥ롢ʸheader name Ĺ4095 Х
    identifier Ĺ 63 ʸ
    #include Υͥ 15 ٥
    #if, #ifdef, #ifndef Υͥ 63 ٥
    ΥåΥͥ 63 ٥
    ޥΥѥ᡼ο 127
    Ǥޥο 4095
    +
    +
  15. Header name ϣʸ + . + ʸޤǤݾڤƤʸ + . + ʸޤǤѹ롣
    +
+

ѰޥȤΤϡΤ褦ʤΤǤ

+
+#define debug(...)  fprintf(stderr, __VA_ARGS__)
+
+

Ȥޥȡ +

+
+debug( "X = %d\n", x);
+
+

ȤޥƤӽФϼΤ褦Ÿޤ +

+
+fprintf(stderr, "X = %d\n", x);
+
+

ʤѥ᡼ꥹ ... İʾΥѥ᡼ִ̣ꥹ __VA_ARGS__ бޤơޥƤӽФˤ ... бʣäƤ⡢ , ޤϢ뤷ΤĤΰΤ褦˰ޤ

+

C90 undefined behavior ȤƤΤˤϡʬ̣ΤβǽʤΤޤޥƤӽФΥʤɤǡ 0 Ĥ pp-token Ȳ᤹뤳ȤͭѤʾ礬ޤC99 Ǥϡ줬ͭʰȤޤ

+

_Pragma( "foo bar") Ƚ񤯤 #pragma foo bar Ѵ _Pragma Ȥĥ黻Ҥ C99 Ǽ夲Ƥޤ#pragma Ԥΰ C90 ǤϥޥŸ줺ޥŸη̤Ȥ #pragma ǥ쥯ƥιԤϥǥ쥯ƥ֤Ȥư줺ޥִꥹ #pragma 񤯤ȤǤʤΤФơ_Pragma ϥޥִꥹ˽񤯤ȤǤη̤Ȥ #pragma ϥǥ쥯ƥ֤ȤưȤĥܤȤǡˤ #pragma portability 夵褦ȤΤǤ

+

§Ūʳĥ򤷤ʤƤ⡢#pragma ԤΰϥޥŸоݤȤȤѹäۤǤꡢ portability ΰտޤϤʤãǤϤǤξϥޥ #pragma 񤯤ȤǤʤȤ󤬻ĤꡢޥŸƤϤʤ #pragma ΰϥ桼֤̾ڤΥ __ ǻϤޤ̾ѹʤФʤʤȤ꤬ФƤޤ_Pragma() operator §ŪǤϤΤΡݤȤۤɤǤʤʻͤȻפޤ

+

Unicode Ƴˤ꤬ꤹޤޤϤ multi-byte character Unicode ȤѴΤ˵ɽѰդʤФʤ餺礭 overhead ޤ16 ӥåȰʲΥƥǤϻ¾塢ԲǽǤUnicode 򰷤äƤʤƥ¸ߤޤޤUnicode multi-byte character ȤǤϰа mapping Ǥʤ礬¿ޤץιݲȤ̾ܤ Unicode øɸϰ̤֤ΤϡȻפޤ

+

C99 Ǥ 1997/11 draft C++ Standard ٤ UCN ΰ˸षץץåôŪʤޤΤᡢmcpp Ǥμǽˤʤޤ*1

+

ѥΤôϰ礭ΤޤޤΤʤɽǤΤǡtrigraph ƱͤˡޤȤʤǽ뤳Ȥͽۤޤ*2

+

:

+

*1 1997/11 draft Ǥ C++ Standard ȤۤƱͤˡtranslation phase 1 basic source character set ˴ޤޤʤ extended character Ϥ٤ UCN Ѵphase 5 execution character set ʸ˺Ѵ뤳ȤˤʤäƤ

+

⤷ϡץץȸˤѴ򤹤ġƤӽФȤȤˤʤȻפ롣Ѵ OS ˰¸ΤʤΤǡ̤ΥġˤۤŪǤ롣

+

*2 C99 Rationale 5.2.1 Character sets ˤȡλͤϽ°Υġ multi-byte character ΥȤδ֤ߤѴƻȤȤꤷΤȤƤ롣Multi-byte character ʸƥʬڤΥ̥եˤޤȤƤƽȤȤǤɤޤǼѤˤʤΤǤ

+
+ +

2.9. ʥץץ

+

ʾ˽Ҥ٤Ƥ Standard C ץץȻ䤬ͤΤϡΤޤ޾ Standard C ؤ˾Ǥ⤢ޤޤȤȡΤ褦ʤȤˤʤޤ

+
    +
  1. <stdio.h> η header-name obsolescent featureѻͽ굡ǽˤȤ롣Ǥ header-name ʸƥΤΤˤ롣
    +
  2. Token-based ʥץץθ§Ӥ# 黻Ҥϰ token separator ̵ͭ˺ʤ褦ˡtoken separator ʤƤ pp-token ֤ˤϤ٤ single space ʸ󲽤뤳Ȥˤ롣
    +
  3. Ʊͤˡޥκ˺ݤƤϡִꥹ token separator ̵ͭΰ㤤ˤʤȤˤ롣
    +
  4. ޥκ˺ݤƥѥ᡼̾ΰ㤤å뤳ȤϡϤΥСإåɤ䤹ǤۤȤͭʤΤǡΰ㤤ˤʤȤˤ롣
    +
  5. ʸɾϼ¹ԻĶؤ䤤碌ɬפȤΤǤꡢ#if ǤͭۤȤɤʤΤǡ #if оݤ롣
    +
  6. ؿͥޥδؿͤΰŰ줷ޥƤӽФˤäƤִꥹˤäƤ⸶§ȤƱ pp-token sequence 褦ˡޥ rescanning ִꥹȤоݤȤޥƤӽФ³ pp-token sequence оݤȤʤȤˤ롣
    +
  7. Digraph token ǤϤʤtrigraph Ʊͤ character spelling Ȥtranslation phase 1 Ѵ뤳Ȥˤ롣
    +
  8. Translation phase 3 εΤ"partial preprocessing token or" Ϻ롣
    +
  9. #if ˴ؤ "it shall not contain a cast; " Ȥܤ con-straint C99 footnote 140 ˵ۼ롣
    +
  10. Trigraphs ϥ衼åΦǤϼºݤ˻ȤƤΤǤ ⤷ʤȤƤΤǤлĤʤǤʤѻߤ
    +
+

Ϥ⡢Ե§ʵ§ץץñˤ褦ȤΤǤˤäƥץץ狼䤹ʤ뤳Ȥϴְ㤤ʤǤ礦դ˺뤳ȤϤۤȤɤʤϤǤ

+

mcpp ǤϡStandard ⡼ɤǤ Standard C εʤȤޤ Standard C Υץץ˼ƤĤǤpost-Standard Ȥ⡼ɤǤϰʾѹäץץ¸ƤޤʤΤۤUCN, identifier multi-byte characters λѤƤˡ

+

C90 Amendment 1, Corrigendum 1 ǤϡץץˤĤƤԵ§ʵ§Ե§䤹ưƤޤޤ

+

C99 Ǥ⡢ǽɲä줿Фǡ嵭Τ褦κ𤬤ɤʤäΤϻǰǤ*1

+

C99 ɲä줿ͤˤĤƤϡ׵ᤷȻפޤ

+
    +
  1. Unicode (UCN) ƳϥץˤȤɤ롣 +
+

ʤ嵭Τۤˡ#if ŬѤα黻§ˤĤƤ⤦꤬ޤ

+
    +
  1. α黻̤ϤηɽǤϰϤˤʤФʤʤȤ constraint 뤬Ϥ٤ƤŬѤΤʤΤɤǤ롣㳰ϵܤƤʤȤߤȡʸξǤϤ٤ƤŬѤȲ᤹뤷ʤStandard C ΰտޤϡɬפʤȤǤϡפȤȤǤΤˤ٤Ǥ롣ޤ¾ǡʤϷ褷 overflow ʤפȤ⤢ꡢʤ黻ϰϤĶ˿ǥåФ٤ɤϡȤˤޤǤϥѥɾǤΤǤΤǡǥåФΤŬȻפˡ +
+

ϥץץͭǤϤʤΤǡʾޤ

+

ޤC90 Ǥ /, % 黻Ҥˤγ껻ˤĤơʬ졦ʬҤޤξη̤ implementation-defined ȤҤɤ꤬ޤC99 Ǥ div(), ldiv() ƱͤεȤʤޤ

+

:

+

*1 C99 ؤγƼ defect report 䤽Ф response corrigendum draft ϼ ftp site ˤ롣 ISO/SC22/WG14 official ftp server ȤʤäƤꡢʤȤ⺣ΤȤ anonymous ftp ǤSC ȤΤ steering committee άǡWG working group Ǥ롣SC22 ȤΤϥץεʤ򿳵ĤȤǡWG14 C εʤôƤˡ

+
+

http://www.open-std.org/jtc1/sc22/wg14/

+
+
+ +

3. Validation Suite

+ +

3.1. Validation Suite for Conformance of Preprocessing

+

test-t, test-c, test-l, tool, cpp-test Ȥǥ쥯ȥäƤΡӤ cpp-test.html ΤΤκä "Validation Suite for Standard C Conformance of Preprocessing" ʡ֥ץץɸŬѥȥ켰סˤǤǤդνϤΥץץ Standard C (ISO C) ٤ܺ٤˥ƥȤΤǤStandard C/C++ ǵꤵƤ뤹٤ƤΥץץͤ夷ƤĤǤˡ곰λ˴ؤ뤪ޤ⤿󤢤ޤ

+

Standard C ׷ȤƤϡϤư뤳ȤϤǤǤʤɥȤɬפʻबΤ˵ܤƤ뤳ȤɬפǤˤĤƤ 3.5 ޤ

+ +

3.1.1. test-t ǥ쥯ȥΥƥѥץ

+

test-t Ȥǥ쥯ȥˤ 183 ܤΥץƥȤäƤޤΤ 30 ܤϥإåե롢145 ܤϺڤΥץƥȤǡ8 ܤϺڤΥץƥȤޤȤ᤿եǤإåեʳϰ *.cc Ȥ̾ǤȤϤ٤ *.t Ȥ̾ĤƤޤϥѥեȤϴطʤץץեƥȤΤǤäơɬäץηˤϤʤäƤޤ󡣥ץץƥѤΥץƥȤȸ٤ΤǤ

+

Standard C νϤϥץץȥѥȤ򰵽̤ƽ뤳ȤǤΤǡϤˤäƤϥץץڤΥƥƥȤ뤳ȤǤޤ󡣤 *.t Υץ뤽ΤΤ Standard C ˽äƤʤȤޤץץڤΥƥƥȤǤϤ¿ꡢǤʤڤΥƥƥȤۤͤΤˤʤޤ *.t ΥץϤΤΤΤǤ

+

C++ ΥץϡϤˤäƤ *.c, *.t Ȥ̾Ǥ C++ ΥȤưʤΤ⤢Τǡ*.cc Ȥ̾ΤΤѰդƤޤƤб *.t ƱǤ

+

ץƥȤΥեˤ̾ n_ ǻϤޤΡnormal ΰաˡi_ ǻϤޤΡimplementation-dependent ΰաˡm_ ǻϤޤΡmultibyte character ΰաˡe_ ǻϤޤΡerroneous ΰաˤޤ

+

n_ ǻϤޤΤϡץץ˴ؤƤϴְ㤤 undefined ưΤ implementation-defined ʬޤޤʤץǤStandard C Υץץåϡ򥨥顼ˤǤʤФʤޤ

+

i_ ǻϤޤΤϡʸåȤ˴ؤ implementation-defined ʻͤ˰¸륵ץǡASCII ʸåȤȤƤޤASCII ʸåȤ Standard C νϤΥץץåϡ򥨥顼ˤǤʤФʤޤ

+

e_ ǻϤޤΤϡ餫 violation of syntax rule or constraintʤ顼ޤॵץǤStandard C ΥץץåϡƨȤʤǤǤʤФʤޤ

+

n_, i_, m_, e_ θ˿³Τ C90 Υץץ, C90 C99 ζ̤ΥץץͤƥȤ륵ץǤإåեΤpragmas.h, ifdef15.h, ifdef31.h, ifdef63.h, long4095.h nest9.h nest15.h ޤǤ C99 ΥץץͤƥȤ륵ץǡ¾Υإåե C90 C99 ζ̤ΤΤǤ

+

n_, i_, e_, u_ std, post ʳΥե٥åȤ³Τ C99 C++ ΥץǤn_dslcom.t, n_ucn1.t, e_ucn.t, u_concat.t C99 C++98 ζ̤Ρn_bool.t, n_cnvucn.t, n_cplus.t, e_operat.t, u_cplus.t C++ Ρ¾ C99 ΥץץͤƥȤ륵ץǤ

+

?_std.t Ȥ̾Υե C90 κڤեޤȤ᤿ΤǤ?_std99.t Ϥ C99 ǤǤ?_post.t, ?_post99.t Ȥ̾Υեϥޥǡmcpp post-Standard ⡼ɤΥƥȤΤΤΤǤ

+

u_*.t Ȥ̾Υեϥޥǡundefined behavior ΥƥȤ򤹤ڤΥեǤundefs.t ϤܤˤޤȤ᤿ΤǤunbal?.h ϤǻȤإåեǤunspcs.t unspecified behavior ΥƥȤ򤹤Τǡwarns.t ϰʾΤɤˤƤϤޤʤϤ˥󥰤ФΤ˾ޤƥȤ򵭺ܤեǤunspcs.t, warns.t ⥪ޥǤm_ ǻϤޤΤϡmulti-byte character, wide character Ȥƿ encoding ĤΤѰդƤޤǤС¿ encoding 뤳Ȥ˾ޤޤm_* ϵʽΥƥȤǤϤʤu_* Ʊͤʼɾܤ°Ƥޤ

+

misc.t, recurs.t, trad.t ϥޥΥޥǤΣĤϥץץåɾоݤȤϤޤmisc.t ϵʽ䤽¾νҤ˺ܤäƤΡɽˤäƷ̤ۤʤƥȡtranslation phase 5, 6 ˴ؤƥȡĥǽΥƥȡ򽸤᤿ΤǤrecurs.t üʺƵŪޥΥץǡtrad.t ϸŤ "Reiser model cpp" ΤΥץǤ

+ +

3.1.2. test-c ǥ쥯ȥΥƥѥץ

+

test-c Ȥǥ쥯ȥˤ 133 ܤΥե뤬äƤꡢΤ 26 ܤϥإåե24 ܤ test-t ΤΤƱˡ102 ܤϺڤΥץ륽ǡ3 ܤϺڤΥץ륽ޤȤ᤿ե롢¾ 2 ܤϼưƥȤ˻ȤեǤΤ 32 ܤϥޥΥץ륽ǤإåեʳΥϤ٤ *.c Ȥ̾ĤƤޤϣäΥץηˤʤäƤޤ

+

Ϥꡢn_, i_, m_, e_ ǻϤޤ̾ĤƤޤn_ ǻϤޤΤϡStandard C Ǹ strictly conforming program ʴְ㤤ϰ¸ʬʤץˤǤϤϤ򥨥顼ˤѥ뤷¹ԤǤʤФʤޤ¹ԤǤϤ줾

+
+started
+success
+
+

ȤåФޤn_std.c ˸¤äƤϡΥåϽФ

+
+<End of "n_std.c">
+
+

ȤäλΥåФޤǤʤϲ餫μԤΥåФޤi_ ǻϤޤΤ ASCII ȤʸΥץǡASCII ʸåȤĽϤϡ n_ ǻϤޤΤƱͤѥ뤷¹ԤǤʤФʤޤe_ ǻϤޤΤˤĤƤϡϤϥѥʥץץ˻ǤǤʤФʤޤ

+

ѥ뤢뤤ϼ¹ԤˤƥȤϺǤΥƥˡǤˡǤϽϤ˴ְ㤤뤳ȤϤ狼äƤ⡢ɤ˴ְ㤤ΤΤˤʤʤ礬ޤ *.c եץץåˤ̤ơη̤ܤǸƥƥȤ뤳ȤǤΤǡϤ¤ꤽۤΤɾǤޤ*.t եΤۤüŪǤˡ
+?_std.c Ȥ̾ΥեϺڤեޤȤ᤿ΤǤ
+u_*.c Ȥ̾Υեϥޥǡundefined behavior ΥƥȤ򤹤ڤΥեǤundefs.c ϤܤˤޤȤ᤿ΤǤunspcs.c unspecified behavior ΥƥȤ򤹤Τǡwarns.c ϰʾΤɤˤƤϤޤʤϤ˥󥰤ФΤ˾ޤƥȤ򵭺ܤեǤunspcs.c, warns.c ⥪ޥǤm_ ǻϤޤ륵ץˤϿ multi-byte character encoding бΤޤ
+test-c ǥ쥯ȥˤ C99 ΥƥȤϴޤޤƤޤ󡣤ޤC99 ˽ʬбƤ륳ѥΤʤǤC++ ΥƥȤ test-t ǥ쥯ȥˤޤ

+ +

3.1.3. test-l ǥ쥯ȥΥƥѥץ

+

test-l ǥ쥯ȥäƤΤϡ translation limits ΥƥȤ򤹤뤿ΥץǤ144 ܤΤ٤ƤޥǤ*.c, *.t, *.h ե뤬äƤޤ

+

*.h ե test-t, test-c, test-l γƥǥ쥯ȥ˽ʣƴޤޤƤΤʤꤢޤʣإåեĤΥǥ쥯ȥˤޤȤȡ㤨

+
+#include "../test-t/nest1.h"
+
+

Ȥä󥯥롼ɤΤɬפˤʤޤѥꥹȤηեõˡʴǥ쥯ȥɤ֤ˤ٤ implementation-defined ǤꡢߴݾڤƤʤΤǡ򤱤뤿˽ʣ򤤤Ȥ鷺ƥǥ쥯ȥ˥إåե֤Ƥޤʤ⤽֥ǥ쥯ȥפȤǰ C Standard ϽƤˡ

+ +

3.1.4. tool ǥ쥯ȥΥġ

+

tool Ȥǥ쥯ȥˤϡưƥԤΤɬפʥġ뤬äƤޤ

+ +

3.1.5. cpp-test ǥ쥯ȥ GCC/testsuite ѥץ

+

cpp-test Ȥǥ쥯ȥˤΤϡGCC / testsuite ǻȤΥץǤtest-t, test-l ǥ쥯ȥΤΤ testsuite Ѥ˽ľǤ֤Ƥޤ

+
+ +

3.2. ƥˡ

+

Validation Suite ǥƥȤˤϡϤ Standard C ˶դ뤿Υץ󤬤ϡ򤹤٤ƻꤷޤʶ 6.1 ȡˡ

+ +

3.2.1. ưƥ

+

test-t, test-c γƥǥ쥯ȥȤ⡢礭ޤȤ᤿եȤʤڤΥեȡΥץ뤬ޤץץå Standard C ٤⤱СʤȤ n_* ˤĤƤϤޤȤ᤿եǥƥȤǤޤۤɹ⤯ʤϤΥեǤ椫ץץå˴٤äơʹߤιܤΥƥȤǤʤʤäƤޤȤΤǡڤΥեѰդƤޤޤڤˤȥեο䤿ƥƥȤμ֤ΤǡøʤȤŶƤޤϤˤäƤϡκڤΥץǤǸޤǽǤʤȤޤξϤΥץ򤵤ʬ䤷ƥƥȤƤ

+

ޤ#error directive ϽϤˤäƤϽλΤǡ#error ΥƥȤ򤹤륵ץϤޤȤ᤿եƤޤ#include Υ顼򤽤ǽλ뤳Ȥ¿ΤǡޤȤ᤿եˤƤޤ

+ +

3.2.1.1. ܻƥ

+

*.t ΥץϡץץåΩץˤʤäƤ硢ޤϥѥ˥ץץΥƥȤϤ륪ץ󤬤˻ȤޤΥեץץ̤ľܡܤǸơ˽񤫤Ƥ̤Ȱפ뤫ɤΤޤץץη̤ľܸ뤳ȤǤΤǡϤ¤ꤳǥƥȤۤΤȽǤǤޤ

+

*.c Υץ¿ "defs.h" Ȥإåե include Ƥޤ "defs.h" ˤϣ assert ޥ񤤤ƤΤǡΤΤɤ줫ĤϤǤ #if 0 0 1 ˤޤܤΤΤ <assert.h> include ǤܤΤΤ assertion ԤƤ abort ʤ assert ޥǤϤ assert ޥǤϤޤ󤬡ΥƥȤǤϤषΤۤǤ礦

+

Multi-byte character νϼ¹ԻĶˤäƽϤưͤѤ礬Τǡm_* ΥƥȤˤդɬפǤ4.1 ȡˡ

+ +

3.2.1.2. ƥȤ륿å

+

ƥȤˤ񤷤꤬ޤ +ƥȤ褦ȤȡϤ¾η٤ˤҤääƤޤȤ뤫Ǥ㤨 <limits.h> ְäƤ硢 include #if ΥƥȤ򤷤褦Ȥȡ<limits.h> ΥƥȤ򤷤ƤΤ #if ΥƥȤ򤷤ƤΤ狼ʤʤäƤޤޤ*.c ե򥳥ѥ뤷¹ԤƥȤǤϡ*.t եץץƥȤäȤäˤʤޤǽŪʷְ̤äƤСϤ˲餫η٤뤳ȤϤϤäꤷޤƥȤ褦Ȥ˷٤Τɤϡɬ餫ǤϤޤ

+

Validation Suite ǤϥåȤȤŪʤ褦ˤפĤǤValidation Suite Τ portable ǤʤФʤʤȤ󤬤ꡢޤƥȤ뤿ˤ¾θͤƤ뤳ȤȤ򤨤ޤ󡣤äơΡפȤƻȤץץλϡλ򥿡åȤȤƥȹܰʳΤȤǤۤΤ˥ƥȤ뤳Ȥˤʤޤ˽Ҥ٤פˤĤƤ⡢ۤ뤳ȤαդƤޤϤ륵ץν˼Ԥ硢ˤΥץ뤬åȤȤƥȹܤǼԤΤȤ¾װǼԤΤϡ¾ΥƥȤȤʻƸʤȽǤǤʤȤޤ

+ +

3.2.1.3.

+

ƥƥȹܤˤĤƤϡ줾Ƥޤδ񤤤ƤޤStandard C ˤϥ֥åȤȤΤϤʤΤǡܤ˹פƤʤи̩ˤ Standard C Ȥϸޤ󤬡¤ˤϤϤϤʤʤʤΤǡϤɾˤ Standard C ٤ȤʪȤ虜򤨤ޤ󡣤ơܤν٤ˤ礭ʺΤǡʹܤο櫓ˤϤ椫٤˱򤻤򤨤ޤ

+

󤳤ˤϵҴŪʴϤޤ󡣤 Validation Suite ϻ䤬˷᤿Τǡ礷Ϥޤ󡣤Ǥ⡢Ϥεʹ٤ҴŪɾ뤿ܰ¤ˤϤʤǤ礦

+

n_*, i_*, e_*, d_* ϵʽ٤˴ؤƥȤǡϸ§Ȥ 2 ñ̤ޤʳΥƥȤʼɾǤϡq_* 2 ñ̤ǡ¾ 1 ñ̤ޤǥåФ٤ȤǤϡФˤϽФʤΤǤϡϤʤȤˤޤޤäְ㤤ǤϤʤΤΤʤԥȤΤ줿ǥåξϡȾʬ뤳ȤޤޤץǿǥåФȤϽϤμͳǤְäǥåФϸоݤȤޤ

+ +

3.2.2. cpp_test ˤ뼫ưƥ

+

tool ǥ쥯ȥˤ cpp_test.c Ȥץ򥳥ѥ뤷 test-c ǥ쥯ȥưȡC90 n_*.c, i_*.c ΥƥȤưŪ˹ԤȤǤޤϡߤĤǡܺ٤Τ뤳ȤϤǤޤe_*.? ΥƥȤޤޤƤޤ󡣥ץץå C90 ٤ˤĤƴñ˸Ĥ뤿ΤΤǤC99 ˤĤƤΥƥȤޤޤƤޤ󡣸ߤϤޤѥ¿ C99 ˤϹ⡹ȾʬбƤʤǤ*1, *2, *3

+

cpp_test λȤ Visual C++ 2005 ˤȤȡ̤Ǥ

+
+cpp_test VC2005 "cl -Za -TC -Fe%s %s.c" "del %s.exe" < n_i_.lst
+
+

ʲϤ줾 " " ǰϤɬפޤshell ", " ϤƤޤϡǸΰޤǤΤ ' ' Ǥ˰Ϥкɬסˡ%s n_*, i_* ץץ̾ .c Τ֤ޤ

+

Ϥ̾ꤷޤϣХȰǡ'.' ޤޤʤΤǤʤФʤޤ󡣤̾ .out, .err, .sum Ĥ̾Υե뤬ޤ
+ ѥ뤹뤿Υޥɤ񤭤ޤ
+軰ʲ ѤΤե륳ޥɤ񤭤ޤʣäƤޤޤ

+

n_i_.lst test-c ǥ쥯ȥˤޤn_*.c, i_*.c γƥե̾ .c ΤΥꥹȤ񤫤Ƥޤ
+ϤˤäƤϡɤ줫Υν˽ϤΤ⤢ޤξϡn_i_.lst ΤΥ̾㤨 none Ȥä¸ߤʤե̾˽ؤơƼ¹Ԥޤ

+

cpp_test ¹Ԥȡn_*.c, i_*.c 缡ѥ뤵졢¹ԤƤ椭ޤn_*.err, i_*.err Ȥեˡץץ stderr ؤνϤϿޤơVC2005.sum ˤκ̤ģ˽񤭹ޤޤȸäƤ⡢Σκޤ

+
+*:
+o: ѥϤǤ¹Է̤Թ
+-: ѥǤʤä +
+

VC2005.out cpp_test θƤӽФޥɥ饤󤬵Ͽ졢Ϥ stdout ˽ФåФ⤽˵ϿޤVC2005.err ˤϡϤ stderr ˽ФåС줬Ͽޤ򸫤뤳Ȥˤäơ⤦Τ뤳ȤǤǤ礦

+

ˡΤ褦ˤޤ

+
+paste -d'\0' side_cpp *.sum > cpp_test.sum
+
+

ȡƽϤΥƥȷ̤Ǥ *.sum ե뤬Ϣ뤵ƣĤɽ졢cpp_test.sum ˽񤭹ޤޤside_cpp ϥƥȹܤΥȥ񤤤ɽ¦ʬǡtest-c ǥ쥯ȥˤޤ

+

䤬ƺä cpp_test.sum doc ǥȥ֤Ƥޤʤ6 ˤϼưˤܺ٥ƥȤη̤񤤤ƤޤǤ cpp_test.sum ¿ΥץץåƥȤƤޤΥץץåˤϤɤνϤΥѥɥ饤ФˤбƤʤΤꡢץץåˤĤƤ cpp_test ˤ뼫ưƥȤϤǤޤ

+

:

+

*1 cpp_test.c "Plum-Hall Validation Sampler" runtest.c summtest.c Ȥץߤˤƽ񤤤ΤǤ롣

+

*2 cpp_test.c Borland C / bcc32 ǥѥ뤹ȴ̤ư򤷤ʤcpp_test stdout, stderr 쥯Ȥ system() ƤӽФƤ뤬bcc32 ǤɸϤ¹Υץ˷Ѿʤ褦Ǥ롣Visual C, LCC-Win32 ǥѥ뤷Τʤư

+

*3 m_36_*.c 0x5c ('\\') ͤΥХȤ encoding ΥƥȤǤ뤬 encoding ̾ϻȤʤƥ⤢ΤǡǤϽ롣

+ +

3.2.3. GCC / testsuite ˤ뼫ưƥ

+ +

3.2.3.1. TestSuite Ȥ

+

GCC ˤ testsuite ȤΤޤGCC Υ򥳥ѥ뤷ǡmake check Ȥȡ testsuite Υץ뤬ȥå졢̤𤵤ޤ
+θڥåȤ V.1.3 ϡGCC testsuite ȤƤȤ˽ľ edition ɲäޤ testsuite Ƥȡmake check ǼưŪ˥åޤ3.2.2 cpp_test ȤġǤ n_*, i_* Ȥ̾Υץ뤷ƥȤǤޤ󤬡testsuite Ǥ e_*, w_*, u_* οǥåפ륵ץ⼫ưŪ˥ƥȤǤޤǤ GCC 2.9x ʹߤ cpp0 (cc1, cc1plus) mcpp ΥƥȤ򤹤뤳ȤǤޤ
+ǤϡGCC / testsuite ǤθڥåȤλȤޤ

+

ڥåȤ cpp-test ǥ쥯ȥ test-t, test-l ǥ쥯ȥ GCC / testsuite бƽľΤǡcpp-test test-t, test-l γƥǥ쥯ȥ꤬ޤ
+m_*, u_1_7_* multi-byte character γƼ encoding бΤǤGCC 3.3 ޤǤΥСǤϴĶѿ encoding ˱Ѥ뤳ȤɬפǡѥδĶѤ뤳Ȥ testsuite ǤϤǤʤΤǡcpp-test ˤϴޤƤޤ*1
+GCC / cpp λͤѹ testsuite λͤѹޤǤˤꡢ줫⤢ͽۤޤˤäƤϸڥåȤΰɬפˤʤޤȤ˿ǥåɲä줿ѹ줿ꤷϡtestcase ˤɬפޤΤȤ GCC ΥС󤬤ҤɤŤʤ¤ꡢʽɬפʤȻפޤcpp-test testcases GCC 2.95.3, 3.2, 3.3.2, 3.4.3, 4.0.2, 4.1.1 γ cpp (cpp0, cc1, cc1plus) mcpp ưΤƤޤ
+testsuite Ǥϼ¹ԻץϤˤäѤ뤳ȤϤǤޤʣεʤ¾ʻ¸Ƥ븽ߤξǤ std= ȤץǵʤΥСɬפޤΥץ GCC θŤСˤ¸ߤޤ󡣤äơ testsuite ŬϰϤ GCC 2.9x ʹߤ mcpp V.2.3 ʹߤȤȤˤʤޤ

+

Testsuite ϥץץ˽񤫤줿Τ褦ʷΥȤᤷƼ¹ԤޤϥȤʤΤǡ¾νϤΥƥȤˤϱƶޤ

+
+/* { dg-do preprocess } */
+/* { dg-error "out of range" } */
+
+

dg-error Ȥ dg-warning ȤȤν񤫤줿ץǤϡǥåƥȤޤʣνϤΥƥȤ򤹤뤳Ȥ⡢줾νϤοǥå '|' (OR) Ϥ¤٤ƽ񤯤Ȥǡǽˤʤޤ
+¹ԤΤ DejaGnu Ȥġǡľܤˤ runtest Ȥ shell-script ǤDejaGnu *.exp Ȥ̾ΤĤΥե˽񤫤Ƥޤ*.exp expect ȤġΤ script Ǥơ expect Tcl Ȥޥɸǽ񤫤줿ץʤΤǤ
+äơtestsuite Ȥˤϡ testsuite ˱ơ¿ΥġŬڤʥСΤΤäƤʤФʤޤ󡣤ϻθڥåȤȤǤ⡢ȤʤƱǤ

+

:

+

*1 ºݤˤϴĶѿꤷƤ GCC ưʤ

+ +

3.2.3.2. TestSuite ؤΥ󥹥ȡȥƥ

+

GCC / testsuite ǻθڥåȤȤˤϡΤ褦ˤޤ
+ޤ cpp-test ǥ쥯ȥ GCC testsuite Ŭʥǥ쥯ȥ˥ԡޤ
+cpp-test ǥ쥯ȥϡtest-t, test-l γƥǥ쥯ȥɬפʥեľcpp-test.exp ȤƥѤեäΤǤ*.t Ȥ̾Υե suffix .c ѤƤޤC++ Υե *.C Ȥ̾ˤƤޤ
+ȾΥץϥץץåƥȤΤǤĤ DejaGnu, Tcl Ǥ줬ǤʤΤǡcompile & run 뤿ΥץˤʤäƤޤ*_run.c Ȥ̾ΤΡˡΣĤΥץˤ { dg-options "-ansi -no-integrated-cpp" } ȤԤޤ-no-integrated-cpp ȤΤ GCC 3, 4 ΤΥץǤGCC 2 ˤϤΥץϤʤΤǡGCC 2 ǥƥȤϤΥץϤʤФʤޤ󡣤ΤˡΣĤ testcase ˤĤƤ *_run.c.gcc2, *_run.c.gcc3 ȤΥեѰդƤޤŬʤۤ *_run.c ˥󥯤ƻȤäƤ

+

ʲǤϡΤȤ Linux Ǥ GCC 3.4.3 ˤȤäޤGCC 3.4.3 Υ /usr/local/gcc-3.4.3-src ֤ƤȤޤޤGCC Υѥ /usr/local/gcc-3.4.3-objs ǹԤȤޤ

+
+cp -r cpp-test /usr/local/gcc-3.4.3-src/gcc/testsuite/gcc.dg
+
+

ǡgcc.dg ǥ쥯ȥ cpp-test ʲΥե뤬ԡޤ
+Ƥȡ/usr/local/gcc-3.4.3-objs

+
+make bootstrap
+
+

Ȥ GCC Υ򥳥ѥ뤷ǡ

+
+make -k check
+
+

Ȥȡcpp-test testcases ޤ᤿٤Ƥ testsuite ƥȤޤ

+

ޤcpp-test ȤäƥƥȤˤϡ/usr/local/gcc-3.4.3-objs/gcc ǥ쥯ȥǼΤ褦ˤޤ

+
+make check-gcc RUNTESTFLAGS=cpp-test.exp
+
+

Testsuite log ./testsuite ǥ쥯ȥ gcc.log, gcc.sum ˵Ͽޤ
+make check ϡĶˤäƤ GCC Υ INSTALL/test.html 褦ˡDEJAGNULIBS, TCL_LIBRARY ȤĶѿ꤬ɬפǤ
+ޤGCC 3 ǤϴĶѿ LANG, LC_ALL C ȤƱѸĶˤʤФʤޤ
+GCC Υѥ make check ǻȤΤϡǤ˥󥹥ȡ뤵Ƥ gcc, cc1 ǤϤʤgcc ǥ쥯ȥ줿 xgcc, cc1, cc1plus, cpp0 Ǥ뤳ȤդƤ
+cpp-test ˤƥȤϼΤ褦ˤƤǤޤ

+
+runtest --tool gcc --srcdir /usr/local/gcc-3.4.3-src/gcc/testsuite cpp-test.exp
+
+

ξϡ¹Ԥǥ쥯ȥǤդǤϥȥǥ쥯ȥ˽ϤޤƥȤΤϡǤ˥󥹥ȡ뤵Ƥ gcc, cc1, cpp0 Ǥcpp-test testsuite ɬפʤΤϡGCC ѤγƼե (config.*, *.exp) ˤ뤫Ǥ

+

runtest --tool gcc ǻꤹ 'gcc' Ȥ̾ϤΤȤǤʤФʤޤ󡣤⤷ºݤ˻Ȥѥ餬Ȥ cc, gcc-3.4.3 gcc ʳ̾ξϡܥå󥯤ä gcc Ȥ̾ǸƤӽФ褦ˤƤޤ
+ʤcpp-test ˤϥץץå˥󥰤ФΤ˾ޤȹͤ륱ˤĤƤΥ˥󥰤 testcases ¿ޤޤƤޤGCC ΥץץåϤȾʬʲ PASS ޤ󤬡̤ʤȤäơưְäƤȤץץåѥ뤵ƤʤȤȤȤǤϤޤ󡣤ְäƤ뤫ǤϤʤץץåΡʼפʤΤǤ

+ +

3.2.3.3. mcpp μưƥ

+

cpp-test Ǥɸ⡼ɤ mcpp ΥƥȤǤ褦ˤʤäƤޤäơGCC Υץץ mcpp ֤ơgcc ǥ쥯ȥ

+
+make check-gcc RUNTESTFLAGS=cpp-test.exp
+
+

Ȥȡmcpp μưåޤǤդΥǥ쥯ȥ runtest ľܸƤӽФƼ¹Ԥ뤳ȤǤޤ

+
+runtest --tool gcc --srcdir /usr/local/gcc-3.4.3-src/gcc/testsuite cpp-test.exp
+
+

mcpp GCC 3, 4 Ǽ¹Ԥ硢cpp-test testcases Ƥ٤Ƥ PASS ϤǤGCC 2 Ǽ¹ԤϤ⤦̤ʤΤޤ gcc -D__cplusplus=1 Ȥץդ mcpp ƤӽФǤꡢmcpp ΤǤϤޤ
+ץץ mcpp ֤ˡˤĤƤϡmcpp-manual.html#3.9.5, mcpp-manual.html#3.9.7 򸫤Ƥ +Testsuite ŬѤϡmcpp εư -23j Ȥץդ褦ꤹɬפޤ-2 digraph-3 trigraph ͭˤ륪ץǤ-j ϿǥåνϤ˥ξղäʤΥץǤ¾ΥץꤷʤǤޤtestsuite ǥƥȤǤΤɸ⡼ɤ mcpp ǡ¾Υ⡼ɤ mcpp ΥƥȤϤǤޤ

+

ʾ GCC make θǹԤˡǤGCC / testsuite 󥹥ȡ뤵ƤƼ¹ԤǤ֤ˤʤäƤСmcpp Ȥ configure make mcpp μưƥȤ򤹤뤳ȤǤޤξϡɬפ򤹤٤ make check ưŪˤäƤΤǡǤñǤˡˤĤƤϡmcpp INSTALL 򸫤Ƥ

+ +

3.2.3.4. TestSuite ȸڥå

+

GCC ˤ testsuite Ť餢ޤץץ˴ؤƤ V.2.9x ޤǤϤ鷺Υץ뤷ޤǤ˥ץץڻ뤵Ƥ狼ޤΥץץ testcases V.3.x Ǥϥ㤤ޤץץåΥȥɥȤ쿷졢up-to-date ʤΤˤʤäȤȼΤǡץץŻ뤵褦ˤʤäȤ狼ޤ
+ testcases ϰȤƤʤҴäΤˤʤäƤޤθϡtestsuite μΤ褦ʤͳ褹ΤȻפޤ

+
    +
  1. 桼󤻤 bug report νѤǤ뤳ȡʤºݤȯ줿ХȯɤΤΤ濴Ǥ롣
    +
  2. ˡȯԤǽˡΥǥХåΤ˽񤤤ΤɲäƤ롣
    +
+

ϥץ󥽡ʤǤϤΥǥХåˡǡGCC ¿ͥ줿ץޤ˻ȤƤȤDzǽȤʤäΤǤˡƱˡtestcases ΥҴ⤿餷Ƥȹͤޤ
+ޤ testcases ˤ GCC ǤѤʤץ뤬¿¾νϤˤŬѤǤޤ󡣤ɤGCC 3 testcases ˤ GCC 2 / cpp ˤŬѤǤʤΤ¿ޤޤƤޤץץϤ spacing ΰ㤤ǥåΰ㤤뤿Ǥ
+ФƻθڥåȤϡϻΥץץåΥǥХåΤ˻䤬ͤǽ񤤤ΤǤǹͤѤơץץͤƥȤ褦˽ľޤ¿Υץ뤬ΤȤƥƥޥƥå˹Ƥޤƥޥƥå testcases GCC / testsuite ɲä뤳Ȥϡʤʤ̣ĤȻפޤ
+ޤ testsuite ǸڥåȤ GCC 2.9x / cpp0, GCC 3.x, 4.x / cc1, mcpp ȤĤΥץץåΥƥȤǤ褦˽񤫤ƤޤʤDejaGnu, Tcl ɽεǽѤСϤˤץץϤ spacing κۤǥåκۤۼ뤳ȤǤΤǤ*1

+

Testsuite ڥåȤ򤳤ΣĤΥץץåŬѤ̤ʲ˺ܤƤޤmcpp 2007/03 Ρ¾ 2006/10 Υƥȡˡ
+GCC 4.1.1 ǥץץå mcpp V.2.6.3 ֤Ƽ¹ԤϤʤޤ

+
+            === gcc Summary ===
+
+# of expected passes            264
+# of unexpected failures        1
+# of expected failures          4
+/usr/local/bin/gcc version 4.1.1
+
+

Ĥ FAIL ΤϡC++98 Ǥ universal-character-name <=> multi-byte character ѴƤʤȤˤΤǤ
+GCC 3.2 / cc1 ǤϤʤޤ

+
+            === gcc Summary ===
+
+# of expected passes            216
+# of unexpected failures        51
+# of unexpected successes       2
+# of expected failures          2
+/usr/local/bin/gcc version 3.2
+
+

FAIL ¿ϡ˥󥰤ФƤۤȤǽФƤʤȤΤǤ
+GCC 4.1.1 / cc1 ۤȤѤޤ

+
+            === gcc Summary ===
+
+# of expected passes            214
+# of unexpected failures        53
+# of unexpected successes       2
+# of expected failures          2
+/usr/local/bin/gcc  version 4.1.1
+
+

GCC 2.95.3 / cpp0 ǤϤʤޤ

+
+            === gcc Summary ===
+
+# of expected passes            181
+# of unexpected failures        87
+# of unexpected successes       3
+# of expected failures          1
+gcc version 2.95.3 20010315 (release)
+
+

GCC 3, 4 / cc1 ⤵˥˥󥰤ʤԥȤγ줿ǥå⤤ĤޤC99, C++98 οͤȾʬ̤Ǥ
+GCC ΥСˤäƷ㤦ΤϡĤ testcase ʣ FAIL ȯ뤳Ȥ뤫Ǥ

+

:

+

*1 Τˡ testcases dg script Ϥ䤿 \ 䵭¿ unreadable ʤΤˤʤäƤ롣DejaGnu, Tcl ɽνˤϤʤʤ٤ꡢȤˤϼιפɬפǤ뤬פʣνϤˤĤư̤μưƥȤǽǤ뤳Ȥ狼äǤϡνϤμ¹ԻץΤ testcases ǻȤ륪ץ󤬶̤Ǥ뤳ȤǤ롣

+
+ +

3.3. Violation of syntax rule or constraint ȿǥå

+

Standard C νϤʤФʤʤΤϤǤְäФƤϿǥåФʤФʤޤ󡣤ޤStandard C ˤϡưͤϤˤޤƤʬ䡢ɤư򤹤뤫ꤵƤʤʬ⤢ޤΤȤޤȤƼȡΤ褦ˤʤޤ*1

+
    +
  1. ץǡǡɤνϤǤƱ̤ˤʤΡ
    +
  2. ץȥǡǤäƤ⡢νˡϵꤵʤΡϥɥȤ˵ܤʤƤɤ unspecified behavior̤ưˤȸƤ֡
    +
  3. ץȥǡǤäƤ⡢νϽϤˤޤƤΡλͤϳƽϤɥȤ˵ܤʤФʤʤ implementation-defined behaviorʽưˤȸƤ֡
    +
  4. ְä뤤ϰܿΤʤץޤϥǡǤ뤬νˤĤƤϲ⵬ꤵʤΡϤϤ˿ǥåФƤɤФʤƤɤ餫ץȤƤν򤷤Ƥɤ undefined behavior̤ưˤȸƤ֡
    +
  5. ְäץޤϥǡǡФƽϤ diagnostic messageʿǥåˤФʤФʤʤΡˤ violation of syntax ruleʹʸ§ȿˤ violation of constraint ȿˤȤ롣*2
    +
+

Τ 1 ΥץȥǡΤΤ strictly conforming program ʵʸ̩ץץˤȸƤӤޤ2, 3 ⡢ϤˤäƷ̤˰㤤νФʤΤǤСޤޤƤƤɤȲᤵˡ
+1, 2, 3 ΥץȥǡΤΤ conforming program ʵʹץץˤȸƤӤޤ

+

ǥåνФ implementation-defined Ǥ餫 violation of syntax rule or constraint ޤ translation unit ĤˤĤƣİʾβ餫οǥåФʤФʤʤȤƤޤViolation of syntax rule or constraint ޤޤʤץФơǥåФȤϽϤμͳǤ strictly conforming program 䡢νϤ implementation-defined, unspecified λͤ˹פ conforming program ϺǸޤǤʤФʤޤ
+ΥɥȤǤϡviolation of syntax rule or constraint ֥顼פȸƤ֤Ȥˤޤ

+

Validation Suite e_* եˤϡʣΥ顼ޤΤ󤢤ޤʲκǤϡϤĤΥ顼ˤĤƣİʾοǥåФȤԤƤޤĥ顼äƤ⣱Ĥ translation unit ˤĤƣĤοǥå"violation of syntax rule or constraint" ȤäˤФʤϤ⤢뤫⤷ޤ󡣤ޤ顼Ȥθν𤹤Ϥ⤢뤫⤷ޤ󡣤μϽϤΡʼפǤʽ٤ǤϤޤɬפʾϥץХ餷ƺƥƥȤƤʼ 4 ̤ˤȤꤢޤ

+

:

+
+*1 C90 3 Definitions of Terms Ѹڤӵ
+   C90 4 Compliance ʹ
+   C90 5.1.1.3 Diagnostics ǥå
+   C99 3 Terms, definitions, and symbols
+   C99 4 Conformance
+   C99 5.1.1.3 Diagnostics
+
+

*2 C++98 Ǥ C90, C99 ȤѸ줬ʤäƤ뤬ݤä˰ʤ

+
+ +

3.4. ܺ

+

ʲˡƥƥȹܤˤĤƣĤIJ⤷ޤ + Standard C ץץΤΤβȤʤΤǤK&R 1st. ȶ̤λͤˤĤƤϡ餿ƲϤޤ󡣹ܤֹ *.t ե *.c եȤǶ̤Ǥ

+ +

3.4.1. Trigraphs

+ +

n.1.1. Ĥ trigraph sequences

+

äδʸåȤˤ ISO 646:1983 Invariant Code Set ˴ޤޤʤʸĤΤǡϼΣʸ sequence Ǥ⥽˽񤯤ȤǤ褦ˤʤޤ C90 ǿߤ줿Ǥ*1

+
+ + + + + + + + + + +
??=#
??([
??/\
??)]
??'^
??<{
??!|
??>}
??-~
+
+

ΣĤ trigraph sequence translation phase 1 бʸ֤ޤĤʸ򥭡ܡɤϤ뤳ȤΤǤ륷ƥǤϡ trigraph ȤɬפϤޤ󡣤ƥǤ Standard C ˹פץץ trigraph ѴǤɬפޤ

+

: 6ĤȤǤ 6 Ǥʤ trigraph Ĥ뤴Ȥ 2 0 򲼸¤Ȥ롣

+

:

+
+*1 C90 5.2.1.1 Trigraph sequences ʸɽ
+   C90 5.1.1.2 Translation phases ե
+   C99 5.2.1.1 Trigraph sequences
+   C99 5.1.1.2 Translation phases
+
+ +

n.1.2. ȥ trigraph sequence

+

Trigraphs Ѵ translation phase 3 Ǥ tokenization phase 4 ǤΥȥԤνΩäƹԤΤǡ󥳥ȥԤǤɤǤ trigraphs 񤯤ȤǤޤ

+

: 2

+ +

n.1.3. Trigraphs ϣĤ¸ߤʤ

+

Trigraphs Ͼ嵭ΣĤʤΤǡʳ ?? ǻϤޤ sequence ¾ʸѴ뤳ȤϤʤ?? åפ뤳Ȥ⤢ޤTrigraph ȤǤʤ ? ޤ sequence ߤƤ⡢ץץǤɬפޤ

+

: 2

+ +

3.4.2. <backslash><newline> ˤ³

+

\ äƤľ˲Ԥ³ƤФϡ <backslash><newline> sequence translation phase 2 ̵˺ޤη̡ĤιԤ³ޤʽǤϡեιԤ physical lineʪԡˡ<backslash><newline> ʤС˺³줿ιԤ logical lineԡˤȸƤǶ̤ƤޤTranslation phase 3 νϤԤоݤȤƹԤޤ*1
+K&R 1st. Ǥ #define Ԥʸ <backslash><newline> ǼΥԤ³뤳ȤǤȤƤޤΰʳξˤĤƤϿƤޤ󡣼ºݤνϤǤϤޤޤǤȥԤ #define ˸¤餺³ǤΤ¿ä褦Ǥ

+

:

+
+*1 C90 5.1.1.2 Translation phases ե
+   C99 5.1.1.2 Translation phases
+
+ +

n.2.1. #define ԤΥѥ᡼ꥹȤִꥹȤȤδ

+

#define Ԥ³ K&R 1st. ǤǧƤΤǤꡢۤȤɤνϤDzǽǤ

+

: 4ʤǤ 4 Ǥʤ 0

+ +

n.2.2. #define ԤΥѥ᡼ꥹȤ

+

#define ԤǤäƤѥ᡼ꥹȤΤ褦ʤޤ̤ǤϤʤȤ <backslash><newline> ȡǤʤϤ⤢ޤ

+

: 2

+ +

n.2.3. ʸƥ

+

ʸƥ <backslash><newline> K&R 1st. ΤΤǤ

+

: 2 +

+ +

n.2.4. ̻Ҥ

+

Standard C Ǥϡ̻ҤǤȤɤǤȡ<backslash><newline> ̵ǺʤФʤޤ

+

: 2

+ +

n.2.5. Trigraph ˤ <backslash>

+

<backslash> \ Ǥʤtrigraph ˤ ??/ ⤢ޤ ??/ translation phase 1 \ ѴƤޤ顢phase 2 Ǥ \ ΤΤǤ

+

: 2

+ +

3.4.3.

+

Translation phase 3 ǤԤ pp-token white spaces ʬ򤵤ޤκݡȤϣĤ space Ѵޤ*1
+ǽϤϡϢ³ white spacesʥȤޤˤ򣱸Ĥ space Ѵ뤫⤷ޤ󡣤ɤˤƤ <newline> ѴΤޤ޻Ĥޤϡ phase 4 Ǥ preprocessing directive νΡֹԡפоݤȤ뤫Ǥ
+ȤԤޤäƤϡȤˤ¾ι³Ԥޤ

+

:

+
+*1 C90 5.1.1.2 Translation phases ե
+   C99 5.1.1.2 Translation phases
+
+ +

n.3.1. One space Ѵ

+

Reiser θŤ cpp ǤϥȤϡcpp Ǥ token separator ȤƵǽϤޤǤδ֤ˤϺƤޤΤȤѤơȡϢ˥ȤȤˡޤλͤ K&R 1st. ⳰줿ΤǤꡢStandard C ǤΤꤵޤStandard C ǤϥȡϢˤ ## 黻ҤȤޤ

+

: 6

+ +

n.dslcom. //

+

K&R 1st. C90 ˻ޤǡȤ /* ǻϤޤ */ ǽΤǤ*1
+C99 Ǥ C++ // ⥳ȤȤưȤˤʤޤ*2

+

: 4 +
+C90 ǤϤϥȤǤϤʤñʤ / Ȥ pp-token Ĥ sequence Ȥƽ٤ΤǤ뤬C99 // 򥳥ȤȤƽϤŪǤämcpp Ǥ C90 ⡼ɤǤ⤳򥳥ȤȤƽǥ˥󥰤Ф

+

:

+
+*1 C90 6.1.9 Comments 
+
+
+*2 C99 6.4.9 Comments
+
+ +

n.3.3. Ȥ pp-directive νΩäƽ

+

# ǻϤޤ preprocessing directive ϡֹԡפоݤȤޤΡֹԡפϥʪԤȤϸ¤ޤ<backslash><newline> ˤä³줿ԤǤ뤳Ȥ⤢СʪԤޤȤˤäʣʪԤˤޤֹԡפǤ뤳Ȥ⤢ޤ translation phase 1 4 νͤƤߤСΤȤǤ

+

: 4

+ +

n.3.4. Ȥ <backslash><newline>

+

<backslash><newline> ȥȤˤäƤĤʪԤˤޤ pp-directive Ԥ¸ߤޤTranslation phase ƤʤץץåǤϡ뤳ȤǤޤ

+

: 2

+ +

3.4.4. üʥȡ (digraphs) ʸ (UCN)

+

C90 / Amendment 1 (1994) ǤϡĤ operator, punctuator ˤĤ digraph Ȥ spelling ɲäޤ*1
+C99 Ǥ UCN (universal character sequence) Ȥʸɽɲäޤ*2
+e.4.? Ǥϥȡ󥨥顼夲ޤ

+

+:

+
+*1 Amendment 1 / 3.1 Operators, 3.2 Punctuators ISO 9899 / 6.1.5, 6.1.6 ؤɲá
+   C99 6.4.6 Punctuators
+
+*2 C99 6.4.3 Universal character names
+
+ +

n.4.1. Preprocessing directive digraph spelling

+

Digraph token (pp-token) Ȥưޤ +%: # spelling Ǥpreprocessing directive ԤƬ pp-token ȤƤ⡢ʸ󲽱黻ҤȤƤȤޤ

+

: 6

+ +

n.4.2. Digraph spelling ʸ

+

Digraph trigraph Ȱä token (pp-token) ʤΤǡʸ󲽤˺ݤƤѴ줺ˤΤޤޤ spelling ʸ󲽤ޤ̵̣ʻͤǤˡ

+

: 2

+ +

n.ucn1. UCN ǧ 1

+

UCN ʸƥ롢ʸ̻Ҥǧޤ +

+

: 8ʸƥ UCN ץץ򤽤Τޤ̲᤹ 4 ʸidentifier UCN г 2 UCN Ǥ뤳ȤǧۤäƤΤޤ޽ϤΤԲġ

+ +

n.ucn2. UCN ǧ 2

+

UCN pp-number ǤȤޤץץνޤǤ number-token ϾǤƤʤФʤޤ󡣤 C99 εǡC++ ˤϤޤ

+

: 2

+ +

e.ucn. UCN θ

+

UCN \U ǻϤޤΤϣ\u ǻϤޤΤϣΣʿǤʤФʤޤ
+UCN [0..9F], [D800..DFFF] ϰϤˤäƤϤʤޤ󡣤24($), 40(@), 60(`) ͭǤ

+

: 4ĤΥץΤ줾ˤĤơǤǤг 1

+ +

e.4.3. ʸ

+

äΥȡη򤷤Ƥʤ sequence Ǥ⤿Ƥ pp-token Ȥǧޤäơץץ tokenization ǥ顼Ȥʤϡޤꤢޤ
+Τۤ undefined behavior Ȥʤ礬Ĥޤ4.2 ȡˡ
+ʸϥץץ #if ԤǤ⥳ѥǤ⡢violation of syntax rule Ǥ*1

+

: 2 +

+

+:

+
+*1 C90 6.1.3.4 Character constants ʸ -- Syntax ʸ§
+   C99 6.4.4.4 Character constants -- Syntax
+
+ +

3.4.5. Preprocessing directive line space tab

+

Space, tab, vertical-tab, form-feed, carriage-return, new-line white space Ȥư礵ޤʸƥ롦ʸإå̾Ȥˤʤ white space ̾ token separator ȤƤΰ̣äƤޤ󤬡translation phase 4 ޤǻĤä newline ̤ʤΤǡpp-directive ζڤȤʤޤơpp-directive line ǤϻȤ white space ˼㴳¤ޤ

+ +

n.5.1. # space tab

+

Standard C ǤϡPreprocessing directive line κǽ pp-token Ǥ # space, tab ϡäƤʤƤƱ̤ˤʤ뤳ȤݾڤƤޤ(*1)K&R 1st. ǤϤ줬ΤǤϤʤºݤˤ # space, tab ǧʤϤޤ
+ιԤΤʹߤ space, tab ϡK&R 1st. Ǥ Standard C Ʊͤˡñʤ token separator ȤǧƤȲᤵޤ
+pp-directive line space, tab ʳ white space ä undefined Ǥ4.2 u.1.6 ȡˡ

+

: 6

+

:

+
+*1 C90 6.8 Preprocessing directives  -- Description ­, Constraints 
+   C99 6.10 Preprocesssing directives -- Description, Constraints
+
+ +

3.4.6. #include

+

#include K&R 1st. κǤŪ pp-directive ǤStandard C Τ directive εˤ undefined ʬ implementation-defined ʬȤ¿ʤäƤޤ(*1)ͳϼˤޤ

+
    +
  1. directive ΰǤ header-name Ȥ pp-token ϣϣӤΥե륷ƥ˰¸ΤǤꡢɸಽ
    +
  2. ե򤵤ɸפξϽϤ˰¸롣
    +
  3. ", " +ǰϤޤ줿ʸƥη header-name Ǥ⡢\ escape ʸǤϤʤʸƥȤ̤ pp-token Ǥꡢ <, > ǰϤޤ줿 header-name ˤäƤϺǤ§Ū pp-token Ǥ롣
    +
+

n.6.* ǤϡΤ褦ʺǤŪʥƥȤϡܤʬƹԤȤϤޤ󡣤¾ΥƥȹܤȤƴޤޤƤꡢ줬ǤʤΤǤ¿ΥƥȤ»ܤǤʤΤǡǤ

+
+#include    <ctype.h>
+#include    "header.h"
+
+

:

+
+*1 C90 6.8.2 Source file inclusion ե
+   C99 6.10.2 Source file inclusion
+
+ +

n.6.1. Ĥηˤɸإå include

+

Header-name ˤϣĤηޤ +ΰ㤤ϡ<, > ǰϤޤ줿ǤϽξʣǤɤˤ餽 header 򤵤", " ǰϤޤ줿ǤϤΥեޤˡǤơ줬Ԥ <, > ǰϤޤ줿Ʊͤν򤹤롢ȤȤˤޤ󡣤äơ", " ǰϤޤ줿ɸإå include 뤳ȤǤޤ K&R 1st. ǤƱͤǤ
+ʤStandard C ǤϡƱɸإåʣ include Ƥ⤫ޤʤȤˤʤäƤޤϤɤˤƤץץåǤϤʤɸإåνǤ4.1.1 ȡˡ

+

: 10ĤΥץʤΤ 4

+ +

n.6.2. ޥˤ header-nameΣ

+

K&R 1st. Ǥ #include Ԥ˥ޥȤȤϤƤޤǤStandard C Ǥϥޥǧޤ#include ΰĤΤɤηȤפʤϡ˴ޤޤޥŸޤη̤ϣĤηΤɤ餫˰פɬפޤ
+εˤ̯ʤȤ⤢ޤ㤨СΤ褦ʥϤɤ٤Ǥ礦

+
+#define MACRO   header.h>
+#include    <MACRO
+
+

ϡMACRO ޤŸ

+
+#include    <header.h>
+
+

Ȥ٤Ǥ礦Ȥ⡢ޥŸ < б > ʤȤƥ顼Ȥ٤Ǥ礦

+

ʤϤȤޤǰռƽ񤫤ƤȤϹͤޤ +äơ<, > ", " Ʊͤ quotation delimiter ȤưΤʤȻפޤ˥ޥŸΤ⡢ʰȿȤϸޤ󤬡 Validation Suite ˤϡʤηĤĤƥȤϴޤޤƤޤ

+

: 6

+ +

n.6.3. ޥˤ header-nameΣ

+

ĤޤʤȤǤޥɬ⣱ĤǤɬפϤޤ +

+

: 2 +

+ +

3.4.7. #line

+

#line Ȥ pp-directive ϥ桼ȤȤ̤ϤʤΤǤ¾βΥġǡʣäȤϸ¤ʤ˥ pre-preprocess ʤɤˡΥΥե̾Ȥλιֹ뤿˻ȤΤΤ褦ǤK&R 1st. 褢Ȥ򸫤ȡŪˤʤӤΤǤ礦
+ޤץץåνϤˤ̤ #line ޤϤѷե̾ȹֹ򥳥ѥΤ뤿˻ȤޤϵꤵƤ뤳ȤǤϤޤ
+#line ǻꤵ줿ե̾ȹֹϻޥ __FILE__, __LINE__ ͤȤʤޤ__LINE__ ϤʪԣԤȤ˥󥯥ȤƤ椯ˡ*1

+
+*1 C90 6.8.4 Line control 
+   C99 6.10.4 Line control
+   C90 6.8.8 Predefined macro names 餫줿ޥ̾
+   C99 6.10.8 Predefined macro names
+
+ +

n.7.1. ֹȥե̾λ

+

Line number filename ꤷ #line K&R 1st. ˤ⤢ޤK&R 1st. Ǥ filename ", " ǰϤߤޤǤ
+Standard C Ǥ filename ʸƥǤ #include header-name ȤϰäȡǤꡢ̩˹ͤ \ ΰ̯ޤǤޤǤʤǤ礦#line filename <stdio.h> ηΤΤʤΤϹǤˡ

+

: 6

+ +

n.7.2. ե̵̾Ƥɤ

+

Filename ΰϥץǤꡢʤƤ⤫ޤޤ + K&R 1st. ƱǤline number λΤʤΤ undefinedˡ

+

: 4

+ +

n.7.3. ޥˤֹȥե̾λ

+

K&R 1st. Ǥ #line ΰ˥ޥȤȤϤƤޤǤStandard C ǤϻȤ뤳Ȥݾڤޤ

+

: 4

+ +

n.line ֹϰ

+

#line ǥ쥯ƥ֤ line number ϰϤ C90 Ǥ [1..32767] ǤC99 Ǥ [1..2147483647] ˳礵ޤ

+

: 2

+ +

e.7.4. ե̾磻ʸƥ

+

Filename ΰʸƥǤʤФʤ餺ĤޤʤȤǤ磻ʸƥǤ violation of constraint Ȥʤޤʤʳ pp-token ǤϤʤ undefinedХ󥹤ʵǤˡ

+

: 2

+ +

3.4.8. #error

+

#error C90 ǿߤ줿 directive Ǥ +ץץˡ򤽤ΰȤƴޤ२顼åɽޤŤϤǤ #assert directive ĤΤ⤢ޤɸŪʤΤϤޤǤ
+ʤ#error ǤϽλ٤ɤϵꤵƤޤ󤬡Rationale ˤȡʤǤϤޤ׵ǤʤΤǵꤷʤäǡߤΤ ANSI C ѰΰտޤǤȤΤȤǤ*1

+

:

+
+*1 C90 6.8.5 Error directive ɽ
+   ANSI C Rationale 3.8.5
+   C99 6.10.5 Error directive
+   C99 Rationale 6.10.5
+
+ +

n.8.1. ޥŸʤ

+

#error ΥޥŸޤ +ȥԤǥޥŸΤϡ#if (#elif), #include, #line Ǥ*1

+

: 8ޥŸƽΤ 2 λ뤫ɤʤ

+

:

+
+*1 C90 6.8 Preprocessing directives  -- Semantics ̣§
+   C99 6.10 Preprocessing directives -- Semantics
+
+ +

n.8.2. å̵Ƥɤ

+

ĤޤʤȤǤ#error ԤΰϥץǤꡢʤƤ⤫ޤޤ

+

: 2 +

+ +

3.4.9. #pragma, _Pragma()

+

#pragma C90 ǿߤ줿ΤǤȼγĥ directive Ϥ٤ #pragma sub-directive Ǽ¸뤳ȤˤʤäƤޤ*1

+

:

+
+*1 C90 6.8.6 Pragma directive ץ饰޻
+   C99 6.10.6 Pragma directive
+
+ +

n.9.1. ǧǤʤ #pragma ⥨顼ˤϤʤʤ

+

äơϤȤǧǤ #pragma sub-directive ۤʤޤǧǤʤ #pragma 顼ˤʤäΤǤ portable ʥץब񤱤ʤΤǡϤǧǤʤ #pragma ̵뤹뤳ȤˤʤäƤޤץץǤϼʬǧǤץץ˴ؤ #pragma ơ¾ #pragma Ϥ٤ƤΤޤޥѥΤϤȤˤʤޤ

+

: 10#pragma 򥨥顼ˤƤϤʤ˥󥰤ФȤϤޤʤ

+ +

n.pragma. _Pragma() operater

+

C99 Ǥϡ#pragma Ʊ̤#pragma Ȱäƥޥˤ񤯤ȤΤǤ _Pragma() operator ɲäޤ
+ޤpragma ³ pp-token STDC Ǥеꤵ줿ɸεǽξϥޥŸػߤ뤬¾ξϥޥŸоݤȤ뤫ɤ implementation-defined ȤƤޤ

+

: 6

+ +

e.pragma _Pragma() ΰʸƥ

+

_Pragma() operator ΰʸƥǤʤФʤޤ

+

: 2 +

+ +

3.4.10. #if, #elif, #else, #endif

+

#if, #else, #endif K&R 1st. 褢ΤǤ +*1
+#if ȤʤϤǤϡn.10.1, n.11.*, n.12.*, n.13.*, e.12.*, e.14.* ɤǤʤФǤʤ¾¿ΥƥȤ⼺Ԥ뤳Ȥˤʤޤ

+

:

+
+*1 C90 6.8.1 Conditional inclusion դ
+   C99 6.10.1 Conditional inclusion
+
+ +

n.10.1. #elif Ȥ

+

C90 Ǥ #elif ɲäޤˤäơ#if 򲿽ŤˤͥȤɤߤˤ򤱤褦ˤʤޤ
+#if ˤϥޥȤȤǤޤޥȤƤʤ identifier 0 ɾޤ

+

ʤʽǤϡ#if 餽б #endif ޤǤ #if section #if (#ifdef, #ifndef), #elif, #else, #endif Ƕڤ줿֥å #if group ȸƤǤޤ#if, #elif Ԥμ #if ȸƤӤޤ

+

: 10

+ +

n.10.2. åפ #if group Ǥ pp-token

+

åפ #if group Ǥϡ#if group бطȥ졼뤿 #if, #ifdef, #ifndef, #elif, #else, #endif Ĵ٤ʳ preprocessing directive Ͻ줺ޥŸޤ

+

tokenization ϹԤޤˡäΥϽᤫ齪ޤǥȤ pp-token sequence Ǥꡢˡ#if бطĴ٤뤿ˤϾʤȤ⥳Ȥνɬפǡ/* ȵǤ뤳ȤΤ뤿ˤϤ줬ʸƥʸˤΤǤϤʤȤΤʤФʤʤǤ

+

: 6

+ +

3.4.11. #if defined

+

C90 Ǥ #if defined Ȥ黻Ҥߤޤ + #ifdef, #ifndef #if (#elif) 礹Τǡˤäơ#ifdef ŤˤͥȤ줿ɤߤˤ򤱤褦ˤʤޤ

+ +

n.11.1. #if defined

+

defined 黻Ҥ operand ϼ̻ҤǤ (, ) ǰϤȰϤޤʤǧƤޤɤ̣Ʊǡoperand ޥȤƤ 1Ǥʤ 0 ɾޤ

+

: 8Ĥ #if section ǤʤΤ 2

+ +

n.11.2. defined ñ黻

+

defined ϱ黻ҤΣĤǤꡢ1 0 Τɤ餫ͤͿΤǡη̤򤵤¾μȱ黻뤳ȤǤޤ

+

: 2

+ +

3.4.12. #if η

+

#if ˤĤƤ K&R 1st. ǤȤƤǡηϤäꤷƤޤǤC90 Ǥ #if Ǥꡢint long ȡunsigned int unsigned long ƱɽäƤ뤫Τ褦˰ȤΤˤޤʤ#if ϤޤƤ٤ long unsigned long ɾޤСȡˤϤ٤ L ޤ UL ҤդƤΤƱ褦˰ޤ*1

+

ˡC99 Ǥ #if ηϤ줾νϤκȤޤη <stdint.h> Ȥɸإå intmax_t, uintmax_t Ȥ̾ typedef ޤC99 Ǥ long long ɬܤȤƤΤǡ#if η long long ޤϤʾΥȤȤˤʤޤlong long / unsigned long long ɽˤ LL (ll) / ULL (ull) ȤҤȤޤ*2
+long long / unsigned long long ͤ printf() ɽˤϡ%ll Ȥ length modifier Ŭ conversion specifier Ȥޤ%lld, %llu, %llx ˡintmax_t, uintmax_t ͤɽ length modifier %j Ǥ%jd, %ju, %jx ˡ*3

+

:

+
+*1 C90 6.8.1 Conditional inclusion դ -- Semantics ̣§
+
+
+*2 C99 6.10.1 Conditional inclusion -- Semantics
+
+
+*3 C99 7.19.6.1 The fprintf function -- Description
+
+ +

n.12.1. long #if

+

C90 #if Ǥ long ɾǤʤФʤޤ

+

: 6 +

+ +

n.12.2. unsigned long #if

+

C90 #if Ǥ unsigned long ɾǤʤФʤޤ

+

: 4 +

+ +

n.12.3. ʿ

+

#if ǤϣɾǤʤФʤޤK&R 1st. ǤƱͤǤlong κͤۤ K&R 1st. Ǥ long ͤɾ줿ΤФơC90 Ǥ unsigned long ɾȤäƤޤ*1

+

: 4ʿǧ뤬ɾꥪСեꤹΤ 2 ʿǧʤΤ 0

+
+*1 C90 6.1.3.2 Integer constants 
+   C99 6.4.4.1 Integer constants
+
+ +

n.12.4. ʿ

+

#if +ǤϣɾǤʤФʤޤK&R 1st. ǤƱͤǤlong κͤۤ K&R 1st. Ǥ long ͤɾ줿ΤФơC90 Ǥ unsigned long ɾȤäƤޤ

+

: 4ʿǧ뤬ɾꥪСեꤹΤ 2 ʿǧʤΤ 0

+ +

n.12.5. L, l

+

#if Ǥ L, l դȡɾǤʤФʤޤK&R 1st. Ǥ long κͤۤʤˤĤƤƱǤץץǤϤҤϤäƤʤƤɾƱǤ

+

: 2

+ +

n.12.6. U, u

+

#if Ǥ U, u դȡɾǤʤФʤޤ󡣤 K&R 1st. ˤϤʤC90 Ǹǧ줿ˡǤ

+

: 6

+ +

n.12.7.

+

#if ǤοⰷʤФʤޤK&R 1st. λͤǤ

+

: 4 +

+ +

e.12.8. ȡͤɽǤϰϤˤʤ

+

C90 Ǥϡ#if ˸ȡͤ long ޤ unsigned long ɽǤϰϤˤʤ violation of constraintʿХ顼Ȥʤޤ #if ˤĤľܵꤵƤ뤳ȤǤϤޤ󤬡̤ˤĤƤε꤬ꡢ#if 㳰ǤϤʤȹͤޤ*1
+ʤʸ overflow ˤĤƤϡe.32.5., e.33.2, e.35.2 ǥƥȤޤ

+

: 2

+

+:

+
+*1 C90 6.4 Constant expressions  -- Constraints 
+   C99 6.6 Constant expressions -- Constraints
+
+ +

n.llong. long long / unsigned long long ɾ

+

C99 #if ǤϾʤȤ long long / unsigned long long ɾǤʤФʤޤ
+long long κͤۤ unsigned long long ɾޤ
+C99 Ǥ LL, ll, ULL, ull ȤҤɲäޤ*1

+

: 10ĤΥץˤĤơǤФ줾 2

+

:

+
+*1 C99 6.4.4.1 Integer constants
+   C99 6.6 Constant expressions -- Constraints
+
+ +

e.intmax. 黻η̤ intmax_t ϰϳ

+

C99 #if Ǥϡintmax_t, uintmax_t ϰϤۤ violation of constraint Ȥʤޤ

+

: 2 <stdint.h> ʤϥޥŬ˽񤤤Ƥ⤫ޤʤ

+ +

3.4.13. #if α黻

+

#if ΰǤ +̤٤ȼΤ褦ʰ㤤Ǥ

+
    +
  1. C90 Ǥ int longunsigned int unsigned long ƱɽĤΤ褦ɾ롣C99 Ǥ int, long intmax_tunsigned int, unsigned long uintmax_t ƱɽĤΤ褦ɾ롣
    +
  2. defined 黻ҤȤ롣
    +
  3. ޥŸ˻Ĥä identifier Ϥ٤ 0 ɾ롣*1
    +
  4. ץץǤ keyword ¸ߤʤΤǡkeyword Ʊ̾ identifier ñʤ identifier Ȥư롣äơ㥹Ȥ sizeof ϻȤʤ
    +
+

ؿƤӽФޱ黻Ҥϡ̤ǤȤޤѿǤϤʤΤǡ󥯥ȡǥȡȤޤ
+n.13 Ǥϰ̤ȶ̤ɾ롼ˤĤƥƥȤޤΤ n.13.5 K&R 1st. ȤѤäȤǡn.13.6. pre-Standard #if ǤϤޤޤäȤǡn.13.13., n.13.14 K&R 1st. ǤΤǤʤäΤǤ¾ K&R 1st. ޤäѤäƤޤ*2
+ʤ#if int ͤɾǤʤϤˤĤƤ⤳Υ롼ΥƥȤǤ褦ˡn.13. ǤϤ٤ƾͤȤäƤޤ󡣤ޤ黻 defined, >= n.13 ˽ФƤޤ󤬡¾Τɤ˽ФƤƤޤ

+

:

+

*1 C++ Standard Ǥ true, false ̰졢줾 1, 0 ɾ롣ϥޥǤϤʤ keyword Ǥ뤬ץץǤ boolean literal Ȥư뤳ȤˤʤäƤ롣

+
+*2 C90 6.3 Expressions 
+   C90 6.4 Constant expressions 
+   C99 6.5 Expressions
+   C99 6.6 Constant expressions
+
+ +

n.13.1. <<, >>

+

ӥåȥեȱ黻ϾʤȤ˴ؤƤϡݤϲ⤢ޤ

+

: 2 +

+ +

n.13.2. ^, |, &

+

ϤηϰϤˤޤäƤ¤ꡢƱͤΥӥåȥѥ CPU ϤΤˤ餺ƱʤΤǡ^, |, & Ȥ츫 CPU λͤ˰¸ʱ黻⡢ϰϤǤϤɤνϤǤޤäƱ̤ˤʤޤ

+

: 2

+ +

n.13.3. ||, &&

+

ǤʤϤϤʤǤ礦 +

+

: 4 +

+ +

n.13.4. ? :

+

ǤʤϤϤʤǤ礦ʤȻפ줿ºݤˤϤʤʤˡ +

+

: 2 +

+ +

n.13.5. <<, >> Ǥ̾λѴϹԤʤ

+

¿Σ黻ҤǤξդη򤽤뤿 usual arithmetic conversion ̾λѴˤԤޤK&R 1st. Ǥϥեȱ黻ҤǤ⤳줬Ԥ뤳ȤˤʤäƤޤStandard C ǤϹԤʤȤˤʤޤդͤϾ˾Ǥ뤳ȡʳɽǤϡѴ줿ΤǤϥӥåȥѥѤäƤޤäƤΤ狼ʤʤäƤޤȤͤȡʵǤ礦*1

+

: 2

+

+:

+
+*1 C90 6.3.7 Bitwise shift operators ӥåñ̤Υեȱ黻 -- Semantics ̣§
+   C99 6.5.7 Bitwise shift operators -- Semantics
+
+¿Σ黻Ҥ˴ؤƤϡξդѷǤСФ̾λѴԤפȤ񤤤Ƥ뤬<<, >> ˴ؤƤϤεܤʤC89 Rationale 3.3.7 (C99 Rationale 6.5.7) ˤˤĤƤβ⤬롣

+ +

n.13.6. ̾λѴˤؤѴ

+

黻 *, /, %, +, -, <, >, <=, >=, ==, !=, &, ^, |, ˴ؤƤϡξդη򤽤뤿ᡢξդ operand Ф̾λѴԤޤ黻 ? : 裲裳 operand ˤĤƤƱͤǤäơʤǤȡ¾ʤѴ졢ˤʤäƤޤޤ
+ʤ̤Ǥ̾λѴˡ operand int ûǤäϤФ integer promotion ĥˤԤޤ#if ǤϤ٤Ƥ operand ƱηȤưΤǡintegral promotion ȯޤ

+

: 6ĤΥƥȤ򣱤Ǥ뤴Ȥ 2
+ɾ§ K&R 1st. ǤƱʤΤǤ뤬Υץ 0U Ȥȡ U ҤȤäƤΤǡK&R 1st. νϤǤϽǤʤ

+ +

n.13.7. ||, &&, ? : ǤɾǤڤ

+

||, && 黻ҤǤɾޤäƤꡢդɾǷ̤ꤹбդɾޤ? : Ǥ operand ɾ̤ˤä軰Τɤ餫ɾ졢¾ɾޤ*1
+äơɾʤˤϤȤ 0 ˤäƤ⥨顼ˤϤʤޤ

+

: 6ĤΥץΤԤĤ뤴Ȥ 2 İʲʤΤ 0 ְäǥåФΤ 2

+

:

+

*1 ? : 黻ҤǤϤ operand 軰 operand Ȥδ֤̾λѴϹԤ뤳ȤˤʤäƤ롣ɾʤΤѴȤ̯ʤȤǤ롣Ȥ #if ǻȤȡͤɾʤȷޤʤΤǡʤȸäƤդ̵Ǥ뤬ˤȽꤹ뤿ˤϡͤɾ򤨤ʤ0 ˤϤƤϤʤΤǤ롣äʤȤǤ롣

+ +

n.13.8. ñ黻 -, +, !, ~ Υ롼ײ

+

n.13.8 n.13.12 ޤǤ #if Υ롼ײΥƥȤǤϱ黻Ҥ̤ͥȷ絬§˽äƥ롼ײޤ̤Ǥ̤ͥ˹ʸǷޤʬޤ#if ϥ롼ԥ󥰤 (, ) ʳˤϹʸȤʤȤϤޤn.13.8. n.13.10 ޤǤϷ絬§ΥƥȤǡn.13.8. ñ黻 -, +, !, ~ η絬§ΥƥȤǤñ黻ҤϤⱦ麸ط礵ޤ

+

: 2

+ +

n.13.9. ? : Υ롼ײ

+

黻 ? : ϱ麸ط礵ޤ

+

: 2 +

+ +

n.13.10. <<, >> Υ롼ײ

+

黻ҤϤ⺸鱦ط礵ޤn.13.10. Ǥ <<, >> ΥƥȤ򤷤ޤ

+

: 2 +

+ +

n.13.11. ̤ͥΰۤʤ黻ҤΥ롼ײΣ

+

ñ黻 -, +, ! ȣ黻 *, /, >> Ȥ̤ͥ絬§ۤʤ黻Ҥδޤޤ뼰ΥƥȤ򤷤ޤ

+

: 2

+ +

n.13.12. ̤ͥΰۤʤ黻ҤΥ롼ײΣ

+

ñ黻 -, +, ~, ! ȣ黻 -, *, %, >>, &, | ^, ==, !=ˣ黻 ? : ޤवʣʼΥ롼ײΥƥȤ򤷤ޤ

+

: 2

+ +

n.13.13. 黻ҤŸޥ

+

#if ˤϥޥޤळȤǤޤ +Υޥ̾ŸΤǤˤĤƤ n.10.1, n.12.1, n_12.2, n.13.7 ΥƥȤ˴ޤޤƤΤǡǤϤ餿ƥƥȤޤ
+黻ҤŸޥȤΤϿҾʤΤǤϤޤ󤬡Ϥ긶§ȤƱ黻ҤȤư٤Ǥ礦ISO C 1990 / Amendment 1 Ǥ <iso646.h> ȤɸإåꤵޤϤĤα黻ҤޥΤǤ (*1)&, |, !, ^, ~ ȤäʸȤʤƤ⥽񤯤ȤǤ褦ˡȤݤΤ褦Ǥץץ #if ǤϤΥޥŸʤ顢黻ҤȤưȤޤ
+¾ #if Υޥ defined Ÿ undefined Ȥ꤬ޤdefined identifier ʶ路Τ̰ˤʤäΤǤ礦u.1.19 ȡˡ

+

: 4

+

:

+

*1 C++ Standard Ǥϡʤ identifier ͱ黻ҤϥޥǤϤʤ token Ǥ롣

+ +

n.13.14. ĤΥȡŸޥ

+

ĤΥȡŸޥޤ #if ҾʤΤǤϤޤ󤬡ϤϤꤽΥޥȤŸ˾ɾ٤Ǥ礦

+

: 2

+ +

3.4.14. #if Υ顼

+

e.14.1 e.14.10 ޤǤ #if Ǥ violation of syntax rule violation of constraint ΥƥȤǤϤϤΤɤ줫Ĥޤह٤ƤΥФơǥåФɬפޤ*1

+

:

+
+*1 C90 6.8.1 Conditional inclusion դ
+   C90 6.4 Constant expressions 
+   C99 6.10.1 Conditional inclusion
+   C99 6.6 Constant expressions
+
+ +

e.14.1. ʸƥ

+

#if Ǥꡢݥ󥿤ϻȤʤΤǡʸƥϻȤޤ

+

: 2

+ +

e.14.2. 黻 =, ++, --, .

+

#if ǤΤǡѤı黻ҤѿϻȤޤ +A --B A - -B Ȥϰä violation of constraint Ǥ

+

: 4ĤΥץΤǤǤʤΤУĤ 2 İʾ夢 0

+ +

e.14.3. 뤷ʤ

+

黻Ҥ operand ʤäꡢäбȤʤäꤹΤϡ violation of syntax rule Ǥ

+

: 2

+ +

e.14.4. #if defined Υå

+

#if Ԥ defined Ȥ黻Ҥΰ (, ) ǰϤǤϤޤʤƤ⤫ޤޤ󤬡åΤ violation of constraint Ǥ

+

: 2

+ +

e.14.5. ʤ

+

#if ǼʤΤϤ violation of syntax rule Ǥ

+

: 2 +

+ +

e.14.6. ޥŸȼʤʤ

+

ޥȤƤʤ identifier 0 ɾޤޥŸȲʤʤäƤޤ #if ԤΰϤ violation of syntax rule Ǥ

+

: 2

+ +

e.14.7. Keyword ǧʤsizeof

+

sizeof Ȥ pp-token ϥץץǤñʤ identifier Ȥư졢#if ǤϡޥȤƤʤ 0 ɾޤint Ȥ pp-token ƱͤǤäơsizeof (int) 0 (0) Ȥʤꡢviolation of syntax rule Ȥʤޤ

+

: 2

+ +

e.14.8. Keyword ǧʤ̾

+

e.14.7 Ʊͤˡ(int)0x8000 (0)0x8000 ȤʤꡢϤ violation of syntax rule Ȥʤޤ

+

: 2 +

+ +

e.14.9. 0 ˤ

+

e.14.9 ȼ e.14.10 ˤĤƤϡǥåФ٤ɤĤβ;Ϥꡢ꤬ޤǤʽˤϼΤ褦ʵ꤬ޤ

+
    +
  • C90 6.4 Constant expressions -- Constraint
    +
  • C99 6.6 Constant expressions -- Constraint
    +Each constant expression shall evaluate to a constant that is in the range of representable values for its type.
    +ɾ̤ϡηɽǽͤϰˤǤʤФʤʤ
    +
+

εŬϰϤ餫ǤϤޤ󤬡ʤȤɬפʤȤˤŬѤ뤳ȤϼǤ#if ϤǤʤФʤޤ󡣤¾ǼΤ褦ʵ⤢ޤ

+
    +
  • C90 6.3.5 Multiplicative operators 黻 -- Semantics ̣§
    +
  • C99 6.5.5 Multiplicative operators -- Semantics
    +if the value of the second operand is zero, the behavior is undefined.
    +2ڥɤͤ0ξ硢ư̤Ȥ롣
    +
    +
  • C90 6.1.2.5 Types
    +
  • C99 6.2.5 Types
    +A computation involving unsigned operands can never overflow,
    +̵ڥɤޤ׻ϡ褷ƥСեʤ
    +
+

0 ˤʤ黻ǤϡɤεŬѤ٤Ǥ礦 ɤβ⤢ꤦ褦˻פޤ

+

ǤϤ᤹뤳Ȥˤޤ

+
׵ᤵȤǤ 0 ˤޤơηϰϤˤޤʤ̤Ȥʤϸ§ȤƿǥåФʤФʤʤ
+

Ǥ̤ˤʤȤΤϥץδְ㤤ͤ줺ϼ¹ԻǤϤʤѥɾΤʤΤǡ˿ǥåФΤȻפ뤫Ǥޤ0 ˤ㳰ΤԼǤ̵黻η̤ϰϳȤʤˤĤƤϵΤޤŤˤʤΤǡˤϴޤ᤺undefined Ȳ᤹뤳Ȥˤޤ

+

ISO 9899:1990 / Corrigendum 1 ǤϡViolation of syntax rule or constraint СȤ¾ΤȤ undefined or implementation-defined Ū˵ꤵƤƤ⡢ϤϿǥåФʤФʤʤפȤ꤬ɲäޤ C99 ˤѤƤޤ*1

+

: 2

+

:

+
+*1 C99 5.1.1.3 Diagnostics
+
+ +

e.14.10. 黻η̤ɽǤϰϤˤʤ

+

C90 Ǥϡ#if ͤ long / unsigned long ɽǤϰϤˤʤФʤޤ

+

: 4 +ĤΥƥȤ򤹤٤ǤǤ 4 ĤǤǤ 2 İʲǤǤʤ 0

+ +

3.4.15. #ifdef, #ifndef

+

n.15 #ifdef, #ifndef ˴ؤƥȤǤ K&R 1st. Ǥ Standard C ǤޤäƱǤe.15 Ϥ violation of syntax rule ΥƥȤǤ*1

+

:

+
+*1 C90 6.8 Preprocessing directives  -- Syntax ʸ§
+   C90 6.8.1 Conditional inclusion դ
+   C99 6.10 Preprocessing directives -- Syntax
+   C99 6.10.1 Conditional inclusion
+
+ +

n.15.1. #ifdef ˤޥΥƥ

+

: 6

+ +

n.15.2. #ifndef ˤޥΥƥ

+

: 6

+ +

e.15.3. ̻ҤǤʤ

+

#ifdef, #ifndef Ԥΰ identifier ǤʤФʤޤ

+

: 2

+ +

e.15.4. ;פʰ

+

#ifdef, #ifndef Ԥΰ identifier ʳ;פʥȡ󤬤äƤϤޤ

+

: 2

+ +

e.15.5. ʤ

+

ʤΤ⡢ violation of syntax rule Ǥ

+

: 2

+ +

3.4.16. #else, #endif Υ顼

+

#else, #endif violation of syntax rule ΥƥȤǤ + syntax K&R 1st. ѤäƤޤʤviolation of syntax rule or constraint ФƿǥåФʤФʤʤȤΤϡC90 ǽƵꤵ줿ȤǤˡ*1

+

:

+
+*1 C90 6.8 Preprocessing directives  -- Syntax ʸ§
+   C99 6.10 Preprocessing directives -- Syntax
+
+ +

e.16.1. #else ;פʥȡ󤬤

+

#else ιԤˤ¾Τɤʥȡ⤢äƤϤޤ

+

: 2

+ +

e.16.2. #endif ;פʥȡ󤬤

+

#endif ιԤˤ¾Τɤʥȡ󤬤äƤ⤤ޤ

+
+#if     MACRO
+#else   ! MACRO
+#endif  MACRO
+
+

ǤϤʤ

+
+#if     MACRO
+#else   /* ! MACRO  */
+#endif  /* MACRO    */
+
+

Ƚ񤭤ޤ礦

+

: 2

+ +

3.4.17. #if, #elif, #else, #endif бطΥ顼

+

#if (#ifdef, #ifndef), #elif, #else, #endif б˴ؤ violation of syntax rule ΥƥȤǤ syntax ۤ K&R 1st. ƱǤ#elif C90 ǿä줿ΤǤޤбϥեñ̤ΩäƤʤФʤʤȤϡK&R 1st. ǤΤǤϤʤäȤǤ*1

+

:

+
+*1 C90 6.8 Preprocessing directives  -- Syntax ʸ§
+   C99 6.10 Preprocessing directives -- Syntax
+
+ +

e.17.1. #if Τʤ #endif

+

Ԥ #if ʤΤ #endif ФƤΤϡ violation of syntax rule Ǥ

+

: 2

+ +

e.17.2. #if Τʤ #else

+

б #if Τʤ #else ְ㤤Ǥ

+

: 2

+ +

e.17.3. #else θˤޤ #else

+

#else θˤޤ #else ФƤΤ⡢󤤤ޤ

+

: 2

+ +

e.17.4. #else θ #elif

+

#else θ #elif ФƤƤ⤤ޤ

+

: 2

+ +

e.17.5. 󥯥롼ɤ줿ե #if Τʤ #endif

+

#if, #else, #endif ϥեpreprocessing fileñ̤бȤƤʤФʤޤ󡣥󥯥롼ɤ줿ե뤬ᤫ鸵եˤäΤ褦˰ȽбȤ롢ȤΤǤϥǤ

+

: 2

+ +

e.17.6. 󥯥롼ɤ줿ե #endif Τʤ #if

+

: 2

+ +

e.17.7. #endif Τʤ #if

+

#endif ˺뤳Ȥϼºݤˤ褯ޤϤϤФƿǥåФʤФʤޤ

+

: 2

+ +

3.4.18. #define

+

#define syntax K&R 1st. Ф C90 Ǥ #, ## 黻ҤɲäޤȤѤäƤޤ*1
+C99 ǤϤ˲Ѱޥɲäޤ2.8 ȡˡ*2

+

:

+
+*1 C90 6.8 Preprocessing directives  -- Syntax ʸ§
+   C90 6.8.3 Macro replacement ޥִ
+
+*2 C99 6.10 Preprocessing directives -- Syntax
+   C99 6.10.3 Macro replacement
+
+ +

n.18.1. Object-like ޥ

+

#define ԤκǽΥȡϥޥ̾Ǥľ white spaces ȡ裲Υȡ ( ǤäƤ⡢ִꥹȤγϤȤߤʤ졢function-like ޥȤϤߤʤޤ󡣤ޤޥ̾θ˲ȡ󤬤ʤСΥޥϣĤΥȡޤ

+

: 30ĤΥޥΤΣĤǤʤ 10

+ +

n.18.2. Function-like ޥ

+

ޥ̾ľ white spaces Ϥޤ ( ȡ function-like ޥΥѥ᡼ꥹȤγϤȤߤʤޤε K&R 1st. ΤΤǡwhite spaces ̵ͭ˺ character-oriented ʥץץκפĤäƤޤޤȤʤäƤϤɤ褦⤢ޤ

+

: 20

+ +

n.18.3. ʸƥִоݤˤʤʤ

+

"Reiser" model ΥץץåǤϡִꥹʸƥޤʸ˥ѥ᡼ƱʬȡʬޥŸˤäư֤ޤ Standard C ϤK&R 1st. ǤǧƤʤäΤǤִ character-oriented ʥץץħ褯ͤǤtoken-oriented ʥץץǤǤ

+

: 10

+ +

n.vargs. Ѹİޥ

+

C99 ǤϲѸİޥƳޤ

+

: 10 +

+ +

e.18.4. ̾ʤ

+

#define ԤκǽΥȡϤ identifier ǤʤФʤޤ

+

: 2 +

+ +

e.18.5. ʤ

+

#define Ԥ˥ȡ󤬣ĤʤΤ violation of syntax rule Ǥ

+

: 2 +

+ +

e.18.6. Υѥ᡼

+

Υѥ᡼ violation of syntax rule Ǥ*1

+

: 2

+

:

+
+*1 C90 6.5.4 Declarators  -- Syntax ʸ§
+   C99 6.7.5 Declarators -- Syntax
+
+ +

e.18.7. ѥ᡼̾νʣ

+

ĤΥޥΥѥ᡼ꥹȤƱѥ᡼̾ʣΤ violation of constraint Ǥ*1

+

: 2

+

:

+
+*1 C90 6.8.3 Macro replacement ޥִ -- Constraints 
+   C99 6.10.3 Macro replacement -- Constraints
+
+ +

e.18.8. ѥ᡼̻ҤǤϤʤ

+

ޥΥѥ᡼ identifier ǤʤФʤޤ *1

+

: 2

+

:

+

*1 C99 Ǥ ... Ȥѥ᡼ɲä줿ִꥹ __VA_ARGS__ Ϥбüʥѥ᡼̾Ǥ롣

+ +

e.18.9. ޥִ̾ꥹȤüȤ߹碌

+

Standard C Ǥ identifier ʸȤ $ ǧƤޤ󤬡ǧϤŪ¸ߤƤޤΥץϤϤǥѥ뤵륽˸ΤΤǤ Standard C Ǥ $ ʸǣĤ pp-token ȲᤵΤǡޥ̾ THIS $ ʹߤ object-like ޥִꥹȤȤʤꡢTHIS$AND$THAT Ȥ̾ function-like ޥȤץΰտޤȤϤޤää̤ˤʤޤ
+ISO 9899:1990 Corrigendum 1 Ǥϡ˴ؤ㳰Ū꤬ɲäޤФƤ Standard C νϤϿǥåФʤФʤʤΤǤ*1
+C99 ǤϤäơ̤ object-like macro Ǥϡޥִ̾ꥹȤδ֤ white spaces ʤФʤʤȤޤ*2

+

: 2

+

:

+

*1 Corrigendum 1 ˤ C90 6.8 Constraints ؤɲá
+C++ Standard ǤϤεϾäƤ롣

+
+*2 C99 6.10.3 Macro replacement -- Constraints
+
+ +

e.vargs1. ִꥹȤǤϤʤȤ __VA_ARGS__

+

C99 βѰޥǤϡޥΥѥ᡼ꥹ ... бѥ᡼ȤִꥹǤ __VA_ARGS__ Ȥޤ identifier ϤʳΤȤ˻ȤäƤϤޤ

+

: 2ĤΥץǤǤ 2 ĤǤ 0

+ +

3.4.19. ޥκ

+

ޥκˤĤƤ K&R 1st. Ǥϲ⿨Ƥ餺ޤޤǤStandard C ǤϡƱϵ뤬ۤʤǧʤȤˤʤޤޥϻ¾塢ʤȤˤʤޤ#undef Ǥääʤ¤ˡ*1, *2

+

:

+
+*1 C90 6.8.3 Macro replacement ޥִ -- Constraints 
+   C99 6.10.3 Macro replacement -- Constraints
+
+

*2 ˥󥰤ФǺǧϤ¿mcpp ¸νϤȤθߴΤᡢV.2.4 Ϥ

+ +

n.19.1. ִꥹȤ white spaces ΰ㤤

+

White spaces οäƤϵޤ

+

:4

+ +

n.19.2. ѥ᡼ꥹ white spaces ΰ㤤ȹԤޤ white spaces ΰ㤤

+

White spaces ˤϡ<backslash><newline> sequence 䥳ȤˤäƥԤޤΤޤޤޤ

+

: 4

+ +

e.19.3. ִꥹȤΥȡ󤬰㤦

+

ִꥹȤΥȡ󤬰ۤʤ violation of constraint Ǥ

+

: 4

+ +

e.19.4. ִꥹ white space ̵ͭ㤦

+

ִꥹ white space ̵ͭۤʤ violation of constraint Ǥˤ character-oriented ʥץץοĤäƤޤ

+

: 4

+ +

e.19.5. ѥ᡼λȤ㤦

+

ѥ᡼λȤΰ㤦ϼ¼ŪˤۤʤʤΤǡviolation of constraint Ǥ

+

: 4

+ +

e.19.6. ѥ᡼̾㤦

+

ѥ᡼̾㤦μ¼ŪƱ violation of constraint Ȥʤޤ constraint Ȼפޤ

+

: 2

+ +

e.19.7. Function-like, object-like ޥ̾ζ

+

ޥ̾ϰĤ֤̾°Τǡfunction-like ޥ object-like ޥȤƱ̾ȤȤϤǤޤ

+

: 2

+ +

3.4.20. Keyword Ʊ̾Υޥ

+

ץץǤ keyword ¸ߤʤΤǡkeyword Ʊ̾ identifier ޥȤŸ뤳ȤǤޤ*1

+

:

+
+*1 C90 6.1 Lexical elements  -- Syntax ʸ§
+   C99 6.4 Lexical elements -- Syntax
+   C89 Rationale 3.8.3 (C99 Rationale 6.10.3) Macro replacement
+
+ +

n.20.1. ̾Ϥ٤ŸоݤȤʤ

+

: 6

+ +

3.4.21. Pp-token ʬΥפޥŸ

+

ե pp-token ؤʬ translation phase 3 ǹԤޤ +ơΤȤʣ pp-token Ĥ pp-token Ϣ뤵ȤΤϡ## 黻ҤȤä줿ޥŸϢ뤵硢# 黻ҤȤä줿ޥŸʸ󲽤硢ܤʸƥ뤬Ϣ뤵礷ꤵƤޤ󡣤äơʣ pp-token ۤΤϢ뤵뤳ȤϡäƤϤʤʤȤȲᤵޤ token-oriented ʥץץθ§餹ȡΤȤǤ*1

+

:

+
+*1 C90 5.1.1.2 Translation phases ե
+   C90 6.8.3 Macro replacement ޥִ
+   C99 5.1.1.2 Translation phases
+   C99 6.10.3 Macro replacement
+
+ +

n.21.1. Pp-token ۤΤϢ뤵뤳ȤϤʤ

+

ץץΩץǹԤϡΥץνϤΣĤ - Ĥ̡ pp-token Ǥ뤳ȤѥΤˤ狼褦ˡ򲿤餫 token separator ʬΥϤɬפޤ

+

: 4

+ +

n.21.2. ޥΥޥʬΥ

+

ޥΰ˥ޥä⡢Ÿִ̤ꥹ pp-token ȤäĤƤޤäƤϤޤ

+

: 2

+ +

3.4.22. Pp-number Υޥ sequence

+

Preprocessing-number Standard C ǽƵꤵ줿ΤǤ +ȡưȡ碌ΤϰϤidentifier ʬޤळȤ⤢ޤץץǤ tokenization ñˤ뤿˵ꤵ줿ΤǤޥʬ pp-number 硢ñ tokenization 򤽤̤ˤʤȡְ㤤ޤ*1

+

:

+
+*1 C90 6.1.8 Preprocessing numbers 
+   C99 6.4.8 Preprocessing numbers
+
+ +

n.22.1. Pp-number Υޥ sequenceΣ

+

12E+EXP Ȥ sequence ϣĤ pp-number ʤΤǡȤ EXP ȤޥƤƤ⡢Ÿ뤳ȤϤޤ

+

: 4

+ +

n.22.2. Pp-number Υޥ sequenceΣ

+

Pp-number digit ޤ . ǻϤޤޤ +

+

: 2

+ +

n.22.3. Pp-number γΥޥŸ

+

C90 Ǥϡ+ ޤ - E ޤ e ˤ³ pp-number ˸뤳ȤǤޤ12+EXP 12E+EXP Ȱ㤤12 + EXP ȤĤ pp-token ʬ򤵤ޤϤ줾 pp-number, operator, identifier ǤEXP ޥǤСŸޤ

+

: 2

+ +

n.ppnum [Pp][+-] sequence

+

C99 Ǥϡư򣱣ʤɽ뤿ˡpp-number P ޤ p + ޤ - ³ sequence ɲäޤ
+ʤprintf() ư򣱣ʤɽˤ %a, %A Ȥ conversion specifier Ȥޤ*1

+

: 4

+

:

+
+*1 C99 7.19.6.1 The fprintf function -- Description
+
+ +

3.4.23. ## 黻ҤȤäޥ

+

## C90 ǿ줿黻Ҥǡ#define ԤִꥹǤȤޤ## pp-token ϥޥŸϢ뤵ƣĤ pp-token Ȥʤޤ## pp-token ѥ᡼ξϡޥŸ˼°֤ƤϢ뤵ޤ*1

+

:

+
+*1 C90 6.8.3.3 The ## operator ##黻
+   C99 6.10.3.3 The ## operator
+
+ +

n.23.1. ȡϢ

+

## 黻ҤȤäǤñ function-like ޥǤ

+

: 6

+ +

n.23.2. Pp-number

+

## 黻Ҥ operand ϥޥŸʤΤǡ xglue() Τ褦ˤ⤦Ĥΰ츫̣ʤʥޥ򤫤֤ƻȤȤФйԤޤϰΥޥŸƤϢ뤹뤿ǤΥץΥޥƤӽФ줿 12e+2 Ȥ sequence ͭ pp-number Ǥ

+

: 2

+ +

e.23.3. ## ˥ȡ󤬤ʤobject-like ޥ

+

ִꥹ ## 黻Ҥˤɬ pp-token ʤФʤޤ󡣤 object-like ޥǤObject-like ޥ ## ȤȤ̵̣ǤǤϥ顼ǤϤޤ

+

: 2

+ +

e.23.4. ## ˥ȡ󤬤ʤfunction-like ޥ

+

function-like ޥִꥹ ## 黻Ҥ pp-token ΤʤǤ

+

: 2

+ +

3.4.24. # 黻ҤȤäޥ

+

# 黻Ҥ C90 Ƴ줿ΤǤFunction-like ޥ #define ԤִꥹȤǤȤޤ# 黻Ҥ operand ϥѥ᡼ǡΥޥŸб°ʸƥѴޤ*1

+

:

+
+*1 C90 6.8.3.2 The # operator #黻
+   C99 6.10.3.2 The # operator
+
+ +

n.24.1. ʸ

+

# 黻Ҥ operand бξü " " ǰϤޤʸ󲽤ޤ

+

: 6"a + b" ȥȡ֤ space Τ 2

+ +

n.24.2. ȡ֤ white spaces ΰ

+

# 黻Ҥ operand бʣ pp-token sequence ΩäƤϡ pp-token ֤ white spaces a space ѴƤʸ󲽤졢white spaces ʤ space ޤ󡣤ʤwhite spaces οˤϱƶʤΤΡ̵ͭˤäƷ̤äƤޤʤ character-oriented ʥץץοĤäƤˡ white spaces Ϻޤ

+

: 4

+ +

n.24.3. \

+

# 黻Ҥ operand бʸƥޤʸϡˤ \, " ʸƥϤ " ʸľ \ ޤʸƥʸ򤽤Τޤޤηɽ뤿ʸƥˡƱǤ

+

: 6

+ +

n.24.4. <backslash><newline> ޤޥƤӽФ

+

<backslash><newline> sequence translation phase 2 Ǻޤ顢ޥŸˤϻĤäƤޤ

+

: 2

+ +

n.24.5. ޥŸη̤ token separator Ĥʤ

+

̤˥ޥŸǤϤη̤ pp-token ȤäĤƤޤʤ褦˲餫 token-separator 뤳ȤԤޤ3.4.21 ȡˡޥŸη̤ʸ󲽤ϡϺʤФʤޤ
+ʤ token-based ʽ§Ȥʤ character-oriented ʬäƤ뤿ˡ䤳꤬ȯޤ

+

: 2

+ +

e.24.6. # 黻Ҥ operand ѥ᡼̾Ǥʤ

+

# 黻Ҥ operand ϥѥ᡼̾ǤʤФʤޤ

+

: 2

+ +

3.4.25. ޥΥޥŸ

+

Function-like ޥθƤӽФ˺ݤơ˥ޥޤޤƤˤ򤤤Ÿ뤫ˤĤƤϡK&R 1st. ǤϿƤޤǤPre-C90 νϤǤμޤޤä褦ǤִꥹȤκŸΤ¿ä⤷ޤStandard C ǤϤϡƱꤷȡѥ᡼֤ŸȵꤵޤؿƤӽФǤΰɾƱͤνǡ狼䤹ʤޤ #, ## 黻Ҥ operand Ǥѥ᡼бΤξϡ˥ޥ̾ޤޤƤƤ⡢ϥޥƤӽФȤϤߤʤ줺Ÿޤ*1

+

:

+
+*1 C90 6.8.3.1 Argument substitution °ִ
+   C99 6.10.3.1 Argument substitution
+
+ +

n.25.1. ΥޥŸ

+

ΥޥϡƱꤵ줿ȤŸ졢줫ִꥹΥѥ᡼֤ޤäơĤΰȤƱꤵ줿ΤϡȤŸʣΰΤ褦ʷˤʤäƤ⣱ĤΰǤ

+

: 4

+ +

n.25.2. ĤΥȡŸ

+

ƱͤˡŸȣĤΥȡˤʤäƤޤ⡢ˡŪʤΤǤ

+

: 2

+ +

n.25.3. ## 黻ҤȤޥǸƤӽФ

+

## 黻Ҥ operand ѥ᡼ξ硢бϥޥŸʤΤǡޥŸϤ⤦ĤΥޥͥȤɬפޤ
+Ǥϡxglue() ## 黻ҤȤäƤʤΤǡΰǤ glue( a, b) ϥޥŸ ab Ȥʤꡢxglue() ִꥹȤ glue( ab, c) Ȥʤޤ줬 abc ǽ̤Ȥʤޤ

+

: 2

+ +

n.25.4. ## 黻Ҥ operand Ÿʤ

+

glue() ľܸƤӽФƤΤǡΰ˥ޥ̾äƤŸޤ

+

: 6

+ +

n.25.5. # 黻Ҥ operand Ÿʤ

+

# 黻Ҥ operand Ǥѥ᡼б⡢ޥŸޤ

+

: 4

+ +

e.25.6. ΥޥŸϰϤǴ뤷ʤ

+

ΥޥŸϤΰǹԤޤ뤷ʤޥ violation of constraint ǤFunction-like ޥ̾ϤǤϥޥƤӽФǤϤޤ󤬡 ( ³ȡ줬ޥƤӽФ sequence γϤȤʤޤϤ줿Ǹ塢 ( б ) ʤФʤޤ*1

+

: 4

+

:

+
+*1 C90 6.8.3 Macro replacement ޥִ -- Constraint 
+   C99 6.10.3 Macro replacement -- Constraints
+
+ +

3.4.26. ޥƱ̾ޥ

+

ޥƵŪˤʤäƤ硢Υޥ򤽤ΤޤŸƤ椯̵ºƵˤʤäƤޤޤΤᡢK&R 1st. ǤϺƵŪʥޥȤȤǤޤǤStandard C Ǥ̵ºƵɤʤƵŪޥŸǽˤ뤿ᡢִޥ̾ϺִʤȤ꤬ߤޤεϤʤǤΤ褦˥ѥե졼Ǥޤ*1

+
    +
  1. ޥ A ִꥹȤκˤޤ A Ȥ̾ĤäƤ⡢Ϻִʤ
    +
  2. ޥ A ִꥹ˥ޥ B θƤӽФꡢޥ B ִ A Ȥ̾ФƤͥȤ줿ִξ⡢ A Ϻִʤ
    +
  3. ޥ B ִǸΥޥ A ִꥹȤθΥȡ󤬼ޤ줿ϡμޤ줿ʬˤ A ִ롣ִΤϡ A ʲ餫ΥޥִꥹǤϤʤ˥ˤ˸¤롣
    +
  4. ޥ B ִˤĤƤ⡢飳ƵŪŬѤ롣ʤޥ B ִˤޤ B 졢줬 B ִꥹȤθΥΥȡˤΤǤʤС B Ϻִʤ
    +
  5. Υޥ A θƤӽФΰ˥ޥ C θƤӽФꡢִ˸줿 C 飳ŬѤƺִػߤ줿硢 C ϸΥޥ A ִꥹȤκǤִʤ
    +
+

ѥե졼ƤޤǤȤˣϡ³ΥȡμߤȤŪʥޥͤͳ褹Τǡ줬̵ѤѻˤƤޤˤĤƤϵʤ corrigendum ФꤷƤƤޤ󤬤餬Ǥޤ³ȡ󤬥ˤȤǤʤȤŸˡѤȤΤ⡢ΤʤͤǤ*2

+

³ȡޥŸȤΤ۾ʤΤǤˡʬˤäִػߤ줿ޥٸȤΤŤ˰۾ʥǤ Validation Suite ǤϡŤ˰۾ʥޥˤĤƤΥƥȹܤ n.27.6 ޤ󡣡ָ³ȡμߡפȤޥŸΰ۾ʵ꤬뤳Ȥ򡢴ԤȻפޤ*3

+

:

+
+*1 C90 6.8.3.4 Rescanning and further replacement Ⱥִ
+   C99 6.10.3.4 Rescanning and further replacement
+
+

*2 2.7.6 ȡ

+

*3 ƵŪޥŸ˴ؤ뵬ʤλͤˤĤƤϡˣ̤β᤬ꡢ newsgroup comp.std.c 褬󤫹ԤƤ롣recurs.t ϤǺΣĤǤ롣recurs.t ΥȤ򻲾Ȥ줿ΥץɾоݤȤϤʤ

+

mcpp Standard ⡼ɤǤϡƵŪޥŸˤĤƤĤˡƤ롣ǥեȤǤƱ̾ޥִػߤϰϤ嵭 1-5 ΤȤ깭ȤꡢΥץ NIL(42) Ÿ롣-@compat ץꤹȺִػߤϰϤ򶹤Ȥꡢ42 Ÿ롣λͤΰ㤤ФƤΤϡ嵭 3 Ǵؿޥ A θƤӽФȾʬ B ִꥹ˸Ǥ롣ǥեȤǤϡA ̾ B ִꥹ˸줿 A κִػߤ뤬-@compat ץǤϡA ̾ǤʤꥹȤȤϤ '(' ')' Τ٤Ƥ B ִꥹ˸줿ִػߤ롣ޤA ̾ˤ뤫ɤǶ̤ʤ

+ +

n.26.1. ľܺƵ object-like ޥϺŸʤ

+

object-like ޥľܺƵǤ

+

: 2

+ +

n.26.2. ܺƵ object-like ޥŸʤ

+

Object-like ޥδܺƵǤ

+

: 2

+ +

n.26.3. ľܺƵ function-like ޥŸʤ

+

Function-like ޥľܺƵǤ

+

: 2

+ +

n.26.4. ܺƵ function-like ޥŸʤ

+

Function-like ޥδܺƵǤ

+

: 2

+ +

n.26.5. κƵŪޥ

+

Standard C ˤϡְٺִػߤ줿ޥϡ̤ʸ̮ǺƤִʤפȤ̣ʵ꤬ޤŪˤ˳ΤϰΥޥοƥޥΰǤ˺ƵŪޥäϡ٤ִޤ󤬡ϿƥޥκǤִޤ

+

: 2

+ +

3.4.27. ޥκ

+

ޥִꥹȤΤ K&R 1st. λͤǤȯ줿ޥϺƵŪޥǤʤ¤ꡢִޤˤäơͥȤ줿ޥޤStandard C Ǥäѹä櫓ǤϤޤ󤬡K&R 1st. ǤΤǤʤäȤ餫ΤˤʤäƤޤ*1

+

:

+
+*1 C90 6.8.3.4 Rescanning and further replacement Ⱥִ
+   C99 6.10.3.4 Rescanning and further replacement
+
+ +

n.27.1. Object-like ޥΥͥ

+

K&R 1st. ǤƱǤ

+

: 6

+ +

n.27.2. Function-like ޥΥͥ

+

K&R 1st. ǤƱǤ

+

: 4

+ +

n.27.3. ## 黻Ҥ줿̾ŸоݤȤʤ

+

## 黻Ҥ operand бϥޥŸޤ󤬡pp-token Ϣˤä줿 pp-token ϡ˥ޥŸоݤȤʤޤ

+

: 2

+ +

n.27.4. ִꥹ˷줿 function-like ޥ

+

Function-like ޥ̾ФƤƤ⡢ ( ³ƤʤϡϥޥƤӽФȤϤߤʤޤ󡣰 function-like ޥ̾졢ִꥹˤ̾Ȥä function-like ޥθƤӽФȡŸޤ

+

: 4

+ +

n.27.5. Function-like ޥȾִꥹ

+

ִꥹȤ function-like ޥθƤӽФȾȤ۾ʥޥϡpre-Standard ǤϰۤλͤǤStandard C ǤϸǧƤޤޤִꥹȤθ pp-token 󤬼ޤơޥƤӽФ뤷ޤ

+

: 2

+ +

n.27.6. ִƱ̾ޥ

+

Ǥϰ̤Ʊ̾ΥޥϺִޤ󤬡ִ⤢ޤͥȤ줿ޥƤӽФǺִꥹȤθΥ pp-token ߡƱ̾ޥȤ۾ʾǤ3.4.26 򻲾ȡˡ

+

: 2

+ +

e.27.7. ˰οʤ

+

Function-like ޥθƤӽФǤϰοѥ᡼οȰפƤʤФʤޤ󤬡ִꥹȤκȯ줿 function-like ޥǤ⡢ƱͤǤ , ǶڤΤʤΤǡȥåʥޥǤϰοľŪˤ狼ˤȤޤ

+

: 2

+ +

3.4.28. ޥ

+

C90 ǤϣĤüʥޥϤ뤳Ȥˤʤޤ*1
+ C90 / Amendment 1 Ǥϡ__STDC_VERSION__ Ȥޥɲäޤ
+__FILE__, __LINE__ ưŪѲƤ椯üʥޥǤassert() ޥǥХåѥġǤλȤƻޤ¾ɸޥϣĤ translation unit νѲޤ

+

:

+
+*1 C90 6.8.8 Predefined macro names 餫줿ޥ̾
+
+*2 C99 6.10.8 Predefined macro names
+
+ +

n.28.1. __FILE__

+

ץץΥե̾ɽʸƥޤ +#include ˤäƼޤ줿եǤϤΥե̾ˤʤΤǡƱ translation unit ǤѲޤ

+

: 4"n_28.t" ȤʸƥǤʤ n_28.t Ȥäñʤ̾ˤʤΤ 0

+ +

n.28.2. __LINE__

+

ץץΥեιֹɽޤֹϣϤޤޤֹʪԤֹǤ

+

: 4ֹ椬 0 ϤޤΤ 2

+ +

n.28.3. __DATE__

+

ץץιԤƤդɽʸƥޤ +asctime() ؿΤȤۤƱ "Mmm dd yyyy" ηǤ 10 ̤ξ dd Σܤ 0 ǤϤʤ space ˤʤȤäƤޤ

+

: 410 ̤ξ dd Σܤ 0 ȤʤΤ 2

+ +

n.28.4. __TIME__

+

ץץιԤƤɽʸƥޤasctime() ؿΤƱ "hh:mm:ss" ηǤ

+

: 4

+ +

n.28.5. __STDC__

+

C90, C99 νϤǤ 1 ޤ

+

: 4

+ +

n.28.6. __STDC_VERSION__

+

C90 / Amendment 1:1995 бϤǤϡ줬 199409L ޤ*1

+

: 4

+

:

+
+*1 Amendment 1 / 3.3 Version macroISO 9899:1990 / 6.8.8 ؤɲá
+
+ +

n.stdmac. C99 λޥ

+

C99 Ǥ __STDC_VERSION__ ͤ 199901L Ǥ +
__STDC_HOSTED__ Ȥޥɲäޤ +ϽϤ hosted implementation Ǥ 1 ˡǤʤ 0 ޤ

+

: 4 2

+ +

n.28.7. 󥯥롼ɤ줿ե __LINE__

+

__FILE__, __LINE__ translation unit ǤϤʤեоݤȤΤǡinclude 줿ǤϤ include ե̾ȹֹˤʤޤ

+

: 4ֹ椬 0 ϤޤΤ 2

+ +

3.4.29. #undef

+

#undef K&R 1st. Τǡ礭ѲϤޤ󡣻ꤵ줿ޥäޤޥƱ translation unit ǡ#define Ƥ #undef ǼäޤǤδ֤ͭϰϤǤ*1

+

:

+
+*1 C90 6.8.3.5 Scope of macro definitions ޥͭϰ
+   C99 6.10.3.5 Scope of macro definitions
+
+ +

n.29.1. #undef ˤޥμä

+

#undef 줿ǤϤΥޥ̾ϤϤޥǤϤޤ

+

: 10

+ +

n.29.2. Ƥʤޥ #undef

+

ޥȤƤʤ̾ #undef 뤳ȤϵƤޤ +ϤϤ򥨥顼ˤƤϤޤ

+

: 4

+ +

e.29.3. ̾ʤ

+

#undef Ԥˤ identifier ɬפǤ

+

: 2

+ +

e.29.4. ;פʥȡ󤬤

+

#undef ԤˤϣĤ identifier ʳΤΤäƤϤޤ

+

: 2

+ +

e.29.5. ʤ

+

#undef Ԥ˰ʤΤ violation of syntax rule Ǥ

+

: 2

+ +

3.4.30. ޥƤӽФ

+

ޥƤӽФ˺ݤƤϡԤñʤ white spaces ΣĤȤưޤ +äơޥƤӽФʣιԤˤޤ뤳ȤǤޤ K&R 1st. ǤΤǤϤޤǤ*1
+ؿͥޥƤӽФΰȤΤ , Ƕڤ줿ΤǤ( ) ΥڥäƤ , ϰڤΤȤϤߤʤޤ󡣤ΤȤϤǤľܤϥƥȤޤ󤬡n.25. ᡢǰۤΤ˥ƥȤƤޤޤ*.c Υץ¿ assert() ޥȤäƤΤǡ˴ؤƤϤʤʣʥƥȤ뤳Ȥˤʤޤ

+

:

+
+*1 C90 6.8.3 Macro replacement ޥִ -- Semantics ̣§
+   C99 6.10.3 Macro replacement -- Semantics
+
+ +

n.30.1. ޥƤӽФʣԤˤޤ뤳ȤǤ

+

: 6

+ +

n.nularg. ޥƤӽФΥ

+

C99 ǤϥޥƤӽФǥǧޤ +ϰβᾯȤϰۤʤޤʬΥ ',' ϾάǤޤʥѥ᡼ĤξϤξԤ̤Ǥʤˡ

+

: 6

+ +

3.4.31. ޥƤӽФΥ顼

+

ϥޥƤӽФΤĤΥ顼Ǥ

+ +

e.31.1. ¿

+

οѥ᡼οȰäƤΤ violation of constraint ǤUndefined ǤϤޤ*1

+

: 2

+

:

+
+*1 C90 6.8.3 Macro replacement ޥִ -- Constraint 
+   C99 6.10.3 Macro replacement -- Constraints
+
+ +

e.31.2. ­ʤ

+

οѥ᡼ο꾯ʤΤ violation of constraint Ǥ
+C99 Ǥϥǧޤ +ϰβᾮȤϰۤʤޤʬΥ ',' ǡƤƤϤޤ

+

: 2

+ +

e.31.3. ǥ쥯ƥֹԤǴ뤷ʤޥƤӽФ

+

̤ˤϥޥƤӽФʣιԤˤޤ뤳ȤǤޤ# ǻϤޤ preprocessing directive line ϤιԡʥȤ a space ѴιԡˤǴ뤹ΤǡˤޥƤӽФ⤽ιԤǴ뤷ƤʤФʤޤ

+

: 2

+ +

e.vargs2. Ѱޥΰʤ

+

C99 βѰޥǤ __VA_ARGS__ б°ϡʤȤ⣱ĤɬפǤ

+

: 2

+ +

3.4.32. #if ʸ

+

#if ǤʸȤȤǤޤɾϤۤȤ implementation-defined ǡݡӥƥϤޤꤢޤ32.? ǤϺǤñʣХȤʸsingle-byte character constantˤ夲ޤ*1
+ Validation Suite i_* ΥץϤ٤ơ#if ǤδʸåȤ ASCII Ǥ뤳ȤȤƤޤ

+

:

+
+*1 C90 6.1.3.4 Character constants ʸ
+   C90 6.8.1 Conditional inclusion դ -- Semantics ̣§
+   C99 6.4.4.4 Character constants
+   C99 6.10.1 Conditional inclusion -- Semantics
+
+

ʲ33, 34, 35 ΥƥȤŵƱǤ롣

+ +

n.32.1. Character octal escape sequence

+

ʸǤϣ escape sequence ȤȤǤޤ +˴ؤƤϤɤνϤǤƱǡimplementation-defined ʬϤޤ

+

: 2

+ +

n.32.2. Character hexadecimal escape sequence

+

ʸǤϣ escape sequence ȤȤǤޤ + implementation-defined ʬϤޤ󡣣 escape sequence K&R 1st. ˤϤʤäΤǤ

+

: 2

+ +

i.32.3. Single-byte character constant

+

Escape sequence ǤϤʤХȤʸñʤΤǤʸåȤˤäͤۤʤޤѥȼ¹ԻȤǴʸåȤ㤦ѥǤϡ#if ɾǤϤΤɤȤäƤ⤫ޤʤȤˤʤäƤޤ
+ޤƱʸåȤǤäƤ⡢ΰ implementation-defined ǡ⥳ѥΡtranslation phase 7ˤȥץץphase 4ˤȤǰۤʤäƤƤ⤫ޤʤȤˤʤäƤޤ
+äơ#if ʸͤ򸫤ƴʸåȤȽꤹ뤳ȤϡݾڤƤˡǤϤޤ

+

: 2

+ +

i.32.4. '\a', '\v'

+

Standard C Ǥ '\a', '\v' Ȥ escape sequence ɲäޤ

+

: 2

+ +

e.32.5. Escape sequence ͤ unsigned char ϰϳ

+

ʸΣĤ escape sequence ϣĤ single-byte character ͤɽΤʤΤǡunsigned char ϰϤˤʤФʤޤ

+

: 2

+ +

3.4.33. #if Υ磻ʸ

+

磻ʸ Standard C ǿߤ줿ΤǤ +ͤɾ single-byte character constant ˤ implementation-defined ǡХȤɾƤޤ
+磻ʸˤϳƼ encoding ޤ 4.1 ǤȤꤢޤ +Ǥ ASCII ʸб磻ʸȤꤢޤ

+ +

e.33.2. 磻ʸͤϰϳ

+

磻ʸǤ⣱ʤޤϣʤ escape sequence Ȥޤͤϥ磻ʸͤʤɽϰϤˤʤФʤޤ

+

: 2

+ +

3.4.35. #if multi-character ʸ

+

ʸˤ multi-character character constant ȤΤ⤢ޤMulti-byte character constant ʶ路ѸǤ̤γǰǡʣ character ʤʸ̣ޤ character ˤϡsingle-byte character, multi-byte character, wide character ꡢ줾б multi-character character constant ΤǤʵʽǤ character ȤѸ single-byte character ΰ̣ǻȤƤ뤬ǤϣʸؤդȤƻȤˡ
+Multi-character character constant λȤƻä˲ʤǤ줬 K&R 1st. ǧƤΤñˡcharacter constant η int int ϰϤΤǤвǤ⤫ޤʤȤȤˤʤȻפޤ

+ +

i.35.1. multi-character ʸɾ

+

Single-byte character multi-character character constant ϡK&R 1st. 餢äΤǤA.16ˡɾΥХȥ K&R 1st. Ǥ Standard C Ǥ⵬ꤵƤޤ

+

: 2

+ +

e.35.2. multi-character ʸͤϰϳ

+

ʤޤϣ escape sequence ˤ multi-character character constant ͤ̾ int ޤ unsigned int ϰϤˤʤФʤʤȹͤޤC90 Ǥ #if Ǥ int / unsigned int long / unsigned long ƱɽĤΤ褦˰Τǡlong ޤ unsigned long ϰϤˤ뤫ɤåФȹͤޤϵʤΤǤϤޤͤɾλΤΤ implementation-defined ǤΤǡϰϥå implementation-defined ǤȤǤޤ
+ˤƤ⡢Υץ long ӥåȰʲνϤǤϤɤɾƤ unsigned long ϰϤĶΤǡǥåФΤŬǤ礦
+C99 Ǥ #if ηϤνϤκȤʤޤ

+

: 2

+ +

i.35.3. Multi-character 磻ʸɾ

+

磻ʸ multi-character constant ȤΤ¸ߤޤ +ɾλϤϤŪ implementation-defined Ǥб multi-byte character multi-character constant ȹäƤɬפޤ

+

: ʤ

+ +

3.4.37. Translation limits

+

Standard C ǤϡϤȤΤǤƼ translation limits κ¤ꤵޤεϤʤˤ䤫ʤΤǤʤθ³ͤˤĤƤ줾졢򣱤İʾޤץǤ¹ԤǤʤФʤʤȤΤǤ Validation Suite Υץ򸫤Ф狼褦ˡΥץϽϤˤȤäƺǤôʤʤ褦ˡñºŪ˽񤯤ȤǤޤ translation limits ݾڤ櫓ǤϤʤȤˡդƤTranslation limits εܰ¤ˤʤȸޤΥץϥץץδط룸 translation limits ΥƥȤ򤹤ΤǤ*1, *2, *3
+ʤΥƥȥץΰϲˤޤ褦˹Ԥޤ֤ƤޤϤˤäƤϡ³νԤʤˤΥƥȤ˼Ԥ뤳ȤޤBorland C ˡ³ΥƥȤǤŪǤϤʤΤǡԤϥǥǹԤĤʤǺƥƥȤƤ

+

:

+
+*1 C90 5.2.4.1 Translation limits ³
+
+*2 C99 5.2.4.1 Translation limits
+
+

C99 Ǥϡtranslation limits ˳礵Ƥ롣 +C++ Standard ǤϤ礭4.6 ȡˡ

+ +

n.37.1. ޥΣĤΥѥ᡼

+

C90 ǤϡޥΥѥ᡼ϣĤޤǤݾڤƤޤ

+

: 2

+ +

n.37.2. ޥƤӽФΣĤΰ

+

Ʊͤ C90 ǤϡޥƤӽФΰϣĤޤǤݾڤƤޤ

+

+: 2

+ +

n.37.3. ʸμ̻̾

+

C90 ǤϡTranslation unit Ū identifierʥޥ̾⤳˴ޤޤˤƬ 31 characters ͭդǤ뤳ȤݾڤƤޤץץϤ31 ХȤ̤̾ɬפޤ*1

+

: 4

+

:

+
+*1 C90 6.1.2 Identifiers ̻ -- Implementation limits ϸ³
+
+ +

n.37.4. Ťξ

+

C90 Ǥϡ#if (#ifdef, #ifndef) section ΥͥȤϣŤޤǤݾڤƤޤ

+

: 2 +

+ +

n.37.5. Ť #include

+

C90 Ǥϡ#include ΥͥȤϣŤޤǤݾڤƤޤ

+

: 4

+ +

n.37.6. ŤΥåդ #if

+

C90 Ǥϡ (, ) ΥͥȤϣŤޤǤݾڤƤޤ + #if ˤŬѤȹͤޤ#if Ǥϰ̤μȰäƤޤݾڤɬפϤʤȤפ롣#if long / unsigned long ɾ뤳Ȥȡ¹ԻĶؤ䤤碌ɬפȤ¹Ի phase 7 ƱɾλǤʤƤ褤ȤȤ㳰ȤƵꤵƤơ¾¦̤Ǥ̰ƤʤΤǡʵˤʤäƤȤ⤢ˡ

+

: 2

+ +

n.37.7. 509 ХȤʸƥ

+

C90 ǤϡʸƥĹ 509 ХȤޤǤݾڤƤޤĹϥȡĹǤꡢchar ǿǤϤޤξü " ޤߡ\n ϣХȤȿޤ磻ʸƥǤ L Ȥ prefix ޤߤޤ

+

: 2

+ +

n.37.8. 509 ХȤ

+

C90 ǤϡԤĹ 509 ХȤޤǤݾڤƤޤ

+

: 2

+ +

n.37.9. 1024 ĤΥޥ

+

C90 Ǥϡޥ 1024 ĤޤǤݾڤƤޤtranslation limits εǤ⤳줬Ǥ⤢ޤʤΤǤΥץΤ褦˺ǤñʥޥФξȡĹʥޥ¿ޤȤǡϤɬפȤ̤Ϥޤäۤʤޤޤ1024 Ĥ˻ޥޤफɤǤ⡢ƥȥץबäƤޤºݤΥץǤϡ桼ץǥޥˡɸإå¿ΥޥޤεϤޤ礶äѤܰ¤ˤޤ󡣼ºݤθ³ϥƥ󶡤Ǥ̤ˤäƷޤǤ礦

+

: 4

+ +

n.tlimit. C99 translation limits

+

C99 Ǥ translation limits ˳礵ޤ

+

: ʲΤ줾ˤĤ 2

+ +

n.37.1.L. ޥ 127 ĤΥѥ᡼

+ +

n.37.2.L. ޥƤӽФ 127 Ĥΰ

+ +

n.37.3.L. 63 ʸμ̻̾

+ +

n.37.4.L. 63 Ťξ

+ +

n.37.5.L. 15 Ť #include

+ +

n.37.6.L. 63 ŤΥåդ #if

+ +

n.37.7.L. 4095 ХȤʸƥ

+ +

n.37.8.L. 4095 ХȤ

+ +

n.37.9.L. 4095 ĤΥޥ

+
+ +

3.5. ʬΥɥ

+

Standard C ˤ implementation-definedʽˤȸƤФʬޤ +ʬλͤϽϤˤäưۤʤޤϤϤλͤɥȤ˵ܤʤФʤʤȤƤޤ*1

+

Implementation-defined ȤΤˤϡϤΤΤΤΤۤˡCPU ϣӤˤäƷޤʬޤޤƤޤѥξ硢CPU ϣӤȼ¹ԻȤǰۤʤ⤢ޤ

+

ʲιܤϥץץ˴ؤ implementation-defined ʬˤĤơϤΥɥȤ˵ܤ뤫ɤåΤǤץץǤ顢CPU ϣӤϤΤΤǤd.1.* ϥץץͭλͤǤꡢd.2.* ϥѥΤλͤȤطΤΤǤ#if ǤμɾϡѥΤȤϻͤۤʤäƤ⤫ޤʤȤˤʤäƤޤ

+

ʲιܤΤۤˤ⡢#if ɾˤ implementation-defined ¦̤ĤޤޤʸåȤǤʴʸåȤ ASCII EBCDIC ˡޤ encodingʣ͡ˤ⤽Ǥˡ̾λѴˤäĤʤѴ줿̤⤽ǤϤޥȣϣӤǷޤΤǤΤǤΥɥȤ­ꡢϤΥɥȤˤϵܤϤʤƤ⤫ޤʤȹͤޤäơǤϤɾоݤȤޤ

+

:

+
+*1 C90 3 Definitions of Terms Ѹڤӵ
+   C99 3 Terms, definitions, and symbols
+
+ +

d.1.1. Header-name ۤˡ

+

Header-name ȤΤü pp-token Ǥ +<, > ޤ ", " ǰϤޤ줿 sequence ɤä header-name ȤĤ pp-token ˷礹Τ implementation-defined ȤʤäƤޤ ", " ǰϤޤ줿ΤʸƥȤ pp-token ȤưФΤǴñʤΤǤ<, > ǰϤޤ줿ΤϤüäƤޤ<stdio.h> translation phase 3 <, stdio, ., h, > ȤĤ pp-token ˤäʬ򤵤줿ǡphase 4 ǣĤ pp-token ˹뤳Ȥˤʤ뤫Ǥʬޥǽ񤫤Ƥϡ̯꤬ޤ*1

+

: 2ʤλͤϤΥɥȤ˵ܤƤ 2 ܤƤʤ 0
+ʤheader-name ʸʸζ̵̤ͭե̾ε§ implementation-defined Ǥ뤬ϣϣӤǷޤ뤳ȤʤΤǡϤΥɥȤˤɬ⵭ܤɬפϤʤȹͤ롣

+

:

+
+*1 C90 6.8.2 Source file inclusion ե -- Semantics ̣§
+   C99 6.10.2 Source file inclusion
+
+ +

d.1.2. #include ǥإå򤵤ˡ

+

#include Ԥ header-name Ф줿塢 header file ɤäƤΤ implementation-defined Ǥ", " ǰϤޤ줿 header-name ξϡޤ implementation-defined ˡǥե뤬졢Ĥʤä <, > ǰϤޤ줿 header-name Ʊͤ˥뤳ȤˤʤäƤޤȤθԤޤ implementation-defined ʤΤǤΤʤǤ Standard C ϣӤˤĤ֤ȤǤʤᡢɽˤʤ餶ʤΤǤ
+ǥ쥯ȥ깽¤äϣӤǤϡԤϥȥǥ쥯ȥ꤫Хѥ򡢸ԤϽϤδΥǥ쥯ȥ򥵡Ȳ򤵤ޤԤǤ include Υե뤫Хѥ򥵡Ϥ⤢ޤImplementation-defined Ǥ뤫ˤϡְ㤤Ȥϸޤ󡣤ˤĤ Rationale ϡȥǥ쥯ȥ꤫ХѥǥͤѰΰտޤǤϤ뤬ϣӤˤĤ֤ȤǤʤΤʸǤʤäƤޤ*1
+ޤԤΥϥݡȤʤƤɤ", " ǰϤޤ줿 header-name <, > ȤޤäƱ˰äƤɤˤȤƤޤԤɬեǤʤƤ褤ȤƤޤϤȤ߹ߤ header ⤢ꤦȤȤǤ*2

+

: 4ʤ header ܤɥȤ˽ʬ˵ܤƤ 4 Խʬʵܤʤ 2 ۤȤɵܤƤʤ 0

+

:

+
+*1 ANSI C Rationale 3.8.2 Source file inclusion
+
+*2 C90 6.8.2 Source file inclusion ե -- Semantics ̣§
+   C99 6.10.2 Source file inclusion
+
+ +

d.1.3. #include ΥͥȤθ

+

#include ΥͥȤɤǤ뤫 implementation-defined ǤʤȤ C90 Ǥϣ٥롢C99 Ǥ 15 ٥ݾڤʤФʤޤ*1, *2

+

: 2

+

:

+
+*1 C90 5.2.4.1 Translation limits ³
+   C99 5.2.4.1 Translation limits
+
+*2 C90 6.8.2 Source file inclusion ե -- Semantics ̣§
+   C99 6.10.2 Source file inclusion
+
+ +

d.1.4. Ƥ #pragma sub-directive

+

#pragma Ȥ preprocessing directive Ͻϸͭγĥǽꤹ뤿ѰդƤ directive ǤץץˤƤ⡢ĥǽϤ٤ #pragma sub-directive ȤƼʤФʤޤ*1

+

: 4νϤͭ #pragma sub-directive ˤĤơʥץץΥɥȤǤϾʤȤץץΤΤ٤Ƥ #pragma sub-directive ˤĤơ˥ɥȤ˽ʬʵܤ 4 Խʬʵܤʤ 2 ۤȤɵܤʤ 0 ޤ#pragma sub-directive ʳνϸͭ directive 2 򸺤ʤ0 ¡Standard C ˺Ǥᤤͤꤹ륪ץˤäƶػߤ directive ϴޤޤʤˡ

+

:

+
+*1 C90 6.8.6 Pragma directive ץ饰޻
+   C99 6.10.6 Pragma directive
+
+ +

d.pragma. #pragma ǤΥޥŸ

+

C90 Ǥϡ #pragma Ԥ pp-token ϥޥŸоݤȤʤޤǤC99 Ǥ #pragma STDC Ȥ token ³ΤϥޥŸоݤȤʤޤ󤬡ʳ #pragma sub-directive ޥŸ뤫ɤ implementation-defined Ȥʤޤ

+

: 2

+ +

d.1.5. ޥ

+

__FILE__, __LINE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__ C99 Ǥ __STDC_HOSTED__ ˰ʳλޥ implementation-defined ǤϣĤ _ ʸ³̾ޤϣĤ _ ǻϤޤ̾ǤʤФʤޤ*1

+

: 4Խʬʵܤʤ 2 ¤ȿ̾λޥ 2 򸺤ʤ0 ¡Standard C ˺Ǥᤤͤꤹ륪ץˤäƶػߤޥɾоݤȤʤˡ

+

:

+
+*1 C90 6.8.8 Predefined macro names 餫줿ޥ̾
+   C99 6.10.8 Predefined macro names
+
+ +

d.predef. C99 λޥ

+

C99 Ǥϡ__STDC_IEC_559__, __STDC_IEC_559_COMPLEX__, __STDC_ISO_10646__ ȤޥˤäƻΤȤɲäƤޤ
+__STDC_IEC_559__, __STDC_IEC_559_COMPLEX__ IEC 60559 ưʤ˹פǤϤ줾 1 ȤƤޤΣĤư黻Υ饤֥ˤäƷޤΤǡºݤˤ <fenv.h> ΤŬ⤷ޤɬץץåǻɬפϤʤȹͤޤ

+

__STDC_ISO_10646__ wchar_t ʸͤ٤ ISO/IEC 10646Unicode Ϥ Universal Character Setˤβ餫Υɲ줿Ǥϡ򤹤 ISO/IEC 10646 amendment corrigendum ޤ᤿ʤǯɽ 199712L ȤäȤƤޤ <wchar.h> 뤳Ȥͤ졢ץץåǻɬפϤʤǤ
+ɤˤƤɥȤƤ뤳ȤɬפǤ

+

: 6ĤΤ줾ˤĤƳ 2

+ +

d.1.6. Phase 3 white-spaces 򰵽̤뤫

+

Standard C Ǥ translation phase 3 tokenization Ԥޤλ <newline> ʳ white-space sequence one space ˰̤뤫ʤ implementation-defined ȤƤޤ*1
+̾ϥѥ̤ˤϱƶͿʤϤͤʤΤǡ桼ΤɬפϤʤΤǤƬȹ white-spaces ˤäƤϡƤ⤫ޤޤ

+

ǤϤε̵ѤȸȡĤ⤽櫓ǤϤʤɬפʾ礬Ĥޤ preprocessing directive Ԥ [VT], [FF] ǤˤĤƤ Standard C Ϥ狼ˤλ򤷤ƤޤǤ violation of constraint Ȥ¾ǤϾ嵭εߤƤΤǤʤphase 3 [VT], [FF] 򤽤 space, tab ȹ碌 one space ˰̤뤳ȤǤξ phase 4 ˤ [VT], [FF] ϻĤʤ̤ʤäϤ줬Ĥä violation of constraint ȤʤΤǤ
+ɥȤˤϡ [VT], [FF] ΰ񤫤Ƥнʬȹͤޤ

+

: 2

+

:

+
+*1 C90 5.1.1.2 Translation phases ե 3
+   C90 6.8 Preprocessing directive  -- Constraints 
+   C99 6.10 Preprocessing directive
+
+ +

d.ucn. ʸ󲽤 UCN \ Ťͤ뤫

+

UCN ޤ pp-token # 黻Ҥˤäʸ󲽤硢UCN \ Ťͤ뤫ɤ implementation-defined Ǥ*1

+

: 2

+

:

+
+*1 C99 6.10.3.2 The # operator
+
+ +

d.2.1. #if: Single-character character constant ɾ

+

̤ʸͤɾ implementation-defined Ǥ +ˤϤĤμޤ

+
    +
  1. ʸåȤϲ
    +
  2. ¿Хʸ磻ʸ encoding ϲ
    +
  3. ΰϤɤ
    +
  4. ʣХȤʸɾΥХȥϤɤ
    +
+

Τ 1 ϥϡɥȣϣӤǷޤΤʤΤǡǤɾоݤȤޤ 2, 3, 4 Ǥ
+ХȤ single-character ʸǤ⡢ΰ implementation-defined ǤޤץץȥѥȤɾäƤƤɤȤˤʤäƤޤ*1

+

: 2ɥȤ˵ܤ硢ޤϥѥեǤɾˤĤƤεܤ #if ǤƱɾ 2 ܤʤ 0

+

:

+
+*1 C90 6.1.3.4 Character constants ʸ
+   C90 6.8.1 Conditional inclusion դ -- Semantics ̣§
+   C99 6.4.4.4 Character constants
+   C99 6.10.1 Conditional inclusion -- Semantics
+
+ +

d.2.2. #if: Multi-character character constant ɾ

+

'ab' Ȥä multi-character ʸɾˤϡХȥ꤬ޤ implementation-defined Ǥ

+

: 2ɾλ d.2.1 Ʊ͡

+ +

d.2.3. #if: Multi-byte character constant ɾ

+

¿Хʸɾ encoding ΰ㤤ΤۤˡΰХȥΰ㤤ꡢϤ implementation-defined Ǥ

+

: 2ɾλ d.2.1 Ʊ͡

+ +

d.2.4. #if: 磻ʸ character constant ɾ

+

磻ʸɾˤ encoding ΰ㤤ΤۤˡΰХȥΰ㤤ꡢϤ implementation-defined Ǥ

+

: 2ɾλ d.2.1 Ʊ͡

+ +

d.2.5. #if: αե

+

̤αӥåȥեȤӥåȤɤ뤫 implementation-defined Ǥ CPU λͤˤޤϤμˡˤȻפޤ*1

+

: 2ɾλ d.2.1 Ʊ͡

+

:

+
+*1 C90 6.3.7 Bitwise shift operators ӥåñ̤Υեȱ黻 -- Semantics ̣§
+   C99 6.5.7 Bitwise shift operators -- Semantics
+
+ +

d.2.6. #if: ν;

+

̤˱դޤϺդޤǤΡȾ;η̤ implementation-defined Ǥ CPU λͤˤޤϤμˡˤȻפޤ*1, *2

+

: 2ɾλ d.2.1 Ʊ͡

+

:

+
+*1 C90 6.3.5 Multiplicative operators 黻 -- Semantics ̣§
+   C99 6.5.5 Multiplicative operators -- Semantics
+
+

*2 C99 Ǥϡdiv(), ldiv() Ʊͤ˾ 0 ڤΤƤ뤳Ȥˤʤä

+ +

d.2.7. ̻ҤͭĹ

+

ޥ̾ޤ identifier Ƭ鲿ХȤޤǤͭդǤ뤫 implementation-defined Ǥޥ̾Ū̻ҤˤĤƤϡC90 Ǥ 31 ХȡC99 Ǥ 63 ХȤݾڤʤФʤޤ*1

+

: 2

+

:

+
+*1 C90 6.1.2 Identifiers ̻ -- Implementation limits ϸ³
+   C99 6.1.2 Identifiers -- General -- Implementation limits
+
+ +

d.mbident. ̻ multi-byte character

+

C99 Ǥϡidentifier multi-byte character Ȥ뤳Ȥˤʤޤ implementation-defined Ǥ*1

+

: 2

+

:

+
+*1 C99 6.1.2 Identifiers -- General
+
+
+ +

4. ʤ׵ᤵƤʤ¦̤ɾ

+

ʤϤФ׵ᤷƤʤȤǤäƤ⡢ϤΡʼפɾ뤿˽פʤȤޤξϤǤϡʼɾΥƥȤ⤷ޤ

+
+ +

4.1. Multi-byte character encoding

+

Multi-byte character ˤϳƼ encoding ޤλͤ implementation-defined ǤǤϽϤɤ¿ͤ encoding ˤɤޤбƤ뤫ΥƥȤʼפȤƤȤꤢޤ
+ Validation Suite Ǥϡm_33, m_34, m_36 ˤĤƤϿ encoding бץѰդƤޤϤϤΥƥǤɸ encoding бƤʤФʤʤΤϤǤ¿б뤿ˤϡ¿ encoding бƤɬפޤ*1
+ƥȤˡϥƥϤˤäưۤʤꡢñǤϤޤ

+

GCC ϴĶѿ LC_ALL, LC_CTYPE, LANG бưѤ뤳ȤˤʤäƤޤȾüǤƤˤǤޤ󡣤ޤGCC ǤεǽȤ뤫ɤ GCC Ȥ򥳥ѥ뤷 configuration ˤäưۤʤޤ
+ GCC V.3.4 Ǥ multi-byte character νѤޤץץκǽˡtranslation phase 1 ˡ˥ե encoding UTF-8 ѴƤޤޤʤȡ#if ʸ UTF-8 ǤʤɾǤ encoding ȤϴطʤʤäƤޤޤ
+C++98 εʤˤƱ꤬ͤꡢtranslation phase 1 multi-byte character UCN ѴƤޤΤǡ#if ʸ UCN ȤƤǤʤɾǤʤȤˤʤޤ
+ʤȼΤ𤷤ȡ̤ #if ʸȤΤ portability ̵Ọ̵̇̄Ƨޤơ Validation Suite Ǥ V.1.5 #if multi-byte/wide character ʸΥƥȤɾоݤϤޤm.33, m.34, m.36.1ˡ

+

Visual C++ ˤ #pragma setlocale Ȥʥǥ쥯ƥ֤Τǡ줬ȤޤWindows ǤϡϰȸΥץפˤäƻѸѹǤ뤳ȤˤʤäƤޤȾüǤäǤ#pragma setlocale Windows 򤤤餺˻ȤΤǡץޤˤȤäƤʤΤǤVisual C++ ȤɤޤƤ뤫̤Ǥ뤬ˡ
+ΥƥȤ¾νϤǤϺΤȤνϤǤΥǥեȤ encoding ˤбƤʤ褦Ǥ饤֥ setlocale() δؿĽϤ¿ޤϥΥץץ䥳ѥˤϴطޤ󡣤ɬפʤΤϡϼȤ encoding ǧǽϤʤΤǤ

+

:

+

*1 C99 Ǥϡ\u, \U ǻϤޤ Unicode sequence Ƴ졢multi-byte / wide character ȤδطƤ狼ˤʤäƤޤäƤ롣C++ Standard ǤϤʣǤ롣

+ +

m.33. 磻ʸɾ

+

磻ʸˤĤƤϡ3.4.33 򻲾ȤƤ

+

: ʤ

+ +

m.34. #if multi-byte ʸɾ

+

#if ǤʣХȤ multi-byte character constant¿ХʸˤȤޤʵʽǤ multi-byte character ȤѸ single-byte character ޤΤȤƻȤƤ뤬ǤϺ𤷤ʤ褦ˡsingle-byte ǤϤʤ multi-byte character ؤȤˤˡɾ single-byte character constant ʾ implementation-defined Ǥ

+

: ʤΥƥȤϸҤ u.1.7 ΥƥȤȹ碌ȽǤɬפ롣 +ñʸͤɾǤǤϡ encoding ǧƤ뤳ȤˤϤʤʤu.1.7 multi-byte character encoding ǧϰϤ˼ޤäƤ뤫ɤΥƥȤǤ롣m.34. ʸͤɾǡ u.1.7 ŬڤʿǥåФƽƤ encoding ǧƤȸ롣

+ +

m.36.1. Multi-byte character 0x5c escape ʸǤϤʤ

+

(Multi-byte | wide) character encoding shift-JIS, Big-5, ISO-2022-* ξϡʸ '\\' Ʊ 0x5c ͤĥХȤФƤ뤳Ȥ뤿ᡢ鷺路꤬ޤϤϤ escape ʸȤƤ \ (backslash) ȲᤷƤϤޤ󡣣Ĥ (multi-byte / wide) character ϣĤʸǤꡢĤ single-byte character ǤϤʤǤ
+Multi-byte character ͤ 0x5c ΥХȤäƤ⡢ escape sequence λϤޤȲᤷƤϤޤ

+

: ʤ

+ +

m.36.2. # 黻Ҥ multi-byte character \ ʤ

+

# 黻Ҥ operand б 0x5c ͤΥХȤ multi-byte character ޤޤƤƤ⡢ \ ƤϤޤ󡣤äȤ⡢ѥΤ multi-byte character бƤʤ˥ץץå \ 뤳ȤбȤˡޤϤޤ̤μΤȤǤ
+ޤ⤽⤳μ multi-byte character ޤʸʸƥ tokenization ˤ⡢¾ΥƥȤϰäݤ꤬ޤ
+ISO-2022-* encode 줿 multi-byte character ˤ '\\' ФǤʤ '\'', '"' ȰפͤΥХȤޤޤΤǡøʽ򤹤 tokenization ˼Ԥޤ

+

: 7Shift-JIS, Big-5 encoding ˤĤƳ 2 ISO-2022-JP ˤĤƤϣĤΥץˤĤƳ 1
+ʤιܤ m_36_*.t Ǥʤ m_36_*.c ƥȤɬפ롣ʸ󲽤Ǥץץåassert() ޥ 0x5c ΥХȤĴޤʣʸƥȤƱꤹ뤳Ȥ˼Ԥ뤳Ȥ뤫Ǥ롣m_36_*.c ʸƥ tokenization ΥƥȤˤʤäƤ롣
+GCC 3.4-4.1 encoding UTF-8 ѴƤޤ򸵤 encoding ᤹ȤؼȼԤ뤳Ȥ¿Ѵ;פʤäǤ뤬ǤϤޤǤϥƥȤʤ0x5c ΥХȤйʤȤʴŤƥȤǤˡ

+
+ +

4.2. Undefined behavior

+

Standard C ˤ undefined behavior Ȥ꤬󤢤ޤUndefined behavior Τϡְäץޤϥǡ뤤ϾʤȤܿΤʤץǤviolation of syntax rule or constraint ȤϰäơϤϤФƿǥåФȤ̳դƤޤ󡣤ϡϤϤɤƤ⤫ޤʤΤǤץȤƲ餫 reasonable ʽ򤷤ƤɤǥåФƥ顼ˤƤɤǥåФ˽ߤ˽ꤷƤ⵬ʰȿǤϤޤ

+

ϤΡʼפɾˤϡundefined behavior ŪˤɤΤǤ뤫ˤʤޤϤϲ餫οǥåФΤŬǤ礦顼ˤΤǤФΤȡץȤưǤ⥦˥󥰤ФȤץ˰ܿʤȤΤ餻뤿ͭѤǤ˽ΤǤ

+

ʲΥƥȤǤϡundefined behavior ФƽϤŬڤʿǥåФɤåޤǥåϥ顼Ǥ⥦˥󥰤Ǥ⤫ޤޤ󡣤󡢥˥󥰤ξϲ餫 reasonable ʽ򤹤ɬפޤ
+u.1.* ϥץץͭǡu.2.* ̤˶̤Ǥ

+

: ŬڤʿǥåФСʲγƹܤΤäǤΤʤܤˤĤƤ 1 ʿǥåǤǥåФʤ 0

+ +

u.1.1. ե뤬 <newline> ǽäƤʤ

+

ǤʤեκǸ夬 <newline> ǤʤΤϡundefined behavior ޤʤäȤ⡢ϣӤˤäƤϥե˲ʸȤǡ¸ߤեɤ߹˽ϤˤäƼưŪղäΤǤˡ*1
+u.1.1, u.1.2, u.1.3, u.1.4 Ϥ⥽ե뤬뤷ƤʤΤǤtranslation unit ΥեǽäƤϡǥåФϤ¿ȻפޤϤǤ⡢Υե뤬 include 줿ΤǤ硢include ΥեϢ³ƽ뤳ȤǡʥȤưǽޤ undefined behavior ΰǤꡢְäǤϤޤ󤬡ϤǥåФΤŬǤ

+

:

+
+*1 C90 5.1.1.2 Translation phases ե
+   C99 5.1.1.2 Translation phases
+
+ +

u.1.2. ե뤬 <backslash><newline> ǽ

+

ե뤬 <backslash><newline> sequence ǽäƤΤϡundefined behavior ޤ*1

+

:

+
+*1 C90 5.1.1.2 Translation phases ե
+   C99 5.1.1.2 Translation phases
+
+ +

u.1.3. ե뤬ȤǽäƤ

+

ե뤬ȤǽäƤΤϡundefined behavior ޤϼºݤˤϥȤĤ˺ޤϥȤΥͥȤǤ*1

+

:

+
+*1 C90 5.1.1.2 Translation phases ե
+   C99 5.1.1.2 Translation phases
+
+ +

u.1.4. ե뤬ޥƤӽФǽäƤ

+

ե뤬뤷ʤޥƤӽФǽäƤΤϡundefined ȹͤޤ*1
+ϥޥΰĤ륫å˺줿ʤɤȯΤǡǥåϽפǤ

+

:

+
+*1 C90 6.8.3.4 Rescanning and further replacement Ⱥִ
+   C99 6.10.3.4 Rescanning and further replacement
+
+ +

u.1.5. ѤǤʤȤ character

+

ʸƥ롢ʸheader-nameȰʳΤȤ˽񤱤ʸϤ¤ƤޤʸȾʸ alphabetε桢 white space characters ǤǤΤȤǤ*1
+Ǥϡwhite space ʳΥȥ륳ɤäΥƥȤ򤷤ޤȥ륳ɤϤȤʸƥǤäƤȹͤޤϥѥΤǥåϤǤꡢޤ̤ʸåȤˤ locale-specific ʤ implementation-defined ̤¿ϰϤɬΤǤϤʤΤǡǤϥƥȤޤ󡣤ޤ嵭ʳξǤ undefined ȹͤޤƱͤͳǥƥȤޤ

+

:

+
+*1 C90 5.2.1 Character sets ʸ
+   C99 5.2.1 Character sets
+
+C99 Ǥ UCN ɲä줿 +

+ + +

u.1.6. ȥ [VT][FF]

+

White space characters ǤäƤ⡢# ǻϤޤ preprocessing directive ԤǤ [SPACE][TAB] ʳ violation of constraint Ȥʤޤ translation phase 4 Ǥäǡ phase 3 Ǥ򤽤 <newline> ʳ sequence of white spaces ȤȤ one space ˰̤뤳ȤǤξ violation ȯޤ*1
+ϤǤϤꤳˤϿǥåФΤŬǤ礦ΥƥȤ undefined behavior ΥƥȤǤϤޤ󤬡¾ʬषüʤΤʤΤǡص夳Ƥޤ

+

:

+
+*1 C90 5.1.1.2 Translation phases ե
+   C99 5.1.1.2 Translation phases
+   C90 6.8 Preprocessing directives  -- Constraints 
+   C99 6.10 Preprocessing directives -- Constraints
+
+ +

u.1.7. Ѥ multi-byte character sequence

+

ʸƥ롢ʸheader-nameȤǤäƤ⡢multi-byte character Ȥǧʤ sequence undefined ǤMulti-byte character ХȤμΥХȤХȤȤƻȤʤΤǤǤ*1

+

: 9γ encoding Τ UTF-8 ʳΤΤˤĤƳ 1 UTF-8 ˤĤƤ 3 +UTF-8 ˤĤƤϣĤΥƥȤ뤬ܤ encoding ǤȤΣĤ illegal encoding Ǥ롣 +Ĥ illegal encoding ΤοǤǤȤ롣 + encoding ˸ʿǤ򤹤Τ 0 +ʤm.34 򻲾ȤΤȡ

+

:

+
+*1 C90 5.2.1.2 Multibyte characters ¿Хʸ
+   C99 5.2.1.2 Multibyte characters
+
+ +

u.1.8. ԤʸǽäƤ

+

ʸȤ pp-token ϤԤǴ뤷ƤʤФʤޤб ' ʤ ' undefined Ǥ*1
+#error ԤˤǤդΥå񤯤ȤǤޤȤƤ pp-token ¤ӤˤʤäƤʤȤʤΤǡñȤ apostrophe Ϥޤ󡣤ΥץǤϡȤΤĤΤȤʸν ' 򥵡뤿˿ƤޤǤ礦

+

:

+
+*1 C90 6.1 Lexical elements  -- Semantics ̣§
+   C99 6.4 Lexical elements -- Semantics
+
+ +

u.1.9. ԤʸƥǽäƤ

+

ʸƥ⤽ԤǴ뤷ƤʤФʤޤ +ñȤ " undefined Ǥ*1
+ĤƤ UNIX Ϥ¿νϤǤϡԤޤʸƥȤΤǧƤ褦Ǥޤˤ򤢤Ƥˤ˸ޤ

+

:

+
+*1 C90 6.1 Lexical elements  -- Semantics ̣§
+   C99 6.4 Lexical elements -- Semantics
+
+ +

u.1.10. Ԥ header name ǽäƤ

+

#include ԤǴ뤷ʤ header-name undefined Ǥ*1

+

:

+
+*1 C90 6.8.2 Source file inclusion ե -- Semantics ̣§
+   C99 6.10.2 Source file inclusion -- Semantics
+
+ +

u.1.11. Header name ', ", /*, \

+

Header-name Ȥ pp-token ', /*, \ undefined Ǥ<, > ǰϤޤ header-name " ƱͤǤʸƥη header-name Ǥϡᤫ " pp-token νˤʤäƤޤΤǡ顼ˡ*1
+ \ ʳϤ⡢ʸʸƥ롢Ȥʶ路ɤˤǤ뤫Ǥ

+

ޤ\ escape sequence ʶ路header-name ˤ escape sequence ¸ߤʤΤΡ줬 header-name Ȥ狼Τ translation phase 3 Ǥ tokenization ä phase 4 ˤʤäƤǤΤǡϤϤ϶̤˺ΤǤEscape sequence Τ phase 6 Ǥphase 3 Ǥ \" ʸƥνǤϤʤ escape sequence Ȳ᤹뤿 escape sequence ǧ뤳ȤɬפǤ

+

\ Windows ΣϣӤǤ path-delimiter ǡΣϣӾνϤʸȤưޤʸƥη header-name ǤκǸʸ \ Ǥ̤ȤơˡUndefined behavior ⤿餹Τ¿ξϴְäץǤˤȤ櫓ǤϤޤ󡣤/ ǤȤ虜虜 \ Ƚ񤯤Τϡportability ξǴޤ󡣽Ϥϥ˥󥰤ФȤ˾ޤޤ¾ΣϣӤǤϥե򥪡ץ󤷤褦Ȥƥ顼ˤʤǤ礦顢ɬץץ tokenization ǿǤɬפϤޤ

+

:

+
+*1 C90 6.1.7 Header names إå̾ -- Semantics ̣§
+   C99 6.4.7 Header names -- Semantics
+
+ +

u.1.12. #include ΰ header name Ǥʤ

+

#include Ԥΰ header-name ǤʤΤ undefined ǤʤʸƥηǤʤ<, > ˰Ϥޤ줿ΤǤʤΤɤ餫ŸޥǤʤǤ*1

+

:

+
+*1 C90 6.8.2 Source file inclusion ե -- Semantics ̣§
+   C99 6.10.2 Source file inclusion -- Semantics
+
+ +

u.1.13. #include ΰ;פʥȡ󤬤

+

#include Ԥΰ header-name ĤǤ +ʳ;פ pp-token undefined Ǥ*1

+

:

+
+*1 C90 6.8.2 Source file inclusion ե -- Semantics ̣§
+   C99 6.10.2 Source file inclusion -- Semantics
+
+ +

u.1.14. #line ΰ˹ֹ椬ʤ

+

#line ΰ˹ֹ椬ʤΤ undefined Ǥʥե̾ optionalֹǤʤФʤʤˡ*1

+

:

+

*1 ʲu.1.18 ޤǤŵϤƱ

+
+    C90 6.8.4 Line control  -- Semantics ̣§
+    C99 6.10.4 Line control -- Semantics
+
+ +

u.1.15. #line Υե̾ʸƥǤʤ

+

#line Ǥե̾ʸƥǤʤФʤޤ
+줬磻ʸǤä violation of constraint ǡ¾ #line δְ㤤Ϥ٤ undefined ȤΤϡХ󥹤礤Ǥ

+ +

u.1.16. #line ΰ;פʥȡ󤬤

+

#line ԤˣİʾΰΤ undefined Ǥ

+ +

u.1.17. #line ιֹΰ [1, 32767] ϰϤˤʤ

+

C90 Ǥϡ#line ιֹ [1, 32767] ϰϤˤʤФʤޤ󡣤ʳǤ undefined Ǥ
+ΥץǤϡ#line ǤλϤϰϤˤΤΡθǥιֹ椬ĶƤޤäȤΥƥȤ⤷ƤޤϤˤäƤϡǹֹ椬ۤä wrap round ꤷޤϤꥦ˥󥰤ФΤŬǤ礦

+

: 2ĤΥץΤĤޤϣĿǤǤ 1

+ +

u.line C99: #line ιֹΰϰϳ

+

C99 ǤϡϰϤ [1, 2147483647] Ǥ

+

: 2 +ĤΥץΤĤޤϣĿǤǤ 1

+ +

u.1.18. #line ιֹΰʿǤʤ

+

#line ιֹϣʿǤʤФʤޤ󡣣ʿʤɤ undefined Ǥ

+ +

u.1.19. #if defined Ÿޥ

+

defined 黻ҤǤʤ identifier ʶ路򤷤Ƥ뤳ȤϡޤޤޤTranslation phase 3 ǤϤä identifier Ȥ tokenize 졢phase 4 Ǥ줬 #if ˤä˸¤äƱ黻ҤȤǧΤǡ#define Ԥ defined Ÿޥ뤳Ȥ⡢ꤨʤȤǤϤޤ󤽤ơ#if Ԥ˼ºݤˤΥޥ줿ϡundefined ǤŸ̤黻ҤȤưݾڤϤޤ*1

+

defined Ȥ̾Υޥ뤳ȤϤ켫Τ undefined Ǥu.1.21 ȡˡºݤˤϸݤޤ󡣤ִꥹ defined ȤȡΤޥϡ˸ݤޤϤˤäƤϡˤĤüʽ򤷤ƹˡŪʤΤȤưΤ⤢ޤŪʻͤǤϤޤ

+

: 2ĤΥץΤĤǤǤ 1

+

:

+
+*1 C90 6.8.1 Conditional inclusion դ -- Semantics ̣§
+   C99 6.10.1 Conditional inclusion -- Semantics
+
+ +

u.1.20. #undef ΰ defined, __LINE__, etc. Ǥ

+

#undef ΰ defined, __LINE__, __FILE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__ Ǥ undefined Ǥ*1, *2, *3

+

:

+
+*1 C90 6.8.8 Predefined macro names 餫줿ޥ̾
+   C99 6.10.8 Predefined macro names
+
+*2 Amendment 1 / 3.3 Version macro
+
+

*3 C99 Ǥϡ__STDC_HOSTED__, __STDC_ISO_10646__, __STDC_IEC_559__, __STDC_IEC_559_COMPLEX ɲä줿

+ +

u.1.21. #define Υޥ̾ defined, __LINE__, etc.

+

#define ޥ̾ defined, __LINE__, __FILE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__ Ǥ undefined Ǥ*1, *2, *3

+

: 2ĤΥץΤĿǤǤ 1

+

:

+
+*1 C90 6.8.8 Predefined macro names 餫줿ޥ̾
+
+*2 Amendment 1 / 3.3 Version macro
+
+

*3 C99 Ǥϡ__STDC_HOSTED__, __STDC_ISO_10646__, __STDC_IEC_559__, __STDC_IEC_559_COMPLEX ɲä줿

+ +

u.1.22. ## 黻Ҥˤä pp-token 줿

+

## 黻Ҥˤä pp-token Ϣ뤵줿̤ͭʡñΡpp-token ˤʤʤФʤޤ󡣤Ǥʤ undefined Ǥ*1
+ΥץǤ pp-number Ȥ Standard C ǿꤵ줿 pp-token ˤƤޤ

+

:

+
+*1 C90 6.8.3.3 The ## operator ##黻 -- Semantics ̣§
+   C99 6.10.3.3 The ## operator -- Semantics
+
+ +

u.concat. C99: ## 黻Ҥˤä pp-token 줿

+

// C99, C++ ǤϥȥޡǤ pp-token ǤϤޤ## 黻ҤˤäƤ sequence 褦ȤƤ⡢η̤ undefined Ǥ
+⤽⥳Ȥϥޥ줿Ÿ줿ꤹ a space ѴƤΤǡޥˤäƥȤ뤳ȤϤǤޤ

+ +

u.1.23. # 黻Ҥˤä pp-token 줿

+

# 黻Ҥˤִη̤ͭʡñΡʸƥˤʤʤФʤޤ󡣤ʤʤä undefined Ǥ*1
+Ϥäȯ뤳ȤΤʤǤΥץǤ狼褦ˡ\ ƥγˤȤ̯ʾΡΤޤüʾ˸¤ޤΥץ⡢ץץǿǤʤƤ⥳ѥեǿǤǤ礦ǽʬǤϤ󤷤ꡢۤä̤ƤޤäꤹΤϤޤ

+

:

+
+*1 C90 6.8.3.2 The # operator #黻 -- Semantics ̣§
+   C99 6.10.3.2 The # operator -- Semantics
+
+ +

u.1.24. ޥƤӽФ˶ΰ

+

ؿͥޥθƤӽФ˶ΰΤ C90 Ǥ undefined Ǥ*1
+ΰ򣰸ĤΥȡȲᤷ reasonable ʥޥŸԤȤϡC99 ǹˡȤʤä褦˽ʬǽǰ̣Τ뤳ȤǤ*2
+ undefined ʵ˽ϤͭյͿ뤳ȤΤǤ룱ĤǤϤǤäƤ⡢ʤȤ pre-C99 ǤϤˤϰܿʤΤǡ˥󥰤ФΤŬǤ礦

+

: 2ĤΥץΤĤޤϣĿǤǤ 1

+

:

+
+*1 C90 6.8.3 Macro replacement ޥִ -- Semantics ̣§
+
+*2 C99 6.10.3 Macro replacement -- Semantics
+
+ +

u.1.25. ޥƤӽФ˥ȥΰ

+

ؿͥޥθƤӽФʣԤˤޤ뤳ȤǤޤ +äơ preprocessing directive ʶ路Ԥޤޤ뤳Ȥꤨޤη̤ undefined Ǥ*1
+ְפϡåפ #if group ˤ pre-processing directive ԤȲᤵǤ礦

+

:

+
+*1 C90 6.8.3 Macro replacement ޥִ -- Semantics ̣§
+   C99 6.10.3 Macro replacement -- Semantics
+
+ +

u.1.26. Function-like ޥ̾ǽޥŸ

+

C90 ǤϡޥŸη̤ function-like ޥ̾ǽΤ undefined ȤƤޤɲä줿Ǥ̣ʤΤǤ2.7.6 򻲾ȤƤ*1
+ Validation Suite Ǥ V.1.2 ޤǤϤƥȤ˴ޤƤޤV.1.3 ޤ

+

:

+

*1 ISO/IEC 9899:1990 / Corrigendum 1
+C99 ǤϤεϺ졢ʣʵ꤬ɲäƤ롣

+ +

u.1.27. ̵ʥǥ쥯ƥ

+

Ԥκǽ pp-token # Ǥθˤ pp-token ϡ̾ # μ preprocessing directive ǤʤФʤޤ# ιԤϤʤǧƤޤ*1
+Ƭ # ̵ʥǥ쥯ƥ֤䤽¾ pp-token ³Ȥϡץץ violation of syntax or constraint ǤϤޤ󡣤ʤʤ顢u.1.25 Ǥ狼褦ˡ# ǻϤޤԤ٤ƥץץǥ쥯ƥֹԤǤʤФʤʤ櫓ǤϤʤǤɤ줬ץץǥ쥯ƥֹԤǤΤϡʸ̮ˤäƷޤΤʤΤǤ

+

ʽϤ undefined ȤƤޤ󤬡ֵꤵƤʤפȤ̣Ǥ undefined ΰǤϤϲ餫οǥåФȤ˾ޤޤɬץץǤɬפϤޤ󡣥ץץιԤ򤽤Τޤ޽ϤСѥեǥ顼ˤʤϤǤ顢Ǥ⤫ޤޤ󡣥ץץ #ifdefined #if defined Ȳᤷƥ顼ˤʤ餺ޤʤɤȤȤʤСϤޤ
+C99 Ǥ # non-directive Ȥ̣ʤΤɲäޤƤϲ⵬ꤵƤ餺¾ undefined Ǥȸޤ*2

+

:

+
+*1 C90 6.8 Preprocessing directives  -- Syntax ʸ§
+
+*2 C99 6.10 Preprocessing directives -- Syntax
+
+ +

u.1.28. directive ̾˥ޥϻȤʤ

+

# ǻϤޤԤץץǥ쥯ƥ֤Ǥ뤿ˤϡ pp-token ȤƤ directive ̾ޤDirective ̾Ϸ褷ƥޥŸޤ
+# μ directive ̾ǤϤʤ identifier ơ줬ޥ̾Ǥäϡ¸ߤʤǥ쥯ƥ֤ȿǤ뤫̾ΥƥȤȤߤʤƥޥŸƽϤ뤫ΡĤνꤨޤԤǤⲿ餫οǤ˾ޤޤԤǤϥѥեǥ顼ˤʤϤǤ顢Ǥ⤫ޤޤ󡣥ޥŸΤ򤵤ˡץץץǥ쥯ƥ֤Ȥƽ뤳ȤϡäƤϺޤ

+ +

u.2.1. #if ̤ character escape sequence

+

ʸƥޤʸ character escape sequence \', \", \?, \\, \a, \b, \f, \n, \r, \t, \v ꤵƤޤʳ \ ǻϤޤ character sequence undefined ǤȤ \ ˾ʸ³ sequence ϡ escape sequence ɲä뤿ͽ󤵤Ƥޤ*1
+οǤ¿ϥѥեˤޤФߤޤ#if ʸˤ줬äϡץץʳ˿ǤԤϤޤ

+

:

+
+*1 C90 6.1.3.4 Character constants ʸ -- Description ­
+   C99 6.4.4.4 Character constants -- Description
+   C90 6.9.2 Character escape sequences ʸĥɽ
+   C99 6.11.4 Character escape sequences
+
+

C99 Ǥ \uxxxx, \Uxxxxxxxx η UCN (universal-character-name) Ȥ escape sequence ɲä줿

+ +

u.2.2. #if ˥եȥȤʥӥåȥեȱ黻

+

Υӥåȥեȱ黻Ǥϡ operandʥեȥȡˤͤǤä꺸 operand ηΥӥåȿʾǤäꤷ undefined Ǥ*1
+#if Ԥˤ줬äϥץץǤ٤Ǥ礦

+

:

+
+*1 C90 6.3.7 Bitwise shift operators ӥåñ̤Υեȱ黻 -- Semantics ̣§
+   C99 6.5.7 Bitwise shift operators -- Semantics
+
+
+ +

4.3. Unspecified behavior

+

Standard C ˤ unspecified ȤʡֵꤷʤפȤˤ⤢ޤϡץǤäƤ⡢νˡϵꤷʤϤϽˡɥȤ˽ɬפʤȤΤǤ
+Ϥޤ¿ϤޤǤ⡢ˡˤäƷ̤˰㤤ФΤϡüʾǤüǤäƤ⡢̤˰㤤νФ붲ΤΤФƤϥ˥󥰤ФΤ˾ޤȻפޤ
+Unspecified ư˰¸ץη̤ undefined Ǥ

+

ץץǤ unspecified ǡ⤽νˤäƷ̤äƤΤϡΣǤΣĤΥƥȤǤϤ줾졢 pp-token ƿǥåФ뤫ȤܿʤȤ˥󥰤Ф뤫ɤǤ 2 Ϳ뤳ȤˤޤޤԤξϡޥǤŸǤɤǤɤȤˤޤ
+ʤΤۤ #if Ǥα黻ɾ unspecified Ǥ#if ϤˤäƷ̤Ѥ뤳ȤϤʤΤǡƥȤ˴ޤƤޤ

+ +

s.1.1. # 黻Ҥ ## 黻ҤɾϻꤵƤʤ

+

ĤΥޥ # 黻Ҥ ## 黻Ҥä硢Τɤ餬ɾ뤫ϵꤵƤޤ*1
+Υץ # ## Τɤ餬ɾ뤫Ƿ̤äƤǤ⡢## ɾ # ϱ黻ҤǤϤʤñʤ pp-token Ȥư졢Ϣη̤ pp-token ƤޤޤޥˤϰܿʤΤǡϤϥ˥󥰤ФΤŬǤ

+

: 2

+

:

+
+*1 C90 6.8.3.2 The # operator #黻 -- Semantics ̣§
+   C99 6.10.3.2 The # operator -- Semantics
+
+ +

s.1.2. ʣ ## 黻ҤɾϻꤵƤʤ

+

ĤΥޥʣ ## 黻Ҥ硢ɾϵꤵƤޤ*1
+ΥץǤϡɾˤäƤ pp-token ޤޥˤϰܿʤΤǡϤϥ˥󥰤ФΤŬǤ

+

: 2

+

:

+
+*1 C90 6.8.3.3 The ## operator ##黻 -- Semantics ̣§
+   C99 6.10.3.3 The ## operator -- Semantics
+
+
+ +

4.4. ˥󥰤˾ޤ¾Υ

+

Undefined, unspecified Τۤˤ⡢Ϥ˥󥰤ФȤ˾ޤĤޤ򤳤˽ޤ

+

w.1.*, w.2.* ϵʤǤϤޤäץǤºݤˤϲ餫δְ㤤Ǥ礬¿ǤפʤΤǤw.1.* ϥץץ˸ͭǡw.2.* ϥѥեǤα黻Ȥⶦ̤ #if ǤǤ

+

w.3.* translation limits Ȥ implementation-defined ¦̤ĵ˴ϢΤǤʤݾڤƤǾ¤ͤĶ translation limits 뤳ȤϡϤʼ夲뤳ȤǤȤޤ¾ǡ˰¸ץϰܿ¤ƤޤȤȯޤäơǾ¤ͤĶ translation limits ƤϤǤϡΤȤѤץФƥ˥󥰤ФΤ˾ޤȹͤޤ
+ʲΥƥȤǤϡŬڤʿǥåФйʤȤޤw.3.* ϽϤ translation limits ʤκǾͤȰפƤơΤᤳΥץ뤬顼Ȥʤ뤳ȤƤ뤳ȤˤޤǾͤʤ˥顼ȤʤΤԹʤǤƤ뤫ɤ n.37.* Ǥ狼ˡ

+ +

w.1.1. /*

+

ȤͥȤƤꥳȥޡʤäꤹ륽Υԥ󥰥ߥϤ褯ޤΤ/* /* */ */ ȤȤΥͥȡ */ */ Ȥ sequence ϣøˤϤʤΤǡѥեɬ顼ˤʤޤ*/ æƤϼΥȤνޤǤȤȲᤵΤǡ顼ˤʤʤȤޤϴʴְ㤤Ǥꡢץץ˥󥰤ФȤǤѥեDz餫Υ顼ˤʤäǤ⡢λˤϸϤ狼ʤʤäƤޤ

+

: 4

+ +

w.1.2. ޥκ³Υȡ

+

ޥκִꥹȤθΥȡ󤬼ޤ礬ΤϡK&R 1st. ǤϰۤλͤǤꡢStandard C ǤϸǧλͤǤλ֤ΤϿҾʥޥǤϤޤ󡣤ȤִꥹȤ¾ function-like ޥƤӽФȾʬΤϡư۾ʥޥǤºݤˤϥޥδְ㤤Ǥǽ礭˥󥰤ФȤ˾ޤޤObject-like ޥ function-like ޥ̾ŸΤϼºݤˤޤreadability ΰǤ

+

ˤĤƤϵʤΤ꤬ۤޤִꥹǴ뤷ʤϥ顼violation of constraintˤȤ٤ǤȻפޤ2.7.6 ȡˡ

+

: 4ĤΥץΤĤǤǤ 2

+ +

w.2.1. #if ̾λѴ̵Ѵ

+

դ̵Ȥκ黻˺ݤƤϡ̾λѴפԤ졢դ̵ѴޤդǤäͤѤޤ󤬡ǤäϤ줬礭Ѵޤϥ顼ǤϤޤ󤬡۾ʤΤǤꡢδְ㤤ǤǽޤϤ˥󥰤ФȤ˾ޤޤץץǤϤθݤ #if ˸ޤ

+

: 2

+ +

w.2.2. #if ʤ黻 wrap round

+

̵黻η̤ϰϳȤʤä wrap round 뤳ȤˤʤäƤΤǡ顼ˤϤʤޤ󤬡ְ㤤βǽΤǥ˥󥰤ФΤ˾ޤǤ礦

+

: 1

+ +

w.3.1. 31 ĤĶޥѥ᡼

+

w.3.2. 31 ĤĶޥ

+

w.3.? Ϥ C90 translation limits ˴ؤƥȤǤ +ƤϼΤȤǡפʤǤ礦n.37.* ٤ƤߤƤ

+

: 13.1., 3.2 ϣĤΤɤ餫ǤФࡣ

+ +

w.3.3. 31 ХȤĶĹ identifier

+

: 1

+ +

w.3.4. 8 ٥Ķ #if (#ifdef, #ifndef) Υͥ

+

: 1

+ +

w.3.5. 8 ٥Ķ #include Υͥ

+

: 1

+ +

w.3.6. #if 32 ٥ĶΥͥ

+

: 1

+ +

w.3.7. 509 ХȤĶĹʸƥ

+

: 1ϥץץåǤʤƤ⡢ѥΤǤɤȤޤ

+ +

w.3.8. 509 ХȤĶĹ

+

: 1

+ +

w.3.9. 1024 ĤĶޥ

+

n.37.9 ƱΤˤʤäƤޤTranslation limits εǤϡ줬Ǥ⤪ޤʤΤʤΤǤ1024 ĤΥޥȤ߹ߥޥ뤫ɤɸإåޥ뤫ɤǡäƤޤΥץǥƥȤޥϥإåեǤ 1024 ܤǤwarns.t, warns.c ˤϤƤޥĤΤǡΥޥϤɤˤƤ 1024 ܤĶ뤳ȤˤʤޤϤŬʤȤǥ˥󥰤ФȤԤޤ

+

: 1

+ +

w.tlimit. C99 translation limits

+

C99 Ǥ translation limits ˳礵ޤ +ĶͤĽϤǤ⡢portability ΤˤϵĶ륽ФƤϥ˥󥰤ФȤ˾ޤޤ

+

: 8ƹܤˤĤơ1 ġ3.1, 3.2 Ϥɤ餫ǤǤФࡣ3.7 ϥѥΤǤʤ顢Ǥġ
+ƥѥץ test-l ǥ쥯ȥˤ롣ʤl_37_8.c ϥץץϤǤƤ⥳ѥϤǤʤǤ롣

+ +

w.3.1.L. 127 ĤĶޥѥ᡼

+ +

w.3.2.L. 127 ĤĶޥ

+ +

w.3.3.L. 63 ХȤĶĹ identifier

+ +

w.3.4.L. 63 ٥Ķ #if (#ifdef, #ifndef) Υͥ

+ +

w.3.5.L. 15 ٥Ķ #include Υͥ

+ +

w.3.6.L. #if 63 ٥ĶΥͥ

+ +

w.3.7.L. 4095 ХȤĶĹʸƥ

+ +

w.3.8.L. 4095 ХȤۤĹ

+ +

w.3.9.L. 4095 ĤĶޥ

+
+ +

4.5. ¾γƼʼ

+

ʲˤϡϤλȤ䤹ʼ˴ؤ򽸤Ƥޤq.1.1 ʳϥץץǥƥȤ뤳ȤΤǤʤΤǤ

+

q.1.* ư˴ؤΤǤ
+q.2.* ϥץĥǽ˴ؤΤǤ
+q.3.* ϲƯ륷ƥ䥷ƥǤθΨ˴ؤΤǤ
+q.4.* ϥɥȤ˴ؤΤǤ

+

ˤϡʤŪɾˤ餶򤨤ʤΤ⤢ޤ +ޤҴŪɾǤΤΡμ٤ǤʤΤ⤢ޤ6.2 򻲹ͤˡŬ˺Ƥ

+ +

4.5.1. ư˴ؤʼ

+ +

q.1.1. translation limits

+

Translation limits ˤĤƤϡʤǤϺ¤λͤ䤫˵ꤵƤޤºݤνϤϤͤäƤ뤳Ȥ˾ޤޤȤˡ#if Υͥȥ٥롢#include Υͥȥ٥ˤĤƤϡC90 ׵㤹ȹͤޤ
+C99 Ǥ translation limits ˰夲Ƥޤޤidentifier ĹˤĤƤϡ255 Х̤¤ƤΤ obsolescent featureѻͽεˤȤƤޤ
+q.* ιܤǤϤƥѥץ뤬ѰդƤޤtest-l ǥ쥯ȥˤ l_37_?.t, l_37_?.c ǡ줾켡Τ褦 translation limits ƥȤޤ C99 ΤΤ򤵤˾äƤޤʤC++ Standard Υɥ饤ȤƤ translation limits ͤϲäƤˡ

+
+ + + + + + + + + + +
37.1LޥΥѥ᡼ο255
37.2LޥƤӽФΰο 255
37.3Lidentifier Ĺ 255 bytes
37.4L#if Υͥȥ٥ 255
37.5L#include Υͥȥ٥ 127
37.6L#if Υͥȥ٥ 255
37.7LʸƥĹ 8191 bytes
37.8LԤĹ 16383 bytes
37.9Lޥο 8191
+
+

l_37_8.c ϥѥ뤷Ƥ¹ԥץˤϤʤޤ󡣥ץץǤз̤򸫤Ф狼ޤѥ뤹 cc -c l_37_8.c Ȥƥ֥ȥեäƤץץСѥΤɤĹιԤ뤳ȤǤ뤫狼ޤ

+

: 9ΥץˤĤƳ 1 ѥΤΥƥȤϴޤޤʤ

+ +

q.1.2. ǥåŪΤ

+

ǥåФ뤳ȤϽФΤΡ狼ˤäꡢޤꡢθĽ꤬狼ʤäꤹΤ⤢ޤοǥåϾܤФ뤬̤μοǤϥԥȤƤȤ⤢ޤǥåñ "syntax error" ʤɤȤΤǤϤʤʤְ㤤ǤΤ򼨤Ƥ餤ΤǤĽϹԤ򼨤ơΥȡŦƤ餤ΤǤ
+ޤ#if section бطΥ顼Ǥϡб٤Ԥ򶵤Ƥʤȡɤ˥顼θΤ狼ޤ
+ƱΥ顼ФƤĤοǥåʣƽФΤϡޤޤ

+

: 10

+ +

q.1.3. ֹɽΤ

+

ץץåѥΤϤֹ椬ƤޤΤϺޤ +Ͽǥå˸ΤǤصΩܤˤƤޤκϡޤǤΥץץΥƥȤǹֹ椬Τɽ줿ɤǹԤޤ

+

: 4

+ +

q.1.4. ˽

+

: 20 Validation Suite Τɤ줫Υץ˽ꡢǤ٤ǤʤǤϤˤϡΤ褦˸롣˽פȤΤϡ^C Ǥ򤨤ʤʤäꡢꥻåȤ򤨤ʤʤäꡢե륷ƥĤꤹΤǡǡפȤΤϡﳲϤʤΤΡǽλƤޤΤؤ

+
    +
  1. n_std.cstrictly conforming programˤ˽ 0
    +
  2. n_std.c ǽǤ 10 ǤĽθʬ򤵤˥ƥȤ˽顢˽פʬˡ
    +
  3. ʳΤɤ줫Υץ˽ 10
    +
+ +

4.5.2. ץȳĥǽ

+ +

q.2.1. Include directory λ

+

ɸإåե֤뤤 include directory ϺǤñʾϣĽ˸ꤵƤޤʣ¸ߤ⤷ФФꡢ桼ꤷʤФʤʤ⤢ޤޤ桼٥ΥإåեˤĤƤϡȥǥ쥯ȥˤꤢޤ󤬡̤Υǥ쥯ȥˤäơ줬̤Υإåե include ϡϤˤäƥǥ쥯ȥ򥵡뵬§ۤʤޤɤˤƤ⡢include directory ϥץĶѿˤäƥ桼Ū˻ꤹ뤳ȤǤʤؤǤ-I ץȤϤ¿ˡޤʣΥǥ쥯ȥ˥ϡƥǴΥǥ쥯ȥ򳰤ץʤؤǤ뵬§ΤΤѹ륪ץˤ⡢¸ͳޤ

+

: 4

+ +

q.2.2. ޥץ

+

֥ͥޥ򥽡ǤʤѥǤ륪ץϡͭѤʤΤǤ-D ץȤϤ¿ˡˤäơƱΥäͤΥ֥Ȥäꡢäƥǥѥ뤷ꤹ뤳ȤǤޤִꥹȤά 1 ϤȣĤΥȡϤȤꡢȤϥɥȤΤʤФʤޤ
+Ĥޥ⥪ץǤǤϤ⤢ޤ

+

: 4

+ +

q.2.3. ޥäץ

+

ϸͭȤ߹ߥޥäץ⡢äۤɤǤ礦Τ褦ʼबޤ

+
    +
  1. -U +ȤäץǣĤΥޥäΡ
    +
  2. ϸͭȤ߹ߥޥ礷̵ˤ륪ץ +
    +
  3. Standard C ǶػߤƤȤ߹ߥޥ_ ǻϤޤʤ unix ˤ礷̵ˤ륪ץ
    +
+

: 2 1 ޤ 2 Υץ󤬤 2 3 d.1.5 ǤǤɾƤΤǡǤоݤȤʤ

+ +

q.2.4. Trigraphs ץ

+

Trigraphs ɬפʴĶǤϾѤΤǤ礦¿δĶǤɬפʤΤǤۤȤɻȤޤ󡣤ϥѥΥץͭˤ̵ˤǤۤɤǤ

+

: 2

+ +

q.2.5. Digraphs ץ

+

Digraphs trigraphs ƱͤˡѥΥץͭˤ̵ˤǤۤɤǤ礦

+

: 2

+ +

q.2.6. ˥󥰻ꥪץ

+

Violation of syntax rule or constraint ǤϤʤΤФ륦˥󥰤ϡʤ٤¿Ū˽ФƤ줿ۤΩޤˤäƤϤ뤵Ȥ⤢ޤ˥󥰤Υ٥ꤹ륪ץ󡢤ޤϼऴȤ˥˥󥰤ͭˤ̵ˤꤹ륪ץϡߤΤǤ

+

: 4

+ +

q.2.7. ¾Υץ

+

ץץˤϤΤۤˤͭѤʥץ󤬤Ĥꤨޤ +䤿˥ץ¿ΤѻǤʤȲλؤʤΤ⤢ޤŪ褯ΤϡֹϤʤץ-P ¿ˤǡϣøʳŪ˻ȤΤȻפޤȤ˽ϤΤ⤢ޤϣӤΥޥɥץåˤäƤϡǥåΥ쥯ȤϤΤۤǼ¸ɬפΤ⤢ޤޤץץΩץǤϤʤ룱ѥѥǤϡץץνϤꤹ륪ץ󤬤ߤȤǤ
+C90 (C95), C99, C++ ̤륪ץɬפʤΤǤ C99 C++ θߴ夲C++ Υץץ C99 ΤΤ˶Ť˥ץͭѤǤ礦
+Makefile 뤿Ρեΰ¸طҹԤϤ륪ץäƤץץå⤢ޤ

+

: 10

+ +

q.2.8. #pragma ˤĥ

+

Standard C Ǥϡϸͭ directive Ϥ٤ #pragma sub-directive ȤƼ¸뤳ȤˤʤäƤޤץץϤƤ #pragma 򤽤ΤޤޥѥϤޤ #pragma ϼʬȤޤץץ #pragma ¿Ϥޤ

+

#pragma once Ƚ񤤤Ƥإåեϲ #include Ƥ٤ɤޤʤȤΤޤ¿ include 򤱤뤿Ǥʤ®٤夲뤿ͭʤΤǤ#pragma once Ȥ鷺ˡإåեΤ㤨

+
+#ifndef __STDIO_H
+#define __STDIO_H
+...
+#endif
+
+

ȤäǤޤƤȡưŪˤ򼡲ϥʤ褦ˤϤ⤢ޤ

+

mcpp ˤϥإåե "pre-preprocess" ơ¿ΥإåեܤˤޤȤƤޤȤȤΤǤ #pragma directive ⤢ޤʤ#include Ǽޤإå򤤤äץץƽϤ˸줿 #define directive ޤȤƽϤɲäȤǽǤΥѥǤϤ include ­ޤ pre-preprocess إåեϡȤ #if ʤʤΤǥʤꡢޥƤӽФʤʤޤե⣱ĤǤߤޤ̤Ȥƥץץ®ʤޤ
+إå pre-compile ȤǽĽϤ⤢ޤϼȤ C++ ǵʥإåե뤿˹ͤ줿ΤΤ褦Ǥpre-compiled header ΥΥإåեιפ礭ʤ뷹ꡢʤȤ C Ǥ®ٸθ̤Ϥޤʤ褦ǤPre-compiled header Ƥ compiler-proper ͤ˰¸Ƥơ桼ˤϸʤ black box ˤʤȤ⡢Ǥ
+ɤˤƤ⡢ʾϤ٤ƥץץ®뤿ΤΤǡʳΰ̣Ϥޤ󡣤äơεǽϤǤɾq.3.1 ɾ뤳Ȥˤޤ

+

Multi-byte character encoding ꤹ #pragma ĽϤ⤢ޤץץå䥳ѥ˥ʸ encoding ˡȤƤϡʤΤǤ

+

mcpp ϥץץȥ졼ǥХåϤ #pragma äƤޤ̾ΥǥХåǤϥץץΥǥХåϤǤʤΤǡϥץץåǤǤʤפʵǽǤεǽϥץǻꤹ #pragma ȤۤǥХåĽǤΤǻȤ䤹ʤޤ

+

顼䥦˥󥰤ΥȥλΤ褦ˡ̾ϥѥץǻꤹ뤳Ȥ #pragma ǼƤϤ⤢ޤ#pragma Standard C νϤǤ portability ꤬ʤȤȡξꤷƻǤȤĹ꤬ޤѹϥؤ뤳ȤˤʤȤû⤢ޤʤ顢ѥץǤƤ餤ΤǤ

+

ʳ #pragma ǥץץǽΤϡޤꤢޤ
+Ȥǡ#pragma sub-directive implementation-defined Ǥ뤿Ʊ̾ sub-directive Ϥˤäưۤʤ̣Ķ줬ޤ̾ξͤ򤱤빩פ˾ޤޤGCC 3 Ǥ #pragma GCC poison Ȥդ GCC Ȥ̾ǻϤޤޤɤˡǤmcpp V.2.5 Ϥޤͤ #pragma MCPP debug Ȥդ MCPP Ȥ̾ǻϤޤ褦ˤޤ

+

: 10

+ +

q.2.9. ĥǽ

+

ĥǽ #pragma Ǽ뤳ȤˤʤäƤޤȤ̤˥ץץοͤƤȤ #pragma ǤϤʤǥ쥯ƥ֤⤢ޤ

+

Linux ΥƥإåǤ GCC #include_next ȤƤޤϥƥإå̵ѤʣƤ뤳ȤˤΤǡȤǤϤޤGCC / cpp ˤϤΤۤˤ #warning, #assert εʳΥǥ쥯ƥ֤ޤ⤢ޤɬδʤΤǤ

+

GCC / cc1 Ǥɸ⡼ɤưΤۤ traditional ⡼ɤλͤΥץ󤬤ޤmcpp ˤ¿ͤưͤΥץ󤬤ޤߤˤϤʤΰ̣ޤ

+

: 6

+ +

4.5.3. ¹ԸΨ

+ +

q.3.1. ®

+

ΤȿǤŪΤȤϺǤפʤΤǤ®٤®ˤȤϤޤ
+®ٸΤ #pragma 䥪ץươ̤ȤƤɤ®٤ˤʤ뤫򸫤ޤ

+

: 20ϤϤ˥ԡΡ⤷ʤץ®٤ 20 ȤŪˤɤ٤ˤäդ롣Ūʼ٤ 6.2 򻲹͡Ū®٤Ϥϡɥˤäư㤦ΤǡƱ٤ΥϡɥȤӤ롣ޤƱץƤ⡢ɤ߹ޤϤɸإå̤ˤäƽ֤äƤ롣mcpp ȤӤΤɤ
+֤¬ˤϡUNIX ϤǤ time ޥɤȤbash, tcsh ǤȤ߹ߥޥɤǤ)Windows ǤϡCygWIN Ȥʤ顢Ϥ bash time ޥɤ롣ޤWindowsNT Ρ֥꥽åȡפ TimeThis ȤƱͤΥޥɤ (*1)餬ȤʤĶǤϡtool/clock_of.c 򥳥ѥ뤷ƻȤʤʤΤǤ뤬ˡ
+ǶΥϡɥǤϥץץʤɰ֤ǽäƤޤȤ¿Τǡʤʤ֤¬뤳ȤǤʤ +Windows Ǥ Windows.h include ԹŤΤǡ줬Ȥ롣 +UNIX ϤǤ glibc ΥʤɤŤǻȤ

+

:

+

*1 WindowsNT Υ꥽åȤΥץˤ WindowsXP ǤϻȤΤȻȤʤΤȤ뤬TimeThis ϻȤ褦Ǥ롣

+ +

q.3.2.

+

̤Ͼʤ˱ۤȤϤޤ󡣤Ȥ˥ƥͿ̤˸¤ϡڼ¤Ȥʤޤ

+

ץץϥѥΰǤΤǡºݤˤϽΤΥ̤ȤʤޤץץΩץץåˤäƹԤϡ̾ϥѥΤΤۤ򿩤ΤǡץץåΥ̤ϤޤˤʤʤǤ礦ޥ¿ʤɡץץåΤۤ񤹤뤳Ȥ⤢ޤ̤ˤϥץ礭ФǤϤʤǡꥢλ̤ޤޤޤ

+

: 20 +¬ΤϤϤʤʤŬˡʤ +UNIX ϤǤ glibc firefox Τ褦礭ʥ make ʤ top Ω夲Ƥ cc1 mcpp Υ̤Ϥ狼롣 +Windows Ǥϥޥ͡Ω夲ơWindows.h include Ȥ狼롣

+ +

q.3.3. ܿ

+

ץץåΤΤΥΰܿϡϤδ¸Υץץåȼؤ褦Ȥ䡢ʬȤ򥢥ץǡȤꥫޥꤷ褦ȤˡȤʤޤΤ褦ɾоݤȤʤǤ礦

+
    +
  1. Ƥ뤫ʸƤʤ 0 ˡ
    +
  2. ¿νϡϣӤбƤ뤫
    +
  3. ܿǤϡϣӤϰϤϤɤɤ郎󤵤Ƥ뤫
    +
  4. ܿ䤹
    +
  5. ܿΤΥɥȤƤ뤫
    +
+

: 20䤬ɤΤϣȾ餤ˤʤ +į᤿Ǥ롣äơκϤƤäݤǤ롣

+ +

4.5.4. ɥȤʼ

+ +

q.4.1. ɥȤʼ

+

d.* Ǥ Standard C ΡֽפˤĤƤΥɥȤ뤫ʤ򸫤ޤǤϥɥȤΤ¾ʼɾޤ
+ɥȤȤƤϽΤۤˡ¡ΤΤɬפǤ礦

+
    +
  1. Standard C ȤΰƱ
    +
  2. ץλ͡
    +
  3. ǥåΰ̣
    +
+ΤۤStandard C ʬޤ᤿ץץΤλͤβ⤢С˱ۤȤϤޤ
+ˤĤơΤɤߤ䤹ɾоݤȤʤǤ礦ܿΤΥɥȤ q.3.3 ɾ˴ޤޤ
+

: 10

+
+ +

4.6. C++ Υץץ

+

ýϤ C++ ϤȤä󶡤뤳Ȥ¿ʤäƤޤξϥץץåϣä C++ ȤƱΤȤƤ褦ǤΤξԤΥץץϤۤȤƱʤΤǡ虜虜̤ΥץץåѰդɬפϤʤǤ礦ξԤϤޤäƱǤϤޤ

+

C++ Standard C90 ٤ȡC++ Υץץ C90 Υץץ˼λͤդäΤˤʤäƤޤ

+
    +
  1. Basic source character set ˴ޤޤʤ character ϡtranslation phase 1 \Uxxxxxxxx η Unicode Σ sequence Ѵ롣ơ translation phase 5 Ǽ¹ԻʸåȤ˺Ѵ롣*1
    +
  2. // ޤǤ򥳥ȤȤ롣*2
    +
  3. ::, .*, ->* 򤽤줾죱Ĥ pp-token Ȥư*3
    +
  4. #if Ǥ true, false boolean literal Ȥơ줾 1, 0 ɾ롣*4
    +
  5. ISO C : Amendment 1 (1995) Ǥɸإå <iso646.h> ǥޥȤ 11 identifier operator ϡ٤ƥޥǤϤʤ token Ǥ̵̣ʻ͡ˡ(*3) Ʊͤˡnew, delete operator Ǥ롣*5
    +
  6. ޥ __cplusplus 199711L pre-define Ƥ롣*6
    +
  7. __STDC__ 뤫ɤȤФɤ뤫 implementation-defined Ǥʵդ C99 Ǥ __cplusplus undefined Ǥˡ*6
    +
  8. Translation limits ϼΤ褦˳礵Ƥ롣ϥɥ饤Ǥꡢ׵ǤϤʤϤ translation limits ɥȤʤФʤʤ*7
    +
    + + + + + + + + + +
    ԤĹ 65536 Х
    ʸƥ롢ʸheader name Ĺ65536 Х
    Identifier Ĺ 1024 ʸ
    #include Υͥ 256 ٥
    #if, #ifdef, #ifndef Υͥ 256 ٥
    #if ΥåΥͥ 256 ٥
    ޥΥѥ᡼ο 256
    Ǥޥο 65536
    +
    +
  9. Header name '.' Ĺˡʵʤˤ¤Ϥʤʤä*8
    +
+

C99 ǤϤΤƱͤˤʤäƤޤ¾ϰۤʤޤޤC99 ǤϤˡư p+, P+ Ȥ sequenceidentifier multi-byte character ȤθǧѰޥιˡ #pragma ԤΰΥޥŸġ_Pragma() operator#if long long ʾǤɾܤ wide-character-string-literal character-string-literal wide-character-string-literal ȤƤϢääơ㤬ȯƤޤUCN C99 Ǥ translation phase 5 εˤʤޤUCN ˴ؤ constraint ⾯㤷ƤޤTranslation limits C99 Ǥ C90 ˳礵줿ΤΡC++ Standard ۤɶüǤϤʤǤ㤤ФƤƤޤ

+

ۤ礭ʰ㤤ǤϤʤȤޤǤ⤳㤦ȡäC++ ƱץץǤޤ櫓ˤϤޤ󡣣äˤĤƤ⡢C90 (C95) C99 ȤƱΥץץǴ֤˹碌뤳ȤϤǤޤ

+

ʤC++ __STDC__ ƤΤϴְ㤤ΤȤǤꡢޤȤǤϤޤ
+__cplusplus ˤĤƤϡ -D ץϤ⤢ޤǤϥ桼ޥΣĤˤʤäƤޤΤǡŬڤǤ
+::, .*, ->* 򣱤Ĥ token ȤưɤϡץץǤϤۤȤˤʤʤȤǤ˱ۤȤϤޤ

+

ȤǡC90 (C95), C99, C++ δ֤ǥץץå̤ˤ뤿ˤϡ¹ԻץǻԤ̤˱ƾ嵭νѤȤΤޤȤʼȻפޤ

+

ʤmcpp ǤϾ嵭λͤΤΣϡѤ٤Ƽô礭뤿ᡢбƤޤ󡣼ѾϤǤۤȤʤȻפޤ

+
    +
  1. Translation phase 1 Ǥ UCN ؤѴϼƤʤC++ Standard Ǥϡɬ UCN ѴʤƤ⡢Ʊ̤ˤʤʤɤȤƤ롣ѾϤȤ⤫̩ˤϡѴ˾Ʊ̤ˤʤϤϤʤΤǤ롣#if Ǥ UCN multi-byte-character ȤʸӤͤФ狼롣# 黻Ҥˤʸ󲽤Ǥ⸷̩˸С꤬롣*9
    +
  2. ޥκѥ᡼ 255 ĤޤǤǤʤ
    +
+

ʲˡC90 Υץץղä C++ ȼΥץץؤŬΥƥȤ򼨤ޤ
+Translation limits ˤĤƤ test-l ǥ쥯ȥˤΰʾΥץѰդƤޤC++ Ǥ translation limits ϥɥ饤ˤʤȤȤ⤢ꡢǤɾоݤȤޤ󡣤ޤheader name Ĺ OS ʤΤǡƥȤоݤȤޤ

+

:

+
+*1 C++ 2.1 Phases of translation
+
+*2 C++ 2.7 Comments
+
+*3 C++ 2.12 Operators and punctuators
+
+*4 C++ 2.13.5 Boolean literals
+
+

ʤC99 Ǥ <stdbool.h> bool, true, false, __bool_true_false_are_defined ޥȤƤ줾 _Bool, 1, 0, 1 뤳ȤˤʤäƤ롣

+
+*5 C++ 2.5 Alternative tokens
+
+*6 C++ 16.8 Predefined macro names
+
+*7 C++ Annex B Implementation quantities
+
+*8 C++ 16.2 Source file inclusion
+
+

C90 6.8.2 Ǥϡheader name '.' 麸ˤϣʸޤǤݾڤƤʤäC99 6.10.2 ǤϣʸǤ롣C++ ǤϤ¤Ƥ롣

+

*9 C99 Ǥϡ# 黻Ҥˤä UCN ʸ󲽤줿硢\ Ťͤ뤫ɤ implementation-defined Ǥ롣C++ ˤϤεϤʤ
+Ťͤϡ UCN ϤϤ multi-byte character ʤΤǡŤͤʤۤɤǤ롣C++ εǤϡŤͤʤΤϡְִä׼ˤʤäƤޤ

+ +

4.5.n.ucn1. UCN ǧ

+

: 4

+ +

4.5.n.cnvucn. Multi-byte character UCN ؤѴ

+

: 2

+ +

4.5.n.dslcom. //

+

: 4

+ +

4.5.n.bool. true, false boolean literal

+

: 2

+ +

4.5.n.token1. ::, .*, ->* ϥȡ

+

: 2ƥȤ츫褦Ǥ⡢äǽƤƱ褦ˡΥ˥󥰤Ф˥ȡϢ뤬פƤޤΤǤϡԲġ

+ +

4.5.n.token2. Operator إȡ

+

: 2

+ +

4.5.n.cplus. ޥ __cplusplus

+

: 4__cplusplus < 199711L ξ 2

+ +

4.5.e.operat. identifier-like operator ϥޥ̾˻Ȥʤ

+

: 2ĤȤ⥦˥οǥåФ 2

+ +

4.5.u.cplus. #define, #undef __cplusplus

+

: 1˥οǥåФ 1

+ +

4.5.d.tlimit. Translation limits Υɥ

+

: 2

+
+ +

5. åץץμ

+

åץץåεʽ٤ʼȤ̤ˡºݤ˥ץץåȤ˽в񤦼դ򡢰ʲ˼夲Ƥߤޤ

+
+ +

5.1. ɸإåե

+

Validation Suite ΥץǤϡĤɸإå include ƤޤΥإå񤫤ƤʤȡץץåΤΤΥƥȤΤˤǤޤ
+ʲˡɸإåμ䤹Ȥ򸫤Ƥޤ

+ +

5.1.1. Ū

+

ɸإåϵꤵƤؿ䷿ޥ򤹤٤ƴޤǤʤФʤʤΤϤǤ˼Τ褦ʾʤФʤʤȤˤʤäƤޤ

+
    +
  1. ꤵƤ餺ͽ󤵤Ƥ⤤ʤ identifier ꤷƤϤʤǤϰϤɸإåˤäƷޤäƤʣɸإåǽʣ롢뤤϶̤ϰϤ⤢ˡ*1
    +
  2. äơĤɸإå̤ɸإå include Τ̾Ϥʤ
    +
  3. ʣɸإåɤΤ褦ʽ include Ƥ⡢Ʊ̤ˤʤʤФʤʤ*2
    +
  4. Ʊɸإåʣ include Ƥ⡢<assert.h> ʳƱ̤ˤʤʤФʤʤ*2
    +
  5. Ÿ object-like ޥȤƵꤵƤΤϤ٤ #if ǤʤФʤʤ*3
    +
+

ͽ󤵤 identifier ϰϤϵꤵƤꡢʳ identifier ϥ桼˲ƤʤФʤޤ'_' ĤޤϣĤǻϤޤ̾Ϥ٤Ʋ餫λѤΤͽ󤵤ƤΤǡϤɸإåǻȤȤǤޤʵդ˥桼 '_' ĤޤϣĤǻϤޤ̾ƤϤʤˡ
+ϾʵǤʳŪ̾Ϥ٤ '_' ǻϤޤΤѹʤ Standard C ǤϻȤʤȤȤˤʤޤStandard C Υ饤֥ɸإåενȯȤʤä POSIX Ǥ⡢Standard C εʳ̾

+
+#ifdef  _POSIX_SOURCE
+    ...
+#endif
+
+

ǰϤळȤˤƤޤʤȤ⤳ʬȤϽϤ Standard C ǤϤʤʤäƤޤޤ

+

⡢㤨 open(), creat(), close(), read(), write(), lseek() δؿ̾ɸإåˤϸƤʤƤ⡢fopen(), fclose(), fread(), fgets(), fgetc(), fwrite(), fputs(), fputc(), fseek(), etc. δؿ open(), etc. ȤäƼƤСŪ˥桼֤̾򿯳뤳Ȥˤʤޤäơɽ open(), etc. _POSIX_SOURCE ʬ <unistd.h> ̥إåˤꤷƤ⡢̣ޤ
+֥ƥॳؿפ '_' ǻϤޤ̾ѹ뤫Ȥ¾ɬܤΤΤ Standard C ˼뤫ɤ餫Ԥ뤷ޤ

+

2 ϵƤ뤳ȤǤϤޤ󤬡ɸإå¾ɸإå include ȡ̾ϤɸإåǤʤ̤̾ˤʤΤǡ1 ˤҤäޤ<stddef.h> ɸإå include ꤹΤȿ§Ǥ򤱤뤿ˤ <sys/_defs.h> Ȥä̤̾ɸǤϤʤإåѰդơɸإå<stddef.h> Ȥˤ include 褦ˤɤΤǤơǻȤ̾Ϥ٤ '_' ǻϤޤΤˤ뤳ȤǤ*4, *5

+

3 ϼºݤȤʤ뤳ȤϤʤǤ礦

+

4 +ϸŤϤǤΤäȤǤߤνϤǤϤۤȤбǤƤ褦Ǥ

+
+#ifndef _STDIO_H
+#define _STDIO_H
+...
+#endif
+
+

ȤäɸإåΤ򤯤ˡŪǤΤۤ#pragma once Ȥäĥ directive Ȥˡ⤢ޤ

+

5 ȤʤΤϡsizeof 䥭㥹ȤȤäޥɸإå˽񤫤ƤϤ뤳ȤǤStandard C Ǥϡ#if sizeof 䥭㥹ȤϻȤޤ󡣼ºݤɸإåΥޥ sizeof 䥭㥹ȤȤäƤϤǤϡ#if Ǥ sizeof 䥭㥹ȤȤ褦ǤBorland C 5.5ˡϳĥͤΤĤʤΤǤ礦

+

桼ʬΥץ #if Ԥ sizeof 䥭㥹ȤȤʤ¤ꡢportability ꤬ȯ뤳ȤϤʤ¾ȯ뤳ȤϼºݤˤϤޤʤǤ礦Υץץμ Standard C ΡֳĥפǤϤʤְæפȸ虜򤨤ޤ󡣤ʤʤ顢Standard C Ǥ #if Τ translation phase 4 Ǥꡢ phase Ǥ keyword ¸ߤʤΤǤKeyword phase 7 ǽǧޤPhase 4 Ǥ keyword Ʊ̾Ϥ٤ñʤ identifier Ȥư졢#if ԤǤϥޥȤƤʤ identifier Ϥ٤ 0 ɾΤǡsizeof (int) 0 (0) ȡ(int)0x8000 (0)0x8000 Ȥʤꡢviolation of syntax rule ȤʤޤФƽϤϿǥåФʤФʤޤ󡣿ǥåФʤΤϡStandard C ΡֳĥפǤϤʤְæפǤޤ⤽ phase 4 ǰ keyword ǧȤΤϡץץȤ̵ꡢcompile phase (translation phase 7) "pre"process phase ȤƤΰ̣𤵤ΤȤޤ*6

+

:

+
+*1 C90 7.1.3 Reserved identifiers ͽѤ߼̻
+   C99 7.1.3 Reserved identifiers
+
+
+*2 C90 7.1.2 Standard headers ɸإå
+   C99 7.1.2 Standard headers
+
+
+*3 C90 7.1.7 Use of library functions 饤֥ؿλˡ
+   C99 7.1.4 Use of library functions
+
+

*4 ܤǤϤˡȤƤ롣 +ܤϤȤ˽ϤμˤȤäơͤȤʤ¿

+
+

P. J. Plauger "The Standard C Library", 1992, Prentice Hall

+
+

*5 GNU glibc ΥƥǤϡɸإåȤˤä <stddef.h> ¾ɸإåʣɤ߹ޤ褦ˤʤäƤ뤬λΤͽ󤵤줿ϰϤ̾Τ褦Ǥ롣ϵʰȿȤϸʤɸإå readability »ʤƥʥ󥹤ˤΤǡɤˡǤϤʤ<sys/_defs.h> ȤäեȤۤɤ

+

*6 2.3, 3.4.14 ȡ +

+ +

5.1.2. <assert.h>

+

˸ġɸإå򸫤Ƥޤ +ĤνϤ°ɸإå򸫤ȡǤ¿Τ <assert.h> <limits.h> Τ褦ǤΣĤϺǤñʥإåʤΤǤC90 ǿꤵ줿ΤǤ뤿ᤫְ㤨뤳Ȥ褦ǤΣĤˤĤƤϡȤˤ⾯ޤ

+

ޤ <assert.h> Ǥ*1, *2
+¾ɸإåȰäƤϡ include ƤƱȤ櫓ǤϤޤNDEBUG Ȥޥ桼뤫ʤˤäơinclude 뤿Ӥ˷̤ѤޤʤΥإåɬפ˱Ƥ

+
+#undef      NDEBUG
+#include    <assert.h>
+    assert( ...);
+
+

ȤȤ򤹤ΤǤơǥХåΤȤ

+
+#define     NDEBUG
+#include    <assert.h>
+    assert( ...);
+
+

ȤƤޤNDEBUG ƤСassert( ...); ˻ĤäƤƤ⡢ޥŸȾäƤޤޤ... ѤļǤäƤ⡢ɾʤΤǡѤȯʤȤաˡ

+

ȤǤ뤿ˤϡ<assert.h>

+
+#ifndef _ASSERT_H
+#define _ASSERT_H
+    ...
+#endif
+
+

ʤɤȤǤǤϤޤ +#pragma once ʤɤ⡢񤤤ƤϤޤ

+

ޤΤȤ狼褦ˡassert() ϥޥǤꡢNDEBUG ˤäƤѤޤ<assert.h> Ϥ #undef assert ȤǡNDEBUG ˱ assert ޥʤɬפޤ
+assert( expression) ȤƤӽФǤϡNDEBUG ƤʤСexpression Ǥв⤻ǤФλݤɸ२顼Ϥ𤷤ޤϡexpression 򤽤Τޤ޻̤ɽʥޥäƤŸˡΥΥե̾ȹֹɽޤϥץץå # 黻Ҥ __FILE__, __LINE__ ޥƤСñ˼¸Ǥޤ

+

ºݤˤϸŤϤǤϡ# 黻ҤƤʤäꡢ<assert.h> ְ㤨ƤΤޤ Validation Suite Υץˤ <assert.h> include ƤΤ¿ޤ<assert.h> 񤫤ƤʤȥץץåȤΥƥȤΤˤǤޤ <assert.h> ϴñ˽񤱤Τǡ°ΤΤнľƤۤɤǤ礦ΤΤ C89 Rationale 4.2.1.1 㼨ƤΤǤ󤳤Ǥ⡢# 黻ҤƤʤΤʷ̤ˤϤʤޤ󤬡ϥץץåʤΤǡ򤨤ޤ

+
+#undef  assert
+#ifndef NDEBUG
+#   define  assert( ignore)     ((void) 0)
+#else
+extern void __gripe( char *_Expr, char *_File, int _Line);
+#   define  assert( expr)   \
+    ((expr) ? (void)0 : __gripe( #expr, __FILE__, __LINE__))
+#endif
+
+

__gripe() ȤؿϼΤ褦˽񤱤ޤʤ__gripe Ȥ̾ '_' ǻϤޤΤʤ鲿Ǥ褤ˡ

+
+#include    <stdio.h>
+#include    <stdlib.h>
+
+void    __gripe( char *_Expr, char *_File, int _Line)
+{
+    fprintf( stderr, "Assertion failed: %s, file %s, line %d\n",
+        _Expr, _File, _Line);
+    abort();
+}
+
+

__gripe() δؿȤ鷺 fprintf() 뤤 fputs() abort() ľ <assert.h> ˽񤤤ƤϤ⸫ޤäƤǤʤȤǤϤޤ󤬡ΤˤϤδؿɬפǤFILE stderr ɬפǤ<stdio.h> include 櫓ˤϤʤΤǡʤäǤ̴ؿְۤ㤤ޤ
+ޤʤȤǤ٤ƤޥǼ¸ϡƤӽФΤӤʸƥ뤬ʣޤʣʸƥ򣱤Ĥ˥ޡŬϤʤϡɥξǤǤϤޤ

+

:

+
+*1 C90 7.2 Diagnostics <assert.h> ǵǽ<assert.h>
+   C99 7.2 Diagnostics <assert.h>
+
+

*2 C99 Ǥϡassert() ޥɤδؿƤӽФ줿ɽ뤳ȤˤʤäӤΤˡ__func__ Ȥ̻ҤꤵƤ롣

+ +

5.1.3. <limits.h>

+

ɸإåϰɽޥ񤤤ƤΤǤΥޥνϡͤȹפƤ뤳ȤϤǤ˼ξƤɬפޤ*1

+
    +
  1. #if directive ǻȤǤ뤳ȡ
    +
  2. б뷿Υ֥Ȥ integral promotion ̤ηƱμǤ뤳ȡ
    +
+

㥹ȤȤäƤϤޤ #if directive Ǥ sizeof 䥭㥹Ȥ Standard C ϰϤˤʤȤϡ5.1 ޤ⤽⡢<limits.h> ꤵ줿̣ϡ㥹Ȥ sizeof Τ褦ʼ¹ԻĶ˴ؤȲ򡢥ץץåɬפʤ褦ˤ뤳Ȥˤޤ
+㤨С

+
+#if (int)0x8000 < 0
+
+

Ȥ +

+
+#if sizeof (int) < 4
+
+

ȤȤˡ +

+
+#include    <limits.h>
+#define VALMAX  ...
+#if INT_MAX < VALMAX
+
+

ȤΤǤ#if Ǥ <limits.h> ΥޥȤС㥹Ȥ sizeof ȤɬפϤʤϤǤ

+

<limits.h> Υޥְ㤨ƤϡޤϤΥץץåλͤ餯ΤǤϤʤ<limits.h> 񤯿ͤ嵭2. integral promotionĥˤ usual arithmetic conversion̾λѷѴˤε§ȡɾε§Τɤ줫ǰ뤳Ȥ鵯ΤΤ褦Ǥ

+

㤨СΤ褦򤷤ƤΤޤ

+
+#define UCHAR_MAX   255U
+
+

unsigned char ͤϡCHAR_BIT 8 ǤСˤ٤ int ϰϤˤޤΤǡunsigned char Υǡ֥Ȥͤ integral promotion ˤä int ˤʤޤä UCHAR_MAX int ȤɾΤǤʤФʤޤ󡣤Ȥ255U Ǥ unsigned int ˤʤäƤޤޤ

+
+#define UCHAR_MAX   255
+
+

ȤʤФʤʤΤǤ

+

ɤǤѾʤΤǤϤʤȻפ⤷ޤ󤬡ɬ⤽ǤϤޤ̵ηޤ黻ϡ̾λѴפƱդη̵ؤѴޤΤᡢ羮Ӥη̤äƤΤǤ

+
+assert( -255 < UCHAR_MAX);
+
+

ȤƤߤȡ狼Ǥ礦

+

δְ㤤ˤϡintegral promotion usual arithmetic conversion ε§ Standard C ǤϤޤǤ¿νϤǺѤƤΤѹ줿Ȥ𤬴طƤޤK&R 1st. ˤ unsigned char, unsigned short, unsigned long ȤϤޤǤθ塢¿νϤ˼褦ˤʤꡢƤνϤ¿Ǥϡ̵Ͼ̵Ѵ뤳ȤˤʤäƤޤ
+Standard C integral promotion Ǥϡunsigned char, unsigned short Ϥ줾줹٤Ƥͤ int ϰϤˤޤ¤ int promote 졢Ǥʤ unsigned int promote ޤޤunsigned int long Ȥδ֤ usual arithmetic conversion Ǥϡunsigned int Τ٤Ƥͤ long ϰϤˤޤΤǤ long ˡǤʤ unsigned long Ѵޤ"unsigned preserving rules" "value preserving rules" ؤѹȸƤФΤǤΤۤľŪ˰ճʤȤΤεͳȤƤޤ<limits.h> Ǥϡε§դɬפǤ*2

+

ʲǤϤ٤ơshort ϣӥåȡlong ϣӥåȤȤޤUSHRT_MAX ͤ 65535 Ǥν int ӥåȤξȣӥåȤξȤǰäƤޤ

+
+#define USHRT_MAX   65535U      /* int ӥåȤξ   */
+#define USHRT_MAX   65535       /* int ӥåȤξ   */
+
+

unsigned short int ӥåȤξ int ϰϤˤޤʤΤǡunsigned int promote ޤäơUSHRT_MAX unsigned int ȤɾΤǤʤФʤޤ65535 Ǥ long ȤɾƤޤޤ 'U' ɬפʤΤǤ¾ int ӥåȤξ unsigned short ͤϤ٤ int ˤޤΤǡint promote ޤä USHRT_MAX int ȤɾΤǤ뤳ȤɬפǤ'U' դƤϤޤ󡣤Ȥ줬դˤʤäƤ㤬ޤ

+
+#define USHRT_MAX   0xFFFF
+
+

ʤ顢int ӥåȤǤ⣳ӥåȤǤɾޤStandard C ǤϡU, u, L, l ȤҤɤդʤʤޤϣʤȡϡint, unsigned int, long, unsigned long νǡǤͤɽǤ뷿ɾޤʤ0xFFFF int ӥåȤʤ unsigned int 65535int ӥåȤʤ int 65535 ɾΤǤФơҤդʤȡϡint, long, unsigned long νɾޤ65535 int ӥåȤʤ longint ӥåȤʤ int ɾ뤳Ȥˤʤޤ*3

+

C99 Ǥϡ long long / unsigned long long ɲäޤ0 1 ͤʤ _Bool Ȥɲäޤ¾η⥪ץǼǤ褦ˤʤޤInteger promotion Υ롼礵졢unsigned long ɽǤʤȡ long long / unsigned long long ɾ뤳Ȥˤʤޤ
+ޤǧ줿Τȼäơ羮ط狼ˤʤäᡢinteger conversion rankѴ󥯡ˤȤǰƳޤγǰϤʣǤѾϵˤɬפϤޤɸǤϥ󥯤羮طϼ̤Ǥ

+

long long > long > int > short > char > _Bool

+

ǡȤ long int Ȥ 32 ӥåȤȤ褦ʥƱǤäƤ⡢󥯤羮϶̤ȤȤݥȤǤ *4, *5

+

:

+
+*1 C90 5.2.4.2.1 Sizes of integral types <limits.h> 礭<limits.h>
+   C99 5.2.4.2.1 Sizes of integer types <limits.h>
+
+*2 C90 6.2.1 Arithmetic operands ѥڥ
+   C99 6.3.1 Arithmetic operands
+
+*3 C90 6.1.3.2 Integer constants 
+   C99 6.4.4.1 Integer constants
+
+*4 C99 6.4.4.1 Integer constants
+
+

*5 C99 Ǥ integer types νϤˤۼ뤿 <stdint.h> <inttypes.h> ȤɸإåɲäƤ롣64 bits ƥоˤä integer types μबơбط狼ˤʤäƤᡢlong Ȥ short Ȥ̾ΤۤˤĤη̾ typedef 褦ȤΤǤ롣η̾ 26 ⤢ꡢб͡Ǿͤɽޥ 42 б fprintf() format specifier Ѵޥ 56 Ʊͤ fscanf() format specifier Ѵޥ 56 ˤ롣ϤôϤޤʤȤϸѻơɾδѤ褷Ƥ롣

+ +

5.1.3.1. INT_MIN

+

<limits.h> ΥޥΤǺǤ⺮θΤɽĥƥǤ INT_MIN LONG_MIN ǤǤ int ӥåȤ long ӥåȤνϤǤ INT_MIN 嵭򤹤٤ƸƤޤǡäˤʬƼ夲Ƥߤޤ
+ξ硢int ϰϤ [-32768,32767] Ǥ뤳ȤϸޤǤ⤢ޤ󡣤ơINT_MAX ˤĤƤϤɤνϤ 32767 뤤 0x7FFF ȤƤơꤢޤ󡣤ȤINT_MIN Τ褦Ƥ򸫳ݤޤ

+
+#define INT_MIN     (-32767)
+
+

ʤΤ褦ʼºݤȰ㤦򤷤ƤΤǤ礦
+¾ǡˤƤϤϸޤ

+
+#define INT_MIN     (-32768)
+
+

-32768 -, 32768 ΣĤΥȡ󤫤äƤޤơ32768 int ɽǤϰϤˤޤ󡣤ǡ long ɾޤäơ-32768 - (long) 32768 ΰ̣ˤʤäƤޤΤǤ
+ˤϡƤΤ⤢ޤ

+
+#define INT_MIN     ((int)0x8000)
+
+

㥹ȤȤäˤĤƤϡȤϷ֤ޤ0x8000 Ǥ (unsigned) 32768 ΰ̣ˤʤΤǡϤԲĤǤ

+

ǤϡɤС㥹ȤȤ鷺 (int) -32768 ɾΤǤ礦

+
+#define INT_MIN     (-32767-1)
+
+

ɤΤǤ32767 INT_MAX Ǥ 0x7FFF Ǥ⤫ޤޤ󡣤ˤϰȤ黻ޤޤƤޤꤢޤʤ⤽ñ - 黻ҤǤˡ*1, *2

+
+#define INT_MIN     (~INT_MAX)
+#define INT_MIN     (1<<15)
+
+

Ǥ

+
+#define INT_MIN     (-32767)
+
+

ϱ黻򤹤Ȥۤ⤫Фʤäˡͤ뤳Ȥ򤢤᤿Τȿ¬ޤ

+

Ǥϡ-32767 Ȥϴְ㤤Ǥ礦 Ȥ⡢ʤΤǤ礦
+Сϴְ㤤ȹͤޤ
+INT_MIN int κǾͤɽޥȵꤵƤޤ⤷ INT_MIN -32767 ȤȡϤạ̈ΤʤΤǤ礦 ơINT_MIN-1 ϤäʤΤǤ礦 뤤 ~INT_MAX 1<<15 ϲǤ礦
INT_MIN-1 ˤĤƤϡư黻ΡפΤ褦ϰϳɽӥåȥѥȤͤ褦Ǥ

+

˴ؤ Standard C εȾȤ餷碌ȡβΩ;Ϥޤ󡣤ޤˤĤƤΥӥåȱ黻η̤ϡop1 << op2 op1 >> op2 op2 ͤǤ뤫 op1 ηΥӥåȿʾǤ礬 undefined Ǥʳˤ undefined ʾϤʤ٤ΰդ֤ͤޤ~op op int ǤСη̤ int Ǥꡢop1 & op2, op1 | op2, op1 << op2, op1 >> op2 op1, op2 Ȥ int ǤСη̤ int Ǥäơ~INT_MAX 1<<15 ̤ int ʤΤǤ1<<15 overflow Ȼפ⤷ޤ󤬡ǤϤޤ󡣥ӥåȱ黻Ǥϥӥå򤷤̤Υӥåȥѥб֤ͤΤǡoverflow ȯ褦ʤΤǤ

+

äǤϰ̤α黻Ϥ褯Ƥơundefined ʬϤƾʤΤǤȤ˥ӥåȥѥͤȤδطϡͤɽ 0 ˣĤΥӥåȥѥ󤬤ʳϡ˰абƤޤ K&R 1st. Standard C ޤǰӤΤǤޤӥåȥѥ󤽤ΤΤɽˡϣäˤϤʤפɽ褦ˤ (-32767-1) Ƚ񤯤ޤ󤬡ϸƤ̤ int ͤΤΤǤC89 Rationale ϤĤκ󤲤ơˤϡ̵פȤפɽӥåȥѥ¸ߤ;ϤΤʤȤ餫ˤƤޤ*3, *4

+

ȤǡɽǤ ~INT_MAX INT_MIN ͤǤꡢ礭 INT_MIN ϴְ㤤ȸ虜򤨤ޤ

+

:

+

*1 䤬ƸΤϡP. J. Plauger "The Standard C Library" Ǥ롣ǶνϤˤϤή limits.h ¿ʤäƤ褦Ǥ롣

+

ܤ limits.h ˤְ㤤ΤǤ롣int ӥåȤ long ӥåȤνϤΤΤ褦ˤʤäƤ롣

+
+#define UINT_MAX    65535
+#define USHRT_MAX   65535
+
+

Ǥ long ɾƤޤϤǤ롣

+
+#define UINT_MAX    65535U
+#define USHRT_MAX   65535U
+
+

*2 ǶνϤǤ *_MIN (-*_MAX - 1) ȤŪˤʤꡢְ㤤ϾʤʤäƤ롣ޤ˴ְ㤤롣

+

Visual C++ 2003 Vc7/include/limits.h, Vc7/crt/src/include/limits.h ˤϼΤ褦ʤΤ롣

+
+#define LLONG_MIN   0x8000000000000000
+
+

0x8000000000000000 unsigned long long ɾ롣ηϺǹ̥󥯤ǤΤǡinteger promotion η̤ƱǤ롣ޥʥͤˤϷ褷Ƥʤʤäơ

+
+#if LLONG_MAX > LLONG_MIN
+
+

ϴԤ̤ˤϤʤʤ

+

LCC-Win32 2003-08, 2006-03 include/limits.h LLONG_MIN ϤʤäƤ롣

+
+#define LLONG_MIN   -9223372036854775808LL
+
+

9223372036854775808LL ϤΥȡͤǤ signed long long ϰϤ overflow Ƥ violation of constraint Ǥ롣

+
+#define LLONG_MIN   -9223372036854775808LLU
+
+

Ȥ 9223372036854775808LLU unsigned long long ˤʤ뤬̵ unary - 黻ܤƤ⡢̤ηѤʤΤǡunsigned long long ɽǤʤͤȤʤꡢundefined Ǥ롣

+

Visual C++ LCC-Win32 ¾ *_MIN Ϥ٤ (-*_MAX - 1) ȤʤäƤΤǤ뤬LLONG_MIN ְäƤΤϤɤȤǤ

+
+#define LLONG_MIN   (-LLONG_MAX - 1LL)
+
+

ȤвϤʤ

+

Visual C++ 2005 ǤϤϽ줿

+
+*3 C89 Rationale 3.1.2.5 Types
+   C99 Rationale 6.2.6.2 Integer types
+
+

*4 C99 ǤϡΥӥåȥѥ㳰 "trap representation" ȤưȤ⡢Ϥ˵뤳ȤˤʤäƤ롣ºݤˤɤϤΤϡΤʤ

+ +

5.1.4. <iso646.h>

+

ISO C 9899:1990 / Amendment 1 Ǥϡiso646.h Ȥɸإåɲäޤ &, |, ~, ^, ! ޤ黻Ҥ ISO 646 invariant character set ɽ spelling 󶡤ΤǤ|, ~, ^ trigraphs Ǥ spelling 󶡤Ƥޤtrigraphs readability ˷礱Τǡiso646.h Ϥäƣα黻Ҥȡñ̤ǥޥƤޤ
+μϤƴñǡΤ褦ʤΤǽʬǤץץǥޥŸΤǡϤˤȤäƤⲿݤϤޤ*1

+
+/* iso646.h     ISO 9899:1990 / Amendment 1 */
+
+#ifndef _ISO646_H
+#define _ISO646_H
+
+#define and     &&
+#define and_eq  &=
+#define bitand  &
+#define bitor   |
+#define compl   ~
+#define not     !
+#define not_eq  !=
+#define or      ||
+#define or_eq   |=
+#define xor     ^
+#define xor_eq  ^=
+
+#endif
+
+

:

+

*1 C++ Standard Ǥϡ identifier operator ϥޥǤϤʤ operater-token ȤƤ롣ϤˤȤäƤϤäʡ̵̣ʻͤǤ롣

+
+ +

6. ƼץץåΥƥȷ

+ +

6.1. ƥȤץץå

+

ƥȤϤȼ¹ˡϼ̤ǤϤϥ꡼줿ν¤٤Ƥޤ
+¹Իץ C95 (C90), C99, C++98 Τ줾Ǿİۤʤޤ
+° <assert.h>, <limits.h> ꤬ϡľƤƥȤƤޤ

+
+ֹ:   OS      /                     /  ¹ԥץǿ
+    ¹Իץ
+    
+
+1 : Linux       /                           / DECUS cpp
+    C95:    cpp
+
+
+Martin Minow ˤ DECUS cpp Υꥸʥ (1985/01) DEC γƼ亮ƥࡢUNIX, MS-DOS ΤĤνϤ˰ܿƤ뤬ΥƥȤǻȤäΤϡkmatsui ꥸʥǤ˼ä Linux / GCC ǥѥ뤷ΡTranslation limits ʤ٤򥯥ꥢ褦ޥ񤭴 +
+
+2 : FreeBSD 2.2.7   / GCC V.2.7.2.1         / cpp (V.2.0)
+    GO32        / DJGPP V.1.12              / cpp (V.2.0)
+    WIN32       / BC 4.0                    / cpp (V.2.0)
+    MS-DOS      / BC 4.0, TC 2.0            / cpp (V.2.0)
+    MS-DOS      / LSI C-86 V.3.3            / cpp (V.2.0)
+    OS-9/6x09   / Microware C/09            / cpp (V.2.0)
+    C95:    cpp -23 (-S1 -S199409L) -W15
+            gcc -ansi -Wp,-2,-W15
+    C99:    cpp -23 (-S1) -S199901L -W15
+    C++:    cpp -23+ -S199711L -W15
+
+
+kmatsui ˤ륪ץ󥽡եȥ (1998/08)mcpp ȸƤ֡DECUS cpp ١ȤƽľΡ +ϤΥСϾ嵭νϤбƤ Linux GCC ǥѥ뤷ΤȤäƥƥȤ +
+
+3 : WIN32       / Borland C++ V.5.5J        / cpp32 (2000/08)
+    C95:    cpp32 -A -w
+            bcc32 -A -w
+    C99:    cpp32 -A -w
+    C++:    cpp32 -A -w
+
+
+Trigraph cpp bcc trigraph.exe ȤѴץबѰդƤ롣ֵʽפȾΤ뤿ΥХǤ롣Borland C ǤϡȤäͽѴץǥƥȤȤ trigraph.exe <backslash><newline> ˤ³ޤǽƤޤΤᡢֹ椬q.1.2 ΤۤǸˡ +
+
+4 : Linux, CygWIN / GCC V.2.95.3 (2001/03)  / cpp0
+    C95:    cpp0 -D__STRICT_ANSI__ -std=iso9899:199409 -$ -pedantic -Wall
+            gcc -ansi -pedantic -Wall
+    C99:    cpp0 -std=c9x -$ -Wall
+    C++:    g++ -E -trigraphs -$ -Wall
+
+
+GCC portable ʥǤΤǡΥƥ˰ܿΤλͤϰܿԤѰդ٤Ǥ뤬ȼΥɥȤ󶡤Ƥʤcpp ΥɥȤȤƤ GNU cpp.info ¸ߤʤ +
+
+5 : Linux    / GCC V.3.2 (2002/08)          / cpp0
+    C95:    cpp0 -D__STRICT_ANSI__ -std=iso9899:199409 -$ -pedantic -Wall
+            gcc -std=iso9899:199409 -pedantic -Wall
+    C99:    cpp0 -std=c99 -$ -Wall
+    C++:    g++ -E -trigraphs -$ -Wall
+
+
+ kmatsui ѥ뤷Ρ--enable-c-mbchar Ȥץդ configure Ƥ롣 +
+
+6 : Linux    /                              / ucpp (V.1.3)
+    C95:    ucpp -wa -c90
+    C99:    ucpp -wa
+
+
+Thomas Pornin ˤ륪ץ󥽡եȥ (2003/01)Portable ñΥץץåLinux / GCC ǥѥ뤷ƥƥȤ +
+
+7 : WIN32        / Visual C++ 2003          / cl
+    C95:    cl -Za -E -Wall -Tc
+    C99:    cl -E -Wall -Tc
+    C++:    cl -E -Wall -Tp
+
+
+-E ץǤϥȤ <backslash><newline> ʤΤǡѥˤƥȤʻ (2003/04) +
+
+8 : WIN32       / LCC-Win32 2003-08         / lcc
+    C95:    lcc -A -E
+            lcc -A
+    C99:    lcc -A -E
+    C++:    lcc -A -E
+
+
+Jacob Navia C. W. Fraser & Dave Hanson Υץ󥽡եȥǤ lcc 򸵤˽񤤤糫ȯĶ (2003/08)ץץʬΥ Dennis Ritchie Plan9 Τ˽񤤤Ρ +
+
+9 : WIN32, Linux, etc.  /                       / wave (V.1.0)
+    C95:    wave
+    C99:    wave --c99
+    C++:    wave
+
+
+Hartmut Kaiser ˤ portable ʥץ󥽡եȥCompiler-independent ʥץץå +Boost preprocessor library ʤΤȤäƼƤ롣ԤѰդ WIN32 Ѥμ¹ԥץ (2004/01) ǥƥȤ +
+
+10: FreeBSD, Linux, CygWIN   / GCC 2.95, 3.2
+    WIN32, MS-DOS   / Visual C 2003, BCC, etc.  / mcpp_std (V.2.4)
+    C95:    mcpp_std -23 (-S1 -V199409L) -W31
+            gcc -ansi -Wp,-2,-W31
+    C99:    mcpp_std -23 (-S1) -V199901L -W31
+    C++:    mcpp_std -23+ -V199711L -W31
+
+
+mcpp V.2.4 (2004/02) Standard ⡼ɡLinux / GCC ǥѥ뤷Τǥƥȡ +
+
+11: Linux    / GCC V.3.4.3 (2004/11)        / cc1, cc1plus
+    C95:    gcc -E -std=iso9899:199409 -pedantic -Wall
+    C99:    gcc -E -std=c99 -$ -Wall
+    C++:    g++ -E -std=c++98 -$ -Wall
+
+
+12: WIN32        / Visual C++ 2005          / cl
+    C95:    cl -Za -E -Wall -Tc
+    C99:    cl -E -Wall -Tc
+    C++:    cl -E -Wall -Tp
+
+
+-E ץǤϥȤ <backslash><newline> ʤΤǡѥˤƥȤʻ (2005/09) +
+
+13: WIN32       / LCC-Win32 2006-03         / lcc
+    C95:    lcc -A -E
+            lcc -A
+    C99:    lcc -A -E
+    C++:    lcc -A -E
+
+
+LCC-Win32 2006-03 (2006/03) +
+
+14: Linux    / GCC V.4.1.1 (2006/05)        / cc1, cc1plus
+    C95:    gcc -E -std=iso9899:199409 -pedantic -Wall
+    C99:    gcc -E -std=c99 -$ -Wall
+    C++:    g++ -E -std=c++98 -$ -Wall
+
+15: WIN32        / Visual C++ 2008          / cl
+    C95:    cl -Za -E -Wall -Tc
+    C99:    cl -E -Wall -Tc
+    C++:    cl -E -Wall -Tp
+
+
+-E ץǤϥȤ <backslash><newline> ʤΤǡѥˤƥȤʻ (2007/12) +
+
+16: Linux, WIN32, etc.  /                           / wave (V.2.0)
+    C95:    wave (--c99)
+    C99:    wave --c99
+    C++:    wave
+
+
+wave V.2.0 (2008/08) +Boost C++ Library V.1.36.0 ˴ޤޤƤ륽ɮԤ Linux/GCC, Windows/Visual C++ ǥǥեȤǥѥ뤷Τѡ +GCC, Visual C ΥإåեȤγեѰդƥƥȡ +
+
+17: FreeBSD, Linux, Mac OS X, CygWIN, MinGW / GCC 2.95 - 4.1
+    WIN32  / Visual C 2003-2008, BCC, LCC-Win32     / mcpp (V.2.7.2)
+    C95:    mcpp -23 (-S1 -V199409L) -W31
+            gcc -ansi -Wp,-2,-W31,-fno-dollars-in-identifiers
+    C99:    mcpp -23 (-S1) -V199901L -W31
+    C++:    mcpp -23+ -V199711L -W31
+
+
+mcpp V.2.7.2 (2008/11) +
+
+ +

6.2. ɽ

+
+                D   M   B   G   G   u   V   L   W   M   G   V   L   G   V   W   M
+                E   C   C   C   C   c   C   C   a   C   C   C   C   C   C   A   C
+                C   P   C   C   C   p   2   C   v   P   C   2   C   C   2   V   P
+                U   P   5   2   3   p   0   0   e   P   3   0   0   4   0   E   P
+                S   2   5   9   2   1   0   3   1   2   4   0   6   1   0   2   2
+                C   0   C   5       3   3   0   0   4   3   5   0   1   8   0   7
+                P       P   3               8                   3               2
+                P       P                                                   
+
+        max     1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
+
+[K&R: Processing of sources conforming to K&R and C90] (31 items)
+n.2.1     4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.2.2     2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.2.3     2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.6.1    10    10  10  10  10  10  10  10  10   4  10  10  10  10  10  10  10  10
+n.7.2     4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.10.2    6     0   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.12.3    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.12.4    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.12.5    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.12.7    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.13.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.13.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.13.3    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.13.4    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.13.7    6     6   6   4   6   6   6   4   6   0   6   6   4   4   6   4   6   6
+n.13.8    2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.13.9    2     2   2   2   2   2   2   0   2   0   2   2   0   2   2   0   2   2
+n.13.10   2     2   2   2   2   2   2   0   0   2   2   2   2   0   2   2   2   2
+n.13.11   2     0   2   2   2   2   2   0   0   0   2   2   2   0   2   2   2   2
+n.13.12   2     0   2   2   2   2   2   2   0   0   2   2   2   0   2   2   2   2
+n.15.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.15.2    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.18.1   30    30  30  30  30  30  30  30  30  30  30  30  30  30  30  30  30  30
+n.18.2   20    20  20  20  20  20  20  20  20  20  20  20  20  20  20  20  20  20
+n.18.3   10    10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
+n.27.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.27.2    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.29.1   10    10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
+n.32.1    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+i.32.3    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+i.35.1    2     2   2   2   2   2   2   0   0   0   2   2   0   0   2   0   1   2
+stotal  166   150 166 164 166 166 166 156 158 140 166 166 160 156 166 160 165 166
+
+[C90: Processing of strictly conforming sources] (76 items)
+n.1.1     6     0   6   6   6   6   6   6   6   0   6   6   6   6   6   6   6   6
+n.1.2     2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.1.3     2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.2.4     2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.2.5     2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.3.1     6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.3.3     4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.3.4     2     0   2   0   2   2   0   2   2   2   2   2   2   2   2   2   2   2
+n.4.1     6     0   6   0   6   6   6   6   0   0   6   6   6   0   6   6   6   6
+n.4.2     2     0   2   0   2   2   2   2   0   0   2   2   2   0   2   2   2   2
+n.5.1     6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.6.2     6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.6.3     2     0   2   0   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.7.1     6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.7.3     4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.8.1     8     0   8   8   8   8   8   8   8   8   8   8   8   8   8   8   2   8
+n.8.2     2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.9.1    10    10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
+n.10.1   10    10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
+n.11.1    8     8   8   8   8   8   8   8   8   8   8   8   8   8   8   8   8   8
+n.11.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.12.1    6     0   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.12.2    4     0   4   4   4   4   4   4   4   0   4   4   4   4   4   4   4   4
+n.12.6    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.13.5    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.13.6    6     0   6   6   6   6   4   6   4   0   6   6   4   4   6   4   6   6
+n.13.13   4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.13.14   2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.19.1    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.19.2    4     2   4   4   4   4   4   4   4   2   4   4   4   4   4   4   4   4
+n.20.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.21.1    4     0   4   0   4   4   4   0   4   4   4   4   0   4   4   0   4   4
+n.21.2    2     0   2   0   2   2   2   0   2   2   2   2   0   2   2   0   2   2
+n.22.1    4     0   4   0   4   4   4   4   4   0   4   4   4   4   4   4   4   4
+n.22.2    2     0   2   0   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.22.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   0   2
+n.23.1    6     2   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.23.2    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.24.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.24.2    4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.24.3    6     0   6   0   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.24.4    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.24.5    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.25.1    4     2   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.25.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.25.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.25.4    6     0   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.25.5    4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.26.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.26.2    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.26.3    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.26.4    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.26.5    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.27.3    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.27.4    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   2   4
+n.27.5    2     2   2   2   2   2   2   0   2   0   2   2   0   2   2   0   0   2
+n.27.6    2     0   0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.28.1    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.28.2    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.28.3    4     0   4   4   4   4   2   4   4   4   4   4   4   4   4   4   4   4
+n.28.4    4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.28.5    4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.28.6    4     0   4   0   4   4   2   0   0   4   4   4   0   0   4   0   4   4
+n.28.7    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.29.2    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.30.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.32.2    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.37.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.3    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.37.4    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.5    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.37.6    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.7    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.8    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.9    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+stotal  286   160 284 252 286 286 278 274 272 240 286 286 272 272 286 272 274 286
+
+[C90: Processing of implementation defined portions] (1 item)
+i.32.4    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+stotal    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+
+[C90: Diagnosing of violation of syntax rule or constraint] (50 items)
+e.4.3     2     2   2   1   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.7.4     2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.12.8    2     0   2   2   2   2   2   2   0   2   2   2   2   0   2   2   2   2
+e.14.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.2    4     2   4   2   4   4   2   2   4   4   4   4   4   4   4   4   4   4
+e.14.3    2     2   2   2   2   2   1   2   2   2   2   2   2   2   2   2   2   2
+e.14.4    2     2   2   2   2   2   1   2   2   2   2   2   2   2   2   2   2   2
+e.14.5    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.6    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.7    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.8    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.9    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.10   4     0   4   2   0   0   0   0   0   0   4   0   0   0   0   0   4   4
+e.15.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.15.4    2     2   2   1   2   2   2   1   2   2   2   2   2   2   2   2   2   2
+e.15.5    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.16.1    2     2   2   1   2   2   2   1   2   2   2   2   2   2   2   2   2   2
+e.16.2    2     2   2   1   2   2   2   1   2   2   2   2   2   2   2   2   2   2
+e.17.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.17.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.17.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.17.4    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.17.5    2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.17.6    2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.17.7    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.18.4    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.18.5    2     2   2   2   0   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.18.6    2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.18.7    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.18.8    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.18.9    2     0   2   0   2   2   2   2   0   0   2   0   2   0   2   2   0   2
+e.19.3    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+e.19.4    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+e.19.5    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+e.19.6    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.19.7    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.23.3    2     0   2   2   2   2   2   2   0   0   2   2   2   0   2   2   0   2
+e.23.4    2     2   2   2   2   2   2   2   0   0   2   2   2   0   2   2   0   2
+e.24.6    2     2   2   2   2   2   2   2   0   0   2   2   2   0   2   2   0   2
+e.25.6    4     0   4   0   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+e.27.7    2     0   2   2   2   2   2   0   2   2   2   2   0   2   2   0   2   2
+e.29.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.29.4    2     2   2   1   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.29.5    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.31.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.31.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.31.3    2     2   2   0   2   2   2   1   2   2   2   2   1   2   2   1   2   2
+e.32.5    2     0   2   2   2   2   0   2   0   0   2   2   2   0   2   2   2   2
+e.33.2    2     0   2   0   0   2   0   2   0   0   2   2   2   0   2   2   2   2
+e.35.2    2     0   2   1   2   2   0   2   0   2   2   2   2   0   2   2   2   2
+stotal  112    74 112  92 104 108  98 100  92  86 112 106 105  92 108 105 104 112
+
+[C90: Documents on implementation defined behaviors] (13 items)
+d.1.1     2     0   2   0   0   2   0   0   0   0   2   2   0   0   2   0   0   2
+d.1.2     4     2   4   4   4   4   0   4   0   0   4   4   4   0   4   4   2   4
+d.1.3     2     0   2   0   0   2   0   0   2   2   2   2   0   0   2   0   2   2
+d.1.4     4     0   4   4   4   4   0   4   4   2   4   4   4   4   4   4   2   4
+d.1.5     4     2   4   4   2   4   4   4   4   4   4   2   4   4   2   4   4   4
+d.1.6     2     0   2   0   0   1   0   0   0   0   2   1   0   0   1   0   0   2
+d.2.1     2     0   2   2   2   2   2   0   0   0   2   2   2   0   2   2   0   2
+d.2.2     2     0   2   2   0   2   0   0   0   0   2   2   2   0   2   2   0   2
+d.2.3     2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+d.2.4     2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+d.2.5     2     0   2   0   0   0   0   2   0   0   2   0   2   0   0   2   0   2
+d.2.6     2     0   2   2   0   0   0   2   0   0   2   0   2   0   0   2   0   2
+d.2.7     2     0   2   2   0   2   0   2   0   0   2   2   2   0   2   2   0   2
+stotal   32     4  32  20  12  23   6  18  10   8  32  21  22   8  21  22  10  32
+
+[C90: Degree of Standard C conformance] (171 items)
+mttl90  598   390 596 530 570 585 550 550 534 476 598 581 561 530 583 561 555 598
+
+[C99: Conformance to new features] (20 items)
+n.dslcom  4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.ucn1    8     0   0   0   0   6   8   2   0   2   8   6   8   0   6   8   6   8
+n.ucn2    2     0   0   0   0   0   2   0   0   0   2   2   2   0   2   2   0   2
+n.ppnum   4     0   4   0   4   4   4   0   0   0   4   4   0   4   4   0   0   4
+n.line    2     0   2   2   2   2   2   2   0   2   2   2   2   0   2   2   2   2
+n.pragma  6     0   6   0   0   6   6   0   0   2   6   6   0   0   6   0   2   6
+n.llong  10     0   0   0  10  10   8  10   0   0  10  10  10   0  10  10  10  10
+n.vargs  10     0  10   0  10  10  10   0   0  10  10  10  10   2  10  10  10  10
+n.stdmac  4     0   2   0   0   4   4   0   0   4   4   4   0   0   4   0   4   4
+n.nularg  6     0   6   0   6   6   6   2   0   6   6   6   2   0   6   2   6   6
+n.tlimit 18     0  18  14  18  18  17  18  14  18  18  18  18  12  18  18  16  18
+e.ucn     4     0   0   0   0   0   2   0   0   2   4   0   2   0   0   2   2   4
+e.intmax  2     0   0   0   2   2   2   0   0   0   2   1   0   0   1   0   2   2
+e.pragma  2     0   2   0   0   2   2   0   0   2   2   2   0   0   2   0   2   2
+e.vargs1  2     0   0   0   0   2   1   0   0   1   2   2   0   0   2   0   2   2
+e.vargs2  2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+d.pragma  2     0   2   0   0   2   2   2   0   0   2   2   2   0   2   2   2   2
+d.predef  6     0   0   0   0   6   6   0   0   0   6   6   0   0   6   0   0   6
+d.ucn     2     0   0   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+d.mbiden  2     0   0   0   0   2   2   1   0   0   2   2   1   0   2   1   0   2
+mttl99   98     0  58  20  56  86  88  41  18  53  98  87  61  22  87  61  70  98
+
+[C++: Conformance to new features not in C90] (9 items)
+n.dslcom  4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.ucn1    4     0   0   0   0   4   4   2   0   2   4   4   2   0   4   2   2   4
+n.cnvucn  4     0   0   0   0   0   1   0   0   0   0   0   0   0   0   0   0   0
+n.bool    2     0   0   0   0   2   0   0   0   2   2   2   0   0   2   0   0   2
+n.token1  2     0   2   0   0   2   0   0   2   2   2   2   0   2   2   0   2   2
+n.token2  2     0   0   0   0   2   0   2   0   2   2   2   2   0   2   2   2   2
+n.cplus   4     0   2   2   2   2   0   4   0   4   4   2   4   0   2   4   4   4
+e.operat  2     0   0   0   0   2   0   0   0   2   2   2   0   0   2   0   2   2
+d.tlimit  2     0   2   0   0   2   0   1   0   0   2   2   1   0   2   1   0   2
+mttl++   26     0  10   6   6  20   9  13   6  18  22  20  13   6  20  13  16  22
+
+[C90: Qualities / 1 : handling of multibyte character] (1 item)
+m.36.2    7     0   2   2   0   0   0   4   0   0   7   5   2   0   5   2   0   7
+stotal    7     0   2   2   0   0   0   4   0   0   7   5   2   0   5   2   0   7
+
+[C90: Qualities / 2 : diagnosis of undefined behaviors] (29 items)
+u.1.1     1     0   1   0   1   1   0   0   0   1   1   1   0   0   1   0   1   1
+u.1.2     1     0   1   0   1   1   0   1   0   1   1   1   0   0   1   0   1   1
+u.1.3     1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.4     1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.5     1     1   1   1   1   1   1   1   1   0   1   1   1   1   1   1   1   1
+u.1.6     1     0   1   0   1   1   0   0   1   0   1   1   0   1   1   0   0   1
+u.1.7     9     0   1   0   0   0   0   0   0   0   6   6   0   0   6   0   0   9
+u.1.8     1     1   1   0   1   1   0   0   0   0   1   0   0   1   0   0   0   1
+u.1.9     1     1   1   0   1   1   1   0   1   0   1   0   0   1   0   0   0   1
+u.1.10    1     1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.11    1     1   1   1   0   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.12    1     1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.13    1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.14    1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.15    1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.16    1     0   1   1   1   1   1   1   1   0   1   1   1   1   1   1   1   1
+u.1.17    2     0   2   0   1   1   0   0   1   0   2   1   0   1   1   0   1   2
+u.1.18    1     0   1   0   1   1   1   0   0   0   1   1   0   0   1   0   1   1
+u.1.19    2     0   2   0   0   1   1   0   0   1   2   1   0   0   1   0   1   2
+u.1.20    1     0   1   1   1   1   1   1   0   1   1   1   1   1   1   1   1   1
+u.1.21    2     0   2   1   0   1   2   2   2   2   2   1   2   2   1   2   2   2
+u.1.22    1     0   1   0   0   1   1   0   1   1   1   1   0   1   1   0   1   1
+u.1.23    1     1   1   0   1   0   0   1   1   0   1   0   1   1   0   1   0   1
+u.1.24    2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   2   2
+u.1.25    1     0   1   0   0   1   0   0   0   0   1   1   0   0   1   0   1   1
+u.1.27    1     1   1   1   0   1   1   1   1   0   1   1   1   1   1   1   1   1
+u.1.28    1     1   1   1   0   1   1   1   1   0   1   1   1   1   1   1   1   1
+u.2.1     1     1   1   1   1   1   0   1   0   1   1   1   1   0   1   1   1   1
+u.2.2     1     0   1   1   0   1   1   0   0   0   1   1   0   0   1   0   0   1
+stotal   41    10  33  16  19  26  20  18  19  16  38  30  17  21  30  17  25  41
+
+[C90: Qualities / 3 : Diagnosis of unspecified behaviors] (2 items)
+s.1.1     2     0   2   0   0   0   2   0   0   0   2   0   0   0   0   0   0   2
+s.1.2     2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+stotal    4     0   4   0   0   0   2   0   0   0   4   0   0   0   0   0   0   4
+
+[C90: Qualities / 4 : Diagnosis of suspicious cases] (12 items)
+w.1.1     4     4   4   0   4   4   0   0   0   0   4   4   0   0   4   0   0   4
+w.1.2     4     0   4   0   0   0   0   0   0   2   4   0   0   0   0   0   2   4
+w.2.1     2     0   2   1   0   0   0   0   0   0   2   2   0   0   2   0   0   2
+w.2.2     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.1     1     1   1   0   0   0   0   0   0   0   1   0   0   1   0   0   0   1
+w.3.3     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.4     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.5     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.6     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.7     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.8     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.9     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+stotal   19     5  19   1   4   4   0   0   0   2  19   6   0   1   6   0   2  19
+
+[C90: Qualities / 5 : Other features] (17 items)
+q.1.1     9     0   9   6   9   9   8   7   4   9   9   9   7   5   9   7   8   9
+q.1.2    10     6  10   4   8  10   4   4   4   4  10  10   4   4  10   4   4  10
+q.1.3     4     4   4   2   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+q.1.4    20    10  20  10  20  20  20  10  20  10  20  20  10  20  20  10  10  20
+q.2.1     4     2   4   2   4   4   4   4   2   4   4   4   4   2   4   4   4   4
+q.2.2     4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+q.2.3     2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+q.2.4     2     2   2   0   2   2   0   0   0   0   2   2   0   0   2   0   0   2
+q.2.5     2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+q.2.6     4     0   4   2   4   4   2   4   2   0   4   4   4   2   4   4   0   4
+q.2.7    10     4   6   4   8   8   4   4   4   2   8   8   4   4   8   4   4   8
+q.2.8    10     0   6   2   2   2   0   6   4   4   8   2   6   4   2   6   4   8
+q.2.9     6     2   2   0   2   2   0   0   0   2   2   2   0   0   2   0   2   4
+q.3.1    20    10   8   8  14  12   8  10  10   6   8  12  10  10  12  10   6   8
+q.3.2    20    20  20  18  16  16  18  16  18  14  18  14  14  18  12  14  12  16
+q.3.3    20    10  14   0  10  12   8   0   0   8  14  12   0   0  12   0  10  16
+q.4.1    10     2   6   6   4   6   2   4   6   4   4   6   4   6   6   4   4   8
+stotal  157    78 123  70 113 117  88  79  84  77 123 115  77  85 113  77  78 129
+
+[C90: Qualities] (61 items)
+mttl90  228    93 181  89 136 147 110 101 103  95 191 156  96 107 154  96 105 200
+
+[C99: Qualities of new features] (3 items)
+u.line    2     0   2   0   1   1   0   0   0   0   2   1   0   0   1   0   2   2
+u.concat  1     0   1   0   0   1   0   0   0   0   1   1   0   0   1   0   0   1
+w.tlimit  8     0   8   0   0   0   3   2   0   0   8   0   2   0   0   2   0   8
+mttl99   11     0  11   0   1   2   3   2   0   0  11   2   2   0   2   2   2  11
+
+[C++: Qualities of features not in C90] (1 item)
+u.cplus   1     0   1   1   0   0   0   1   0   1   1   0   1   0   0   1   1   1
+mttl++    1     0   1   1   0   0   0   1   0   1   1   0   1   0   0   1   1   1
+
+[Overall] (265 items)
+gtotal  962   483 857 646 769 840 760 708 661 643 921 846 734 665 846 734 749 930
+
+                D   M   B   G   G   u   V   L   W   M   G   V   L   G   V   W   M
+                E   C   C   C   C   c   C   C   a   C   C   C   C   C   C   A   C
+                C   P   C   C   C   p   2   C   v   P   C   2   C   C   2   V   P
+                U   P   5   2   3   p   0   0   e   P   3   0   0   4   0   E   P
+                S   2   5   9   2   1   0   3   1   2   4   0   6   1   0   2   2
+                C   0   C   5       3   3   0   0   4   3   5   0   1   8   0   7
+                P       P   3               8                   3               2
+                P       P                                                   
+
+        max     1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
+
+
+ +

6.3. ƥץץåħ

+ +

1 : Linux / / DECUS cpp

+
ANSI draft ΤΤΤǡȤʤäƤϵʽ٤㤯ʤäƤޤǥåϤޤޤǤɥȤϤۤȤɤޤ󡣤ʤΤäꤷץǡꤷƤޤ
+ portability ι⤤ΤǡĤνϤ˰ܿƤޤܤΤ褦ɤߤ䤹ǡɤǤٶˤʤޤ䤬 mcpp Υ١ˤΤϤΥǤ
+ +

3 : WIN32 / Borland C++ V.5.5J / cpp32

+
C90 εʽ٤Ū⤯ä shift-JIS ˤޤȤбƤޤɥȤäƤޤe_* ǤϿǥåϤƤФޤ֤˹碌ŪʤΤ¿ɤޤ
+ֵʳʼפϼǡȤĥǽ⤢ޤUndefined ʬФƤϿǥåϤޤФ˽ޤʤбդȤʤäƤޤä褦Ǥ
+®٤ Turbo C Ȱäơ®ۤǤϤʤʤޤǤˣѥѥΥåȤϤʤʤäƥǥåȤĤäƤȻפޤĤޤǤή³Ƥ椯ΤǤ礦
+ +

4 : Linux, CygWIN / GCC V.2.95.3 / cpp0

+
C90, C95 εʽ٤Ϥʤ⤯ǥåŪΤǤưϤۤܰꤷƤꡢĤƹ®Ǥ˭٤뤯餤˭٤ʥץħǤmcpp Ǥ⡢ΥץΤĤޤͤƤޤ
+ĤƤϤĤˤХ⤢ޤV.2.95 ǤϥХϤۤȤɤʤʤޤ
+ĤϡC99, C++98 οͤ¿̤Ǥ뤳ȡǥåޤޤ­ʤȡɥȤʤ­Ƥ뤳ȡ#pragma Ȥʤʰȿγĥǽ¿ȡpre-Standard obsolete ʻͤ¿Ƥ뤳ȡmulti-byte character encoding ؤбȾüǼѥ٥ãƤʤȡǤ
+cpp.info ȤɥȤ GCC / cpp Standard C ץץΤβȤͥ줿ΤǤʬΥɥȤ CygWIN, FreeBSD, Linux Τɤˤ¸ߤʤΤϻǰǤְܿפȤΤϥץǤϤʤϤǤ
+ϤĤϤ餱ɤߤˤĥץȤΩƤŤޥץåι¤äƤޤ GCC ϤΤͥƤ뤿ᡢ¿Υƥ˰ܿƤޤ
+ +

5 : Linux / GCC V.3.2 / cpp0

+
GCC V.3 Ǥϥץץ V.2 饽쿷ޤƱ˥ɥȤ쿷ޤToken-based ʸ§Ű줵졢pre-Standard ʻͤϤޤƤʤ⥦˥󥰤Ф褦ˤʤꡢundocumented ʻͤƤޤΤȤƤϻδԤ˲ɤƤޤץ๽¤쿷줿Ȥǡβɤ⤷䤹ʤäΤȻפޤ
+ǥåɥȡC99 бmulti-byte character ؤбϤޤԽʬǤ®٤Ϥ٤ʤޤǤޤ®ۤǤ
+إåե뤬ʣ include directory ΥʣˤʤäƤƤΤϡäǤޤŤץ󤬻ȤʤʤäƤ¿οץƤꡢʤʤؿʤߤޤV.3 ǤϥץץѥΤ˰βޤץץʬȥѥʬȤŪ interface ʤʣʤΤˤʤäƤΤ⡢ǰʤȤǤ
+ +

6 : Linux / / ucpp (V.1.3)

+
C99 бƤ뤳ȡץ󥽡 portable Ǥ뤳ȤħǤʽ٤Ϥʤ⤯ʤäƤޤUCN UTF-8 бƤ뤳ȤˤʤäƤޤϤԽʬǤǥåϤȤƤޤɥȤ⤫ʤ­Ƥޤ
+ +

7 : WIN32 / Visual C++ 2003 / cl
+12 : WIN32 / Visual C++ 2005 / cl
+15 : WIN32 / Visual C++ 2008 / cl

+
C99 λͤ 2003 ǤϤۤȤɼƤޤǤ2005 ǤϤּʤߤޤ
+C90 λͤˤĤΥХĤäƤޤTranslation phase κ𤷤Ƥ뤳ȤǤ⺬ŪǤ˸ŤʬŪ˼ʤС󥢥åפ򷫤֤ƤƤ뤳Ȥޤ
+ǥåϤԥȤΤ줿ΤФиޤ顼ȽǤƤޤȤ¿Τ⡢ȤˤǤɥȤϼ٤ƹ٤Ƥʬˤޤ
+Translation limits 礭Ȥ #pragma Ū¿ȤȤꤨȸޤȤ #pragma setlocale ʤΤǤC90 Ǥ #pragma ԤޥŸ뤳ȡˤ⤫餺 #pragma sub-directive 桼֤̾ȤäƤΤǤ
+2008 Υץץå 2005 ȤۤȤѤꤢޤ +㤤 C99 _Pragma() __pragma() Ȥ̾ͤۤʤ黻Ҥ줿Ȥ餤Ǥ +źդ륷ƥإåˤϡ2005 ޤǤϾʤäΤǤ2008 ˤʤäƤʤ '$' ȤäޥƤޤޤ
+ +

8 : WIN32 / LCC-Win32 2003-08 / lcc
+13 : WIN32 / LCC-Win32 2006-03 / lcc

+
ץץʬ Dennis Ritchie Plan9 ѤΥ Jacob Navia äΤǤǥХå­Ƥꡢ#if ɾʤɤˤʤΥХޤC95 ʹߤλͤˤбƤޤ󡣥ɥȤ­Ƥޤ
+2003-08 2006-03 ȤǤϥץץ˴ؤƤϤۤȤɰ㤤Ϥޤ
+ +

9 : WIN32, Linux, etc. / / wave (V.1.0)
+16: WIN32, Linux, etc. / / wave (V.2.0)

+
C++ STL Τ "meta-programming" ˻ȤȤŪ˺줿ΤǤȾ C++ Υ饤֥ǤǤƤơȾإåեΩäƤȤðۤʥץץåǤ"Meta-programming" μǤϺƵŪޥ¿ѤƤꡢŸǤ mcpp -@compat ץ GCC ƱͤΡִֺػߥ롼פŬϰϤ򶹤ꤹˡȤäƤޤ3.4.26 ȡˡ
+̤ C/C++ ץץåȤƤȤ뤳ȤտޤƤꡢC++98, C99 бɸ֤ƤޤV.1.0 ϴ٤Τʤ㤤ΤǤV.2.0 ˲ޤV.1.0 ΤȤǡmcpp °븡ڥåȤǥƥȤ¿ΥХȤΤȤǤ˿ǥåμβɥȤν¤˾ޤޤޤǥå° testcases ˸Ԥεʤβ˸꤬ΤⵤˤʤȤǤ
+ +

11 : Linux / GCC V.3.4.3 / cc1, cc1plus
+14 : Linux / GCC V.4.1.1 / cc1, cc1plus

+
V.3.2 ȤۤȤѤޤ󡣤ץץȤΩƤϤʤѤޤV.3.2 Ǥϥåꤷ򼨤Ƥ GCC ǤV.3.3, 3.4 ǤѤä褦ǤñΤΥץץåѻߤ̤ΥޥV.3.2 obsolete Ȥ줿ͤΰ褵ʣĤΥѥˤ٤Ƥۼ˿ʤǤΤϡϤƲȸ뤫ɤΤȤǤMulti-byte character encoding UTF-8 øŪʰ֤ͿȤ⡢multi-lingualization ¿ͤʲǽ򶹤뤳ȤˤʤΤǤϤʤǤ礦
+V.4.1 ϥץץ˴ؤƤ V.3.4 礭ʰ㤤Ϥޤ
+ +

2 : FreeBSD, WIN32, MS-DOS / / mcpp (V.2.0)
+10 : FreeBSD, Linux, CygWIN, WIN32, MS-DOS / / mcpp (V.2.4)
+17 : FreeBSD, Linux, Mac OS X, CygWIN, MinGW, WIN32 / / mcpp (V.2.7.2)

+
䤬ʬǺäƼʬǥƥȤƤΤʤΤǡʽ٤ǹǤΤʥץץåΤϤǤǥå˭٤ŪΤɥȤξܺ٤ǤͭѤʥץ #pragma ̤äƤޤV.2.3 ʹߤ C99 λͤˤ⤹٤бƤޤ +ΰܿɤ֤Ǥ礦
+ǽޤĤĤäƤޤ󡢤ꤤޤ
+
+ +

6.4. ɾ

+

¿ΥץץåƥȤƤߤȡߤ C90 ʽ٤Ϥʤ⤤Τ¿ʤäƤƤ뤳Ȥ狼ޤƽϤȤޤޤ¿äƤޤʤmcpp ϤۤȤɤιܤʤΤǡ졹ڤޤ

+

n_* Υץ˴ؤƤΤƤꡢGCC 2.95 ʹ, BC (Borland C) 5.5, LCC-Win32 2003-08 ʹ, ucpp 1.3, Visual C++ 2003 ʹ, wave 2.0 ϼѾϤޤΤʤ٥ãƤޤɤνϤˤճʥХޤ

+

ǤäΤϡn_13_7.t (n_13_7.c) division by 0 Υ顼ˤʤäƤޤϤ Visual C ޤƤФи뤳ȤǤ&&, || 䣳黻ҤǤΡɾǤڤפȤäδŪʻͤƤʤΤǤBorland C n_13_7.c Ǥϥ˥󥰤ˤȤɤƤޤe_14_9.c division by 0 ǤƱ˥󥰤ФޤTurbo C Ǥ 0 Ǥɾ򥹥åפʬǤɤƱ顼ȤʤäƤޤBorland C Ϥοǥå򥦥˥󥰤˳ʲʤΤǤνϤΡִ֤˹碌ǥåפΰǤ

+

C90 λͤǤϡ# 黻Ҥˤʸ󲽤μδְäƤΤˤޤ
+Amendment 1, Corrigendum 1 ɲä줿ͤϡټƤΤ GCC 2.95 ʹ, ucpp, Visual C 2003 ʹߤǤ

+

C99 λͤϡGCC 3.2 ʹ, ucpp ܼۤƤޤ// Ȥ¿νϤƤޤΤۤ GCC long long translation limits ˤʤ;͵ꡢޥΥŬڤ˽ޤѰޥ GCC ȼλͤΤΤäƤޤ2.95 Ǥ C99 λͤΤΤޤ3.2 Ǥ _Pragma() ޤUCN ucpp, Visual C 2005 ʹߤƤޤGCC 3.2 ʹߤʸƥ뤪ʸ UCN ƤޤWave 2.0 C99 λͤβȾƤޤ
+C++98 λͤ GCC 3.2 ʹ, wave, Visual C 2005 ʹߤܼۤƤޤ
+C++98 extended-character UCN ѴȤʻͤƤΤϡޤޤ

+

i_* νʬνǤϡ#if wide character 򰷤ʤΤ¿褦Ǥwide character ˸¤餺 #if ʸȤȤϡʤˤϤΤΤۤȤɰ̣ΤʤȤʤΤǡȤʤȤäƺ뤳ȤϤʤǤ礦̵̣ʤΤϵʤλͤ٤Ǥ
+Multi-byte character ˤĤƤϡVisual C ¿ι encoding ԽʬʤбƤޤ¾νϤϼǤGCC 2.9, 3.2 ϼȾüǡѥ٥ãƤޤGCC 3.4-4.1 ǤϤ٤Ƥ encoding UTF-8 ѴƤ褦ˤʤꡢˤä¿ encoding бǤ褦ˤʤޤ encoding ˤäƤϤޤѥ٥ǤϤޤ
+Shift-JIS BIG-5 ȤƥǤϡƥ tokenization # 黻Ҥˤʸ󲽤դɬפǤVisual C ϤˤޤбƤޤBorland C 5.5J shift-JIS ˤбƤޤ

+

e_* ФǥåǤϡGCC 2.95 ʹߤǤͥƤޤVisual C, ucpp ǤϿǥåŪФΤΡȤƤԥȤƤꤷޤ#if overflow ФǥåνФΤϾʤBC, ucpp, GCC ٿǤǤ

+

ʬΥɥȤǤϡGCC 3.2 ʹߤޤޤΥ٥ǡ¾Ϥɤ⤪Ǥ

+

u_* ФǥåǤϡGCC 3.2 ʹߤޤޤǤ¾ϤǤUndefined Ϥϲ⤷ʤɤȤΤǤϤʤȻפޤ

+

s_*, w_* ˤĤƤϤɤνϤۤȤн褷Ƥޤ󡣥ȤΥͥȤФ륦˥󥰤ФΤʤΤϡճǤ

+

֤¾γƼʼפǤϡGCC ˭٤ʥץ󡢿ǥåŪΤ®ܿȤȴФƤޤ

+

礹ȡGCC V.3.2 ʹߤʽ٤ι⤵Ȥɤޤ礭ʷΤʤǡǤͥƤޤmcpp ®٤ΤΡ¾ΤۤȤɤ̤ǤäƤ뤳ȤϸޤǤ⤢ޤ

+

ơ̤ΥƥȤäƤޤƻפΤϡƥѥץȤΤ˽פȤȤǤmcpp ϤΥץκ¹ԤƥǥХåʤƤΤǤʬʥץ뤬ʤХХ¸ߤˤʤʤդޤ󤫤顢ǥХåɤǤϤޤ
+ʤˤ⤳Ūʥƥѥץ뤬źդ褦ˤʤȡƽϤʼŪ˸夹뤳ȤǤ礦ޤդˡŪʥƥѥץ뤳Ȥϡʤ⤭Ħˤ뤳ȤˤʤޤƥѥץϵʤΥ饹ȥ졼ʤΤǤ

+
+ +

6.5. ƥȤո

+

Validation Suite ˤĤƤΤո䡢ȤäƼϤΥץץΥƥԤƤޤ

+

http://mcpp.sourceforge.net/

+

"Open Discusssion Forum" ޤϥ᡼Ǥꤤޤ

+

ץץåξܺ٥ƥȤԤäϡ6.2 ɽڤäơ˽񤭹Ǥ꤯η׻ˤ tool/total.c 򥳥ѥ뤷ƻȤޤɽ cpp_test.old Ȥȡ

+

total 18 cpp_test.old cpp_test.new

+

Ȥȡstotal (sub-total), mtotal (mid-total), gtotal (grand-total) γ󤬽񤭹ޤ cpp_test.new ˽Ϥޤ"18" ΤȤϽϤοꤷޤ

+

GCC ξϡڥåȤ testsuite Ǥˤ뼫ưƥȤǤޤƼС GCC Υƥȷ̤꤯ե (gcc.sum, gcc.log) äƤȡǥåΥСˤ㤤򸡾ڥåȤ testsuite Ǥ˺Τ뤳ȤǤޤ

+

ޤValidation Suite mcpp γȯ SourceForge ξ嵭 mcpp project ǿʤƤޤȯ˻äƤߤ褦Ȥϡҥ᡼򤯤

+ + diff --git a/libraries/mcpp/doc-jp/mcpp-manual.html b/libraries/mcpp/doc-jp/mcpp-manual.html new file mode 100644 index 000000000..44a3a1832 --- /dev/null +++ b/libraries/mcpp/doc-jp/mcpp-manual.html @@ -0,0 +1,4584 @@ + + + + + + + + +
+

MCPP-MANUAL

+

== How to Use MCPP ==

+
+
+

for V.2.7.2 (2008/11)
+ (kmatsui@t3.rim.or.jp)

+
+
+

== ܼ ==

+
+
1. +
1.1. ϣӤϤФʤ portable ʥ +
1.2. Τ Standard C ⡼ɤ˲äƤ¾γƼ⡼ɤ +
1.3. Υޥ˥奢ɽˡ +
+
+
2. ưΥץȴĶ +
2.1. mcpp ¹ԥץΣΥӥɤȣĤư⡼ +
2.2. ưΥץλˡ +
2.3. ̤Υץ +
2.4. mcpp ư⡼ɤˤ륪ץ +
2.5. νϰʳνϤ˶̤Υץ +
2.6. ϤȤΥץ +
2.7. Ķѿ +
2.8. Multi-byte character encoding +
2.9. ѥѥ mcpp Ȥˤ +
2.10. 糫ȯĶ mcpp Ȥˤ +
2.10.1. Visual C++ IDE mcpp Ȥˡ +
2.10.2. Mac OS X / Xcode.app mcpp Ȥˡ
+
+
3. ĥǽȸߴ +
3.1. #pragma MCPP put_defines, #pragma MCPP preprocess +
3.1.1. إåե pre-preprocess
+
3.2. #pragma once +
3.2.1. إåե #pragma once 񤭹ġ
+
3.3. #pragma MCPP warning, #include_next, #warning +
3.4. #pragma MCPP push_macro, #pragma __setlocale +
3.5. #pragma MCPP debug, #pragma MCPP end_debug, #debug, #end_debug +
3.5.1. #pragma MCPP debug path, #debug path +
3.5.2. #pragma MCPP debug token, #debug token +
3.5.3. #pragma MCPP debug expand, #debug expand +
3.5.4. #pragma MCPP debug if, #debug if +
3.5.5. #pragma MCPP debug expression, #debug expression +
3.5.6. #pragma MCPP debug getc, #debug getc +
3.5.7. #pragma MCPP debug memory, #debug memory +
3.5.8. #pragma MCPP debug macro_call
+
3.6. #assert, #asm, #endasm +
3.7. C99 οǽ_Pragma() 黻ҡѰޥ +
3.8. ϤȤüʻ +
3.8.1. GCC, Visual C βѰޥ +
3.8.2. GCC 'defined' ν +
3.8.3. Borland C asm ʸ¾üʹʸ +
3.8.4. #import ¾
+
3.9. GCC GCC Ȥθߴ +
3.9.1. FreeBSD 2 / kernel Υץץ +
3.9.2. FreeBSD 2 / libc Υץץ +
3.9.3. GCC 2 / cpp λͤ +
3.9.4. Linux / glibc 2.1 Υץץ +
3.9.5. GCC 2 mcpp Ȥˤ +
3.9.5.1. mcpp Υ˥󥰤ˤ
+
3.9.6. GCC 3.2 Υץץ +
3.9.7. GCC 3, 4 mcpp Ȥˤ +
3.9.8. Linux / glibc 2.4 Υץץ +
3.9.9. Linux stddef.h, limits.h, #include_next +
3.9.10. Mac OS X / Apple-GCC ȥƥإå +
3.9.11. firefox 3.0b3pre Υץץ
+
3.10. Visual C++ Υƥإå +
3.10.1. Ȥޥ ? +
3.10.2. Identifier '$'
+
+
4. λ +
4.1. λ status +
4.2. Include directory Υѥ +
4.3. Header name ιˡ +
4.4. #if ɾ +
4.5. #if Ǥʸɾ +
4.6. #if sizeof (type) +
4.7. White-space sequence ΰ +
4.8. mcpp ¹ԥץΥǥեȤλ +
+
+
5. ǥå +
5.1. ǥåη +
5.2. Translation limits +
5.3. Fatal error +
5.3.1. mcpp ȤΥХ +
5.3.2. ʪŪ顼 +
5.3.3. Translation limits ХåեΥ顼 +
5.3.4. #pragma MCPP preprocessed ˴ؤ륨顼
+
5.4. Error +
5.4.1. ʸȥȡ˴ؤ륨顼 +
5.4.2. 뤷ʤեΥ顼 +
5.4.3. Preprocessing group бطΥ顼 +
5.4.4. ǥ쥯ƥֹԤñʹʸ顼 +
5.4.5. #if ιʸ顼 +
5.4.6. #if ɾ˴ؤ륨顼 +
5.4.7. #define Υ顼 +
5.4.8. #undef Υ顼 +
5.4.9. ޥŸΥ顼 +
5.4.10. #error, #assert +
5.4.11. #include μ +
5.4.12. ¾Υ顼
+
5.5. Warning (class 1) +
5.5.1. ʸȡ󤪤ӥȤ˴ؤ륦˥ +
5.5.2. 뤷ʤեΥ˥ +
5.5.3. ǥ쥯ƥֹԤ˴ؤƼΥ˥ +
5.5.4. #if ˴ؤ륦˥ +
5.5.5. ޥŸ˴ؤ륦˥ +
5.5.6. ֹ˴ؤ륦˥ +
5.5.7. #pragma MCPP warning, #warning
+
5.6. Warning (class 2) +
5.7. Warning (class 4) +
5.8. Warning (class 8) +
5.9. Warning (class 16) +
5.10. ǥå +
+
+
6. Х +
+
+ +

1.

+

mcpp Martin Minow DECUS cpp 򸵤 kmatsuiʾ ˤŪ˽ľåץץåǤmcpp Ȥ̾ Matsui cpp Ȥ̣Ǥϥ󶡤ΤǡƽϤǻȤˤϤνϤ˹碌ƥ˼㴳ѹäǥѥ뤷 mcpp μ¹ԥץɬפޤ*1

+

Υޥ˥奢ǤϡǤνϤ˰ܿ줿¹ԥץλͤƤޤ˾ܺ٤Τꤿ͡鲿餫νϤ˰ܿƤߤͤϡ mcpp-porting.html ȤɥȤ򻲾ȤƤ
+ΥɥȤϤ٤ƥץ󥽡եȥȤ󶡤ޤ
+ޥ˥奢Ƥˡޤ mcpp ħҲ𤷤Ƥޤ

+

:

+

*1 mcpp V.2.6.3 ϡѥ뤺ߤβफΥХʥꡦѥå⼡ΥȤ󶡤褦ˤ

+
+

http://mcpp.sourceforge.net/

+
+
+ +

1.1. ϣӤϤФʤ portable ʥ

+

Linux, FreeBSD, Windows ¿ΣϣӤ򥵥ݡȤƤ portable ʥץץåǤꡢΥ Standard C (ANSI/ISO/JIS C) νϤޤ Standard C++ νϤǤХѥǤ빭 portability äƤޤ饤֥ؿϸŵŪʤΤȤäƤޤ
+ƽϤ˰ܿ뤿ˤϡ¿ξ硢إåեΤĤΥޥؤƥѥ뤹ǤߤޤǰξǤ⥽ե˿Խ­٤Ǥ

+

Multi-byte characterʴˤνܤ EUC-JP, shift-JIS, ISO2022-JP GB-2312Ѥ Big-5ڹ KSC-5601 (KSX 1001) бƤꡢUTF-8 ȤޤShift-JIS, ISO2022-JP, Big-5 ξ硢ѥΤǧʤϤǤϡmcpp 䤤ޤ

+
+ +

1.2. Τ Standard C ⡼ɤ˲äƤ¾γƼ⡼ɤ

+

Standard C ư⡼ɤΤۤˡK&R 1st. Υ⡼ɤ "Reiser" model cpp Υ⡼ɤ⤢ꡢˤϼ post-Standard ͤΥ⡼ɤޤǤޤC++ ΥץץåȤư¹Իץ⤢ޤ
+Standard C ⡼ɤϴ¸¿ΥץץåȰäơʤ˼ƤĤǤC90, C95, C99, C++98 Τ٤ƤбƤޤStandard C ץץ reference model ȤʤΤܻؤƺäƤޤεʤΥСϼ¹Իץǻꤹ뤳ȤǤޤ*1

+

ۤˤĤͭѤʳĥǽäƤޤޥŸ #if ɾȥ졼 #pragma MCPP debug ⤢ޤإåե "pre-preprocess" ƤȤǤޤ
+ĤͭѤʼ¹ԻץƤޤ˥󥰤Υ٥ꤹ륪ץ䡢include directory ꤹ륪ץǤ
+ˤɤʴְ㤤äƤ mcpp ˽긫ʥåФꤻΤǤ狼䤹ǥåФŬڤʽ򤷤ޤܿȤʤˤĤƤٹȯޤ
+ʼǤʤ顢ɥŪŪʤƤߤޤ
+ܺ٤ʥɥȤ°Ƥޤ

+

mcpp η򶯤Ƶ󤲤С®٤٤ȤǤGCC 3.*, 4.* / cc1 ٤ȣܤ飳ܤλ֤ޤBorland C 5.5 / cpp Ʊ餤®٤ǡإåե pre-preprocess εǽȤȤ⤦®ʤΤǡä٤ۤǤϤޤΤǤ뤳ȡportable ʥǤ뤳ȡʤǤư뤳Τˤϡ٤ν֤Ϥ򤨤ʤȹͤƤޤ

+

ʤץץå Standard C ٤ƥȤ뤿θڥåȤǤ "Validation Suite for Standard C Preprocessing"β⤪ӤȤäƥƥȤƼץץåκ cpp-test.html mcpp ȤȤ˸Ƥޤ򸫤ȡStandard C פȾΤ¸Υץץåˤ¿꤬뤫狼ޤ

+

mcpp V.2.3 γȯǡڥå V.1.3 ȤȤˡʵ(IPA) ʿǯ١̤Ƨեȥ¤ȡפ˿ ͵ץȥޥ͡ˤäƺ򤵤졢2002/07 - 2003/02 δ֤ IPA λȿУͤνΤȤ˳ȯʤޤѸǥɥȤ⤳ΥץȤǡͭ²ҡϥ˻䤬ȥƥäƤǤäΤǤ*2
+mcpp Ϥʿǯ٤ˤ̤Ƨեȥ¤ȡפ˰ PM ˤäƷ³ƺ򤵤졢V.2.4 ؤ update Ȥʤޤ
mcpp ȸڥåȤϤ˲ɤκȤ³Ƥޤ

+

:

+

*1 øεʤȤƤ ISO/IEC 9899:1990 (JIS X 3010-1993) ĹȤƤ1999 ǯˤ ISO/IEC 9899:1999 򤵤줿ǤԤ C90Ԥ C99 ȸƤ֡Ԥ ANSI X3.159-1989 ܹԤΤʤΤǡ̤ˤ ANSI C ޤ C89 ȸƤФ뤳Ȥ⤢롣ޤISO/IEC 9899:1990 + Amendment 1995 C95 ȸƤ֤Ȥ롣C++ εʤ ISO/IEC 14882:1998 ӤǤǤ ISO/IEC 14882:2003 ǡξԤ򤳤Ǥ C++98 ȸƤ֡

+

*2 ̤Ƨեȥ¤ȡ(Exploratory Software Project) γפϼΤȤΤ뤳ȤǤ롣

+
+

http://www.ipa.go.jp/jinzai/esp/

+
+

mcpp V.2.3 ʹߤΥӥɥȤȸڥå V.1.3 ʹߤϼΤȤ֤Ƥ

+
+

http://www.m17n.org/mcpp/

+
+

2006/04 ˼ΤȤ˰ܤä

+
+

http://mcpp.sourceforge.net/

+
+

mcpp θŤСǤ cpp V.2.2 Ӹڥå V.1.2 ϥ٥ҤΥȤμΤȤˤ롣dos/prog/c Ȥǥ쥯ȥƤ뤬MS-DOS ѤǤϤʤ UNIX, WIN32/MS-DOS бƤ롣

+
+

+http://www.vector.co.jp/soft/dos/prog/se081188.html
+http://www.vector.co.jp/soft/dos/prog/se081189.html
+http://www.vector.co.jp/soft/dos/prog/se081186.html
+

+

Υ֥եΥƥȥեϡVector ΤΤ Windows ˹碌ơԥɤ [CR]+[LF] shift-JIS encode Ƥ롣SourceForge ΤΤ V.2.5 ޤǤ UNIX Ϥ˹碌Ʋԥɤ [LF] EUC-JP Ǥ롣V.2.6 [CR]+[LF] / shift-JIS zip Ǥ[LF] / EUC-JP tar.gz ǤΣΥ֥ե֤褦ˤ

+
+ +

1.3. Υޥ˥奢ɽˡ

+

Υޥ˥奢ϤĤƤϥƥȥեǤV.2.6.2 html եѤޤ
+Υޥ˥奢ǤϼΤ褦˥եȤȤʬƤޤ

+
    +
  • source:
    +եȤϡɤҤӥޥɥ饤Ϥ򼨤Τ˻Ȥޤ
    +
  • __STDC__:
    +եȤϡɸޥӲ餫Υޥ򼨤Τ˻Ȥޤ
    +
  • STD:
    +Italic եȤ mcpp system.H ȤեޥɽޤΥޥ˥奢ǤϤ̾ mcpp μɽ뤿˻ȤޤΥޥ mcpp 򥳥ѥ뤹˻Ȥǡmcpp μ¹ԥץˤ¸ߤƤʤȤդƤ
    +
+
+ +

2. ưΥץȴĶ

+ +

2.1. mcpp ¹ԥץΣΥӥɤȣĤư⡼

+

mcpp ˤϡɤνϡʥѥˤΩñȤư compiler-independent-build ȡνϤΥץץå˼ääư build (compiler-specific-build) ȤޤԤϥץץ򤹤뤿ΤΤǡνϤ򲿤餫ΥѥͿƤѥ뤵Ȥϸ¤ޤ󡣸ԤνϤǥѥȥ󥯤ޤǹԤΤΤǡmcpp νϤϤΥѥλͤ˹碌Ƥޤ*1, *2

+

ԤǤϥץλͤ mcpp 򥳥ѥ뤷ϤΤˤ餺ۤܰǡOS ˤ㤬ǤԤǤ϶̤λͤȤȤˡϤȤθߴΤλͤ¿ꡢʬϽϤȤ˰ۤʤäƤޤCompiler-independent ǤΥץϽǤǤܻۤȤޤϤΥץȤξͤ򤱤뤿̤ΥץˤʤäƤΤ⤢ޤ
+ʤΥɥȤǡGCC ѡסVisual C ǡɽƤΤϤ⤽줾 GCC build, Visual C build ΰ̣Ǥ

+

Compiler-independent ǤǤǤǤ⡢mcpp ˤϤĤư⡼ɤꡢ줾ۤʤץץͤưޤ⡼ɤˤϼΣĤޤ

+
    +
  • STD
    +Standard C (C90, C99, C++98) ΥץץͤǤ줬ǥեȤΥ⡼ɤǤ
    +
  • COMPAT
    +std ⡼ɤѼǡƵŪޥ򵬳ʤ⤵Ÿޤ
    +
  • POSTSTD
    +kmatsui ˺äץץͤǡStandard C μӤʤñ㲽ΤǤ
    +
  • KR
    +C90 K&R 1st. ΥץץͤǤ
    +
  • OLDPREP
    + "Reiser" model cpp ưͤǤ
    +
+

Υ⡼ɤꤹ륪ץϼ̤Ǥ +⡼ɤ򲿤ꤷʤ -@std ꤷȤˤʤޤ

+
    +
  • -@std
    +STD
    +
  • -@compat
    +COMPAT
    +
  • -@post, -@poststd
    +POSTSTD
    +
  • -@kr
    +KR
    +
  • -@old, -@oldprep
    +OLDPREP
    +
+

STD, COMPAT, POSTSTD 碌 Standard ⡼ɡKR OLDPREP 碌 pre-Standard ⡼ɤȸƤ֤ȤˤޤޤCOMPAT STD ȤۤȤƱʤΤǡäǤʤ¤ STD ˤ COMPAT ޤᡢɬפʾ COMPAT ˸ڤޤ*3

+

Standard pre-Standard Υ⡼ɤȤǤϡޥŸˡΰ㤤¿ޤC90 pre-C90 Ȥΰ㤤Ȼפäƴְ㤤ޤ󡣺Ǥ礭ʰ㤤ϡؿͥޥʰդޥˤŸǡ˥ޥޤޤƤ硢Standard ⡼ Ǥϰ˴ŸƤ鸵ޥִꥹΥѥ᡼֤ΤФơpre-Standard ǤŸ˥ѥ᡼ִƥŸ뤳ȤǤ
+ޤStandard ⡼ ǤľܤˤܤˤޥκƵŪŸϸ§ȤƤޤpre-Standard ǤϺƵŪʥޥȡŸ̵ºƵƥ顼Ȥʤޤ

+

ˤ \ ΰ⡼ɤˤäưۤʤꡢStandard ⡼ Ǥ trigraph θ塢tokenization <backslash><newline> sequence ޤpre-Standard ⡼ Ǥʸƥˤ #define Ԥˤ˸¤äƤޤ

+

tokenizationʥȡʬ䡢ȡڤФˤ⡼ɤˤä̯˰㤤ޤ
+Standard ⡼ Ǥϡtoken base ǤưפȤ¤ tokenization ԤޤŪˤϡStandard ⡼ ǤϡޥŸȤ space ơ token ȤΰտޤʤϢ뤬ȯΤɤޤpre-Standard ⡼ ŪصŪŪ tokenization ȡcharacter base ǤΥƥִפˤޥŸˡκפĤƤޤˤĤƤϡ cpp-test.html#2
+Standard ⡼ Ǥ preprocessing number Ȥͥȡ̤˰ޤpre-Standard Ǥϡͥȡϣäȡ󤪤ưȡƱǤǤ 'U', 'u', 'LL', 'll'ưǤ 'F', 'f', 'L', 'l' ϥȡΰȤǧޤ
+磻ʸʸƥʸ Standard ⡼ ǤñΥȡȤǧޤ

+

Digraph, #error, #pragma, _Pragma() operator Standard ⡼ ǤʤȻȤޤ-S <n> ץstrict-ansi ⡼ɡˤ -+ ץC++ ץץåȤưˤ Standard ⡼ ǤȤޤ󡣻ޥ __STDC__, __STDC_VERSION__ Standard ⡼ λ졢pre-Standard λޤ
+#if defined, #elif pre-Standard ǤϻȤޤ#include, #line ΰ˥ޥȤȤ pre-Standard ǤϤǤޤ󡣻ޥ __FILE__, __LINE__, __DATE__, __TIME__ pre-Standard λޤ
+¾ǡ#assert, #asm (#endasm), #put_defines, #debug pre-Standard ⡼ɤǤȤޤ
+#if Standard ⡼ Ǥ long long / unsigned long long ɾޤpre-Standard ⡼ Ǥ (signed) long ɾޤ#if sizeof (type) ȤΤ pre-Standard Ǥ

+

Trigraph UCN (universal-character-name) ϡSTD ⡼ɤǤȤޤ

+

ǥåν⡼ɤˤäƾäƤޤ

+

ʾ˽Ҥ٤Ȱʳ K&R 1st. Standard C ȰۤʤΤʵΤʤȤˤĤƤϡpre-Standard ⡼ Ǥ C90 ε˽ޤ

+

OLDPREP ⡼ɤ KR ⡼ɤȤΰ㤤 POSTSTD, COMPAT ƥ⡼ɤ STD ⡼ɤȤΰ㤤ϼΤ褦ʤΤǤ

+
    +
  • OLDPREP
    +Τ褦ʻͤθŤ "Reiser model cpp" ư򤹤old preprocessor ΰաˡ
    +
    +
      +
    1. Ȥ򣱸Ĥ space ǤʤĤ space Ѵ롣Ѵϸ§ȤƺǸνϻ˹Ԥ롣ޥǤľ˹Ԥ롣
      +
    2. ޥִꥹʸƥޤʸꡢˤɤ줫Υѥ᡼̾ȰפʬϡΥޥθƤӽФκݤˤʬϡѥ᡼б֤롣פʬȤΤϡξü " ޤ ' ϤȤȡȤƸ˰פȡΤȤǤ롣
      +
    3. #else, #endif ιԤ˲񤤤ƤäƤ⥨顼ˤ̵뤹б #if MACRO, #ifdef MACRO MACRO 񤤤ꤹˡ
      +
    4. ƥĤ " ' ʤϡĤƤȤߤʤunterminated string literal, unterminated character constant Υ顼ȯʤˡ
      +
    5. # 123 ȤԤ #line 123 ƱΤȤư
      +
      +
    +
  • COMPAT
    +ƵŪޥ򵬳ʤ⤵Ÿ롣 +ʤƵŪޥŸ˺ݤơƱ̾ޥκִػߤϰϤ򵬳ʤⶹȤ롣
    +ƵŪޥŸεˤĤƤ cpp-test.html#3.4.26 򻲾ȤΤȡƵŪޥζ test-t/recurs.t 򻲾ȤΤȡ*4
    +
    +
  • POSTSTD
    +ϵʤ˼Τ褦ѹäΤǤ롣
    +
    +
      +
    1. Trigraphs ǧʤDigraph translation phase 1 ǡʤץץκǽѴƤޤToken ȤƤϰʤ
      +
    2. Tokenization token-base θ§ˤäñ㲽Ƥ롣 preprocessing token δ֤ token separator ȤƤ white space ʤϡ˼ưŪ a space ʤޥΥޥ̾ȼ '(' δ֤ˤʤˡäơ# 黻Ҥˤʸ󲽤Ǥ⤹٤Ƥ preprocessing token δ֤ˤ a space äʸ󲽤뤳Ȥˤʤ롣ޤޥκ˺ݤƤϡtoken separator ̵ͭˤʤʤ
      +
    3. ؿͥޥκ˺ݤƤϡѥ᡼̾ΰ㤤ˤʤ
      +
    4. #if ʸϻȤʤʥ顼ˤˡ
      +
    5. ؿͥޥŸ˴ؤִؿ͡פǤʤԵ§ʵ򥫥åȤƤ롣 +ʤƥϤΥޥִꥹȤоݤȤθ sequence ϼޤʤ
      +
    6. #include <stdio.h> Ȥ header name ̤̾˥󥰤Фclass 2 Υ˥󥰥ץǡˡޥ <stdio.h> η header name Ȥȡüʾˤϥ顼Ȥʤ뤳Ȥ롣#include "stdio.h" η侩롣
      +
    7. ޥǤϥޥִ̾ꥹȤȤδ֤ space ɬפȤ꤬ C99 ɲä줿εˤϽʤtokenization κݤ˼ưŪ a space Τǡˡ
      +
    8. UCN (universal-character-name) ǧʤޤidentifier multi-byte character ǧʤ
      +
    9. C++ Ǥϣ identifier operator operator ȤƤϰʤ
      +
    +
+

ʤΤۤ lang-asm ⡼ɤȤΤ⤢ޤ +ϥ֥饽 C Υȡǥ쥯ƥ֡ޥ줿§Ūʥ⡼ɤǤ +POST_STD ϤΥ⡼ɤˤʤ뤳ȤϤǤޤ󤬡ʳΥ⡼ɤϰΥץꤹ뤳ȤǤΥ⡼ɤˤʤޤ +λͤˤĤƤ 2.5 򸫤Ƥ

+

Ȥ mcpp μ¹ԥץˤϤĤλͤΤǡޥ˥奢դɤǤξϤǤϤޤ mcpp ζ̤Υץư⡼ɤˤäưۤʤ륪ץҤ١νǤƶ̤ΥץҤ١ΤȤǽǤνϤȤ˰ۤʤ륪ץ򵭺ܤޤ

+

:

+

*1 Τۤ subroutine-build ȤΤ⤢롣餫¾Υᥤץफ mcpp ֥롼ȤƸƤӽФΤǤ롣λͤ mcpp 򥳥ѥ뤷ˤä compiler-specific-build ޤ compiler-independent-build Τɤ餫ƱˤʤΤǡΥޥ˥奢ǤäˤȤꤢʤ +Subroutine-build ˤĤƤ mcpp-porting.html#3.12 򻲾ȤΤȡ

+

*2 SourceForge ΥȤ󶡤ХʥꡦѥåϤ٤ compiler-independent-build Ǥ롣

+

*3 V.2.5 ޤǤ Standard ⡼ɤ pre-Standard ⡼ɤȤǼ¹ԥץब̤ˤʤäƤV.2.6 飱Ĥ礵줿

+

*4 GCC, Visual C++ μפʽϤȤθߴΤΥץǤ롣'COMPAT' "compatible" ΰ̣Ǥ롣

+
+ +

2.2. ưΥץλˡ

+

ʲεܤǤϡ<arg> Ȥˡ arg 桼Ϥ٤ǤդΰǤ뤳Ȥ򼨤[arg] arg άǽʰǤ뤳Ȥ򼨤ޤɤˤƤ <, >, [, ] ʸΤΤϤƤϤޤ

+

mcpp ư񼰤ϼηǤmcpp Ȥ̾ mcpp Υ󥹥ȡλˤäƤ̤̾ˤʤޤ

+
+mcpp [-<opts> [-<opts>]] [in_file] [out_file] [-<opts> [-<opts>]]
+
+

out_fileʽϥѥˤά줿ϡ-o ץ󤬻ꤵʤ¤ɸϤ˽Ϥޤin_fileϥѥˤά줿ɸϤϤޤǥåϡ-Q ץ󤬻ꤵʤ¤ɸ२顼Ϥ˽Ϥޤ
+Τɤ줫Υե뤬ץǤʤϡ顼åФƽλޤ

+

ɬפȤ륪ץ˰ʤϥ顼Ȥʤޤ-M ץ̡ˡ
+ɬפȤ륪ץǤ -I<arg>, -I <arg> ΤɤͭǤʥץʸȰδ֤ space ϤäƤʤƤɤˡ
+Τʤץ -Qi, -Q -i ΤɤͭǤʣĤ '-' θˤĤʤƤ̡ '-' դƤɤ-M ϤĤʤƤϤʤˡ
+ƱΥץʣꤵ줿硢-D, -U, -I, -W ץϤ줾줬ͭǤ-S, -V, -+ ϣܰʹߤ̵뤵ޤ-2, -3 ϤΤӤ˻ͤȿžޤ¾ΥץϺǸ˻ꤵ줿ΤͭǤ

+

ʸȾʸ϶̤ޤ
+륹å饯 Windows Ǥ - Ǥꡢ/ ǤϤޤ
+ʥץꤹ usage ʸɽΤǡmcpp -? Ȥ뤳ȤǡȤ륪ץΤ뤳ȤǤޤUsage ʸΤۤˤ⤤ĤΥ顼åޤƤϤ⼫ΤΤǤΤǡϾάޤ

+
+ +

2.3. ̤Υץ

+

mcpp ư⡼ɤϤˤʤ̤Υץϼ̤Ǥ

+
    +
  • -C
    +ΥȤϤ롣ǥХåͭѤʥץǤ롣ȤϥԤƬ˰ܤƽϤ롣ȤνϥޥŸǥ쥯ƥ֤ν˹ԤΤǤꡢȤϥޥƤӽФˤ뤫⤷ʤǤ롣
    +
    +
  • -D <macro>[=[<value>]]
    +
  • -D <macro(a,b)>[=[<value>]]
    +ޥ macro 롣ƤޥǤ __STDC__, __STDC_VERSION__, __FILE__, __LINE__, __DATE__, __TIME__, __cplusplus ʳǤСΥץѹǤC99 __STDC_HOSTED__ GCC V.3 Τ褦 -D ץϤ⤢Τǡ㳰Ū˵Ĥˡ=<value> ꤵƤ value άƤ 1 bcc32 ǤϾάˤϣĤΥȡΤǡȤϰ㤦Ȥաˡ= ˤ϶ƤϤʤ= θ˶򤬤ФΥޥϣĤΥȡ롣
    +ΥץǤϡĤޥǤ롣
    +ΥץϲǤǤ롣 +
    +
    +
  • -e <encoding>
    +Multi-byte character encoding <encoding> ѹ롣 +<encoding> ˤĤƤ 2.8 򻲾ȤΤȡ +
    +
    +
  • -I <directory>
    +Include directory Υѥ̤ directory ꤹʥѥˤĤƤ 4.2 򻲾ȡˡdirectory ̾ space ޤޤϡdirectory ̾Τ " " ǰϤळȡ
    +
    +
  • -I 1, -I 2, -I 3
    +#include +"header" ηΡ<header> ηǤϤʤ˥ǥ쥯ƥ֤Ǻǽ˥ǥ쥯ȥδꤹ롣-I1 Ǥϥȥǥ쥯ȥꡢ-I2 Ǥϥեʥ󥯥롼ɸˤΤǥ쥯ȥꡢ-I3 ǤϤ򥵡ʾܺ٤ 4.2 򻲾ȡˡ
    +
    +
  • -j
    +ǥåνϤǤϥղþϽϤԤοǥåϤʥǥեȤǤϣԤοǥå³ơΥԤɽ롣ե뤬 include 줿ΤǤϡinclude ιԤ缡ɽ롣ޥ˴ؤǥåǤϡŸΥޥ缡ɽˡ
    +GCC testsuite ǻθڥåȤȤϡΥץꤷơGCC Ʊǥåˤɬפ롣
    +
    +
+

-M* ץ makefile Ѥΰ¸طԤϤΤǤʣΥե뤬硢٤ƤΥˤĤƤ -M* ץդƼ¹ԤơνϤޡȡmakefile ɬפʰ¸طҹԤޤΥץ GCC ΤΤ˹碌Ƥޤ㤤ޤ*1

+
    +
  • -M
    +եΰ¸ط򵭽ҤԤϤ롣ϥޥɥ饤ǻꤵ줿ϥե롢줬ꤵƤʤɸϤǤ롣ԤĹޤꤿࡣ̾Υץץ̤ϽϤʤ
    +
    +
  • -MM
    +-M ȤۤƱǤ뤬ΥإåϽ񤭽Фʤ
    +
      +
    1. #include <stdio.h> η include Ρ
      +
    2. #include "/include/stdio.h" ХѥǻꤵƤΡ
      +
    3. #include "stdio.h" ηǤ뤬ȥǥ쥯ȥʽϤ -I <n> ץˤäƤϥΤǥ쥯ȥˤȯ줺ƥ include ǥ쥯ȥȯ줿Ρ-I <directory> ץĶѿǻꤵ줿ǥ쥯ȥޤˡ
      +
    +GCC-specific-build Ǥ GCC Ʊͤˡ񤭽ФʤΤϥƥإåǤ롣

    +
  • -MD [FILE]
    +-M ȤۤƱǤ뤬̾Υץץ̤⥳ޥɥ饤ǻꤵ줿եޤɸϤ˽Ϥ뤳ȤäƤ롣ޤ¸طԤνϡ FILE ꤵ줿ϤΥեȤʤꡢꤵƤʤϥե̾ .c .d ѤեȤʤ롣
    +
    +
  • -MMD [FILE]
    +-MD ȤۤƱǤ뤬-MM Ʊͤ˥ƥإåȤߤʤΤϽ񤭽ФʤȤäƤ롣¸طԤν -MD [FILE] Ʊ
    +
    +
  • -MF FILE
    + FILE ˤ롣-MD FILE, -MMD FILE ͥ褹롣
    +
    +
  • -MP
    +"Phony target" Ϥ롣Phony target ȤΤϡ󥯥롼ɤե룱ģĤˤĤơ켫Τ¸ʤåȤȤơΤ褦˵ҤΤǤ롣
    +
    +test.o: test.c test.h
    +test.h:
    +
    +
  • -MT TARGET
    +åȤ̾̾ foo.o ǤϤʤ TARGET ˤ롣-MT '$(objpfx)foo.o' ȤץǤϼΤ褦ʹԤϤ롣
    +
    +$(objpfx)foo.o: foo.c
    +
    +
  • -MQ TARGET
    +-MT ƱͤǤ뤬make ˤȤä̤ʰ̣ʸϼΤ褦 quote 롣
    +
    +$$(objpfx)foo.o: foo.c
    +
    +
  • -N
    +'_' ǻϤޤΤޤƤ٤Ƥλޥ̵ˤ롣ʤ׵ᤵƤޥ __MCPP Ͻʤ׵ᤵƤޥȤϡ__FILE__, __LINE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__, C99 __STDC_HOSTED__ C++ __cplusplus Ǥ롣__MCPP undefine -U ץȤȡˡ
    +
    +
  • -o <file>
    +ץץΥ file ˽Ϥ롣άϥѥȤʤΤǡ̵Ƥ褤ץǤ뤬ѥɥ饤ФˤäƤϤΥץȤΤ롣
    +
    +
  • -P
    +ѥΤ˹ֹϤά롣äΥץץåʳӤήѤ˻ȤץǤ롣
    +
    +
  • -Q
    +ǥåʥȥǥ쥯ȥΡmcpp.err Ȥ̾Υե˽Ϥmcpp.err ϸ˥ڥɤƤ椯Τǡ뤳ȡˡ
    +
    +
  • -U <macro>
    +Ƥޥ macro ä__FILE__, __LINE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__, C99 ⡼ɤǤ __STDC_HOSTED__ -+ ץǵư __cplusplus ϼäʤˡ
    +
    +
  • -v
    +mcpp ΥС󤪤ӥ󥯥롼ɥǥ쥯ȥΥɸ२顼Ϥ˽Ϥ롣
    +2.4 ǽҤ٤ -K ץ󤬻ꤵ줿ޤ 3.5.8 ǽҤ٤ #pragma MCPP macro_call ꤵ줿ϡΥץϤΰ̣Ѥ롣
    +
    +
  • -W <level>
    +Warning Ϥ٥ level ˻ꤹ롣 +level 0 ޤ 1, 2, 4, 8, 16 ΤǤդͤ OR ȤäΤǤ롣 +1, 2, 4, 8, 16 Ϥ줾 warning class ̣롣 +㤨 -W 5 Ǥ class 1, 4 warning Ϥ롣 +0 ξ warning ϽϤʤ +Υץʣꤵȡ٤Ƥλ OR Ȥ롣 +㤨 -W 1 -W 2 -W 4 -W 7 ƱǤ롣 +-W 7 -W "1|2|4" Ȥ뤳ȤǤ| ѥפȲᤵʤ褦 " " ǰϤɬפˡ +-W "3|4" ȤƤ⤫ޤʤ +-W 0 ꤵ줿ϡ¾ -W ץϤ٤ƥ󥻥뤵롣 +Υץꤷʤ -W 1 ꤷΤƱǤwarning Ƥ 5.5 - 5.9 򻲾ȡˡ
    +
    +
  • -z
    +#include Ǽޤ줿եΥץץ̤ϽϤʤ +ޥ롣 + #include ԤΤΤϤ롣 +Include 줿ե #include ԤϽϤʤ +ץץΥǥХå˻ȤץǤ롣
    +
+

:

+

*1 GCC Ȱ㤦ΤϼǤ롣

+
    +
  1. -MG ץϤʤץλʣ뤫Ǥʤäơɤͤάˡ +-M ץǤ⡢󥯥롼ɥե뤬Ĥʤϥ顼ˤϤʤ뤬¸طԤϽϤΤǡѤǤ롣
    +
  2. GCC-specific-build GCC ˹碌Ƥ뤬ʳǤϡ-MM, -MMD ץǽإåϰϤ
    +
+
+ +

2.4. mcpp Υ⡼ɤˤ륪ץ

+

mcpp ˤϤĤư⡼ɤޤλͤ 2.1 򻲾ȤƤ +
+Υޥ˥奢ǤϳƼΥ⡼ɤλͤ¤٤ƵܤƤΤǡˤʤäƤޤޤ󤷤ƤޤʲǽФƤ DIGRAPHS_INIT, TRUE, FALSE, etc. ʸ̾__ ǻϤޤʤΡˤ italic ɽƤΤϤ٤ system.H ޥǤΥޥϤޤǤ mcpp Ȥ򥳥ѥ뤹˻ȤǡǤä mcpp ¹ԥץˤϤΥޥϻĤäƤϤޤ󡣴㤤ʤ褦ˤƤ

+

Standard ⡼ɤǤϼΥץ󤬻Ȥޤ

+
    +
  • -+
    +C++ ΥץץåȤư롣ޥ __cplusplus ʤͤ system.H Ƥ롣ǥեȤ 1ˡ// ԤιޤǤ򥳥ȤȲᤷ::, .*, ->* 򤽤줾ñΥȡȤǧ롣#if Ǥ true, false ȤȡϤ줾 1, 0 ɾ롣__STDC__, __STDC_VERSION__ ƤСʤGCC ǤǤ GCC ȤθߴΤ __STDC__ Ϻʤˡ_ ǻϤޤʤޥ롣extended characters UCN ؤѴϤʤ*1, *2
    +
    +
  • -2
    +Digraphs νȿž롣DIGRAPHS_INIT == FALSE ξϤ digraph ǧ褦ˤʤꡢդξǧʤʤ롣
    +
    +
  • -h <n>
    __STDC_HOSTED__ ͤ <n> 롣
    +
  • -S <n>
    +C Ǥ __STDC__ ͤ <n> ѹ롣C++ Ǥ̵뤵롣<n> [0,9] ϰϤοͤǤʤФʤʤ<n> 1 ʾǤС_ ǻϤޤʤޥunix, linux ˤ̵ˤ롣
    +S __STDC__ ΰ̣Ǥ롣Υץꤷʤȡ__STDC__ ϥǥեȤͤȤʤ̾ 1ˡ
    +GCC ǤǤ -pedantic, -pedantic-errors, -lang-c89 Ǥ -S1 ꤷƱȤˤʤΤǡμ -S ̵뤵롣 +ޤΥץǤ unix, linux, i386 ʰȿλޥ̵ˤʤʤ +GCC ȤθߴΤǤ롣 +λޥ -ansi ޤ -std=iso* ץǽ̵ˤʤ롣
    +
    +
  • -V <value>
    +C Ǥ __STDC_VERSION__C++ Ǥ __cplusplus Ȥޥͤꤵ줿 <value> ѹ롣ξ <value> long ͤȤʤC95 ǤϤͤ 199409LC99 Ǥ 199901LC++ Standard Ǥ 199711L Ǥˡ__STDC__ 0 Ƥ __STDC_VERSION__ ɬ 0L Ȥʤꡢ-V ̵Ǥ롣
    +C ǤϡΥץꤷʤȡ__STDC_VERSION__ system.H STDC_VERSION ͤȤʤGCC V.2.7 - V.2.9 Ǥ 199409LʳǤ 0Lˡ-V199901L Ȥ __STDC_VERSION__ >= 199901L ˤʤäϼΤ褦 C99 λͤȤʤ 3.7 ȡˡ
    +
    +
      +
    1. // ޤǤ򥳥ȤȤư +*3
      +
    2. Preprocessing-number e+, E+, e-, E- Ʊͤ p+, P+, p-, P- Ȥ sequence ǧ롣ưΥӥåȥѥ 0x1.FFFFFEp+128 Ȥդˡʤɽ뤿ΤΤǤ롣
      +
    3. _Pragma( "foo bar") Ƚ񤯤 #pragma foo bar Ƚ񤤤ΤƱ̤ _Pragma operator ͭˤʤ롣
      +
    4. EXPAND_PRAGMA Ȥޥ TRUE ƥѥ뤵줿 mcpp Ǥϡ#pragma ԤΰϡSTDC ޤ mcpp ǻϤޤΤǤʤ¤ޥŸоݤȤʤʥǥեȤǤ Visual C, Borland C ǰʳǤ EXPAND_PRAGMA == FALSE ǤꡢޥŸʤˡ
      +
    5. ̻ҡʸʸƥ롦pp-number ˤ UCN (universal-character-name) sequence ̤ʤ STD ⡼ɤ˸¤ˡ
      +
      +
    +ʤѰޥ C99 λͤǤ뤬C90 C++ ǤȤ褦ˤƤ롣*4
    +C++ Ǥ -V199901L Ȥ __cplusplus >= 199901L ˤȡC99 ߴ⡼ɤȤʤꡢ嵭 2,3,4 εǽĥԤ1 ̵ͭ5 ϤۤƱ͡ˡ mcpp ȼγĥǤꡢC++ Standard ˤϰȿ롣
    +ʤΥޥ __STDC__, __STDC_VERSION__, __cplusplus λ -D ץϻȤʤ̤Υ桼ޥȶ̤뤿Ǥ롣
    +
+

STD ⡼ɤǤϼΥץ󤬻Ȥޤ

+
    +
  • -3
    +Trigraph νȿž롣 +TRIGRAPHS_INIT == FALSE ξϤ trigraph ǧ褦ˤʤꡢդξǧʤʤ롣
    +
  • -K
    +ޥ˴ؤ򥳥Ȥ˽񤭹ǽϤ֥ޥ⡼ɡ(macro notification mode) ꤹ롣 +Υ⡼ɤǤϡץץνϤ鸵ΥΥޥΰ֤Τ뤳ȤǤ롣 +Υ⡼ɤ C/C++ refactoring tool Τ˼줿ΤǤ롣 +C/C++ ˤϥץץȤեΤ뤳Ȥ refactoring tool ˤȤäƺΥ⡼ɤȤХץץνϤ饽ƹ뤳ȤǤ롣 +ˡϤ򤽤Τޤ޺ƥץץƥѥ뤹뤳ȤǤ롣*5
    +Υ⡼ɤϼ pragma ǻꤹ뤳ȤǤ롣 +
    +#pragma MCPP debug macro_call
    +
    +-K ץϤ pragma 򥽡Ƭ˽񤤤ΤȤۤƱ̤ġ +pragma ǤϻޥϽϤʤ +Macro notification λͤˤĤƤ 3.5.8. #pragma MCPP debug macro_call 򻲾ȤΤȡ
    +Υ⡼ɤǤϼ -k ץ󤬼ưŪ˻ꤵ롣 +Υ⡼ɤƱ -v ץ󤬻ꤵ줿 -v ץϤΰ̣Ѥmacro notification Ƥܺ٤ˤʤ롣 +ޤ-a (-x assembler-with-cpp) ޤ -C ץ󤬻ꤵ줿ϡ-K ץϼưŪ̵ˤʤ롣*6
    +

    +
  • -k
    + horizontal white spaces (space, tab) 򰵽̤ˤΤޤ޽Ϥ롣 +ȤƱĹ spaces Ѵ롣 +ȥץץνϤȤ column ֤бݻ뤿ΥץǤ롣 +ޥȰ֤뤬-K ץȤȤ⸵ΰ֤Τ뤳ȤǤ롣*7
    +
+

:

+

*1 C++ __STDC__ ƤΤϥȥ֥θǤꡢɤͤǤϤʤGCC ΥɥȤˤȡإåե¿ __STDC__ Ƥ뤳ȤԤƤΤǡC++ Ǥ⤳Ƥɬפ롢ȤΤȤǤ롣ϥإåեνȸ虜򤨤ʤC90, C99, C++ ˶̤ʬˤϡ#if __STDC__ || __cplusplus Ƚ񤯤٤ʤΤǤ롣

+

*2 C++ Standard Ǥ C99 ȰäơUCN 硹ŪʰƤꡢȾüʼϤǤʤC 1997/11 draft Ǥ⤽ǤäUnicode 򤽤ޤƳ뤳Ȥˤϡô礭뤳꤬äƵǤ롣

+

*3 // C90Standard ⡼ɤξˤǤ⥳ȤȤư˥󥰤Ф

+

*4 GCC ȤθߴΤǤ롣

+

*5 GCC-specific-build mcpp 򥤥󥹥ȡ뤹ȡmcpp ˤץץϤ cc1 (cc1plus) -fpreprocessed ȤץդϤ褦ˤʤ롣 +ΥץϤץץߤǤ뤳Ȥ cc1 ΤǤ뤬Ǥ⥳ȤϽ롣 +äơ-K ץη̤ cc1 -fpreprocessed ץդϤƺ٤ʤ +ޤgcc (g++) ޥɤ -save-temps Ȥץդȡץץ̤ *.i (*.ii) ե뤬ĤΤǡ refactoring tool ǽ뤳ȤǤ롣

+

*6 -x assembler-with-cpp ץǤ C/C++ ΥǤϤʤ GCC Ѥ *.S ե뤬եȤƻȤ뤬 *.S եΥץץǤϡ-K ץȤäƥȤȥ֤뤿ᡢ֥Ǥʤʤ뤫Ǥ롣 +ޤ-C ץˤ륳Ȥ -K ץ줿Ȥʶ路ȤΤǡƱˤϻȤʤ

+

*7 ΥץȤäƤ⡢üʾˤΤбݻʤȤ롣 +<backslash><newline> ˤϢȹԤޤȤˤϢ뤬Ϣ³䡢Ȥ 256 ԰ʾ³ʤɤǤ롣 +ʤΥץꤷƤ⤷ʤƤ⡢'\v', '\f' space Ѵ롣

+
+ +

2.5. νϰʳνϤ˶̤Υץ

+

UNIX ϤΥƥǤϼΣĤΥץ󤬻Ȥޤ +ΩǡGCC Ǥ˶̤Ǥ +GCC ǤǤ GCC бƤʤȥ顼ˤʤޤ

+
    +
  • -m32
    +ޥ 32 ӥåѤˤ롣 +CPU x86_64 ޤ ppc64 ξ硢ǥեȤǤ 64 ӥåѤλޥȤ뤬ΥץꤹȤ줾 i386, ppc ѤΤΤȤ롣
    +
  • -m64
    +ޥ 64 ӥåѤˤ롣 +CPU i386 ޤ ppc ξ硢ǥեȤǤ 32 ӥåѤλޥȤ뤬ΥץꤹȤ줾 x86_64, ppc64 ѤΤΤȤ롣
    +
+ +

GCC ϥץ¿ΤǡGCC ǤǤϤȤξͤ򤱤뤿ˤĤΥץ¾νϤȤϰ㤦ΤˤƤޤʤGCC ǥѥ뤷 mcpp Ǥ compiler-independent ǤΥץ¾νϤǥѥ뤷ΤƱǤʲΥץ GCC ǰʳ˶̤ΤΤǤ

+
    +
  • -a
    +Υ֥饽˸뼡Τ褦ʵˡ򥨥顼ˤ̤
    +
      +
    1. +
      +#APP
      +
      +

      Τ褦 # μ identifier äΥǥ쥯ƥ֤˹פʤ硢ιԤ򤽤Τޤ޽Ϥ롣

      +
    2. +
      +# + any comment.
      +
      +

      Ȥä # μ identifier, pp-number ʳΤΤԤϡ˥󥰤ȤȤ˼ΤƤ뤬顼ˤϤʤ

      +
    3. +
      +"Jugemjugem
      +gokouno
      +surikire"
      +
      +

      ȤäΤήιԤޤʸƥ
      +"Jugemjugem\ngokouno\nsurikire"
      +ȤԤϢ뤹롣

      +
    4. ## 黻Ҥˤ token Ϣ pp-token ȤƤ̵ token Ƥ⡢顼ˤʤ

      +
    5. ޥŸ space ʤ +η̡ pp-token ȰۤΤϢ뤵Ƥ⥨顼ˤʤ
      +
    +

    GNU Υʤɤ˻ΤǤGCC ǤǤϤΥץ -x assembler-with-cpp -lang-asm Ǥ
    +Υץ POSTSTD ⡼ɤǤϻȤޤ
    +Υ⡼ɤ򤳤Υޥ˥奢Ǥ lang-asm ⡼ɤȸƤӤޤ
    +Υ⡼ɤ mcpp C/C++ ʳΥƥȤΥޥץåȤƻȤŬƤޤxrdb ƤӽФ cpp ȤƻȤʤɤǤ

    +
  • -I-
    +ǥեȤ include directory 󥻥뤵졢Ķѿǻꤵ줿 directory ¾ -I ץǻꤵ줿 directory ͭȤʤ롣GCC ǤǤϤΥץ -I- ǤϤʤ -nostdinc Ǥ롣GCC Ǥ -I- ץϤޤäạ̈ġ 2.6 ȡˡ
    +
+
+ +

2.6. ϤȤΥץ

+

νϤǥץץåȤ mcpp ȤˤϡϤΥץץåΤŬ֤̾Ƥޤλˡ°ΥץץåäƤޤȤΤʤ褦餫̾Υե˥ԡƤƤ
+Linux, FreeBSD, CygWIN ǤˤĤƤ 3.9.5 򻲾ȤƤ +GCC 3.*, 4.* ǤˤĤƤ 3.9.7, 3.9.7.1 򻲾ȤƤMinGW ǤˤĤƤ 3.9.7.1 򻲾ȤƤ +

+

°Υѥɥ饤Ф̾ˡǤ mcpp ϤˡΤʤץ⤢ޤ
+Gcc Ǥ -Wp ȤޥƥץȤȡɤʥץǤץץåϤȤǤޤ㤨С

+
+gcc -Wp,-W31,-Q23
+
+

Ȥȡץץå -W31 -Q23 ȤץϤޤץץåϤץ -Wp, ³ , Ƕڤä¤٤ޤ*1, *2

+

¾νϤǤ⡢⤷ѥɥ饤ФΥСμΥޥƥץɲäۤɤǤ礦㤨С-P<opt> Ȼꤹ P Ȥä -<opt> ץץåϤ褦ˤƤȡɤʥץǤȤ褦ˤʤΤǤ

+

⤦Ĥˡϡ mcpp ǥץץơνϥե򥽡եȤƥѥϤ褦 makefile 񤯤ȤǤˡˤĤƤ 2.9, 2.10 򻲾ȤƤ +

+ +

mcpp νϤȤΥץϰʲ̤ǤCompiler-independent ǤˤϤ󤳤ΥץϤޤ

+

LCC-Win32 ǤǤϼΥץ󤬻Ȥޤ

+
    +
  • -g <n>
    __LCCDEBUGLEVEL <n> 롣
    +
  • -O
    __LCCOPTIMLEVEL 1 롣 +
    +
+

Visual C ǤǤϼΥץ󤬻Ȥޤ +

+
    +
  • -arch:SSE, -arch:SSE2
    _M_IX86_FP 򤽤줾 1, 2 롣 +
    +
  • -Fl <file>
    +GCC -include <file> Ʊ +
    +
  • -G<n>
    +<n> 3, 4, 5, 6, B ǤСޥ _M_IX86 򤽤줾 300, 400, 500, 600, 600 롣
    +
  • -GR
    _CPPRTTI 1 롣 +
    +
  • -GX
    _CPPUNWIND 1 롣 +
    +
  • -GZ
    __MSVC_RUNTIME_CHECKS 1 롣 +
    +
  • -J
    _CHAR_UNSIGNED 1 롣 +
    +
  • -RTC*
    +-RTC1, -RTCc, -RTCs, -RTCu Υץ󤬻ꤵȡޥ __MSVC_RUNTIME_CHECKS 1 롣
    +
  • -Tc, -TC
    +C ΥǤ뤳Ȥؼ롣 +ꤷʤƤƱ
    +
  • -Tp, -TP
    +-+ ץƱ +
    +
  • -u
    +-N ץƱ +
    +
  • -Wall
    +-W17 (-W1 -W16) Ʊ +
    +
  • -WL
    +-j ץƱ +
    +
  • -w
    +-W0 ץƱ +
    +
  • -X
    +-I- ץƱ +
    +
  • -Za
    _MSC_EXTENSIONS ̤ˤidentifier '$' Ȥʤ褦ˤ롣 +
  • -Zc:wchar_t
    _NATIVE_WCHAR_T_DEFINED, _WCHAR_T_DEFINED 򤽤줾 +1 롣
    +
  • -Zl
    _VC_NODEFAULTLIB 1 롣 +
    +
+ +

Mac OS X mcpp Ǥ GCC-specific-build Ǥ compiler-independent-build Ǥ⡢Υץ󤬻Ȥޤ

+
    +
  • -F <framework>
    +<framework> ǥ쥯ȥɸ framework ǥ쥯ȥͥ褷ƥ롣 +ɸ framework ǥ쥯ȥϥǥեȤǤ /System/Library/Frameworks, /Library/Frameworks Ǥ롣 +
+

Mac OS X GCC-specific-build ǤϼΥץ󤬻Ȥޤ

+
    +
  • -arch <arch>
    +åȥޥΥƥǥեȤΤΤ <arch> ѹ롣 +ˤäơޥΤĤѤ롣 +<arch> ȤͭʤΤ x86 μ¹ԥץǤ i386, x86_64ppc μ¹ԥץǤ ppc, ppc64 Τɤ줫Ǥ +gcc ޥɤˤϣĤΤɤǤϤ롣gcc ޥɤ -arch i386, -arch x86_64 Τɤ줫ꤹ x86 ѤΥץץåƤӽФ-arch ppc, -arch ppc64 Τɤ줫ꤹ ppc ѤΥץץåƤӽФˡ +
+

GCC (GNU C) ǤǤϡʲΡʤ 2.6 νޤǤΡ˥ץ󤬻ȤޤʤGCC ѤǤ __STDC__ 1 ˤƤΤǡ-S1 ץϻꤷƤ⤷ʤƤƱǤ

+

ޤmcpp Υ⡼ɤˤʤץϼΤȤǤ

+
    +
  • -$
    +-fno-dollars-in-identifiers Ʊ
    +
  • -b
    +ֹäΥΥǽϤ롣 +
    +ץץå饳ѥΤؤιֹμϤ
    +
    +#line 123 "filename"
    +
    +ȤäΥƱǤǤϤ̤Ǥ뤬ηϻȤʤϤ⤢롣mcpp ϤΤ褦ʽѤ build ǤϡνϤΥѥΤμǹֹϤΤǥեȤλͤǤ롣
    +νǤǤ⡢ΥץȤȡäΥΥǹֹϤ롣
    +ΥץϡϤ⤦٥ץץΤΤΤǡ#pragma MCPP preprocess Ȥ߹碌ƥإåեΡ֥ץץץפ򤹤˻Ȥ
    +
  • -dD, -dM
    +ץץκǸˤλͭʥޥ #define ԤηǽϤ롣-dM ץǤϥץץ̤ϽϤʤޤ줿ޥ⵬ʤɸޥǤʤнϤ롣-dD ץǤϥץץ̤Ϥ롣ޤޥϽϤʤ*3, *4
    +
  • -fexceptions
    __EXCEPTIONS 1 롣
    +-fno-exceptions ǤϤΥޥʤ
    +
  • -finput-charset=<encoding>
    +-e <encoding> ץƱGCC ϤΥץꤹ <encoding> UTF-8 Ѵ뤬mcpp ѴϤʤȤա
    +
  • -fno-dollars-in-identifiers
    +Identifier '$' ǧʤʥǥեȤǤǧˡ
    +
  • -fPIC, -fpic, -fPIE, -fpie
    __PIC__, __pic__ Ȥ 1 롣
    +
  • -fstack-protector
    __SSP__ 1 롣
    +
  • -fstack-protector-all
    __SSP_ALL__ 2 롣
    +
  • -fworking-directory
    +ϤΣܤ˥ȥǥ쥯ȥɽ̤ #line ԤϤ롣
    +
  • -I-
    +ΥץȸȤ -I <directory> ץλͤѤ롣Υץ -I ǻꤵ줿ǥ쥯ȥ #include "header.h" ηΥإåեΥˤȤ롣Υץθ -I ǻꤵ줿ǥ쥯ȥϤ٤Ƥ #include directive Υ˻Ȥ롣ޤ#include "header.h" ηǤ include Υǥ쥯ȥϥʤ
    +
  • -include <file>
    +ᥤΥեˡ<file> #include ʥƬ #include <file> Ƚ񤤤ΤƱ̤ˤʤˡ
    +
  • -iquote <dir>
    +<dir> #include "header.h" ηΥإåեΥѥ˲ä롣
    +
  • -isysroot=<dir>, -isysroot <dir>, --sysroot=<dir>, --sysroot <dir>
    +<dir> system header directory root Ȥߤʤ +ʤ<dir> system header directory path-list Ƭդ롣 +㤨Сinclude directory /usr/include <dir> /Developer/SDKs/MacOSX10.4u.sdk Ǥ /Developer/SDKs/MacOSX10.4u.sdk/usr/include Ȥ롣
    +
  • -isystem <dir>
    +<dir> 򥤥󥯥롼ɥѥ system-specific directory ˡsite-specific directory θˡ˲ä롣
    +
  • -lang-c, -x c
    +C ΥץץԤꤷʤƤƱ
    +
  • -mmmx
    __MMX__ 1 롣
    +-mno-mmx Ǥ __MMX__ ʤ
    +
  • -nostdinc
    +¾νϤǤ -I- ץƱ
    +
  • -undef
    +-N ץƱ
    +
  • -O?
    +? 0 ʳοǤХޥ __OPTIMIZE__ 1 롣
    +
  • -Wcomment, -Wcomments, -Wsign-compare
    +-W1 ץƱꤷʤƤƱ
    +
  • -Wundef
    +-W4 ץƱ
    +
  • -Wtrigraphs
    +-W16 ץƱ
    +
  • -Wall
    +-W17 (-W1 -W16) ץƱclass 2, 4 warning Linux ɸإåǤȯ䤹뤵Τǡ-Wall ϤƤ롣class 8 warning ̾;פʤǤ롣ˤ portability ΤͭѤʻȤƻ롣Ȥ gcc -Wp,-W31 Ȥ뤳ȡˡ
    +
  • -w
    +-W0 ץƱ
    +
+

GCC Ǥ Standard ⡼ɤǤϼΥץ󤬻Ȥޤ +

+
    +
  • -ansi
    +__STRICT_ANSI__ ޥ 1 롣 +linux, i386 εʰȿλޥ̵ˤ롣 +GCC ͤβѰޥθƤӽФǤϡѰ¸ߤʤƤ⤽ľΥޤʤ*5 +
    +
  • -digraphs
    +Digraph ǧ-2 Ǥȿžͭˡ +
    +
  • -lang-c89, -std=gnu89
    +-S1 ץƱꤷʤƤƱC90 Ǥʤ C95 λͤޤޤ롣
    +
  • -std=c89, -std=c90
    +-S1 ץȤۤƱǤ뤬-ansi ްդ롣 +
  • -lang-c99, -lang-c9x, -std=gnu99, -std=gnu9x
    +-V199901L ץƱ
    +
  • -std=c99, -std=c9x
    +-V199901L ץȤۤƱǤ뤬-ansi ްդ롣
    +
  • -lang-c++, -x c++
    +C++ ΥץץԤ-+ Ʊ
    +
  • -std=c++98
    +-+ ȤۤƱǤ뤬-ansi ްդ롣
    +
  • -pedantic, -pedantic-errors
    +-W7 (-W1 -W2 -W4) ץƱ +
    +
  • -std=iso<n>:<ym>
    +ʤΥСꤹ롣<n> C Ǥ 9899 ǤꡢC++ Ǥ 14882 Ǥ롣<n> 9899 ξϡ<ym> 1990, 199409, 1999, 199901 Ǥ롣<n> 14882 ξϡ<ym> 199711 Ǥ롣<ym> ˤ¾ͤꤵ줿ϡ__STDC_VERSION__ ޤ __cplusplus ͤʤξ 200503 Ȥ褦ˣǻꤹ뤳ȡˡ
    +ΥץǤ -ansi ꤷȤˤʤ롣 +¾ǡ-std=gnu* -ansi ްդʤ +-pedantic -ansi ްդʤ
    +
+

GCC Ǥ STD ⡼ɤǤϼΥץ󤬻Ȥޤ

+
    +
  • -lang-asm, -x assembler-with-cpp
    +¾νϤǤ -a Ʊ +lang-asm ⡼ɤˤ롣 +GCC-specific-build Ǥϥޥ __ASSEMBLER__ 1 졢identifier '$' ϻȤʤʤ롣 +ϥե̾ *.S ǤȤϤΥץꤷʤƤ⡢Υ⡼ɤˤʤ롣
    +
  • -trigraphs
    +Trigraph ǧ-3 Ǥȿžͭˡ +
    +
+

GCC Ǥ pre-Standard ⡼ɤǤϼΥץ󤬻Ȥޤ +

+
    +
  • -traditional, -traditional-cpp
    +-@old Ʊ +
    +
+

CygWIN / GCC ǤǤϼΥץ󤬻Ȥޤ +

+
    +
  • -mno-cygwin
    +Include directory /usr/include /usr/include/mingw ѹޥ cygwin1.dll Ѥ msvcrt.dll Ѥѹ롣
    +
+

ΥץϤ⥨顼ˤϤޤ󤬡бޤʥ˥󥰤Ф⤢ˡ

+
    +
  • -A <predicate(answer)>
    +GCC ǤϤΥץϥ #assert <predicate(answer)> Ƚ񤤤ΤƱ̤ˤʤ뤬#pragma Ǥʤĥǥ쥯ƥ֤ Standard C ǤǧʤΤǤ롣ޤޤǤΤȤ gcc ϥǥեȤǤ -D ץƱΥޥ cpp ϤƤΤǡºݤˤϤۤȤɤξ硢پϤʤ#assert ȤäƤ뵩ʥǤʤ¤ˡ
    +
  • -g <n>
    +
  • -idirafter <dir>
    +
  • -iprefix <dir>, -iwithprefix <dir>, -iwithprefixbefore <dir>
    +
  • -noprecomp
    +
  • -remap
    +
+

GCC V.3.3 ʹߤǤϥץץåѥ˵ۼΩץץå¸ߤʤʤäᡢgcc -no-integrated-cpp ץդƸƤӽФƤ⡢ץץåΥץǤϤʤץ󤬥ץץåϤƤ뤳ȤޤGCC V.3.3 ʹѤ mcpp ǤϡΤ褦ʤΤΤ mcpp ǧʤΤϤμΤˤץȤ̵뤷ޤ

+
    +
  • -c
    +
  • -E
    +
  • -f*
    +
  • -m*
    +
  • -quiet
    +
  • -W*
    +
+

:

+

*1 -Wa ϥ֥Ѥ -Wl ϥѤΥޥƥץǤ롣 +UNIX / System V / cc Υޥ˥奢򸫤ȡϤꤳΥץ󤬤롣GCC / cc -W<x> ץϤȤθߴΤΤΤʤΤǤ

+

*2 GCC V.3 Ǥ cpp cc1 (cc1plus) ˵ۼƤޤäΤᡢ-Wp ǻꤷץ̾ cc1 (cc1plus) ϤƤޤץץ cc1 ǤϤʤ cpp (cpp0) ˤ뤿ˤϡgcc θƤӽФ -no-integrated-cpp Ȥץꤹɬפ롣

+

*3 GCC V.3.3 ʹߤǤ̤Υޥ褦ˤʤäϻޥȤƤϰʤʤ-dD ץǤ⤳ΥޥϤ롣

+

*4 #pragma MCPP put_defines (#put_defines) νϤ -dM ץȤۤƱͤǤ롣äƤ롣

+
    +
  1. put_defines ǤɸޥȤƵꤵƤΤ⡢ȤηǽϤ롣
    +
  2. put_defines ǤϤΥޥΤե̾ȹֹ⥳ȤηǽϤ졢ޤɤߤ䤹褦˷ƽϤ뤬-d* ץǤ GCC ƱǽϤ롣ηꤷƤ makefile ⸫ݤ뤫Ǥ롣
    +
+

*5 3.9.6.3 򻲾ȤΤȡ

+
+ +

2.7. Ķѿ

+

Compiler-independent Ǥ mcpp Ǥ include ǥ쥯ȥ UNIX OS Ǥ /usr/include, /usr/local/include ʳϥǥեȤǤꤵƤʤΤǡ¾Υǥ쥯ȥɬפǤСĶѿ¹ԻץǻꤷʤФʤޤCompiler-independent ǤδĶѿ C Ǥ INCLUDEC++ Ǥ CPLUS_INCLUDE ǤեΥϥǥեȤǤϥեΤǥ쥯ȥȤޤ 4.2 򻲾ȤΤȡˡLinux Ǥ include ǥ쥯ȥ˺𤬤Τǡ̤кɬפǤˤĤƤ 3.9.9 򻲾ȤƤ

+

GCC ǤǥǥեȤꤵƤ system include ǥ쥯ȥˤĤƤϡnoconfig/*.dif ե򸫤Ƥޤinclude ǥ쥯ȥΥȴĶѿ̾ˤĤƤϡ 4.2 򸫤Ƥ

+

Ķѿ LC_ALL, LC_CTYPE, LANG ˤĤƤϡ 2.8 򸫤Ƥ +

+
+ +

2.8. Multi-byte character encoding

+

mcpp multi-byte character ¿ͤ encoding бƤޤ +

+
+ + + + + + + + +
EUC-JP ܤ extended UNIX code (UJIS)
shift-JIS ܤ MS-Kanji
GB-2312 EUC-like encoding ʴλ
Big-Five Ѥ encoding λ
KSC-5601 ڹ EUC-like encoding (KSX 1001)
ISO-2022-JP1ݵʤܸ
UTF-8 unicode encoding Σ
+
+

ơ¹Ի˼Τ褦ʤĤˡǼºݤ˻Ȥ encoding ꤷޤ̤ͥϤνΤȤǤ

+
    +
  1. #pragma __setlocale( "<encoding>") ǻꤵ줿 encoding Visual C ѤǤ #pragma setlocale( "<encoding>") ˡȤȡܤΥեǤʣ encoding ȤȤǤ롣
    +
  2. ¹Իץ -e <encoding> ޤ -finput-charset=<encoding> ǻꤵ줿 encoding
    +
  3. Ķѿ LC_ALL, LC_CTYPE, LANG ǻꤵ줿 encoding̤ͥϤνˡ
    +
  4. mcpp 򥳥ѥ뤹ꤵ줿ǥեȤ encoding
    +
+#pragma __setlocale-e ץ󡢴ĶѿǻǤ <encoding> ϸ§Ȥƶ̤ǡΤȤǤդ <encoding> Ϻդ encoding ꤷޤ<encoding> ʸʸζ̤򤷤ޤ󡣤ޤ'-', '_' ̵뤷ޤ '.' ȡޤǤ򤹤٤̵뤷ޤäơȤ EUC_JP, EUC-JP, EUCJP, euc-jp, eucjp, ja_JP.eucJP Ϥ٤ƱΤȤưޤޤ* Ǥդʸ̣ޤiso8859-1, iso8859-2 iso8859* ˥ޥåˡ
+
+
+ + + + + + + + + +
EUC-JP eucjp, euc, ujis
shift-JIS sjis, shiftjis, mskanji
GB-2312 gb2312, cngb, euccn
BIG-FIVE bigfive, big5, cnbig5, euctw
KSC-5601 ksc5601, ksx1001, wansung, eucKR
IS0-2022-JP1iso2022jp, iso2022jp1, jis
UTF-8 utf8, utf
ʤ c, en*, latin*, iso8859*
+
+

C, en* (english), latin*, iso8859* Τɤ줫ꤹȡmulti-byte character ǧʤʤޤASCII ǤϤʤ ISO-8859-* Latin Ϥ single-byte character Ȥϡꤷޤ#pragma __setlocale( "") ȶ̾ꤹȡǥեȤ encoding ޤ

+

ΤۤVisual C++ Ѥ #pragma setlocale ˸¤äơΤΤȤޤ Visual C++ ȤθߴΤѰդƤΤǤVisual C++ Ǥϥѥ餬ǤʤǧʤΤǡȤäۤɤǤ礦'-' mcpp ǤϾάǤ뤬Visual C++ ΥѥФƤϾάǤʤˡVisual C++ Ǥ C, english Ȥޤ

+
+ + + + + +
shift-JISjapanese, jpn
GB-2312 chinese-simplified, chs
BIG-FIVE chinese-traditional, cht
KSC-5601 korean, kor
+
+

Visual C++ ǤϡWindows ɤιѤǤ뤫ˤäƥǥեȤ multi-byte character encoding Ѥ뤳ȤˤʤäƤޤޤWindows ΡϰȸΥץפλˤäƤѤޤεǽȾüǤäǤ#pragma setlocale ˤϤͥ褷ޤ

+

GCC shift-JIS, ISO2022JP, BIG-FIVE Τ褦 multi-byte character 0x5c ͤĥХȤޤ encoding ϤޤǤʤ礬ΤǡGCC ǤǤ mcpp 䤤ޤ*1

+

:

+

*1 GCC configure --enable-c-mbchar Ȥץդȡ GCC ǤϴĶѿ LANG C-EUCJP, C-SJIS, C-JIS Τɤ줫˥åȤ뤳Ȥˤä encoding Ǥ뤳ȤˤʤäƤ롣 + configuration 1998 餢ΤΤ褦Ǥ뤬ºݤˤϻȤƤ餺ȤäƤưʤ +GCC Ǥ mcpp ǤϤ LANG=C-SJIS δĶѿ򥵥ݡȤƤV.2.7 ѻߤ
+GCC Ǥ LANG Τۤ LC_ALL, LC_CTYPE Ǥ encoding Ǥ뤳ȤˤʤäƤ뤬ºݤˤϿǥåѤǤ롣

+
+ +

2.9. ѥѥ mcpp Ȥˤ

+

Visual C, Borland C, LCC-Win32 Τ褦˥ץץåѥ餫ΩƤʤ֥ѥѥפ¿ʤäƤޤ®٤夲뤿Ȼפޤץץפ֤ϸߤΥϡɥǤϾʤΤˤʤäƤޤޤ⤽ץץȤΤϼ¹ԻĶϤϤۤΩ̤ΥեǤ뤳Ȥ礭ʰ̣Τǡ֥ѥѥפ¿ʤΤϷ褷ɤȤȤϻפޤ󡣥ץץνϰ¸λ̤ͤˤʤޤ

+

Ȥ⤢ѥѥǤϡץץå mcpp ֤뤳ȤǤޤ󡣤äơmcpp Ȥˤϡޤ mcpp ǥץץνϤ򥳥ѥϤޤѥˤäƺ٥˥ץץ뤳ȤˤʤޤǤ򤨤ޤ󡣤Ǥ⡢mcpp ȤȤϥåΤͭǤꡢ°ΥץץåˤϤʤǽȤȤǤޤ
+ѥѥ mcpp Ȥˤϡμ makefile ˽ɬפޤΥץȤƤϡmcpp ȤΥѥ˻Ȥ visualc.mak, borlandc.mak, lcc_w32.mak makefile ΥꥳѥѤ򸫤Ƥ

+

ʤGCC 3, 4 Ǥϥѥ餬ץץǽ¢褦ˤʤäΤΡץץåȤץѰդƤΤǡѤ뤳Ȥ mcpp ʤȤȤǤޤ3.9.7 ȡˡ

+
+ +

2.10. 糫ȯĶ mcpp Ȥˤ

+

GUI Τ糫ȯĶ(IDE) ȤΤϽȼλͤǤꡢŪʥ󥿥ե̾ϸƤʤΤǡ mcpp ȤˤϺ񤬤ޤξ塢ѥ餬ѥѥǤȡ mcpp ȤեΤϤ˺Ǥ

+

Ǥ Windows Visual C++ 2003, 2005, 2008 IDE mcpp ȤˡޤBorland C Ǥ LCC-Win32 Ǥϡޥɥ饤ǻȤäƤ

+

ޤMac OS X Xcode.app / Apple-GCC mcpp Ȥˡޤ

+ +

2.10.1. Visual C++ IDE mcpp Ȥˡ

+

Visual C++ IDE Ūʥ󥿥եƤ餺⥳ѥ餬ѥѥʤΤǡ̾Ρ֥ץȡפǤ mcpp ȤȤǤޤ󡣤mcpp Ȥ makefile 񤤤ƤСǡ֥ᥤեץȡפ뤳ȤǤޤơԽ両䡢˥٥ǥХåǽޤ IDE ȾεǽȤȤǤޤ

+

֥ᥤեץȡפˤϼΤ褦ˤޤˡ Visual C++ .net 2003 ɥȡפӡVisual C++ 2005 Express EditionסVisual C++ 2008 Express EditionפΡ֥إספΡ֥ᥤեץȤκפ˽񤤤ƤΤǤ

+
    +
  1. IDE ΥǥХåǽȤ¤ĥ桼Ȥƥ󤹤롣*1
    +
  2. mcpp Ȥ makefile 񤤤Ƥnoconfig/visualc.mak 򻲾ȡˡ*2
    +
  3. Visual Studio ư롣*3
    +
  4. ֿץȡפ򥯥å +줿ֿץȡפΥɥǡ֥ᥤե ץȡפӡ֥ץ̾פȡ־פꤷơOKפ򥯥å롣
    +
  5. ȡ֥ᥤե ץꥱ ɡפΥɥΤǡ֥ץꥱפ򥯥åǡ֥ӥɥޥɥ饤סֽϡס֥꡼󥳥ޥɡסʤޤϡ־õޥɡסˡ֥ӥɥޥɡפϤ롣ѸϤ狼ˤmcpp Ȥ compiler-independent ǤΥѥˤȤȼΤ褦ʤȤǤ mcpp μ¹ԥץ̾ mcpp.exe Ȥˡ
    +
    +֥ӥɥޥɥ饤:   nmake
    +ֽϡ                :   mcpp.exe
    +֥꡼󥳥ޥɡ    :   nmake clean
    +֥ӥɥޥɡ    :   nmake PREPROCESSED=1
    +
    +mcpp Visual C Ǥ򥳥ѥ뤹 COMPILER=MSC ȤץդäƼΤ褦ˤ롣
    +
    +֥ӥɥޥɥ饤:   nmake COMPILER=MSC
    +ֽϡ                :   mcpp.exe
    +֥꡼󥳥ޥɡ    :   nmake clean
    +֥ӥɥޥɡ    :   nmake PREPROCESSED=1 COMPILER=MSC
    +
    +֥ᥤեץȡפǤ make install 륳ޥɤʤΤǡ֥ӥɥޥɥ饤ס֥ӥɥޥɡפǻꤵ륳ޥɤǤ install ¹Ԥ褦 makefile 񤤤Ƥɬפ롣*4
    +mcpp 򥳥ѥ뤹ΤǤʤС֥ӥɥޥɥ饤פȡ֥ӥɥޥɡפȤ̾Ʊɤ
    +Ϥ顢ִλפ򥯥å롣
    +
  6. ȡ +֥塼󥨥ץפ˥ץȤΤǡΡ֥եפȤե򥯥åơơ˥塼Ρ֥ץȡפִ¸ܤɲáפӡե򤹤٤򤷤ơOKפ롣ȡ֥塼󥨥ץפ˥ե̾롣
    +
+

ǡԽס֥ӥɡס֥ӥɡס֥ǥХåεǽ٤ƻȤ褦ˤʤޤ

+

:

+

*1 VC 2003, 2005 ǥǥХåǽȤˤϡWindowsXP Pro, Windows2000 Ǥ "Debugger users" Ȥ롼פ˥桼°ɬפ롣WindowsXP HE ǤϤ롼פϤʤΤǡԤȤƥ󤷤ʤФʤʤ
+VC 2008 Ǥϥ桼롼פ¤Ϥʤʤä

+

*2 ٥롦ǥХåǽȤˤ cl.exe θƤӽФ -Zi ץղäơǥХå褦 makefile 񤤤Ƥɬפ롣

+

*3 ֥ȡ->֥ץפ鵯ưȡ󥯥롼ɥǥ쥯ȥδĶѿꤵʤꤹˤˡVisual Studio ޥɥץץȡפ򳫤ơեΤǥ쥯ȥ˰ư VC 2003 Ǥ

+
+devenv *.sln /useenv
+
+

ȤơVC 2005, 2008 express edition Ǥ

+
+vcexpress *.sln /useenv
+
+

ȤƵưʤФʤʤ

+

*4 󥹥ȡ뤹ǥ쥯ȥˤϥ桼񤭹ߤθ¤äƤʤФʤʤ +Ϥ bin, lib Υǥ쥯ȥ˽񤭹ϡΥѡߥåԸ¤ѹƤɬפ롣 +"Power users" ޤ "Authenticated users" Ȥ롼פ˥桼ϿΥ롼פ˳Υǥ쥯ȥؤΡֽ񤭹ߡסѹפθ¤Τɤ +⤦Ĥˡϡֶͭǥ쥯ȥפΤ褦ʡ桼񤭹߸¤ĥǥ쥯ȥ˽Ϥ򥤥󥹥ȡ뤹뤳ȤǤ롣

+ +

2.10.2. Mac OS X / Xcode.app mcpp Ȥˡ

+

Mac OS X IDE Ǥ Xcode.app mcpp 򥤥󥹥ȡ뤷֤ʤȤȤǤޤ*1

+

Xcode.app Ϥʤ /usr/bin ǤϤʤ /Developer/usr/bin ˤ gcc (g++) Ȥޤ/Developer Xcode ΥǥեȤΥ󥹥ȡǥ쥯ȥˡ +äơmcpp Ȥˤϡ gcc (g++) Ѥ GCC-specific-build 򥤥󥹥ȡ뤹ɬפޤ +ΤˤϼΤ褦ˤޤ${mcpp_dir} mcpp ΥΤǥ쥯ȥˡ

+
+export PATH=/Developer/usr/bin:$PATH
+configure ${mcpp_dir}/configure --enable-replace-cpp
+make
+sudo make install
+
+

PATH ʳ /usr/bin Υѥ˥󥹥ȡ뤹ƱʤΤǡѥؤΥ󥹥ȡ universal binary 򥤥󥹥ȡ뤹ˡʤɤˤĤƤϡINSTALL-jp 򸫤Ƥ

+

mcpp 򥤥󥹥ȡ뤷ƤСȤ mcpp Τ̤Ϥ Xcode.app Ȥޤ +Xcode.app Apple-GCC ͭ *.hmap Ȥ̾ "header map file" ʤΤޤ mcpp ǽޤ +mcpp precompiled header νϤʤΤǡ#include *.pch ̾ΥإåեȤɤ߹ޤޤ +ޤmcpp Objective-C, Objective-C++ νϤʤΤǡ*.m, *.mm ΥեΥץץ mcpp ̤餺 cc1obj, cc1objplus ľܡϤޤ

+

mcpp ȼΥץȤϡXcode.app β̥ȥåפΥ˥塼СΡ֥ץȡפ֥ץԽפǥåǸץȥǥΥɥǡ֥ӥɡץڥǡ֤¾ C ե饰פιܤԽޤ +ץϼΤ褦 -Wp, ³ƥޤǶڤʤꤷޤ

+
+-Wp,-23,-W3
+
+

:

+

*1 Ǽ夲Τ Mac OS X Leopard / Xcode 3.0 Ǥ롣

+
+ +

3. ĥǽȸߴ

+

mcpp ˤϤĤθͭγĥǽޤޤƽ°ΥץץåˤϤ줾γĥǽޤΰ mcpp ǤϻȤޤ󡣤ǤϤĥǽȸߴޤ

+

ʤStandard ⡼ɤǤ #pragma Ԥϸ§ȤƤΤޤ޽Ϥޤmcpp ȤΤˤĤƤƱͤǤƱ #pragma ѥΤˤȤäƤ̣IJǽ뤿Ǥ
+#pragma MCPP ǻϤޤԤ mcpp ѤΤΤʤΤǽϤޤGCC ǤǤϡ#pragma GCC poison, dependency, system_header Τɤ줫³ԤϤޤ󡣤ޤ#pragma once, #pragma push_macro, #pragma pop_macro ⥳ѥΤˤȤäƤ̵ѤʤΤǽϤޤ +¾ǡ#pragma GCC visibility * ϥѥȥ󥫤ΤΤΤʤΤǡϤޤ*1

+

EXPAND_PRAGMA == TRUE ǥѥ뤵줿 mcpp Ǥ #pragma ԤΰϥޥŸоݤȤʤޤʼºݤˤ EXPAND_PRAGMA == TRUE Visual C, Borland C ǤǤˡ#pragma STDC, MCPP, GCC Τɤ줫³ԤŸޤ

+

#pragma sub-directive implementation-defined ǤΤƱ̾ sub-directive Ϥˤäưۤʤ̣Ķ줬ޤ̾ξͤ򤱤빩פɬפǤޤEXPAND_PRAGMA == TRUE ξϡ#pragma sub-directive ̾ȤޥŸƤϺΤǡ桼֤̾ȽŤʤʤ褦ˤȤߤɬפǤmcpp ͭ sub-directive #pragma MCPP ǻϤޤޥŸʤΤϤΤǤC99 ǵꤵ줿 #pragma STDC GCC 3 #pragma GCC ˡΤ줿ΤǤ
+#pragma once ¿νϤ˼̾ͤ붲ϤʤʤäƤΤǡ̾Τޤ޼Ƥޤޤ#pragma __setlocale ϥѥΤФƤɬפʤΤ MCPP Ȥ̾դ"__" Ƭդƥ桼֤̾ȽŤʤʤ褦ˤƤޤ

+

+

*1 mcpp GCC-specific-build Ǥϡ#pragma GCC ǻϤޤ pragma Τ system_header ݡȤƤ롣poison, dependency ϥݡȤʤ

+
+ +

3.1. #pragma MCPP put_defines, #pragma MCPP preprocess

+

#pragma MCPP put_defines, #pragma MCPP preprocess, #pragma MCPP preprocessed Standard ⡼ɤΤΤǡ#put_defines, #preprocess, #preprocessed pre-Standard ⡼ɤΤΤǤʲǤ #pragma ˤȤäޤ

+

#pragma MCPP put_defines ǥ쥯ƥ֤˽в񤦤 mcpp ϡλƤ뤹٤ƤΥޥ #define ԤηǽϤޤ#undef 줿ΤϽФƤޤ__STDC__ #define, #undef оݤˤǤʤΤϡ #define ԤηȤäơȥޡǰϤǽϤޤ__FILE__, __LINE__ ϥޥƤӽФưŪüʥޥʤΤǡǽϤִꥹȤ̵̣ʤΤǤˡ
+pre-Standard ⡼ɤ POSTSTD ⡼ɤǤϡfunction-like ޥΥѥ᡼̾ϵޤ󡣤ǤΥǥ쥯ƥ֤Ǥϡѥ᡼̾裱ѥ᡼˵Ū a, b, c, ... Ȥ̾ɽޤ27 ܰʹߤΥѥ᡼ˤ a1, b1, c1, ..., a2, b2, c2, ... Ȥ̾Ȥޤ

+

mcpp ϥեϥեꤻ˵ươܡɤ餤ʤ

+
+#pragma MCPP put_defines
+
+

Ǥȡޥ򤹤٤Τ뤳ȤǤޤ줾ΥޥΤ륽ե̾ȹֹɽ륳ȤϤޤ-S1, -N ΥץդƵưȡ줾ޥäƤ뤳Ȥ狼ޤ

+

#pragma MCPP preprocess Ȥǥ쥯ƥ֤˽в񤦤 mcpp ϡ

+
+#pragma MCPP preprocessed
+
+

ȤԤϤޤϡΥեϥץץѤߤǤ뤳Ȥ򼨤ΤǤ

+

#pragma MCPP preprocessed Ȥǥ쥯ƥ֤˽в񤦤 mcpp ϡΥե mcpp ˤäƥץץѤߤǤȽǤơ#define ԤФƤޤǤϤ򤽤Τޤ޽Ϥ˥ԡޤơ#define ԤФƤȡȤϤ٤ #define ԤǤȽǤơޥޤˤ륽ե̾ȹֹξ⵭ޤ*1, *2
+#pragma MCPP preprocessed ͭϰϤϤΥǥ쥯ƥ֤Τ륽եΤι԰ʹߤǤΥե뤬 #include 줿ΤǤϡinclude ̾Υץץޤ

+

:

+

*1 ºݤνϤ⤦ʣǤ롣#pragma MCPP preprocessed ϹԤȾ򤽤Τޤ޽Ϥ˥ԡ뤬ɸޥ #define Ԥȥޡ˰ϤޤƤΤǡιԤϼΤƤ롣ޤνѤǤǤ #line ԤϽϤΥѥΤѴƽϤ롣

+

*2 äơpre-preprocess Ƥޥξξϼʤ

+ +

3.1.1. إåե pre-preprocess

+

嵭Υǥ쥯ƥ֤ѤȡإåեΡ֥ץץץפ򤹤뤳ȤǤޤ֥ץץץפ򤷤Ƥȡ֤Υץץ֤ʤṳ̂ޤˡϡ嵭λͤǤǤˤ狼äȻפޤǰΤ mcpp ȤΥˤȤäޤ

+

mcpp Υˤϣܤ *.c ե뤬ꡢΤΣܤϤɤ "system.H" "internal.H" include Ƥޤơ¾Υإå include Ƥޤ󡣤äΤ˸ȡǤϤʤäƤޤ

+
+#if PREPROCESSED
+#include    "mcpp.H"
+#else
+#include    "system.H"
+#include    "internal.H"
+#endif
+
+

ơsystem.H noconfig.H ޤ configed.H ȤĤɸإå include Ƥޤmcpp.H ϻ󶡤륽ˤϤޤ󡣤줬줫 "pre-pre-processed" header ʤΤǤ

+

mcpp.H ˤϡʤ noconfig.H ꤬Ǥˡ

+
+mcpp > mcpp.H
+
+

Ȥ mcpp ưޤGCC Ǥϡ-b ץդˡ
+ơܡɤ

+
+#pragma MCPP preprocess
+#include "system.H"
+#include "internal.H"
+#pragma MCPP put_defines
+
+

Ǥߡend-of-file Ϥ mcpp λޤ

+

mcpp.H Ǥޤ system.H, internal.H ץץΤ #define ԤνդäΤǤ include Сsystem.H, internal.H include ΤȤޤäƱ̤뤳ȤǤޤơɸإåޤีΥإåեפοʬΣΥˤʤäƤޤ#if ȥȤäƤ뤫Ǥܤ *.c ե include Τϡsystem.H, internal.H 򣷲 include Τ٤ơϤ뤫û֤Ǥߤޤ#pragma MCPP preprocess ȤȤǤ˻֤ṳ̂ޤ

+

֤ΥѥǤ -DPREPROCESSED=1 Ȥץդޤ
+μϲΥե˽񤤤Ƥơmakefile Ǥ򻲾ȤΤɤǤ礦mcpp Υդ makefile preproc.c ˤϡ줬񤤤ƤΤǡ򸫤Ƥ
+Visual C, Borland C, LCC-Win32 Τ褦ʣѥѥǤΩץץåλȤƻ¤ޤξǤ⤳εǽͭѤǤ

+

Υإåե pre-preprocess εǽϡGCC / cpp -dD ץεǽ򿿻ΤǤäƤޤ

+
    +
  1. GCC Ϲֹ #line 123 "filename" ǤϤʤ # 123 "filename" ηǽϤ롣Τᡢ GCC Ǻƽ뤳ȤϤǤ뤬Standard C ΥץץåǤϤǤʤ
    +
  2. GCC θŤ cpp Ǥ #define ԤϽиȤǽϤ뤬#undef ԤϽϤʤäơƽȸΰտޤȰۤʤ̤ˤʤ뤳Ȥä
    +
  3. GCC ˤϤʤ #pragma MCPP preprocess ȤȤǡ®٤®ʤ롣
    +
+Pre-preprocess εǽȤƤϡmcpp Τְۤ㤤ʤŪǤ
+
+ +

3.2. #pragma once

+

#pragma once Standard ⡼ɤǻȤޤ
+GCC, Visual C, LCC-Win32 Wave ȤñΥץץåǤ #pragma once ϻȤޤ
+إåե򣱲󤷤󥯥롼ɤʤ˻Ȥޤإåե

+
+#pragma once
+
+

Ƚ񤤤ƤȡΥե򥤥󥯥롼ɤ #include ԤФƤƤ⡢ǽΣ󤷤󥯥롼ɤޤ

+

̾ϡ°ɸإåǤ

+
+#ifndef __STDIO_H
+#define __STDIO_H
+/* stdio.h    */
+#endif
+
+

Ǥ¿ɤǤޤȻǽǤޥȤˡǤϥإåեɤޤʤǤޤȤϤǤޤʥåפʬǤ⡢#if, #endif ФƤΤƻ뤹뤿ˡɤޤʤФʤʤƬ # ǥ쥯ƥֹԡ# preprocessing directive ³ԡˤλؼǤ뤫ɤΤ뤿ˤϥȤʤФʤʤΤˤʸƥȽǤʤФʤʤǡɡɤ tokenization ȾޤǤʤФʤʤΤǤˡ
+#pragma once ϡեؤΥ⤷ʤǤޤΤǤη̡¿ include ν®٤®ʤޤ

+

Header name ƱǤ뤫ɤϡѥΥǥ쥯ȥʬޤʸӤȽǤޤWindows Ǥʸʸ϶̤ޤ󡣤äơ"/DIR1/header.h" "/DIR2/header.h" ̤ΤΤȤư"header.h" "HEADER.H" Ȥ Windows ǤƱΡUNIX ϤǤ̤ΤΤȤưޤǥ쥯ȥХѥѴƵޤ"foo/../" ȤäĹʬϺޤUNIX ϤǤ symbolic link ϥѴޤäơƱեǤ뤫ɤϳμ¤Ƚꤵޤ*1, *2, *3

+

#pragma once GCC V.1.* / cpp #pragma once ΥǥѤΤǤGCC V.2.*, V.3.* Ǥ⤳εǽϻĤäƤޤobsolete ʤΤȤƤޤ#pragma once ʤƤ⡢إåեΤ #ifndef _MACRO, #define _MACRO, #endif ǰϤޤƤСcpp 򵭲󤷤 include ʤȤͤѹƤޤ
+GCC V.2, V.3 λͤϡGCC λѤȤʤΤνϤʤɤǤϻȤʤȤޤɸإåνäƤ뤫Ǥޤ GCC V.2, V.3 λͤΤۤݤǤǡmcpp Ǥ #pragma once Ƥޤ

+

¾ΥץץåǤƱإåեȤϤ櫓ˤϤ椭ޤ󡣥ޥȤˡʻѤơإåե򼡤Τ褦ǤǤΤɤǤ礦

+
+#ifndef __STDIO_H
+#define __STDIO_H
+#pragma once
+/* stdio.h    */
+#endif
+
+

<assert.h> ˤ #pragma once Ͻ񤤤ƤϤޤʤͳ cpp-test.html#5.1.2 ȡˡC++ <cassert>, <cassert.h> ƱͤǤ

+

⤦ĤϡGCC / GLIBC κǶΥƥǤ <stddef.h> Τ褦ˡ¾ system header 鷫֤ #include إåե뤬뤳ȤǤ¿ system header __need_NULL, __need_size_t, __need_ptrdiff_t, etc. ΥޥƤ <stddef.h> #include ޤΤӤˡ<stddef.h> Ǥ NULL, size_t, ptrdiff_t, etc. Ƥ椭ޤ<errno.h>, <signal.h> ƱͤǤ<stdio.h> Ǥ⡢¾ system header __need_FILE, __need___FILE ΥޥƤ #include <stdio.h> ΤӤ FILE Ƥ椯礬ޤΥեˤ #pragma once Ͻ񤭹櫓ˤϤޤ*4

+

:

+

*1 줿̤ #pragma MCPP debug path Ǹ뤳ȤǤ롣3.5.1 ȡ +#pragma MCPP put_defines ǥåΥե̾ɽǤ⡢줬Ȥ롣
+#line Ԥ path-list ϰ̤ˤƤ櫓ǤϤʤinclude directory ֤ɽ롣 +-K ץǤɽ롣 +Υ⡼ɤѤ¾ΥġνѰդˤ뤿Ǥ롣

+

*2 CygWIN Ǥ /bin /usr/bin/lib /usr/lib Ϥ줾Ʊǥ쥯ȥǡ/ Windows 㤨 C:/dir/cygwin Ȥ /cygdrive/c/dir/cygwin ⤽Ʊǥ쥯ȥǤ뤬mcpp ǤϤϤ٤Ʊǥ쥯ȥȤưpath-list Ϥ٤ /cygdrive/c/dir/cygwin/dir-list/file ηѴ롣

+

*3 MinGW Ǥ / /usr ȤϼºݤˤƱǥ쥯ȥǡ/ Windows C:/dir/msys/1.0 Ȥ /c/dir/msys/1.0 ⤽Ʊǥ쥯ȥǡ/mingw C:/dir/mingw Ȥ /c/dir/mingw ⤽Ʊǥ쥯ȥǤ롣mcpp ǤϤϤ줾Ʊǥ쥯ȥȤưpath-list Ϥ٤ c:/dir/msys/1.0/dir-list/file, c:/dir/mingw/dir-list/file ηѴ롣

+

*4 ʤȤ Linux / GCC 2.9x, 3.*, 4.* / glibc 2.1, 2.2, 2.3 ǤϤʤäƤ롣FreeBSD 4, 5, 6 Ǥ glibc ϻȤƤʤΤǡʣʥƥإåˤϤʤäƤʤ

+ +

3.2.1. إåե #pragma once 񤭹ġ

+

񤭹Τϥإåեοʤ礷ȤǤϤޤ󤬡¿ȼǤϤäȤȤˤʤޤǡưŪ˽񤭹ñʥġѰդޤ

+

tool/ins_once.c ϸŤ GCC ΥƥѤǤBorland C 5.5 ǤɸإåνƱ롼˽äƤΤǡȤȤǤޤGlibc 2 Τ褦ʥƥǤϾ嵭Τ褦㳰¿ΤǡȤʤ̵ۤǤ
+줬Ȥ륷ƥǤ⡢إåեˤ GCC δ˽äƤʤΤ⻶ޤإåǤ GCC Ρ󤷤ɤ߹ޤʤȤǽưޤ
+ǡins_once.c 򥳥ѥ뤷ơUNIX ʤ /usr/include, /usr/local/include Υǥ쥯ȥǡޤ

+
+chmod -R u+w *
+
+

Ȥǡ

+
+ins_once -t *.h */*.h */*/*.h
+
+

Ȥޤȡ#ifndef ޤ #if !defined ǻϤޤʤإåե뤬𤵤ޤΥإåǽƤ줫顢

+
+ins_once *.h */*.h */*/*.h
+
+

Ȥȡƥإåեκǽ˽и #directive #ifndef ޤ #if !defined Ǥäϡľ #pragma once Ԥ񤭹ޤޤʤ줬ǤΤ root Υ桼ΤϤɬפʤ chmod -R u-w * Ȥơaccess permission 򸵤ᤷƤˡ

+

ins_once ˤϼΤ褦ʥץ󤬤ޤƥ˹碌Ŭʥץ򤷤Ƥ

+
    +
  • -t: ե뤬ʥȤȡ#ifndef #if !defined ǻϤޤäƤ뤫ɤƥȤ롣եϽ񤭴ʤ
    +
  • -p: եƬ #pragma once Ԥ񤭹ʥǥեȤǤ #ifndef / #if !defined Ԥμ˽񤭹ˡ
    +
  • -g: GCC Τˡ<stddef.h>, <stdio.h>, <signal.h>, <errno.h> 񤭴ʤʥǥեȤǤϽ񤭴ʤΤ <assert.h>, <cassert>, <cassert.h> ˡ
    +
+

ins_once ʣ¹ԤƤƱե˥֤äƽ񤭹ळȤϤʤ褦ˡñʥåϤƤޤ̩ʤΤǤϤޤ

+

ins_once ϴ֤˹碌ʤΤǡtokenization ϤۤȤɤäƤޤFreeBSD 2.0, 2.2.7, Borland C 5.5 γƥإåեǤϴ̤ư򤷤ޤüʥإåե뤬ȸư뤫⤷ޤins_once ɬХååפȤäƤ¹ԤƤ
+磻ɥɤ shell ŸƤʥХåեСեϡ󤫤ʬƼ¹Ԥˡ

+
+ +

3.3. #pragma MCPP warning, #include_next, #warning

+

Υǥ쥯ƥ֤ GCC ȤθߴΤѰդƤΤǤGCC ˤ #include_next, #warning ȤʰȿΥǥ쥯ƥ֤ޤʰȿǤȤäƤ륽⵩ˤޤGlibc 2 ΥƥǤϡƥإåեˤȤäƤΤޤ mcpp ǤϡΥ򥳥ѥǤ褦ˤ뤿ᡢGCC Ѥ˸¤ä #include_next, #warning ƤޤStandard ⡼ɤǤϥ˥󥰤оݤȤʤޤStandard ⡼ɤǤ #pragma MCPP warning Ƥޤ GCC Ѥ˸¤ޤ

+
+#include_next   <header.h>
+
+

include directory 򥵡ݤˡ include ΥեΤǥ쥯ȥ򥹥åפơμΥΥǥ쥯ȥ꤫饵Ϥޤ

+

CygWIN, MinGW Ǥϡإå̾ʸʸζ̵̤뤷ޤ

+
+#pragma MCPP warning    any message
+
+#warning    any message
+
+

Ǥϡany message 򤽤Τޤ warning Ȥɸ२顼Ϥ˽Ϥޤ #error Ȱäƥ顼ˤϤʤޤ

+
+ +

3.4. #pragma MCPP push_macro, #pragma __setlocale

+

Visual C mcpp ܿ˼ĤǤ¾νϤǤȤ褦ˤΤǤ

+

#pragma MCPP push_macro( "MACRO"), #pragma MCPP pop_macro( "MACRO") ϡλǤ MACRO Υޥ򥹥å "push" "pop" ꤹΤǤ
+Visual C Ǥ #pragma push_macro( "MACRO"), #pragma pop_macro( "MACRO") Ȥޤ
+push_macro ǤϤΥޥ򤵤졢pop_macro Ǹᤵޤpush Ƥ⤽ΥޥϤޤͭǤ̵ˤ뤿ˤ #undef 뤫ޤ̤Ǻɬפޤpush_macro ǤƱ̾Υޥ򲿽Ťˤ push 뤳ȤǤޤ

+

#pragma __setlocale( "<encoding>") multi-byte character encoding <encoding> ѹޤ__setlocale ΰʸƥǤʤФʤޤ<encoding> ˤĤƤ 2.8 򸫤ƤȤȡĤ translation unit Ǥʣ encoding ȤȤǤޤ
+Visual C++ Ǥ #pragma setlocale Ǥꡢ#pragma __setlocale ϻȤޤEncoding λ mcpp Ǥʤѥˤɬפޤѥ餬ǧǤΤ #pragma setlocale Ǥ

+

#pragma __setlocale ǧǤ륳ѥΤϤޤΤȤޤ

+
+ +

3.5. #pragma MCPP debug, #pragma MCPP end_debug, #debug, #end_debug

+

#pragma MCPP debug, #pragma MCPP end_debug Standard ⡼ɤΤΤǤpre-Standard ⡼ɤǤ #debug, #end_debug Ȥʤޤ

+

#pragma MCPP debug <args> ǥ쥯ƥ֤ϥǤդιԤ˽񤯤ȤǤޤ<args> ǥǥХåμꤷޤĤ #pragma MCPP debug ǥ쥯ƥ֤ʣ <arg> ꤹ뤳ȤǤޤɬİʾ <arg> ꤬ɬפǤΥǥ쥯ƥ֤ȡǥХåνϤϤޤޤơ#pragma MCPP end_debug <args> ǡ<args> ΥǥХåϤޤ#pragma MCPP end_debug Ǥϡ<args> ά뤳ȤǤޤξϡꤵƤ٤ƤΥǥХåϤޤmcpp ǥݡȤʤ <args> ˤäϡ˥󥰤ФޤˤäͭǤ
+ǥХåϤ٤ơץץνϤƱѥ˽ϤޤνϤƱ뤿ǤäơΥǥ쥯ƥ֤̾ϥѥǤޤ +#pragma MCPP debug macro_call ǤϾϥȤǽϤΤǡƥץץƥѥ뤹뤳ȤǤޤ

+

ץץη̤˵䤬硢ʬ

+
+#pragma MCPP debug token expand
+/* ǥХåʬ   */
+#pragma MCPP end_debug
+
+

ȤդˤϤǻȤޤ +

+

mcpp ȤΥǥХåѤΤΤǤץץβȥ졼˻ȤޤŪŪʤΤǡ򸫤ʤǤʤȤ⤢ꡢ뤵⤢ޤޤ󤷤Ƥ

+

<arg> μϼ̤Ǥ

+
+ + + + + + + + + +
path include եΥѥɽ
token token 򣱤Ĥڤʬơμɽ
expand ޥƤӽФŸȥ졼
macro_callޥӥޥƤӽФ˺ݤơΥιԤȥ֤򥳥ȤǽϤ
if #if (#elif, #ifdef, #ifndef) οɽ
expression#if ɾȥ졼
getc ץץ 1 byte ĥȥ졼
memory mcpp λȤäƤҡץξɽ
+
+
+ +

3.5.1. #pragma MCPP debug path, #debug path

+

Υǥ쥯ƥ֤˽в񤦤 mcpp ϡޤꤵƤ include ǥ쥯ȥΥѥ̤ͥι⤤Τɽޤʤǽ˥륫ȥǥ쥯ȥꤪӥΥǥ쥯ȥϾάˡ

+

ˡ#include ԤȡΥإåե include 뤿 mcpp ºݤ˥ǥ쥯ȥ꤬ʥȥǥ쥯ȥޤơˤ٤ɽޤ
+#pragma once Τإåե #include ϡλݤɽޤ
mcpp path-list "foo/../" ȤäĹʬޤη̡ path-list Ȱä path-list Ȥʤäϡλݤɽޤ
+UNIX ϤΥƥǤ mcpp symbolic link link Ѵޤξ⤽λݤɽޤ

+ +

3.5.2. #pragma MCPP debug token, #debug token

+

ޤɤ߹Ԥɽǡmcpp token 򣱤ɤिӤˡ token ȼɽޤToken ȤΤ˸ preprocessing-token (pp-token) ΤȤǤɤФǤϤʤmcpp ޥŸʤɤŪɤ֤ pp-token ⡢ΤĤɡʷ֤ơɽޤ

+

1 byte pp-token ΤΤΤɽޤ󡣤ϥץΤĤˤΤǤ

+
    +
  1. ץץǥ쥯ƥֹԤγϤ '#'
    +
  2. function-like +ޥΥѥ᡼ꥹȳϤ '('
    +
  3. function-like +ޥΥѥ᡼ڤ ','
    +
  4. function-like +ޥƤӽФΰꥹȳϤ '('
    +
+

Pp-token μϼ̤Ǥ +

+
+ + + + + + + + + + +
(NAM) identifier
(NUM) preprocessing-number
(OPE) operator or punctuator
(STR) string literal
(WSTR)wide string literal
(CHR) character constant
(WCHR)wide character constant
(SPE) $, @ ü pp-token
(SEP) token separator (white space)
+
+

Τ (SEP) ϲԥɰʳ̾ɽޤ +ԥΥȥ륳ɤ <^J>, <^M> ɽޤ

+ +

3.5.3. #pragma MCPP debug expand, #debug expand

+

ޥƤӽФŸȥ졼ޤ

+

Standard ⡼ɤ #pragma MCPP debug Ǥϼ̤Ǥ
+ޥƤӽФȡޤΥޥɽޤˡɤ߹ޤ졢ִꥹΥѥ᡼֤졢褦ɽޤޥͥȤƤС줬缡ŸƤޤ˥ޥСβƵŪˡʥѥ᡼Ȥִˡ˥ȥ졼ޤ

+

ɽ mcpp ȤΤĤδؿؤνΤӤˡδؿ̾ȤȤ˹ԤޤδؿϼΤ褦򤹤롼ǤStandard ⡼ɤΥ򻲾Ȥȡˤ褯Ǥޤ

+
+ + + + + + + +
expand_macroޥŸ롼
replace ޥ򣱥٥Ÿ
collect_args򽸤
prescan ִꥹȤ #, ## 黻Ҥν򤹤
substitute ѥ᡼ִ
rescan ִꥹȤ
+
+

Τexpand_macro ʳϸߤ˴ܺƵδطˤޤ

+

replace, collect_args Ǥϡmcpp Ū˥åѤǤŸΥǡɽޤΥǡǤϡmcpp ŪʥɤΤ褦ʵɽޤ

+
+ + + + + + +
<n> n ܤΥѥ᡼
<TSEP> pp-token ڤ뤿 mcpp token separator
<MAGIC> Ʊ̾ޥκִػߤ륳
<RT_END>ִꥹȤν򼨤
<SRC> Identifier ե뤫ޤ줿Ȥ򼨤
+
+

Τ <SRC> STD ⡼ɤǤȤ졢POSTSTD ⡼ɤǤ COMPAT ⡼ɤǤȤޤ

+

#pragma MCPP debug token ꤷۤ狼䤹Ǥ礦

+

#pragma MCPP debug macro_call ޤ -K ץꤷϡmacro notification Ȥ˽񤭹ޤƽϤޤreplace() ʲΥ롼ǤϤޤȤϽ񤭹ޤ줺फ magic characterŪʥɡˤ񤭹ޤ줿줿ꤷޤ +ϼΤ褦ɽޤ

+
+ + + + + +
<MACm> ĤΥޥƤӽФ˴ޤޤ m ܤΥޥθƤӽФ
<MAC_END> ľ MACm ǻϤޤޥƤӽФν
<MACm:ARGn>m ܤΥޥθƤӽФ n ܤΰ
<ARG_END> ľ MACm:ARGn ǻϤޤν
+
+

-v ץꤷϡMAC_END, ARG_END ˤĤƤⳫϥޡƱֹ椬 symmetrical ɽޤ

+

pre-Standard ⡼ɤ #debug expand Ǥ Standard ⡼ɤȤ롼˰äƤޤάޤ

+ +

3.5.4. #pragma MCPP debug if, #debug if

+

#if, #elif, #ifdef, #ifndef ιԤɽɾǤ뤫Ǥ뤫𤷤ޤåפ #if section Ǥϡ𤵤ޤ

+ +

3.5.5. #pragma MCPP debug expression, #debug expression

+

#if, #elif Ԥμɾܺ٤˥ȥ졼ޤ

+

DECUS cpp ȤΥǥХåѤ˥ꥸʥǰ褢ΤǡϤۤȤɼäƤޤŪʴؿ̾Ф꤫ѿ̾Ȥͤޤǥ饺ȽФƤޤmcpp ΥɤʤǤʤȡѿǤޤ
+ʣʼͤɾѤΥåѤ߹ߤƤ褦ϡ򸫤ʤƤⲿȤǤǤ礦

+ +

3.5.6. #pragma MCPP debug getc, #debug getc

+

mcpp get_ch() ȤХɤ߹ߴؿƤӽФ뤿Ӥˡܺ٤ʥǡϤޤStandard ⡼ɤǤ pp-token 򥹥󤹤ϡΣХܤΥ롼ϸƤӽФޤ

+

#debug getc Ǥ token 򥹥󤹤⤳Υ롼󤬸ƤӽФΤǡȤǤʤ̤ΥǡǤФޤ

+

ˤƤ⡢ʥǡϤޤȤɬפϤޤޤ

+ +

3.5.7. #pragma MCPP debug memory, #debug memory

+

Υǥ쥯ƥ֤ȡλ mcpp Ū˻ȤäƤ malloc(), realloc(), free() ˤҡץξ򣱲𤷤ޤϻκä kmmalloc ¾βफ malloc() ȤäƤεǽǤ mcpp-porting.html#4.extra ȡˡ¾ malloc() ξϥ顼ˤϤޤ󤬡𤷤ޤ
+Υǥ쥯ƥ֤ʤޤ mcpp λȡλ˺٥ҡץξ𤵤ޤmcpp out of memory ǽλƱͤǤ

+ +

3.5.8. #pragma MCPP debug macro_call

+

Macro notification mode 򳫻Ϥޤ +Υ⡼ɤǤϡޥ뤿ӤˡޤޥŸ뤿ӤˡΥιԤȥ֤ȤޤƽϤޤ +ޥľϡưˤĤƤ⤽ΰ֤𤵤ޤ +ޥŸˤäƥȡϢ뤵줿ϡϢΥȡ˴ؤޥϼޤ
+ˡ#undef, #if (#elif, #ifdef, #ifndef), #endif ˤĤƤ⡢ñʾ󤬽Ϥޤ
+Υ⡼ɤ -K ץǻꤹ뤳ȤǤޤ

+

Υ⡼ɤ C/C++ refactoring tool Τ˼줿ΤǤ +C/C++ ˤϥץץȤեΤ뤳Ȥ refactoring tool ˤȤäƺޤΥ⡼ɤȤХץץνϤ饽ƹ뤳ȤǤΤǡtool 䤹ʤޤ*1

+

#pragma MCPP debug expand ȻƤޤexpand ΤۤϥޥŸȥ졼뤿ΤΤǡܺ٤ʾ󤬽ϤΤΡ򥳥ѥ뤹뤳ȤϤǤޤ +Фơmacro_call ϥΤʰ֤뤿ΤΤǡ򥳥ȤΤǡϤ򤽤Τޤ޺ƥץץƥѥ뤹뤳ȤǤΤħǤ

+

:

+

*1 λͤϼȤ Taras Glek ƤˤΤǤ롣 +༫ȤϼΤȤ mozilla Υ refactoring ˼ȤǤ롣

+

http://blog.mozilla.com/tglek/

+ +

3.5.8.1. #define ˴ؤ륳

+

㤨СƬ˼Τ褦ʥޥȡ

+
+#define NULL 0L
+#define BAR(x, y) x ## y
+#define BAZ(a, b) a + b
+
+

Τ褦ʥȤϤޤ

+
+/*mNULL 1:9-1:16*/
+/*mBAR 2:9-2:25*/
+/*mBAZ 3:9-3:24*/
+
+

ΥեޥåȤ

+/*m[NAME] [start line]:[start column]-[end line]:[end column]*/ +

̣ޤ +ԤȥϤȤ 1 Ϥޤޤ +-K ץꤷϻޥϤޤޥˤϰ־Ϥޤ

+ + +

3.5.8.2. #undef ˴ؤ륳

+
+#undef  BAZ
+
+

ȤԤǤϡΤ褦ʥȤϤޤ

+
+/*undef 10*//*BAZ*/
+
+

/*undef [lnum]*//*[NAME]*/ ȤեޥåȤǡ[lnum] ϤιԤιֹ[NAME] ϤΥޥ̾򼨤ޤ

+ +

3.5.8.3. ޥŸ˴ؤ륳

+

ޥƤӽФ뤿Ӥˡ򶴤ǤγϤȽλ򼨤ޡϤޤ +ΥޡΥեޥåȤ HTML ˻ͥȲǽʤΤǡ/*<...*/ ޥŸγϤ򼨤/*>*/ νλ򼨤ޤ +ޥϤΥեޥåȤϥޥΥեޥåȤ /*m /*< ѤηȤޤ

+/*<[NAME] [start line]:[start column]-[end line]:[end column]*/ +

ޥȤϡΰΰ֤򼨤ޡȡŸγϤȽλ򼨤ޡϤޤ +ΰ֤򼨤եޥåȤ /*!...*/ Ȥ򤷤Ƥޤ +˥ޥϡƵŪˤΥޥξ󤬽Ϥޤ +ΥޥˤäΤǤʤС־ϽϤޤ +ɤΥޥβܤΰǤ뤫򼨤ˡ id ηǼޤ

+[func-like-macro-name]:[nesting level]-[argument number] +

ˤä BAZ(BAZ(a,b), c) ȤäͥȤ줿Ʊ̾ΥޥȤΰߤ˶̤뤳ȤǤޤ +ֹ 0 Ϥޤޤ +ơ˼ηΰ־³ޤ

+[start line]:[start column]-[end line]:[end column] +

ޤŸγϤ򼨤ޡϼηǤ

+/*<[func-like-macro-name]:[nesting level]-[argument number]*/ +

Ÿνλ򼨤ޡϥޥŸνΥޡƱ /*>*/ Ǥ

+

ʤΥ

+
+foo(NULL);
+foo(BAR(some_, var));
+foo = BAZ(NULL, 2);
+bar = BAZ(BAZ(a,b), c);
+
+

Τ褦ʷ̤Ϥޤ

+
+foo(/*<NULL 4:5-4:9*/0L/*>*/);
+foo(/*<BAR 5:5-5:20*//*!BAR:0-0 5:9-5:14*//*!BAR:0-1 5:16-5:19*/some_var/*>*/);
+foo = /*<BAZ 6:7-6:19*//*!BAZ:0-0 6:11-6:15*//*!BAZ:0-1 6:17-6:18*//*<BAZ:0-0*//*<NULL 6:11-6:15*/0L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+#define NULL 0L
+#define BAR(x, y) x ## y
+#define BAZ(a, b) a + b
+
+

foo.c Ȥȡ

+
+#include "bar.h"
+#ifdef  BAR
+#ifndef BAZ
+#if 1 + BAR( 2, 3)
+#endif
+#else
+#if 1
+#endif
+#if BAZ( 1, BAR( 2, 3))
+#undef  BAZ
+#endif
+#endif
+#endif
+
+

foo.c ϼΤ褦ʷ̤Ϥޤ

+
+#line 1 "/dir/foo.c"
+#line 1 "/dir/bar.h"
+/*mNULL 1:9-1:16*/
+/*mBAR 2:9-2:25*/
+/*mBAZ 3:9-3:24*/
+#line 2 "/dir/foo.c"
+/*ifdef 2*//*BAR*//*i T*/
+/*ifndef 3*//*BAZ*//*i F*/
+
+
+/*else 6:T*/
+/*if 7*//*i T*/
+/*endif 8*/
+/*if 9*//*BAZ*//*BAR*//*i T*/
+/*undef 10*//*BAZ*/
+#line 11 "/dir/foo.c"
+/*endif 11*/
+/*endif 12*/
+/*endif 13*/
+
+

ʤޤ /*if [lnum]*/ ȤեޥåȤǡǥ쥯ƥ̾³Ƹߤιֹ椬ɽޤ +ơιԤ˥ޥС줬Ĥ /*[NAME]*/ ȤեޥåȤɽޤ +Ǹˡ/*i T*/ ޤ /*i F*/ ǡιԤɾ true Ǥ뤫 false Ǥ뤫ʤ #if ǻϤޤ֥åѥ뤵֥ååפ֥åޤ +ϤʸȰäơޥŸ̤ɽޤ +#if 1 Τ褦˥ޥΤʤԤˤĤƤϡޥɽ /*[NAME]*/ ʤǤ

+

#elif, #ifdef, #ifndef ˤĤƤƱͤ /*elif [lnum]*/, /*ifdef [lnum]*/, /*ifndef [lnum]*/ ǻϤޤꡢޥƤ /*[NAME]*/ ³/*i T*/ ޤ /*i F*/ ǽޤ

+

åפ֥åΥǥ쥯ƥ֤ˤĤƤϲɽޤ

+ +

3.5.8.5. #else, #endif ˴ؤ륳

+

#else ԤǤϾΤ褦ˡ/*else [lnum]:[C]*/ ȤեޥåȤǾɽޤ +[lnum] Ϲֹ桢[C] T ޤ F ǡ #else - #endif ֥åѥ뤵֥åȤ⥹åפ֥å򼨤ޤ

+

#endif ԤǤϾΤ褦ˡ/*endif [lnum]*/ ȤեޥåȤǡߤιֹ椬ɽޤ +Ϥ󡢤ޤ #endif бŤƤʤǸ #if (#ifdef, #ifndef) бޤ

+

+ +

3.5.8.6. #line ν

+

ʤmacro notification mode Ǥ #line ԤΥե̾νϤǥեȤξȰ㤤#include Ԥλ full-path-list ΤϤޤ3.2 ȡˡ +Refactoring tool κưפˤ뤿Ǥ

+
+ +

3.6. #assert, #asm, #endasm

+

#assert pre-Standard ⡼ɤǤȤޤGCC ǤǤϼޤStandard C #error б뵡ǽǤStandard C

+
+#if ULONG_MAX / 2 < LONG_MAX
+#error  Bad unsigned long handling.
+#endif
+
+

ȤȤ

+
+#assert LONG_MAX <= ULONG_MAX / 2
+
+

Ƚ񤱤ޤ #if Ȥɾnon-zeroˤǤв⤻0ˤǤ

+
+Preprocessing assertion failed
+
+

Ȥդ³Ƥιԡʹ³ȥȽ򤷤ιԡˤɽޤ +ϥ顼ȤƥȤޤߤޤ

+

+#assert System V GCC #assert Ȥϡޤä̤ΤΤǤ

+

#asm, #endasm ΣĤΥǥ쥯ƥֹԤǤϤޤ줿֥åϥ֥饽Ȥưޤpre-Standard ⡼ɤǤȤޤ Microware C / 6809 Ѥ˽񤫤줿ΤʤΤǡ¾νϤˤܿˤϡsystem.c do_old(), do_asm(), put_asm() ˽­ɬפޤ
+#asm ֥åˤĤƤϡtrigraphs Ѵ <backslash><newline> κϤޤȤν token åʸåϤƬ space ޤޥޥƱ̾äƤޥŸιԤ򤽤Τޤ޽Ϥޤ¾Υǥ쥯ƥֹԤ #asm ֥åǤϰ̣ޤ

+

#asm, #endasm Standard C ǤǧʤΤǤޤ#pragma sub-directive ʳγĥǥ쥯ƥ֤ʳǤФ꤫#pragma asm, #pragma endasm ̾ѤƤ褷ޤ󡣤ȸΤϡStandard C ǤϥϤ٤ƣä token sequence ΩäƤɬפޤʸ̩˸ preprocessing token sequenceˡ֥ץϣä token sequence ǤϤʤǤStandard C ǥ֥ꥳɤȤˤϡʸƥȤ token ˡޤ󡣤ơȤ߹ߴؿ򥳥ѥΤ˼ơ

+
+asm(
+    " leax _iob+13,y\n"
+    " pshs x\n"
+);
+
+

ȤäǸƤӽФΤǤ

+

ĹɤȤʤȤϤäƤʤΤǡ +ξϤʬ̤δؿˤơ饤֥ؿ񤯻Τ褦ˡ̤Υեǥ֥ץऽΤΤ񤤤ơ֥ѥǽ󥯤ƻȤȤˤʤޤϵ¤Τ褦˻פ뤫⤷ޤ󤬡portable ʣåץ񤯤ˤϥ֥ʬϴʬΥɬפޤ顢ष #asm Ȥ鷺̥եǽ񤯤褦ˤۤɤǤ礦

+
+ +

3.7. C99 οǽ_Pragma() 黻ҡѰޥ

+

Standard ⡼ɤǤȤޤ
+-V199901L ץ __STDC_VERSION__ 199901L ʾˤȡC99 μεǽͭˤʤޤ
+C++ Ǥ -V199901L ץ __cplusplus 199901L ʾˤƱͤǤ1, 7 ʳλͤ C++ Standard ˤϤޤ󤬡Standard ⡼ɤǤ C99 Ȥθߴ뤿ˡΥץѰդƤޤ
+Ѱޥ Standard ⡼ɤǤ C90 C++ ǤȤ褦ˤƤޤ*1

+
    +
  1. // ޤǤ򥳥ȤȤư
    +
  2. ѰޥȤ롣 +
    +
  3. Preprocessing-number e+, E+, e-, E- Ʊͤ p+, P+, p-, P- Ȥ sequence ǧ롣ưΥӥåȥѥ 0x1.FFFFFEp+128 Ȥդˡʤɽ뤿ΤΤǤ롣
    +
  4. _Pragma() operator ͭˤʤ롣
    +
  5. EXPAND_PRAGMA Ȥޥ TRUE ƥѥ뤵줿 mcpp Ǥϡ#pragma ԤΰϡSTDC, MCPP, GCC Τɤ줫ǻϤޤΤǤʤ¤ޥŸоݤȤʤʥǥեȤǤ EXPAND_PRAGMA == FALSE ǤꡢޥŸʤŸΤ Visual C, Borland C ǤǤˡ
    +
  6. #if long long ΤϤǤ long long / unsigned long long ɾ롣
    +
  7. ̻ҡʸʸƥ롦pp-number ˤ \unnnn, \Unnnnnnnn η UCN Ȥ escape sequence ̤ Unicode ʸ̣ͤ롣#if Ǥ UCN ͤϣɽȤɾ롣ʤPOSTSTD ⡼ɤǤ UCN ϻȤʤˡ
    +
+

ѰޥȤΤϡΤ褦ʤΤǤ

+
+#define debug(...)  fprintf(stderr, __VA_ARGS__)
+
+

Ȥޥȡ +

+
+debug( "X = %d\n", x);
+
+

ȤޥƤӽФϼΤ褦Ÿޤ +

+
+fprintf(stderr, "X = %d\n", x);
+
+

ʤѥ᡼ꥹ ... İʾΥѥ᡼ִ̣ꥹ __VA_ARGS__ бޤơޥƤӽФˤ ... бʣäƤ⡢ , ޤϢ뤷ΤĤΰΤ褦˰ޤ

+

_Pragma 黻Ҥ _Pragma( "foo bar") Ƚ񤯤 #pragma foo bar Ƚ񤤤ΤƱ̤ı黻ҤǤʸƥޤϥ磻ʸƥ룱ĤǤʤФʤޤ󡣥磻ʸǤƬ L ʸƥϤ " ʸƥ \", \\ 򤽤줾 ", \ ֤Τ #pragma ΰȤưޤ
+#pragma ϥԣԤνᤫ齪ޤǤ˽񤫤ʤФʤ餺ʾʤȤ C90 Ǥϡ˥ޥŸʤΤФơ_Pragma() 黻ҤϥΤɤ˽񤤤ƤΩԤ #pragma 񤤤ΤƱ̤ޥִꥹ˽񤯤ȤǤޥŸη̤Ȥ줿 _Pragma() operator ͭǤνѤ뤳Ȥǡ portability ä pragma directive 񤯤ȤǤϤˤ #pragma ΰ㤤򣱤ĤΥإåեǵۼ뤳ȤǤޤʥץȤƤ "Validation Suite" pragmas.h, pragmas.t 򻲾ȤΤȡˡ*2

+

ʤC99 Ǥ #if ηϤνϤκȤʤäƤޤlong long / unsigned long long ɬܤȤƤΤǡ#if η long long / unsigned long long ޤϤʾȤȤˤʤޤC90, C++98 Ǥ #if long / unsigned long ɾ뤳ȤˤʤäƤޤmcpp C90, C++98 Ǥ long long / unsigned long long ɾlong / unsigned long ϰϤĶͤФƤϥ˥󥰤Фޤ*1

+

:

+

*1 GCC, Visual C 2005, 2008 ȤθߴΤǤ롣¾νϤǤ⡢ +C99 λͤ˼Τ񤷤Τǡ__STDC_VERSION__ 199409L ȤޤޤλͤƤ椯Ȥͽۤ롣

+

*2 C99 Ǥ #pragma ΰ STDC ǻϤޤϥޥŸʤǤʤ implementation-defined Ǥ롣

+
+ +

3.8. ϤȤüʻ

+mcpp compiler-specific-build ˤϤ줾νϤ˸ͭλͤĤƤޤΤ¹ԻץǤ #pragma ǤʤüʤΤ򤳤ޤ + +

3.8.1. GCC, Visual C βѰޥ

+

GCC V.2 Τ 3.9.1.6 ˤ褦ȼλͤβѰޥäƤޤ +򤳤Υޥ˥奢Ǥ GCC2 ͤβѰޥȸƤӤޤ +ޤ GCC V.3 Ǥ 3.9.6.3 Τ褦ʿͤޤ +򤳤Ǥ GCC3 ͤβѰޥȸƤӤޤ +GCC 2.95 Ǥ C99 ͤβѰޥޤglibc Linux ΥƥإåǤ C99 ͤΤΤϤ GCC3 ͤΤΤȤ줺ޤ GCC2 ͤȤƤޤ

+

GCC-specific-build mcpp V.2.6.3 STD ⡼ɤ˸¤ä GCC3 ͤβѰޥV.2.7 GCC2 ͤΤΤޤ + Linux ǻȤݤԼͳ򤱤뤿˼ΤǤ +˥󥰤Фޤ +GCC ͤ portability ʤǤʤʸˡŪ˱Τǡ񤯥ǤϻȤ٤ǤϤޤ +Ȥ GCC2 ͤǤ

+

Visual C 2003 ޤǤϲѰޥϼƤޤǤ2005 Ǽޤ + C99 λͤ GCC3 ͤȻäΤǡѰǡƤϡľΥȡ󤬥ޤǤФޤ +GCC Ȱä '##' ȤϻȤޤ +λͤ Visual C ΥɥȤˤȡΤ褦ʷ̤ˤʤޤ +ΣܤǤϥޤϺʤȤƤޤ +Visual C 2005, 2008 ϼºݤˤϤΥޤƤޤޤ

+
+#define EMPTY
+#define VC_VA( format, ...)     printf( format, __VA_ARGS__)
+VC_VA( "var_args: %s %d\n", "Hello", 2005);     /* printf( "var_args: %s %d\n", "Hello", 2005); */
+VC_VA( "absence of var_args:\n");               /* printf( "absence of var_args:\n");   */
+VC_VA( "empty var_args:\n", EMPTY);             /* printf( "empty var_args:\n", );  */  /* trailing comma   */
+
+

mcpp V.2.7 Visual C-specific-build STD ⡼ɤˤλͤޤ +˥󥰤Фޤ +嵭ΣܤǤϥޤϺ̤˼Ƥޤ

+ +

3.8.2. GCC 'defined' ν

+

ޥ 'defined' Ȥȡ󤬽ФƤ륱ǤϡGCC ϤΥޥ #if Ԥˤϡ¾ξȰۤʤäŪʽ򤷤ޤ +ˤĤƤ 3.9.4.6 ǸƤƤΤǡȤƤ

+

mcpp GCC-specific-build STD ⡼ɤǤ V.2.7 GCC Ʊ򤹤褦ˤޤ +Linux ΰΥƥإåʤɤǤμδְäޥȤƤΤн褹뤿Ǥ +˥󥰤Фޤ +ʬν񤯥ץǤ #if 񤯤褦ˤƤ

+ +

3.8.3. Borland C asm ʸ¾üʹʸ

+

Borland C ˤ asm Ȥɤäơ

+
+asm {
+    mov x,4;
+    ...;
+}
+
+

Ȥäǥ֥ꥳɤ򵭽Ҥ褦ˤʤäƤޤϣøʸˡϤ줿ˤ§ŪʤΤǤˤޤޥޥƱ̾ȡϥޥŸƤޤޤBorland C ΤΤǤ mcpp Ǥ⡢ƱǤ֥ץ̤ .asm եǽ񤯤ΤǤ礦 +mcpp ϤˤĤƤ̤ʰϲ⤷ޤ

+

Visual C++ ˤ __asm ȤƱͤΥɤޤ
+GCC ˤ asm( " mov x,4\n") ȤޤäȤʷȤ߹ߴؿѰդƤޤ

+ +

3.8.4. #import ¾

+ +

3.8.4.1. Mac OS X / GCC #import

+

GCC ˤ Objective-C #import Ȥǥ쥯ƥ֤ꡢC/C++ Ǥ⤳ #pragma once ۤ #include ȤƻȤޤ +Mac OS X C/C++ ˤϻˤȤΤ褦Ǥ

+

mcpp V.2.7 ʹߤ Mac OS X ˸¤äơGCC ǤǤ⥳ѥΩǤǤ⡢Ƥޤ

+ +

3.8.4.2. Visual C #import, #using

+

Visual C ˤ #import #using Ȥüʥǥ쥯ƥ֤ޤ +ץץǥ쥯ƥ֤η򤷤ƤޤƤϥѥȥ󥫤ФؼǤ +#import GCC ΤΤȤϴطޤ

+

mcpp Visual-C-specific-build ϤιԤ򤽤Τޤ޽Ϥޤ

+
+ +

3.9. GCC GCC Ȥθߴ

+

GCC Ǥ mcpp ǤϡGCC / cpp (cc1) ȤθߴѾ夢ޤؤʤ٤˳ݤƤޤߴ̤¿ޤ
+ޤ¹ԻץˤĤƤϡ2 Ϥ˸褦ˤ㤤ޤ-A ץϼƤޤ󡣤ޤǥ쥯ƥ֤Ǥ #assert, #ident ϼƤޤ*1
+ʤȤˡΤȤǥѥǤʤȤϤʤ褦Ǥ

+

षºݤȤʤΤϡŤץץåüʻͤ򤢤ƤˤǤ¿ GCC -pedantic ꤹȥ˥󥰤Фޤmcpp Standard ⡼ɤΤΤǤϥ顼å򵬳̤˼ƤΤǡۤ GCC -pedantic ǥեȤȤʤäƤޤGCC ϥǥեȤǤϤʰȿۤä̤ᡢ򤢤Ƥˤ˸ޤ򵬳ʤ˹פ褦˽񤯤ΤϤƴñʤȤǡ虜虜ʰȿν򤹤ɬϲ⤢ޤñ˰ܿ»ʤǡȥХβȤʤΤǡĤľƤޤ礦*2

+

:

+

*1 Ϥɬפʤ #pragma Ǽ٤ΤǤ롣 +#include_next, #warning ƱͤǤ뤬GCC ΥƥǤϼºݤ˻ȤƤΤǡmcpp Ǥ GCC Ǥ˸¤äƼ˥󥰤оݤˤʤ롣

+

*2 3.9 3.9.3 1998 ǯ˽񤫤줿ΤǤ뤬θϾѤäƤƤ롣 +Ťͤ˰¸륽Ͼʤʤꡢä GCC ȼγĥǽκ˰¸ΤƤƤ롣 +3.9.4 ʹߡȤ 3.9.8 ʹߤǼ夲ΤϼȤƤǤ롣 +(2008/03)

+ +

3.9.1. FreeBSD 2 / kernel Υץץ

+

ʲˡFreeBSD 2.2.2-R (1997/05) kernel 󤲤Ƥޤǥ쥯ȥ̾Ϥ /sys (/usr/src/sys) ΤΤǤΤ 7, 8 ɬ⵬ʰȿǤϤʤmcpp Ǥ̤ν򤷤ޤ֤ʤäʤΤǥ˥󥰤Фޤ6 ϳĥǽǡC99 ǤƱǽѰդƤޤGCC / cpp Ȥϵˡۤʤޤ

+ +

3.9.1.1. Ԥޤʸƥ

+

i386/apm/apm.c, i386/isa/npx.c, i386/isa/seagate.c, i386/scsi/aic7xxx.h, dev/aic7xxx/aic7xxx_asm.c, dev/aic7xxx/symbol.c, gnu/ext2fs/i386-bitops.h, pc98/pc98/npx.c ˤϤǥ֥饽ޤƤޤ

+
+asm("
+    asm code0
+#ifdef PC98
+    asm code1
+#else
+    asm code2
+#endif
+    ...
+");
+
+

ʸƥĤ " ޤǤˤʤäϹĤƤȲ᤹Τ GCC / cpp ΥǥեȤλͤǤȤäƤΤǤʤ˥ѥΤǤ asm() ΤԤޤʸƥȲᤵ餷ˡ

+

֥饽 .s եȤڤΥƤΤɤȻפޤɤƤ .c եߤСʤ֤ʤäȤ򤷤ʤƤ⡢Τ褦ˤФߤޤǤ Standard C ΥץץåǤꤢޤ

+
+asm(
+    "    asm code0\n"
+#ifdef PC98
+    "    asm code1\n"
+#else
+    "    asm code2\n"
+#endif
+    "    ...\n"
+);
+
+ +

3.9.1.2. #else junk, #endif junk

+

ddb/db_run.c, netatalk/at.h, netatalk/aarp.c, net/if-ethersubr.c, i386/isa/isa.h, i386/isa/wdreg.h, i386/isa/tw.c, i386/isa/b004.c, i386/isa/matcd/matcd.c, i386/isa/sound/sound_calls.h, i386/isa/pcvt/pcvt_drv.c, pci/meteor.c, pc98/pc98/pc98.h ˤϤԤޤ

+
+#endif MACRO
+
+

ϤƤޤ礦

+
+#endif /* MACRO */
+
+ +

3.9.1.3. #ifdef 0

+

i386/apm/apm.c ˤϤʤ

+
+#ifdef 0
+
+

ȤʹԤޤ +

+

+

+
+#if 0
+
+

δְ㤤ǤºݤˤϻȤƤʤ +ǥХå⤵ƤʤʤΤǤ礦

+ +

3.9.1.4. ޥ

+

gnu/i386/isa/dgb.c ǤϼιԤΥإåե̷⤹ˤʤޤ

+
+#define DEBUG
+
+

Standard C Ǥ violation of constraint ǡºݤˤϽϤˤäơ顼ˤǽͭȤΤȡGCC 2 / cpp Τ褦˥ǥեȤǤۤäƤȤͭȤΤȤޤμ¤ˤȤͭˤˤϡľ

+
+#undef DEBUG
+
+

٤Ǥ

+ +

3.9.1.5. #warning

+

i386/isa/if_ze.c, i386/isa/if_zp.c ˤ #warning ޤKernel ͣεʰȿǥ쥯ƥ֤ǤStandard C ˹碌뤿ˤϡιԤ򥳥ȥȤ뤷ޤ

+

mcpp GCC ǤǤ #warning ȤΤǡΤޤ̤ޤ

+ +

3.9.1.6. Ѱޥ

+

gnu/ext2fs/ext2_fs.h, i386/isa/mcd.c ˤϼΤ褦ʲѸİΥޥƤޤ

+
+#define MCD_TRACE(fmt, a...)                \
+{                                           \
+    if (mcd_data[unit].debug) {             \
+        printf("mcd%d: status=0x%02x: ",    \
+            unit, mcd_data[unit].status);   \
+        printf(fmt, ## a);                  \
+    }                                       \
+}
+
+#   define ext2_debug(fmt, a...)    { \
+        printf ("EXT2-fs DEBUG (%s, %d): %s:", \
+            __FILE__, __LINE__, __FUNCTION__); \
+        printf (fmt, ## a); \
+        }
+
+

GCC / cpp ȼγĥͤǡ¾νϤǤѤޤ󡣤 ## a ΤȤñ a Ȥ⤢ޤ## ȡޥƤӽФ a... бʤäϡľΥޤޤ
+C99 ǤϲѸİޥɲäƤޤˡۤʤꡢϼΤ褦˽񤯤Ȥˤʤޤ

+
+#define MCD_TRACE( ...)                     \
+{                                           \
+    if (mcd_data[unit].debug) {             \
+        printf("mcd%d: status=0x%02x: ",    \
+            unit, mcd_data[unit].status);   \
+        printf( __VA_ARGS__);               \
+    }                                       \
+}
+
+#   define ext2_debug( ...)         { \
+        printf ("EXT2-fs DEBUG (%s, %d): %s:", \
+            __FILE__, __LINE__, __FUNCTION__); \
+        printf ( __VA_ARGS__); \
+        }
+
+

C99 Ǥ ... бƤӽФΰϣİʾɬפʤΤФơGCC / cpp Ǥ a... бϣĤǤ⤫ޤʤȤΤäǤmcpp ǤϤн褹뤿ᡢ... бĤʤϡwarning ϽФΤΥ顼ˤϤʤ褦ˤƤޤäơΤ褦ʽǤޤΤۤ񤭴ϰабǤǤΤǡñǤνǤϡľΥޤĤΤǡȤ printf( fmt, ) ȤŸ̤ˤʤäƤޤȤޤξϡޥ嵭 C99 ͤνˤ뤫ޤϥޥƤӽФǥȤʤ褦ˤ뤷ޤ󡣥ˤ NULL 0 Τ褦̵ʥȡȤäơMCD_TRACE(fmt, NULL) Ƚ񤯤Ȥˤʤޤ*1

+
+#define MCD_TRACE(fmt, ...)
+{
+    if (mcd_data[unit].debug) {
+        printf("mcd%d: status=0x%02x: ",
+            unit, mcd_data[unit].status);
+        printf(fmt, __VA_ARGS__);
+    }
+}
+
+#   define ext2_debug(fmt, ...)         {
+        printf ("EXT2-fs DEBUG (%s, %d): %s:",
+            __FILE__, __LINE__, __FUNCTION__);
+        printf (fmt, __VA_ARGS__);
+        }
+
+

:

+

*1 GCC 2.95.3 ʹߤǤ C99 ιʸβѰޥƤΤǡȤۤɤGCC βѰޥϰĤǤɤȤ뤬εˡɤʤargs... Ȥѥ᡼Ǥ args ... ȤϤäĤƤʤФʤʤ pp-token ¸ߤʤִꥹȤǥȡϢ黻ҤƱˡ̤Ӥ˻ȤäƤΤ⡢ʤC99 εˡǡĤβѰƤȤͤǤ
+ʤGCC 3 ǤϲѰޥˤĤơGCC 2 λͤ C99 λͤȤŪʽɲä줿ˤĤƤ 3.9.6.3 򻲾ȤΤȡ

+ +

3.9.1.7. ޥƤӽФΥ

+

nfs/nfs.h, nfs/nfsmount.h, nfs/nfsmode.h, netinet/if_ether.c, netinet/in.c, sys/proc.h, sys/socketvars.h, i386/scsi/aic7xxx.h, i386/include/pmap.h, dev/aic7xxx/scan.l, dev/aic7xxx/aic7xxx_asm.c, kern/vfs_cache.c, pci/wd82371.c, vm/vm_object.h, vm/device/pager.c ˤϤޥƤӽФޤ/usr/include/nfs/nfs.h ǤƱͤǤ

+
+LIST_HEAD(, arg2)
+TAILQ_HEAD(, arg2)
+CIRCLEQ_HEAD(, arg2)
+SLIST_HEAD(, arg2)
+STAILQ_HAED(, arg2)
+
+

ʤΤǤ C99 ǤϸǧޤC90 Ǥ undefined ǤͥȤ줿ޥƤӽФǤޤްˤʤäΤͤȡꤵƤۤɤȸޤ˥񤯤ȤˤϤξɬʤޤ󡣰ĤΥޥǤϥȰηȤζ̤ĤʤȤ syntax Τޤ뤳Ȥ⡢˺ƤϤʤޤ

+

񤯤ۤɤǤ礦Ǥ Standard C ΤɤΥץץåǤꤢޤ

+
+#define EMPTY
+
+LIST_HEAD(EMPTY, arg2)
+TAILQ_HEAD(EMPTY, arg2)
+CIRCLEQ_HEAD(EMPTY, arg2)
+SLIST_HEAD(EMPTY, arg2)
+STAILQ_HAED(EMPTY, arg2)
+
+

ȤǡΥإåեˤϡΥޥʤ¾ΤɤΥإå #include ƤʤȤΤޤnfs ǥ쥯ȥΤΡˡΥޥ sys/queue.h ˤꡢ*.c ץब #include 뤳ȤԤƤΤǤ֤ʤäΥإåǤ

+

ʤkern/kern_mib.c ˤϼΤ褦ʥޥƤӽФޤ

+
+SYSCTL_NODE(, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
+
+

Υ EMPTY Ȥ櫓ˤϤޤ󡣤Υޥ sys/sysctl.h ˤꡢΤ褦ˤʤäƤ뤫Ǥ

+
+#define SYSCTL_NODE(parent, nbr, name, access, handler, descr)
+    extern struct linker_set sysctl_##parent##_##name;
+    SYSCTL_OID(parent, nbr, name, CTLTYPE_NODE|access,
+        (void*)&sysctl_##parent##_##name, 0, handler, "N", descr);
+    TEXT_SET(sysctl_##parent##_##name, sysctl__##parent##_##name);
+
+

ʤΰϥޥŸʤΤǤʤˤ SYSCTL_OID ȤޥǤ⡢ϤϥޥŸʤˡϥΤޤޤˤƤޤ*1

+

:

+

*1 C99 ǤϥϹˡȤƤ롣ޤ SYSCTL_NODE(), SYSCTL_OID() Τ褦ʥޥΤȤͤȡEMPTY ȤޥȤˡǽǤϤʤΤǡΤޤޤˤƤΤ뤳ȤǤ롣EMPTY ȤäƤ⡢ޥƤӽФͥȤƤȡϤꥫȯƤޤȤ⤢롣 readability ͤȡEMPTY ȤȤǤϻȤäۤɤ褦˻פ롣

+ +

3.9.1.8. Function-like ޥִ̾ object-like ޥ

+

i386/include/endian.h ˤϤޥޤ/usr/include/machine/endian.h ǤƱͤǤƱĤˡ

+
+#define __byte_swap_long(x)     (replacement text)
+#define NTOHL(x)                (x) = ntohl((u_long)x)
+#define ntohl                   __byte_swap_long
+
+

ntohl Ǥ object-like ޥǤʤ function-like ޥ̾Ÿ졢Τ³ƥȤ򴬤ߡ function-like ޥΤ褦ŸޤŸˡ K&R 1st. ΰۤλͤǡStandard C ǤϤʤˡȤʤäΤǤ䤬̤ΤȤƤ褦ˡλͤޥŸ̵ѤʣˤʽˤޤǺ⤿餷Ƥ븵Ǥꡢ֥ХΤ褦ʻ͡פʤΤǤ*1

+

ϼ֤ function-like ޥǤΤά object-like ޥȤƽ񤤤ƤΤǤfunction-like ޥ餷Τ褦˽񤤤ۤɤǤ礦Ǥв⤢ޤ

+
+#define ntohl(x)                __byte_swap_long(x)
+
+

i386/isa/sound/os.h ˤƱΥޥޤ

+
+#define INB                     inb
+#define INW                     inb
+
+

ϤƤޤ礦 +

+
+#define INB(x)                  inb(x)
+#define INW(x)                  inb(x)
+
+

:

+

*1 ISO 9899:1990 Corrigendum 1:1994 ǤϤ undefined Ȥ줿ơC99 Ǥ Corrigendum Τι̤ΤΤ֤줿ʽϤ˴ؤƤϺ𤷤Ƥ롣ܺ٤ cpp-test.html#2.7.6 򻲾ȡ

+ +

3.9.1.9. .S եΡ֥ץץ

+

Kernel ˤϲܤ .S ե롢ʤ֥饽ޤȤˤ #include #ifdef äơ֥ץץפɬפʤΤǤFreeBSD 2.2.2-R ǤϤΥ cc -x assembler-with-cpp ץդƸƤӽФȤˡǽƤޤ cc /usr/libexec/cpp -lang-asm ץĤƸƤӽФ as ƤӽФޤ

+

.S եϤ󵬳ʳ§Ǥ줬տ̤ˡ֥ץץפ뤿ˤϡޥȤޤްפ̾פ֥饽˴ޤޤƤƤϤޤ󡣤ơ֥ץץפǤϡ֥ȡ״֤ white space ̵ͭϤΤޤ¸ʤФʤ餺Ƭ space ¸ʤФʤޤ󡣹ԤκǽΡ֥ȡפ֥ΥȤǤ # Ǥϥץץå¦üʽɬפǤȤץץåʤ¤졢Хκˤ;פʿФȤʤФʤʤΤǡ褷ɤȤȤϻפޤ*1

+

ʣΥޥбΤ˥ץץɬפΤǤС.S եǤϤʤ .c եȤơηǽ񤯤ΤɤǤ礦4.4BSD-Lite ǤϼºݤˤνˤʤäƤޤ

+
+asm(
+    "    asm code0\n"
+#ifdef Machine_A
+    "    asm code1\n"
+#else
+    "    asm code2\n"
+#endif
+    "    ...\n"
+);
+
+

:

+

*1 FreeBSD 2.0-R ǤϤΥե̾ *.S ǤϤʤ *.s ȤʤäƤơMakefile ǤϤνˤ cc ǤϤʤ cpp ƤӽФơ as ƤӽФ褦ˤʤäƤơcpp ƤӽФ /usr/bin/cpp ư shell-script ǡ/usr/libexec/cpp -traditional ƤӽФΤۤscript 񤭴뤳ȤǻȤץץåѤ뤳ȤǤΤǡǤä

+ +

3.9.2. FreeBSD 2 / libc Υץץ

+

FreeBSD 2.2.2R /usr/src/lib/libc ⥳ѥ뤷ƤߤޤäϤޤǤȾ 4.4BSD-Lite 餽ΤޤƤ뤫Ǥ礦εϤǤ줤ʥäƤΤȤǡɮͤޤ

+

Ľꡢgen/getgrent.c ˼Τ褦ʹԤĤޤ󡢹 ; ;פǤ

+
+#endif;
+
+ +

3.9.3. GCC 2 / cpp λͤ

+

ơʾ˸褦ˡΥ򵬳ʤ˹פܿι⤤ʥǽ񤯤ȤˤϡݤǥåȤ⤢ޤ󡣤ˤ⤫餺ʤޤ˽񤫤ƤΤǤ礦

+

FreeBSD 2.0-R 2.2.2-R kernel ٤Ƥ⡢μΤΤϤޤ긺äƤޤ󡣿ۤɵʹ⤯ʤäƤȤϸ¤ʤȤʤΤǤμΤ䤷ʥΥ 4.4BSD-Lite ¸ߤƤΤϤ鷺Ǥ4.4BSD Standard C POSIX ˽򤷤ƽľ줿Ǥ礦ȤFreeBSD ؤμǰΥˤŤ뤬褷ƤޤäΤǤ嵭 ntohl Τ褦 4.4BSD-Lite Ǥ ntohl(x) ηˤʤäƤΤ FreeBSD ǤϤ虜虜 ntohl η˽ؤƤΤޤäݤ줿Τʤ褹ΤǤ礦

+

ϤˤϡGCC / cpp ۤä̤ƤޤȤΰƶƤȻפޤ-pedantic ưǥեȤǤСΥ虜虜ֿ׽񤫤뤳ȤϤʤäǤ礦ĤƤ -pedantic-errors ǥեȤˤΤǤϥѥǤʤ¿ơŪǤϤʤäΤ⤷ޤgcc man page ˤ -pedantic ץˤĤơ֤ȤͳϲʤΥץ¸ͳ pedants ­뤳ȤǤפȤޤ(*1) Standard C ޤäƣǯ⤿ĤޤȤʤäƤϡ-pedantic-errors ȤޤǤϤʤƤ -pedantic ǥեȤˤ٤ƤȻפޤ

+

FreeBSD 2.0-R ǤϥȤΥͥȤޤ2.2.2-R ǤϰݤƤޤݤ줿ΤϡGCC / cpp ǧʤʤäǤ -pedantic Ȥϴطޤ󤬡ץץåΥåΰϤϤۤ礭ΤǤ

+

:

+

*1 3.9.3 񤫤줿Τ 1998 ΤȤǤ롣θ塢gcc man info ǤϡˤɽϺ줿ͤäѤä櫓ǤϤʤ

+ +

3.9.4. Linux / glibc 2.1 Υץץ

+

glibc (GNU LIBC) 2.1.3 (2000/02) Υ򥳥ѥ뤷Ƥߤޤˤ FreeBSD libc ȤϰäƤʤ¿꤬ޤˤ GCC / cpp undocumented ʻͤѤƤΤꡢλͤͤߤǤʤλ֤䤷ƤޤäȤ󤫤ޤ

+ +

3.9.4.1. Ԥޤʸƥ

+

sysdeps/i386/dl-machine.h, stdlib/longlong.h ˤ

+
+#define MACRO asm("
+    instr 0
+    instr 1
+    instr 2
+")
+
+

ȤäιԤޤʸƥ뤬Ĥ⤢ޤ +ˤϤʤĹʤΤ⤢ޤ

+

ޤmake ˤä compile/csu/version-info.h ˤԤޤʸƥ뤬ޤ
+Ϥ󵬳ʰȿΥǤGCC ǤϤԥɤäʸƥȤưޤ
+mcpp Ǥ -lang-asm (-x assembler-with-cpp, -a) ץꤹȡԤޤʸƥ

+
+#define MACRO asm("\n    instr 0\n    instr 1\n    instr 2\n")
+
+

ȤѴƽޤ3.9.1.1 Τ褦˥ǥ쥯ƥ֤ΤϤޤäƤΤϡǤбǤľʤˡ

+ +

3.9.4.2. #include_next, #warning

+

catgets/config.h, db2/config.h, include/fpu_control.h, include/limits.h, include/bits/ipc.h, include/sys/sysinfo.h, locale/programs/config.h, sysdeps/unix/sysv/linux/a.out.h ˤ #include_next ޤ

+

ޤsysvipc/sys/ipc.h ˤ #warning ޤ

+

ϵʤǤǧƤʤǥ쥯ƥ֤Ǥglibc 2 ΥƥǤϤȤ #include_next ԲķΤΤȤʤäƤޤäƤΤǡmcpp Ǥ GCC ѤǤ #include_next #warning ϼƤޤ

+

#include_next ϵʰȿȤȤǤϤޤInclude directories ȤΥϴĶѿΥ桼¦ˤäѤ礬ΤǡˤäƷ̤äƤޤ

+

Glibc include ǥ쥯ȥΥեˤϡglibc install /usr/include ǥ쥯ȥ˥ԡΤ⤢ޤʤƥΥإåեȤƻȤΤʤΤǤإåե#include_next ȤƤ뤳ȤϡƥإåʤĤϤ֤ˤʤäƤƤ뤳ȤɽƤޤɬפʻˤƤ褦Ǥ

+ +

3.9.4.3. Ѱޥ

+

elf/dl-lookup.c, elf/dl-version.c, elf/ldsodefs.h, glibc-compat/nss_db/db-XXX.c, glibc-compat/nss_files/files-XXX.c, linuxthreads/internals.h, locale/loadlocale.c, locale/programs/linereader.h, locale/programs/locale.c, nss/nss_db/db-XXX.c, nss/nss_files/files-XXX.c, sysdeps/unix/sysdep.h, sysdeps/unix/sysv/linux/i386/sysdep.h, sysdeps/i386/fpu/bits/mathinline.h

+

ʾΥեˤ GCC / cpp λͤβѸİޥȸƤӽФޤ*1

+ +

:

+

*1 GCC2 餢ͤǤ뤬Τۤ GCC3 Ǥ C99 GCC2 ȤŪʻͤɲä줿 +ˤĤƤ 3.9.6.3 򻲾ȤΤȡ

+ +

3.9.4.4. ޥƤӽФΥ

+

catgets/catgetsinfo.h, elf/dl-open.c, grp/fgetgrent_r.c, libio/clearerr_u.c, libio/rewind.c, libio/clearerr.c, libio/iosetbuffer.c, locale/programs/ld-ctype.c, locale/setlocale.c, login/getutent_r.c, malloc/thread-m.h, math/bits/mathcalls.h, misc/efgcvt_r.c, nss/nss_files/files-rpc.c, nss/nss_files/files-network.c, nss/nss_files/files-hosts.c, nss/nss_files/files-proto.c, pwd/fgetpwent_r.c, shadow/sgetspent_r.c, sysdeps/unix/sysv/linux/bits/sigset.h, sysdeps/unix/dirstream.h

+

ʾΥեˤϥޥƤӽФΥޤȤ math/bits/mathcalls.h ˤϥ 79 Ĥ⤢ޤΥإåե /usr/include/bits/mathcalls.h install ơ/usr/include/math.h #include ΤǤEMPTY ȤޥȤäƤ⡢ޥƤӽФͥȤƤΤǡϤ̤ΥȯޤäȤ줤ʥޥνϤǤʤΤǤ礦

+ +

3.9.4.5. Function-like ޥִ̾ object-like ޥ

+

argp/argp-fmtstream.h, ctype/ctype.h, elf/sprof.c, elf/dl-runtime.c, elf/do-rel.h, elf/do-lookup.h, elf/dl-addr.c, io/ftw.c, io/ftw64.c, io/sys/stat.h, locale/programs/ld-ctype.c, malloc/mcheck.c, math/test-*.c, nss/nss_files/files-*.c, posix/regex.c, posix/getopt.c, stdlib/gmp-impl.h, string/bits/string2.h, string/strcoll.c, sysdeps/i386/i486/bits/string.h, sysdeps/generic/_G_config.h, sysdeps/unix/sysv/linux/_G_config.h

+

ʾΥեˤ function-like ޥִ̾ object-like ޥޤˤϡmath/test-*.c ˤΤΤ褦ˡfunction-like ޥ object-like ޥִơˤ줬 function-like ޥִ̾Τ⤢ޤ򤹤ɬΤǤ礦

+ +

3.9.4.6. 'defined' Ÿޥ

+

sysdeps/generic/_G_config.h, sysdeps/unix/sysv/linux/_G_config.h, malloc/malloc.c ˤϡ㤨мΤ褦 defined Ȥ pp-token Ÿޥޤ

+
+#define HAVE_MREMAP defined(__linux__) && !defined(__arm__)
+
+

ϡ

+
+#if HAVE_MREMAP
+
+

Ȥǥ쥯ƥ֤

+
+#if defined(__linux__) && !defined(__arm__)
+
+

Ȥʤ뤳ȤԤƤΤǤ +

+

ޤ #if ǥޥŸη̤ defined Ȥ pp-token ФƤΤϡʤǤ undefined ǤΤȤ̤ȤƤ⡢ʤΥޥѤǤ

+

HAVE_MREMAP ȤޥϤä

+
+defined(__linux__) && !defined(__arm__)         (1)
+
+

ִ졢 identifier Ǥ defined, __linux__, __arm__ 줾ޥǤ뤫ɤĴ٤졢ޥǤŸޤäơdefined ϥޥȤƤϤϤʤΤǡʤ⤷ƤС켫ΤǤ undefinedˡ __linux__ 1 Ƥơ__arm__ ƤʤСΥޥϺǽŪ˼Τ褦Ÿޤ

+
+defined(1) && !defined(__arm__)
+
+

defined(1) Ϥ #if syntax error Ǥ

+

Ȥ GCC Ǥϡ#if ԤǤʤФʤΤǤ#if Ԥ˸¤ä (1) ǥޥŸƤޤ #if ȤɾޤUndefined ǤΤǤְ㤤Ȥϸޤ󤬡ޥŸ #if ԤȤǤʤȤǰۤʤΤϡӤʤͤǤʤȤ⤽λͤˤ portability ޤ*1

+

ΥޥϼΤ褦˽񤱤СʤΤǤ

+
+#if defined(__linux__) && !defined(__arm__)
+#define HAVE_MREMAP 1
+#endif
+
+

ʤä᤯ݤƤۤΤǤ +*2

+

:

+

*1 GCC 2 / cpp #if ԤǤŪ defined üʥޥȤưäƤ롣 +ΤᡢΤ褦ʥȡޥŸΤ˺ΤǤ뤬η̤ޥŸˡ#if Ȥɾ뤳ȤˤʤΤǤ롣ʤޥŸ #if ɾȤʬΥ˺򤷤ƤΤǤ롣

+
+defined(__linux__) && !defined(__arm__) +
+

GCC / cpp Υץ๽¤ˤ⤫Ǥ롣GCC 2 / cpp Ǥ rescan() Ȥޥ롼󤬻¾Υᥤ롼ȤʤäƤơ줬ƥȤᤫ齪ޤɤߤʤƤ椯ơץץǥ쥯ƥ֤ν롼⤳椫ƤӽФΤǤ롣ǤޥǼΤϥޥץåŪʥץ๽¤Ǥ뤬ι¤ޥŸ¾νȤκطʤˤʤäƤȹͤ롣

+

*2 glibc 2.4 ǤϤΥޥľƤ롣 +Ȥ¾ΥޥƱΤΤˤĤФƤƤ롣

+ +

3.9.4.7. .S եΡ֥ץץ

+

*.S Ȥ̾Υեϥץץפ륢֥ΥǤˤ #include, #define, #if Υץץǥ쥯ƥ֤ФƤޤˡMake ˤä compile/csu/crti.S Ȥեˤϡ

+
+#APP
+
+

Ȥ

+
+#NO_APP
+
+

ȤԤޤǸޤ +ιԤ̵ʥץץǥ쥯ƥ֤ȹʸ塢̤ĤޤGNU ǤϤιԤϤΤޤޥץץ˻Ĥäơ֥ΥȤȤư褦Ǥ

+

ޤ## 黻Ҥˤ pp-token Ϣ뤬 invalid pp-token Ƥޤ⤢ޤGCC / cpp ϤۤäƤΤޤ޽Ϥޤ

+

mcpp Ǥ GCC / cpp ȤθߴΤˤʤ-lang-asm (-x assembler-with-cpp, -a) ץդȡ illegal ʥǥ쥯ƥ֤ ## ˤä줿 invalid pp-token 򥨥顼ˤ˥󥰤ФΤΤΤޤ޽Ϥ褦ˤޤ

+

衢֥ѤΥޥץåǽ٤ΤȻפޤGNU ˤ gasp Ȥ֥ѥޥץå褦ǤʤۤȤɻȤƤʤ褦Ǥ

+ +

3.9.4.8. rpcgen -dM ץλͤ

+

GCC -dM ȤץǵưȥޥϤޤmake check ǻȤ stdlib/isomac.c ϤѤƤޤisomac.c ϡޥեηȤ GCC νϷꤷƤơȤԤ⥨顼ˤʤäƤޤȤǤ

+

glibc make Ǥ rpcgen ȤץबȤ뤳ȤޤΥץϡץץåιֹνϷȤƤϤ GCC

+
+#123 "filename"
+
+

ȤꤷƤơ

+
+#line 123
+
+

+
+#line 123 "filename"
+
+

⥨顼ˤʤäƤޤȤǤ +

+

mcpp Ǥ GCC ǤǤ GCC ηǥեȤˤޤrpcgen üʷˤơɸŪʷбƤʤȤΤϡʻͤǤ

+ +

3.9.4.9. -include, -isystem, -I- ץ

+

glibc 2.1 makefile Ǥϡ-include ץ󤬤ФлȤƤޤˤ -isystem ץ -I- ץȤޤ-include ϥƬ #include ФΤǡ-isystem, -I- ϥƥإå򹹿礷ɬδʤΤǤ
+mcpp Ǥ GCC Ѥμ˸¤äơΣĤΥץޤޤɬפΤʤץƤ餤ΤǤ*1

+

:

+

*1 GCC / cpp ˤϤΤۤ -iprefix, -iwithprefix, -iwithprefixbefore, -idirafter Ȥä include directory Ȥνꤹ륪ץ󤬤Ĥ⤢롣ޤlong-file-name MS-DOS 8+3 Υե̾ȤбɽλѤꤹ -remap ץ⤢롣 CygWIN ƥ specs եǻȤ뤳Ȥ뤬include directory ϴĶѿǻꤷƤФळȤǤꡢ8+3 Υե̾ؤбޤ CygWIN ɬפȤפʤ

+ +

3.9.4.10. Undocumented ʻޥ

+

glibc ǤϤʤGCC Ǥ

+
+__VERSION__, __SIZE_TYPE__, __PTRDIFF_TYPE__, __WCHAR_TYPE__
+
+

ʾ̾ϥɥȤˤϸޤ󤬡GCC / cpp ǤϻޥȤʤäƤޤ__VERSION__ ͤ Vine Linux 2.1 (egcs-1.1.2) Ǥ "egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)" ȤʤäƤޤ¾ΣĤ Linux / i386 Ϥ¿ΥƥǤϤ줾 unsigned int, int, long int ȤʤäƤ褦ǤFreeBSD, CygWIN ǤϾİäƤޤʤʤ㤦ɬפΤ狼ʤˡ
+ȤɤƥɥȤˤʤΤǤ礦

+ +

3.9.4.11. Undocumented ʴĶѿ

+

äȤʤΤ SUNPRO_DEPENDENCIES Ȥ undocumented ʴĶѿǤsysdeps/unix/sysv/linux/Makefile ˤ

+
+SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \
+$(CC) -E -x c $(sysinclude) $< -D_LIBC -dM | \
+... \
+etc.
+
+

Ȥ script ޤ SUNPRO_DEPENDENCIES ȤĶѿǥե̾ꤷcpp Υޥȥեΰ¸طԤ򤽤λꤵ줿ե˽ϤȤΤʤΤǤ

+

ư򤹤ˤϡGCC / cpp Υ (egcs-1.1.2/gcc/cccp.c) ɤषޤǤ
+ΤۤDEPENDENCIES_OUTPUT ȤĶѿ⤢ꡢƱͤΰ̣äƤޤSUNPRO_DEPENDENCIES Τۤ system headers ΰ¸طԤϤΤФơDEPENDENCIES_OUTPUT ϤǤϤʤȤ㤤ޤ

+

mcpp Ǥ GCC бǤ˸¤äơΣĤδĶѿбޤ΢͡פΤ褦ʤΤ᤯ѻߤƤۤΤǤ

+ +

3.9.4.12. ¾

+

Linux (i386) / GCC ǤϤΤۤspecs եλˤäơcpp θƤӽФ -Asystem(unix) -Acpu(i386) -Amachine(i386) ȤץղäޤѤ륽ϾʤȤ glibc 2.1.3 Linux / x86 ǤˤϤʤ褦Ǥ
+Glibc 饤󥹥ȡ뤵륷ƥإåĤϤ餱ʣʤΤˤʤäƤƤ뤳Ȥϡ礭ǤäȤΰ㤤ˤäƽ̤äƤ붲줬ޤ

+

¾ǡFreeBSD 2.2.2 / kernel Ǹ줿 #else junk, #endif junk ޥ glibc 2.1.3 ǤϸޤǤGlibc 2.1 Υ FreeBSD 2 / kernel ΥƤ̤⤤餫ޤ

+

ΤȤƤϡglibc 2.1 ˤ GCC üʻͤ˰¸Ƥ륽ʤ餺ꡢ¾νϤؤΰܿϺˤʤäƤޤʿܤΥեǤϤǤ뤬ˡץβƥʥΤˤ⡢ GCC local ʻͤؤΰ¸ϹޤޤGCC V.3 ǤϤ΢Ūͤѻߤ˰¸륽ݤ뤳ȤԤȻפޤ

+ +

3.9.5. GCC 2 mcpp Ȥˤ

+

mcpp glibc 2.1 Υѥ˻ȤˤϡޤΥνɬפǤ*1
+ĤϲѸİΥޥȸƤӽФǤ嵭 3.9.4.3 ˤ 14 ĤΥեˤĤơ3.9.1.6 ˤ褦ʷǽޤ󡢸ΥեĤƤۤɤǤ礦
+⤦Ĥϡ3.9.4.6 ˤ룳ĤΥեΡִꥹȤ "defined" ФƤޥνǤޤ/usr/include/_G_config.h sysdeps/unix/sysv/linux/_G_config.h install ƤǤƱΥեǤ⽤ƤۤɤǤ礦

+

mcpp εưˤϡMakefile specs եղä륪ץΤۤˡԤޤʸƥ䥢֥ѤΥȤޤ *.S եΤ -lang-asm (-x assembler-with-cpp) ɬפǤΥץ¾ΥեΥץץˤդƤơ̾Ϥޤޤ

+

GCC / cpp Ȥä mcpp ȤäꡢǥեȤղä륪ץѹꤹ뤿ˤϡΤ褦ˤΤɤǤ礦

+

Super-user ˤʤäơcpp ¸ߤǥ쥯ȥʤǤ /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66 Ȥˤ˹Ԥޤ GCC / cpp cpp Ȥ̾¸ߤmcpp mcpp Ȥ̾ install ƤȤޤޤΤ褦Ƥ mcpp.sh Ȥ̾Υեޤ*2

+
+#!/bin/sh
+/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/mcpp -Q -lang-asm "$@"
+
+

-Q ץϤʤƤ⤫ޤޤ󤬡̤οǥåϿˤդۤɤǤ礦
+ˡΤ褦ʥޥɤǤߤޤ

+
+chmod a+x mcpp.sh
+mv cpp cpp_gnuc
+ln -sf mcpp.sh cpp
+
+

Ƥȡgcc cpp ƤӽФˡ˥󥯤Ƥ mcpp.sh ¹Ԥ졢mcpp ˾嵭Υץgcc ղä륪ץˡղäƸƤӽФޤ

+

ǥեȤΥץѹϡmcpp.sh ѹʤꡢmcpp ľܸƤӽФʤꤷޤơGCC / cpp Ȥ

+
+ln -sf cpp_gnuc cpp
+
+

Ȥޤ

+

:

+

*1 mcpp V.2.7 GCC-specific-build ˤλͤ줿ΤǡʤƤץץϤǤ褦ˤʤä

+

*2 mcpp configure ƥ󥹥ȡ뤷ϼưŪŬڤ꤬롣 +Ȥ -Q -lang-asm ץɲäǤࡣ

+ +

3.9.5.1. mcpp Υ˥󥰤ˤ

+

mcpp ȤΤ⤦Ĥϡ̤Υ˥󥰤Ϥ뤳ȤǤ-Q ץǥ쥯ȤƤ⡢glibc Τ褦絬Ϥʥ mcpp.err ׿ɴ MB ʾˤʤΤǡ٤Ƥܤ̤櫓ˤϤޤ
+Ƥ򸫤ȡƱ˥󥰤֤ФƤ뤳Ȥ狼ޤƱ *.h ե뤬¿Υ #include 뤿ˡƱ˥󥰤֤֤ФΤǤƸˤϡΤ褦ˤޤ
+ޤ顼åޤ

+
+grep 'fatal:' `find . -name mcpp.err`
+grep 'error:' `find . -name mcpp.err`
+
+

ˡ˥󥰤ޤ +

+
+grep 'warning:' `find . -name mcpp.err` | sort -k3 -u > mcpp-warnings-sorted
+
+

˥󥰤νн򤹤٤Ƹ뤿ˤϡΤ褦ˤޤ +

+
+grep 'warning:' `find . -name mcpp.err` | sort -k3 | uniq > mcpp-warnings-all
+
+

μΥ˥󥰤򸫤ˤϡȤмΤ褦ˤޤ +

+
+grep 'warning: Replacement' `find . -name mcpp.err` | sort -k3 | uniq | less
+
+

ƸĤǡ mcpp.err less ǸƤǧɬפʤ饽򸫤ޤ
+ɬפʤ顢θĽ #pragma MCPP debug expand, #pragma MCPP end_debug ǶǺ٥ץץơνϤ򸫤ޤλˤϡץץνϤȿǥåȤƱե˽Ф褦ˡΤ褦ˤޤmake ϡ嵭 shell-script 񤭴ˡ

+
+mcpp <-opts> in-file.c > in-file.i 2>&1
+
+ +

3.9.6. GCC 3.2 Υץץ

+

Linux FreeBSD ǡGCC 2.95.* GCC 3.2R (2002/08) Υ򥳥ѥ뤷Ƥߤޤơ줿 gcc Ȥä mcpp 򥳥ѥ뤷˥ץץˤȤä GCC 3.2 GCC 3.2 Υꥳѥ뤷Ƥߤޤ

+

GCC make ϤĤʳФ bootstrap Ƥ椯褦ˤʤäƤޤʤǽʳ줿 gcc, cc1, etc. ȤäƼʬȤꥳѥ뤷äƺ줿ΤȤäƤޤʬȤꥳѥ뤷Ȥäв򤿤ɤޤgcc bootstrap Ǥ xgcc Ȥ̾¸ߤƤޤ

+

ޤGCC 2 Ǥ cc1, cc1plus ΩƤ cpp GCC 3 Ǥ cc1, cc1plus ˵ۼƤޤޤΩץץåǤ cpp0 ¸ߤƤꡢgcc g++ -no-integrated-cpp ȤץդȤ˥ץץ򤵤뤳ȤǤ褦ˤʤäƤޤäơmcpp ˥ץץ򤵤뤿ˤϡgcc (xgcc), g++ θƤӽФ shell-script ֤ơmcpp => cc1 ޤ mcpp => cc1plus ȤǼ¹Ԥ褦ˤʤФʤޤ*1

+

GCC ΥƥǤϡƥإå䤽Υ꤬ʣˤʤäƤƤޤޤGCC 3 Ǥ GCC Ū˻Ȥ C++ shared library λͤ GCC 2 ȤѤä褦ǤΤᤫѥ뤹Ǥ⤦ޤ椫ʤȤޤޤѥȥƥȤˤ¿¾ΥեȥɬפǡΥС󤬸Ťȡޤ椫ʤȤޤΤȤǤϥϡɥǤޤѥǤʤȤ⤢ޤ

+

FreeBSD 4.4R Ǥ GCC 3.2 ϥѥǤޤǤFreeBSD 4.7R upgrade packages 4.7 ѤΤΤؤơ褦䤯ѥ뤹뤳ȤǤޤ*2
+ΤȤǤϣΥѥƱ VineLinux 2.5 äƤޤ (K6/200MHz) Ǥ GCC 2.95.3 ȤäƤΥѥϤǤΤΡ줿 GCC 3.2 / cc1 segmentation fault 򷫤֤ƤޤʬȤΥꥳѥ뤬ǤޤǤθ塢K6 AthlonXP ˼ؤƥꥳѥ뤷Ȥ٤ segmentation fault ȯޤǤϥϡɥäΤ⤷ޤ
+ޤFreeBSD Ǥ K6 Υѥ GCC 2.95.4 Ȥä GCC 3.2 򥳥ѥ뤷ϡmake -k check ǤϤۤȤɤ٤̤äΤǤ줿 GCC 3.2 GCC 3.2 Ȥꥳѥ뤷Ȥ٤ϡg++, libstdc++-v3 make -k check testsuite Σ᤯̤ʤȤݤⵯޤAthlonXP ˼ؤƤϤޤ椯褦ˤʤޤϡɥäΤ⤷ޤ

+

ޤVineLinux GCC 3.2 Ȥ mcpp Ȥäƥꥳѥ뤷ϡ줿 gcc make -k check ̤ޤg++, libstdc++-v3 testsuite Σ᤯̤ޤǤ*3, *4, *5
+ɤˤƤ⡢줿 gcc, g++, cc1, cc1plus ǤϤʤإåե뤫饤֥꤫̯Τ褦Ǥ
+mcpp GCC Ȥϴ˸ߴǤϤޤ󤬡ʤ⤤ߴäƤΤǡؤƻȤäƤۤϤʤȻפޤ

+

GCC 3.2 Υѥ˻ȤäƥϼΤΤǤ

+
+ + + + + + + +
OS make library CPU
VineLinux 2.5GNU makeglibc 2.2.4Celeron/1060MHz
VineLinux 2.5GNU makeglibc 2.2.4K6/200MHz
VineLinux 2.5GNU makeglibc 2.2.4AthlonXP/2.0GHz
FreeBSD 4.7R UCB makelibc.so.4 K6/200MHz
FreeBSD 4.7R UCB makelibc.so.4 AthlonXP/2.0GHz
+
+

ѥ뤷Τ C C++ Ǥ

+

:

+

*1 bootstrap γʳȤˤʤФʤʤΤǤ롣 +Makefile ϼˤϤޤ礭ʣʤΤǡ̤ĥդƤơstage ѤäȤ ^C Ǥơscript ֤ȤԺٹˡȤä

+

*2 ⡢¿ packages δ֤ΰ¸طΤǡС󤬤ޤޤȺ롣ΤȤǤϤΤˡ kterm ưʤȤ֤˴٤äȤ⤢롣

+

*3 make -k check mcpp ϻȤäƤϤʤǥå GCC Ȥϰۤʤ뤫Ǥ롣

+

*4 make -k check ϴĶѿ LANG, LC_ALL C ȤơѸĶˤʤȤʤ

+

*5 Testsuite ̤ʤľܤθϤ٤ơi686-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.5.0.0 Ȥ饤֥ pthread_getspecific, pthread_setspecific pthread_* Ȥؿ󥯤ǤʤȤΤǤ롣줿Υ饤֥ƤСmake -k check ̤롣FreeBSD ǤϤϵʤ̯Τ褦Ǥ롣

+ +

3.9.6.1. Ԥޤʸƥ

+

ΤޤˤŤ GCC 3.2 ΥˤϤޤ󡣤λͤ GCC 3.2 Ǥ褦䤯 obsolete Ȥޤˤ줬ȡ̤˽Ϥޤ˥󥰤Фޤ

+ +

3.9.6.2. #include_next, #warning

+

Make build/gcc/include limits.h, syslimits.h ˤ #include_next ꡢGCC 3.2 install ȡlib/gcc-lib/i686-pc-linux-gnu/3.2/include limits.h, syslimits.h ˥ԡޤ

+

#warning ϸޤǤ

+ +

3.9.6.3. Ѱޥ

+

ѰޥϤĤޤȾ testsuite ΤΤǡƥѤ˽񤫤줿ץˤޤ󡣤ơGCC 2 εˡϤޤݡȤƤϤΤΡ__VA_ARGS__ Ȥä C99 ΤΤ¿ʤäƤޤ

+

ޤGCC 3 Ǥ GCC 2 λͤ C99 λͤȤŪʽɲäƤޤηǤ*1

+
+#define eprintf( fmt, ...)   fprintf( stderr, fmt, ##__VA_ARGS__)
+
+

GCC 2 ͤμνбޤ

+
+#define eprintf( fmt, args...)   fprintf( stderr, fmt, ##args)
+
+

ϡ... бʤäϡľΥޤȤͤǤȤСΤ褦Ÿޤ

+
+eprintf( "success!\n")  ==>  fprintf( stderr, "success!\n")
+
+

򸫤ʻͤΤ褦ǤޥִꥹΥޤϥѥ᡼ڤΤȤϸ¤ʤȡȡϢ黻ҤǤ ## ̤Ư򤵤Ƥ뤳ȡ§㳰äʣˤΤǤ뤳ȡ꤬ޤ*2, *3, *4

+

:

+

*1 Υޥ˥奢ǤϡGCC 2 βѰޥ GCC2 ͡GCC 3 ɲä줿Τ GCC3 ͤȸƤ֤Ȥˤ롣

+

*2 GCC 2.* Ǥ GCC2 ͤβѰޥ args... Ǥ args ... ȤϤäĤƤʤФʤʤäGCC 3 Ǥϴ֤ space äƤƤɤʤä

+

*3 -ansi ץ󤬻ꤵ줿-std=c*, -std=iso* ץǤƱ͡ˡѰ¸ߤʤƤ⥳ޤϺʤ +'##' ۤäƾä롣

+

*4 mcpp Ǥ V.2.6.3 GCC-specific-build STD ⡼ɤ˸¤äơGCC3 ͤβѰޥ줿 + V.2.7 GCC2 ͤΤΤˤб

+ +

3.9.6.4. ޥƤӽФΥ

+

ޥƤӽФΥϡ#include 륷ƥإåΤΡ/usr/include/bits/mathcalls.h, /usr/include/bits/sigset.hˤ̤ȤȡGCC 3.2 ΥΤǤϡgcc/libgcc2.h ˤޤ*1

+

:

+

*1 ΣĤΥإåե glibc install 뤳ȤǥƥإåäƤ椯ΤǤ롣FreeBSD Ǥ glibc ȤäƤʤΤǡΥƥإå¸ߤʤ

+ +

3.9.6.5. Function-like ޥִ̾ object-like ޥ

+

gcc/fixinc/gnu-regex.c, libiberty/regex.c ˤϡfunction-like ޥִ̾ object-like ޥޤޤ#include /usr/lib/bison.simple ƱͤǤϤ٤ alloca ˴ؤΤǤȤСlibiberty/regex.c ˤϤޥޤ

+
+#define REGEX_ALLOCATE  alloca
+#define alloca( size)   __builtin_alloca( size)
+
+

ϡ񤱤ʤΤǤʤʤȤάΤǤ礦

+
+#define REGEX_ALLOCATE( size)   alloca( size)
+
+

regex.c Ǥ alloca ϾˤäƤϼΤ褦褦ˤʤäƤꡢ뤬ӤƤޤ

+
+#define alloca  __builtin_alloc
+
+

ޤregex.c ˤ #include "regex.c" ȤԤꡢʬȤ򥤥󥯥롼ɤ褦ˤʤäƤޤʣʥǤ

+ +

3.9.6.6. 'defined' Ÿޥ

+

GCC 3.2 Υˤϸޤ

+

ɥȤˤȡμΥޥν GCC 2 / cpp ƱǤΤΡportability ʤפȤ˥󥰤ФȤˤʤäƤޤƥȤƤߤȡ3.9.4.6 Ǥϥ˥󥰤Фޤ

+ +

3.9.6.7. .S եΡ֥ץץ

+

GCC 3 / cpp ΥɥȤˤϡΤ褦˽񤫤Ƥޤ

+
Wherever possible, you should use a preprocessor geared to the +language you are writing in. Modern versions of the GNU assembler have +macro facilities.
+

GCC 3.2 ȤΥˤϡ*.S ե뤬 gcc/config ǥ쥯ȥ˿ܤޤ

+ +

3.9.6.8. rpcgen -dM ץλͤ

+

GCC 3.2 make Ǥ rpcgen -dM ץȤޤǤrpcgen -dM ץλͤäѤäƤϤʤ褦Ǥ

+ +

3.9.6.9. -include, -isystem, -I- ץ

+

ΥץϤФлȤƤꡢ-isystem ץ system include directory Ʊ˿Ļꤵ礵ޤƥإåΤΤ򹹿륽եȥΥѥǤϡ򤨤ʤȤʤΤǤ礦Ķѿǰ礷ƻꤷۤ狼䤹ȻפΤǤ

+

ǡGCC 3 / cpp ΥɥȤǤϡ-iwithprefix, -iwithprefixbefore ץˤĤƤϡֻȤʤۤɤ (discouraged)פȽ񤫤ƤޤGCC ˤ include directory ꤹ륪ץ󤬤䤿ˤޤäƤΤǤ礦*1

+

:

+

*1 GCC 3.2 Makefile -iprefix ץդƤ롣 +Ȥ -iwithprefix, -iwithprefixbefore ϻȤʤΤǤ롣-iprefix ץϡθˤΣĤΥץΤɤ餫äƽựĤΤǤ뤬

+ +

3.9.6.10. Undocumented ʻޥ

+

GCC 2 Ǥ __VERSION__, __SIZE_TYPE__, __PTRDIFF_TYPE__, __WCHAR_TYPE__ λޥˤĤƤϡɥȤ˵ܤʤ-dM ץǤΤ뤳ȤǤޤǤGCC 3 ǤϥɥȤ˰̣ܤ졢Ūͤ -dM Τ뤳ȤǤ褦ˤʤޤ

+ +

3.9.6.11. Undocumented ʴĶѿ

+

GCC 2 ǤϥɥȤ˵ܤΤʤä SUNPRO_DEPENDENCIES ȤĶѿˤĤƤϡGCC 3 ǤϥɥȤ˵ܤ褦ˤʤޤʤʤʤΤɬפʤΤϤ狼ʤˡ

+ +

3.9.6.12. ¾

+

GCC 3 ǤϼΤ褦 #pragma Ƥޤ

+
+#pragma GCC poison
+#pragma GCC dependency
+#pragma GCC system_header
+
+

GCC 3.2 ΥǤ⡢Τ poison system_header ȤƤޤmcpp ǤϤϥݡȤƤޤ󡣻ͤϾʤޤɬޤ괶ʤǤ*1

+

GCC 3 Ǥ #assert assertion directives ϡֿ侩ʤ (deprecated)פȤޤʤgcc ϥǥեȤ -A ץȯԤ뤬ˡ

+

ޤGCC 2 Ǥ -traditional ץƱ cpp ǼƤꡢΤ˸Ťͤ C90 λͤߤʻͤȤʤäƤޤGCC 3.2 Ǥϥץץå̾ cpp0 tradcpp0 Ȥʬޤ-traditional ץ gcc ФƤͭǡcpp0 ˤϤޤgcc -traditional ϥץץ tradcpp0 ƤӽФޤtradcpp0 C90 ο traditional ʥץץå˶ᤤΤȤʤäƤޤơtradcpp0 ΤۤϺ塢ʥХνʳϥƥʥ󥹤ʤȤƤޤ

+

GCC 2 / cpp δ̯ʻͤϤֽƤ褦˸ޤ

+

:

+

*1 mcpp V.2.7 GCC-specific-build #pragma GCC system_header 򥵥ݡȤ

+ +

3.9.7. GCC 3, 4 mcpp Ȥˤ

+

ʾ˸Ƥ褦ˡGCC 3.2 ΥϾʤȤץץϡglibc 2.1.3 ʤɤ٤Ȥʤ꤭줤ʤΤˤʤäƤޤTraditional ʽϤۤܰݤ졢̣ΤʤץϻȤʤʤäƤƤޤ
+ޤGCC 3.2 / cpp0 ΤΤ⡢traditional ʻͤ obsolete ʤΤȤưtoken-based ʸ§ΤˤʤɡGCC 2 / cpp ٤ȳʤͥ줿ΤȤʤäƤޤɥȤ undocumented ʬ˸ޤޤṲ̋¿ޤȤƤɤ˸äƤȻפޤ

+

GNU ΥƥǤϥƥإåʣǡɤʤäƤΤưפİǤʤ褦ˤʤäƤޤ줬 GNU ΥƥΥȥ֥κװȤʤäƤΤǤϤʤǤ礦

+

⤦ĻǰʤΤϡץץѥΤ˵ۼƤޤäȤǤΤᡢmcpp Ȥˤ gcc g++ -no-integrated-cpp ȤץդƸƤӽФɬפޤʣ makefile ¿ makefile 礭ʥե뷲򥳥ѥ뤹䡢Υץफ gcc ưŪ˸ƤӽФϡgcc, g++ θƤӽФ shell-script ֤ơΥץ󤬼ưŪղä褦ˤʤФʤޤ

+

Ūˤϡgcc, g++ ֤Ƥǥ쥯ȥʻ Linux Ǥ /usr/local/gcc-3.2/binˤ˼Τ褦 script 򤽤줾 gcc.sh, g++.sh Ȥ֤̾ޤ

+
+#!/bin/sh
+/usr/local/gcc-3.2/bin/gcc_proper -no-integrated-cpp "$@"
+
+
+#!/bin/sh
+/usr/local/gcc-3.2/bin/g++_proper -no-integrated-cpp "$@"
+
+

ơΥǥ쥯ȥǼΤ褦ˤޤ

+
+chmod a+x gcc.sh g++.sh
+mv gcc gcc_proper
+mv g++ g++_proper
+ln -sf gcc.sh gcc
+ln -sf g++.sh g++
+
+

ޤcpp ֤Ƥǥ쥯ȥʻ Linux Ǥ /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2ˤǡGCC 2 ξƱͤˡcpp0 θƤӽФ mcpp ¹Ԥ褦ˤƤޤ 3.9.5 ȡˡ*1
+Ƥȡgcc g++ ޤ mcpp ƤӽФ졢θ cc1, cc1plus -fpreprocessed ȤץץѤߤǤ뤳Ȥ򼨤ץդƸƤӽФ褦ˤʤޤ

+

ʤƥɸȰۤʤС GCC 򥤥󥹥ȡ뤷ղŪ include directory ꤬ɬפʤȤޤmcpp ǤϤ mcpp ΥѥȤ߹Τǡ̾ϴĶѿꤹɬפϤޤ

+

Ǥ cc1, cc1plus ΥץץʬǤ cpplib Υ mcpp ΤΤ֤ȤǤcpplib cc1, cc1plus ȤŪ interface cpplib Ȥ桼ץȤγŪ interface Ƥ륽ե뤬碌 46KB ⤢ꡢȤƤ֤ԲǽǤɤƤʣ interface ˤɬפΤǤ礦ǰʤȤǤ

+

:

+

*1 configure mcpp 򥤥󥹥ȡ뤷ϡ餬ưŪꤵ롣

+ +

3.9.7.1. GCC 3.3, 3.4-4.1 mcpp Ȥˤ

+

ɤ˸äƤ GCC V.3 ǤV.3.3 ̯žƤޤޤV.3.3 V.3.2 ٤ȡΤ褦礭ѤäƤޤ

+
    +
  1. ñΤ cpp0 Ϥʤʤägcc -no-integrated-cpp ϤޤȤ뤬ƤӽФΤ cc1 (cc1plus) Ǥ롣ʤץץǤ⥳ѥǤ cc1 ƤӽФ롣ơץץե cc1 ˥ץץѤǤʤץ󤬤ФϤʲȤˡ
    +
  2. 60 Ĥ 70 Ĥ̤ΥޥƤ롣ˤäƥƥإå GCC Ȥδطʣˤʤä
    +
  3. tradcpp ʤʤꡢGCC V.3.2 Ǥ obsolete Ȥ deprecated Ȥ줿Ťͤΰ褷
    +
+

ΤȤơĤεʥѥˤ٤ƤۼȤʤäƤꡢýϤιΤȤƤ⡢ץ󥽡νϤγȯȤƤ⡢礤˵ΤȤǤ

+

mcpp ΰܿǤϡgcc ɤʥץϤƤ뤫狼ʤȤΤȤǤְäץ⤹٤ƥå̵뤹ΤǤϴޤȤꤢФдְäϤƤ륪ץ̵뤹褦ˤޤʳΥץϤȥ顼ˤʤϤǤ
+ѹǤ⡢mcpp νΥץˤϻȤʤʤäΤޤV.2.5 -E ץѻߤ-m ץ -e ˡ-c -@compat ѹޤ
+ޤGCC V.3.2 Ǥ cpp0 θƤӽФ mcpp ֤ФȤ٤ cc1 (cc1plus) θƤӽФ mcpp cc1 (cc1plus) Ȥ˿ʬ뤳ȤɬפˤʤޤΤ shell-script src/set_mcpp.sh Ѱդޤ̤λޥϣģбƤ櫓ˤϤʤΤǡGCC -dM ץνϤ礷Ѥ褦ˤޤ*1, *2, *3

+

GCC V.3.4 ǤϤˡmulti-byte character Ϥ٤ UTF-8 ѴƤ褦ѤޤɥȤˤȡŪˤϼΤ褦ˤʤäƤޤ*4

+
    +
  1. ץץκǽΥեǡmulti-byte character UTF-8 Ѵ롣
    +
  2. Ѵˤ libiconv δؿȤäơiconv бƤ encoding Ϥ٤ƻȤ롣
    +
  3. ե encoding ꤹˤ -finput-charset=<encoding> ץȤʼºݤˤϡꤷʤ UTF-8 ˤѴʤˡ
    +
  4. ѥ encoding ϥǥեȤǤ UTF-8 Ǥ뤬-fexec-charset=<encoding> ץ¾ encoding ꤹ뤳ȤǤ롣*5
    +
+

ֹݲפȸ Unicode б뤳ȤȹͤĬȤ˼ºݤ multi-byte character Ȥʤο͡δ֤ˤޤĬ GCC ˤڤǤޤä褦Ǥ

+

⡢ͤޤʬ˼Ƥޤ󡣼ºݤ˻ȤäƤߤȡΤ褦ˤʤޤ

+
    +
  1. EUC-JP, GB2312, KSC-5601, Big5 -finput-charset ץꤹ UTF-8 Ѵ졢ꤷʤФΤޤ̤롣*6
    +
  2. -fexec-charset ץ V.3.4, 4.0 ǤϸʤäV.4.1-4.3 Ǥϸ
    +
  3. ISO2022-JP V.3.4, 4.0 ǤϽǤʤäV.4.1-4.3 ǤϤǤ롣
    +
  4. ɤΥСǤ shift-JIS -finput-charset ꤹȤäƺ𤷤Ƥޤ
    +
+

mcpp -e <encoding> ץ encoding ꤷޤGCC-specific-build ǤϡBIG5, shift-JIS, ISO2022-JP Ǥ <backslash> ȰפͤΥХȤľ <backslash> ƥѥη٤䤤ޤUTF-8 ˤѴ encoding Τޤ޽Ϥޤ-finput-charset ץ -e ץƱΤȤưޤϼΤ褦ͳǤ*7

+
    +
  1. SJIS -f*-charset ꤹȡɤΥС GCC ǤǤ롣ɤΥС GCC Ǥ⡢SJIS, JIS, BIG5 Ѵ <backslash> äƤȤΤޤ̤ꡢ̤η̤ˤʤ롣 +EUC-JP, GB2312, KSC-5601 ѴʤФΤޤ̤롣 +ʤsingle byte character sequence Ǥ뤫Τ褦˰롣
    +
  2. GCC 4.0 ޤǤΥСǤϤɤ encoding UTF-8 鸵 encoding ᤻ʤ
    +
  3. GCC ζᤤλѹԤ
    +
+

:

+

*1 -dM ץνϤ¾ΥץˤäƾäƤΤǤ롣 +⡢λޥȾ undocumented ʤΤǤ롣 +ΤᡢƤϤʤʤİǤʤ

+

*2 MinGW Ǥ symbolic link Ȥʤln -s ȤޥɤϤ뤬ñ˥ԡΤΤǤ롣ޤMinGW GCC ϤȤ cc1 Ȥ̾ΥեǤäƤ⤽줬 shell-script Ǥȡưݤ롣Τᡢmcpp GCC-specific-build ǤϡMinGW ˸¤ä cc1.exe Ȥ̾μ¹ԥץʤ cc1plus.exe ˤ⥳ԡˡơ椫 mcpp.exe ޤ GCC cc1.exe ʤ cc1plus.exe ư褦ˤƤ롣

+

*3 CygWIN / GCC Ǥ -mno-cygwin Ȥץ󤬤ꡢꤹ system include directory ѤꡢGCC λޥѤ롣Τᡢmcpp CygWIN GCC-specific-build Ǥ V.2.6.1 ϣåȤλޥѰդ褦ˤ

+

*4 ΤȤ FreeBSD 6.3 ǤϤʤ GCC ΤѴϤޤäưʤlibiconv ϥ󥯤ƤΤǤ뤬 +FreeBSD 5.3, 6.2 Ǥ⤽Ǥä

+

*5 ѴϥץץեǤϤʤѥեǹԤ褦Ǥ롣 +-E ץνϤ UTF-8 ΤޤޤǤ롣

+

*6 GCC V.4.1-4.3 Ǥϡ-save-temps ޤ -no-integrated-cpp ץ -f*-charset ץƱ˻ꤹȡ顼ˤʤȤХ롣 +

*7 mcpp νϤ cc1 Ϥˤ -finput-charset Ϥ -fexec-charset ץդƤϤʤ

+ +

3.9.8. Linux / glibc 2.4 Υץץ

+ +

glibc 2.4 (2006/03) Υ򥳥ѥ뤷ơץץåƤߤޤ +Ϥ GCC 4.1.1 ǡץץå mcpp 2.6.3 ֤ΤǤ +ޥ x86 ϤʤΤǡ¾ CPU ѤΥɤϥåƤޤ

+

˻䤬å glibc 2.1.3 (2000/02) 飶ǯФäСʤΤǡ礭ѤäȤ󤢤ޤճѤäƤʤȤ¿ޤ +ΤȤƤϡΥСˤĤƻ䤬夲줺ˡष뷹ˤޤ

+ +

3.9.8.1. Ԥޤʸƥ

+ +

Ԥޤʸƥϸʤʤޤ

+ +

3.9.8.2. #include_next, #warning

+ +

Υեˤ #include_next ޤ +ǯȾΥС٤Ƥޤ

+ +

+catgets/config.h, +elf/tls-macros.h, +include/bits/dlfcn.h, +include/bits/ipc.h, +include/fpu_control.h, +include/limits.h, +include/net/if.h, +include/pthread.h, +include/sys/sysctl.h, +include/sys/sysinfo.h, +include/tls.h, +locale/programs/config.h, +nptl/sysdeps/pthread/aio_misc.h, +nptl/sysdeps/unix/sysv/linux/aio_misc.h, +nptl/sysdeps/unix/sysv/linux/i386/clone.S, +nptl/sysdeps/unix/sysv/linux/i386/vfork.S, +nptl/sysdeps/unix/sysv/linux/sleep.c, +sysdeps/unix/sysv/linux/ldsodefs.h, +sysdeps/unix/sysv/linux/siglist.h +

+ +

Υե make check ǻȤƥѤΤΤǤˤ #include_next ޤ

+ +

sysdeps/i386/i686/tst-stack-align.h

+ +

#warning sysvipc/sys/ipc.h ˤޤ˥ѥ뤵Ȥϥåפ֥åˤΤǡҤä뤳ȤϤޤ

+ +

3.9.8.3. Ѱޥ

+ +

ΥեˤϲѰޥޤϤ٤ GCC2 θŤͤΥޥǤ +C99 λͤΤΤϤGCC3 ͤΤΤ⸫ޤ

+ +

elf/dl-lookup.c, +elf/dl-version.c, +include/libc-symbols.h, +include/stdio.h, +locale/loadlocale.c, +locale/programs/ld-time.c, +locale/programs/linereader.h, +locale/programs/locale.c, +locale/programs/locfile.h, +nptl/sysdeps/pthread/setxid.h, +nss/nss_files/files-XXX.c, +nss/nss_files/files-hosts.c, +sysdeps/generic/ldsodefs.h, +sysdeps/i386/fpu/bits/mathinline.h, +sysdeps/unix/sysdep.h, +sysdeps/unix/sysv/linux/i386/sysdep.h

+ +

ϥƥѤΥ롼Ǥˤ GCC2 ͤβѰޥޤ

+ +

localedata/tst-ctype.c, +posix/bug-glob2.c, +posix/tst-gnuglob.c, +stdio-common/bug13.c

+ +

ºݤˤΥޥƤӽФȤˤϡѰĤʤʥʤ§ŪʸƤӽФ¿ʤäƤޤ +μ§ŪʥޥƤӽФ 142 ܤΥե˸ޤ +ΤִꥹȤDzѰľ ", ##" Ȥ sequence äƤ ',' 륱ϡ120 ܤΥ˸ޤ

+

Ѱޥ C99 λͤȤäۤ portable ɤΤǤGCC2 뤤 GCC3 ͤβѰޥ C99 ͤΤΤ˽ľΤϡɬñǤϤޤ +GCC2 뤤 GCC3 ͤǤϼºݤΥޥƤӽФDzѰʤ硢ľΥޤΤǡޥθƤӽФˤäƤ C99 ͤȤϣУбʤǤ +ޥ C99 ͤ˽񤭴硢ޤʤǤ褦ˤ뤿ˤϡޥƤӽФΤۤľɬפޤ

+

glibc 2.1.3 ǤϤޤΥޥοۤ¿ϤʤäΤǡ桼ܤdzΤʤ饨ǥǽ񤭴뤳ȤǤޤglibc 2.4 ǤϿ⤽ΥޥθƤӽФĽ꤬ᡢ桼񤭴뤳ȤԲǽˤʤޤ

+

Τᡢmcpp Ǥ V.2.6.3 GCC-specific-build ˸¤äơGCC3 ͤβѰޥޤ + V.2.7 GCC2 ͤΤΤˤбޤ +GCC2 ͤΤΤ token-based ʸ§ݤΥƤΤǡȤޥ򿷤񤯤٤ǤϤޤ +GCC2 ͤ GCC3 ͤȣУбƤΤǡޥ GCC3 ͤ˽ľȤưפˤǤޥƤӽФľʤƤ⤹ߤޤ +Ǥ GCC2 ͤǽ񤫤ƤޥϤ񤭴ۤ餫狼䤹ʤޤ*1

+

GCC2 ͤβѰޥ GCC3 ͤ˽ľˤϡ㤨мΤ褦ʤΤ

+ +
+#define libc_hidden_proto(name, attrs...)   hidden_proto (name, ##attrs)
+
+ +

Τ褦ˤޤ

+ +
+#define libc_hidden_proto(name, ...)    hidden_proto (name, ## __VA_ARGS__)
+
+ +

ʤѥ᡼ attrs... ... ˤִꥹ attrs __VA_ARGS__ ˤޤ

+ +

:

+

*1 GCC2 ͤ GCC3 ͤβѰޥˤĤƤϡ3.9.1.6, 3.9.6.3 򻲾ȤΤȡ

+ +

3.9.8.4. ޥƤӽФΥ

+ +

ΤޥƤӽФϤ¿488 ܤΥե˸ޤ +ΥС٤Ƥޤ +C99 ǥǧ줿ȤƶƤΤǤ礦

+ +

Ȥ math/bits/mathcalls.h ˤ 79 ĤΥޥƤӽФޤ +ȤۤƱͤǤ

+ +

3.9.8.5. Function-like ޥִ̾ object-like ޥ

+ +

Υեˤ function-like ޥִ̾ object-like ޥޤ

+ +

argp/argp-fmtstream.h, +hesiod/nss_hesiod/hesiod-proto.c, +intl/plural.c, +libio/iopopen.c, +nis/nss_nis/nis-hosts.c, +nss/nss_files/files-hosts.c, +nss/nss_files/files-network.c, +nss/nss_files/files-proto.c, +nss/nss_files/files-rpc.c, +nss/nss_files/files-service.c, +resolv/arpa/nameser_compat.h, +stdlib/gmp-impl.h, +string/strcoll_l.c, +sysdeps/unix/sysv/linux/clock_getres.c, +sysdeps/unix/sysv/linux/clock_gettime.c

+ +

elf/link.h ˤϼΤ褦 function-like ޥִ̾ function-like ޥޤ

+ +
+#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
+                                        /* sysdeps/generic/ldsodefs.h:46    */
+#define _ElfW(e,w,t)    _ElfW_1 (e, w, _##t)            /* elf/link.h:32    */
+#define _ElfW_1(e,w,t)  e##w##t                         /* elf/link.h:33    */
+#define __ELF_NATIVE_CLASS __WORDSIZE               /* bits/elfclass.h:11   */
+#define __WORDSIZE 32           /* sysdeps/wordsize-32/bits/wordsize.h:19   */
+#define ELF32_ST_TYPE(val) ((val) & 0xf)                /* elf/elf.h:429    */
+
+ +

嵭Τ褦ʥޥȡ

+ +
+    && ELFW(ST_TYPE) (sym->st_info) != STT_TLS      /* elf/do-lookup.h:81   */
+
+ +

ΥޥƤӽФǤ ELFW(ST_TYPE) Τ褦ŸƤޤ

+ +
+    ELFW(ST_TYPE)
+    _ElfW(ELF, __ELF_NATIVE_CLASS, ST_TYPE)
+    _ElfW_1(ELF, 32, _ST_TYPE)
+    ELF32_ST_TYPE
+
+ +

ơELF32_ST_TYPE (sym->st_info) 򴬤 ((sym->st_info) & 0xf) Ÿޤ +ʤ_ElfW_1(ELF, 32, _ST_TYPE) Ȥ function-like macro θƤӽФ ELF32_ST_TYPE Ȥ̤ function-like macro ̾ŸΤǤ

+ +

ϣĤΥޥ򼡤Τ褦˽񤤤ơ

+ +
+#define ELFW( type, val)        _ElfW( ELF, __ELF_NATIVE_CLASS, type, val)
+#define _ElfW( e, w, t, val)    _ElfW_1( e, w, _##t, val)
+#define _ElfW_1( e, w, t, val)  e##w##t( val)
+
+ +

Τ褦˸ƤӽФۤ狼䤹ʤޤ +ϤĹ˸뤫⤷ޤ󤬡ؿƤӽФǥȤƹͤСΤۤǤ礦

+ +
+    && ELFW(ST_TYPE, sym->st_info) != STT_TLS
+
+ +

3.9.8.6. 'defined' Ÿޥ

+ +

Υեˤϡִꥹ 'defined' ȤȡνФƤޥޤ*1

+ +

iconv/skeleton.c, +sysdeps/generic/_G_config.h, +sysdeps/gnu/_G_config.h, +sysdeps/i386/dl-machine.h, +sysdeps/i386/i686/memset.S, +sysdeps/mach/hurd/_G_config.h, +sysdeps/posix/sysconf.c

+ +

ΥեǤϤΥޥ #if ԤǻȤƤޤ +ޤ嵭Υե뼫ȤǤȤƤ礬ޤ

+ +

elf/dl-conflict.c, +elf/dl-runtime.c, +elf/dynamic-link.h

+ +

glibc 2.1.3 malloc/malloc.c ˤ HAVE_MREMAP ȤϤִꥹȤ 'defined' ФƤޥޤglibc 2.4 ǤϤ portable ʷľƤޤ +¾ΥˤμΥޥƤޤޤ

+

#if Ԥִꥹ 'defined' ФƤޥƤӽФη̤ϵʤǤ undefined ǤꡢŪ˽Τ GCC ξͤǤ +¾νϤǤǤ portable ʥˤ뤿ˤϡΥޥ񤭴뤳ȤɬפǤ +ˤϥޥƤӽФ񤭴ʤФʤޤ*2

+

ν񤭴¿ξϡ3.9.4.6 ˤˡǤǤޤ +ˤϤǤбǤʤΤ⤢ޤ +'defined MACRO' ɾߥ󥰤ˤäưۤʤǤ +㤨Сsysdeps/i386/dl-machine.h ˤϼΤ褦ʥޥꡢΥޥ¾Υե #if ǻȤƤޤ

+ +
+#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
+
+ +

򤳤񤭴ΤǤϡޤޤ

+ +
+#if defined RTLD_BOOTSTRAP
+#define ELF_MACHINE_NO_RELA 1
+#endif
+
+ +

RTLD_BOOTSTRAP Ȥޥ elf/rtld.c ޤ줬 dl-machine.h include ȸ include 礬ꡢˤä 'defined RTLD_BOOTSTRAP' η̤äƤΤǤ + portable ˽ľˤϡELF_MACHINE_NO_RELA ȤޥȤȤơΤ褦 #if Ԥ

+ +
+#if ELF_MACHINE_NO_RELA
+
+ +

Τ褦ˤޤ +ELF_MACHINE_NO_RELA #if ԤǤȤƤʤ̵ѤʥޥʤΤǤ

+ +
+#if defined RTLD_BOOTSTRAP
+
+ +

glibc ǤϼºݤˤνˤʤäƤȤ¿ΤǤ줬 ELF_MACHINE_NO_RELA Ȥ undefined ʽȺߤƤޤ

+ +

:

+

*1 Linux Ǥ /usr/include/_G_config.h glibc sysdeps/gnu/_G_config.h 󥹥ȡ뤵줿ΤʤΤǡˤ⼡Τ褦Ʊޥ롣

+ +
+#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
+
+ +

Ϥ񤭴Ƥ٤Ǥ롣

+ +
+#if defined (_STATBUF_ST_BLKSIZE)
+#define _G_HAVE_ST_BLKSIZE 1
+#endif
+
+ +

*2 mcpp V.2.7 GCC-specific-build STD ⡼ɤ˸¤äơ#if ԤΥޥ˽ФƤ 'defined' ȡ GCC Ʊͤ˽褦ˤ + bug-to-bug н򤢤Ƥˤ٤ǤϤʤ

+ +

3.9.8.7. .S եΡ֥ץץ

+ +

*.S ե CPU ȤѰդƤΤǤ¿1000 ܤޤ⤢ޤx86 CPU ǻȤΤϤΤΰˡ

+

*.S եϥ֥饽 C #if, #include directive 䥳Ȥޥ򺮺ߤΤǤ֥饽 C token sequence η򤷤ƤʤΤǡ C ץץåǽ뤳Ȥˤ̵ޤ +ץץå C ǻȤʤ %, $ ʸ⤽Τޤ̤space ̵ͭ⸶§ȤƤΤޤްݻʤФʤޤ + C Ǥϥ顼ˤʤȤ򥨥顼ˤˤΤޤ̤褦ˡʸˡå˴¤ʤФʤޤ +ơΰ #if ޥϽΥ顼å⤷ʤФʤʤΤǤ +äʤȤǤ +λͤˤϤ٤ŪʺϲʤGCC local ʡ¿ undocumented ʡ˻ͤȤäƤˤޤ

+

nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S ˤϼΤ褦ʬޤ

+ +
+    .byte   8               # Return address register
+                            # column.
+#ifdef SHARED
+    .uleb128 7              # Augmentation value length.
+    .byte   0x9b            # Personality: DW_EH_PE_pcrel
+                            # + DW_EH_PE_sdata4
+
+ +

'#ifdef SHARED' C directive ǤƹԤθȾ # ǻϤޤʬϥȤΤĤΤ褦Ǥ +'# column.' Τ褦˹Ԥκǽ non-white-space-character # ξϡ̵ directive ȹʸ塢̤Ĥޤ +'# + DW_EH_PE_sdata4' ˻äƤ C ǤϹʸ顼ˤʤΤǤ
+¾ΥեˤϼΤ褦⤢ޤ + '\'' Ȥʸ C Ǥ character constant ξü˻ȤΤʤΤǡ줬ñȤǸ tokenization Υ顼ˤʤޤ

+ +
+    movl 12(%esp), %eax     # that `fixup' takes its parameters in regs.
+
+ +

ˡ嵭 pthread_cond_wait.S ˤϼΤ褦ʬޤϥޥθƤӽФǤ

+ +
+versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+          GLIBC_2_3_2)
+
+ +

ΥޥϼΤ褦ˤʤäƤޤ

+ +
+# define versioned_symbol(lib, local, symbol, version) \
+  versioned_symbol_1 (local, symbol, VERSION_##lib##_##version)
+                                    /* include/shlib-compat.h:65    */
+# define versioned_symbol_1(local, symbol, name) \
+  default_symbol_version (local, symbol, name)
+                                    /* include/shlib-compat.h:67    */
+# define default_symbol_version(real, name, version) \
+     _default_symbol_version(real, name, version)
+                                    /* include/libc-symbols.h:398   */
+#   define _default_symbol_version(real, name, version) \
+     .symver real, name##@##@##version
+                                    /* include/libc-symbols.h:411   */
+#define VERSION_libpthread_GLIBC_2_3_2  GLIBC_2.3.2
+                            /* make  abi-versions.h:145 */
+
+ +

ˤäơΥޥϤŸ̤ˤʤ뤳ȤԤƤޤ

+ +
+.symver __pthread_cond_wait, pthread_cond_wait@@GLIBC_2.3.2
+
+ +

_default_symbol_version Ǥ +'@' Ȥʸ C token (pp-token) ˤϤޤ +ơ ## 黻ҤϢ뤷 pthread_cond_wait@@GLIBC_2.3.2 Ȥ token ⤢ޤ +Ϣˤ illegal token ޤ +Υޥ C ## 黻ҤȤäƤޤʸˡ C ȤϳݤΥ줿ΤǤ

+

֥饽ˤĤƥץץΤ褦ʤȤ򤹤ΤǤСϤꥢ֥ѤΥޥץåȤ٤Ǥ礦 +C ץץåȤΤǤС*.S ǤϤʤ *.c Ȥơ֥ѤΥɤʸƥ asm() ʤ __asm__() ʤδؿϤ٤Ǥ礦 +libc-symbols.h ˤϼΤ褦̥СΥޥѰդƤơ*.c ǤФ餬Ȥޤ +ϵʽ C ץץåʤǤޤ

+ +
+#   define _default_symbol_version(real, name, version) \
+     __asm__ (".symver " #real "," #name "@@" #version)
+
+ +

glibc ˤ asm() __asm()__ Ȥä *.c, *.h ե¿ޤޤȾ§Ū *.S եȤʤäƤޤ

+

ɤƤ⥢֥饽 C ץץåǽΤǤСƥȵȤƤ # ǤϤʤ /* */ // Ȥ٤Ǥ +ºݡglibc Ǥ /* */ // ȤäƤ륽¿ΤǤ# ȤäƤ륽⤤Ĥޤ

+

Ȥϸglibc 2.4 Ǥ *.S ե뤬ޤˤ¿ 2.1.3 Τ C ʸˡ̵뤷¿ʤäƤΤǡmcpp Ǥ V.2.6.3 lang-asm ⡼ɤǤʸˡå˴¤§Ǥ褦ˤޤ

+ +

3.9.8.8. versions.awk, rpcgen -dM ץλͤ

+ +

3.9.4.8 ˽񤤤 stdlib/isomac.c ѤäƤޤ

+

rpcgen ѤäƤޤ

+

glibc 2.4 ˤ scripts/versions.awk Ȥե뤬ޤϥץץåνϤιƬ space οˤĤơGCC ǤѤʤǤޤ +mcpp ¾ΥץץåȤˤϡΥե򼡤Τ褦˽ʤФʤޤ

+ +
+$ diff -c versions.awk*
+*** versions.awk        2006-12-13 00:59:56.000000000 +0900
+--- versions.awk.orig   2005-03-23 10:46:29.000000000 +0900
+***************
+*** 50,56 ****
+  }
+
+  # This matches the beginning of a new version for the current library.
+! /^ *[A-Z]/ {
+    if (renamed[actlib "::" $1])
+      actver = renamed[actlib "::" $1];
+    else if (!versions[actlib "::" $1] && $1 != "GLIBC_PRIVATE") {
+--- 50,56 ----
+  }
+
+  # This matches the beginning of a new version for the current library.
+! /^  [A-Za-z_]/ {
+    if (renamed[actlib "::" $1])
+      actver = renamed[actlib "::" $1];
+    else if (!versions[actlib "::" $1] && $1 != "GLIBC_PRIVATE") {
+***************
+*** 65,71 ****
+  # This matches lines with names to be added to the current version in the
+  # current library.  This is the only place where we print something to
+  # the intermediate file.
+! /^ *[a-z_]/ {
+    sortver=actver
+    # Ensure GLIBC_ versions come always first
+    sub(/^GLIBC_/," GLIBC_",sortver)
+--- 65,71 ----
+  # This matches lines with names to be added to the current version in the
+  # current library.  This is the only place where we print something to
+  # the intermediate file.
+! /^   / {
+    sortver=actver
+    # Ensure GLIBC_ versions come always first
+    sub(/^GLIBC_/," GLIBC_",sortver)
+
+ +

3.9.8.9. -include, -isystem, -I- ץ

+ +

-isystem, -I- ץϻȤƤޤ

+

-include ץ϶üˤ˻ȤƤޤ +include/libc-symbols.h Ȥإåե뤬 -include ץˤä 7000 include ΤǤ +Υץϡϥ #include ǽ񤯤٤Ԥ makefile ˲ФƻȤΤΤǤ +ԴˤΤǡ褷ɤȤǤϤޤ

+ +

3.9.8.10. Undocumented ʻޥ

+ +

glibc ǤϤʤGCC Ǥ +GCC 2 ǤϤĤνפʻޥ undocumented Ǥξ֤ GCC 3 Dzäޤ +¾ GCC 3.3 ϻޥüΤȼäơundocumented ʤΤƤޤޤ

+ +

3.9.8.11. ¾

+ +

debug/tst-chk1.c ˤϴ̯ʬꡢΤ褦˽ʤ GCC ʳΥץץåǤϰտ̤˽ޤ

+ +
+$ diff -cw tst-chk1.c*
+*** tst-chk1.c  2007-01-11 00:31:45.000000000 +0900
+--- tst-chk1.c.orig     2005-08-23 00:12:34.000000000 +0900
+***************
+*** 113,119 ****
+  static int
+  do_test (void)
+  {
+-   int   arg;
+    struct sigaction sa;
+    sa.sa_handler = handler;
+    sa.sa_flags = 0;
+--- 113,118 ----
+***************
+*** 135,146 ****
+    struct A { char buf1[9]; char buf2[1]; } a;
+    struct wA { wchar_t buf1[9]; wchar_t buf2[1]; } wa;
+
+  #ifdef __USE_FORTIFY_LEVEL
+!   arg = (int) __USE_FORTIFY_LEVEL;
+  #else
+!   arg = 0;
+  #endif
+!   printf ("Test checking routines at fortify level %d\n", arg);
+
+    /* These ops can be done without runtime checking of object size.  */
+    memcpy (buf, "abcdefghij", 10);
+--- 134,146 ----
+    struct A { char buf1[9]; char buf2[1]; } a;
+    struct wA { wchar_t buf1[9]; wchar_t buf2[1]; } wa;
+
++   printf ("Test checking routines at fortify level %d\n",
+  #ifdef __USE_FORTIFY_LEVEL
+!         (int) __USE_FORTIFY_LEVEL
+  #else
+!         0
+  #endif
+!         );
+
+    /* These ops can be done without runtime checking of object size.  */
+    memcpy (buf, "abcdefghij", 10);
+
+ +

θϲůʤ˸ޤ¤ϤǤ printf() ޥȤƤΤǤ +Τᡢ#ifdef Υǥ쥯ƥֹԤ餷Τ̾ϥޥΰȤư̤ˤʤޤ +ޥƤӽФǤʤХǥ쥯ƥֹԤȤʤΤ˸줿η̤ϡʤǤ undefined Ǥ +ǥ쥯ƥ֤νȥޥŸƱ translation phase ǹԤΤǡǥ쥯ƥ֤˽ΤϡGCC ξͤǤ +⤽⡢#ifdef __USE_FORTIFY_LEVEL νˤޥνɬפʤΤǡιԤ˽Ƥ printf() ޥŸȤΤϡŪʽǤ +C ץץȤΤϡƬ sequentially ˽Ƥ椯٤ΤʤΤǤ

+ +

glibc configure Ȥˤ⡢GCC ü help message Ȥʬޤ +Help "-z relro" Ȥץ󤬽ФƤ뤫ɤ򥵡ΤǤ +ץץå mcpp ȤäƤȡϴԤ̤ˤϤʤޤ +Ǥ glibc ΥѥȥƥȤ˹Ԥޤ

+ +

ʤGCC 3.2 ޤǤ gcc ư̵Ѥ -A ץ󤬤ȥǥեȤղäޤGCC 3.3 Ϥʤʤޤ

+ +

3.9.8.12. ޤ GCC ¸

+ +

glibc 2.4 ǯ glibc 2.1.3 ٤ȡ䤬ĤƼ夲 portability ϤۤȤɲƤ餺դ portability 礤ƤƤ뤳Ȥ狼ޤ

+

줿ΤϡԤޤʸƥ뤬ʤʤäȡ-isystem, -I- ץ󤬻ȤʤʤäȡGCC ¦ -A ץ󤬻ȤʤʤäȤ餤Ǥ

+

#include_nextGCC2 ͤβѰޥǤѰ 0 ĤΥޥƤӽФִꥹȤ 'defined' Τޥ*.S ե롢-include ץ󡢤ޤޥƤӽФΥޤ +Portable ʥ˽ľȤñˤϤǤʤStandard C ȣУбʤΤ⡢äʤȤǤ

+

Ϥ٤ GCC local ʻͤؤΰ¸ˤΤǤ +GCC undocumented ư˰¸Ƥʬ¿ޤ +絬ϤʥեȥǤʬȯȡ¿Υե뤬߹礦ᡢˤʤꡢǯǤƱѾƤ椯Ȥˤʤ꤬Ǥ +ơ⤽˹碌ƽ񤫤뤳Ȥˤʤޤ +Ѱޥ GCC2 ͤΤΤǡC99 λͤΤΤϤ GCC3 ͤΤΤȤƤʤȤϡδطüŪɽƤޤ +ޤäΥ unportable ʬľƤ⡢¾Υ˸Ť˸¿ʤʤޤ

+

դ GCC Τۤͤѹ礭ʱƶ⤿餹ΤǡñˤϤǤʤʤäƤޤޤ +ɤλפڤäɬפȻפޤ

+ +

3.9.9. Linux stddef.h, limits.h, #include_next

+

Linux Ǥ GCC ƥॳѥǤ˥饤֥꤬ glibc Ǥ뤿ᡢƥإåˤ GCC ꤷƤʤʬȤɤˤޤ +줬 compiler-independent-build mcpp Τ褦¾νϤȤξ㳲ˤʤޤ +Ǥ stddef.h ΤĤɸإåե뤬 GCC version-specific include directory ˤä /usr/include ¸ߤʤȤΤϤʷ٤Ǥꡢmcpp ˤȤäƤкɬפǤ +ΥǤϤƤޤ

+

Linux Ǥ GCC ΥС󤴤Ȥ㤨 /usr/lib/gcc-lib/SYSTEM/VERSION/include Ȥä include directory ƥɲäޤˤ stddef.h, limits.h ϴ̯ʤΤǤ +CygWIN ǤƱǤ +Mac OS X ˤ⾯꤬ޤ

+ +

3.9.9.1. /usr/include ɸإåʤ

+

ޤC ɸإåեΤ float.h, iso646.h, stdarg.h, stdbool.h, stddef.h ΣĤ Linux ǤϤ GCC Υǥ쥯ȥˤꡢ/usr/include ˤ /usr/local/include ˤ¸ߤޤLinux ΥƥإåϽϤ GCC Ǥ GCC ͭ include directory ȤGCC Ǥʤ /usr/include Ȥ褦˰񤫤Ƥ褦Ǥstddef.h ʤΤǤϺޤ

+

ȤäơGCC ʳνϤ GCC ͭ include directory Ȥ褦ˤȡ٤ϤΥǥ쥯ȥˤ limits.h GCC ͭγĥͤǤ #include_next ˤ֤ĤޤȤ #include_next Ƥ⡢٤ limits.h ν꤬ޤȤ GCC V.3.3 ʹߤǤ limits.h ٤¾塢ϤǻȤ˽ʤȤ褦ˤʤäᡢ¾νϤǤ limits.h ȤʤȤ̤ˤʤäƤޤޤ

+

ޤGCC Ȥ⡢ limits.h #include_next ǤԲIJư򤷤ޤ

+

Ȥ䤳ΤǤʤǯΤ֤ƤʤΤǡˤޤȤƤޤ

+

ʤ compiler-independent-build mcpp ˤʤΤǤ +GCC-specific-build Ǥȯޤ

+ +

3.9.9.2. #include_next δ̯ʽ

+

GCC Ǥ include directory ̾ϼΤ褦ˤʤޤ

+
+/usr/local/include
+/usr/lib/gcc-lib/SYSTEM/VERSION/include
+/usr/include
+
+

Υǥ쥯ȥ꤬夫鲼إޤ +Σܤ GCC ͭ include directory Ǥ SYSTEM 㤨 i386-vine-linux, i386-redhat-linuxVERSION 3.3.2, 3.4.3 ȤʤޤGCC ̤ΥС /usr/local ɲå󥹥ȡ뤷Ϥ /usr/lib/gcc-lib /usr/local/lib/gcc ȤʤޤC++ Ǥ /usr/local/include ˤˤĤΥǥ쥯ȥ꤬äޤGCC V.3.*, 4.* ǤϼΤΤǤ

+
+/usr/include/c++/VERSION
+/usr/include/c++/VERSION/SYSTEM
+/usr/include/c++/VERSION/backward
+
+

Υǥ쥯ȥ̾ GCC ͭΤΤ˸ޤC++ ɸǥ쥯ȥϤۤ¸ߤʤΤǡ¾νϤ /usr/include/c++/VERSION ȤޤGCC V.2.95 Ǥ C++ include directory ϼΤΤǤ

+
+/usr/include/g++-3
+
+

-I ץĶѿǻꤵ줿ǥ쥯ȥ꤬ΥꥹȤɲäޤ

+

ʲǤ狼䤹뤿 GCC V.3.3 ʹߤǤ C limits.h ä¤ޤǤ LONG_MAX ˤȤޤlimits.h /usr/include GCC ѥǥ쥯ȥΣĽˤޤ

+
+#include <limits.h>
+
+

ιԤ GCC /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h include ޤȡΥեƬ

+
+#ifndef _GCC_LIMITS_H_
+#define _GCC_LIMITS_H_
+#ifndef _LIBC_LIMITS_H_
+#include "syslimits.h"
+#endif
+
+

ȤʤäƤΤǡ/usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h include ޤΥեϼΤ褦ûΤǤ

+
+#define _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#undef _GCC_NEXT_LIMITS_H
+
+

ơ limits.h Ƥ include ޤ#include_next ʤΤ /usr/lib/gcc-lib/SYSTEM/VERSION/include 򥹥åפ /usr/include ϤǤGCC cpp.info ˤϼΤ褦˽񤤤Ƥޤ

+
This directive works like `#include' except in searching for the specified file: it starts searching the list of header file directories _after_ the directory in which the current file was found.
+

Ȥ GCC Ϥʤ /usr/include/limits.h ǤϤʤ /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h ⤦ include Ƥޤޤ
_GCC_LIMITS_H_ Ƥ֤ʤΤ

+
+#ifndef _GCC_LIMITS_H_
+
+

ʲΥ֥åϥåפ졢Υ֥åɾޤ

+
+#else
+#ifdef _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#endif
+#endif
+
+

ޤƤ /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h ˤäΤȤޤäƱ #include_next <limits.h> ȤԤǤޤ /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h ʤʬȤ include ΤȻפȡ٤ GCC /usr/include/limits.h include ΤǤGCC #include_next ưϰˤ狼ޤ

+

/usr/include/limits.h Ǥ <features.h> include ޤޤιԤǻϤޤ֥åޤ

+
+#if !defined __GNUC__ || __GNUC__ < 2
+
+

Υ֥åǤ <bits/wordsize.h> include ǡwordsize 32 ӥåȤǤ뤫 64 ӥåȤǤ뤫˱Ƶʤ׵ᤵƤƼ褦ˤʤäƤޤȤ 32 ӥåȤǤ LONG_MAX ϼΤ褦ޤ

+
+#define LONG_MAX     2147483647L
+
+

GCC ǤϤΥ֥ååפޤơΥե뤬ꡢinclude /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h ޤΥե⤳ǣܤ include 򽪤ꡢ/usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h ꡢΥե⤳ǽä /usr/lib/gcc-lib/SYSTEM/VERSION/limits.h κǽ include ޤΥեϾ嵭ʬΤȤ˳ƼޤLONG_MAX ˤĤƤϼΤ褦ˤʤäƤޤ

+
+#undef LONG_MAX
+#define LONG_MAX __LONG_MAX__
+
+

ǤΥե⽪ޤ

+
+#include <limits.h>
+
+

νϤǤ٤ƽǤ +ɡLONG_MAX __LONG_MAX__ ƥޥʤΤǤ__LONG_MAX__ ȤϤäʤΤǤ礦¤ GCC V.3.3 ʹߤǤ __LONG_MAX__ 䤽¾¿ΥޥƤΤǤ32 ӥåȥƥǤ __LONG_MAX__ 2147483647L ȻƤޤLONG_MAX ʳεʤ׵ᤵƤƼޥˤĤƤ⡢줿ޥ򸵤ƤΤǡƱۤǤʤ顢Τ䤳إåե #include_next νϤäΤʤΤǤ礦

+

#include_next ư GCC V.2.95.3, V.3.2, V.3.4, V.4.0, V.4.1 Ǥ V.3.3 ƱǤʤ

+
+#include_next <limits.h>
+
+

/usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h include 졢ˤƱ

+
+#include_next <limits.h>
+
+

/usr/include/limits.h include ޤ

+
+#include <limits.h>
+
+

Ǥ /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h include 뤳ȤˤʤޤΥե򣲲 include Ƥ̤Ѥޤ󤬡ǤꡢͤưäƤꡢưӤƤޤ󡣤ΥեμΥ֥åϥʬǤ

+
+#else
+#ifdef _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#endif
+
+ +

3.9.9.3. GCC ǤʤɸإåȤʤ

+

Ǥϼ GCC ʳνϤ Linux ΥƥإåȤȤɤʤǤ礦 GCC ͭ include directory Ȥʤȡstddef.h Ĥޤ󡣤ʤ GCC include directory ȤȤɤʤǤ礦 stddef.h ϸĤޤ٤ limits.h ʤޤ

+
+#include <limits.h>
+
+

ιԤǥץץå /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h include ޤ /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h include ޤơ

+
+#include_next <limits.h>
+
+

ǥ顼ˤʤޤ

+

Ǥϡץץå #include_next ɤʤǤ礦 #include_next ̤˼ƤС /usr/include/limits.h include ޤơ嵭

+
+#if !defined __GNUC__ || __GNUC__ < 2
+
+

ʲΥ֥å졢LONG_MAX Τ褦졢¾ΥޥŬڤޤ

+
+#define LONG_MAX     2147483647L
+
+

ơinclude /usr/lib/gcc-lib/SYSTEM/VERSION/syslimits.h ꡢΥե뤬ä /usr/lib/gcc-lib/SYSTEM/VERSION/limits.h ޤȡ

+
+#undef LONG_MAX
+#define LONG_MAX __LONG_MAX__
+
+

Ǥä줿ޥϤ٤Ƥ˻ˤ __LONG_MAX__ Ȥ̤̾ˤʤäƤޤΤǤ

+

GCC V.3.2 ޤǤʤ顢Ǥޤ

+
+#define __LONG_MAX__ 2147483647L
+
+

ȤԤäΤǡ +˻ˤƤ⤦١ľޤϥʽǤ̤ΤǻȤȤǤޤV.3.3 ʹߤΥإåեǤϤ٤Ƥϫ˽ޤ

+ +

3.9.9.4. ̤к

+

ʾޤȤȡϼˤޤ*1, *2, *3, *4

+
    +
  1. Linux Υƥإå GCC Ѥˤʤˤ /usr/include float.h, iso646.h, stdarg.h, stdbool.h, stddef.h ɬפǤ뤬줬ʤ
    +
  2. C++ ɸ include directory GCC ΥС¸ˤʤˤϡ/usr/include/c++/VERSION ǤϤʤ /usr/include/c++ ȤäƤ餤ΤǤ롣/usr/include/c++/VERSION/* GCC ͭΤΤ˸¤٤Ǥ롣 +FreeBSD, Linux, Mac OS X ǤϤ٤ C++ standard library GCC libstdc++ ʤΤǡн褷ˤȤǤ뤬
    +
  3. GCC #include_next ưϻͤȰۤʤäƤꡢİʤ
    +
  4. GCC <limits.h> ޥ¾弫ǻΤǤϡ䤳إåեν򤹤̣ʤ/usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h Ǥ٤Ƥ #undef ΤǤϤʤǤ롣ʤȤ Linux CygWIN Ǥ limits.h 򣲤ĤʬɬפϤʤϤǤ롣Υǥ쥯ȥΥإåե GCC 򥤥󥹥ȡ뤹˼ưΤʤΤǡ٤ξĹϤ򤨤ʤǤˤƤ⥷ƥࡦإåȤƥ󥹥ȡ뤹ˤϱ롣
    +
+

κˤΤϥƥإåιβʣǤơ#include_next Ȥĥǥ쥯ƥ֤ؤ򤫤ƤޤΥǥ쥯ƥ֤ӤϤ¤ƤꡢGCC glibc Υѥȥ󥹥ȡǻȤƤΤΡ󥹥ȡ뤵줿ƥإåǤ limits.h ˤǤ limits.h ν𤷤ƤΤǤϡ¸ͳޤ

+

ơLinux CygWIN mcpp compiler-independent ǤǤϰʾн褹뤿ᡢȤꤢϼΤ褦ꤹɬפޤCompiler-independent ǤǤϺ򤱤뤿ᡢ#include_next ϼޤGCC ͭ include directory Ȥ߹ߤޤ

+
    +
  1. /usr/include/stddef.h /usr/lib/gcc-lib/SYSTEM/VERSION/include/stddef.h ؤΥ󥯤ȤƺƤʣ GCC ΥС󤬥󥹥ȡ뤵Ƥ⤽Τɤ줫˥󥯤ƤСLinux, CygWIN compiler-independent ǻȤʬˤʤȻפ롣 GCC ˤ⡢GCC Ǥ mcpp ˤⰭƶͿʤstdarg.h ƱͤǤ롣ޥ GCC Ȥ߹ߴؿŸ뤬ñ˥ץץʤ餽Ǥ⤹ࡣ
    +
  2. iso646.h, stdbool.h ϤñʤΤǤꡢϤ䥷ƥ˰¸ΤǤϤʤΤǡGCC Τɤ줫ΥСΤΤ /usr/include ˥ԡ뤫ưФࡣlimits.h GCC ʳνϤǤ /usr/include ΤΤǽʬǤ롣
    +
  3. float.h DBL_MAX_EXP __DBL_MAX_EXP__ ȤäƤʤΤǡ¾ΥץץåˤΩʤɬפʤ GCC ʤɤ򻲹ͤ˽񤯡*5
    +
  4. GCC ͭ C include directory ϴĶѿǤꤷʤ
    +
  5. Ķѿ CPLUS_INCLUDE /usr/include/c++/VERSION:/usr/include/c++/VERSION/SYSTEM:/usr/include/c++/VERSION/backward C++ include directory Ȥꤹ롣
    +
+

GCC Ǥ mcpp Ǥ GCC ͭ include directory Ȥ߹ߡ#include_next ̤˼ߴΤλޥΤǡ̤ɬפޤ

+

:

+

*1 3.9.9 εܤ Linux / GCC 2.95.3, 3.2, 3.3.2, 3.4.3, 4.0.2, 4.1.1, 4.3.0 CygWIN / GCC 2.95.3, 3.4.4 dzǧΤǤ롣 +CygWIN / GCC 2.95.3 Ǥ #include_next ưϻ̤Ǥä3.4.4 Ǥ Linux Ʊˤʤä +ޤCygWIN C++ include directory 2.95.3 Ǥ /usr/include/g++-3 Ǥä3.4.4 Ǥ /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++ ʲȤʤäƤ롣

+

*2 FreeBSD 6.2, 6.3 / GCC 3.4.6 Ǥ /usr/include C Τ٤ƤɸإåꡢGCC ͭ include directory C Ǥ¸ߤʤ +#include_next ⥷ƥإåˤ̵ +C++ include directory /usr/include/c++/3.4, /usr/include/c++/3.4/backward GCC ΥС¸ȤʤäƤ롣
+FreeBSD Ǥ̥С GCC 򥤥󥹥ȡ뤹 GCC-version-specific include directory 롣 +ˤǤإåե¿ϥʤΤǤ롣 +/usr/include Υإåե뤬񤭴뤳ȤϤʤ

+

*3 Mac OS X Leopard / Apple-GCC 4.0.1 Ǥ GCC version-specific include directory Linux ƱͤǤ롣 +#include_next limits.h ǻȤƤ롣 +limits.h ι Linux ƱͤǤ뤬 syslimits.h #include_next ϺƤ롣 +ޤfloat.h, iso646.h, stdarg.h, stdbool.h, stddef.h Ϥ٤ /usr/include ˤΤǡmcpp ¦ǤкϤޤɬפʤ +float.h, stdarg.h GCC Ѥ Metrowerks (for powerpc) ѤʤΤǡmcpp ǻȤʤ stdarg.h GCC version-specific ʥǥ쥯ȥΥإå include 褦˥ǥ쥯ƥ֤­float.h Ǥϥޥ­ƤʤФʤʤ +float.h x86 powerpc ȤǤĤͤۤʤ뤳Ȥա

+

*4 MinGW / GCC 3.4.* Ǥ include directories Ȥ̤ͥ¾ΥƥȰۤʤ뤬GCC #include_next ưƱǤꡢޤɸ include directory Ǥ /mingw/include ˤĤɸإåʤ version-specific-directory ˤ CygWIN ƱǤ롣

+

*5 GCC 򻲾Ȥ i386 Ǥ float.h 񤱤СΤ褦ˤʤ롣

+
+/* float.h  */
+
+#ifndef _FLOAT_H___
+#define _FLOAT_H___
+
+#define FLT_ROUNDS      1
+#define FLT_RADIX       2
+
+#define FLT_MANT_DIG    24
+#define DBL_MANT_DIG    53
+#define LDBL_MANT_DIG   64
+
+#define FLT_DIG         6
+#define DBL_DIG         15
+#define LDBL_DIG        18
+
+#define FLT_MIN_EXP     (-125)
+#define DBL_MIN_EXP     (-1021)
+#define LDBL_MIN_EXP    (-16381)
+
+#define FLT_MIN_10_EXP  (-37)
+#define DBL_MIN_10_EXP  (-307)
+#define LDBL_MIN_10_EXP (-4931)
+
+#define FLT_MAX_EXP     128
+#define DBL_MAX_EXP     1024
+#define LDBL_MAX_EXP    16384
+
+#define FLT_MAX_10_EXP  38
+#define DBL_MAX_10_EXP  308
+#define LDBL_MAX_10_EXP 4932
+
+#define FLT_MAX         3.40282347e+38F
+#define DBL_MAX         1.7976931348623157e+308
+#define LDBL_MAX        1.18973149535723176502e+4932L
+
+#define FLT_EPSILON     1.19209290e-7F
+#define DBL_EPSILON     2.2204460492503131e-16
+#define LDBL_EPSILON    1.08420217248550443401e-19L
+
+#define FLT_MIN         1.17549435e-38F
+#define DBL_MIN         2.2250738585072014e-308
+#define LDBL_MIN        3.36210314311209350626e-4932L
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define FLT_EVAL_METHOD 2
+#define DECIMAL_DIG     21
+#endif /* C99 */
+
+#endif /* _FLOAT_H___ */
+
+
+ +

3.9.10. Mac OS X / Apple-GCC ȥƥإå

+

mcpp V.2.7 Mac OS X / GCC ⥵ݡȤ褦ˤʤޤΥƥʲˤޤȤƤޤ +ɮԤϤޤΥƥǤϤۤȤ mcpp firefox 餤ѥ뤷ƤʤΤǡΤʤʬ¿ޤ +Ȥ Objective C / Objective C++ ˤĤƤϤޤäΤޤ

+

OS GCC ۤȤͣΥѥȤʤäƤ뤿ᡢΥƥإåˤ GCC-local ʻͤؤΰ¸˸ޤ +饤֥꤬ glibc ǤϤʤ٤ Linux ۤɤǤϤޤ +FreeBSD ¿褦Ǥ +⤦ǤϤȻפޤ

+

ΥƥΤ⤦Ĥħ Apple ˤäƤʤä줿 GCC ƥॳѥȤʤäƤ뤳ȤǤ +Mac OS X Υƥإå Apple ΥǤϡ̤ GCC-local ʻͤष Apple-GCC-local ʻͤؤΰ¸ΤۤΩޤ +Ǥ⡢Intel-Mac PowerPC-Mac 򣱤ĤΥޥǥݡȤ뤿γĥͤħŪǤ

+

ʤǼ夲Τ Mac OS X Leopard / Apple-GCC 4.0.1 Ǥ

+ +

3.9.10.1. #include_next, #warning

+

GCC-local ʻͤǤ #include_next ¿Ϥޤ󤬡/usr/include/ float.h, stdarg.h, varargs.h /Developer/SDKs/MacOSX10.*.sdk/usr/include/ Ʊ̾ΥեǻȤƤޤ +Ϥ⥳ѥ餬 GCC Ǥ뤫 Metrowerks Ǥ뤫ˤä include إåե򿶤ʬ뤿ΤΤǤ +GCC stdarg.h Ʊ̾Υإåե뤬 #include_next 褦ˤʤäƤޤ
+ޤLinux ƱͤˡGCC version-specific include directory Ǥ limits.h #include_next ޤsyslimits.h ΤΤϺơƤޤ

+

Υǥ쥯ƥ֤Ϲܤ˻ȤƤޤfloat.h, stdarg.h GCC Metrowerks ꤷƤʤΤǤ +FreeBSD ƱȤޤ portable ˽񤯤ȤϤǤϤǤ*1
/usr/include Υإåե GCC Ѥ #include_next 񤯤Τϥʥ󥻥󥹤Ǥ +GCC ǤϤΥǥ쥯ȥΤۤ version-specific include directory ̤ͥ㤤Ǥ +äơ #include_next Ϸ褷Ƽ¹Ԥ뤳ȤϤޤ

+

#warning /usr/include/ objc/, wx-2.8/wx/ Υǥ쥯ȥ䤽б /Developer/SDKs/MacOSX*.sdk/usr/include/ Υǥ쥯ȥ˻ޤ +¿ obsolete ʤ deprecated ʻȤե˴ؤ륦˥󥰤Τ褦Ǥ
+/usr/include/c++/VERSION/backward/ Ӥб /Developer/SDKs/MacOSX*.sdk/ backward_warning.h ϤϤ deprecated ʥإåȤʤȤ #warning ¹Ԥ뤿ΥեǤΥǥ쥯ȥΥإåեϤ٤ƤΥե include 褦ˤʤäƤޤ + Linux FreeBSD ƱǤ

+

:

+

*1 mcpp compiler-independent-build ǤΥإåȤˡˤĤƤϡ3.9.9.4 Ӥ 3 򻲾ȡ

+ +

3.9.10.2. 'defined' Ÿޥ

+

/usr/include/sys/cdefs.h Ӥб /Developer/SDKs/MacOSX*.sdk/ Ʊ̾ΥإåեˤϡΤ褦ʥޥޤ

+
+#define __DARWIN_NO_LONG_LONG   (defined(__STRICT_ANSI__) \
+                && (__STDC_VERSION__-0 < 199901L) \
+                && !defined(__GNUG__))
+
+

ơΥޥ stdlib.h ǼΤ褦˻ȤƤޤ

+
+#if __DARWIN_NO_LONG_LONG
+
+

ΥޥϼΤ褦٤Ǥ*1

+
+#if     defined(__STRICT_ANSI__) \
+                && (__STDC_VERSION__-0 < 199901L) \
+                && !defined(__GNUG__)
+#define __DARWIN_NO_LONG_LONG   1
+#endif
+
+

:

+

*1 ͳ 3.9.4.6, 3.9.8.6 򻲾ȡ

+ +

3.9.10.3. #endif ԤΥȡ

+

/System/Library/Frameworks/Kerberos.framework/Headers gssapi.h, krb5.h, profile.h ˤϼΤ褦ʴ #endif Ԥޤ

+
+#endif \* __KERBEROS5__ */
+
+

\* __KERBEROS5__ */ ȤΤϥȤΤ褦Ǥʤ虜虜ʽȯΤ˶줷ߤޤ +¾Υƥ GCC ǤϤˤϥ˥󥰤ФޤApple-GCC ǤϤȤ -pedantic ΥץդƤ⥦˥󥰤ϽФޤ +Apple-GCC ǤϼνˤĤƤ⥦˥󥰤Фޤ +C90 δФ򤤤ޤˤҤäƤޤ

+
+#endif __KERBEROS5__
+
+ +

3.9.10.4. ޥν

+

Τ褦üʥޥλȤϡglibc Υ Linux ΥƥإåʤɤǤФиΤǤ firefox 3.0b3pre Υ򥳥ѥ뤷¤Ǥϡ include Mac OS X Υƥإåˤϸޤ

+
    +
  • GCC ͤβѰޥ
    +C99 λͤβѰޥϥƥإåǤϵ˻ȤƤޤGCC ͤΤΤϸޤ +
  • ޥƤӽФΥ +
  • Function-like ޥִ̾ object-like ޥ +
+ +

3.9.10.5. Apple-GCC ȼ

+

Apple-GCC ˤϰ̤ GCC ȰۤʤȼλͤĤޤ

+
    +
  • Intel-Mac PowerPC-Mac ΥХʥ򣱤ĤΥޥ뤿Τ

    +

    Mac OS X ˤ x86 Ѥ ppc ѤΥѥ餬󥹥ȡ뤵ޤϥͥƥ֥ѥ顢¾ϥѥˡ +-arch ȤȼΥץ󤬤ꡢ-arch i386 -arch ppc Ȥդʣ CPU ꤹȡgcc βƤӽФơ줾 CPU ѤΥХʥ꤬졢ˤ򣱤Ĥ˥Хɥ뤷 universal binary ȤΤޤ +ޤ-mmacosx-version-min= Ȥץ⤢ꡢ -isysroot --sysroot ץȹ碌ƻȤȤǡХʥθߴϰϤ Mac OS X Τ٤εСˤޤǹ뤳ȤǤ褦ˤʤäƤޤ +γĥͤ Mac OS X ѤΥХʥꡦѥåʤɤǤ

    +

    ץץ˴ؤƤϡCPU ˤäưλޥ㤦ȤդɬפǤ

    +
  • "framework" ǥ쥯ȥ

    +

    Mac OS ˤ NeXTstep framework ǥ쥯ȥȤΤޤ +framework ϥإåե롦饤֥ꡦɥȡ¾ζͭ꥽򣱤ĤˤޤȤ᤿ΤǤ +ˤإåե include ˤϼΤ褦ʥǥ쥯ƥ֤Ȥޤ

    +
    +#include <Kerberos/Kerberos.h>
    +
    +

    ϼΥǥ쥯ƥ֤Ʊ򤷤Ƥޤ

    +
    +#include <sys/stat.h>
    +
    +

    Υǥ쥯ƥ֤ include ΤϤɤ줫 include directoryʤξ /usr/includeˤ sys/stat.h ȤեǤ<Kerberos/Kerberos.h> ΤۤϤǤϤޤ +Kerberos ϥǥ쥯ȥ̾Ǥ⤢ޤ + /System/Library/Frameworks Ȥ framework directory Kerberos.framework/Headers/Kerberos.h ȤեʤΤǤ +ơKerberos.framework/Headers Kerberos.framework/Versions/Current/Headers ؤ symbolic-link ȤʤäƤޤ +ϺǤñǡframework header Τ꤫ϤäȤäʣʤΤ¿ޤ

    +

    ä줬ʣʥƥͤΤǤ礦 +ץץå path-list 򤢤줳ȤΩƤʤ饷ƥإå򥵡ʤФʤʤΤǡʤ٤ޤ +إåˤäƤϤ餵¿¾Υإå include Τ⤢ޤ

    +
  • "header map" ե

    +

    Mac OS X IDE Ǥ Xcode.app Ǥ "header map file" ȤΤȤޤ + include إåե򤢤餫᥵ơ path-list *.hmap Ȥ̾Υե˵ϿƤץץǤϤ include directory Τ褦˻ȤȤΤǤ +header map file Τ Xcode.app ΥġǤ include directory Τ褦ɤΤ Apple-GCC γĥͤǤ

    +

    framework directory ΥإåեΥ٤礭Τǡڸ뤿˹ͤ줿ΤǤ礦 +header map file ȼͤΥХʥեǤꡢƩ礤Ƥޤ +ष framework directory ΤۤñˤƤ餤ΤǤ

    +
  • #endif ԤΥȡ

    +

    Ǹ褦ˡ#endif Ԥ˲Ȥɤʥץ󤬻ꤵ褦ȡApple-GCC ϥ˥󥰤Фޤ +δФǤ

    +
  • ASCII ʸ

    +

    GCC ǤϤޤ󤬡framework header Ǥϥ ISO-8859-* (?) copyright mark (0xA9) ASCII ʸФлȤƤޤ +ϥȤϸmultibyte character ȤĶǤǤǤ +ʸ encoding ˴ؤռ򾯤ϻäƤ餤ΤǤ +μʸ Linux /usr/include Ǥ˸ޤMac OS framework header ˤä¿褦Ǥ

    +
+ +

3.9.11. firefox 3.0b3pre Υץץ

+

firefox developing version Ǥ 3.0b3pre (2008/01) ʤ 3.0-beta3-prerelease ΥLinux/x86 + GCC 4.1.2 Max OS X + GCC 4.0.1 ǥץץå mcpp V.2.7 ֤ƥѥ뤷Ƥߤޤ +mcpp -K ץΥƥȤͤơ٤ -Kv ץդƼ¹ԤνϤ cc1 (cc1plus) ϤƤޤ +η̡ѥ뤬˽λfirefox ΥХʥ꤬ΤΤ뤳ȤǤޤ*1

+

firefox ΥΥץץ portability ΤȤƤϤʤ⤤ΤǤ +glibc Υˤ褯褦 GCC-local ʻͤؤΰ¸Ϥޤ긫ޤ +Linux Mac OS X GCCWindows Visual C ʥåȤȤƤΤȤϤޤ

+

Ȥϸץץ portability GCC Visual C ̤Ф櫓Ǥ⤢ޤ +ʲ˶Ū˸ƤƤߤޤ +ʤGCC ˤĤƤϽʣ򤱤뤿ᡢǤޤ +3.9.4, 3.9.8 򻲾ȤƤ +firefox 椹뤿 glibc 򤷤Фа礤˽ФƤޤglibc ˤĤƤΥȤ⤳Υˤޤ*2

+

:

+

*1 mozilla.org CVS ݥȥ꤫ checkout ΤǤ롣 +򥳥ѥ뤷Ĥư mcpp -K ץƥȤ뤿Ǥä +Υץ Taras Glek ƤˤΤǤ뤬 mozilla project C/C++ refactoring ˼ȤǤΤǡmcpp κԤ firefox Υ򤳤ΥץΥƥȤ˻ȤäΤǤ롣 +-K (-Kv) ץˤĤƤ 2.4 򻲾ȡ

+

*2 firefox Υǥ󥰡ɥ饤ϼΤȤˤ롣 +ƤϤʤŤΤǤ롣
+portable-cpp

+ +

3.9.11.1. GCC-local ʻͤϤۤȤɻȤʤ

+

glibc ΥǻȤƤ뼡Τ褦 GCC-local ʻͤϡfirefox Υˤϸޤ +Linux ǥѥ뤹ϡƥإå GCC2 ͤβѰޥʤɤФƤޤ̤Ǥ

+ +
    +
  • GCC ͤβѰޥ
    +ɤ C99 ͤβѰޥޤȤƤޤ +
+

ΤΤ glibc ǤǶΥСǤϻȤʤʤäƤΤǤfirefox ǤȤƤޤ

+
    +
  • Ԥޤʸƥ +
  • #warning +
  • -isystem, -I- ץ +
+ +

3.9.11.2. #include_next

+

#include_next ϣĤΥǥ쥯ȥ˸¤äƤ󤢤ޤ + configure ˤä config/system_wrappers Ȥǥ쥯ȥǤ +ΤϤ٤Ʊ򤷤 900 ܤΥإåեǤ +㤨 stdio.h ϼΤ褦ˤʤäƤޤ

+
+#pragma GCC system_header
+#pragma GCC visibility push(default)
+#include_next <stdio.h>
+#pragma GCC visibility pop
+
+

GCC 4.* #pragma GCC visibility * εǽѤ뤿ΤΤǤ +ǡconfig/gcc_hidden.h Ȥե뤬ޤ +ϼΤ褦ʤΤǡ줬¿ translation unit -include ץˤäƬɤ߹ޤޤ

+
+#pragma GCC visibility push(hidden)
+
+

system_wrappers ǥ쥯ȥϺͥ include ǥ쥯ȥǤʤФʤʤΤǡ˺ǽ -I ץǻꤷʤФʤʤȤΤդ٤Ǥ #include_next λȤϴǤꡢäϤʤȻפޤ

+

nsprpub ǥ쥯ȥǤ -include gcc_hidden.h -fvisibility=hidden ץ󤬻ꤵ礬ФФޤξ system_wrappers ΥإåեϻȤޤ +Υǥ쥯ȥϤޤƤʤ褦Ǥ

+ +

3.9.11.3. C99 ꤻ C99 λͤȤ

+

ΩĤΤ C99 ꤻ C99 λͤȤΤǤ +GCC Ǥϥե̾ *.c ȥǥեȤǤ gnu89 ȤͤȤޤ C90 ˤĤ C99 ͤ GCC ȼλͤäŪʤΤǤ +firefox ΥˤϡѤƼΤ褦 C99 λͤۤΤ˻ȤäƤΤޤ

+
    +
  • ޥƤӽФΥ

    +

    Linux Υƥإå̤ȤСfirefox ȤΥǤΥϤ鷺ǤޤΣܤΥեˤޤ +ºݤ˻ȤƤΤ NS_ENSURE_TRUE ȤĤΥޥǤ

    +

    layout/style/nsHTMLStyleSheet.cpp, layout/generic/nsObjectFrame.cpp, intl/uconv/src/nsGREResProperties.cpp

    +

    ޤgfx/cairo/cairo/src μΥեˤ⤢ޤ +ºݤˤ slim_hidden_ulp2 ȤĤΥޥǤ

    +

    cairoint.h, cairo-font-face.c, cairo-font-options.c, cairo-ft-font.c, cairo-ft-private.h, cairo-image-surface.c, cairo-matrix.c, cairo-matrix.c, cairo-pattern.c, cairo-scaled-font.c, cairo-surface.c, cairo-xlib-surface.c, cairo.c

    +

    Υ Linux ǤϻȤޤMac OS X ǤϻȤޤ +ˤƤ⡢äʶ路ΤǤϤޤ

    +
  • C90 εĶ translation limits

    +

    identifier Ĺ#include Υͥȡޥοʤɤ C90 κݾڸ٤Ķ礬ФФޤ
    +31 ХȤĶĹ identifier ϤȤ gfx/cairo/cairo/src/ ¿ޤ +#include ΥͥȤ 8 ٥Ķꡢޥ 1024 ĤĶ⤢ޤLinux Mac OS X ǤϥƥإåǤθݤФеΤǤ򤨤ʤǤ礦

    +
  • C ΥǤˤ⤫餺 // ȤȤäƤ

    +

    Ȥɤޤ +Ͼ嵭 ɥ饤 ػߤƤΤǤޤϤۤȤϤʤǤ礦

    +
+

λͤ Visual C 2005, 2008 ǤȤޤ +GCC Ǥ -std=c99 Ȥץ󤬤ΤǡȤȤǤ +Visual C ˤϵʤΥСꤹ륪ץϤʤΤǡۤΤ˻Ȥޤ +äơۤΤ C99 λͤȤȤˤĤƤϡפʽϤθǤ firefox Υդ뤳ȤϤǤޤ*1

+

ȤǡۤΤ C99 ͤȤäƤʤ顢ѰޥϤʤȤƤޤ +Visual C Ǥ 2005 ǻȤ褦ˤʤäΤǤ2003 ޤǤϻȤʤäΤǡ򤱤ƤΤǤ礦

+

:

+

*1 C++ Ǥ GCC "gnu++98" ȤͤǥեȤǤ롣 + C++98 + GCC extensions ȤƤ뤬ºݤˤ C99 λͤߤƤ롣 +Visual C C Ǥ C90C++ Ǥ C++98 ˽ȤƤ뤬ºݤˤϤɤ C99 ͤȼλͤߤƤꡢVisual C 2005, 2008 ǤϤȤˤǤ롣 +ʤGCC Visual C ʤȼͤߤƤΤǤ롣 +Ȥ櫓 Visual C ϵʤΥСǤʤΤȤǤ롣

+ +

3.9.11.4. Function-like ޥִ̾ object-like ޥ

+

Function-like ޥִ̾ object-like ޥ¾Υץˤ褯ΤǤ +firefox Υˤ⤢ޤ¿Ϥޤ󤬡ΤȤ˸ޤ

+content/base/src/nsTextFragment.h, +modules/libimg/png/mozpngconf.h, +modules/libjar/zipstub.h, +modules/libpr0n/src/imgLoader.h, +nsprpub/pr/include/obsolete/protypes.h, +nsprpub/pr/include/private/primpl.h, +nsprpub/pr/include/prtypes.h, +parser/expat/lib/xmlparse.c, +security/nss/lib/jar/jarver.c +security/nss/lib/util/secport.h, +xpcom/glue/nsISupportsImpl.h + +

ޤfirefox make 뤳Ȥ¿ΥإåեؤΥ󥯤ȯĶѤΥǥ쥯ȥ˺졢 firefox γȯĶ򥤥󥹥ȡ뤹 /usr/include/firefox-VERSION/ äƤޤˤϾ嵭ΥեؤΥܥå󥯤Ĥޤ +configure ˤä mozilla-config.h ˤ⤳μΥޥޤ

+

ϤϤ function-like ޥȤƽ񤤤ۤ狼䤹ʤޤ +ºݡfirefox Υˤ⤽ν¿ޤ +ͤˤäƽۤʤΤǤ礦ˤĤƤϥǥ󥰡ɥ饤᤿ۤɤǤ

+ +

3.9.11.5. 'defined' Ÿޥ

+

glibc ǻ˸ִꥹ 'defined' ȤȡνФƤޥfirefox ˤ⣱Ĥޤ

+

modules/oji/src/nsJVMConfigManagerUnix.cpp +ȤեǤϼΤ褦ʥޥơ +

+#define NS_COMPILER_GNUC3 defined(__GXX_ABI_VERSION) && \
+                          (__GXX_ABI_VERSION >= 102) /* G++ V3 ABI */
+
+ʬȤǼΤ褦˻ȤäƤޤ

+
+#if (NS_COMPILER_GNUC3)
+
+

Υޥѻߤơ#if ԤϼΤ褦˲٤Ǥ

+
+#if defined(__GXX_ABI_VERSION) && (__GXX_ABI_VERSION >= 102) /* G++ V3 ABI */
+
+

Υե뤬 GCC Ǥѥ뤵ʤΤȤϸϤθͤѤΤɤȤǤϤޤ*1

+

:

+

*1 mcpp V.2.7 GCC-specific-build Ǥ #if ԤΥޥ˽ФƤ 'defined' GCC Ʊͤ˽褦ˤ +˥󥰤ФΤǡۤɤ

+ +

3.9.11.6. #endif Τ token sequences

+

jpeg ǥ쥯ȥμΥեˤϡ #endif Ԥ˥Ȥȥޡʤ˽񤫤ƤԤޤ +ǶΥץǡȤȯΤǤ

+
+jmorecfg.h, jconfig.h, jdapimin.c, jdcolor.c, jdmaster.c
+
+

ν 1990 ǯ椴ޤǤ UNIX ϤΥեȥ˸ޤޤǤϤܾۤüƤΤǤ + glibc ǤȤƤޤ + GCC ⤳ˤϥ˥󥰤Фޤ +ΥϤʤȤˤϤޤʤΤ褦Ǥ +Apple-GCC ϥ˥󥰤Фޤ󤬡 Mac OS ǥǥåȤ줿ΤʤΤǤ礦

+ +

3.9.11.7. ץץפ륢֥饽

+

֥饽 *.s (*.asm) Ȥ̾ˤʤäƤơˤϥޥȤƤΤ⤢ޤץץåƤӽФ뤳Ȥϸ§ȤƤޤ

+

Mac OS X / ppc ǤϣĤ㳰ꡢxpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_rhapsody.s ǥץץåƤӽФޤ +ΥեˤϤäԤ #if ֥åĤ뤫ǤȤʤäƤɬפʤȻפ֥åǤ

+ +

3.9.11.8. -include ץ

+

firefox ΥѥǤ configure mozilla-config.h Ȥإåե뤬ޤȾΥΥѥǤΥإå -include ץǻꤷƤޤ +config/gcc_hidden.h ˤĤƤƱͤǤ +ʤ򥽡Ƭ #include ʤΤǤ礦

+ +

3.9.11.9. ޥκ

+

ޥۤäƺ뤳Ȥˤޤ

+
    +
  • firefox make Ǥ¿ξ -DZLIB_INTERNAL Ȥץղä gcc (c++) ƤӽФޤ +ʤZLIB_INTERNAL 1 ޤ +ȤΥޥ modules/zlib/src/ βܤΥ

    +
    +#define ZLIB_INTERNAL
    +
    +

    0 ĤΥȡƤΤǤ +ơΤ褦˻ȤƤޤ

    +
    +#    ifdef ZLIB_INTERNAL
    +
    +

    ξϼ³Ϥޤ󤬡ޥäƤΤϴޤ +֤ Makefile ΥץΤۤ;פʤΤǤ礦

    +
  • xpcom/build/nsXPCOMPrivate.h Ǥ MAXPATHLEN Ȥޥ /usr/include/sys/param.h ȰۤʤȤ꤬ޤ +ϴϢإåեˤä /usr/include/sys/param.h include ꤷʤäꤷƤʤǤ +إåեɬפǤ

    +
  • Mac OS X Ǥ netwerk/dns/src/nsIDNKitInterface.h /usr/include/assert.h 줿 assert ޥޤ + #undef assert ˽񤯤٤Ǥ

    +
  • Mac OS X Ǥ modules/libreg/src/VerReg.c VR_FILE_SEP Ȥޥδ̯ޤ

    +
    +#if defined(XP_MAC) || defined(XP_MACOSX)
    +#define VR_FILE_SEP ':'
    +#endif
    +#ifdef XP_UNIX
    +#define VR_FILE_SEP '/'
    +#endif
    +
    +

    Mac OS X Ǥ configure XP_MACOSX XP_UNIX 뤫Ǥ +տŪΤ褦˸ޤʶ路ΤǡXP_UNIX ͥ褹뤳Ȥ狼褦˼Τ褦˽񤤤ۤɤǤ礦

    +
    +#ifdef XP_UNIX
    +#define VR_FILE_SEP '/'
    +#elif defined(XP_MAC) || defined(XP_MACOSX)
    +#define VR_FILE_SEP ':'
    +#endif
    +
    +
+ +

3.9.11.10. Ĺʥ

+

ΥեˤϿɴ԰ʾˤĹʥȤޤ

+

extensions/universalchardet/src/base/Big5Freq.tab, extensions/universalchardet/src/base/EUCKRFreq.tab,intl/unicharutil/src/ignorables_abjadpoints.x-ccmap, layout/generic/punct_marks.ccmap

+

Ȥ intl/uconv/ucv*/ Ȥǥ쥯ȥˤĹʥȤĥե뤬¿ޤ +ˤϣĤΥȤ 8000 ԤĶΤޤǤޤ +Ϥ٤ *.uf, *.ut Ȥ̾ˤʤäƤޤ + unicode ȥγƼ encoding Ȥδ֤ mapping table Τ褦ǡġˤäƼưΤǤ +C/C++ Υˤϸޤ󤬡C++ Υ include ޤ +ȤϤΥɥȤ¾ΥġΤɽΤ褦Ǥ

+

ĹʥɥȤɽ򥳥ȤȤƥ˴ޤΤϡʤΤǤ礦 +ĥ꡼˴ޤȤƤ⡢Ȥ̤ΥեʬΥ٤Ǥ礦

+

ʾΥեϤ Linux ǤϻȤޤMac OS X ǤϻȤޤ +¾ Mac OS X Ǥ framework ǥ쥯ȥΥƥإåФлȤޤˤϥȤȾƤ̯ʥե뤬ޤ

+ +

3.9.11.11. ԥɤκ

+

firefox Υβԥɤ [LF] Ǥ[CR][LF] ιԤäƤե뤬ܤޤ +Ϥû֥åǡ˥ѥåˡʬ [CR][LF] ˤʤäƤޤäΤΤ褦Ǥ + Windows ԽϡԥѴġǥå٤Ǥ礦

+
+ +

3.10. Visual C++ Υƥإå

+

Visual C++ 2003, 2005, 2008 ǤĤΥץץΥץץ mcpp ȤäƤߤޤΥƥΥƥإåˤϡץץθߴȤʤ褦ʤΤϤʤ褦ǤΤ褦ʤΤϤޤ¾νϤǤ⤷ФиΤǡäȤʤΤǤϤޤ

+
    +
  1. C99 λͤϤۤȤɼƤʤä顢C // Ȥ¿ѤƤ
    +
  2. Function-like ޥ̾Ÿ object-like ޥ롣
    +
  3. Visual C++ 2003 Ǥ limits.h ˴ְäޥĤä +Visual C++ 2005 Ǥľ줿 cpp-test.html#5.1.3.1 2 򻲾ȡˡ +
    +
+

Linux Υƥإå glibc ˤ GCC local ʻͤФлȤƤޤVisual C++ Υƥإåˤ Visual C++ local ʽϤޤ긫ޤ

+ +

3.10.1. Ȥޥ

+

Visual C++ ˤϣĤȤǤʤޥޤVisual C++ 2003 Vc7/PlatformSDK/Include/wtypes.h ˤϼΤ褦ʥޥޤ*1

+
+#define _VARIANT_BOOL   /##/
+
+

ơVc7/PlatformSDK/Include/ oaidl.h, propidl.h ǼΤ褦˻ȤƤޤ

+
+_VARIANT_BOOL bool;
+
+

ϤäǤ礦
+ _VARIANT_BOOL // Ÿơη̡ιԤȥȤ뤳ȤԤƤΤΤ褦Ǥơºݤ Visual C cl.exe ǤϤʤäƤޤޤ

+

// ϥȡ (preprocessing-token) ǤϤޤ󡣤ޤޥŸϡȡʬ򤵤쥳ȤĤΥڡѴ줿ȤΥեǽΤǤäơޥˤäƥȤ뤳ȤϷ褷ƤǤʤΤǤΥޥ // Ÿ줿Ȥǡ// ͭ preprocessing-token ǤϤʤΤǷ̤ undefined ȤʤϤΤΤǤ

+

mcpp ǤΥإåեȤˤϡΥޥ򥳥ȥȤꤢ _VARIANT_BOOL ΤȤ򼡤Τ褦˽񤭴ʤФʤޤ

+
+#if !__STDC__ && (_MSC_VER <= 1000)
+    _VARIANT_BOOL bool;
+#endif
+
+

Visual C 5.0 ʹߤΥС󤷤ȤʤΤǤСιԤϼΤ褦˥ȥȤƤޤޤ

+
+// _VARIANT_BOOL bool;
+
+

ΥޥǤʾʤΤϡ򥳥ȤȤƽƤޤ Visual C / cl.exe ΥץץμǤˤϡΥץץåμΤ褦ʿ꤬Ϫ褷Ƥޤ

+
    +
  1. ʤȤ⤳Ǥ Token-base ǤϤʤʸ١ΥץץƤ롣
    +
  2. ޥŸ̤ȤȤưƤꡢtranslation phases 𤷤Ƥ롣
    +
+

餯cl.exe Υץץå˸Ťɤ餫ȸʸ١ΥץץåΥ򸵤ˤƤΤǤ礦ʬŪ˼äʤС󥢥åפ򷫤֤ƤƤ뤳Ȥ¬ޤ

+

˸Ťץ๽¤äƤȿ¬ץץå¿ޤ3.9 Ǹ GCC 2 / cpp ⤽ΣĤǤץץåǤϡʬŪ˼äвäۤɥץ๽¤㥴㤷ƤΤǡɤƤ⤢ȤʼƬǤȤʤޤŤΤƤơᤫľʤ¤ꡢäꤷץץåˤϤʤʤȻפޤ

+

GCC 3 / cpp ǤϥľơGCC 2 Ȥ̤ΥץץåȤʤޤmcpp ⡢DECUS cpp ȤŤץץåΥȯʤ顢ȯƤޤʤŪ˽ľ줿ΤǤ

+

:

+

*1 Visual C++ 2005 express edition ˤ Platform SDK ϴޤޤƤʤ"Platform SDK for Windows 2003" ɤƻȤȤǤ롣 PlatformSDK/Include ǥ쥯ȥ wtypes.h, oaidl.h, propidl.h Ǥ⡢ΥޥƱǤ롣
+Visual C++ 2008 express edition Microsoft SDKs/Windows/v6.0A/Include ǥ쥯ȥƱ̾ΥإåեǤƱͤǤ롣

+ +

3.10.2. Identifier '$'

+

⤦ĤϡVisual C++ 2008 ΥƥإåǤϥޥ̾ '$' ȤȤǤ + Visual C++ 2005 ޤǤˤʤϤޤǤ㳰ŪʤΤˤȤɤޤäƤޤ +2008 ǤϤ˽ФƤƤޤ

+

ǤΩĤΤ Microsoft Visual Studio 9.0/VC/include/sal.h ȤإåǤ + Visual C++ SAL (standard source code annotation language) ʤΤ򥽡˵Ҥ뤿ΥޥƤΤǤ +Ǥ '$' ޤ̤̾˻ȤƤޤ +Υإå¿ɸإåե뤫 Microsoft Visual Studio 9.0/VC/include/crtdefs.h Ȥإå𤷤 #include ޤ +äơ¿ΥΥѥǤϤΥޥΤʤ˻Ȥ뤳Ȥˤʤޤ

+

-Za ץդ clʥѥˤưȡSAL ̵ˤʤꡢsal.h '$' ޤ̾Ϥ٤ƾä褦ˤϤʤäƤޤʤ̾ɬפʤΤ˶줷ߤޤ +GCC Ǥ identifier '$' ȤΤǥեȤˤʤäƤޤºݤˤϻȤƤϤۤȤɸݤʤʤäƤޤ

+

Microsoft SDKs/Windows/v6.0A/Include ǥ쥯ȥˤ⤳μ̾ĥإåե뤬ޤ +specstrings*.h ȤإåǤ +Υإå WinDef.h 𤷤 Windows.h include ޤ -Za ץꤷƤ '$' ä褦ˤϽ񤫤Ƥ餺ñ˥顼ˤʤǤ +äơWindows.h include 륽 -Za ץǥѥ뤹뤳ȤϤǤޤ

+
+ +

4. λ

+

øΥץץͤ줳˽񤯤櫓ˤϤ椭ޤcpp-test.html Standard C ΥץץˤĤƾܤ񤤤ƤΤǡɤǤmcpp γƼ⡼ɤưͤˤĤƤϡ 2.1 򸫤ƤǤ Standard C ǽȤƤΤޤơץץμդΤĤλͤҤ٤ޤˤޤʽͤˤĤƤϡ5 ǥå˽񤤤Ƥޤ

+
+ +

4.1. λ status

+

mcpp λ˿ƥץ֤ͤ internal.H ȤإåƤޤ顼ʤä 0 ֤顼ä errno != 0 ʤ errno errno == 0 ʤ 1 ֤ޤ

+
+ +

4.2. Include directory Υѥ

+

#include directive include եϼνǥޤ

+
    +
  1. #include ǥ쥯ƥ֤ΰ "file-name" ޤ <file-name> ηǤʤ硢줬ޥǤФŸ롣η̤ "file-name", <file-name> Τɤ餫ηǤʤФʤʤǤʤϥ顼Ȥʤ롣
    +
    +
  2. "file-name" ηǤ <file-name> ηǤ file-name եѥꥹȤǤСΤޤޥץ󤹤롣ץǤʤХ顼Ȥ롣
    +
    +
  3. եѥꥹȤǤʤ "file-name" ηǤСΥǥ쥯ȥʤХѥˤȲᤷƥ롣-I1 ץǤ 3.1-I2 Ǥ 3.2-I3 ǤϤʤνǡˤȤʤ롣ǥեȤǤϡUNIX Ϥν, GCC, Visual C ѤǤ 3.2¾Ǥϸ§Ȥ 3.1 Ǥ롣Borland C ǤǤ 3.1+3.2Ǥ롣 +Compiler-independent ǤǤ 3.2 Ǥ롣
    +
    +3.1. ȥǥ쥯ȥʤ mcpp ưΡˡ#include ͥȤƤƤ⡢˥ȥǥ쥯ȥȤ롣
    +3.2. եʥ󥯥롼ɸˤΤǥ쥯ȥꡣ#include ͥȤƤ硢إåե뤬̥ǥ쥯ȥˤȡΤӤ˴बƤ椯

    +GCC ǤǤϤ -iqoute ץǻꤵ줿ǥ쥯ȥ꤬롣 +Visual C ǤǤϥեοơʥ󥯥롼ɸ˥եΥǥ쥯ȥ缡Τܤäơ롣 +ȯǤʤС<file-name> ηƱͤΥ򤹤롣
    +
    +
  4. եѥꥹȤǤʤ <file-name> ηǤСΥǥ쥯ȥ򥵡롣Υǥ쥯ȥꤽΤΤХѥǻꤵƤϡȥǥ쥯ȥ꤫ХѥȲ᤹롣ˤ٤ƥƤե򥪡ץǤʤХ顼Ȥ롣
    +
    +4.1. mcpp ư -I <directory> ץǻꤵ줿ǥ쥯ȥꡣʣлꤵ줿ˡʺ˥롣
    +4.2. GCC ǤǤ -isystem ץǻꤵ줿ǥ쥯ȥꡣʣлꤵ줿ˡʺ˥롣
    +4.3. Ķѿǻꤵ줿ǥ쥯ȥꡣδĶѿ̾ϡnoconfig.H (configed.H) ENV_C_INCLUDE_DIR Ƥ롣C++ Ǥ ENV_CPLUS_INCLUDE_DIR ƤФδĶѿ˻Ȥ롣GCC ǤǤ C_INCLUDE_PATHC++ Ǥ CPLUS_INCLUDE_PATH ˡ¾Ǥ INCLUDEC++ Ǥ CPLUS_INCLUDE ˤǥեȤδĶѿ̾ȤƤ롣ĶѿʣΥǥ쥯ȥ꤬ separator ǶڤäƻꤵƤСǽΤΤ˥separator Windows Ǥ ;¾Ǥ :ˡ
    +4.4. noconfig.H (configed.H) Υޥ CPLUS_INCLUDE_DIR? 줿 implementation-specific ʥǥ쥯ȥꡣ
    +4.5. system.c set_sys_dirs() ǻꤵ줿 site-specific ʥǥ쥯ȥ(UNIX ϤǤ /usr/local/include)
    +4.6. noconfig.H (configed.H) Υޥ C_INCLUDE_DIR? 줿 implementation-specific ʥǥ쥯ȥꡣ
    +4.7. system-specific ʥǥ쥯ȥUNIX ϤǤ /usr/includeˡ
    +
+

-I- (GCC Ǥ -nostdincVisual C Ǥ -X) ץꤹȡ嵭 4.4 ʹߤΥϹԤޤ

+

ѥδ򥫥ȥǥ쥯ȥȤΤϡANSI C Rationale ǤϰѰΡְտ (intent)פǤȤƤޤǥ쥯ȥ꤬ưȤʤͤΤʤΤǡȻפޤUNIX ϤνǤϡʤȤ #include "header" ηǤ include ΥեΤǥ쥯ȥȤ뽬褦Ǥmcpp compiler-independent ǤǤ˽äƥեΥǥ쥯ȥȤޤ

+
+ +

4.3. Header name ιˡ

+

Header-name Ȥ pp-token ιˡȡºݤ include file Υե̾Фˡϡ̤Ǥ

+
    +
  1. ʸƥηǽ񤫤ƤС򤽤Τޤ header-name Ȥ롣˥ޥǽ񤫤ƤơŸ̤ʸƥˤʤä⡢ƱͤǤ롣ʸƥη header-name Ǥϡñˤξü " ȤäΤե̾Ȥ롣
    +
  2. <filename> ηǽ񤫤ƤС򤽤Τޤ header-name Ȥ롣˥ޥǽ񤫤ƤơŸ̤ <filename> ηˤʤä⡢ƱͤǤ롣ޥ space ʣ spaces 򣱸Ĥ space ˰̤¸롣ñξü <, > ȤäΤե̾Ȥ롣
    +
  3. ɤξǤ⡢Windows Ǥ path-delimiter Ȥ \ / Ȥ뤬\ / Ѵ롣
    +
+
+ +

4.4. #if ɾ

+

#if ɾϥۥȽϡmcpp 򥳥ѥ뤷ϡˤȥåȽϡmcpp ȤϡˤĺˤäƷޤޤηۤʤϡۤη #if ηˤʤޤCompiler-independent Ǥ mcpp ǤϥåȽϤ¸ߤʤΤǡۥȽϤˤäƷޤޤ

+

pre-Standard ⡼ɤǤ #if (signed) long ɾޤ

+

long long ʤϤ Standard ⡼ɤǤϡlong unsigned long ǹԤޤ

+

long long ĽϤ Standard ⡼ɤǤϡ#if long long / unsigned long long ɾޤC90, C++98 Ǥ long / unsigned long ɾΤǤmcpp Ǥ C90, C++98 Ǥ long long / unsigned long long ɾlong / unsigned long ϰϤĶϥ˥󥰤Фޤ*1

+

Visual C, Borland C 5.5 Ǥ long long Ϥޤ󤬡Ʊ __int64 ȤΤǡ#if __int64 / unsigned __int64 ɾޤʤVisual C++ 2002 ޤǤ Borland C 5.5 Ǥ LL, ULL Ȥ suffix ȤʤΤǡ suffix #if ԤǤϻȤ뤬ϤʸǻȤäƤϤʤˡ

+

ޤ-+ ץ C++ Υץץ򤹤ϡ#if true, false Ȥ pp-token ͤϤ줾 1L, 0L ɾޤ

+

Standard ⡼ɤǤζŪɾΤ򡢰ʲޤlong long ʤϤξϡʲ 4.4, 4.5 εܤϤ٤ơlong long / unsigned long long 򤽤줾 long / unsigned long ɤؤƤPre-Standard ⡼ɤǤϤ٤ long ɤؤƤ

+
    +
  1. ġȡʸޤˤϡͥȡ U դƤ unsigned long long ɾpre-Standard ⡼ɤǤ U ǧΤʤˡ
    +
  2. ǤʤСlong long ϰϤˤޤ long long ɾ롣
    +
  3. Ǥʤ unsigned long long ϰϤ unsigned long long ɾ롣
    +
  4. ۤͤ out of range Υ顼Ȥ롣
    +
  5. 黻黻Τɤ餫ʤǤʤǡǤʤĤǹԤ
    +
+

ɤˤƤȡϾͤȤޤ
+pre-Standard ⡼ɤǤȡɾ long ϰϤǹԤۤͤ out of range Ȥޤα黻⤹٤ long ǹԤޤ

+

ޤۥȤ unsigned long long ΤۤåȤϰϤϡĶͤ out of range Ȥʤޤ
+ƱΤα黻̤ϰϳȤʤäϡlong long Ǥ out of range Υ顼Ȥʤꡢunsigned long long Ǥϥ˥󥰤Фޤ黻ַ̤ˤĤƤƱͤǤ

+

αӥåȥեȤޤ껻ˤϰܿʤΤǡ˥󥰤ФޤʤĤκ黻ˤäĤͤʤͤѴ줿⡢˥󥰤Фޤºݤα黻ϡۥȽϤΥѥΤλͤ˽ޤ

+

C90, C++98 ǤϥץץǤ #if ɾϤ٤ long / unsigned long ǡC99 ǤϤνϤκǡ˹ԤȤˤʤäƤޤmcpp Ǥ C90, C++98 Ǥ long long / unsigned long long ɾlong / unsigned long ϰϤĶϥ˥󥰤ФޤɤˤƤ⡢ѥΤǤ if (expression) ɾλ礶äѤʤΤǤĥطˤϡѥΤȤϰ㤦̤ˤʤ뤳ȤˤƤޤ

+

ޤStandard C ΥץץǤ keyword ȤΤ¸ߤʤΤǡsizeof 䥭㥹ȤϻȤޤ󡣤ѿưϻȤޤStandard ⡼ɤǤ #if defined 黻ҤȤ#elif ǥ쥯ƥ֤ȤޤȤϥѥΤǤ if (expression) ƱͤˡƱ黻Ҥ̤ͥȥ롼ԥ󥰵§ʤ絬§ˤ˽äɾԤޤ黻Ҥ¿ǤϡξդƱˤ뤿λѴԤ졢 unsigned long long ξ¾ long long ǤäƤ unsigned long long Ѵޤ

+

:

+

*1 mcpp V.2.5 ޤǤ C90, C++98 ǤŪˤ long long / unsigned long long ɾʤ顢long / unsigned long ϰϤĶϥ顼ȤƤV.2.6 GCC Visual C ȤθߴΤ˥顼򥦥˥󥰤˳ʲ

+
+ +

4.5. #if Ǥʸɾ

+

#if ȡȤƤϼ̻ҡʥޥޥˡοͥȡʸޤΤʸɾλϤۤȤ implementation-defined Ǥꡢportability Ϥޤꤢޤ#if 'const' compiler-proper Ǥ if ('const') Ȥδ֤Ǥ̤㤦礬ޤStandard C Ǥ⡢줬ƱǤ뤳ȤݾڤƤʤˡ

+

POSTSTD ⡼ɤǤϤΤۤȤɰ̣Τʤ #if ʸɾϹԤޤʥ顼Ȥʤˡ

+

ʸɾ¾ȡƱͤˡlong long, unsigned long long ϰϤǾͤɾޤpre-Standard ⡼ɤǤ long ϰϤǤ

+

Single character Ǥʤ multi-byte character wide character ϡencoding UTF-8 ξϣХȡʳǤϤ٤ƣХȤηɾޤUTF-8 ϥѤʤΤǡХȤηɾޤEUC-JP ΣХ encoding ˤбƤޤʣХʸϣХȡܣХȤΣʸȤǧ롣η̡ͤɾ뤳ȤˤʤˡХȤ encoding Ǥʤ顢wchar_t ХȤηǤϤ⤢ޤmcpp wchar_t ˤϴΤޤ󡣰ʲǤϣХȤ multi-byte character encoding ξˤĤޤ

+

'' Ȥ褦 multi-byte character constant ((Хܤ << 8) + Хܤ) ɾޤ8 <limits.h> CHAR_BIT ͡ˡ

+

'ab', '\x12\x3', '\x123\x45' Ȥ褦 multi-character character constant Ǥϡ'a', 'b', '\x12', '\x3', '\x123', '\x45' 򤽤줾죱ХȤȤ [0, 0xFF] ϰϤɾη̤̥ХȤ缡 8 ĺեȤʤ­Ƥ椭ޤ0xFF <limits.h> UCHAR_MAX ͡ˡĤ escape sequence ͤ 0xFF Ķϡout of range Υ顼ȤʤޤäơʸåȤ ASCII ǤСΣĤΥȡͤϤ줾 0x6162, 0x1203, 顼Ȥʤޤ

+

L'' '' ƱͤȤʤޤL'ab', L'\x12\x3', L'\x123\x45' multi-character wide character constant ˤĤƤϡL'a', L'b', L'\x12', L'\x3', L'\x123', L'\x45' 򤽤줾죱Ĥ wide character Ȥ [0, 0xFFFF] ϰϤɾη̤̤ wide character 缡 16 ĺեȤʤ­Ƥ椭ޤĤ escape sequence ͤХʤκͤĶϡout of range 顼ȤʤޤäơʸåȤ ASCII ǤСΣĤΥȡͤϤ줾 0x00610062, 0x00120003, 0x01230045 Ȥʤޤ

+

Multi-character character constant, multi-character wide character constant ͤ unsigned long long ϰϤĶ out of range 顼Ȥʤޤ

+

__STDC_VERSION__ ޤ __cplusplus ͤ 199901L ʾξϡ\uxxxx, \Uxxxxxxxx η UCN (universal-character-name) 򣱣 escape sequence Ȥɾޤʤɾ򤷤Ƥⲿΰ̣ʤɾ뤷ʤΤǤˡ

+

åȽϤΥѥΤ char wchar_t 椢ξϡ#if ǤʸɾȥѥΤǤ if (expression) ˤʸɾȤϡ̤äƤ뤳Ȥޤϰϥ顼ȤʤϰϤ㤦ǽޤޤmulti-character character constant, multi-byte character constant ɾϡץץåǤʤѥΤǤϤˤäƤޤޤǤCHAR_BIT ǤäƤ⡢'ab' 'a' * 256 + 'b' ɾ뤫Ȥ 'a' + 'b' * 256 ɾ뤫⡢Standard C ǤϷƤޤ

+

̤ˡ#if ǤʸϤʤ¤ϻȤ٤ǤϤޤ󡣤ʤʤȤΤϡˤϻפդޤ󤬡

+
+ +

4.6. #if sizeof (type)

+

Standard C Ǥϥץץϼ¹ԻĶ䥳ѥΤλͤΩʸ̤ΥץץȤƵ꤬Τˤ졢η̡#if ԤǤ sizeof ȥ㥹ȤϻȤʤȤˤʤޤpre-Standard ⡼ɤǤ #if Ԥ sizeof (type) Ȥ褦ˤʤäƤޤ DECUS cpp Ѿơ long long, long double νɲäμäΤǤʤ˥㥹ȤΤѻʤΤǡäƤʤ뵤ʤˡ

+

eval.c S_CHAR S_* ȤޥǤϳƷΥƤޤϤǻȤϡ⤷ۥȤȥåȤȤǤηΰۤʤʤ顢ͤȤƥåȽϤΤηΥͤľܽɬפޤ

+

mcpp #if sizeof ˤϼȴޤchar, short, int, long, long long Ƭդ signed, unsigned ñ̵뤷ޤޤsizeof (void *) ϥݡȤޤ󡣤ȾüǤεǽΤ system.H Υե饰䤷ѻˤʤΤǤɤ㥹Ȥ⥵ݡȤʤΤ sizeof Ϻ褦ȤפޤäǤˤäΤʤΤǡ㴳μäǻĤƤޤ

+
+ +

4.7. White-space sequence ΰ

+

mcpp translation phase 3 tokenization ˺ݤơtoken separator ȤƤʣ white spaces sequence ϡԥɰʳϸ§Ȥ one space ˰̤ޤ +STD ⡼ɤ -k ޤ -K ץ󤬻ꤵ줿Ȥϡ̤ˤΤޤ޽Ϥޤ +ޤ white space sequence Ϻޤ +

Ƭ white spaces POSTSTD ⡼ɤǤϺ¾Υ⡼ɤǤ̰ǡΤޤ޽Ϥޤ +ԤϿʹ֤ϤɤΤĤ˹碌Ƥޤ*1

+

ϥץץʳäǤθ phase 4 äơޥŸȥץץǥ쥯ƥֹԤνԤޤޥŸθǤϤʣ spaces Ǥ뤳Ȥޤspace Ĥȡѥη̤ϲѤޤ

+

Standard C Ǥ translation phase 3 Ǥ one space ˰̤뤫ɤ implementation-defined ȤƤޤ̾ϥ桼ϤޤäˤɬפϤޤPortability ˤʤΤϡpreprocessing directive Ԥ <vertical-tab> ޤ <form-feed> Ǥξ Standard C Ǥ undefined Ǥmcpp ǤϤ space Ѵޤ

+

:

+

*1 V.2.6.3 ޤǤϸ§Ȥ one space ˰̤ƤV.2.6.4 ѹ

+
+ +

4.8. mcpp ¹ԥץΥǥեȤλ

+

noconfig ǥ쥯ȥˤƽѤκʬե makefile ȤäƥǥեȤǥѥ뤷 mcpp ¹ԥץλͤ򤳤˽񤤤ƤޤConfigure ץȤƥѥ뤷 configure η̤ˤäưäƤޤOS ȽϤΥСƱǤСʤȤ⥤󥯥롼ɥǥ쥯ȥʳƱ̤ˤʤϤǤ

+

Compiler-independent Ǥ mcpp λͤˤϽϤˤϤۤȤɤޤ󤬡OS CPU ˤ㤬ޤ

+

mcpp ˤ compiler-independent-build compiler-specific-build ȤꡢΤɤǤ⤤Ĥư⡼ɤޤˤĤƤ 2.1 򸫤ƤǤ STD ⡼ɤ濴ޤ

+

κʬե makefile ϼνѤΤΤǤ

+
+ + + + + + + + + + + + +
FreeBSD 6.3 GCC V.3.4
Vine Linux 4.2 / x86 GCC V.2.95, V.3.2, V.3.3, V.3.4, V.4.1
Debian GNU/Linux 4.0 / x86 GCC V.4.1
Ubuntu Linux 8.04 / x86_64 GCC V.4.2
Fedora Linux 9 / x86 GCC V.4.3
Mac OS X Leopard / x86 GCC V.4.0
CygWIN 1.3.10 (GCC V.2.95), 1.5.18 (GCC 3.4)
MinGW & MSYS GCC 3.4
WIN32 LCC-Win32 2003-08, 2006-03
WIN32 Visual C++ 2003, 2005, 2008
WIN32 Borland C++ V.5.5
+
+

ΤۤλäƤʤνϤˤĤƤ⡢桼 contribute 줿ʬե뤬ϿƤޤ

+
+ + + +
WIN32 Visual C++ V.6.0, 2002
WIN32 Borland C++ V.5.9 (C++Builder 2007)
+
+

⤽νϼȤǥѥ뤵ޤ +

+

noconfig.H, system.H ޥΤΤΤϤɤνѤ⤹٤ƱˤƤޤ

+

DIGRAPHS_INIT == FALSE ǥѥ뤵ƤΤǡdigraph -2 (-digraphs) ץͭȤʤޤ
+TRIGRAPHS_INIT == FALSE ȤƤΤǡtrigraph -3 (-trigraphs) ץͭȤʤޤ
+OK_UCN TRUE ˤƤΤǡC99, C++ UCN (universal character name) Ȥޤ
+OK_MBIDENT FALSE ȤƤΤǡ̻ multi-byte-character ϻȤޤ
+STDC 1 ȤƤΤǡ__STDC__ νͤ 1 Ȥʤޤ

+

Ƽ translation limits ϼΤ褦ˤƤޤ

+
+ + + + + + + + + + +
NMACPARSʥޥΰκ 255
NEXP #if κͥȥ٥ 256
BLK_NEST#if section κͥȥ٥ 256
RESCAN_LIMITʥޥκͥȥ٥64
IDMAX identifier ͭĹ 1024
INCLUDE_NEST#include κͥȥ٥ 256
NBUFFʥκĹ*1 65536
NWORKʽϤκĹ 65536
NMACWORKʥޥŸХåեΥ262144
+
+

GCC ǡVisual C ǤǤϽϤκĹ NWORK ǤϤʤ NMACWORK Ǥ

+

Υޥ OS ˤäưۤʤäˤƤޤbuild type ˤϴطޤ

+

MBCHAR ʥǥեȤ multi-byte character encoding

+
+ + + +
FreeBSD, Linux, Mac OS X EUC_JP
Win32, CygWIN, MinGW SJIS
+
+

ΥޥϽϤˤäưۤʤäˤƤޤ +

+

STDC_VERSION __STDC_VERSION__ ν͡

+
+ + + +
Compiler-independent, GCC 2199409L
¾ 0L
+
+

HAVE_DIGRAPHS digraphs 򤽤Τޤ޽Ϥ뤫

+
+ + + +
Compiler-independent, GCC, Visual CTRUE
¾ FALSE
+
+

EXPAND_PRAGMA C99 #pragma ԤΰޥŸ뤫

+
+ + + +
Visual C, Borland CTRUE
¾ FALSE
+
+

GCC 2.7-2.95 Ǥ __STDC_VERSION__ 199409L ȤʤäƤޤ3.*, 4.* Ǥ __STDC_VERSION__ ϥǥեȤǤϻ줺¹Իץ˱褦ˤʤޤmcpp GCC ѤϤбΤǤ

+

STDC_VERSION 0L ΤΤǤϡ__STDC_VERSION__ ϥǥեȤǤ 0L pre-define ޤ-V199409L ץ __STDC__ 1 __STDC_VERSION__ 199409Lޥ '_' ǻϤޤΤȤ̩ C95 ⡼ɤȤʤޤޤ-V199901L ץ C99 ⡼ɤȤʤޤ

+

C99 ⡼ɤǤ __STDC_HOSTED__ 1 pre-define ޤ__STDC_ISO_10646__, __STDC_IEC_559__, __STDC_IEC_559_COMPLEX__ mcpp Ȥ pre-define ޤ󡣽ϤΥƥإåǤޤºݤˤϡglibc 2 / x86 ΥƥǤϥƥإåˤä __STDC_IEC_559__, __STDC_IEC_559_COMPLEX__ 1 졢¾νϤǤϤɤޤ

+

HAVE_DIGRAPHS FALSE ΤΤǤϡdigraph Ƥʤϡˡdigraph mcpp ̾ token ѴƤϤޤ

+

EXPAND_PRAGMA TRUE ǤäƤ⡢STDC, MCPP, GCC Τɤ줫ǻϤޤ #pragma ԤϥޥŸޤ

+

Include ǥ쥯ȥϼΤ褦ꤷƤޤ
+ޤUNIX Ǹ system-specific ʤΤ site-specific ʤΤϼ̤Ǥ compiler-independent ǤǤƱǤ

+
+ + +
FreeBSD, Linux, Mac OS X, CygWIN/usr/include, /usr/local/include
+
+

Mac OS X ǤϤΤۤframework ǥ쥯ȥ꤬ /System/Library/Frameworks, /Library/Frameworks ꤵޤ

+

MinGW Ǥ /mingw/include ɸ include ǥ쥯ȥˤʤޤ

+

Ϥ䤽ΥСˤäưۤʤ implementation-specific ʤΤˤĤƤ *.dif ե򸫤ƤCompiler-independent ǤǤϤޤWindows νϤǤϤäꤻĶѿ򻲾ȤޤĶѿ INCLUDE, CPLUS_INCLUDE ǤCompiler-independent ǤǤƱ͡
+ǤĤСѤ mcpp ꥳѥ뤹뤫Ķѿǻꤹ뤫-I ץǻꤹ뤫Ƥ

+

mcpp GCC , Visual C ǰʳǤϡץץ̤ NWORK-1 ĶϡʲĹ˹Ԥʬ䤷ƽϤޤʸƥĹ NWORK-2 ʲǤʤФʤޤ

+

ǰΤ˷֤ޤʾ italic ɽƤޥϤ mcpp 򥳥ѥ뤷ΤΤǤꡢmcpp μ¹ԥץबäƤȤ߹ߥޥǤϤޤ

+

ϥեꤻ mcpp ươ#pragma MCPP put_defines ǤȡȤ߹ߥޥΰɽޤ

+

__STDC__ 1 ʾξ֤Ǥϡ_ ǻϤޤʤȤ߹ߥޥϺޤ-N (-undef) ץǤ __MCPP ʳ٤ƺޤξ -D ץꤷľƤ⤫ޤޤ󡣽ϤΥС󤬾㤦 include directory ʤϡmcpp ꥳѥ뤷ʤƤ⡢ˡǥСޥ뤳Ȥ̥Сб뤳ȤǤޤ-N -U ȤʤƤ⡢-D Υޥ뤳ȤǤޤ

+

-+ (-lang-c++) ץ C++ Υץץꤷϡ__cplusplus ޤνͤ 1L ǤΤۤˤˤĤΥޥޤ

+

GCC Ǥ V.3.2 ޤǤϻޥȸäƤ GCC ΤϾʤ¿ gcc cpp -D ץϤΤǤȤθߴΤˤ mcpp ɬפϤʤΤǤmcpp "pre-preprocess" ǡñΤưصΤ mcpp Ƥޤ
+GCC V.3.3 ʹߤ60 Ĥ 70 ĤΥޥ褦ˤʤޤmcpp V.2.5 ʹߤǤ GCC ǤǤϤʤǤޤäơGCC V.3.3 ʹѤ mcpp ǤϾ嵭Τۤ¿ΥޥޤƤ mcpp 򥤥󥹥ȡ뤹 mcpp_g*.h ȤإåեǤ狼ޤ

+

FreeBSD, Linux, CygWIN, MinGW / GCC, LCC-Win32, Visual C 2008 long long äƤΤǡ#if long long, unsigned long long ɾޤVisual C 6.0, 2002, 2003, 2005, Borland C 5.5 Ǥ long long Ϥޤ󤬡__int64, unsigned __int64 ȤΤǤȤޤ

+

νϤǤ long ϰϤϤ

+
+[-2147483647-1, 2147483647] ([-0x7fffffff-1, 0x7fffffff])
+
+

Ǥunsigned long Ϥ

+
+[0, 4294967295] ([0, 0xffffffff])
+
+

ϰϤǤ +

+

long long ĽϤǤϤ long long ϰϤ

+
+[-9223372036854775807-1, 9223372036854775807]
+([-0x7fffffffffffffff-1, 0x7fffffffffffffff])
+
+

ǡunsigned long long ϰϤ

+
+[0, 18446744073709551615] ([0, 0xffffffffffffffff])
+
+

Ǥ +

+

νΤǤϤĤɽϣǤꡢӥåȱ黻⤽бƤΤǡmcpp #if ǤƱͤǤ
+αեȤϤ⻻ѥեȤǤꡢmcpp #if ǤƱͤǤʣӥåȤαեȤͤĤΤޤ 1/2 ˤʤˡ
+ν; operand ޤǤϤ Standard C ldiv() ؿƱŪ黻ԤΤǡmcpp #if ǤƱͤǤ

+

ΥƥʣϣӡˤǤϤʸåȤ ASCII ʤΤǡmcpp ǤƱͤǤ

+

䤬񤤤 kmmalloc Ȥ꡼롼󤬤ꡢmalloc(), free(), realloc() ޤǤޤCygWIN, Visual C 2005, 2008 ʳǤϤ줬󥹥ȡ뤵Ƥϡmake MALLOC=KMMALLOCʤޤ -DKMMALLOC=1ˤȤץꤹȤ줬 link ޤҡץΥǥХåѥ롼󥯤褦ˤʤäƤޤerrno ֹ EFREEP, EFREEBLK, EALLOCBLK, EFREEWRT, ETRAILWRT ˤ Linux, LCC-Win32 ǤϤ줾 2120, 2121, 2122, 2123, 2124 򡢤ʳǤϤ줾 120, 121, 122, 123, 124 ƤƤޤ mcpp-porting.html#4.extra ȡˡ*2

+

GNU Υƥप Visual C ʳǤϡĶѿ TZ Ϥ餫 JST-9 ˥åȤƤɬפޤʤȡ__DATE__, __TIME__ ޥͤƤޤޤ

+

:

+

*1 <backslash><newline> ˤ³򤷤ιĹˤ⡢Ȥ a space ѴιĹˤŬѤ롣ȤʣԤˤޤäƤ硢ȤѴˤäƤ줬ԤϢ뤵뤳Ȥա

+

*2 CygWIN 1.3.10, 1.5.18 Ǥ malloc() _malloc_r() Ȥä롼󤬤ꡢ¾Υ饤֥ؿˤϤƤӽФΤĤ롣Τᡢ¾ malloc() ȤȤǤʤVisual C 2005, 2008 Ǥ⡢ץཪλΥ롼 Visual C malloc() 롼ƤӽФΤǡϤ¾ malloc() ȤȤǤʤ

+
+ +

5. ǥå

+ +

5.1. ǥåη

+

mcpp ФǥåȤΰ̣ϡʲ̤ǤǥåϤɸ२顼Ϥ˽Ϥ졢-Q ץǥȥǥ쥯ȥ mcpp.err Ȥե˥쥯Ȥޤ

+

ǥåϼηȤäƤޤ

+
    +
  1. "filename:line: " "fatal error: ", "error: ", "warning: " Τɤ줫³ 5.3 - 5.9 ΥåΤΤɤ줫³"filename:line: " ˻Ϥޤ룱ԤοǥåȤΤϤʻͤǤ뤬UNIX ΣýϤǤŪʿǷǡƼΥġ뤬ȤƤΤǺѤƤ롣̾ΣԤˤޤʤȤФФ롣
    +
  2. ޥŸǤСΥޥƤӽФɽ롣ͥȤ줿ޥƤӽФǤС줾Υޥ̾ɽ롣Υޥɽ졢ΥޥΤ륽ե̾ȹֹɽ롣
    +
  3. ե̾ȹֹȤιԤɽ롣ե뤬 include 줿ΤǤСinclude Υե̾ȹֹȹԤ缡ɽ롣
    +
+

ɽԤ̾ϡΡʪԡפ \ ˤä³줿ȤΡԡפ餵˥Ȥ a space ѴΤΤǤꡢȤԤޤǤʣԤϢ뤵줿ΤȤʤ롣ֹϢ뤵줿ǸʪԤֹǤ롣Ƚ translation phase ǤΥ顼Ǥϡ phase ιԤɽ롣

+

-j ץꤷϡ嵭ΣȣϽϤޤ

+

ǥåˤϼΣĤΥ٥뤬ޤ

+
+ + + + +
fatal errorץץ򤳤ʾ³Ƥ̣ʤ
error ʸˡְäƤ
warning Portability Τʤְ㤤βǽΤ
+
+

Warning +ˤϤ˼ΣĤΥ饹ޤClass 1, 2 ʳϤüʤΤǤ

+
+ + + + + + +
class 1 ְ㤤βǽΤ롢ޤ portability 礤
class 2 ʾ꤬뤬ºݤˤϤ֤Τʤ
class 4 ºݤˤϤ֤꤬ʤ portability ˴ؤ warning
class 8 åפ #if group 䡢#if ɾ򥹥åפˤĤƤΤ warning
class 16trigraph, digraph ˤĤƤ warning
+
+

mcpp Ϥ¿οǥåѰդƤޤSTD ⡼ɤǤϼΤ褦ʼˤΤܤäƤޤ

+
+ + + + + + + + +
fatal error 17
error 76
warning class 1 49
warning class 2 15
warning class 4 17
warning class 8 30
warning class 16 2
+
+

ˤĤơ§ȤƤιԤʬŪ˻Ŧޤ

+

ʤʲǤϡǥåǰѤ륽ΥȡͤʬˤȤƲΥȡϤᤳǤޤΤͤΤ˥ޥ̾񤤤ƤȤϡºݤˤϤΥޥŸͤɽޤ
+ޤˤäƥ顼ȤƽФꥦ˥󥰤ȤƽФꤹå⤢ޤʲǤƱΥåˤĤƤϺǽ˵ܤȤǤäȤñ˥å¤٤ˤޤ

+
+ +

5.2. Translation limits

+

ʲΥ顼ˤϡХåեΥСե mcpp λ;¤ˤΤޤХåե translation limits system.H ΥޥƤޤɬפʾϤ礭 mcpp ꥳѥ뤷ƤʤξʤƥǤϡޤͤ礭 out of memory ȯ䤹ʤΤǡۤɤۤɤˡˡ

+
+ +

5.3. Fatal error

+

I/O 顼­ץץ򤽤ʾ³뤳ȤǤʤ硢ХåեСեץץ³Ƥ̣ʤˡΥ顼åФơץץߤޤƥץˤϡּԡפξ֤ͤޤ

+
+ +

5.3.1. mcpp ȤΥХ

+
    +
  • Bug:
    +ΥåϿ濫ޤ mcpp ȤΥХ̣ޤ줬Ф뤳ȤϤʤȻפޤ⤷Ф餼ҤξϢ
    +
+ +

5.3.2. ʪŪ顼

+
    +
  • File read error
    +եɤ߹ߤΥ顼Ǥǥե륷ƥबǤΤǤ礦
    +
  • File write error
    +ϥեν񤭽Ф顼Ǥǥե륷ƥबǤ뤫äѤˤʤäƤΤǤ礦
    +
  • Out of memory (required size is 0x1234 bytes)
    +꤬­ʤʤޤmcpp ҡפ 0x1234 bytes 褦ȤǤʤäˡξʤƥĹʥޥޤˤ¿ȯޤեʬ䤷ơ1 translation unit Υޥ򸺤餷Ƥ
    +
+ +

5.3.3. Translation limits ХåեΥ顼

+
    +
  • Too long header name "long-file-name"
    +Include ٤եΥѥꥹȡʻΥǥ쥯ȥΥѥꥹȤϢ뤷Ρˤ PATHMAX ΥĶƤޤ
    +
  • Too long source line
    +ʪԤĹ NBUFF-2 ĶƤޤäΥǤϤʤΤǤ礦
    +
  • Too long logical line
    +ʪԤ \ ˤä³ԤĹ NBUFF-2 ĶƤޤޤˤĹʥޥȯ뤳ȤޤΤ褦ʥɤϥޥǤϤʤؿȤƽ񤯤٤Ǥ礦
    +
  • Too long line spliced by comments
    +Ȥ a space ѴȤιԤĹ NBUFF-2 ĶƤޤԤޤȤˤä¿ιԤϢ뤷ȯޤȤʬΥƤ
    +
  • Too long token
    +ץץιԤ NWORK-2 ĶĹΥȡ󤬴ޤޤƤޤmcpp ϥѥΤμĹ NWORK ˽ϹԤʬ䤷褦ȤޤüĹȡ󤬤ʬ䤷ƤϤǤʤȤޤ
    +
+

ΣĤΥ顼ϥȡ󤬤ۤĹʤƤ⡢ޥŸˤΥȡΤȤǥХåեСեˤʤäˤⵯޤξϥޥƤӽФʬ䤷Ƥ

+
    +
  • Too long quotation "long-string"
    +ʸƥ롢ʸޤ header-name ĹޤʸƥǤʬ䤷Ƥܤʸƥ Standard C νϤǤХѥΤϢ뤷Ƥޤ
    +
  • Too long pp-number token "1234567890toolong"
    +Preprocessing-number token ĹޤStandard ⡼ɤξǤ
    +
  • Too long number token "12345678901234......"
    +Number token Ĺޤpre-Standard ⡼ɤξǤ
    +
  • Buffer overflow scanning token "token"
    +token 򥹥󤷤Ƥ뤦˥ХåեСեȤʤޤʸƥ롢ʸheader-namepp-number ʳΥȡǤϡΥåФޤ
    +
    +
  • More than BLK_NEST nesting of #if (#ifdef) sections
    +#if, #ifdef, #ifndef ΥͥȤ BLK_NEST ĶƤޤBLK_NEST Υޥ̾ʬϼºݤˤϤͤɽ롣ʲƱ͡ˡ#if section ʬ䤷Ƥ
    +
  • More than INCLUDE_NEST nesting of #include
    +#include ΥͥȤ INCLUDE_NEST ĶƤޤ#include ̵ºƵˤʤäƤΤǤ礦
    +
+ +

5.3.4. #pragma MCPP preprocessed ˴ؤ륨顼

+
    +
  • This is not the preprocessed source
    +#pragma MCPP preprocessed ޤ mcpp ˤäƥץץ줿եǤϤޤ
    +
  • This preprocessed file is corrupted
    + mcpp ˤäƥץץ줿եΤ褦ǤƤƻȤޤ
    +
    +
+ +

5.4. Error

+

ʸˡŪʴְ㤤ˤΥ顼åФޤ
+Standard C Ǥϡviolation of syntax rule or constraint äϽϤϲ餫οǥåФʤФʤʤȤˤʤäƤޤStandard ⡼ɤǤϤ violation ФƤϸ§Ȥƥ顼åФޤϥ˥󥰤Ǥ

+

ޤStandard C undefined ȤƤΤ¿ˤĤƤ error åޤ warning ФޤUndefined Ǥʤ error warning ФʤΤϡΤΤǤ

+
    +
  1. ʸƥη header name ' /*ñʤʸȤư롣ºݤˤϤϡե򥪡ץ󤷤褦Ȥƥ顼ˤʤϤǤ<, > ǰϤޤ줿 header name ǤϤʸӥȤγϤȲᤵΤǡ餫Υ顼Ȥʤˡheader name Ǥ \ undefined Ǥ뤬åʤºݤˤϤϤեΥץǥ顼ˤʤǤWindows ǤǤ \ class 2 warning Ф / Ѵƽˡ
    +
  2. #undef defineddefined Ȥ̾ #undef Τ undefined Ǥ뤬mcpp Ǥ defined Ȥ̾Υޥ뤳ȤϤǤʤ褦ˤʤäƤΤǡ줬ä뤳Ȥʤ
    +
  3. illegal multi-byte character sequence ä undefined Ǥ뤬ϼ³ϤʤΤǿǤʤʸƥ롢ʸheader name illegal multi-byte character sequence ˤϥ˥󥰤Фˡ
    +
  4. _ ǻϤޤ identifier ϽϤΤͽ󤵤Ƥꡢ桼ץȷ̤ undefined Ǥ뤬ץץåǤϥ桼ץफǤʤɬȽ̤ǤʤΤǡǤʤ
    +
  5. C99 ǥץȤƵꤵƤޥΤ__STDC_ISO_10646__, __STDC_IEC_559__, __STDC_IEC_559_COMPLEX__ #define #undef ꤹ undefined Ǥ뤬ǤʤΥޥϽϤΥإåե뤳ȤˤʤǤץץåϥ桼ץफɤɬȽ̤ǤʤǤ롣
    +
  6. C99 UCN ˤĤƤϡtranslation phase 2 <backslash><newline> UCN sequence Ǥ硢ʸƥϢˤä UCN sequence 줿 undefined Ǥ뤬ϿǤʤʤ UCN Ȥưˡ
    +
+

Standard C ΥץץǶŪ˲ violation of syntax rule or constraint ǡ undefined Dz unspecified Dz implementation-defined Ǥ뤫ˤĤƤϡcpp-test.html 򻲾ȤƤ

+

Fatal Ǥʤ error åФƤץץ³ޤλȡ顼οɽƥץˡּԡפξ֤ͤޤ

+ +

5.4.1. ʸȥȡ˴ؤ륨顼

+
    +
  • Illegal control character 0x1b, skipped the character
    +ʸƥ롢ʸheader nameȰʳΤȤ white space ʳΥȥ륳ɤޤʸ򥹥åפƽ³ޤ
    +
+

ϥȡΥ顼ǤΣĤϤ⤽ιԤ򥹥åפƽ³ޤΣĤʸƥΥȡǡԤιޤǤ˰䤬ĤƤʤȤ򼨤ޤ

+
+#error  I can't understand.
+
+

ʤɤȡpreprocessing-token sequence ηʤƥȤʸƥǤ⥳ȤǤʤȤ˽񤯤ȡμΥ顼ȤʤޤPre-processing-token ΡʥѥΤǤΡˣä token ꤪޤʤΤǡʸ source character set ˴ޤޤƤФۤȤɤ character sequence 餫 pp-token sequence Ȥ̤Τǡpreprocessing-token 顼ȤʤΤϤǤ

+

ʤåפ #if group Ǥ pp-token 顼ϥ顼Ȥʤޤ

+
    +
  • Unterminated string literal
    +ʸƥ뤬뤷ƤޤʸƥԤޤȤϤǤޤɬפʤ顢ʣԤʸƥ񤤤ơϤˤϢ뤵ƤΥ顼 # 黻Ҥˤʸ󲽤ȯ뤳Ȥ⤢ޤξϹԤϥåפޤ
    +OLDPREP ⡼ɤǤϤϥ顼ˤʤޤʹƥνȤߤʤˡ
    +ޤ-a (-lang-asm, -x assembler-with-cpp) ץǵư줿ϡԤޤʸƥȽǤơ\n ƼιԤϢ뤹Τǡ顼ˤϤʤޤʥ˥󥰤ϽФˡ
    +
  • Unterminated character constant 't understand.
    +ʸ뤷ƤޤOLDPREP ⡼ɤ lang-asm ⡼ɤǤϤϥ顼ˤʤޤʹƥνȤߤʤˡ
    +
  • Unterminated header name <header.h
    +header-name 뤷Ƥޤ<, > ǰϤޤ header-name " ޤ ' äϤΥ顼ǤϤʤ嵭ĤΥ顼Ȥʤޤޤ<, > ǰϤޤ header-name /* äϤ夬ȤȲᤵޤ
    +
  • Empty character constant ''
    +ʸȤǤ +-a ץ󤬻ꤵ줿Ȥϡϥ顼ˤϤʤ餺˥󥰤Фޤ
    +
  • Illegal UCN sequence
    +std ⡼ɤ __STDC_VERSION__ ͤ 199901L ʾξ硢ޤ C++ ξϡUCN ǧޤ̻ \u, \U ǻϤޤ룱 sequence Υ줾죴Ƥޤ󡣡#if ʸǤ줬äȤϡUndefined escape sequence Υ˥󥰤Ȥʤ롣ʳξϿǤʤˡ
    +
  • UCN cannot specify the value "0000007f"
    +UCN ϣʤ [0, 9f], [d800, dfff] ϰϤͤꤹ뤳ȤϤǤޤ󡣤ԤΤ 0x24 ($), 0x40 (@), 0x60 (`) ϲĤǤԤϤΣʸȤ٤ basic source character set ͤȰפΤǡȤޤ󡣤ޤԤ special characters Τ reserved area ȤʤäƤޤC++ ǤϸԤ¤Ϥޤʤʤʤ̯˰äƤˡC++ Ǥ -V199901L Ȥƥޥ __cplusplus 199901L ʾ˻ϡ˴ؤƤ C99 Ʊͤˤʤޤ
    +
  • Illegal multi-byte character sequence "XY"
    +OK_MBIDENT == TRUE ǥѥ뤷 Standard ⡼ɤξ硢C99 Ǥ identifier multi-byte character Ȥޤmulti-byte character Ȥǧʤ character sequence ȥ顼ˤʤޤidentifier ʳ pp-token Ǥϥ˥󥰡ˡ
    +
+ +

5.4.2. 뤷ʤեΥ顼

+

Υåϥե뤬뤷ʤ #if sectionޥƤӽФǽäƤ˽ФޤΥեϤξinclude 줿եǤʤˤϡ"End of file" ǤϤʤ "End of input" ɽޤ
+οǥå mcpp Υ⡼ɤˤäơ顼Ȥʤȥ˥󥰤ȤʤȤޤ
+Standard ⡼ɤǤϤϤ٤ƥ顼ǤΥޥƤӽФϥåפ#if section бطϤΥե뤬 include 줿ν֤ᤷޤ
+pre-Standard ⡼ɤǤϤ٤ƥ˥󥰤Ǥpre-Standard ⡼ɤǤ⡢OLDPREP ⡼ɤǤ unterminated macro call ʳϥ˥󥰤Фޤ

+
    +
  • End of file within #if (#ifdef) section started at line 123
    +123 Ԥ #if (#ifdef, #ifndef) б #endif ޤ
    +
  • End of file within macro call started at line 123
    +123 ԤǻϤޤäޥƤӽФեνޤǤ˴뤷Ƥޤ󡣰ΥåбƤʤȡ󥨥顼äˡĤʬȤɤǤäƥեκǸޤã뤳Ȥޤʤ Buffer overflow Ȥʤ뤫⤷ʤˡޤޥŸλͤ⡼ɤˤäưۤʤΤǡ⡼ɤǤϰտ̤Ÿޥ¾Υ⡼ɤǤϤΥ顼ˤʤ뤳Ȥޤ
    +
+ +

5.4.3. Preprocessing group бطΥ顼

+

#if, #else group бطΥ顼ǤιԤ̵뤷ơʤޤǤ group ³ƤΤȤơ˽³ޤΥåϤȤåפ #if group ˤäƤԤޤ
+ʤ#if (#ifdef) section Ȥ #if, #ifdef, #ifndef #endif ޤǡ#if (#elif, #else) group ȤϣĤ #if (#ifdef) section Τ #if (#ifdef, #ifndef), #elif, #else, #endif ǤϤޤ줿Ĥιԥ֥åؤޤ

+
    +
  • Already seen #else at line 123
    +123 Ԥ #else 줿ˤޤ #else (#elif) Ƥޤ#endif ˺줿Τ⤷ޤ
    +
  • Not in a #if (#ifdef) section
    +#if (#ifdef, #ifndef) ʤ #else (#elif, #endif) Ƥޤ
    +
  • Not in a #if (#ifdef) section in a source file
    +Include 줿եǡ#if (#ifdef, #ifndef) ʤ #else (#elif, #endif) ƤޤInclude 줿ե뤬եˤХ顼ˤʤʤñΥեǤϥХ󥹤ȤƤʤȤǤStandard ⡼ɤλǤpre-Standard ⡼ɤǤϥ˥󥰡ˡ
    +
+

ΣĤ #asm, #endasm бطΥ顼Ǥpre-Standard ⡼ɤνϤξǤ

+
    +
  • In #asm block started at line 123
    +123 ԤϤޤä #asm ֥åˤޤ #asm ޤ#asm ҤˤǤޤ󡣤֤#endasm ˺줿ΤǤ礦
    +
  • Without #asm
    +#asm ֥åǤϤʤȤ #endasm ޤ
    +
+ +

5.4.4. ǥ쥯ƥֹԤñʹʸ顼

+

ʹߡ5.4.12 ޤǡˤΥ顼ϥåפ #if group Ǥϵޤ-W8 ץǵưȡUnknown directive ˤĤƤϥ˥󥰤Фˡ
+ # ǻϤޤǥ쥯ƥֹԤñʸˡ顼ǤιԤ̵뤷ƽ³ޤʤʤ#if section γϤȤߤʤ#line ǤϹֹѤʤˡ#include, #line ԤΰޥǤСŸǥåԤޤpre-Standard ⡼ɤǤŸʤˡ
+ΥåΤΤˤϥǥ쥯ƥ̾ФƤޤ󤬡³ɽ륽Ԥǥǥ쥯ƥ֤狼ޤʥǥ쥯ƥֹԤϥȤ space ѴȡɬԤˤʤˡ

+
    +
  • Illegal #directive "123"
    +# ³ȡ̾ǤϤޤ# ³Τϥǥ쥯ƥ̾ǤʤФʤޤʤOLDPREP ⡼ɤǤ #123 #line 123 ƱΤȤưˡ
    +
  • Unknown #directive "pseudo-directive"
    +pseudo-directive Ȥǥ쥯ƥ֤ϼƤޤ-a (-lang-asm, -x assembler-with-cpp) ץǵư줿ϡ顼ˤϤʤ餺˥󥰤ˤʤޤ
    +
  • No argument
    +#if, #elif, #ifdef, #ifndef, #assert, #line ΰޤ
    +
  • No header name
    +#include Ԥΰޤ󡣤ޤϰޥǤŸȤˤϥȡ󤬲ʤʤޤ
    +
  • Not a header name "UNDEFINED_MACRO"
    + header name ǤϤޤheader name ϤΥޥƤʤʤɤǤ<, > ޤ ", " ǰϤޤ줿Τ header name Ǥ
    +
  • Not an identifier "123"
    +#ifdef, #ifndef, #define, #undef ˤ identifier ΰɬפǤ123 identifier ǤϤޤ
    +
  • No identifier
    +#define, #undef ΰޤ
    +
  • No line number
    +#line ΰޥǤŸȤ ˤϲȡ󤬻ĤʤʤäƤޤޤ
    +
  • Not a line number "name"
    +#line ΰͥȡpreprocessing numberˤǤϤޤ
    +
  • Line number "0x123" isn't a decimal digits sequence
    +#line ϽȡǤʤФʤޤStandard ⡼ɤξǤpre-Standard ⡼ɤϥ˥󥰤ϽФʡȡǧˡ
    +
  • Line number "2147483648" is out of range of [1,2147483647]
    +#line [1,2147483647] ϰϤˤʤФʤޤ0 ⥨顼ǤStandard ⡼ɤξǤ
    +
  • Not a file name "name"
    +#line ̾ʸƥǤʤФʤޤIdentifier 磻ʸƥǤϤޤ
    +
+

Υ顼 Standard ⡼ɤξǡΥǥ쥯ƥ̵֤뤵ޤOLDPREP ⡼ɤǤϥ顼⥦˥󥰤ФKR ⡼ɤǤϥ˥󥰤Ȥʤꡢ "junk" ʤäΤȤƥץץ³ޤ

+
    +
  • Excessive token sequence "junk"
    +#else, #endif, #asm, #endasm ιԤ;פʥƥ junk ޤ#ifdef, #ifndef, #include, #line, #undef ιԤθ;פʥƥ junk ޤϥȤȤƽ񤤤Ƥ
    +
+ +

5.4.5. #if ιʸ顼

+

#if, #elif, #assert ǥ쥯ƥμιʸ˴ؤ륨顼Ǥ

+

#if (#elif) ǥ顼äϡ #if (#elif) Ԥϵɾ줿ΤȤơʤʤ group 򥹥åפơˡץץ³ޤ

+

åפ #if (#ifdef, #ifndef, #elif, #else) group ˤĤƤϡ줬ä legal preprocessing token ΩäƤ뤫ɤȡ#if group бطϥåޤ¾ʸˡ顼ϥ顼ˤϤʤޤ

+

#if ԤΤΤǤϡɾ򥹥åפʬޤ㤨 #if a || b Τ褦ʼ a Ǥϡb ɾϹԤޤ󡣤Σʸˡ顼ʤ translation limit Υ顼ϤȤɾ򥹥åפʬˤäƤåޤ

+
    +
  • More than NEXP*2-1 constants stacked at "12"
    +#if ɾǡåѤޤƤ 12 ΤȤ NEXP*2-1 ʾˤʤޤ#if ΥͥȤޤ
    +
  • More than NEXP*3-1 operators and parens stacked at "+"
    +#if ɾǡåѤޤƤ黻Ҥȥåιפ + ΤȤ NEXP*3-1 ʾˤʤޤʥåϰФ򣲤Ĥȿˡ#if ΥͥȤޤ
    +
  • Misplaced constant "12"
    +#if Τ٤Ǥʤ֤ 12 ޤ#if Ǥϥ㥹ȤϻȤޤ󤬡(int)0x8000 ʤɤȥ㥹ȤȤäꤹȡint ޥȤƤʤ identifier Ȥߤʤ 0 ɾΤǡ(0)0x8000 ȤʤꡢΥ顼ȯޤ
    +
  • Operator ">" in incorrect context
    +#if ̯ʰ֤ > Ȥ黻Ҥޤޥ MACRO ĤΥȡƤˡ#if MACRO > 0 ʤɤȤȡޥŸη #if > 0 ȤʤΤǡΥ顼ȤʤޤʤξϤľ Macro "MACRO" is expanded to 0 token Ȥ˥󥰤ФΤǡȤ狼ˡ
    +
  • Unterminated expression
    +#if 뤷ƤޤMACRO ĤΥȡƤ #if a || MACRO ʤɤξǤ
    +
  • Excessive ")"
    +#if ( бʤ;פ ) ޤ
    +
  • Missing ")"
    +#if ( б ) ޤ
    +
  • Misplaced ":", previous operator is "+"
    +? бʤ : ޤ +
    +
  • Bad defined syntax
    +#if defined ʸˡְäƤޤäбȤƤʤäꡢ +identifier ˤʤäƤʤäξǤޥŸη̡Υ顼äϡΥå³ƤŸ̤ɽޤ
    +
  • Can't use a string literal "string"
    +#if ˤʸƥϻȤޤ
    +
  • Can't use a character constant 'a'
    +POSTSTD ⡼ɤǤ #if ʸ磻ʸϻȤޤ
    +
  • Can't use the operator "++"
    +#if ˻Ȥʤ黻Ҥޤ=, ++ Ǥ
    +
  • Not an integer "1.23"
    +#if ԤˤʸޤˤȤޤ
    +
  • Can't use the character 0x24
    +#if ˻Ȥʤʸʥ 0x24ˤޤ +identifier, operator, punctuator, string literal, character constant, preprocessing number Τɤ preprocessing token ˤפʤʸΥȡǤʥȥ륳ɤϤ˥åƤΤǡʳʸˡ +$ identifier ǧϤǤ⡢ץˤäƤϤ줬Ȥʤʤޤ +󡢥åפ group ˤΤϥåޤ
    +
+

#if sizeof ˴ؤ륨顼Ǥpre-Standard ξǤ

+
    +
  • sizeof: Syntax error
    +#if sizeof ʸˡְäƤޤäʤäꡢä¿ꡢäбȤƤʤäꡢʤäꤹǤ
    +
  • sizeof: No type specified
    +#if sizeof (type) type ꤵƤޤsizeof (*) ʤɤǤsizeof ((*)()) ϴؿؤΥݥ󥿤Υ legal ʹʸǤ
    +
+ +

5.4.6. #if ɾ˴ؤ륨顼

+

Υ顼ɾ򥹥åפʬˤϵޤ-W8 ץǤϤˤĤƤ⥦˥󥰤Фˡ

+

#if C99 ǤϤνϤλĺǡC90, C++98 Ǥ long / unsigned long ɾΤǤmcpp Ǥ C90, C++98 Ǥ long long / unsigned long long ɾޤC90, C++98 long / unsigned long ϰϤĶϥ˥󥰤Фޤ
+long long ΤʤϤǤϡ long long / unsigned long long long / unsigned long ɤؤƤpre-Standard ǤϤ٤ (signed) long ɤؤƤPOSTSTD Ǥ #if ʸϻȤʤΤǡ̤Υ顼ˤʤޤ

+
    +
  • Constant "123456789012345678901" is out of range
    +ͤ unsigned long long ɽǤϰϤĶƤޤ
    +
  • Integer character constant 'abcdefghi' is out of range
    +ʸ 'abcdefghi' ͤ unsigned long long ɽǤϰϤĶƤޤ
    +
  • Wide character constant L'abcde' is out of range
    +磻ʸ L'abcde' ͤ unsigned long long ɽǤϰϤĶƤޤSTD ⡼ɤλǤ
    +
  • 8 bits can't represent escape sequence '\x123'
    +ʸΣĤ escape sequence ͤ 8 bits ɽǤϰϡ[0, 0xFF]ˤĶƤޤ
    +
  • 16 bits can't represent escape sequence L'\x12345'
    +磻ʸΣĤ escape sequence ͤ 16 bits UTF-8 ξ 32 bitsˤɽǤϰϤĶƤޤSTD ⡼ɤλǤ
    +
  • Division by zero
    +#if 0 ˤ껻ޤ껻 / ˤΤ % ˤΤޤ#if dividend / divisor .. divisor ޥȤƤʤʤɤ˵ޤ#if defined divisor && (dividend / divisor ..) Ƚ񤯤ȤǡΥ顼򤱤뤳ȤǤޤ
    +
  • Result of "op" is out of range
    +黻 op ˤ黻η̤ long long ϰϳȤʤޤop ϣ黻 *, /, %, +, - Τɤ줫Ǥɽξϡñ '-' 黻Ҥ -LLONG_MIN ǥСեȤʤޤUnsigned long long ϥСե뤳ȤʤΤǥ顼ˤϤʤޤ󤬡Ūʱ黻̤ϰϳȤʤϥ˥󥰤Фޤ
    +
+

sizeof ˴ؤ륨顼ǤåפʬǤϽФޤ-W8 ץǤϥ˥󥰤Фˡpre-Standard ξǤ

+
    +
  • sizeof: Unknown type "type"
    +#if sizeof (type) type ѤǤ
    +
  • sizeof: Illegal type combination with "type"
    +#if sizeof (long float) ȡȤ߹碌ѤǤ
    +
+ +

5.4.7. #define Υ顼

+

#define ˴ؤ륨顼Ǥ +ޥޤ

+

#, ## 黻Ҥ˴ؤ륨顼 Standard ⡼ɤΤΤǤ
+__VA_ARGS__ ˴ؤ륨顼 Standard ⡼ɤξǤ +Ѱޥ C99 λͤǤGCC, Visual C++ 2005, 2008 ȤθߴΤ C90 Ǥ C++ ǤͭȤƤޤʤ˥󥰤Фˡ

+
    +
  • "defined" shouldn't be defined
    +defined Ȥ̾ΥޥǤޤ󡣤 Standard ⡼ɤǥåޤ
    +
  • "__STDC__" shouldn't be redefined
    __STDC__ #define Ǥޤ__STDC_VERSION__, __FILE__, __LINE__, __DATE__, __TIME__ C99 ⡼ɤǤ __STDC_HOSTED__ -+ ץǤ __cplusplus ƱͤǤ Standard ⡼ɤǥåޤ
    +
  • "__VA_ARGS__" shouldn't be defined
    +C99 ǤϲѰޥִꥹ __VA_ARGS__ Ȥѥ᡼Ȥޤ identifier ϥޥȤ뤳ȤϤǤޤ
    +
  • More than NMACPARS parameters
    +ޥǥѥ᡼ο NMACPARS ĶƤޤ
    +
  • Empty parameter
    +ޥ˥Υѥ᡼ޤ +
    +
  • Illegal parameter "123"
    +ޥ identifier ʳΥȡ󤬥ѥ᡼˻ȤƤޤ +Standard ⡼ɤǤϡidentifier ǤäƤ __VA_ARGS__ ϥѥ᡼ȤƻȤޤ
    +
  • Duplicate parameter name "a"
    +ޥ a Ȥѥ᡼̾ʣƤޤ
    +
  • Missing "," or ")" in parameter list "(a,b"
    +ޥǥѥ᡼ꥹȤĤ ) ޤ󡣤ޤϥѥ᡼ľ ',' Ǥ ')' Ǥʤ̤Υȡ󤬤ޤ
    +
  • No token before ##
    +ޥִꥹ ## 黻Ҥ˥ȡ󤬤ޤ
    +
  • No token after ##
    +ޥִꥹ ## 黻Ҥθ˥ȡ󤬤ޤ
    +
  • ## after ##
    +ޥִꥹ ## ## Ȥȡ¤Ӥޤϥ顼ǤϤʤȤ⤢뤫⤷ޤ󤬡## Ȥȡ¾ΥȡϢ뤵ɬ valid ǤʤȡȤʤΤǡΥޥŸˤɬ顼ˤʤޤmcpp ǤϤϥޥ˥顼ˤޤ
    +
  • Not a formal parameter "id"
    +ؿͥޥ # 黻ҤΥڥ id ѥ᡼̾ǤϤޤ
    +
  • "..." isn't the last parameter
    +"..." Ȥѥ᡼ϥޥκǸΥѥ᡼ǤʤФʤޤ󡣡pre-Standard ⡼ɤǤ ... Illegal parameter 顼ˤʤˡ
    +
  • "__VA_ARGS__" without corresponding "..."
    +ִꥹ __VA_ARGS__ Ȥ identifier ... Ȥѥ᡼礷Ȥޤ
    +
+

GCC-specific-build STD ⡼ɤǤ GCC2 ͤβѰޥȤޤΥޥ __VA_ARGS__ ȤƤȡΥ顼ˤʤޤ +__VA_ARGS__ Ȥʤ GCC3 ͤ C99 ͤǽ񤫤ʤФʤޤ

+
    +
  • __VA_ARGS__ cannot be used in GCC2-spec variadic macro
    +
+ +

5.4.8. #undef Υ顼

+

#undef ˴ؤ륨顼Ǥ

+
    +
  • "__STDC__" shouldn't be undefined
    __STDC__ #undef Ǥޤ +__STDC_VERSION__, __FILE__, __LINE__, __DATE__, __TIME__ C99 ⡼ɤǤ __STDC_HOSTED__ -+ ץǤ __cplusplus ƱͤǤ Standard ⡼ɤξ˥åޤ
    +
+ +

5.4.9. ޥŸΥ顼

+

ϥޥŸ˴ؤ륨顼ǤΥޥɽ졢ΥޥΤ륽ե̾ȹֹɽޤ#, ## 黻Ҥ˴ؤ륨顼 Standard ⡼ɤǤ

+
    +
  • Less than necessary N argument(s) in macro call "macro( a)"
    +ޥƤӽФΰ­ޤmacro ˤϰ N ɬפǤ­ʤˤ 0 ĤΥȡƤơ³ޤѥ᡼ĤǰξϥȰηȤζ̤Ĥޤ󤬡ϥ顼ˤޤOLDPREP ⡼ɤǤϤϥ˥󥰤Ǥ
    +
  • More than necessary N argument(s) in macro call "macro( a, b, c)"
    +ޥƤӽФΰ¿ޤmacro ΰ N ĤΤϤǤ;פʰΤƤơ³ޤOLDPREP ⡼ɤǤϤϥ˥󥰤Ǥ
    +
  • Not a valid preprocessing token "+12"
    +## 黻ҤˤäƣĤ pp-token Ϣ뤷Ȥ"+12" Ȥ invalid ʤΤˤʤޤϸڤΥ뤫⤷ޤ󤬡Τޤ޽³ޤ-lang-asm (-x assembler-with-cpp, -a) ץǤϡϥ˥󥰤Ǥ
    +
  • Not a valid string literal "\\"str\""
    +# 黻ҤˤäƥޥƤӽФΰʸ󲽤ȤͭʡñΡʸƥȤϤʤ餺"\\"str\"" Ȥ token sequence ˤʤޤƥγ \ Τ뤳ȤǤʥƥγ \ ʸ󲽤ȡUnterminated string literal Υ顼ˤʤ뤳Ȥ⤢ꡢΥ顼ˤʤʤȤ⤢ˡΤޤ޽³ޤ֤󥳥ѥեǺ٥顼ˤʤǤ礦POSTSTD ⡼ɤǤϤΥ顼ȯޤUnterminated string literal Ϥꤦˡ
    +
+

ʲΥ顼ǤϡΥޥƤӽФϥåפޤ

+
    +
  • Buffer overflow expanding macro "macro" at "something"
    +ޥŸ something ΤȤǥХåեСեޤޥʬ䤷Ƥ
    +
  • Unterminated macro call "macro( a, (b, c)"
    +ޥƤӽФ뤷Ƥޤ󡣤Υ顼ΤϤƤϡǥ쥯ƥֹԤǤΥޥƤӽФιԤǴ뤷ƤʤǤޤStandard ⡼ɤǤϰΥޥϰִΩäŸޤλˤΥޥƤӽФϤΰǴ뤷ƤʤФʤޤPOSTSTD ⡼ɤǤϥޥִꥹˤޥƤӽФִꥹȤǴ뤷Ƥʤ⡢Υ顼Ȥʤޤ
    +
  • Rescanning macro "macro" more than RESCAN_LIMIT times at "something"
    +ޥΥͥȤơŸ "something" ΤȤǺβ RESCAN_LIMIT ĶޤStandard ⡼ɤξǤޤꤨޤ
    +
  • Recursive macro definition of "macro" to "macro"
    +ޥƵŪǤ pre-Standard ⡼ɤλꤦ륨顼Ǥβ PRESTD_RESCAN_LIMIT ãȺƵŪޥȤߤʤޤ
    +
+

Υ顼 STD ⡼ɤ -K ץꤷȤΤΤǤ +Ȥˡޥüʣʤᡢmacro notification ΤΥХåե­ʤʤäȤ̣Ƥޤ +ºݤˤϤޤޤ

+
    +
  • Too many magics nested in macro argument +
  • Too many nested macros in tracing MACRO +
+ +

5.4.10. #error, #assert

+
    +
  • #error
    +#error ǥ쥯ƥ֤¹Ԥޤ #error ԤɽޤʰΤΤ˥ȡ󥨥顼unterminated string ˤä #error ϼ¹Ԥʤˡ#error Standard ⡼ɤξǤ
    +
  • Preprocessing assertion failed:
    +#assert ǥ쥯ƥ֤¹Ԥޤθդ³ #assert ԤΰϤޤμΤΤ˥顼äϡassertion ԤΤȤߤʤޤ#assert pre-Standard ⡼ɤ COMPILER != GNUC ξǤ
    +
+ +

5.4.11. #include μ

+
    +
  • Can't open include file "file-name"
    +Include ٤ե뤬¸ߤʤˤΥ顼ȯޤ֤ե̾Υڥߥ include directory λδְ㤤Ǥ礦
    +
+ +

5.4.12. ¾Υ顼

+

ΣĤ Standard ⡼ɤ C99 ΤΤǤ +C++ Ǥ -V199901L ץǵưƱͤǤ

+
    +
  • Operand of _Pragma() is not a string literal
    +_Pragma() operator ΰϣĤʸƥޤϥ磻ʸƥǤʤФʤޤ
    +
  • _Pragma operator found in directive line
    +_Pragma() operator #pragma ǥ쥯ƥ֤ˤʤΤǤ +ǥ쥯ƥֹԤǻȤȤϤǤޤ +
+
+ +

5.5. Warning (class 1)

+

ʸˡŪˤϴְ㤤ǤϤʤν񤭴ְ㤤βǽ portability Τˡwarning ФޤWarning ˤ 1, 2, 4, 8, 16 ΣĤ class ޤmcpp εư -W <n> Ȥץꤹ뤳Ȥǡ餬ͭˤʤޤ<n> 1, 2, 4, 8, 16 ΤǤդΤΤ OR ȤäΤǤʤʲ -W4 ȸäƤΤϡ-W<n> <n> & 4 ξΤȤǡ1|4, 1|2|4, 2|4, 1|4|8, 4|8, 4|16 ޤߤޤ

+

Standard ⡼ɤǤ Standard C undefined ȤƤư¿ error ˤޤˤĤƤ warning Фޤ

+

Ʊͤ Standard ⡼ɤǤ Standard C unspecified ȤƤͤȤФƤϡʳɬ warning Фޤ

+
    +
  1. #if sub-expression ɾˤĤƤϡwarning ϽФʤ||, &&, ? : ʳα黻Ҥ˴ؤƤ operand ɾ unspecified Ǥ뤬#if ѤʤΤǡɾϷ̤ˤϱƶʤǤ롣mcpp ǤϡȡɾϾ˽иƱ˺鱦˹Ԥδ֤α黻Ͼ˱黻ҤΥ롼ԥ󥰤ε§˽äơιͤɬפˤʤä˽ƹԤ
    +
+

Standard ⡼ɤǤϡimplementation-defined ȤƤư¿ˤĤƤ warning ФޤImplementation-defined Ǥʤ warning νФʤΤϡǤ

+
    +
  1. #include directive include եõꡢ #include ΰ header-name Ȥ pp-token ۤˡ warning ФƤΤǤϤ뤵header-name ϥޥǤʤСΥȡ space ̵ͭޤƤΤޤ޻Ȥ롣ޥǤСŸ̤ space ̵ͭޤƤΤޤ޻ȤPOSTSTD ⡼ɤǤϡޥŸˤä pp-token ֤ space 뤬ξ < > ޤǤ space ƤäĤΤ header-name Ȳ᤹롣ɤˤƤ POSTSTD Ǥ <, > ˤ header-name obsolescent feature ǤˡWarning ϽФʤˡ#pragma MCPP debug path, #debug path ǥѥɽ롣
    +
  2. #if Ǥ single byte ʸ'a' ˤɾȡñ multi- byte character Υ磻ʸL'' ˤɾϴʸåȤƱǤäƤ⡢single byte ΥʤȤ̵ͭȤ en-coding Ȥˤä portability Ϥ¤ΤǤ뤬꤬ʤUCN ˤĤƤƱͤǤ롣
    +
  3. #if ӥåȱ黻ɽˤäƷ̤ͤۤʤ뤬ȾΥޥϣɽȤäƤΤǡȤ portability ϤۤȤ¸ߤʤαӥåȥեȤ operand ޤν portability ˳Τǡwarning Ф
    +
  4. Token separator ȤƤʣ white spaces sequenceStandard C Ǥ translation phase 3 Ǥ one space ˰̤뤫ɤ implementation-defined ȤƤ뤬̾ϥ桼ϤޤäˤɬפϤʤPortability ˤʤΤϡpreprocessing directive Ԥ <vertical-tab> ޤ <form-feed> Ǥ롣mcpp ǤϤ space Ѵ뤬λ warning Фʣ space, tab sequence one space ۤäư̤롣
    +
  5. ȼȤ߹ߥޥˤĤƤ warning ϽФʤ
    +
  6. #pragma sub-directive ˤĤƤ⸶§Ȥ warning ϽФʤmcpp Ȥ #pragma once, #pragma __setlocale, #pragma MCPP * ǰְäƤϡwarning ФޤGCC V.3 Ǥ #pragma GCC poison (dependency) Τ褦ˡ°ΥץץåϽ뤬 mcpp Ͻʤ #pragma ˤĤƤ warning Ф
    +
  7. C99 ǤϡUCN sequence # 黻Ҥˤäʸ󲽤硢\ \\ Ȥդ˽Ťͤ뤫ɤ implementation-defined ȤʤäƤ뤬ˤĤƤ warning ϽФʤmcpp Ǥ \ ϽŤͤʤ
    +
+

äơmcpp ǤϥץץΥ٥Ǥ portability Υåܴۤ˹ԤȤǤޤ

+

POSTSTD ⡼ɤǤϡ 2.1 ˤͤΰ㤤 STD ⡼ɤƱͤǤ +

+

˥󥰤ĽФƤ⡢פξ֤ͤޤ-W0 Υץǵưȡ˥󥰤ϽФޤ

+ +

5.5.1. ʸȡ󤪤ӥȤ˴ؤ륦˥

+
    +
  • Converted [CR+LF] to [LF]
    +ԥɤ [CR+LF] [LF] ѴޤWindows ѤΥե UNIX ϤΥƥǥѥ뤹ȡΥ˥󥰤ФơԥɤưŪѴޤΥ˥󥰤ϣ󤷤ФޤCompiler-independent-build Ǥϥ饹ǡcompiler-specific-build Ǥϥ饹Ǥ
    +
  • Illegal control character 0x1b in quotation
    +ʸƥ롢ʸheader name white space Ǥʤȥ륳ɤޤϥѥΤǥ顼ˤʤ뤫⤷ޤ󡣤ǤʤƤ⡢ʤǤȥ륳ɤʸƥ롢ʸǤ escape sequence ǽ񤯤٤Ǥ
    +
  • Illegal multi-byte character sequence "XY" in quotation
    +ʸƥ롢ʸheader name XY ΣХܤ multi-byte characterʴˤΣХܤǤХܤ multi-byte character ΣХܤǤϤޤ"XY" ɽϲϤˡ multi-byte character ȤߤʤХܤ single byte character ȤơХܤϼʸȤưޤ
    +볰⵬ϰϤΥɤǤС˥󥰤ϽФޤ󡣤ޤϰϤˤºݤˤʸΤʤ꤬Ȥɤˤޤmcpp ̾ϤޤǤϥåޤ󡣵ϰϤϼ̤Ǥ
    +
    + + + + + + + + +
    encoding first byte second byte
    shift-JIS 0x81-0x9f, 0xe0-0xfc0x40-0x7e, 0x80-0xfc
    EUC-JP 0x8e, 0xa1-0xfe 0xa1-0xfe
    KS C 5601 0xa1-0xfe 0xa1-0xfe
    GB 2312-80 0xa1-0xfe 0xa1-0xfe
    Big Five 0xa1-0xfe 0x40-0x7e, 0xa1-0xfe
    ISO-2022-JP0x21-0x7e 0x21-0x7e
    +
    +ISO-2022-JP ˤʸɤΤۤ shift sequence ȤΤޤShift sequence ̤ˤȡUTF-8 ʳϤ٤ multi-byte character ϣХȤǤ
    +UTF-8 Ǥ multi-byte character ϣХȤޤϣХȡˣХȤǤꡢȾδϣХȤ encode ޤ +Хܤ 0xc2-0xefХܰʹߤ 0x80-0xbf ϰϤˤޤܺ٤ϾάޤɤˤƤ⡢ƥХȤϤϰϤˤʤФʤޤ +ޤϰˤ illegal sequence ¸ߤޤmcpp Ϥ˥˥󥰤Фޤ
    +ʤEUC-JP 0x8f + 0xa1-0xfe + 0xa1-0xfe ΣХ encoding JIS X 0212 ΤˤϣʸȤƤǧǤ0x8f, 0xa1-0xfe + 0xa1-0xfe ΣʸȤǧޤη̡˥󥰤Ф#if Υ磻ʸɾʳϡưޤEUC-JP ǤϣХܤ 0x8e ʸJIS X 0201 ΤȾѥʡˤϣХ encoding ǤΤǡmulti-byte character Ȥưޤ
    +Υ˥󥰤ϥåפ #if group ǤϽФޤ
    +
  • "/*" in comment
    + /* Ȥ sequence ޤտޤƽ񤤤ΤǤʤСȤĤ˺Ǥ礦ȤϥͥȤǤޤ
    +
  • Too long identifier, truncated to "very_long_identifier"
    +Identifier Ĺ IDMAX ĶƤΤǡIDMAX ˽̤ޤ
    +
  • Illegal digit in octal number "089"
    +ʤοͥȡ 8 ޤ 9 ʸޤpre-Standard ⡼ɤǤФޤStandard ⡼ɤǤ̾ιԤοͥȡˤĤƤȽϤޤ#if ˤΥȡ󤬤С Not an integer 顼ΰȤʤޤ
    +
  • Unterminated string literal, catenated to the next line
    +ĤƤʤʸƥ̾ϥ顼Ǥ-lang-asm (-x assembler-with-cpp, -a) ץǵư줿ϡϹԤޤʸƥȲᤷơ'\n' ƼιԤϢ뤷ޤν򤹤åȤϲʤΤǡܤʸƥϢפεǽȤäƽ񤤤Ƥ
    +
  • Unterminated character constant 't understand.
    +ʸ뤷Ƥޤ +lang-asm ⡼ɤǤϤϥ顼ˤϤʤޤ
    +
  • Empty character constant ''
    +ʸȤǤ +lang-asm ⡼ɤǤϤϥ˥󥰤Ǥ¾Υ⡼ɤǤϥ顼ˤʤޤ
    +
+ +

5.5.2. 뤷ʤեΥ˥

+

եκǸιԤȾüǤˡΥ˥󥰤Фޤold_prep ⡼ɤǤϥ˥󥰤Фޤ

+
    +
  • End of file with no newline, supplemented newline
    +ե뤬ԥɤΤʤԤǽäƤƤϤʤޤ󡣲ԥɤ䤤ޤ
    +
  • End of file with \, deleted the \
    +ե뤬 <backslash><newline> ǽäƤƤϤʤޤ<backslash> ޤ
    +
  • End of file with unterminated comment, terminated the comment
    +ȤĤ˺ǤȤĤޤ
    +
+

Υ˥󥰤 pre-Standard ⡼ɤǤФޤStandard ⡼ɤǤϥ顼ˡϤνǤʤϡΥ˥󥰤̵뤷ƽ³ޤη̤Ϥ̯ʥ顼Ǥ礦OLDPREP ⡼ɤǤ unterminated macro call ʳϥ˥󥰤Фޤ

+
    +
  • End of file within #if (#ifdef) section started at line 123
    +
  • End of file within macro call started at line 123
    +
  • End of file with unterminated #asm block started at line 123
    +123 Ԥ #asm б #endasm ޤ
    +
+ +

5.5.3. ǥ쥯ƥֹԤ˴ؤƼΥ˥

+
    +
  • The macro is redefined
    +³ưΤե̾ȹֹ椬ɽޤ +
    +ޥȤϰäƤǺޤ +Ƥʤ˰㤤ޤƱ̾ΥޥʣƤϡξƤʤȺȤʤꡢΥ˥󥰤Фޤ
    +
      +
    1. ѥ᡼οƱ
      +
    2. ִꥹȤƱʤȡ֤Σİʾ white spaces ϤĤäƤ⣱ĤȤߤʤPOSTSTD Ǥ token separator äƤʤƤ⼫ưŪ a space ѴΤǡtoken separator ΰ㤤ˤʤʤˡ
      +
    3. STD ⡼ɤǤϥѥ᡼̾ƱPOSTSTD ǤϤϥåʤpre-Standard ⡼ɤǤåʤ
      +
    +
    +
  • Unknown argument "name"
    +#pragma MCPP debug, #debug ΰȤ "name" ϼƤޤ
    +
  • No argument
    +#pragma MCPP debug, #debug ΰޤ
    +
  • Not an identifier "123"
    +#pragma MCPP debug, #debug ΰ identifier ǤϤޤ
    +
+

Standard ⡼ɤξǤ

+
    +
  • "and" is defined as macro
    +C++ and ޥȤޤ +
    +C95 Ǥ <iso646.h> ǥޥȤ "and" Σ̾ϡC++ Ǥ operator token ǤC++ ǤϤϥޥȤ뤳ȤǤʤΤǤ operator ȤƼƤʤϤǤȤ褦ˡޥȤ뤳Ȥʤ饦˥󥰤Фޤ
    +
+

STD ⡼ɤξǤ

+
    +
  • No space between macro name "MACRO" and repl-text
    +#define ԤΥޥִ̾ΥꥹȤȤδ֤˥ڡޤ̾ϤꤨʤȤǤ
    +
    #define THIS$AND$THAT(a, b)     ((a) + (b))
    +Ȥդ˥ޥ̾˵ʳʸȤƤȡ
    +
    #define THIS    $AND$THAT(a, b) ((a) + (b))
    +ȲᤵơΥ˥󥰤Фޤ
    +
+

lang-asm ⡼ɤξǤ

+
    +
  • Illegal #directive "+" +
  • Unknown #directive "pseudo-directive"
    + lang-asm ⡼ɤǤʤХ顼ˤʤȤǤlang-asm ⡼ɤ˸¤äƥ˥󥰤ФǤ
    +
+

ʲ #pragma ˴ؤ륦˥󥰤 Standard ⡼ɤξǤ˥󥰤ϽФƤ⤽ιԤϸ§ȤƤΤޤ޽Ϥޤ#pragma MCPP, #pragma GCC ǻϤޤԤΤץץǽ٤ΤϽϤޤ +#pragma GCC visibility * Τ褦˥ѥ󥫤ΤιԤϡ˥󥰤ʤˤΤޤ޽Ϥޤ

+
    +
  • No sub-directive
    +#pragma Ԥ˲ΰ⤢ޤ󡣤ιԤ̵뤵ޤ
    +
  • Unknown encoding "encoding"
    +#pragma __setlocale( "encoding") ǻꤵ줿 "encoding" Ȥ encoding ϼƤޤencoding ̾ˤĤƤ 2.8 򸫤Ƥ
    +
  • Too long encoding name "encoding"
    +#pragma __setlocale( "long-long-encoding") ǻꤵ줿 "long-long-encoding" Ȥ encoding ̾ 19 ХȤĶƤΤǡ̵뤷ޤ
    +
    +
  • Bad push_macro syntax
    +
  • Bad pop_macro syntax
    +#pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro, #pragma pop_macro ιʸְäƤޤ #pragma Ǥϰϥޥ̾ ", " ǰϤߡˤ (, ) ǰϤǡ("MACRO") ȤʤФʤޤVisual C ߴΤξĹʻͤǤˡ
    +
  • "MACRO" has not been defined
    +#pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro, #pragma pop_macro ΰǤ ("MACRO") MACRO Ϥ⤽ޥȤƤޤ
    +
  • "MACRO" is already pushed
    +#pragma MCPP push_macro( "MACRO") MACRO ϤǤ push 졢ˤθ #undef ƤޤMACRO κʤ push Ǥޤ
    +
  • "MACRO" has not been pushed
    +#pragma MCPP pop_macro( "MACRO") MACRO push Ƥޤ󡣤Ǥ pop 줿Τ⤷ޤ
    +
+

GCC ǤǤϼΥ˥󥰤Фޤ

+
    +
  • Ignored #ident
    +
  • Ignored #sccs
    +#ident, #sccs ιԤ̵뤷ޤ +
    +
+

GCC ѤǤ #pragma GCC poison, dependency Τɤ줫³Ԥ class 2 Υ˥󥰤ФǼΤƤޤ GCC V.3 ǤϥץץåΤǤmcpp Ͻޤ

+

pre-Standard ⡼ɤǽФޤStandard ⡼ɤǤϥ顼ˡ

+
    +
  • Not in a #if (#ifdef) section in a source file
    +
  • Line number "0x123" isn't a decimal digits sequence
    +
+

KR ⡼ɤξȡStandard ⡼ɤ #pragma once, #pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro, #pragma pop_macro, #pragma __setlocale, #pragma setlocale, #pragma MCPP put_defines, #pragma MCPP debug, #pragma MCPP end_debug ξ硢 GCC ѤǤ STD ⡼ɤ #endif ԤξФޤStandard ⡼ɤΤ¾ξϥ顼OLDPREP Ǥϥ顼⥦˥󥰤Фʤˡ

+
    +
  • Excessive token sequence "junk"
    +
+ +

5.5.4. #if ˴ؤ륦˥

+

ΣĤ #if, #elif, #assert ΰ˴ؤ륦˥󥰤Ǥ

+
    +
  • Macro "MACRO" is expanded to "defined"
    +#if ǥޥ MACRO ŸȤ defined ˤʤޤ identifier ǤϤʤ黻ҤȤưޤ䤷ʥޥǤStandard C Ǥ undefinedˡ
    +
  • Macro "MACRO" is expanded to "sizeof"
    +#if ǥޥ MACRO ŸȤ sizeof ˤʤޤ identifier ǤϤʤ黻ҤȤưޤ䤷ʥޥǤpre-Standard ξǤ
    +
  • Macro "MACRO" is expanded to 0 token
    +ޥ MACRO ĤΥȡŸޤ#if Ǥ줬ȯȡƤϲ餫Υ顼ˤʤޤΥ˥󥰤ϥ顼θ餫ˤ뤿ΤΤǤ
    +
+

#if, #elif, #assert ΰ˴ؤ륦˥󥰤Ǥɾ򥹥åפʬǤϽФޤ-W8 ץǤϽФˡ

+
    +
  • Undefined escape sequence '\x'
    +\x Ȥ escape sequence Ϥޤñʤ \x ȤХȤ sequence Ȥɾޤ\x ˣʸ³ escape sequence Ϥ󤢤ˡUCN Υ­ʤƱͤǤ
    +
+

#if (#elif, #assert) Ԥα黻ȷ˴ؤ륦˥󥰤ǤϤꥹåפʬ˴ؤƤϽФޤ-W8 ץǤϽФˡ

+

Standard ⡼ɤǤ #if C90, C++98 Ǥ long long / unsigned long long ɾޤC90, C++98 long / unsigned long ϰϤĶϥ˥󥰤ФޤLL Ȥ suffix ˤĤƤƱͤˡC99 ʳǤϥ˥󥰤ФޤΥ˥󥰤 compiler-independent-build Ǥ class 1 ǡcompiler-specific-build Ǥ class 2 Ǥ
+POSTSTD ⡼ɤǤʸ #if ˤϻȤʤΤǡ˥󥰤Фޤʥ顼ˤʤˡ

+
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +ͤ (unsigned) long ɽǤϰϤĶƤޤ
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +ʸ 'abcde' ͤ unsigned long ɽǤϰϤĶƤޤ
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +磻ʸ L'abc' ͤ unsigned long ɽǤϰϤĶƤޤ
    +
  • Result of "op" is out of range of (unsigned) long
    +黻 op ˤ黻η̤ (unsigned) long ϰϳȤʤޤop ϣ黻 *, /, %, +, - Τɤ줫Ǥɽξϡñ - 黻Ҥ -LONG_MIN ǥСեȤʤޤUnsigned long ϥСե뤳ȤʤΤǥ顼ˤϤʤޤ󤬡Ūʱ黻̤ϰϳȤʤϥ˥󥰤Фޤ
    +
  • LL suffix is used in other than C99 mode "123LL"
    +C99 ʳΥ⡼ɤ LL ȤҤȤƤޤ
    +
  • Shift count "40" is larger than bit count of long
    +ӥåȥեȱ黻 <<, >> α operand ͤ long ΥӥåĶƤޤ
    +
    +
  • Negative value "-1" is converted to positive "18446744073709551615"
    +ʤĤȤκ黻η̡ĤʤѴޤϥ顼ǤϤޤ󤬡֤󥽡β餫δְ㤤Ǥ礦黻 *, /, %, +, -, <, >, <=, >=, ==, !=, &, ^, | ξաӣ黻 ? : 裲裳 operand ˤĤƤϡʤξϡ¾ĤǤʤѴޤ
    +
  • Illegal shift count "-1"
    +ӥåȥեȱ黻 <<, >> α operand ͤǤޤ long long ΥӥåĶƤޤ⥽δְ㤤Ǥ礦
    +
  • "op" of negative number isn't portable
    +黻 op η̤ϡoperand ΰޤǤ portability ޤop /, %, >> Τɤ줫Ǥ operand ξ >> 黻Ҥϡѥե̿ CPU νϤδ֤Ǥ portability ϤǤʣӥåȤΥեȤǣdzä̤ˤʤˡǤʤ CPU νϤȤδ֤Ǥ portability ޤ
    +
+ +

5.5.5. ޥŸ˴ؤ륦˥

+

Υ˥󥰤ǤϤΥޥɽ졢ΥޥΤ륽ե̾ȹֹɽޤ

+
    +
  • Macro started at line 123 swallowed directive-like line
    +123 ԤϤޤäޥ # ǻϤޤԤȤɤ߹ߤޤ֤󡢥ޥƤӽФδְ㤤Ǥ礦ޥʤС# ǻϤޤԤ directive line ȤƲᤵϤǤåפ #if group ǤϥޥäƤŸʤΤǡιԤ directive line ȤƲᤵޤ
    +
  • Replacement text "sub(" of macro "head" involved subsequent text
    +ޥ "head" ִꥹ "sub(" κǥޥƤӽФθΥƥȤޤޤ K&R 1st. Standard C ˻ޤǥ顼ǤϤޤ󤬡⤷տޤˤμΥޥȤäƤΥ˥󥰤Фʤ顢ϥޥޤϥޥƤӽФδְ㤤ǤտޤƻȤäΤǤа۾ʥޥǤ
    +Υ˥󥰤 STD ⡼ɤξǤCOMPAT ⡼ɤǤϤΥ˥󥰤 class 8 ǤФޤpre-Standard ⡼ɤǤƱݤϵޤ˥󥰤ϽФޤPOSTSTD ǤϺִꥹȤθΥƥȤϼޤʤΤǡΥ˥󥰤Ϸ褷ƽФޤunterminated macro call Υ顼ˤʤȡޤääŸ̤ˤʤȤˡ
    +
  • Less than necessary N argument(s) in macro call "macro( a)"
    +ޥƤӽФΰ­ޤ̾Ϥϥ顼ǤѰޥǰĤ­ʤäϥ˥󥰤ˤȤɤƤޤGCC βѰޥ C99 ΤȤδ֤ΰܿξ㳲򸺤餹Ǥ
    +
  • Removed ',' preceding the absent variable argument
    +GCC3 ͤβѰޥθƤӽФDzѰ 0 ĤǤ뤿ᡢִꥹȤDzѰľˤ륳ޤޤStandard ⡼ɤ GCC-specific-build ξǤ
    +
  • Old style predefined macro "linux" is used
    +'_' ǻϤޤʤʰȿλޥȤޤ +Standard ⡼ɤ GCC-specific-build ξǤ
    +
+

ΣĤ OLDPREP ⡼ɤǤ¾Υ⡼ɤǤϥ顼ˡ

+
    +
  • Less than necessary N argument(s) in macro call "macro( a)"
    +
  • More than necessary N argument(s) in macro call "macro( a, b, c)"
    +
+ +

5.5.6. ֹ˴ؤ륦˥

+

Ϲֹ˴ؤ륦˥󥰤Ǥ

+
    +
  • Line number "32768" is out of range of [1,32767]
    +C90, C++ Ǥ #line [1,32767] ϰϤˤʤФʤޤ0 ⥨顼Ǥ__STDC_VERSION__ >= 199901L ޤ __cplusplus >= 199901L ξϤΰͭϰϤ [1,2147483647] ǤäơC90, C++ Ǥ [32768,2147483647] ϰϤϥ顼ǤϤʤ˥󥰤ˤȤɤƤޤ
    +Standard ⡼ɤξǤ
    +
+

C90 Ǥ #line 32767 Ͼ˶ᤤֹꤷ硢λǤϥ顼ˤʤʤΤΡ줳ϰϤ򥪡СޤС硢mcpp Ǥ warning Фǹֹ򤽤Τޤ䤷³ƤޤѥΤˤäƤϤʤ⤷ޤ#line λ꤬ߤ礭ȤǤ

+
    +
  • Line number 32768 got beyond range
    +ιֹ椬 32768 ãޤλǣ warning Фޤ
    +
  • Line number 32769 is out of range
    __LINE__ ŸȤ32767 Ķޤ
    +
+ +

5.5.7. #pragma MCPP warning (#warning)

+
    +
  • #warning
    +
  • #pragma MCPP warning
    +#pragma MCPP warning (#warning) ǥ쥯ƥ֤¹ԤޤιԤɽޤʰΤΤ˥ȡ󥨥顼Unterminated string ˤä #pragma MCPP warning ϼ¹ԤʤˡΥǥ쥯ƥ֤ص warning level 1 ΤȤ˷ǺܤƤޤºݤˤ warning level ˴طʤɬɽޤ
    +#pragma MCPP warning Standard ⡼ɤξǡpre-Standard ⡼ɤǤ #warning Ǥ
    +
+ +

5.6. Warning (class 2)

+

ְ㤤ǤϤʤ portability Τ륱ˤĤƤΥ˥󥰤Ǥ

+
    +
  • Converted [CR+LF] to [LF]
    +ԥɤ [CR+LF] [LF] ѴޤΥ˥󥰤 compiler-independent-build Ǥϥ饹ǡcompiler-specific-build Ǥϥ饹Ǥ
    +
+

#if Standard ⡼ɤǤ C90, C++98 Ǥ long long / unsigned long long ɾޤC90, C++98 long / unsigned long ϰϤĶϥ˥󥰤ФޤLL Ȥ suffix ˤĤƤƱͤˡC99 ʳǤϥ˥󥰤ФޤVisual C, Borland C compiler-specific-build Ǥ I64 Ȥ suffix ȤޤˤĤƤƱͤǤΥ˥󥰤 compiler-independent-build Ǥ class 1 ǡcompiler-specific-build Ǥ class 2 Ǥ

+
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +
  • Result of "op" is out of range of (unsigned) long
    +
  • LL suffix is used in other than C99 mode "123LL"
    +
  • I64 suffix is used in other than C99 mode "123i64"
    +
  • Shift count "40" is larger than bit count of long
    +
+

ΣĤ Standard ⡼ɤξǤ

+
    +
  • Parsed "//" as comment
    +// ޤǤ򥳥ȤȤƲᤷޤC99 C++ ǤϹˡǤC90 Ǥ⥦˥󥰤ФǥȤȤưޤ
    +
  • Variable argument macro is defined
    +Ѱޥ C99 λͤǤC90, C++ DzѰޥޤ
    +
  • Empty argument in macro call "MACRO( a, ,"
    +ޥƤӽФ˥ΰޤmcpp ǤϤΰϣĤ pp-token sequence ǤȤߤʤ reasonable ʽ򤷤ޤ C99 ǤϹˡǤΤ C90 Ǥ undefined Ǥꡢportability ޤ',' ʤΤϥǤϤʤʤȤߤʤ顼Ȥ롣ĤΰȣĤΥȤϹʸ塢̤ĤʤɤǤäƤ⥨顼ˤϤʤˡ˥񤯤Τϰ̤ˤɤǤϤޤ󡣲ǽʾϡ
    +
    +#define EMPTY
    +
    +Ȥơ EMPTY 򥫥ʬ˽񤯤ΤɤǤ礦
    +
  • Skipped the #pragma line
    +GCC V.3 Ǥ #pragma GCC <args> Ȥ pragma ꡢˤϥץץåΤ⤢ޤmcpp #pragma GCC poison dependency ϥݡȤƤޤ
    +°ΥץץåϽ뤬 mcpp Ͻʤ#pragma ˤĤƤϡΥ˥󥰤Фޤ
    +
  • Not a valid preprocessing token "+12"
    +## 黻ҤˤäƣĤ pp-token Ϣ뤷Ȥ"+12" Ȥ invalid ʤΤˤʤޤ̾ϥ顼Ǥ-lang-asm (-x assembler-with-cpp, -a) ץǵư줿ϥ顼ˤϤʤޤ
    +
+

POSTSTD ⡼ɤξǤ

+
    +
  • Header-name enclosed by <, > is an obsolescent feature <stdio.h>
    +<stdio.h> Ȥ header name ѻߤͤǤ"stdio.h" ȤäƤ
    +
+

ΣĤΥ˥󥰤ΥƥΤΤǤΥƥǤץǤportability ʤΤǡǰΤ˥˥󥰤Фޤ

+
    +
  • #include_next is not allowed by Standard
    +
  • #warning is not allowed by Standard
    +Υǥ쥯ƥ֤ GCC ǤͭǤʳΤΤǤꡢportability ޤ
    +
  • GCC2-spec variadic macro is defined
    +GCC2 ͤβѰޥޤ +GCC-specific-build ǤϻȤޤΥޥˤ portability ޤ
    +
    +
  • Converted \ to /
    +#include directive header name \ ޤޤƤΤǡ / Ѵƽޤ Windows ΣϣӤǤ path-delimiter ǤǤ undefined Ǥ/ Ȥäְۤ㤤ޤ󡣤Υ˥󥰤ϣ󤷤ФޤWindows ư mcpp ΤΤǤʤ\ " ľˤϤ " ʸƥ delimiter ȤϲᤷʤΤǡunterminated string literal Υ顼Ȥʤˡ
    +
  • '$' in identifier "THIS$AND$THAT"
    +Identifier '$' ޤޤƤޤΥ˥󥰤ϣ󤷤ФޤDOLLAR_IN_NAME TRUE ˤƥѥ뤵줿 mcpp ǤФޤΥƥǤ '$' identifier ͭʸǤportability Ϥޤ¾ΥƥǤ '$' ϣʸ pp-token ȤʤΤǡTHIS$AND$THAT THIS $ AND $ THAT ΣĤ pp-token ʬ򤵤ޤʤη̡compile phase ǥ顼ˤʤϤǤˡ
    +
+
+ +

5.7. Warning (class 4)

+

Standard C ǤϤĤ translation limits ˤĤơݾڤ٤ͤꤷƤޤץץåϤͤĶ translation limits äƤۤͤɤȤޤ˰¸륽 portability ¤ޤmcpp ǤϤ translation limits system.H Υޥ뤳ȤǤդǤ褦ˤʤäƤޤStandard ⡼ɤǤϤͤ Standard C κǾͤĶƤϡΤȤѤ륽ФƤϥ˥󥰤ФޤϤɸإå䥽ˤäƤȯ̤ˤʤΤǡclass 1, 2 鳰Ƥޤ

+
    +
  • Logical source line longer than 509 bytes
    +ԤĹ 509 ХȤĶƤޤ
    +
  • Quotation longer than 509 bytes "very_very_long_string"
    +ʸƥ롢ʸheader name Ĺ 509 ХȤĶƤޤ
    +
  • More than 8 nesting of #include
    +#include ΥͥȤ٥Ķޤ٥ˤʤäΥ˥󥰤Фޤ
    +
  • More than 8 nesting of #if (#ifdef) sections
    +#if, #ifdef, #ifndef ΥͥȤ٥Ķޤ٥ˤʤäΥ˥󥰤Фޤ
    +
  • More than 1024 macros defined
    +Ƥޥ 1025 Ĥãޤοˤ pre-defined ޥ header-file 줿ޥޤޤƤޤ
    +
  • String literal longer than 509 bytes "very_very_long_string"
    +# 黻ҤȤä줿ޥŸˤäơ509 ХȤĶĹʸƥ뤬ޤ
    +
+

Υ˥󥰤ϥåפ #if group ǤϽФޤ

+
    +
  • More than 32 nesting of parens in #if expression
    +#if ΥåΥͥȤ٥Ķޤ٥ˤʤäФޤ
    +
  • More than 31 parameters
    +ޥΥѥ᡼οĶޤ
    +
  • Identifier longer than 31 bytes "very_very_long_name"
    +Identifier ĹХȤĶƤޤ
    +
+

__STDC_VERSION__ >= 199901L ξϤ translation limits ϼ̤ǤIdentifier ĹǤϡUCN multi-byte-character Ϥ줾죱ʸȿޤʥΥХȿǤϤʤ̯ʵǤˡ

+
+ + + + + + + + + +
ԤĹ 4095 Х
ʸƥ롢ʸheader name Ĺ4095 Х
Identifier Ĺ 63 ʸ
#include Υͥ 15 ٥
#if, #ifdef, #ifndef Υͥ 63 ٥
#if ΥåΥͥ 63 ٥
ޥΥѥ᡼ο 127
Ǥޥο 4095
+
+

-+ ץ C++ ΥץץꤷϡΤ褦 translation limits ȤޤޥΥѥ᡼κ mcpp Ǥ 255 ޤǤǤʤΤǡ256 ĤǤϥ顼Ȥʤޤ

+
+ + + + + + + + + +
ԤĹ 65536 Х
ʸƥ롢ʸheader name Ĺ65536 Х
Identifier Ĺ 1024 ʸ
#include Υͥ 256 ٥
#if, #ifdef, #ifndef Υͥ 256 ٥
#if ΥåΥͥ 256 ٥
ޥΥѥ᡼ο 256
Ǥޥο 65536
+
+

Υ˥󥰤ºݤˤϤ뤵Τǡclass 1, 2 鳰Ƥޤ

+
    +
  • Converted 0x0c to a space
    + token separator ȤƤ [FF], [VT], [CR] [CR][LF] ǤϤʤñȤ [CR]ˤΥɤ space Ѵޤ줬 directive Ԥˤ Standard C Ǥ undefined Ǥȡʸƥ롢ʸΥɤѴޤѴƤ褤ΤǤ뤬ʸåȤϽϰ¸ʤΤǡmcpp ǤϤޤݤʤɬפʥåϥѥΤǹԤǤˡ¾ǡtoken separator ȤƤ [TAB] a space Ѵޤϥѥ̤˲αƶͿʤΤǡʥץץåˤȤäƤ⥳ѥΤˤȤäƤ [TAB] space Ʊ̣ʤˡ˥󥰤ϽФޤ[FF] ϼºݤΥ˻ΤǤֲڡפտޤƤΤǤ礦ʤǤ
    +
  • Undefined symbol "name", evaluated to 0
    +#if Ԥ identifier "name" ϥޥȤͤƤޤ0 ɾޤϷ褷ƥ顼ǤϤޤ󤬡ץδְ㤤Ǥǽޤ#if defined ΰˤϤΥ˥󥰤ϽФޤ#if name .. ȤȤ #if defined name && (name ..) Ȥ뤫ޤ mcpp ư -D name=0 Ȥץդ뤳ȤǡΥ˥󥰤򤱤뤳ȤǤޤC++ Ǥ true, false Ȥȡ̰ǡ˥󥰤ʤˤ줾 1, 0 ɾޤ
    +
  • Multi-character wide character constant L'ab' isn't portable
    +磻ʸͤϡƱʸåȤνϴ֤Ǥ磻ʸ encoding ϰ¸Ǥꡢξ塢Multi-character ɾλϰ¸ʤΤǡȤä #if ϰܿޤSTD ⡼ɤǤФޤPOSTSTD Ǥ #if ʸǧʤΤǥ顼ˤʤޤΤΤƱͤǤ
    +
  • Multi-character or multi-byte character constant '' isn't portable
    +Multi-character character constant multi-byte character character constant ͤɾλϽϰ¸ʤΤǡȤä #if ϰܿޤSTD ⡼ɤǽФޤ
    +
+

ΣĤ Standard ⡼ɤξФޤ

+
    +
  • Macro with mixing of ## and # operators isn't portable
    +ؿͥޥִꥹ ## # Ȥȡ¤ӤޤΣĤα黻Ҥ̤ͥ Standard C Ǥ unspecified ʤΤǡܿޤmcpp Ǥ # ŬѤޤʤؿͥޥǵո # ## Ȥȡ¤Ӥȥ顼ˤʤޤ# 黻ҤΥڥɤϥѥ᡼ǤʤФʤʤǤ
    +
  • Macro with multiple ## operators isn't portable
    +ޥִꥹʣ ## 黻Ҥ֤ˣĤΥȡޤϥѥ᡼ϤǤޤ## 黻Ҥɾ Standard C Ǥ unspecified ʤΤǡΥޥϰܿΤʤ礬ޤmcpp Ǥ ## 黻ҤϺ鱦ؽŬѤƤޤ
    +
+

STD ⡼ɤ -k ޤ -K ץꤷȤΤΤǤ

+
    +
  • Too long comment, discarded up to here
    +ȤüĹΤǡޤǤʬ䰦ޤ +ԤޤȤ 256 ԰ʾˤʤȡޤǤΤƤơԤ򣱹ܤȤƥȤޤ +ĹʥɥȤ򥽡˴ޤΤϡɤǤϤޤ
    +
+
+ +

5.8. Warning (class 8)

+

δְ㤤ǤǽϾʤǰΤդ¥̣ǡΥåФޤåΤ -W8 Υץǵư줿Ǥ

+

åפ #if group preprocessing directive ̾ #if, #ifdef, #ifndef, #elif, #else, #endif бطåޤ󤬡-W8 Ǥ Illegal directive, Unknown directive Υå⤷ޤޤStandard ⡼ɤǤ #if ΥͥȤ٥Ķ⥦˥󥰤Фޤ

+
    +
  • Illegal #directive "+" (in skipped block)
    +
  • Unknown #directive "pseudo-directive" (in skipped block)
    +
  • Ignored #ident (in skipped block)
    +
  • Ignored #sccs (in skipped block)
    +
  • More than 8 nesting of #if (#ifdef) sections (in skipped block)
    +
  • #include_next is not allowed by Standard (in skipped block)
    +
  • #warning is not allowed by Standard (in skipped block)
    +
+

#if ˴ؤ륦˥󥰤Ǥ㤨 #if a || b ȤǤϡa Ǥ b ɾϹԤޤ󡣤-W8 ȤƵưȡɾʤʬ˴ؤƤ⤳Υ˥󥰤ФޤξϤ (in non-evaluated sub-expression) Ȥ񤭤դޤ

+
    +
  • Constant "123456789012345678901" is out of range
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +
  • LL suffix is used in other than C99 mode "123LL"
    +
  • I64 suffix is used in other than C99 mode "123i64"
    +
  • Shift count "40" is larger than bit count of long
    +
  • Integer character constant 'abcdefghi' is out of range
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +
  • Wide character constant L'abcdef' is out of range
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +
  • 8 bits can't represent escape sequence 'x123'
    +
  • 16 bits can't represent escape sequence L'x12345'
    +
  • Division by zero
    +
  • Undefined symbol "name", evaluated to 0
    +
  • sizeof: Unknown type "type"
    +
  • sizeof: Illegal type combination with "type"
    +
  • Multi-character wide character constant L'ab' isn't portable
    +
  • Multi-character or multi-byte character constant '' isn't portable
    +
  • Undefined escape sequence '\x'
    +
  • UCN cannot specify the value "0000007f"
    +
  • Negative value "-1" is converted to positive "18446744073709551615"
    +
  • Result of "op" is out of range
    +
  • Result of "op" is out of range of (unsigned) long
    +
  • Illegal shift count "-1"
    +
  • "op" of negative number isn't portable
    +
    +
  • sizeof is disallowed in C Standard
    +#if sizeof Τ pre-Standard ⡼ɤǤξǤ⤳ Standard C ǤϻȤޤȤ򤷤ޤ
    +
  • "MACRO" wasn't defined
    +#undef Ƥʤ̾ꤷƤޤϾʤȤ Standard C Ǥϥ顼ǤϤޤ
    +
  • Macro "macro" needs arguments
    +դޥȤƤΤƱ̾ñȤǸƤޤŸΤޤ޻Ĥޤpre-Standard ⡼ɤξФޤStandard ⡼ɤǤϲʤΤǡ˥󥰤ϽФʤˡ
    +
  • Replacement text "sub(" of macro "head" involved subsequent text
    +ޥ "head" ִꥹ "sub(" κǥޥƤӽФθΥƥȤޤޤΥ˥󥰤 STD ⡼ɤǤ class 1 ǤCOMPAT ⡼ɤǤ class 8 Ǥ
    +
+
+ +

5.9. Warning (class 16)

+

Trigraph digraph ϻȤɬפΤʤĶǤϤޤäȤʤΤǤδĶǤ⤷餬ФСդפǤ礦-W16 ץϤ򸡽ФΤǤ¾ǡtrigraph 뤤 digraph ѤƤ륽ǤϤΥ˥󥰤ȯ뤳ȤˤʤäƤ뤵Ǥ礦顢¾Υ˥󥰤Ȥ̤Υ饹ˤƤޤɤˤƤ⡢ trigraph 뤤 digraph ͭʾ֤ǤФޤDigraph Standard ⡼ɤξǡtrigraph STD ⡼ɤǤ

+
    +
  • 2 trigraph(s) converted
    +ʪΣĤ trigraph sequence Ѵޤ trigraph ΤĤǽ񤤤ΤǤ礦
    +
  • 2 digraph(s) converted
    +ιΣĤ digraph sequence Ѵޤ digraph ΤĤǽ񤤤ΤǤ礦
    +STD ⡼ɤǤ digraph ΤǤʤϤǤϡץץäƤ digraph 򼡤Τ褦̾ token ѴƽϤޤ
    +
    +<%  ->  {           <:  ->  [           %:      ->  #
    +%>  ->  }           :>  ->  [           %:%:    ->  ##
    +
    +POSTSTD ⡼ɤǤ translation phase 1 ̾ pp-token ѴƤޤޤΰ㤤ϡdigraph # 黻Ҥˤʸ󲽤оݤˤʤä˸ޤǥեȤǤ digraph sequence Τޤʸ󲽤ޤPOSTSTD Ǥ̾ pp-token Ѵ줿Τʸ󲽤ޤޤʸƥ digraph sequence character sequence ä硢ǥեȤǤϤΤޤޤǤPOSTSTD ǤϤб pp-token character sequence Ѵޤ
    +STD ⡼ɤǤϤΥ˥󥰤 digraph ΡѴפоݤȤƤΤǡpreprocessing-directive Ԥ˸ƾäƤޤ digraph ϥȤޤ
    +
+
+ +

5.10. ǥå

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ǥåFatal
error
ErrorWarning class
124816
"..." isn't the last parameter5.4.7
"/*" in comment5.5.1
"and" is defined as macro5.5.3
"defined" shouldn't be defined5.4.7
"MACRO" has not been defined5.5.3
"MACRO" has not been pushed5.5.3
"MACRO" is already pushed5.5.3
"MACRO" wasn't defined5.8
"op" of negative number isn't portable5.5.45.8
"__STDC__" shouldn't be redefined5.4.7
"__STDC__" shouldn't be undefined5.4.8
"__VA_ARGS__" without corresponding "..."5.4.7
"__VA_ARGS__" cannot be used in GCC2-spec variadic macro5.4.7
## after ##5.4.7
#error5.4.10
#include_next is not allowed by Standard5.65.8
#warning5.5.7
'$' in identifier "THIS$AND$THAT"5.6
16 bits can't represent escape sequence L'\x12345'5.4.65.8
2 digraph(s) converted5.9
2 trigraph(s) converted5.9
8 bits can't represent escape sequence '\x123'5.4.65.8
_Pragma operator found in directive line5.4.12
Already seen #else at line 1235.4.3
Bad defined syntax5.4.5
Bad pop_macro syntax5.5.3
Bad push_macro syntax5.5.3
Buffer overflow expanding macro "macro" at "something"5.4.9
Buffer overflow scanning token "token"5.3.3
Bug:5.3.1
Can't open include file "file-name"5.4.11
Can't use a character constant 'a'5.4.5
Can't use a string literal "string"5.4.5
Can't use the character 0x245.4.5
Can't use the operator "++"5.4.5
Constant "123456789012" is out of range of (unsigned) long5.5.45.65.8
Constant "1234567890123456789012" is out of range5.4.65.8
Converted 0x0c to a space5.7
Converted [CR+LF] to [LF]5.5.15.6
Converted \ to /5.6
Division by zero5.4.65.8
Duplicate parameter names "a"5.4.7
Empty argument in macro call "MACRO( a, ,"5.6
Empty character constant ''5.4.15.5.1
Empty parameter5.4.7
End of file with no newline, supplemented the newline5.5.2
End of file with unterminated #asm block started at line 1235.4.25.5.2
End of file with unterminated comment, terminated the comment5.5.2
End of file with \, deleted the \5.5.2
End of file within #if (#ifdef) section started at line 1235.4.25.5.2
End of file within macro call started at line 1235.4.25.5.2
Excessive ")"5.4.5
Excessive token sequence "junk"5.4.45.5.3
File read error5.3.2
File write error5.3.2
Header-name enclosed by <, > is an obsolescent feature 5.6
GCC2-spec variadic macro is defined5.6
I64 suffix is used in other than C99 mode "123i64"5.65.8
Identifier longer than 31 bytes "very_very_long_name"5.7
Ignored #ident5.5.35.8
Ignored #sccs5.5.35.8
Illegal #directive "123"5.4.45.5.35.8
Illegal control character 0x1b in quotation5.5.1
Illegal control character 0x1b, skipped the character5.4.1
Illegal digit in octal number "089"5.5.1
Illegal multi-byte character sequence "XY" in quotation5.5.1
Illegal multi-byte character sequence "XY"5.4.1
Illegal parameter "123"5.4.7
Illegal shift count "-1"5.5.45.8
Illegal UCN sequence5.4.1
In #asm block started at line 1235.4.3
Integer character constant 'abcde' is out of range of unsigned long5.5.45.65.8
Integer character constant 'abcdefghi' is out of range5.4.65.8
Less than necessary N argument(s) in macro call "macro( a)"5.4.95.5.5
Line number "0x123" isn't a decimal digits sequence5.4.45.5.6
Line number "2147483648" is out of range of 1,21474836475.4.4
Line number "32768" got beyond range5.5.6
Line number "32768" is out of range of 1,327675.5.6
Line number "32769" is out of range5.5.6
LL suffix is used in other than C99 mode "123LL"5.5.45.65.8
Logical source line longer than 509 bytes5.7
Macro "MACRO" is expanded to "defined"5.5.4
Macro "MACRO" is expanded to "sizeof"5.5.4
Macro "MACRO" is expanded to 0 token5.5.4
Macro "macro" needs arguments5.8
Macro started at line 123 swallowed directive-like line5.5.5
Macro with mixing of ## and # operators isn't portable5.7
Macro with multiple ## operators isn't portable5.7
Misplaced ":", previous operator is "+"5.4.5
Misplaced constant "12"5.4.5
Missing ")"5.4.5
Missing "," or ")" in parameter list "(a,b"5.4.7
More than 1024 macros defined5.7
More than 31 parameters5.7
More than 32 nesting of parens in #if expression5.7
More than 8 nesting of #if (#ifdef) sections5.75.8
More than 8 nesting of #include5.7
More than BLK_NEST nesting of #if (#ifdef) sections5.3.3
More than INCLUDE_NEST nesting of #include5.3.3
More than necessary N argument(s) in macro call "macro( a, b, c)5.4.9
More than NEXP*2-1 constants stacked at "12"5.4.5
More than NEXP*3-1 operators and parens stacked at "+"5.4.5
More than NMACPARS parameters5.4.7
Multi-character or multi-byte character constant '' isn't portable5.75.8
Multi-character wide character constant L'ab' isn't portable5.75.8
Negative value "-1" is converted to positive "18446744073709551615"5.5.45.8
No argument5.4.45.5.3
No header name5.4.4
No identifier5.4.4
No line number5.4.4
No space between macro name "MACRO" and repl-text5.5.3
No sub-directive5.5.3
No token after ##5.4.7
No token before ##5.4.7
Not a file name "name"5.4.4
Not a formal parameter "id"5.4.7
Not a header name "UNDEFINED_MACRO"5.4.4
Not a line number "name"5.4.4
Not a valid preprocessing token "+12"5.4.95.6
Not a valid string literal5.4.9
Not an identifier "123"5.4.45.5.3
Not an integer "1.23"5.4.5
Not in a #if (#ifdef) section5.4.3
Not in a #if (#ifdef) section in a source file5.4.35.5.3
Old style predefined macro "linux" is used5.5.5
Operand of _Pragma() is not a string literal5.4.12
Operator ">" in incorrect context5.4.5
Out of memory (required size is 0x1234 bytes)5.3.2
Parsed "//" as comment5.6
Preprocessing assertion failed5.4.10
Quotation longer than 509 bytes "very_very_long_string"5.7
Recursive macro definition of "macro" to "macro"5.4.9
Removed ',' preceding the absent variable argument5.5.5
Replacement text "sub(" of macro "head" involved subsequent text5.5.55.8
Rescanning macro "macro" more than RESCAN_LIMIT times at "something"5.4.9
Result of "op" is out of range5.4.65.8
Result of "op" is out of range of (unsigned) long5.5.45.65.8
Shift count "40" is larger than bit count of long5.5.45.65.8
sizeof is disallowed in C Standard5.8
sizeof: Illegal type combination with "type"5.4.65.8
sizeof: No type specified5.4.5
sizeof: Syntax error5.4.5
sizeof: Unknown type "type"5.4.65.8
Skipped the #pragma line5.6
String literal longer than 509 bytes "very_very_long_string"5.7
The macro is redefined5.5.4
This is not a preprocessed source5.3.4
This preprocessed file is corrupted5.3.4
Too long comment, discarded up to here5.7
Too long header name "long-file-name"5.3.3
Too long identifier, truncated to "very_long_identifier"5.5.1
Too long line spliced by comments5.3.3
Too long logical line5.3.3
Too long number token "12345678901234"5.3.3
Too long pp-number token "1234toolong"5.3.3
Too long quotation "long-string"5.3.3
Too long source line5.3.3
Too long token5.3.3
Too many magics nested in macro argument5.4.9
Too many nested macros in tracing MACRO5.4.9
UCN cannot specify the value "0000007f"5.4.15.8
Undefined escape sequence '\x'5.5.45.8
Undefined symbol "name", evaluated to 05.75.8
Unknown #directive "pseudo-directive"5.4.45.5.45.8
Unknown argument "name"5.5.3
Unterminated character constant 't understand.5.4.1
Unterminated expression5.4.5
Unterminated header name 5.4.1
Unterminated macro call "macro( a, (b,c)"5.4.9
Unterminated string literal5.4.1
Unterminated string literal, catenated to the next line5.5.1
Variable argument macro is defined5.6
Wide character constant L'abc' is out of range of unsigned long5.5.45.65.8
Wide character constant L'abc' is out of range5.4.65.8

+
+ +

6. Х

+ +

ץץ Standard C Ŭ٤򸡾ڤ뤿 Validation Suite mcpp ΥȤȤ˸ƤޤStandard C ΥץץΤ٤Ƥε򸡾ڤǤΤˤĤǤmcpp ϤȤäƥåƤޤ¿νϤǥѥ뤷ƥåƤޤäơХͤϤۤȤɤʤĤǤޤĤĤäƤ붲Ͻʬޤ

+

⤷ԲIJưȯ줿顢Ҥ𤯤
+⤷ +"Bug: ..." ȤǥåФ顢ϴְ㤤ʤ mcpp ޤϽϤΡʤ֤ mcpp Ρ˥ХǤޤȤ㤯ʡ֥פǤ⡢򿩤碌뤳Ȥ mcpp ˽ʤ顢ХǤ

+ +

ХˤϼΤ褦ʥǡդƤ褦ꤤޤ

+
    +
  1. mcpp ܿϡ
    +
  2. ХȻפΤƸǤʤ٤ûץ륽 +
    +
  3. ν̡ +
    +
+ +

ХΤۤˤ⡢mcpp λȤꡢǥåΥɥȤνʤɤˤĤƤո򤪴󤻤
+ոȾ

+

http://mcpp.sourceforge.net/

+

"Open Discussion Forum" ޤϥ᡼Ǥꤤޤ +

+ + + diff --git a/libraries/mcpp/doc-jp/mcpp-porting.html b/libraries/mcpp/doc-jp/mcpp-porting.html new file mode 100644 index 000000000..0cb9839bf --- /dev/null +++ b/libraries/mcpp/doc-jp/mcpp-porting.html @@ -0,0 +1,1213 @@ + + + + + + + + +
+

MCPP-PORTING

+

== How to Port MCPP ==

+
+
+

for V.2.7.2 (2008/11)
+ (kmatsui@t3.rim.or.jp)

+
+
+

== ܼ ==

+
+ +

1. +
1.1. ϣӤϤФʤ portable ʥ +
1.2. Τ Standard C ⡼ɤ˲äƤ¾γƼ⡼ɤ +
1.3. ΥɥȤɽˡ +
+
+
2. +
+
+
3. ƽϤ˰ܿˡ +
3.1. ܿߤν: compiler-specific-build Υѥ +
3.1.1. ɤνϤǤɬפ +
3.1.2. FreeBSD / GCC V.2.*, V.3.*, V.4.* +
3.1.3. Linux / GCC V.2.*, V.3.*, V.4.* +
3.1.4. Mac OS X / Apple-GCC V.4.* +
3.1.5. CygWIN / GCC V.2.*, V.3.* +
3.1.6. MinGW / GCC V.3.* +
3.1.7. LCC-WIN32 2003-08, 2006-03 +
3.1.8. Visual C++ V.6.0, 2002, 2003, 2005, 2008 +
3.1.9. Borland C V.5.*
+
3.2. DECUS cpp бƤ +
3.3. noconfig.H, configed.H, system.H +
3.4. system.c +
3.5. 饤֥ؿ +
3.6. ɸإå +
3.7. makefile mcpp Ȥäꥳѥ +
3.8. mcpp 򥳥ѥǤ +
3.9. ѥ뤹ϤȥåȤν +
3.10. MS-DOS νϡDJGPP +
3.11. Compiler-independent-build Υѥ +
3.12. Subroutine-build Υѥ +
3.12.1. configure +
3.12.2. noconfig/*.mak Ȥ +
3.12.3. static library shared library DLL
+
+
4. ƽϤ˰ܿˡܺ +
4.1. noconfig.H, configed.H, system.H +
4.1.1. PART 1 åȥƥ: compiler-specific-build +
4.1.1.1. ޥ +
4.1.1.2. Include ǥ쥯ȥ +
4.1.1.3. ֹνϷ¾ +
4.1.1.4. Ϥθͤ˱ +
4.1.1.5. Multi-byte character +
4.1.1.6. åȤȥۥȤ˶̤
+
4.1.2. PART 2 ۥȥƥ +
4.1.3. PART 3 mcpp ưͤ +
4.1.3.1. Ƽư⡼ +
4.1.3.2. ư⡼ɤκλ +
4.1.3.3. Translation limits λ
+
4.2. system.c +
4.extra. malloc() +
+
+
5. ХȰܿ +
5.1. Хɤ +
5.2. malloc() ϢΥХå +
5.3. Х +
5.4. ܿ +
5.5. GCC ʳνϤǤ configure ξ +
5.6. ǡäƤаܿƤߤޤ +
5.7. ڥåȤˤ¾νϤΥƥ +
5.8. Τո +
+
+
6. mcpp ĹƻΤ +
6.1. ۣǯ +
6.2. V.2.3 +
6.3. ̤Ƨեȥ¤ȡפ˺ +
+
+ +

1.

+

mcpp Martin Minow DECUS cpp 򸵤 kmatsuiʾ ˤŪ˽ľåץץåǤmcpp Ȥ̾ Matsui cpp Ȥ̣Ǥϥ󶡤ΤǡƽϤǻȤˤϡνϤ˹碌ƥ˼㴳ѹäǥѥ뤷ơmcpp μ¹ԥץɬפޤ*1

+

ΥɥȤϥƽϤ˰ܿˡƤޤǤä¹ԥץưͤˤĤƤϡmcpp-manual.html Ȥޥ˥奢򻲾ȤƤ
+ΥɥȤϤ٤ƥץ󥽡եȥȤ󶡤ޤ
+mcpp ϼΤ褦ħäƤޤ

+

:

+

*1 mcpp V.2.6.3 ϥѥ뤺ߤβफΥХʥꡦѥå⼡ΥȤ󶡤褦ˤΥɥȤǤϤˤϿʤХʥꡦѥåˤĤƤϤ web page 򻲾ȤΤȡ

+
+

http://mcpp.sourceforge.net/

+
+
+ +

1.1. ϣӤϤФʤ portable ʥ

+

Linux, FreeBSD, Windows ¿ΣϣӤ򥵥ݡȤƤ portable ʥץץåǤꡢΥ Standard C (ANSI/ISO/JIS C) νϤǤХѥǤ빭 portability äƤޤ饤֥ؿϸŵŪʤΤȤäƤޤ
+ƽϤ˰ܿ뤿ˤϡ¿ξ硢إåեΤĤΥޥؤƥѥ뤹ǤߤޤǰξǤ⥽ե˿Խ­٤Ǥ

+

Multi-byte characterʴˤνܤ EUC-JP, shift-JIS, ISO2022-JP GB-2312Ѥ Big-5ڹ KSC-5601 (KSX 1001) бƤꡢUTF-8 ȤޤShift-JIS, ISO2022-JP, Big-5 ξ硢ѥΤǧʤϤǤϡmcpp 䤤ޤ

+
+ +

1.2. Τ Standard C ⡼ɤ˲äƤ¾γƼ⡼ɤ

+

Standard C ư⡼ɤΤۤˡK&R 1st. Υ⡼ɤ "Reiser" model cpp Υ⡼ɤ⤢ꡢˤϼ post-Standard ͤΥ⡼ɤޤǤޤC++ ΥץץåȤư¹Իץ⤢ޤ
+Standard C ⡼ɤϴ¸¿ΥץץåȰäơʤ˼ƤĤǤC90, C95, C99, C++98 Τ٤ƤбƤޤStandard C ץץ reference model ȤʤΤܻؤƺäƤޤεʤΥСϼ¹Իץǻꤹ뤳ȤǤޤ*1

+

ۤˤĤͭѤʳĥǽäƤޤޥŸ #if ɾȥ졼 #pragma MCPP debug ⤢ޤإåե "pre-preprocess" ƤȤǤޤ
+ĤͭѤʼ¹ԻץƤޤ˥󥰤Υ٥ꤹ륪ץ䡢include directory ꤹ륪ץǤ
+ˤɤʴְ㤤äƤ mcpp ˽긫ʥåФꤻΤǤ狼䤹ǥåФŬڤʽ򤷤ޤܿȤʤˤĤƤٹȯޤ
+ʼǤʤ顢ɥŪŪʤƤߤޤ
+ܺ٤ʥɥȤ°Ƥޤ

+

mcpp η򶯤Ƶ󤲤С®٤٤ȤǤGCC 3.*, 4.* / cc1 ٤ȣܤ飳ܤλ֤ޤBorland C 5.5 / cpp Ʊ餤®٤ǡإåե pre-preprocess εǽȤȤ⤦®ʤΤǡä٤ۤǤϤޤΤǤ뤳ȡportable ʥǤ뤳ȡʤǤư뤳Τˤϡ٤ν֤Ϥ򤨤ʤȹͤƤޤ

+

ʤץץå Standard C ٤ƥȤ뤿θڥåȤǤ "Validation Suite for Standard C Preprocessing"β⤪ӤȤäƥƥȤƼץץåκ cpp-test.html mcpp ȤȤ˸Ƥޤ򸫤ȡStandard C פȾΤ¸Υץץåˤ¿꤬뤫狼ޤ*2

+

:

+

*1 øεʤȤƤ ISO/IEC 9899:1990 (JIS X 3010-1993) ĹȤƤ1999 ǯˤ ISO/IEC 9899:1999 򤵤줿ǤԤ C90Ԥ C99 ȸƤ֡Ԥ ANSI X3.159-1989 ܹԤΤʤΤǡ̤ˤ ANSI C ޤ C89 ȸƤФ뤳Ȥ⤢롣ޤISO/IEC 9899:1990 + Amendment 1995 C95 ȸƤ֤Ȥ롣C++ εʤ ISO/IEC 14882:1998 ӤǤǤ ISO/IEC 14882:2003 ǡξԤ򤳤Ǥ C++98 ȸƤ֡

+

*2 cpp V.2.2 ޤǤñ cpp ȸƤǤ̤ cpp ʶ路ΤǡV.2.3 mcpp ȸƤ֤ȤˤΥɥȤǤ V.2.2 ޤǤΥС mcpp ȸƤ֡ޤΥɥȤ̾ V.2.2 ޤǤ cpp.doc ȤƤV.2.3 porting.txt ѹV.2.5 mcpp-porting.txt ѹ V.2.6.2 mcpp-porting.html ѹ伫Ȥ̾⡢V.2.2 ޤǤ Psycho ȤƤV.2.3 kmatsui ѹ

+
+ +

1.3. ΥɥȤɽˡ

+

ΥɥȤϤĤƤϥƥȥեǤV.2.6.2 html եѤޤ
+ΥɥȤǤϼΤ褦˥եȤȤʬƤޤ

+
    +
  • source:
    +եȤϡ +ɤҤӥޥɥ饤Ϥ򼨤Τ˻Ȥޤ
    +
  • __STDC__:
    +եȤϡɸޥӲ餫Υޥ򼨤Τ˻Ȥޤ
    +
  • STD:
    +Italic եȤ mcpp system.H ȤեޥɽޤΥɥȤǤϤ̾ mcpp μɽ뤿ˤȤޤΥޥ mcpp 򥳥ѥ뤹˻Ȥǡmcpp μ¹ԥץˤ¸ߤƤʤȤդƤ
    +
+
+ +

2.

+
    +
  1. DECUS cpp Martin Minow ˤäƺ졢1984/05 usenet / net.sources ǸޤDECUS ȤΤϡDEC Users' Society Ȥ DEC ҤΥԥ塼Υ桼롼פǤDECUS cpp DEC PDP-11 / RT11, PDP-11 / RSX, VAX / VMS, VAX / ULTRIX ΥƥΣøϤΤ˽񤫤줿åץץåǤܿɤƤΤǡ¾Υƥ˰ܿ뤳ȤŪưפǡꥸʥǤǤ⤹Ǥ DEC ʳΤĤ UNIX ƥбƤ褦Ǥ
    +
    +
  2. mcpp νȯȤΤϡC Users' Group եǥ #243 ǤΥˤ뽤򸫤ȡԤˤǽ 85/06 ȤʤäƤޤθ塢ԤС󥢥åפ򤷤ƤȤäʹޤ
    +
    +
  3. θ 88/12 ޤǤ˲ͤˤä MS-DOS ΤĤνϤˤܿޤCUG ΥǥäƤΤϤΥСǤ
    +
    +
  4. ftp.oreilly.com/pub/examples/imake/DECUS-cpp.tar.gz ˤ⥽ꡢ time-stamp 93/02 ȤʤäƤޤºݤƤ CUG ΤΤŤ85/01 ΤΤǤʤ˴ޤޤƤ Martin Minow README ˤȡΥץ public domain ȤʤäƤޤʤ README Τ 84 ޤ 85 ǯΤΤȻפˡ
    +
    +
  5. 89/04 Gigo ˤä OS-9/6x09 Microware C ˰ܿ줿Τ NIFTY-SERVE / FOS9 / lib 2 ϿƤޤ
    +
    +
  6. mcpp V.2 ϡ䤬򸵤Ū˽ľΤǤܿ򤵤˸夵Standard C ˴б뤿ᡢեʬλѤ¿Υޥɲäؿѿɲáʬ䡦񤭴̾˹ԤäƤޤ̤⥪ꥸʥǤΣܤˤʤäƤޤɥȤȸڥåȤϤ٤ơ䤬ޤä񤤤ΤǤ
    +Ϥ򥪡ץ󥽡եȥȤƸޤ伫Ȥ DECUS Ȥϲδط⤢ޤ
    +ʤꥸʥǤˤǿդƤޤ󤬡mcpp 椹ˤϡ DECUS cpp ȸƤ֤Ȥˤޤ
    +
    +
  7. Standard C ΥޥŸμˡˤĤƤϡE. Ream MS-DOS PDS Ǥ CPP V.5.3 (1989/08, CUG #319) Υ⻲ͤˤޤΤۤGCC / cpp ư䡢J. Roskind JRCPP ΥɥȤ⤤ĤμƤޤ
    +
    +
  8. mcpp V.2.0 ϸڥå V.1.0 ȤȤ 1998/08 NIFTY SERVE / FC / LIB 2 Ǹ졢٥ҤΥȤˤžܤޤ
    +
    +
  9. mcpp V.2.1 ϡV.2.0 C99 1998/08 draft б뤿νäΤǤڥå V.1.1 ȤȤ 1998/09 NIFTY SERVE / FC / LIB 2 ӥ٥ҤΥȤƱ˥ץɤޤ
    +
    +
  10. mcpp V.2.2 V.2.1 1998/07 ˷ޤä C++ Standard (ISO/IEC 14882:1998) б update ΤǤڥå V.1.2 ȤȤ 1998/11 NIFTY SERVE / FC / LIB 2 ӥ٥ҤΥȤƱ˥ץɤޤ
    +
    +
  11. mcpp V.2.3 V.2.2 C99 б update Linux / GCC 2.95, GCC 3.2 ؤΰܿɲäơGCC / cpp Ȥθߴ夵ΤǤޤ¹ԻץɲäѹޤV.2.3 ǤϥɥȤαѸǤޤmcpp °븡ڥåȤˤϡGCC / testsuite ΰȤƼưŪ˥ƥȤ¹Ԥ뤳ȤΤǤ edition ɲäޤ
    +
    +
  12. mcpp V.2.3 γȯǡڥå V.1.3 ȤȤˡʵ(IPA) ʿǯ١̤Ƨեȥ¤ȡפ˿ ͵ץȥޥ͡ˤäƺ򤵤졢2002/07 - 2003/02 δ֤ IPA λȿУͤνΤȤ˳ȯʤޤѸǥɥȤ⤳ΥץȤǡͭ²ҡϥˤ˻䤬ȥƥäƤǤäΤǤΥץȤ cvs repository ftp site Ѱդ졢V.2.3 Ϥ 2002/08 pre-release 1 2002/12 pre-release 2 2003/02 ˥꡼Ǥȯޤθ塢2003/03 V.2.3 patch 1 ФƤޤ*1
    +
    +
  13. mcpp Ϥʿǯ٤ˤ̤Ƨեȥ¤ȡפ˰ PM ˤäƷ³ƺ򤵤졢2003/06 - 2004/02 δ֤ IPA λȰϣУͤνΤȤ V.2.4 ؤ update Ȥʤޤơ2003/11 ˤ V.2.4 prerelease ȯޤΥСǤ Visual C++ 2003 ؤΰܿɲä졢ޤmcpp make ư configure ץȤޤʤmcpp ϤޤΤʥ饤ɽ򤷤ƤޤǤλ BSD Υ饤ɽ򤹤褦ˤʤޤˡ2004/02 ˤϥ꡼ǤȯޤΥСǤ multi-byte character νĥޤޤѸǥɥȤϥܸǤ˹碌 update ޤ
    +2004/03 ˤ mcpp V.2.4.1 ꡼ޤϺƵŪޥŸˡΤǤ
    +
    +
  14. 2005/03 ˤ mcpp V.2.5 ꡼ޤΥСǤϡPOST_STANDARD ȤѥΥ⡼ɤ STANDARD ⡼ɤˤμ¹ԻץΰĤȤƵۼ졢OLD_PREPROCESSOR Ȥѥ PRE_STANDARD ⡼ɤμ¹ԻץȤƵۼޤƵŪޥŸˡϺƽƴʤΤȤʤޤޤGCC V.3.3, 3.4 бǡ16 ӥåȥƥǤνϤ˴ؤɥȤ¿ޤ
    +
    +
  15. 2006/07 ˤ mcpp V.2.6 ꡼ޤΥСǤϡSTANDARD ⡼ɤ PRE_STANDARD ⡼ɤĤμ¹ԥץˤޤȤޤcompiler-independent-build λͤϽϤ˰¸ʤΤ˲ޤĤνϤοСؤбɲä줿ǡpre-C90 λͤνϤ˰ܿ뤿ϺޤMS-DOS Υѥؤΰܿޤν񤭴ʤΤˤʤޤϥɲäνϤäƤ⡢ʽ񤭴ȯʤߤǤ
    +2006/08 ˤ mcpp V.2.6.1 ꡼ޤΥСǤϡMinGW ؤΰܿɲäޤΤۤХȤĤŪɤޤ
    +2006/11 ˤ mcpp V.2.6.2 ꡼ޤΥСǤϡĤΥХȤȤˡƥȥեΥɥȤ html ѹޤޤJuergen Mueller contribution ˤ subroutine-build ޤ
    +2007/04 ˤ mcpp V.2.6.3 ꡼ޤΥСǤϡGCC-specific-build GCC ȤθߴޤSubroutine-build Ǥ Greg Kress contribution ˤäƥΥХåեؤνϤޤޤΥС󤫤餤ĤΥƥѤΥХʥꡦѥå󶡤褦ˤʤޤ
    +2007/05 ˤ mcpp V.2.6.4 ꡼ޤ V.2.6.3 ΥХեåǤǤ

    +
  16. 2008/03 ˤ mcpp V.2.7 ꡼ޤ +ޥ˴ؤ򥳥Ȥ˽񤭹ǽϤ֥ޥ⡼ɡ(macro notification mode) ȤΤ졢ɤʤޤΥ⡼ɤǤϡץץνϤ鸵ΥΥޥΰ֤Τ뤳ȤǤޤΥ⡼ɤ C/C++ refactoring tool Τ˼줿ΤǤ +ޤMac OS X / Apple-GCC ؤΰܿɲäޤ +Visual C++ 2008 ؤΰܿ⤵ޤ +GCC-specific-build Ϥ GCC ˶ᤤΤˤʤޤ +СΤĤΥХ⽤ޤ
    +2008/05 ˤ mcpp V.2.7.1 ꡼ޤ + V.2.7 ΥХեåǤǡСΤĤΥХޤ +ޤUNIX ϥƥΥХʥꡦѥåϤ٤ shared library ޤ DLL ȡ󥯤¹ԥץ󶡤褦ˤʤޤ
    +2008/11 ˤ mcpp V.2.7.2 ꡼ޤ +СΥХեåǤǤ
    +
+

:

+

*1 ̤Ƨեȥ¤ȡ(Exploratory Software Project) γפϼΤȤΤ뤳ȤǤ롣

+
+

http://www.ipa.go.jp/jinzai/esp/

+
+

mcpp V.2.3 V.2.5 ޤǤϼΤȤ֤Ƥ

+
+

http://www.m17n.org/mcpp/

+
+

2006/04 ˼ΤȤ˰ܤä +

+
+

http://mcpp.sourceforge.net/

+
+

cpp V.2.2 ϥ٥ҤΥȤμΤȤˤ롣dos/prog/c Ȥǥ쥯ȥƤ뤬MS-DOS ѤǤϤʤ UNIX, WIN32/MS-DOS бƤ롣

+
+http://www.vector.co.jp/soft/dos/prog/se081188.html
+http://www.vector.co.jp/soft/dos/prog/se081189.html
+http://www.vector.co.jp/soft/dos/prog/se081186.html
+
+

Υ֥եΥƥȥեϡVector ΤΤ DOS/Windows Ϥ˹碌ơԥɤ [CR]+[LF] shift-JIS encode Ƥ롣SourceForge ΤΤ V.2.5 ޤǤ UNIX Ϥ˹碌Ʋԥɤ [LF] EUC-JP Ǥ롣V.2.6 [CR]+[LF] / shift-JIS zip Ǥ [LF] / EUC-JP tar.gz ǤΣΥ֥ե֤褦ˤ

+
+ +

3. ƽϤ˰ܿˡ

+

mcpp ΥϣܤΥإåեȣܤ *.c ե뤫ʤäƤޤϣӤϤ˰¸ʬ configed.H, noconfig.H, system.H, system.c ΣܤΥˤޤȤƤޤconfiged.H noconfig.H ȤƱ˻Ȥ뤳ȤϤʤɬɤ餫Ȥޤޤ饤֥ؿΰΣäˤ륽 system.c ˤޤäơmcpp 򲿤餫νϤǻȤˤϡ˹碌ƤΥեѹäɬפޤ

+

mcpp μ¹ԥץ build ˡ˱Ʋफޤ +Build ˡˤϼΣĤμޤ + +

    +
  1. stand-alone-build vs subroutine-build +
  2. compiler-independent-build vs compiler-specific-build +
+
    +
  • stand-alone-build: ĤΥޥɤȤñΤưץץåǤ +ϤΥѥ顦ɥ饤ФƤӽФΤ⤢ޤ +
  • subroutine-build: ¾Υᥤץ椫饵֥롼Ȥ +ɬפʤ鷫֤˸ƤӽФΤǤ +ˤĤƤ 3.12 ǽҤ٤ޤ

    +
+
    +
  • compiler-independent-build: ϤΩưץץåǤ +¹ԻץʤɤλͤϽϤΤˤ餺Ǥ +ץץ뤳ȤǤޤϤΰȤư뤳ȤϤǤޤ*1
    +¿ξ硢ѥ뤵̤ФΤǤñǤˤĤƤ 3.11 ǽҤ٤ޤ*2 +
  • compiler-specific-build: νϤΥץץåʤ⤷ǽʤؤ뤿ΤΤǤ +νϤѤλͤνϤѤΥǥ쥯ȥ˥󥹥ȡ뤵ޤ +
+ +

ʲ 3.1 - 3.9 ǤϤ stand-alone compiler-specific-build ޤGCC ǡסVisual C ѡɽƤΤϤ٤ơ줾 GCC-specific-build, Visual C-specific-build ΤȤǤ

+

mcpp 򥳥ѥ뤹ˤϣĤˡޤĤ configure ץȤ¹Ԥơconfig.h Ȥإåե Makefile ưˡǤȤñ make; make install ȤǤߤޤconfiged.H ȤإåեϤξ˻Ȥޤconfigure UNIX ϤΥƥ CygWIN, MinGW ǤȤޤ
+⤦ĤϳƽѤκʬեȤäƥإåեѹäɬפʤ餵˥إåեԽǡνѤ makefile Ȥä make ˡǤnoconfig.H ȤإåեϤξ˻Ȥޤʬե makefile noconfig Ȥǥ쥯ȥˤޤConfigure λȤ륷ƥǤ⡢إåեľܡԽ뤳ȤǺ٤򤹤뤳ȤǤޤʬեϤǤ˰ܿߤνѤΤΤޤ
+ξϤǤϺʬեȤˡˤĤޤConfigure ˤĤƤ INSTALL 򸫤Ƥ

+

:

+

*1 V.2.6, V.2.6.1 Ǥ stand-alone-build ȸƤǤ +V.2.6.2 subroutine-build ǤΤȼäơƾΤѹ

+

*2 mcpp V.2.6.3 mcpp.sourceforge.net DzफΥХʥꡦѥå󶡤褦ˤʤäϤ٤ stand-alone compiler-independent-build Ǥ롣

+
+ +

3.1. ܿߤν: compiler-specific-build Υѥ

+

伫ȤưȤΤǤýϤϼΤΤǡΤˤ mcpp ܿƤޤʤΥ򥳥ѥǤ줿ץץå줾νϤξư뤳ȤǧƤޤ CPU x86 ϤȤäƤޤUbuntu 64 ӥåǤǡ¾ 32 ӥåǤǤ

+
+ + + + + + + + + + + + + +
FreeBSD 6.3 GCC V.3.4.6
Vine Linux 4.2 GCC V.2.95.3, V.3.2, V.3.3.6, V.3.4.3, V.4.1.1
Fedora Linux 9 GCC V.4.3.0
Debian LInux 4.0 GCC V.4.1.2
Ubuntu Linux 8.04 / x86_64 GCC V.4.2.3
Mac OS 10.5 GCC V.4.0.1
CygWIN 1.3.10 GCC V.2.95.3
CygWIN 1.5.18 GCC V.3.4.4
MinGW (MSYS 1.0.11)GCC V.3.4.5
WIN32 Visual C++ 2003, 2005, 2008
WIN32 Borland C++ V.5.5J
WIN32 LCC-Win32 2003-08, 2006-03
+
+

ޤ¾Υ桼󶡤줿 Visual C++ V.6.0, Visual C++ 2002, C++Builder 2007 (aka BCC V.5.9) ξ⤢ꡢνϤǥѥ뤹뤳ȤǤޤ

+

νϤ mcpp 򥳥ѥ뤹뤿νϴñǡnoconfig.H οĤΥޥѹǤ

+

noconfig ǥ쥯ȥ *.dif Ȥե FreeBSD 6.* / GCC 3.4 Ѥ noconfig.H ƽѤ˽뺹ʬեǤVisual C++ 2005 ˤȤȡsrc ǥ쥯ȥ

+
+patch -c < ..\noconfig\vc2005.dif
+
+

Ȥȡޤpatch UNIX ɸŪʥޥɤǡWindows ˤܿƤޤpatch ȤʤƤ⡢ʬե򸫤ƥǥǽƤ⤫ޤޤ

+

Include ǥ쥯ȥλʤɤϡʬեˤ뽤Ȥ̤ˡ桼ʬΥƥ˹碌ƽʤФʤޤ

+

ƽ򥳥ѥ뤹뤿γƽѤ makefile źդƤޤ3.7 ȡˡ

+
+copy ..\noconfig\visualc.mak Makefile
+
+

Ȥ src ǥ쥯ȥ˥ԡޤ

+

ʲκȤ src ǥ쥯ȥǹԤޤȤäǤʤ¤ꡢnoconfig.H νǤ

+ +

3.1.1. ɤνϤǤɬפ

+

ʲΤɤνϤǤ⡢compiler-specific-build 뤿ˤϡ

+
+#define COMPILER        INDEPENDENT
+
+

ȤʤäƤԤ

+
+#define COMPILER        MSC
+
+

ȡνϤɽޥѹޤơ +

+
+#define VERSION_MSG     "GCC 3.4"
+
+

ȤԤ򼡤Τ褦Ŭ񤭴ޤ +

+
+#define VERSION_MSG     "Visual C 2005"
+
+

COMPILER make ΥץǾ񤭤뤳ȤǤޤ +㤨С

+
+nmake COMPILER=MSC
+nmake COMPILER=MSC install
+
+

Ȥޤʬե noconfig.H 񤭴ϡcompiler-specific-build Τ⤽νѤ˽񤭴ΤǡCOMPILER Ͻ񤭴ɬפϤޤmake COMPILER ꤹ compiler-specific-build 졢ꤷʤ compiler-independent-build ޤ

+

ޤǥեȤ include directory ꤬ noconfig.H ΤΤȰۤʤϡ C_INCLUDE_DIR1, C_INCLUDE_DIR2 Ȥޥ˽񤤤ƤޤC Ȱۤʤ C++ ͭ include directory ϡ CPLUS_INCLUDE_DIR1, CPLUS_INCLUDE_DIR2, CPLUS_INCLUDE_DIR3 ˽񤭤ޤʤΥǥ쥯ȥϼ¹Ի˴Ķѿ -I ץǻꤹ뤳ȤǤˡnoconfig.H ꤹΤϽϸͭ include directory Ǥ
+Include directory ϤΤۤsystem.c ǤꤵƤޤUNIX Ǹ system.c ꤵΤϤ OS-specific ʤΡ̾ /usr/includeˤȤ site-specific ʤΡ̾ /usr/local/includeˤǤWindows Ǥ system.c Ǥ include directory ϲꤵޤWindows Ǥ noconfig.H ǤǥեȤǤ include directory ꤵʤΤǡʬǽ񤯤ޤϴĶѿ INCLUDE, CPLUS_INCLUDE ǻꤹɬפޤ

+

ޤɬפʤ COMPILER_STD1, COMPILER_STD2 Ȥ߹ߥޥ̾ѹޤ

+

Multi-byte character encoding ϥǥեȤǤϡUNIX ϤǤ EUC-JPWindows Ǥ shift-JIS ȤƤޤɬפʤ MBCHAR Ȥޥ񤭴¾ encoding ѹޤMulti-byte character encoding ϼ¹Ի˴Ķѿץ#pragma ѹ뤳ȤǤˡ
+ϤˤäƤ shift-JIS Big5 encoding бƤʤᡢmulti-byte character '\\' Ʊ 0x5c ͤΥХȤ tokenization ǥ顼ˤʤ뤳ȤޤϤǤ mcpp üʽ򤷤ƥѥη٤䤤ޤˤĤƤ 4.1.1.5 򸫤Ƥ

+

źդ makefile ˤĤƤϡBINDIR ȤѿǽϤΥХʥ֤Ƥǥ쥯ȥ񤭤ޤ

+

GCC V.3, V.4 Ǥϥץץѥ (cc1, cc1plus) ˵ۼƤޤäΤǡGCC-specific-build mcpp Ȥˤϡgcc, g++ θƤӽФ shell-script ֤ơmcpp => cc1, mcpp => cc1plus νǼ¹Ԥ褦ˤʤФʤޤźդ makefile Ǥϡ

+
+make COMPILER=GNUC
+make COMPILER=GNUC install
+
+

Ȥȡ줬ưŪꤵޤܺ٤ mcpp-manual.html#3.9.7 򸫤Ƥ

+

桼 BINDIR ؤν񤭹߸¤äƤʤϡUNIX ϤǤ sudo make COMPILER=GNUC install ȤޤWindows ǤϤ餫 administrator ȤǡΥǥ쥯ȥ permission ѹƤޤ

+ +

3.1.2. FreeBSD / GCC V.2.*, V.3.*, V.4.*

+

FreeBSD 6.* GCC (GNU C) V.3.4.* ǥѥ뤷 compiler-independent-build mcpp ֤ˤʤäƤޤFreeBSD 6.* / GCC V.3.4.* Ѥ compiler-specific-build ˤϡ

+
+#define COMPILER        INDEPENDENT
+
+

ȤʤäƤԤ

+
+#define COMPILER        GNUC
+
+

Ȥơѥ뤹ФǤǤ +COMPLIER make COMPILER=GNUC Ǿ񤭤뤳ȤǤޤ

+

GCC ¾ΥСǤСVERSION_MSG Ȥޥ

+
+#define COMPILER_EXT_VAL    "3"
+#define COMPILER_EXT2_VAL   "4"
+#define COMPILER_CPLUS_VAL  "3"
+#define GCC_MAJOR_VERSION   3
+
+

ȤʤäƤȤΥСֹѹޤ +COMPILER_EXT_VAL GCC major version number COMPILER_EXT2_VAL minor version number 򤤤ʸƥǽ񤭤ޤCOMPILER_CPLUS_VAL __GNUG__ ޥͤǡCOMPILER_EXT_VAL Ʊˤʤޤ +ޤGCC_MAJOR_VERSION COMPILER_EXT_VAL Ʊͤͤǽ񤭤ޤ

+ +

FreeBSD ΥС 6.* ǤʤС

+
+#define SYSTEM_EXT_VAL      "6"     /* V.5.*: 5, V.6.*:6    */
+
+

ͤѹޤ +

+

include directory FreeBSD 6.* ɸȰäƤϡ +

+
+#define CPLUS_INCLUDE_DIR1  "/usr/include/c++/3.4"
+#define CPLUS_INCLUDE_DIR2  "/usr/include/c++/3.4/backward"
+
+

ȤʤäƤǥ쥯ȥѹޤCPLUS_INCLUDE_DIR3, C_INCLUDE_DIR1 ɬפ⤷ޤ

+

GCC V.2.7-2.95 ǤмΥޥ 199409L ѹޤ

+
+#define STDC_VERSION        0L
+
+

¾ UNIX OS Ǥ⥳ѥ餬 GCC ǤСΥСɽ䡢include ǥ쥯ȥꡢϣӸͭȤ߹ߥޥꡢѤǤफ⤷ޤ4.1.1 ȡˡ

+ +

3.1.3. Linux / GCC V.2.*, V.3.*, V.4.*

+

Linux / GCC ǤϤޤ

+
+#define SYSTEM      SYS_FREEBSD
+
+

+
+#define SYSTEM      SYS_LINUX
+
+

ѹޤ +ơFreeBSD ξƱ褦ˡCOMPILER, VERSION_MSG, COMPILER_EXT_VAL, COMPILER_EXT2_VAL, COMPILER_CPLUS_VAL, GCC_MAJOR_VERSION CPLUS_INCLUDE_DIR1, CPLUS_INCLUDE_DIR2, C_INCLUDE_DIR1 Υޥͤѹޤ

+

GCC 2.* Ǥ STDC_VERSION ͤѹˡ

+
+#define COMPILER_SP3_VAL    "int"
+
+

+
+#define COMPILER_SP3_VAL    "long int"
+
+

ѹޤ

+

include directory

+
+gcc -xc -E -v /dev/null
+g++ -xc++ -E -v /dev/null
+
+

ȤƳΤƤꤷƤ

+

noconfig ǥ쥯ȥ linux_gcc2953.dif, linux_gcc32.dif, linux_gcc336.dif, linux_gcc343.dif FreeBSD 6.* / GCC V.3.4 ѤΥ VineLinux 4.0 / GCC V.2.95.3, V.3.2, V.3.3.6, V.3.4.3 Ѥ˽뺹ʬեǤ +ޤlinux_gcc412.dif Debian 4.0 / GCC V.4.1.2 Ѥ˽ΤǤ +줾 compiler-specific-build ǤϤ COMPILER ѹޤDistribution ɸ GCC ɲå󥹥ȡ뤷 GCC Ȥ include directory ʤۤʤդƤ

+

ʤglibc getopt() POSIX ɸΤΤȤϻͤۤʤΤǡȤ鷺ˡsystem.c mcpp_getopt() ȤäƤ

+ +

3.1.4. Mac OS X / Apple-GCC V.4.*

+

Mac OS X Ǥ Xcode Ȥѥå򥤥󥹥ȡ뤹 GCC ⥤󥹥ȡ뤵ޤ +/usr/bin ¿ gcc, cc, g++, c++ ޤIntel-Mac Mac OS X 10.5 (Leopard) ξϡi686-apple-darwin9-gcc-4.0.1, i686-apple-darwin9-g++-4.0.1 ȤΤΥޥѤ native code 륳ѥǤ +Ʊ˥ѥ⥤󥹥ȡ뤵ޤ +Intel-Mac ξϡpowerpc-apple-darwin9-gcc-4.0.1, powerpc-apple-darwin9-g++-4.0.1 ȤΤ powerpc ѤΥХʥ륯ѥǤ +ñʤ gcc (g++) gcc-4.0 (g++-4.0) ؤΥ󥯤ǡϥǥեȤǤ native compiler Ȥưޤ-arch ppc ȤץդƵư powerpc ѤΥѥΤƤӽФޤ +ޤ/Developer/usr/bin ˤ /usr/bin Ʊѥ켰󥹥ȡ뤵ޤ

+

Ϥ Apple ˤä¿γĥܤ줿 Mac OS X Ѥ GCC Ǥ +¾Υƥ GCC ȰۤʤΤϡĤ framework ȸƤФäʥǥ쥯ȥ system header directory ȤƤ뤳ȤǤ +⤦Ĥ Intel-Mac PowerPC-Mac ΥХʥΡʣΡ˥ޥǤ褦ˤʤäƤ뤳ȤǤ +ΥХʥ򣱤Ĥ˥Хɥ뤷ƤɤΥޥǤư褦ˤ universal binary ȤΤ뤷ߤ⤢ޤ +¤ gcc-4.0, i686-apple-darwin9-gcc-4.0.1, powerpc-apple-darwin9-gcc-4.0.1 䡢ƤӽФ륳ѥΤǤ /usr/libexec/gcc/SYSTEM/4.0.1 cc1, cc1plus ⤹٤ i386 Ѥ ppc ѤȤ universal binary ʤΤǤSYSTEM i686-apple-darwin9 ޤ powerpc-apple-darwin9ˡ +򤽤Τޤ x86 ޥ󤫤 powerpc ޥ˻äƤСnative cross δطž֤ư褦ˤʤäƤΤȻפޤ +ξ塢Intel-Mac ppc ѤΥХʥ x86 ΥɤѴʤ鼫ưŪư褦ˤʤäƤޤ

+

Ȥǡ/usr/bin /Developer/usr/bin ¿ gcc, g++ ꡢؤΥ󥯤ꡢx86 Ѥ ppc Ѥ libexec ǥ쥯ȥ꤬ꡢĤμ¹ԥץˣĤΥХʥ꤬Хɥ뤵Ƥꡢppc ѤΥХʥ꤬ x86 ưĥǽꡢʶ路ΤդƤ +Ǥ Intel-Mac Mac OS X 10.5 (Leopard) ˤȤޤppc-Mac Ǥ i686 powerpc (ppc) ؤɤǤ +ޤMac OS X 10.4 (Tiger) Ǥ darwin9 darwin8 ɤؤƤ

+ +

3.1.4.1. ͥƥ֥ѥȥѥ

+

ͥƥ֥ѥѤ mcpp Υ󥹥ȡϴñǤ +noconfig.H mac_gcc401_i686.dif ѹäȡIntel-Mac Mac OS X 10.5 / GCC 4.0.1 Ѥˤʤޤ +Makefile ȤƤ mac_osx.mak Ȥޤ +make; sudo make install Ȥ compiler-independent-build make COMPILER=GNUC; sudo make COMPILER=GNUC install Ȥ GCC-specific-build Ǥޤ +/Developer/usr/bin ˤ̾ PATH ̤äƤʤΤǡѥ /usr/bin ΤΤȤޤ

+

Intel-Mac powerpc ѤΥѥ˥󥹥ȡ뤹ˤϡޤ noconfig.H mac_gcc401_powerpc.dif ѹäޤ + Makefile ޤ +

compiler-independent-build Ǥ NAME, CC, CXX Ȥѿ򡢤 mac_osx.mak ΥȤˤ褦 powerpc ޤʸѹޤ + make; sudo make install Ȥޤ +ϡ֥ѥǡץѥ뤵줿Τǡppc-Mac ưϤǤ

+

GCC-specific-build Ǥ NAME, INCDIR, BINDIR, target_cc, arch 򡢤Ϥ powerpc (ppc) ޤ̾ѹޤCC, CXX ѹʤˡ +ơmake COMPILER=GNUC; sudo make COMPILER=GNUC install Ȥޤ + Intel-Mac ư֥ѥΤΡפΤʤΤǡIntel-Mac ưޤ

+

ppcMac ǤϡIntel-Mac Ȥϵդˡmac_gcc401_powerpc.dif ǥͥƥ֥ѥѤˤʤꡢmac_gcc401_i686.dif ǥѥѤˤʤϤǤ +ѥѤǤϡ嵭 Intel-Mac Makefile ѿ powerpc ޤ̾ȤäȤ򡢤٤ i686 ѹޤ

+ +

3.1.4.2. Universal binary

+

Universal binary ˤϡmac_osx.mak UFLAGS Ȥѿ򥳥ȥȤƤ # 򳰤ơͭˤǤ +ȤΤޤޤǤ

+ +

3.1.5. CygWIN / GCC V.2.*, 3.*

+

CygWIN V.1.3.10 / GCC V.2.95.3 Ǥ noconfig.H cyg1310.dif ˤ褦ѹäޤ
+CygWIN V.1.5.18 / GCC V.3.4.4 Ǥ cyg1518.dif Ȥޤ

+

CYGWIN_ROOT_DIRECTORY ȤޥʬδĶ˹碌ƽޤ CygWIN ¸ߤ Windows Υǥ쥯ȥ򼡤ηΤǤ

+
+#define CYGWIN_ROOT_DIRECTORY   "c:/pub/compilers/cygwin"
+
+

path-list ʸʸϴطޤ

+

¾ version Ǥ⡢VERSION_MSG, CYGWIN_ROOT_DIRECTORY include directory Υޥѹ뤳ȤбǤǤ礦

+

CygWIN Windows ΥƥǤUNIX Υե륷ƥबߥ졼ȤƤΤǡmcpp Ǥ UNIX ϥƥ GCC ȤۤƱͤ˰ޤInclude directories UNIX ϤƱͤȤ߹ޤޤ

+ +

3.1.6. MinGW / GCC V.3.*

+

MinGW / GCC V.3.4.5 Ǥ noconfig.H mingw345.dif Τ褦ѹäޤ
+ MSYS_ROOT_DIRECTORY, MINGW_DIRECTORY ȤĤΥޥʬδĶ˹碌ƽޤϼΤ褦ˡ줾 /, /mingw ǥ쥯ȥ Windows ΰ֤ΤǤ

+
+#define MSYS_ROOT_DIRECTORY "C:/Program Files/MSYS/1.0"
+#define MINGW_DIRECTORY     "C:/Program Files/MinGW"
+
+

path-list ʸʸϴطޤ

+

¾ version Ǥ⡢Υޥ VERSION_MSG include directory Υޥѹ뤳ȤбǤǤ礦Include directory Υޥ "C:/dir/mingw/include" ȤХѥǤ⡢"/mingw/include" Ȥ MinGW Υǥ쥯ȥǤ⤫ޤޤ

+

MinGW Ǥ symbolic link ݡȤƤʤΤǡgcc GCC-specific-build mcpp ưΤ symbolic link Ȥޤ󡣤ξ塢MinGW / gcc ϤȤ cc1 Ȥ̾Ǥ shell-script εưϵݤޤǡmcpp ΥѥǤ cc1.exe Ȥ¹ԥץơ椫 mcpp.exe ޤ GCC cc1.exe, cc1plus.exe ƤӽФޤ

+

MinGW GCC-specific-build Ǥ include directories mcpp ꤷޤcompiler-independent-build ǤꤵʤΤǡĶѿ INCLUDE, CPLUS_INCLUDE ǻꤹɬפޤ

+ +

3.1.7. LCC-WIN32 2003-08, 2006-03

+

LCC-WIN32 2003-08-*, 2006-03-* ǤϤ줾 lcc0308.dif, lcc0603.dif Τ褦ѹäޤ
+¾ version Ǥ VERSION_MSG ޥѹޤ

+ +

3.1.8. Visual C++ V.6.0, 2002, 2003, 2005, 2008

+

Visual C++ 2008, 2005, 2003, 2002, 6.0 ǤϤ줾 vc2008.dif, vc2005.dif, vc2003.dif, vc2002.dif, vc6.dif Τ褦ѹäޤcompiler-specific-build Ǥ COMPILER ޥ񤭴뤫nmake -DCOMPILER=MSC ץǾ񤭤ޤ

+

Visual C ¾ΥСǤϡVERSION_MSG ޥѹۤ_MSC_VER _MSC_FULL_VER ȤȤ߹ߥޥͤ򤽤줾 COMPILER_EXT_VAL, COMPILER_EXT2_VAL ȤޥѤ뤳Ȥбޤ

+ +

3.1.9. Borland C++ V.5.*

+

Borland C V.5.5, V.5.9 (C++Builder 2007) / bcc32 ǤϤ줾 bc55.dif, bc59.dif Τ褦ѹäޤ

+

Borland C/C++ ̤ΥСǤ VERSION_MSG Τۤ__TURBOC__, __BORLANDC__, __BCPLUSPLUS__ ȤȤ߹ߥޥͤ򤽤줾 noconfig.H COMPILER_STD2_VAL, COMPILER_EXT_VAL, COMPILER_CPLUS_VAL ȤޥѤ뤳Ȥǡбޤ4.1.1.1 ȡˡDigraphs μƤСǤСHAVE_DIGRAPHS ѹޤ__STDC_VERSION__ μƤСǤСSTDC_VERSION ѹޤ

+
+ +

3.2. DECUS cpp бƤ

+

PDP-11 RT-11 / DECUS C, RSX / DECUS CVAX VMS / VAX-11 CPDP-11 / UNIX, VAX / ULTRIX βΣäˤ DECUS cpp бƤ褦ǤMS-DOS Microsoft C, Lattice C ΤʤŤǤˤбƤ褦ǤϤˤ⤦פȻפ졢ޤ伫Ȥƥʥ󥹤ǤʤΤǡޤ

+
+ +

3.3. noconfig.H, configed.H, system.H

+

system.H HAVE_CONFIG_H Ȥޥ non-0 Ƥ configed.H include Ǥʤ noconfig.H include ޤconfiged.H, noconfig.H ˤ mcpp PART 1 PART 2 Ȥʬꡢsystem.H ˤ PART 3 ޤ

+

ΥեˤϡƽϤ˰ܿɬפʤĤΥޥƤޤޤܿƤʤϤ˰ܿˤϡPART 1 ˿ԤʤԤ­ޤ
+PART 1 ϣϣӤ target Ϥ˰¸ǡPART 2 host Ϥ˰¸ PART 3 mcpp ưͤǤ
+configed.H, noconfig.H ǤϥåȽϤȥۥȽϤȤƱǤȲꤷƤޤۤʤ PART 2 Խɬפޤ

+

ǥեȤȰ㤦ǰܿϡΥեΤɬܤ̤Ƥ

+
+ +

3.4. system.c

+

configed.H (noconfig.H), system.H ΥޥǤϵۼǤʤϣӤϤκۤϡsystem.c ǵۼƤޤ̤νϤ˰ܿˤϡ˿ԤΥ­ȤɬפˤʤǤ礦

+

Υե˵ҤƤΤϡmcpp ưΥץusage ʸinclude ǥ쥯ȥꡢإåե䥽ե򥪡ץ󤹤ΣϣӸͭΥǥ쥯ȥѥΰ#pragma νϸͭγĥǥ쥯ƥ֤νǤۤȤɤ target OS target ϤǤ

+
+ +

3.5. 饤֥ؿ

+

饤֥ؿΤStandard C ˤʤ getopt(), stpcpy() Σäˤ륽 system.c ˽񤤤Ƥޤmcpp getcwd(), stat() ȤUNIX ϤǤ readlink() ȤޤΣĤ OS ˰¸ؿǤ portable ˽񤯤ȤǤʤΤǡˤϴޤƤޤ󡣤ΣĤ Standard C ˤϤޤ󤬡POSIX ǤϵꤵƤޤmcpp λȤؿϤΣĤǤʤϤϤʤǤ礦 +ΤۤMSC Ǥ stricmp() Mac OS X, CygWIN, MinGW Ǥ strcasecmp() Ȥޤ*1, *2
+饤֥ؿϤ⡢Ϥˤä̯˰㤦Τͤ˰¸ȤϤƤʤΤǡɤνϤΤΤǤХʤפǤ

+

:

+

*1 MinGW Ǥ˸¤ä spawnv() Ȥ롣

+

*2 mcpp V.2.6.4 ޤǤ lib.c ȤեΩƤƤ getopt(), stpcpy() ΣĤˤʤäΤǡV.2.7 system.c ˵ۼ +ơgetopt() mcpp_getopt() ̾Ѥơ󥯤Υȥ֥ä

+
+ +

3.6. ɸإå

+

mcpp ΥǤ stdio.h, ctype.h, errno.h, stdlib.h, string.h, stddef.h, limits.h, time.h, sys/types.h, sys/stat.h ̵ include ƤޤUNIX ϤΥƥǤ unistd.h include ޤʤϤϤޤʤǤ礦

+
+ +

3.7. makefile mcpp Ȥäꥳѥ

+

noconfig ǥ쥯ȥˤ *.mak ϸ̤νѤ makefile Ǥܺ٤꤬Ǥޤmake ΤΤϳƽϤ°ΤΡޤϤΥƥɸŪʤΤꤷƤޤVisual C Ǥ make ǤϤʤ nmake Ȥޤ

+

ޤϤ xyz ȤȡFreeBSD / GCC ʳǤ

+
+patch -c < ../noconfig/xyz.dif
+
+

Ȥ noconfig.H ޤˡnoconfig.H COMPILER VERSION_MSG Ȥޥ񤭴ޤ˼ʬΥƥ˹碌 noconfig.H C_INCLUDE_DIR? ΥޥޤơѤ noconfig/xyz.mak Makefile ˥ԡǥ쥯ȥʬΥƥ˹碌ƽǡ

+
+make
+make install
+make clean
+
+

ȤƤ

+

¾νϤǤϡ򻲹ͤɬפ makefile 񤤤Ƥΰ¸طñǡ

+
    +
  1. main.c, directive.c, eval.c, expand.c, support.c, system.c, mbchar.c system.H, internal.H ˰¸
    +
  2. system.H configed.H (noconfig.H) ˰¸
    +
+

ȤطˤʤäƤޤ +system.H internal.H include ɬפޤ +internal.H Ϥ mcpp_lib.h include ޤ

+

mcpp ȤȤä mcpp ꥳѥ뤹ˤϡϤΥץץåΤˤμ¹ԥץ򤪤ޤ㤨 GCC V.2.95 ǤС° cpp0 cpp0_gnuc ȤǤ rename Ƥλ˻ȤΤ cpp0 ˥󥯤ΤɤǤ礦ʤȤץץå mcpp Ȥȡ

+
+ln -sf mcpp cpp0
+
+

ȤޤWindows ǤϻȤΤ cpp32.exe ˥ԡޤ*1

+

mcpp ¹ԥץ̾

+
+make NAME=mcpp
+
+

Ȥƻꤹ뤳ȤǤޤƱȤ BC make Ǥ make -DNAME=mcpp Ȥ롣UCB make Ǥ -D դƤդʤƤɤGNU make Ǥ -D դƤϤʤˡ

+

źդ makefile Ǥ GCC ѡfreebsd.mak, linux.mak, mac_osx.mak, cygwin.mak, mingw.mak˰ʳ make install ǤϤޤϤʤΤǡäƤ°Υץץåϡmake install ǾäƤޤȤΤʤ褦ˡ餫̾Υե˥ԡƤƤ

+

Visual C, Borland C Τ褦ʣѥѥ mcpp Ȥäƥꥳѥ뤹ϡmcpp νϥե򥳥ѥͿ륽եȤޤ㤨 main.c ȤץץΤ main.i Ȥä̾ǽϤơ cl bcc32 ˥ѥ뤵ˡ

+

mcpp Ȥäƥꥳѥ뤹ϡإåե "pre-preprocess" εǽȤȡץץ֤ṳ̂ޤźդ makefile ȤϡUCB make, GNU make, MS nmake Ǥϡ

+
+make PREPROCESSED=1
+
+

BC make Ǥ

+
+make -DPREPROCESSED=1
+
+

ȤȡưŪ˥إåե pre-preprocess ǥץץ줫饳ѥ뤷ޤLCC-Win32 make Ǥ if ʸˤʬǤʤΤǡmakefile ƥꥳѥ뤹ɬפޤƤ makefile ΤΤ˥ȤȤƽ񤤤Ƥޤ

+

UCB make, GNU make, MS nmake ǤϡMALLOC=KMMALLOC Ȥץդ make ȡ䤬񤤤 malloc() 󥯤ޤˤĤƤ 4.extra 򸫤ƤBC make ǤƱȤ -DKMMALLOC ȤץǻꤷޤLCC-Win32 make ǻ malloc() 󥯤뤿ˤϡmakefile ɬפޤ

+

:

+

*1 FreeBSD Ǥ cpp0, cc1 ֤ɸΥǥ쥯ȥ /usr/libexec Ǥ롣Linux Ǥ /usr/lib/gcc-lib/i686-redhat-linux/3.3.2 ȤäҤɤǥ쥯ȥˤʤäƤ롣Linux / GCC Ǥ distribution 䤽 version ˱ makefile ΤΥǥ쥯ȥλ񤭴ɬפ롣Include directory ⤤ΤǡΤʤФʤʤ

+

ޤLinux FreeBSD Ǥ /usr/bin/cpp ȤΤ뤬ϼºݤˤ cpp0 ޤ cc1 ƤӽФgcc cpp0 ޤ cc1 ƤӽФ
mcpp-manual.html#3.9.5, mcpp-manual.html#3.9.7 ⻲ȤΤȡGCC 3.*, 4.* Ǥϥץץѥ (cc1, cc1plus) ˵ۼƤޤäΤǡmcpp Ȥˤ gcc, g++ θƤӽФ shell-script ֤ɬפ롣

+
+ +

3.8. mcpp 򥳥ѥǤ

+

ƽϤ˰ܿ뤿ˤϤĤ꤬ɬפǤmcpp Υ򥳥ѥ뤹뤳ȼΤϡC90 (ANSI C) λͤƤϤǤнʬǤޤץץåƱͤǤ*1, *2

+

char դǤʤǤ⤫ޤޤ
+ư黻פǤ +

+

ΥϽϤ̯ʺ˱ƶʤ褦˽񤤤Ƥޤ +äȤ⡢ºݤ˳ƽϤǥѥ뤹뤿ˤϡˤνϤΥХ򤹤ɬפޤϤäƤߤʤȲФƤ뤫狼ޤ󡣻䤬ܿĤνϤǤ⡢ХǤ뤳ȤΤ᤽βˡ򸫤ĤޤǤˤʤλ֤äƤޤäȤ󤫤ޤ

+

mcpp бƤʤΤϡpre-C90 νϤΤۤüʸåȤĽϤü CPU Ǥ
+EBCDIC ˤбƤޤ
+ޤ黻Ǥʤ +CPU ˤ⡢бƤޤ󡣣Ǥʤϡ#if ǥСեȯˡʤ뤫⤷ޤ

+

:

+

*1 mcpp V.2.5 ޤǤ K&R 1st. νϤǤ⥳ѥǤ褦ˤƤǤˤɬפϤʤʤäƤȻפΤǡV.2.6 C90 Ȥ褦˲᤿ȼäƥΥɥȤ

+

*2 V.2.6.2 ޤǤ C++ Ǥ⥳ѥǤ褦ˤƤV.2.6.3 C Ȥ

+
+ +

3.9. ѥ뤹ϤȥåȤν

+

mcpp Υ򥳥ѥ뤹ϡʥۥȡˤȡˤä줿 mcpp μ¹ԥץȤϡʥåȡˤȤϡɬƱǤɬפϤޤ󡣤줬äƤϡnoconfig.H (configed.H) SYSTEM, COMPILER ǥåȤꤷHOST_SYSTEM, HOST_COMPILER ϥۥȤꤷޤޤPART 1 ˤϥåѤΤΤǡPART 2 ˤΤϥۥѤǤsystem.c ϼȤƥåѤΤΤǤ

+

ۥȤȥåȤδطˤϡΤ褦¤ޤ

+
    +
  1. ۥȽϤϥåȽϤƱϣӾΤΤǤ뤫ޤϥѥǤ뤳ȤɬפǤ +ۥȽϤȥåȽϤʸåȤȤϤȤ ASCII Ǥ뤳ȤɬפǤ
    +
  2. ۥȽϤ long (unsigned long) ϥåȽϤΤϰϤƤϤޤ󡣤 Standard C ǵꤵƤǤ⤢ޤC99 Ǥ long long (unsigned long long) ˤĤƱȤޤ
    +
+

ʤǸۥȤȥåȤȤΤϡѥΤȤϴطޤ󡣥ѥ뤹ΤϥѥΤλŻǡץץåϸ§ȤƤˤϴΤޤmcpp ֥ѥˡװܿϡΥѥ餬ǸåȽϤǤۥȽϤȤƤϥѥǤʤΤȤȤˤʤϤǤmcpp ֥ѥǡץѥ뤹ϡΥѥ餬ۥȽϤǡѥΥåȤåȽϤȤʤޤ

+
+ +

3.10. MS-DOS νϡDJGPP

+

mcpp βΥСǥݡȤƤΤΤθ塢ݡȤ᤿ϤˤĤƽҤ٤Ƥޤ

+

mcpp V.2.2 ޤǤϼνϤ򥵥ݡȤƤޤV.2.4 Ǻޤ

+
+ + +
MS-DOS Turbo C V.2.0
OS-9/6x09 Microware C
+

V.2.5 ǤϼνϤ˴ؤɥȤޤ

+
+ + +
DJGPP V.1.12 GCC V.2.7.1
MS-DOS LSI C-86 V.3.3 
+

V.2.6 ǤϾΣĤνϤ򥽡˼νϤ˴ؤɥȤȥޤ

+
+ + +
MS-DOS Borland C 4.0
Plan 9 pcc
+

V.2.6 ǤϤޤMS-DOS νϤξƥΤ򤹤٤ƺpre-C90 νϤΤޤ

+

V.2.7.2 ǤϼνϤΥݡȤޤ

+
+ +
Win32 Borland C 4.0
+

ŤϤǡ桼ϾʤʤäƤȻפΤǤ
+⤷νϤǥѥ뤹ϡcompiler-specific-build Ǥ¿꤬ɬפǴñǤϤޤ󤬡compiler-independent-build ʤ顢νϤ C90 λܼͤۤƤСΤ褦ˤƴñˤǤޤ

+

DJGPP ˤĤƤϡnoconfig.H SYSTEM, HOST_SYSTEM SYS_WIN32 ȤHAVE_INTMAX_T, HAVE_INTTYPES_H FALSE Ȥsystem.H NBUFF ǥեȤ 1/4 餤˲ޤ*1

+

MS-DOS νϤˤĤƤϡnoconfig.H SYSTEM, HOST_SYSTEM SYS_WIN32 ȤHAVE_LONG_LONG FALSE Ȥsystem.H NBUFF ǥեȤ 1/16 餤ˡIDMAX ǥեȤ 1/4 餤˲ޤ directive.c SBSIZE ǥեȤ 1/8 餤ˤޤơlarge memory model ǥѥ뤷ޤ
+MS-DOS Ǥϥ󤬸Τǡǥѥ뤷ƤƤ⡢Ĺʥޥ¿ʤɤ out of memory Ȥʤ뤳Ȥޤ

+

:

+

*1 DJGPP / GCC 4.1.0 ǤϤ mcpp V.2.6.1 򥳥ѥǤȤ𤬤롣

+
+ +

3.11. Compiler-independent-build Υѥ

+

mcpp ϤΩñΤư compiler-independent ǤȤƥѥ뤹뤳ȤǤޤ¿ξϥѥ뤵̤ФΤǴñǤCompiler-independent Ǥϼ¹Իץʤɤλͤϰǡϰ¸ʬϤޤOS ˤ㤬Ǥinclude directory UNIX Ϥ /usr/include, /usr/local/include ꤵʤΤǡȤϴĶѿ -I ץǻꤹɬפޤ*1, *2

+

configure Ȥ륷ƥ GCC ǥѥ뤹ñ mcpp Υ롼ȥǥ쥯ȥ

+
+./configure; make; make install
+
+

ȤФߤޤξ noconfig.H ǤϤʤ configed.H Ȥإåե뤬Ȥޤconfigure ξܺ٤ˤĤƤ INSTALL-jp 򻲾ȤƤ

+

configure λȤʤƥǤ mcpp Ǥ˰ܿƤϤǤϡnoconfig ǥ쥯ȥˤκʬեȤä noconfig.H 񤭴Фߤޤʳѹɬפޤmakefile noconfig ǥ쥯ȥˤΤ򥳥ԡƻȤޤ󥹥ȡ뤹ǥ쥯ȥ makefile BINDIR Ȥѿ˽񤭤ޤơsrc ǥ쥯ȥ make make install ޤ
+mcpp Ǥ˰ܿƤϤȥС󤬾㤦ξϡޤᤤСκʬեŬѤơԽޤ

+

mcpp ޤܿƤʤϤǤϡnoconfig.H ԽƿĤΥޥ񤭴񤭲äꤷƤޤHOST_COMPILER ŬޤơCOMPILER INDEPENDENT SYSTEM 򤽤 OS VERSION_MSG ŬޤåȽϤ¸ߤʤΤǡPART 1 ˤꤹ뤳ȤϤޤ

+

PART 2 mcpp 򥳥ѥ뤹ۥȽϤ Standard C λͤɤƤ뤫ɬפʴؿäƤ뤫ˤäơ꤬äƤޤǤ㤦Τ long long ȤμǤVisual C 2002, 2003, 2005 Borland C 5.5 Ǥ __int64 ȤˤʤäƤơͤ printf() ɽҤ VC 2005 ʳǤ j ll ǤϤʤ I64 ʤΤǡLL_FORM Ȥޥ "I64" ޤMinGW Ǥ long long ޤprintf() λҤ I64 Ǥ +Visual C 2008 Ǥ long long Ȥ̾Ȥ褦ˤʤޤ

+

stpcpy() ȤؿΤʤϤǤϡHOST_HAVE_STPCPY FALSE ޤ

+

makefile noconfig ǥ쥯ȥˤΤ򻲹ͤˤƽ񤤤Ƥ3.7 ⻲ȤΤȡˡ

+

Mac OS X ˤ x86 powerpc ΥХʥΥޥǺ褦ˡͥƥ֥ѥȥѥȤѰդƤޤ +ޤȤä universal binary ȤΤ褦ˤʤäƤޤ + x86 powerpc ѤΥХʥܤΥե«ͤΤǤ +λȤߤϾʣʤΤǡ3.1.4 compiler-specific-build compiler-independent-build ˤĤƤޤȤƤޤ

+

ʤmcpp V.2.6.3 sourceforge ΥȤ compiler-independent-build βफΥХʥꡦѥå󶡤褦ˤʤޤϤ줾Υѥå˸ͭˡǥѥå󥰤줿ΤǤΥѥå󥰻ͤϤ줾б륽ѥåˤե˽񤫤ƤޤFreeBSD, Linux, Mac OS X ѤΤΤϤ٤ƥѥˤ configure ץȤȤäƤޤ

+

:

+

*1 mcpp V.2.4, V.2.5 Ǥ compiler-independent ǤλͤȾüǡ +Ϥλͤб̤ΥޥɤȤƤΥץץåǤäV.2.6 ϽϤΩλͤȤ

+

*2 ѥ뤵̤ФȸäƤ⡢MS-DOS νϤǤϥ󤬸ΤǡѥϤǤƤ¹Ԥ out of memory ˤʤ뤳Ȥ롣MS-DOS Ǥ translation limits ˲ƥѥ뤷ʤФʤʤ3.10 򻲾ȡ

+
+ +

3.12. Subroutine-build Υѥ

+

mcpp ¾β餫Υᥤץफ饵֥롼ȤƸƤӽФ褦˥ѥ뤹뤳ȤǤޤΩץץåƱ褦ˡƤӽФ¹Իץꡢꤵ줿ϥեץץƽϥե˽ϤơƤӽФΤǤɬפʤʣΥեˤĤƷ֤ƤӽФȤǤޤƤӽФȥȡñ̤ΤȤ򤹤ΤǤϤޤ

+

֥롼ǤǤϡȤƥեǤϤʤΥХåեȤȤǤޤ

+

mcpp ΥϡMCPP_LIB Ȥޥ non-0 ƥѥ뤹ȡ֥롼ǤȤƥѥ뤵褦ˤʤäƤޤ֥롼 stand-alone Ǥ main() Τ褦 mcpp_lib_main() Ȥ̾ѤǤ

+
    int mcpp_lib_main( int argc, char ** argv);
+

GCC Ǥ COMPILER ޥ GNUC ǤϤʤ INDEPENDENT Τޤޤǥѥ뤷ޤGNUC ȤȡGCC libexec ǥ쥯ȥ˥󥹥ȡ뤵 GCC ƤӽФΤǤƤޤǤ
+¾ǡVisual C, Borland C, LCC-Win32 Ǥ COMPILER INDEPENDENT Ǥ MSC, BORLANDC, LCC ΤɤǤ⤫ޤޤ󡣤νϤǤϥץץåΩƤʤΤǡcompiler-specific-build ǤϤƤӽФ뤳ȤϤʤǤcompiler-specific-build ǤϽϸͭλޥ䥪ץ䤤ĤνϸͭλͤΤǡ줬ĤɤǥѥλӤޤ

+

ºݤ˥ѥ뤹μ configure script Ȥ noconfig/*.mak եȤȤʬޤ

+ +

3.12.1. configure

+

GCC ǥѥ뤹 configure Ȥޤ

+
+./configure --enable-mcpplib
+make
+sudo make install
+
+

ȤȡLinux FreeBSD Ǥ compiler-independent Ǥ libmcpp.a, libmcpp.so.$(SHLIB_VER) ơǥեȤǤ /usr/local/lib ˥󥹥ȡ뤵ޤ +ơlibmcpp.so libmcpp.so.0 libmcpp.so.$(SHLIB_VER) ؤΥ󥯤ĥޤ +*.a static 饤֥ꡢ*.so shared 饤֥Ǥ +libmcpp.la Ȥեޤ libtool Ȥġ뤬ȤΤΤǤ +$(SHLIB_VER) mcpp V.2.6.3 Ǥ 0.0.0V.2.6.4 Ǥ 0.0.1V.2.7 Ǥ 0.1.0V.2.7.1 Ǥ 0.2.0V.2.7.2 Ǥ 0.3.0 ȤƤޤ +mcpp_lib.h, mcpp_out.h Ȥإåե /usr/local/include ˥󥹥ȡ뤵ޤ + libmcpp ȤץɬפʤΤǤ

+

Mac OS X Ǥ *.so ǤϤʤ *.dylib Ȥ̾ˤʤޤ +ޤmake CFLAGS+='-arch i386 -arch ppc' ȡ-arch ץǤĤ CPU ꤹȡб universal binary Υ饤֥꤬Ǥޤ + -isysroot -mmacosx-version-min= ȤץȤäơȤ Mac OS X ΥСϰϤ򹭤뤳ȤǤޤ +ϡLeopard Tiger ȸߴ i386 ppc Ѥ universal binary shared 饤֥륳ޥɤǤ

+
+make CFLAGS+='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch ppc'
+
+

CygWIN, MinGW Ǥ *.so ǤϤʤ *.dll Ȥ̾ DLL Ȥʤޤ +CygWIN Ǥ libmcpp.a, libmcpp.dll.a, libmcpp.la /usr/local/lib ˡcygmcpp-0.dll /usr/local/bin ˥󥹥ȡ뤵ޤ +MinGW ۤȤƱǤcygmcpp-0.dll libmcpp-0.dll Ȥ̾ˤʤޤ +DLL ȤȤ libmcpp.dll.a 󥯤ޤ + import library ȤΤǤ

+

줿 libmcpp.so 󥯤 main_libmcpp.c Ȥñʥ⥳ѥ뤵ơmcpp Ȥ̾ /use/local/bin ˥󥹥ȡ뤵ޤ +ΥǤ狼褦ˡlibmcpp Ȥˤ mcpp_lib.h Ȥإåե include ޤ*1

+

Ǿ¤ΥɥȤ⥤󥹥ȡ뤵ޤ

+

testmain.c 򥳥ѥ뤷ƥ饤֥ȥ󥯤ȡ⤦ʣʥƥȤǤޤ + configure ǤϤʤΤǡˡǹԤޤ

+

:

+

*1 libmcpp Ȥʤ stand-alone Ǥ compiler-independent-build mcpp Ʊ̾Ʊǥ쥯ȥ˥󥹥ȡ뤵Τǡߤ˾񤭤礦Ȥˤʤ롣 +ɥȤƱΤƱǥ쥯ȥ˥󥹥ȡ뤵Τǡ񤭤롣

+ +

3.12.2. noconfig/*.mak Ȥ

+

noconfig.H noconfig ǥ쥯ȥ makefile Ȥϡnoconfig.H ˤνϤΥСѤ patch Ƥơmakefile γƥǥ쥯ȥʬΥƥ˹碌ƽǡˡΤ褦ˤޤ +

+make MCPP_LIB=1 mcpplib
+make MCPP_LIB=1 mcpplib_install
+
+ compiler-independent ǤΥѥǤGCC ʳǤ COMPILER=MSC Ȥ compiler-specific Ǥǥѥ뤷Ƥ⤫ޤޤ
+Visual C Ǥ make ǤϤʤ nmake Ȥޤ
+LCC-Win32 make 㵡ǽ if ʸˤʬǤʤΤǡmakefile Խʤ make ɬפޤ

+

Linux, FreeBSD, Mac OS X, CygWIN, MinGW Ǥϡlibmcpp.la ʤΤȥɥȤ󥹥ȡ뤵ʤʳϡconfigure make Ʊͤη̤ˤʤޤ +Mac OS X Ǥϡmac_osx.mak UFLAGS Ȥѿ򥳥ȥȤƤ # 򳰤ȡuniversal binary ˤʤޤ +Windows νϤǤϥ饤֥̾ Linux ȤϰäơΤ褦ˤʤޤ

+ + + + + + +
FreeBSD / GCCLinux / GCCMac OS X / GCCCygWIN / GCCMinGW / GCCVisual C, Borland C, LCC-Win32
static librarylibmcpp.alibmcpp.alibmcpp.alibmcpp.alibmcpp.amcpp.lib
shared library or DLLlibmcpp.so.$(SHL_VER)libmcpp.so.$(SHLIB_VER)libmcpp.$(SHLIB_VER).dylibcygmcpp-$(DLL_VER).dlllibmcpp-$(DLL_VER).dllmcpp$(DLL_VER).dll
import library of DLLlibmcpp-$(DLL_VER).dll.alibmcpp-$(DLL_VER).dll.amcpp$(DLL_VER).lib
+ +

$(SHL_VER) mcpp V.2.6.3, V.2.6.4 Ǥ 0V.2.7 Ǥ 1V.2.7.1 Ǥ 2V.2.7.2 Ǥ 3 Ǥ +$(SHLIB_VER) mcpp V.2.6.3 Ǥ 0.0.0V.2.6.4 Ǥ 0.0.1V.2.7 Ǥ 0.1.0V.2.7.1 Ǥ 0.2.0V.2.7.2 Ǥ 0.3.0 Ǥ +$(DLL_VER) mcpp V.2.6.3, V.2.6.4, V.2.7, V.2.7.1, V.2.7.2 Ȥ 0 Ǥ +$(SHLIB_VER) Σܤޤ $(DLL_VER) Ʊϡ$(SHLIB_VER) Σܰʹߤι⤤С㤤Сξ̸ߴδطˤޤ

+

Windows νϤǤ import library ȤΤޤ DLL ȤΤΤǤ +DLL ȤȤϤ import library 󥯤ޤ +Static library import library makefile ǻꤵ줿 $(LIBDIR) ˡDLL Τ $(BINDIR) ˥󥹥ȡ뤵ޤ +DLL $(BINDIR) ˥󥹥ȡ뤹ΤϡWindows Ǥ DLL ϼ¹ԥץ PATH ̤äǥ쥯ȥˤʤФʤʤǤ +

mcpp_lib.h, mcpp_out.h $(INCDIR) ˥󥹥ȡ뤵ޤ

+

饤֥Ǥ󥯤 main_mcpplib.c ⥳ѥ뤵 mcpp Ȥ̾ $(BINDIR) ˥󥹥ȡ뤵ޤ +Windows νϤǤϤ 'DLL_IMPORT=1' ȤץꤹȡDLL Ǥ mcpp 󥯤ޤ

+

Τ褦ˤȡtestmain.c ȤץᥤץȤƥ饤֥Ǥ mcpp 󥯤ޤ

+
+make testmain
+make testmain_install
+
+

testmain.c ˤϥΥХåե˽Ϥ񤤤Ƥޤ +˽Ϥˤϡᥤץ mcpp_lib.h Ȥإåե include ơƤؿȤޤ +嵭Υޥɤ 'OUT2MEM=1' Ȥץդäȡtestmain.c Ǥ줬ͭˤʤޤ +OUT2MEM Ȥޥñ testmain.c ΤΤΤǡmcpp ΤˤϤΥޥɬפޤ

+

饤֥ǤȤȤϡtestmain.c 򻲹ͤ main ץ񤭡noconfig/*.mak 򻲹ͤ makefile 񤤤Ƥ

+ +

3.12.3. static library shared library DLL

+

饤֥ˤ static library shared libraryWindows Ǥ dynamically-linking library: DLLˤȤޤ +Static library *.o (*.obj) ե򽸤᤿Τǡѥ˥󥯤ޤ +ѿؿ global name ϤΤޤ޸ƤӽФ¦ global name Ȥʤꡢ̾ξͤδ⤢ޤ +ΤȤϡV.2.6.1 ޤǤϥ饤֥경ͽꤻ˳ȯƤ mcpp ˤȤäƤ礭Ȥʤޤ +Ф shared library (DLL) ϼ¹Ի˥󥯤Τǡ¾Υץȶͭޤ

+

Windows DLL Ǥϥ饤֥ global name ϳϸŪ export 줿̾ import ǽǤ +mcpp ξ mcpp_lib.h ˤ̾ import Ǥޤ

+

UNIX shared library Ǥϡ̤ˤϥ饤֥ global name ϳݸǡ̾ξͤ˿ФȤʤФʤޤ +GCC 4.0 ʹߤ mcpp V.2.7 ʹߤ򥳥ѥ뤷ϡmcpp_lib.h ˤ̾ʳϳϸޤ*1, *2

+

ȤǡWindows Ǥ DLL ȤUNIX Ǥ GCC 4.0 ʹߤǥѥ뤷 shared library ȤΤ̾ξͤ餺¿Ǥ

+

:

+

*1 mcpp V.2.7 ʹߤǤ GCC V.4.0 Ǽ줿 #pragma GCC visibility * Ȥǥ쥯ƥ֤Ȥ褦ˤǤ롣

+

*2 ʤGCC V.4.1 ʹߤˤ -fstack-protector Ȥץ󤬤뤬 #pragma GCC visibility hidden ȤξΩʤ褦Ǥ롣 +äơlibmcpp ΥѥǤϻȤʤ

+
+ +

4. ƽϤ˰ܿˡܺ

+ +

4.1. noconfig.H, configed.H, system.H

+

Υإåե˵ҤƤ뤳Ȥΰ̣ϡƤɤФ狼ȻפޤȤ¿񤭹ǤޤǰΤ˰ʲ񤤤Ƥޤ
+ PART 1, PART 2 noconfig.H (configed.H) ˤꡢPART 3 system.H ˤޤ

+

ޤåȥƥmcpp ܿ륷ƥˤȥۥȥƥmcpp 򥳥ѥ뤹륷ƥˤꤷޤ

+
    +
  • SYSTEM
    +åȽϤưϣӤꤷޤϣӤ̾ϤľƤޤ̾ƤʤϣӤŬƤ
    +
  • COMPILER
    +åȽϤꤷޤѥ̾ϤľƤޤ̾ƤʤѥŬƤCOMPILER INDEPENDENT ȡåȽϤ¸ߤʤ compiler-independent Ǥ mcpp ޤξ PART 1 ¿̵꤬뤵ޤ
    +
  • VERSION_MSG
    +-v ץ usage() ʸɽ뤿ΥۥȽϤΥСʸƥǽ񤭤ޤ
    +
  • HOST_SYSTEM, HOST_COMPILER
    +ۥȣϣӡۥȽϤꤷޤåȤƱϡ
    +
    +#define HOST_SYSTEM     SYSTEM
    +#define HOST_COMPILER   COMPILER
    +
    +ȤƤޤ
    +
+

SYSTEM, COMPILER ̿̾ˤϰε§ޤ򸫤ۤ狼䤹Ǥ礦ġˤʤäƤޤSYSTEM ϥ󥯥롼ɥեΥѥꥹȤηϣɸΥ󥯥롼ɥǥ쥯ȥΤ뤿ˤȤƤʤΤǡޤͤɬפϤޤ

+ +

4.1.1. PART 1 åȥƥ: compiler-specific-build

+ +

4.1.1.1. ޥ

+
    +
  • SYSTEM_OLD, SYSTEM_STD1, SYSTEM_STD2, SYSTEM_EXT, SYSTEM_EXT2, COMPILER_OLD, COMPILER_STD1, COMPILER_STD2, COMPILER_EXT, COMPILER_EXT2
    +mcpp predefine ϸͭΥޥ̾ʸƥǻꤷޤפʤΤʤǤޤ0 ĤΥȡƤϤʤˡ*_OLD Τ '_' (underline) ǻϤޤʤŤήΥޥǡ mcpp ¹Ի -S <n> ץ <n> 1 ʾꤹ predefine ޤʤGCC-specific-build STD ⡼ɤǤϡ-ansi ޤ -std=iso* ץ󤬻ꤵʤ¤ꡢΥޥˡ +*_STD?, *_EXT, *_EXT2 Ǥɬ _ ǻϤޤޥ̾ꤷޤ*_STD1 __ ǻϤޤΤǡ*_STD2 __ ǻϤޤä __ ǽΤǤSYSTEM_EXT, SYSTEM_EXT2, COMPILER_STD1, COMPILER_STD2, COMPILER_EXT, COMPILER_EXT2 ǤϤΥޥͤ SYSTEM_EXT_VAL, SYSTEM_EXT2_VAL, COMPILER_STD1_VAL, COMPILER_STD2_VAL, COMPILER_EXT_VAL, COMPILER_EXT2_VAL ǻꤷޤ "" ǰϤʸƥǻꤷޤ0 ĤΥȡŸޥ "" ޤꤵʤСΥޥͤ 1 ˤʤޤ¾ predefined ޥSYSTEM_OLD, SYSTEM_STD1, SYSTEM_STD2, COMPILER_OLD ǻꤵΡˤϤ٤ 1 ͤޤ
    +
  • SYSTEM_SP_OLD, SYSTEM_SP_STD
    +ϸͭüʻޥ̾ʸƥǽ񤭡ͤ SYSTEM_SP_OLD_VAL, SYSTEM_SP_STD_VAL ޤ
    +
  • COMPILER_SP1, COMPILER_SP2, COMPILER_SP3
    +ϸͭüʻޥ̾ʸƥǽ񤭡ͤ COMPILER_SP1_VAL, COMPILER_SP2_VAL, COMPILER_SP3_VAL ޤ
    +
  • COMPILER_CPLUS, COMPILER_CPLUS_VAL
    +-+ ץC++ ץץˤꤷϸͭλޥ̾Ȥͤ嵭Ʊ褦ʸƥǻꤷޤCOMPILER_CPLUS_VAL ꤷʤȡΥޥͤ 1 ˤʤޤ̾ '_' ǻϤޤΤǤʤФʤޤɬפʤ COMPILER_CPLUS ΤΤʤǤޤ
    +
+

Τۤ¹Իץ˱ system.c ޥ⤢ޤCPU-dependent ʥޥʤɤǤGCC V.3.3 ʹߤǤ̤λޥΤǡȤ̤ mcpp_g*.h Ȥ̾ΣܤѤΥإåե뤬 mcpp Υ󥹥ȡ˼ưŪޤ

+

ʾǻ줿ޥϤ٤Ƽ¹Իˤ -N ץ̵Ȥʤޤ

+ +

4.1.1.2. Include ǥ쥯ȥ

+
    +
  • C_INCLUDE_DIR1, C_INCLUDE_DIR2, CPLUS_INCLUDE_DIR1, CPLUS_INCLUDE_DIR2, CPLUS_INCLUDE_DIR3
    +mcpp ǥɸإåե include directory ꤷޤCPLUS_INCLUDE_DIR? C++ include directory äΤΤȰäƤˡꤷޤmcpp ư -+ ץꤹ뤳ȤͭȤʤˡUNIX /usr/include, /usr/local/include system.c ꤵΤǡC_INCLUDE_DIR? ˤϤʳνϸͭΤΤꤷޤ
    +
  • ENV_C_INCLUDE_DIR, ENV_CPLUS_INCLUDE_DIR
    +mcpp ǥɸإåե include directory ¹Ի˴ĶѿǻꤹΤˡδĶѿ̾ޤENV_CPLUS_INCLUDE_DIR C++ include directory ꤹĶѿ̾ǤǥեȤǤϤ줾 "INCLUDE", "CPLUS_INCLUDE" ޤGCC-specific-build Ǥ "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH" ǥեȤǤ
    +ѥϤγsystem.c ꤵΡ-I ץꤵΤޤʤ̤ͥˤĤƤ mcpp-manual.html#4.2 򻲾ȡˡ
    +
  • ENV_SEP
    +δĶѿʣΥѥ񤯻 separator ʸǽ񤭤ޤ
    +/usr/local/abc/include:/usr/local/xyz/include Ƚ񤯻 ':'
    +C:/BC55/INCLUDE;C:/BC55/LOCAL/INCLUDE Ƚ񤯻 ';' Ǥ
    +
  • SEARCH_INIT
    +åȽϤ include ե򥵡Υ롼񤭤ޤ#include "../dir/header.h" Ȥäǥ쥯ƥ֤ˡinclude ǥ쥯ȥ򥵡ˤɤΥǥ쥯ȥ򥵡ΤȤ롼Ǥȥǥ쥯ȥ꤫Хѥ򥵡ϤǤ CURRENT Ȥեinclude ˤΤǥ쥯ȥ꤫Хѥ򥵡ϤǤ SOURCE ȤޤξԤȹ碌Ǥ (CURRENT & SOURCE) Ȥޤ
    +
+ +

4.1.1.3. ֹνϷ¾

+
    +
  • LINE_PREFIX
    +mcpp compiler-proper ˥ե̾ȹֹꤷޤ
    +
    +#line 123 "fname"
    +
    +ȤäΥηǥեȤȤʤäƤޤ¾ηȤϤǤϡ "#line " ʬ֤ sequence ʸƥǽ񤤤Ƥޤ
    +
    +# 123 "fname"
    +
    +Ȥʤ "# " ɤǤʤȼηʤ餽˹碌ޤʾˤäƤ main.c sharp() ˽­ʤФʤʤ⤷ʤˡ
    +Visual C++ .net Borland C Τ褦ʣѥѥʤ mcpp ȤϡȤ߹ߥץץå˽ϤϤȤˤʤΤǡmcpp νϤϣäΥˤʤäƤʤФʤޤ󡣤äơֹμϤϣܤηǤʤФʤޤ
    +
    +
  • EMFILE
    +<errno.h> too many open files (for the process) ̣ errno ͤɽޥ EMFILE ǤʤϡEMFILE 򤽤Υޥ̾ޤʤ<errno.h> Τ˽񤭲äƤ⤫ޤʤˡ
    +
  • ONE_PASS
    +åȽϤץץåʬΥƤʤ֥ѥѥפǤФ TRUE ˡǤʤ FALSE ޤ TRUE Ȥȡ#pragma MCPP put_defines (#put_defines) ǤϡϤλޥϤ٤ƥȤǰϤǽϤޤѥѥǤ mcpp νϤ򤳤ͿȺ٥ץץ뤳ȤˤʤΤǡ򤱤뤿Ǥ
    +GCC V.3, V.4 ϥѥѥȤޤΩץץåȤȤǤΤǡΥޥ FALSE ȤƤޤ
    +
  • FNAME_FOLD
    +Windows Τ褦˥ե̾ʸȾʸ̤ʤϣӤǤϤ TRUE Ǥʤ FALSE Ȥޤ
    +
+ +

4.1.1.4. Ϥθͤ˱

+
    +
  • EXPAND_PRAGMA
    +#pragma Ԥΰ STDC ʳǤХޥŸоݤȤʤϤǤϡ TRUE ޤǥեȤǤ FALSE ȤƤޤVisual C, Borland C Ǥ #pragma ԤΰϾ˥ޥŸоݤȤʤΤǡ TRUE ȤޤC99 Ǥ #pragma ΰޥŸоݤȤʤ뤫ɤ implementation-defined ǡC90 ǤϥޥŸʤΤʤΤǤmcpp Visual C, Borland C Ѥ˸¤äƤ C99 ǤʤƤޥŸоݤȤޤʰ STDC ޤ MCPP ǻϤޤʤ¤ˡ
    +
    +
  • HAVE_DIGRAPHS
    +Digraphs Ƥ TRUEǤʤ FALSE Ȥޤ
    +
  • STDC
    +åȽϤλޥ __STDC__ Υǥեͤޤ__STDC__ Ƥʤ 0 Ȥޤ
    +
  • STDC_VERSION
    +åȽϤλޥ __STDC_VERSION__ Υǥեͤޤ__STDC_VERSION__ Ƥʤ 0L Ȥޤ
    +
    +
  • CHARBIT, UCHARMAX, LONGMAX, ULONGMAX
    +åȽϤ <limits.h> CHAR_BIT, UCHAR_MAX, LONG_MAX, ULONG_MAX ͤ񤭤ޤ
    +limits.h UCHAR_MAX ϴְäƤ礬ΤǡդɬפǤ255U, 0xffU unsigned ˤƤϤޤ255, 0xff signed int ͤޤcpp-test.html#5.1.3 ȡˡ +
+ +

4.1.1.5. Multi-byte character

+

MBCHAR Ȥޥ multi-byte character encoding ꤹΤǤmcpp Ǥϲο encoding ٤Ʊ˼ޤMBCHAR ϥǥեȤ encoding ꤹǡ¹Ի encoding Ķѿץ#pragma ѹ뤳ȤǤޤʻȤˤĤƤ mcpp-manual.html#2.3, mcpp-manual#2.8, mcpp-manual.#3.4 򻲾ȡˡ

+
    +
  • MBCHAR
    +åȤ multi-byte characterܸǤϴˤ encoding μޤ
    +
    + + + + + + + + +
    EUC_JP ܤ extended UNIX code (UJIS)
    SJIS ܤ shift-JIS (MS-Kanji)
    GB2312 EUC-like GB-2312ʴλ
    BIGFIVE Ѥ Big5λ
    KSC5601 ڹ EUC-like KSC-5601 (KSX 1001)
    ISO2022_JPISO-2022-JP1 Ȥݵʤܸ
    UTF8 unicode encoding ΣǤ UTF-8
    +
    +ΣĤϤ shift-states ʤʸХȤ encoding Ǥʤmulti-byte character, wide character encoding ХȤǤˤ⤫餺wchar_t ХȤηˤʤäƤϤ⤢ޤץץå wchar_t ηˤϴΤޤ󡣥Ǥ multi-byte character wide character ХȤƤΤǡ˽äƽ򤷤ޤ
    +ISO-2022-* shift-states encoding ǤUTF-8 ϣХȤ unicode 򣱥ХȤʤХȤ encode ΤǤϣХȤˤʤޤ
    +MBCHAR 0 硢multi-byte character ν򤷤ʤΤǥեȤλͤˤʤǡĶѿץ#pragma Ǽ¹Իѹޤ
    +
    +
  • SJIS_IS_ESCAPE_FREE
    +ѥΤ shift-JIS ν򤹤 TRUE Ȥʤ FALSE Ȥޤ
    +Shift-JIS ǤϴΣХܤ '\\' Ʊ 0x5c ͤˤʤ뤳ȤޤѥΤ shift-JIS ǧʤϡ escape sequence ȲᤷƤޤtokenization ǥ顼ˤʤޤ
    +SJIS_IS_ESCAPE_FREE FALSE Ȥȡmcpp 䤤ޤʤǽϤλˡʸƥޤʸ shift-JIS 裲ХȤ 0x5c Ǥäϡ 0x5c ΥХȤ⤦ղäޤˤäơѸǤΥѥ shift-JIS б뤳ȤǤޤ
    +
  • BIGFIVE_IS_ESCAPE_FREE
    +ƱͤˡѥΤ Big 5 ν򤹤Ϥ TRUE Ȥʤ FALSE Ȥޤ
    +
  • IS02022_JP_IS_ESCAPE_FREE
    +ƱͤˡѥΤ ISO-2022-JP ν򤹤Ϥ TRUE Ȥʤ FALSE ȤޤIS0-2022-* Ǥ '\\' ФǤʤ'\'' '"' ȰפХȤиޤISO2022_JP_IS_ESCAPE_FREE FALSE ξ mcpp ϡ'\\', '\'', '"' ȰפХȤľˤ٤ 0x5c ΥХȤ򣱤ޤ
    +
+

ʤmulti-byte character ˴ؤ륳ѥưϼ¹ԤδĶˤäѤ礬ޤʬλȤĶ˹碌ꤷƤˤĤƤϡmcpp-manual.html#2.8 ⻲ȤƤ

+ +

4.1.1.6. åȤȥۥȤ˶̤

+

ΣĤص塢PART 2 ˽񤤤Ƥޤ +åȽϤȥۥȽϤηľ TRUE ȤǤʤ FALSE Ȥޤ

+
    +
  • HAVE_LONG_LONG
    +long long ȤǡĽϤǤϤ TRUE Ȥޤ
    +Visual C 2005 ޤǤ Borland C 5.* Τ褦ˡlong long Ϥʤ __int64 ȤƱη printf() ɽ뤿 length modifier ѰդƤϡ TRUE Ȥޤ +Visual C 2008 Ǥ long long Ȥޤ
    +
  • HAVE_INTMAX_T
    +intmax_t ȤǡƤФ TRUE Ȥޤ
    +
    +
  • LL_FORM
    +νϤ long long äƤϡۥȽϤκͤ printf() ɽ뤿 length modifier ʸƥޤC99 Ǥ "j" ǤޤC99 Ǥ long long length modifier "ll" (ell-ell) ǤVisual C 2003 ޤǤ Borland C 5.* Ǥ __int64 ͤɽ "I64" ȤޤMinGW Ǥ "I64" Ǥ
    +
+ +

4.1.2. PART 2 ۥȥƥ

+

noconfig.H, configed.H ǤϥåȽϤȥۥȽϤȤƱǤȲꤷƤޤۤʤ PART 2 ľɬפޤ

+
    +
  • HOST_HAVE_STPCPY
    +ۥȽϤΥ饤֥ stpcpy() TRUE ˡʤ FALSE ޤFALSE Ǥ stpcpy() ˤ system.c ΤΤȤޤ
    +
  • PATHMAX
    +ۥȽϤ <limits.h> PATH_MAX ͤǤ + POSIX ǵꤵƤޥǤ줬ʤϤǤ <stdio.h> FILENAME_MAX ͤȤޤ
    +
+

PART 1 ˤۥȤȥåȤƱȲꤷƤʬΤǡɬפʤ餽񤭴ޤ㤨мΤ褦˥ۥȽϤλޥȤäƤԤǤ

+
+#if _MSC_VER >= 1200
+
+ +

4.1.3. PART 3 mcpp ưͤ

+ +

4.1.3.1. Ƽư⡼

+

system.H Ǥ mcpp ưͤꤹޥƤޤ

+

mcpp ˤ mcpp_mode Ȥѿꡢ줬ޥŸˡȤǥ쥯ƥ֡Ȥ predefined ޥץץåκȤʤưλͤƤޤmcpp_mode ͤˤ OLD_PREP, KR, STD, POST_STD Σ郎ޤ
+mcpp ư⡼ɤϼ¹Իץǻꤵޤmcpp 򥳥ѥ뤹ˤϡΣĤΥޥˤĤƤϲꤹ뤳ȤϤޤ󡣤ƼԤˤϣĤưͤΰ㤤򤹤뤳ȤɬפǤ
+Τۤ COMPAT ⡼ɤ⤢ޤ STD ѼǤ

+
    +
  • OLD_PREP
    + "Reiser" model cpp ưͤǤ
    +
  • KR
    +C90 K&R 1st. ΥץץͤǤ
    +
  • STD
    + (C90, C99, C++98) ΥץץͤǤ
    +
  • POST_STD
    +ɮԤ˺äץץͤǡʤμӤʤñ㲽ΤǤ
    +
+

Ǥ KR OLD_PREP 碌 pre-Standard ⡼ɡSTD POST_STD 碌 Standard ⡼ɤȸƤ֤Ȥˤޤƥ⡼ɤλͤξܺ٤ˤĤƤ mcpp-manual.html#2.1 򻲾ȤƤ

+ +

4.1.3.2. ư⡼ɤκλ

+
    +
  • CPLUS
    +-+ ץ C++ ΥץץåȤưˡɸȤ߹ߥޥ __cplusplus ͤ˻ޤC++98 Ǥ 199711L Ǥ-V ץˤäƼ¹ԻѹǤޤ
    +
  • TRIGRAPHS_INIT
    +STD ⡼ɤǤ trigraph ν֤ꤷޤ-3 ץϤξ֤ȿžޤ TRUE ˤȡdefault trigraph ǧ졢-3 ץǵưǧޤFALSE ξϵդ default ǧ-3 ץǧ褦ˤʤޤ
    +
  • DIGRAPHS_INIT
    +Standard ⡼ɤǤ digraph ν֤ꤷޤ-2 ץϤξ֤ȿžޤ TRUE ˤȡdefault digraph ǧ졢-2 ץǵưǧޤFALSE ξϵդ default ǧ-2 ץǧ褦ˤʤޤ
    +HAVE_DIGRAPHS == FALSE νϤξ硢digraphs mcpp ̾ΥȡѴޤ
    +
  • OK_UCN
    +STD ⡼ -V199901L ޤ -+ ץꤷ UCN (universal-character-name) ͭˤˤϡ TRUE ޤǥեȤǤ TRUE ȤƤޤ*1
    +
  • OK_MBIDENT
    +STD ⡼ -V199901L ץꤷȤ identifier multi-byte character Ȥ褦ˤˤϡ TRUE ޤǥեȤǤ FALSE ȤƤޤ
    +
    +
  • expr_t, uexpr_t
    +Ǥ礭η typedef ޤintmax_t, uintmax_t ȤФˡǤʤ long long, unsigned long long ĽϤǤϤˡǤʤ __int64, unsigned __int64 ĽϤǤϤˡǤʤ long, unsigned long ޤ
    +
  • EXPR_MAX
    +uexpr_t κͤޤ
    +
+

:

+

*1 UCN C++, C99 λͤǡUnicode ʸͤ \u ޤ \U ǻϤޤ룱 escape sequence ɽΤǤmcpp-manual.html#3.7, cpp-test.html#2.8, cpp-test.html#4.6 ȡˡ +

+ +

4.1.3.3. Translation limits λ

+
    +
  • RESCAN_LIMIT
    +Standard ⡼ɤǤΥޥŸκθ٤ޤ +Standard ⡼ ǤϺϾʤΤǡޤ礭ͤꤹɬפϤޤ
    +
  • PRESTD_RESCAN_LIMIT
    +pre-Standard ⡼ɤǤΥޥŸκθ٤ޤpre-Standard ⡼ ǤϺƵŪʥޥŸˤä̵¥롼פȯޤ줬ΥߥåȤˤҤäޤ
    +
  • NBUFF
    +ԡʥʪԤι \ ä³ԡˤκĹ +1 ޤȤ a space ѴιԡʥȤˤäʣԤˤޤ뤳Ȥ⤢ꤦˤ⤳ĹˤޤäƤʤФʤޤ
    +
  • NMACWORK
    +ޥŸŪʥХåեΥޤʤĤΥޥŸ̡ʥޥƤӽФʣԤˤޤϡŸ̡ˤϤΥˤޤäƤʤФʤޤ󡣤ϤޤĤΥޥִꥹȤŪ˵ݤκĹȤƤȤޤ NBUFF*2 ʾ NWORK*2 ʾǤʤФʤޤ
    +
  • NWORK
    +mcpp νϤĹޤ compiler-proper μĹ+1 ۤƤϤޤ󡣤ޤNBUFF ͤۤƤ⤤ޤ󡣥ޥŸιĹۤϡmcpp ʲιĹʬ䤷ƽϤޤʸƥĹ NWORK-2 ϰϤ˼ޤäƤʤФʤޤʸƥĹȤΤϡchar ǿΤȤǤϤʤǤʸƥȤȡĹǤ롣ξü " ޤߡ\n ϣХȤȿ롣磻ʸƥǤƬ L ޤˡ
    +GCC Ǥ Visual C ǤǤϽϤκĹȤƤ NWORK ǤϤʤ NMACWORK Ȥޤ +νϤǤϥѥ餬ʤĹԤ뤳ȤǤΤǡʬ䤷ƽϤɬפʤǤ
    +
  • IDMAX
    +̻ҤκĹޤĹ̾⥨顼ˤϤʤޤ󤬡Ĺڤͤޤ
    +
  • NMACPARS
    +ؿͥޥΰκޤ UCHARMAX 礭ϤǤޤ
    +
  • NEXP
    +#if ԤμΥåǤͥȥ٥θ٤ޤϥͥȥ٥뤬ľܷޤ櫓ǤϤʤΤˤϡȡοΣܡ黻ҥȡοΣܤޤǻȤ롣äϰФǣĤȿˡ
    +
  • BLK_NEST
    +#if (#ifdef, #ifndef) section Υͥȥ٥θ١#if, etc. ʳ˥ͥȤǤ뤫ˤޤ
    +
  • INCLUDE_NEST
    +#include Υͥȥ٥θ٤ޤ#include ̵ºƵå뤿ΤΤǤƱ˥ץǤեο˴ؤ OS ¤ĶƤƤ⤫ޤޤ
    +
  • SBSIZE
    +ޥŪ hash ʬषƵݤ hash table ǿޤɬΥ٥ǤʤФʤޤ󡣥ޥο꾮Ƥưˤޤ礭ۤϤ®ʤޤ
    +
+

줾礭ͤˤۤɻͤϾˤʤޤNWORK, NBUFF, NMACWORK, SBSIZE 礭Ȥ礭ʥ򿩤ޤºݤΥϥޥ̤ˤäƤƤ椭ޤʤ줾ΥޥĹˤäɬץ꤬ޤ롣ޥŪʷ internal.H struct defbuf ˽񤤤Ƥˡ

+

NMACWORK, NEXP, RESCAN_LIMIT ϥå񤷤ޤ
+¾ΤΤϥϤۤɬפȤޤ󤬡system.H ΥǥեȤͰʾˤƤѾΰ̣ϤۤȤɤʤǤ礦

+

C90, C99 ׵᤹ translation limits κ٤ system.H κǸΤۤ˽񤤤ƤޤC++98 translation limits 񤤤ƤޤϣäȰۤʤꡢ׵ͤǤϤޤ

+
+ +

4.2. system.c

+

ȤƥåȽϤ˴ؤ뤤ĤƤޤ

+
    +
  • PATH_DELIM
    +ϣӤ path-delimiter ƤޤPATH_DELIM \ ȤƤϤޤʥץΤĤǡˡWindows Ǥ / ȤƤޤ桼ץǤϤ \ ȤޤŪˤ / Ѵޤ
    +
  • OBJEXT
    +Ϥ뤤륪֥ȥեҤʸƥޤUNIX νϤ "o"Windows νϤ "obj" Ǥ -M* ץꤷ makefile Ѱ¸طԤνϤ˻ȤΤǤ
    +
    +
  • do_options()
    +mcpp ưΥץƤޤޤܿƤʤϤ˰ܿˤϡν°Υѥɥ饤Ф˹碌ơ˲Ԥ­ȤɬפǤ礦do_options() ɲäϡбƼ set_opt_list(), usage() ˤ­ޤ
    +do_options() mcpp_getopt() ƤӽФޤmcpp_getopt() POSIX getopt() ƱͤǤ +ΤᡢĤΥץʸϰʤΤɤ餫˷ʤФʤޤ-P -P- ȤäץλȤϸ§ȤƤǤޤʤ°ΥץץåȤθߴΤɬפʾϡ̵Ǥʤʤ-M ץμ򻲾ȡˡޤ-trigraphs ȤäĹץ t 򥪥ץʸȤ rigraphs Ȥ뤳ȤǼ뤷ޤ
    +
  • set_opt_list()
    +do_options() ǻȤץʸꤷޤ
    +
  • usage()
    +Usage ʸ񤫤Ƥޤ +⡼ɤȤΥץ󤬥ե٥åȽ¤٤Ƥޤ
    +
  • set_sys_dirs()
    +Include directory ꤷƤޤnoconfig.H (configed.H) Υޥ C_INCLUDE_DIR?, CPLUS_INCLUDE_DIR? ǻꤵ줿ϸͭΥǥ쥯ȥΤۤUNIX ϣϣӤǤ /usr/include, /usr/local/include ⤳ꤷƤޤnoconfig.H, configed.H Υޥ ENV_C_INCLUDE_DIR, ENV_CPLUS_INCLUDE_DIR 줿̾δĶѿˤ include directory set_env_dirs() ꤵˡ
    +
    +
  • do_pragma()
    +#pragma νƤޤmcpp Ȥʤ #pragma sub-directive ϤΤޤ޽Ϥ compiler-proper Ϥޤmcpp Ȥ #pragma MCPP debug ϤƤӽФؿǽޤmcpp Ȥ #pragma sub-directive ϸ§Ȥ MCPP Ȥ̾ǻϤޤ褦ˤƤޤMCPP ǻϤޤ #pragma ԤΤΤϽϤޤ󡣤ޤ #pragma once Ϥޤ󡣤#pragma __setlocale ԤϽϤޤʤǤϽϸͭγĥ directive #pragma sub-directive ȤƼ뤳ȤˤʤäƤޤ
    +
  • do_old()
    +ʤ˹פʤ preprocessing directive #pragma sub-directive Ǥʤ #assert, #asm, #endasm, #include_next, #warning, #put_defines, #debug ˤɬפʾϡν򤹤ؿ­ǡ餽ƤӽФ褦ˤޤʤGCC ѤǤ #include_next, #warning STD ⡼ ǤȤ褦ˤƤˡ
    +
+

Standard C ˤϤʤ饤֥ؿΤgetopt() stpcpy() Υ˽񤤤Ƥޤ +getopt() ϥ󥯤Υȥ֥ɤᡢmcpp_getopt() ̾ѤƤޤ +stpcpy() HOST_HAVE_STPCPY FALSE λ˻Ȥޤ

+
+ +

4.extra. malloc()

+

kmmalloc -- ǥХåǽ malloc()פȤΤϡ䤬äǽ񤤤 malloc(), free(), realloc(), calloc() portable ʥǤϥΨȤȤˡǥХåΤĤͤƽ񤤤ƤޤǥХåѤΥ롼źդƤޤ󥯤Ƥȡפ̥ХҤääƤ뤳Ȥޤ*1, *2

+

noconfig/*.mak -DKMMALLOC -D_MEM_DEBUG -DXMALLOC ȤץͿƤΤϡλ malloc() ȥǥХå롼󥯤뤿ΤΤǤ󥯤 mcpp EFREEP, EFREEBLK, EALLOCBLK, EFREEWRT, ETRAILWRT Ȥ顼ֹ exit 뤳ȤС mcpp ΥХ̣ޤ
+

BSD_MALLOC, DB_MALLOC, MALLOC_DBG ȤޥΤɤ줫 1 mcpp 򥳥ѥ뤹ȡ malloc() Ȥ̤Τ줾ǥХåǽä malloc() ȤޤˤƤ⡢°ΤΤǤϤʤ malloc() Ȥˤϡѥ뤹˥饤֥äƤʤФʤޤ󡣤ˤĤƤ kmmalloc ΥɥȤ򸫤Ƥ

+

:

+

*1 kmmalloc ϼΤȤˤ롣 +

+
+

http://download.vector.co.jp/pack/dos/prog/se026997.html

+
+

*2 CygWIN Ǥϥ饤֥ȤΩƤ¾ malloc() Ȥʤ褦ˤʤäƤΤǡ malloc() ϻȤäƤʤ +Visual C 2005, 2008 ǤƱͤǤ롣

+
+ +

5. ХȰܿ

+ +

5.1. Хɤ

+

ץץ Standard C Ŭ򸡾ڤ뤿 Validation Suite mcpp Ȥä˸ƤޤStandard C ΥץץΤ٤Ƥε򸡾ڤǤΤˤĤǤmcpp ϤȤäƥåƤޤ⡢嵭Τ٤ƤνϤǥѥ뤷ƥåƤޤäơХͤϤۤȤɤʤȻפޤޤĤĤäƤ붲⤢ޤޤܿƤʤϤ˿ܿϡϤΥХˤҤäǽ⤢ޤ

+

⤷ԲIJưȯ줿顢Ҥ𤯤κݤˤϡΥå򤪴ꤤޤ

+
    +
  1. STD ⡼ɤξ硢ʬ Standard C Τ뤿ᡢޤ Validation Suite ȤäƤߤ롣GCC / testsuite λȤ륷ƥǤϡץդ configure make check ǼưƥȤǤ롣
    +
  2. ʬ mcpp ΰܿ˴ְ㤤ϤʤɤɥȤΤ롣
    +
  3. ХƸ륵ץ륽Ф롣
    +
  4. ХФʬ +#pragma MCPP debug <args> #pragma MCPP end_debug ǤϤ mcpp ưȥ졼Ƥߤ롣 <args> 򤵤䤷Ƥܺ٤˥ȥ졼Ƥߤ롣
    +
+

⤷"Bug: ..." ȤǥåФ顢ϴְ㤤ʤ mcpp ޤϽϤΡʤ֤ mcpp Ρ˥ХǤޤȤ㤯ʡ֥פǤ⡢򿩤碌뤳Ȥ mcpp ˽ʤ顢ХǤ
+Standard C ⡼ɰʳΥ⡼ɤ mcpp Validation Suite Ǥϡְִ㤤פ餱ư򤷤ޤϻͤǤʤǤ˽ϤʤϤˡɤͤ 4.1.3 򸫤Ƥ

+
+ +

5.2. malloc() ϢΥХå

+

䤬񤤤 kmmalloc Ȥ malloc() Υ饤֥꤬ޤ4.extra ȡˡ +
+⤷Τ malloc() 󥯤 mcpp 120 124ʽϤˤäƤ 2120 2124ˤΥ顼ֹ exit 뤳ȤСϴְ㤤ʤ mcpp ޤϽϤΡʤ֤饤֥ؿΡ˥ХǤ

+

ޤƥȤ˻Ȥץ륽Τɤ

+
#pragma MCPP debug memory
+

Ƚ񤤤ƤȡθĽꤪӽλ˥ҡץ˴ؤ󤬽Ϥޤ Heap error: ... ȤåФ뤳ȤСְ㤤ʤ mcpp ޤϽϤΥХǤ

+

ΥХȯ줿顢ץ륽γʬ #if 0 #endif ǤϤǥƥȤ򷫤֤ХȯʬʤǤߤƤ

+
+ +

5.3. Х

+

ХˤϼΤ褦ʥǡդƤ褦ꤤޤ

+
    +
  1. mcpp ܿϡ
    +
  2. ܿˡnoconfig.H ˡ +
    +
  3. ХȻפΤƸǤ륵ץ륽 +
    +
  4. ν̡ +
+
+ +

5.4. ܿ

+

mcpp ϤۤȤɤνϤŪñ˰ܿǤ褦˽񤤤ƤĤǤ +䤬äƤϤϾǤ¾νϤؤΰܿǤϥν­ɬפʤϤǤνϤؤΰܿԤƤޤ򥽡˥եɥХåƤȻפޤ
+ܿϼΤ褦ʷǤꤤޤ

+
    +
  1. ϡ +
    +
  2. noconfig.H (configed.H), system.H, system.c ꡣ +ʤ٤ꥸʥȤκʬե뤬ɤñʤΤʤǤġ
    +
+

ܿǤɤΤˤϡcompiler-specific-build Ǥϡޤץץåؤơإåե "pre-preprocess" εǽȤäƼʬȤꥳѥ뤷ƤߤΤüᤤǤ礦

+

Validation Suite STD ⡼ɤΥå򤷤ޤϥեο¿ΤǡǥХå򷫤֤ˤϼ֤ꤹޤǥХåϤޤn_std.c 򥳥ѥ뤷ơ˥ѥ롦¹Ԥ뤫ɤ򸫤ޤ°Υѥɥ饤ФǤ mcpp ϤˡΤʤץ⤢ޤˤĤƤ mcpp-manual.html#2.2 򸫤Ƥ mcpp ̤Ƥ饳ѥ뤹⤢ޤ

+

⤷줬ޤʤϡ n_std.t ȤץȤäơɤΤܤǥåޤ줬ޤä顢e_std.t, m_*.t, unspcs.t, warns.t, misc.t åޤ"post-Standard" ⡼ɤǤ n_post.t, e_post.t Ȥޤ

+

mcpp -QCz23 Ȥץդƽޤpost-Standard ⡼ɤǤ -3 ԲġˡSTDC == 0 ǥѥ뤷Ƥ -S1 -V199409L ץդޤ-C ץǥȤϤΤǡ̤̤꤫ɤ狼ޤ
+-Q ץǿǥå mcpp.err Ȥե˽ϤΤǡڡ㡼ɤߤޤ
+-z ץǡإåեνϤϾάޤ
+-2 -3 digraph trigraph ͭˤʤޤ-S1 -V199409L __STDC__ 1 __STDC_VERSION__ 199409L ˤʤޤ
+C99 бΥƥȤ򤹤뤿ˤϡ-V199901L ץդ n_std99.t, e_std99.t Υå򤷤ޤ

+

Validation Suite cpp_test.c ȤץȤȡn_*.c, i_*.c ΥץΥƥȤưŪ˹ԤȤǤޤʤϡߤĤǡܺ٤Ϥ狼ʤޤe_*.?, u_*.?, unspcs.?, warns.? ΥƥȤϴޤޤʤmcpp ȤΥƥȤ򤹤뤿ˤϡn_std.c 򥳥ѥ뤹ۤᤤˡ

+

ʤValidation Suite GCC testsuite бƤޤäơmcpp GCC Τɤ줫ΥС˰ܿϡGCC / testsuite 󥹥ȡ뤵ƤСGCC Υץץå mcpp ֤ȡmcpp μưƥȤǤޤˤĤƤ cpp-test.html#3.2.3, mcpp-manual.html#3.9.7 򸫤Ƥ +

+
+ +

5.5. GCC ʳνϤǤ configure ξ

+

mcpp UNIX ϥƥǤ configure ץȤȤޤ +UNIX ϥƥǤ GCC ʳνϤˤĤƤϻϤޤäΤʤΤǡcompiler-specific-build configure ǤϤĤΥץꤷƤʤФʤޤ

+

ΥץǻꤹƤˤĤƤϡνϤȤäƤͤΤäƤ뤫ޤĴ٤뤳ȤǤϤǤ狼ϤҶƤConfigure ˼Ǥ椭Ȼפޤ
+Configure ˤĤƤ INSTALL

+
+ +

5.6. ǡäƤаܿƤߤޤ

+

ܿޤʤϡΤ褦Τ餻
+ΥǡդƤС֤ܿǤ뤫⤷ޤConfigure λȤĶǤϡΥǡΤΤʤʬ configure ˤäΤ뤳ȤǤޤ
+ʤC90 (ANSI C) бƤʤϤϡmcpp V.2.6 ϰܿоݤ鳰ޤ

+
    +
  1. ϣӤȤΥѥꥹȤηʻ UNIX , DOS/Windows , OS-9 Τʤˡ
    +
  2. Ϥ̾ȥС
    +
  3. ʸåȤ ASCII +ǤʤФɤʸåȤMulti-byte characterʴˤ encoding ϥե JIS EUC-JP ȤⲿShift-JIS Τ褦 <backslash> Ʊɤ multi-byte character ˴ޤޤ encoding ξ硢ѥΤϤǧ뤫
    +
  4. ShellʥޥɥץåˤʸȾʸ̤뤫
    +
  5. ե̾ʸȾʸ϶̤뤫 +
    +
  6. ¹Իץ󡣥ѥɥ饤ФϤ륪ץ +ץץåñΤưΥץgetopt() ǼǤʤΤԲġˡ
    +
  7. ץץåʬΥƤϤȤ⤤ѥѥ餫
    +
  8. νϤλޥȤ͡C++ λϤɤʤ뤫ʥѥɥ饤Ф -D ץǥץץåϤޥȡץץåȤޥȤ̤뤳ȡˡ
    +
  9. long long Ϥ뤫long long 硢printf() Ǥ long long length modifier ϲlong long ʤƤƱη뤫
    +
  10. #pragma ԤΰϥޥŸоݤȤʤ뤫
    +
  11. Include directory ꤹĶѿˤϤɤ̾ȤĶѿʣΥѥ򵭽Ҥ separator ˤϲȤ
    +
  12. ̾Ȥ include directory#include ǥإåե򥵡ε§
    +
  13. ɬפʴؿǡ饤̵֥Τ뤫
    +
  14. ѥΤ digraph ǧ뤫
    +
  15. ̻Ҥ $ Ȥ +
    +
  16. #asm, #endasm Ϥ뤫 +ǤϤޤ줿֥åΥѥΤؤμϤϤɤ¾εʳ directive ˤϤɤʤΤ뤫
    +
  17. ץץåǽ٤ #pragma sub-directive ˤϲ뤫
    +
  18. ѥΤĹϤɤΤ餤ޤǤValidation Suite ˤ test-l/l_37_8.c 򥳥ѥ뤹Ȥ狼ˡ
    +
  19. ѥΤǤϡ̻ҤϲХȤޤǼ̤뤫
    +
  20. ѥ塢Ρ֥֥ȥեפҤϲUNIX νϤ .o Windows νϤ .obj Ρˡ
    +
  21. t_line.c Ȥץץץå̡̤ñΥץץåȤޤϥץǥץץνϤꤹˡϹֹȥե̾ξ򥳥ѥΤϤˡ򸫤뤿ΤΤǤ롣<stdio.h> ƤĹΤǡ򥫥åȤƺǽΣԤȺǸΣԤнʬǤ롣
    +ˡ#line 1000 줿̤ #line 1000 "t_line.c" Ȥʤ餺 #1000 "t_line.c" Ȥ¾ηˤʤϤǤϡʬ #line 1000 "t_line.c" ȽؤƥѥΤϤơǧǤ뤫ɤ򸫤#line 1000 "t_line.c" ǥ顼ˤʤʤ error line; ιԤǥ顼åФϤǤ뤬λ˹ֹ椬ɤФ뤫ˡ
    +
+
+/* t_line.c */
+#include    <stdio.h>
+
+#line 1000
+
+error line;
+
+main( void)
+{
+    return  0;
+}
+
+

ۥȽϤȥåȽϤ㤦ϤˤĤƾ嵭ΥǡСȤʤǤ礦

+

¤٤Ƥߤȡå٤Ȥ֤󤿤󤢤ޤ͡¿νϤǤϰܿߤνϤȶ̤¿Ǥ礦顢ưΰܿǤФۤɤμ֤ǤϤʤϤǤŪ֤ΤΤϼ¹Իץ #pragma˵ʳͤμǤϰư褦ˤʤäƤ顢ˤäƤ椯ȤǤޤͣݤʤΤϡϤΥХˤҤääǤ

+
+ +

5.7. ڥåȤˤ¾νϤΥƥ

+

䤬äƤϤΥץץåθڥåȤǥƥȤ̤ϡcpp-test.html#6 ˤޤȤƤޤ
+¾νϤˤĤƥƥȤ̤Τ餻ܤ¿ΤǤʤμ֤Ǥ
+cpp_test.c ˤƥȤǤм֤ϤʤΤǡǤ⤪ꤤޤGCC ξϡڥåȤˤ뼫ưƥȤǤޤ

+
+ +

5.8. Τո

+

ХΤۤˤ⡢mcpp λȤꡢǥåmcpp ΥValidation Suite Standard C ᡢɥȤνʤɤˤĤƤո򤪴󤻤
+̣ǺäץץåǤV.2.0 ޤǤǤ⣶ǯȾ⤫ƶŤ˶ŤäϫǤŤĤǤˤǤɤΤˤȻפäƤޤåץץåˤĤƤϡλäƤʤϤؤΰܿȥƥȰʳϡäựΤ뤳ȤϤۤȤɤ٤ƤäĤǤ¿Ȥ꤬ĤäƤС줿Ȼפޤ
+Martin Minow ΥϤȤƤ⤭줤ʡΤʤ狼䤹ΤǡɤǤˤȤäƤϤ֤ٶˤʤޤ
+Τ˶̣ĿͤϤʤ¤ƤȻפޤ¿ΥȤȾԤƤޤ
+ոȾ

+

http://mcpp.sourceforge.net/

+

"Open Discussion Forum" ޤϥ᡼Ǥꤤޤ +

+
+ +

6. mcpp ĹƻΤ

+ +

6.1. ۣǯ

+

1992/01 DECUS cpp 򤤤ˤϡ +ĹˤʤȤ̴ˤפޤǤ٤ߤˤ礳äȥС󥢥åפƤߤ褦ȻפääΤǤ
+ϤơɤޤʤȥȤ狼ꡢ餤ɤߤޤɤߤΤ륽äǤ⤢ޤˤĤλͤ C90 б˥С󥢥åפޤޤǤṲ̄Ǥ

+

ǻϼʬ C90 ΥץץͤΤˤΤäƤʤȤ˵դޤP. J. Plauger & Jim Brodie "Standard C" (1989) ɤȤfunction-like ޥŸˡϡҤä֤ΤǤʤˮϤƤˡǵʽäơץץ˴ؤʸϤ򤯤֤ɤߤޤη̡C90 ΥץץŪʤΤȤ¿ǰۤʤäƤ뤳Ȥ狼ޤ#, ## 黻Ҥɲä줿ȤϡΤۤΰʬˤʤäΤǤ

+

Ȥ function-like ޥŸ롼ˤϤʤƬǺޤޤE. Ream cpp Υ򻲹ͤˣֹͤơC90 ѥޥŸ롼򿷤񤭤ޤ䤬ץΥ르ꥺǤʤ˰̿ͤΤϡˤˤʤȤǤ1992/04 ΤȤǤ

+

ơƽۤơ٤ cpp ϤޤȻפäΤǤȤ줫餵ˣǯޤꤿäƤޤޤȤäƤ⡢δ֤ˤϤۤƬǺޤϤʤäΤǤˤ⤫餺֤Ϥ֤󤫤ޤͤͤ˰Ƥơcpp ˽椷ʤʤä⤢ޤǤϤޤ󡣤δ֤ˤäΤϼΤ褦ʤȤǤ

+
    +
  1. ͤ򤵤Τˤ롣Standard ⡼ɤǤϵʤ˴б롣
    +
  2. Standard C Υ⡼ɤ濴˥ץ๽¤ǡ¤ƹ롣
    +
  3. Portability 夲뤿ᡢΥѤ롣
    +
  4. ǥХå򤹤롣 +ϤΥХн褹롣
    +
  5. ƥȥץहʤ Validation +Suite 롣
    +
  6. ¾νϤΥƥȤ򤹤롣 +
    +
  7. ɥȤ񤯡 +
    +
  8. 1997/07 ˤϿѥäᡢƻȤ WindowsNT/95,X Window System ȤΥեȤΥ󥹥ȡȽɤ줿Ƥ뤦 C99-1997/11 draft ФơؤбɬפȤʤä
    +
+

Ǥ֤ΤäΤϥɥȤǤȤ˸ȾΣǯ餤ϥ򤤤ä֤ϤۤξǡɥȽ񤭤ȤȾƤޤѤʬ̤ˤʤäƤޤޤ֤äΤ̤¿ФǤϤޤ󡣥ɥȤ񤤤ƤȡͤΤʤȤȽФƤΤǤΤӤ˵ʽɤ֤򾯤Ĥޤ򤤤ä֤ϾʤƤ⡢Ͼʤޤ󡣵ʽץץǤϤʤΤ ANSI C Rationale ޤƤ褯ɤǤߤޤϥץץå뤳Ȥ̤ C90 ٶ򤷤褦ʤΤǤˤϤ̤ơC90 εΤİ뤳ȤǤޤ

+

ƥȥץϽϴñʥץܤ񤤤ǤȤ񤤤 cpp ƥȤ뤿Ӥ˰ճʥХĤΤǤǡC90 ץץƥȤ Validation Suite 񤯤ȤˤޤơValadation Suite 񤯤Ȥ̤ơC90 餫ˤʤäƤޤC90 Ե§ʬбΤϡʬˤȤäƤϤ鷺路ФǤޤ̣ΤʤȤǤ̣ΤʬΤۤϤ뤫¿äȤϳΤǤ
+κȤ̤ƻ䤬ؤΤϡΤ褦ʤȤǤ

+
    +
  1. ץλͤϡܺ٤ʥɥȤ񤭽ޤdzꤷʤ
    +
  2. ץΥǥХåϡͤƥȤ륵ץ뤬ޤǽʤ
    +
+

ιͤϴŪʤΤǤ +ΤȤϴǤϤޤ椫ʤΤ¿ץ㳰ǤϤޤ󤬡ˤϴפʰ̣ʬ⤢ޤϤϤΰĤǤ礦
+̣鲿ǯ⤫ŰŪˤ뤳ȤǤȤޤˤƤ⣶ǯȾĹޤʤ˻֤򤫤ƴʥץäơä줬ȤΤȤ䤬ä³Ƥޤ̣ǺץȤƤϡΤ餤Ϥθ٤ʤΤǤ礦

+

mcpp Ϥ⤦äƤޤäΤǡƥʥ󥹤򤷤ƤĤǤäǤ鳧󡢥ȡ𡢰ܿ򤪴ꤤޤ

+
+ +

6.2. V.2.3

+

V.2.0 塢 V.2.1, V.2.2, V.2.3 update 򷫤֤ޤC99 ˾ǧ줿 ISO / C++ бꡢбϤ䤷ꡢХȤäȤΤƤǤ

+

V.2.2 ޤǤϴñ update ǤƤޤV.2.2 V.2.0 飳äƤޤ󡣤ȤV.2.3 V.2.2 飴ǯޤ⤿äƤޤޤοդ¿˻ˤʤꡢ֤ȤʤʤäΤʸǤ2000/07 60 ФˤʤäơŻ򽵣˸餷Ƥ顢餫֤Ȥ褦ˤʤꡢcpp ޤ

+

V.2.3 ϻ֤Ǥʤ֤ŪäƤޤGCC V.2.9x ˼ƤߤȤGCC / cpp ȤθߴݤΤˤʤäʤФʤʤȤ狼äǤ¿ΥץɲäĥͤޤޤΥ顼򥦥˥󥰤˳ʲꡢȯ륦˥󥰤ǥեȤΥ˥󥰥饹Ϥꤷơʤˤ¤¤Ƥޤ

+

ѹ¿ϸΤΤǤꡢڤΤǤϤޤǤȤ C90 "traditional" ʻͤΰ C99 λͤξΩʤФʤʤȤΤϡϤʤϤܰդʤȤǤ줬ߤΥץ󥽡μ¾ǤСˤٹ碌ΤϤ򤨤ޤ
+ʤˤ¤Ȥǡ¾νѤǤ⡢°Υץץå֤ƻȤˤϻȤ䤹ʤäȻפޤ

+
+ +

6.3. ̤Ƨեȥ¤ȡפ˺

+

V.2.3 ؤ update ǡmcpp Validation Suite Ͼȶ (IPA) ʿǯ١̤Ƨեȥ¤ȡפȤΤ˺򤵤ޤޤޤλȤΤȤΤäΤDZ礷ƤߤȤ ͵ץȥޥ͡㤬򤷤Ƥ줿ΤǤ 2002/07 2003/02 ޤǤ IPA λȿУͤνΤȤˡȯʤ뤳ȤˤʤޤɥȤα⡢ϥ뤬Ƥ뤳Ȥˤʤޤ

+

Ūեȥʤ⡢֤򤫤Υ饤եΤ褦ˤʤäƤޤäΤǤδ٤ˤϼޤ˽Ф뵡񤬤ʤǰʻפ򤷤Ƥޤε񤬤ĤͿ줿ΤǤϤΥץȤԤ뤿ᡢŻ򽵣˸餷ޤ
+䤬ΥץȤǤ뤳ȤȤƹͤΤϡΤ褦ʤȤǤ

+
    +
  1. ѸǤΥɥȤ롣Ȥäơmcpp ȸڥåȤŪɾξ˽ФƤ椯ýϤȾȤʤäƤ븽ǤϡѸǥɥȤ¸ߤɾڤΤɬܤǤ롣
    +
  2. ܿоݤ򹭤롣ޤбƤϤοСбۤΤμפʽϤؤΰܿʤ롣
    +
+

˿ PM 鼡Ƥޤ

+
    +
  1. GCC 3.x ˤܿˤ testsuite ǻθڥåȤѤǤ褦ˤ롣 +
  2. ȯ򥪡ץʷǿʤƤ椯 +ȯȤ̤ͭ䤹褦ˡɸŪʤѤ롣 +
+

伫Ȥ⤳ϤҤꤿȤǤΤǡǷײɲäޤ
+ȤηײٱٱŤͤޤ +ޤǥå˸ޤޤȤ򤹤뤿Ӥ˻ȤäȤΤʤեȥȤäơΤӤ˻֤ޤGCC 򥽡饳ѥ뤷ΤƤǤϤĤΥȥ֥˸ޤ̤ΥɥȤι̤αΥåȽˤ⡢ʤλ֤ޤξ塢Ȥ֤ޤȯޤץȤϻΤνϤؤбײΰǰ̤Ȥʤޤ

+

ϤޤǰĤη򿼤äƤ椯褦ʤȤƤʤäΤǡ򾯤褦ȤȤҤɤ֤äƤޤΤǤޥ奢ץޤ򷡤겼ˤϡ򤷤ʤФǤ뤳ȤǤϤޤ󡣤̤˽Фˤϡ򤤤餫ʤФʤʤΤǤ
+򹭤ǡϿ PM νޤơĤ̤иΥեȥȯȤΤ˿뤳ȤǤޤʬʸϤʤ줿ʸäƤΤ⡢Ѥ줷ȤǤ֤ɤΤ϶줷ȤǤƤϤɤ⿷dzڤȤǤ

+

̤Ƨեȥ¤ȡפϤǤޤǤϤޤǤʿǯ٤ˤ⡢ ץȥޥ͡㤬 mcpp ³ץȤȤƺ򤷤Ƥ줿ΤǤơǯ٤Ѥ߻ĤβȤơˤȤäƤ̤иΰΤĤβ˼ȤळȤȤʤޤ

+

ΣǯΥѥ˥ȥ֥뤬ȯϡɥ OS upgrade ǤˤĤΥȥ֥˸ޤ̤иΥեȥνˤ֤פȯϤϤ٤쵤̣ǤäౡŪˤʤäƤ֤ץȤͤ˶ŤΤ¹ԤưˤưʤäƤȤ⡢ۤμǤ 2004 ǯ 2 ˻ˡϣУͤɸ̵ΤʤȤꤷƤ줿ǡƤˤäȲ˼ȤळȤǤޤ

+

Visual C++ ؤΰܿconfigure ץȤκ¿ͤ multi-byte character encoding ؤбβã뤳ȤǤޤޤɤȤΩʤʤԤȤƤϤΤˤȤߤޤܸǤȱѸǤΥɥȤιȤ֤ΤȤ⡢ϥζϤã뤳ȤǤޤ

+

̤ˤäơϰϣУͤ鲿ȡ֥ѡꥨפȤɾ뤳ȤǤޤμϤˤȤäƤϲʬɾǤĹǯˤ錄 mcpp Ѥ߽ŤͤǧƤΤȻפѴǤޤ

+

ǯ᤯ˤ錄̤ƧեȥפΥץȤˤäơmcpp ʼ C/C++ ץץå˻ž夬äĤǤǯΥޥ奢ץޤȤϤʤ褯äȼʬǤǼƤޤ

+

̤ƧեȥΥץȤäƤ⡢mcpp βɺȤ³ƤޤޤĤβ꤬ĤäƤޤβãmcpp ڤ뤿ˡ¤˼Ȥߤ³Ƥ椯ĤǤ

+ + diff --git a/libraries/mcpp/doc-jp/mcpp-summary.pdf b/libraries/mcpp/doc-jp/mcpp-summary.pdf new file mode 100644 index 0000000000000000000000000000000000000000..62b5aefe610f685832afb3e983395194cfd64053 GIT binary patch literal 159608 zcmce;1z40@*EbH55)u*;!XPO%3^jCjmw zb3E$%eCPeH@A^B}c;EMqwbx#I?ca)hGn5Jgx<&kl86c9T*fC*q@V2;ki z13(ALm{}X^+nc!?8v#I&M|l86ZC5tGYc#0Z)I%k%)ga^*;sxn7D{>BTK zjpMiV07Dhymo?&GX8KKj9L&tW$(e%_^xNDxnVEhYgOiQvw{_#>fGF!f#|1Gl|0ZV; z6AS29xqz5Bf0I3=jQO{AAokzp0RplAHV+UpbmRQO3o{t}>pYktrupM4?f z{F|;Zvw$JH@z-{ozv(kGD-+AF^I&FWX8v_Om{~d4eqCQ?b~d(O`!d}i!9T}kVrKbS zR*v@iW|q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vz3wO`G7W)5Aqa*zyo&(D@!I&pz`6#Bz|Vq+_Drj z7K#zDWLUibBf;q?SP+Nj@FUS ze{NY422Fv=Ov0iua0~;}DG7_?pE^EA77~^KUIKt%An6%~kq87hMuN*nB7?);A^gZ_ z*!Tb&DZ*?Qkn!isbL5+zTS74`n*TP#TsojCXuV``aynFhWGn&ZOUOh5%*M$?BFu)! zL^74ZD zcnZXq0E`4C`_QsvsO|wB1!^0h6~EC7Pz#J7o&X)cpezv!rz3(hXCSfwzXodu0SEQt z7&LHVFn$E!IiUOq6u2xz99)0EPGNmS!ocew;o$8h5&4PY{Od1Yhe4A_6v)`epg|RI zj0p9oz+0iA@fToNXdDC>9_s)2o(}3uFu(wzz7AkG@N(2#nK5W0tZg7tK>av?@Mx%> zK@HHD!vE<7jh6r;Kw|~K$WVWZ!Qjx~brpzwzzksZ;y|>8(UH-RaSlYr!t2G8(6F+2 z3QYIljN`!BAVn0tunE0UjuVtp2$=z+&KI6^q5f{0o3c z(D8xAp<#9p!W(!cA5sU70`>P8EFJ?Jt5`gUKG3oREOh>Y0rOKbR2CeD44rpka5y~7 z?*i#y?Z6RnVC&(zGV`Zlkof`Va?m;m9Uh1Wl^KsGkl`4JgwV45$sPQ=5s7Gq0|~FCfv3>GV=_F(0X*k%z=F6=a-h(dbdn>T3~&ZUYY%uv1fIInIK1hf QS{M>eOi^)@*=Di-0R`{n@c;k- literal 0 HcmV?d00001 diff --git a/libraries/mcpp/doc/LICENSE b/libraries/mcpp/doc/LICENSE new file mode 100644 index 000000000..a1d2edb03 --- /dev/null +++ b/libraries/mcpp/doc/LICENSE @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * The most part of the documents in this directory were translated by + * Highwell inc. from the Japanese documents written by Kiyoshi Matsui, + * and revised by the author. + * + * This software including the files in this directory is provided under + * the following license. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/libraries/mcpp/doc/cpp-test.html b/libraries/mcpp/doc/cpp-test.html new file mode 100644 index 000000000..f6cad4da2 --- /dev/null +++ b/libraries/mcpp/doc/cpp-test.html @@ -0,0 +1,4088 @@ + + + + + + + + +
+

CPP-TEST

+

== Validation Suite for Standard C Conformance of Preprocessing ==

+
+
+

for V.1.5.5 (2008/11)
+Kiyoshi Matsui (kmatsui@t3.rim.or.jp)

+
+
+

Contents

+
+ +

1. Standard C and Validation Suite +
1.1. History +
1.2. The Standards +
1.3. Notations in this document +
+
+
2. Standard C Preprocessing Features +
2.1. K&R 1st and Standard C Preprocessing +
2.2. Translation Phases +
2.2.1. Line Splicing Before Tokenization
+
2.3. Preprocessing Token +
2.3.1. No Keyword +
2.3.2. Preprocessing-number +
2.3.3. Token-based Operations and Token Concatenation
+
2.4. Evaluation Type of #if Expression +
2.5. Portable Preprocessor +
2.6. Function-like Macro Expansion +
2.6.1. Analogous to Function Call +
2.6.2. Argument Expansion Before Substitution +
2.6.2.1. No Expansion for the Operand of the # or ## Operator
+
2.6.3. Rescanning +
2.6.4. Prevention of Recursive Macro Expansion
+
2.7. Issues +
2.7.1. Header Name in the <stdio.h> Format +
2.7.2. # Operator Specification with Legacy from Character-based Preprocessing +
2.7.3. White Space Handling at Macro Re-definition +
2.7.4. Parameter Name at Function-like Macro Re-definition +
2.7.5. Unpredictable Evaluation of Character Constant in #if Expression +
2.7.6. Non-Function-like Rescanning of Function-like Macro +
2.7.7. C90 Corrigendum 1, 2 and Amendment 1 +
2.7.8. Redundant Specifications
+
2.8. Preprocessing Specification in C99 +
2.9. Toward Clear Preprocessing Specifications +
+
+
3. Validation Suite Explanation +
3.1. Validation Suite for Conformance of Preprocessing +
3.2. Testing Method +
3.2.1. Manual Testing +
3.2.2. Automatic Testing by cpp_test +
3.2.3. Automatic Testing by GCC / testsuite +
3.2.3.1. TestSuite +
3.2.3.2. Installation to TestSuite and Testing +
3.2.3.3. mcpp Automatic Testing +
3.2.3.4. TestSuite and Validation Suite
+
3.3. Violation of syntax rules or Constraints and Diagnostic Messages +
3.4. Details +
3.4.1. Trigraphs +
3.4.2. Line Splicing by <backslash><newline> +
3.4.3. Comments +
3.4.4. Special Tokens (digraphs) and Characters (UCN) +
3.4.5. Spaces and Tabs on a Preprocessing Directive Line +
3.4.6. #include +
3.4.7. #line +
3.4.8. #error +
3.4.9. #pragma, _Pragma() operator +
3.4.10. #if, #elif, #else, and #endif +
3.4.11. #if defined +
3.4.12. #if Expression Type +
3.4.13. #if Expression Evaluation +
3.4.14. #if Expression Error +
3.4.15. #ifdef and #ifndef +
3.4.16. #else and #endif Errors +
3.4.17. #if, #elif, #else, and #endif Mismatching Errors +
3.4.18. #define +
3.4.19. Macro Re-definition +
3.4.20. Macro Names Same as Keywords +
3.4.21. Macro Expansion Requiring Pp-token Separation +
3.4.22. Macro-like Sequence in a Pp-number +
3.4.23. Macros Using the ## Operator +
3.4.24. Macros Using the # Operator +
3.4.25. Macro Expansion in a Macro Argument +
3.4.26. Macros of a Same Name during Macro Rescanning +
3.4.27. Macro Rescanning +
3.4.28. Predefined Macros +
3.4.29. #undef +
3.4.30. Macro Calls +
3.4.31. Macro Call Error +
3.4.32. Character Constant in #if Expression +
3.4.33. Wide Character Constant in #if Expression +
3.4.35. Multi-Character Character Constant in #if Expression +
3.4.37. Translation limits
+
3.5. Documentation of Implementation-Defined Items +
+
+
4. Evaluation of Aspects Unspecified by Standard +
4.1. Multi-byte Character Encoding +
4.2. Undefined Behavior +
4.3. Unspecified Behavior +
4.4. Other Cases Where a Warning is Preferable +
4.5. Other Quality Matters +
4.5.1. Qualities regarding Behaviors +
4.5.2. Options and Extended Functionalities +
4.5.3. Efficiency and others +
4.5.4. Quality of Documents
+
4.6. C++ Preprocessing +
+
+
5. Issues Around C Preprocessing +
5.1. Standard Header Files +
5.1.1. General Rules +
5.1.2. <assert.h> +
5.1.3. <limits.h> +
5.1.4. <iso646.h>
+
+
6. Preprocessor Test Results +
6.1. Preprocessors Tested +
6.2. Lists of Marks +
6.3. Characteristics of Each Preprocessor +
6.4. Overall Review +
6.5. Test Reports and Comments +
+
+ +

1. Standard C and Validation Suite

+

I completely rewrote DECUS cpp by Martin Minow to create a portable C preprocessor called mcpp V.2. mcpp stands for 'Matsui cpp'. This preprocessor is provided as source code and can be ported for various compiler systems by modifying some macros in header files on compilation. In addition, execution programs has various behavioral modes such as Standard C (ISO/ANSI/JIS C) and others. Among those modes, the Standard C mode literally implements strict Standard C preprocessing.

+

While implementing this preprocessor, I also created a testing tool called "Validation Suite for Standard C Conformance of Preprocessing". This suite also covers C++. This document explains the Validation Suite. The Validation Suite is open to the public as an open-source-software along with this documentation under the BSD-style-license.

+
+ +

1.1. History

+

The Validation Suite became available to the public on NIFTY SERVE/FC/LIB 2 in August 1998, and also later on http://www.vector.co.jp/pack. It did not have a version number, however, and so is assumed to be version 1.0.

+

V.1.1 supports the C99 draft in August 1997 and is an update to V.1.0. V.1.1 was also made public on NIFTY SERVE/FC/LIB 2 and vector/software pack in September, 1998.

+

V.1.2 supports the official C++ Standard release and is a small update to V.1.1. It also became available on NIFTY SERVE/FC/LIB 2 and vector/software pack in November 1998.

+

V.1.3 supports the official C99 release and is an update to V.1.2. In addition, behavioral test samples were rewritten so that they can be used by the GCC / testsuite.

+

V.1.3, while it was under development, was adopted as the year 2002's "Exploratory Software Project" at the Information-technology Promotion Agency, Japan (IPA) by Yutaka Niibe Project Manager. From July 2002 to February 2003, the development continued under the grants-in-aid from IPA and Niibe PM's advice. The English version of the document was created under my supervision with the translation work outsourced to HighWell, Inc. In February 2003, mcpp V.2.3 and Validation Suite V.1.3 were released on m17n.org.

+

In addition, mcpp and Validation Suite were adopted as the year 2003's "Exploratory Software Project" by Hiroshi Ichiji Project Manager. This allowed an update to V.2.4 and V.1.4. *1

+

mcpp and Validation Suite have been kept on updating after the project. V.2.5 and V.1.5 were released in March 2005. Validation Suite V.1.5 changed allocation of points and some other matters. In July 2006, mcpp V.2.6 and Validation Suite V.1.5.1 are released. Validation Suite V.1.5.1 updated the test result of the preprocessors. In November 2006, mcpp V.2.6.2 and Validation Suite V.1.5.2 were released. In April 2007, mcpp V.2.6.3 and Validation Suite V.1.5.3 were released. V.1.5.2 and V.1.5.3 of Validation Suite have no substantial change. They have only small updates of this document. +In May 2007, mcpp V.2.6.4 was released, and in March 2008, mcpp V.2.7 and Validation Suite V.1.5.4 were released. Validation Suite V.1.5.4 updated a few testcases and added test data on Visual C++ 2008. +In May 2008, mcpp V.2.7.1 was released, and in November 2008, mcpp V.2.7.2 and Validation Suite V.1.5.5 were released. Validation Suite V.1.5.5 added test data on Wave V.2.0.

+

Note:

+

*1 The overview of the Exploratory Software Project can be found below (in Japanese only).

+
+

http://www.ipa.go.jp/jinzai/esp/

+
+

mcpp from V.2.3 through V.2.5 had been located at:

+
+

http://www.m17n.org/mcpp/

+
+

In April 2006, mcpp project moved to:

+
+

http://mcpp.sourceforge.net/

+
+

mcpp V.2.2 and Validation Suite V.1.2 are located in the following Vector's web site. They are in the directory called dos/prog/c, but they are not for MS-DOS exclusively. Sources are for UNIX, WIN32, MS-DOS. The documents are Japanese only.

+
+http://www.vector.co.jp/soft/dos/prog/se081188.html
+http://www.vector.co.jp/soft/dos/prog/se081189.html
+http://www.vector.co.jp/soft/dos/prog/se081186.html
+
+

The text files in these archive files available at Vector use [CR]+[LF] as a <newline> and encode Kanji in shift-JIS for DOS/Windows. On the other hand, those from V.2.3 through V.2.5 available at SourceForge use [LF] as a <newline> and encode Kanji in EUC-JP for UNIX. From V.2.6 on two types of archive, .tar.gz file with [LF]/EUC-JP and .zip file with [CR]+[LF]/shift-JIS, are provided.

+
+ +

1.2. The Standards

+

ISO/IEC 9899:1990 (JIS X 3010-1993) had been used as C Standard, but in 1999, ISO/IEC 9899:1999 was adopted as a new Standard. This document calls the former C90 and latter C99. The former is generally called ANSI C or C89 because it migrated from ANSI X3.159-1989. ISO/IEC 9899:1990 plus its Amendment 1995 is sometimes called C95. C++ Standards are ISO/IEC 14882:1998 and its corrigendum version ISO/IEC 14882:2003. This document calls both of them C++98.

+

The Standards referred in this explanation are below.

+
+  C90:
+    ANSI X3. 159-1989       (ANSI, New York, 1989)
+    ISO/IEC 9899:1990(E)    (ISO/IEC, Switzerland, 1990)
+        ibid.   Technical Corrigendum 1     (ibid., 1994)
+        ibid.   Amendment 1: C Integrity    (ibid., 1995)
+        ibid.   Technical Corrigendum 2     (ibid., 1996)
+    JIS X 3010-1993         (JIS Handbook 59-1994, Tokyo, 1994, Japanese Standards Association)
+  C99:
+    ISO/IEC 9899:1999(E)
+        ibid.   Technical Corrigendum 1 (2001)
+        ibid.   Technical Corrigendum 2 (2004)
+  C++:
+    ISO/IEC 14882:1998(E)
+
+

ANSI X3.159 contained "Rationale." It was not adopted by ISO C90 for some reason, but reappeared in ISO C99. This "Rationale" is also referred to from time to time.

+

PDF versions of C99 and C++ Standards can be obtained online on the following sites. (The open-std.org site provides drafts which can be freely downloaded.)

+

C99, C++98, C++03:

+
+

http://webstore.ansi.org/ansidocstore/default.asp

+
+

C99+TC1+TC2:

+
+

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf

+
+

C99 Rationale final draft in October, 1999:

+
+

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n897.pdf

+
+
+ +

1.3. Notations in this document

+

Though this document was text-file in the older versions, it has changed to html-file at V.1.5.2. This document uses the following typographical conventions:

+
    +
  • source:
    +Navy colored constant-width font is used for code snippets, command line inputs and program outputs.
    +
  • __STDC__:
    +Maroon colored constant-width font is used for Standard predefined macros.
    +
+
+ +

2. Standard C Preprocessing Features

+

Before explaining the Validation Suite, I will talk about the overall characteristics of Standard C (ANSI/ISO/JIS C) preprocessing. This is not text bookish, but intended to point out the concepts and issues of Standard C by comparing with K&R 1st.

+

As I explain, I will concentrate on the differences between K&R 1st and C90 first, C90 and C99, then C90 and C++ in this order. C99 is currently available as a Standard, however, it has not been implemented on actual compiler systems very much. Therefore, it is more realistic to center on C90.

+

This chapter shows few samples, please refer to the Validation Suite since it is a sample itself.

+
+ +

2.1. K&R 1st and Standard C Preprocessing

+

There were endless varieties of dialects amongst pre-Standard C language implementations. Above all, there were almost no standards for preprocessing. The reason was because the preprocessing specification was too simplistic and ambiguous in the 1st edition of "The C Programming Language" by Kernighan & Ritchie as a reference. In addition, it seems that preprocessing was thought to be a bonus to the language proper. However, many features were added to preprocessing by each implementation since K&R 1st. Some supplemented flaws in the language proper while others tried to maintain portability among different implementations. However, there were too many differences among implementations in any case. The truth was it was nowhere close to being portable.

+

C90 provided a clear specification on preprocessing which had been a cause of the confusion for many years. There are some new features added which are well known. What is more important, however, is that C90 provides virtually the first overall specification on preprocessing. You can see a basic point of view, "what is preprocessing?", which had been vague thus far, everywhere in this specification. Preprocessing in C90 is not just K&R 1st + alpha. In order to understand this, I believe we need to grasp not only "new features", but also such basics clearly. Unfortunately, however, the basics of preprocessing are not summarized together in the body of the Standard and just mentioned briefly in "Rationale", a commentary on the Standard. Even more unfortunately, it contains incoherent parts which seem to be the results of making a compromise with conventional preprocessing. Therefore, I will summarize basic characteristics of C90 preprocessing and examine their issues.

+

Characteristics different from pre-Standard processing or newly defined are summarized as the following four points.

+
    +
  1. Literal "pre-processing" independent of implementation-specific parts in the language proper (execution environment, so to speak.) It is extremely rare for preprocessing to end in an unexpected result depending on implementation. This allows us to write portable source code for a preprocessor itself. Also, only one preprocessor executable program suffices for each OS.
    +
    +
  2. The translation phase specification clearly defines a procedure for tokenizing source. A token is handled in an interim form as a preprocessing token until preprocessing completes. Specifying preprocessing tokens and tokens themselves separately helps preprocessing getting independent of implementation-dependent parts in the language proper.
    +
    +
  3. Preprocessing takes place in the unit of preprocessing token and is token-oriented in principle. On the contrary, pre-Standard preprocessing was supposedly token-oriented but contained parts for character-oriented processing to no small extent based on its historical background; it was neither one thing nor the other.
    +
    +
  4. Function-like macro expansion is modeled after a function call to organize grammar. Function-like macro calls can be used anywhere function calls can. Processing for a macro call in an argument parallels the evaluation for a function call in a function argument and is substituted for a parameter in the replacement list after the macro in the argument is completely expanded. At this expansion, the macro call in the argument must be completed within the argument.
    +
+

These principles are examined below in turn.

+
+ +

2.2. Translation Phases

+

No preprocessing procedure was described in K&R 1st, which caused much confusion. C90 specifies and defines translation phases. It can be summarized as follows. *1

+
    +
  1. Map the characters in source files to the source character set if necessary. Replace trigraphs. *2
    +
    +
  2. Delete <backslash><newline>. By doing so, splice physical lines to form logical lines.
    +
    +
  3. Decompose source files into preprocessing tokens and white spaces. Comments are replaced by one space character. <newline> is retained.
    +
    +
  4. Execute preprocessing directives and expand macro calls. If #include directive exists, files specified are processed for phase 1 to phase 4 recursively.
    +
    +
  5. Convert characters in the source character set into the execution character set. Convert escape sequences in character constant and string literals similarly.
    +
    +
  6. Concatenate adjacent string literals and concatenate adjacent wide character string literals.
    +
    +
  7. Convert preprocessing tokens into tokens and compile.
    +
    +
  8. Link.
    +
+

Needless to say, these steps do not actually have to be in separate phases as long as they are processed to lead the same result.

+

Among these phases, phase 1 to 4 or to 6 belong to the range of preprocessing. It is usually handled up to phase 4 since token separators such as <newline> need to be retained if a preprocessor is an independent program and outputs the preprocessing result as an intermediate file (if escape sequences such as \n are converted in phase 5, they cannot be distinguished from <newline> and other token separators.) This Validation Suite also tests up to phase 4.

+

Note:

+
+*1 C90 5.1.1.2 Translation phases
+   C99 5.1.1.2 Translation phases
+
+C99 added _Pragma() operator processing at phase 4. Some words have been added to the description, but no changes to the meanings in particular.

+

*2 In the C99 draft in November, 1997, a multi-byte character not included in the basic source character set before trigraphs replacement was, by a specification, to be converted into a Unicode hexadecimal sequence of the \Uxxxxxxxx format, that is, a universal character name. This sequence is re-converted into the execution character set in phase 6. This is similar to the C++ Standard.

+

This specification is vague, furthermore, the load is great on implementations. Fortunately, the processing at phase 1 was deleted in the draft in January, 1999 and remained as is in C99 official version.

+ +

2.2.1. Line Splicing Before Tokenization

+

K&R 1st described only 2 cases below regarding line splicing by <backslash><newline>, no others were defined.

+
    +
  1. In the middle of a long #define line
    +
  2. In the middle of a long string literal
    +
+

C90 clearly defines that <backslash><newline> is deleted in phase 2 before decomposing lines into preprocessing tokens and token separators in phase 3. This allows any lines or any tokens to be spliced.

+

Also, as trigraph processing is done in phase 1, the ??/<newline> sequence is similarly deleted. On the other hand, 0x5c code in the second byte of Kanji characters is not a <backslash> for the implementation with ASCII as its basic character set and Shift-JIS Kanji Characters as the multi-byte character encoding since one Kanji character is one multi-byte character.

+

It is good that the translation phases became clear, but I am wondering if it is necessary to support line splicing in the middle of a token. Although this was the only way to write a long string literal which cannot fit on one line on the screen in K&R 1st, it is not necessary to start a new line in the middle of a token on purpose since adjacent string literals are concatenated in C90. Line splicing is required only when you write a long control line. If that were the only issue, it would have been better to reverse phase 2 and 3.

+

Still, the current specification seems to be adopted for backward compatibility so that the source written assuming the specification of the concatenation by line splicing for string literals in K&R 1st can be processed. The specification is almost meaningless for new source in practical use, however, it is probably appropriate since it is simple, comprehensible, and easiest to implement.

+
+ +

2.3. Preprocessing Token

+

The concept of preprocessing token (pp-token, for short) was also introduced for the first time in C90. Since it does not seem to be known very much, however, I will summarize the content at first. Below are specified as pp-tokens. *1

+
header-name
+identifier
+preprocessing-number
+character-constant
+string-literal
+operator
+punctuator
+Non-white-space character other than above
+

These look nothing special at a casual glance, but they are quite different from the token proper. Tokens are below.

+
keyword
+identifier
+constant (floating-constant, integer-constant, enumeration-constant, character-constant)
+string-literal
+operator
+punctuator
+

Pp-tokens differ from tokens in the following points.

+
    +
  1. No keywords. A name the same as a keyword is handled as an identifier.
    +
  2. For constants, character-constant is same while floating-constants, integer-constants, and enumeration constants do not exist and preprocessing-numbers replace floating-constants and integer-constants.
    +
  3. Header-name exists only as a pp-token.
    +
  4. Operator and punctuator are almost the same, but # and ## operators and # punctuator exist only as a pp-token. (All are valid only in preprocessing directive lines.)
    +
+

Surprisingly, only string-literal and character-constants are the same. The most important of all are no keywords and the existence of a preprocessing-number instead of a numeric token. We will discuss these 2 items further.

+

Note:

+
+*1 C90 6.1 Lexical elements
+   C99 6.4 Lexical elements
+
+

In C99, an operator was absorbed by a punctuator whether it is a pp-token or token. Operator became the term simply for an "operator" functionality, not as a token type. The same punctuator token (punctuator pp-token) may function as a punctuator or operator depending on the context. Also, _Pragma was added as a pp-token operator.

+ +

2.3.1. No Keyword

+

A keyword is recognized for the first time in phase 7. A keyword is handled as an identifier in preprocessing phases. For preprocessing, an identifier is a macro name or an identifier which has not been defined as a macro. That means that even a macro with a same name as a keyword can be used. *1

+

This specification is indispensable in order to separate preprocessing from implementation-dependencies. This, for example, prohibits using a cast or sizeof in #if expressions. *2

+

Note:

+

*1 To be more precise, a parameter name in a macro definition is also an identifier. In addition, a preprocessing directive name is a special identifier and has a similar characteristic to a keyword. Whether this is a directive, however, is judged by syntax. If it is not in a valid place for directives, it is simply an identifier, which may be subject to macro expansion.

+

*2 Refer to 3.4.14.7 and 3.4.14.8.

+ +

2.3.2. Preprocessing-number

+

Preprocessing-numbers (pp-number, for short) are specified as below. *1, *2

+
+digit
+.digit
+pp-number digit
+pp-number nondigit
+pp-number e sign
+pp-number E sign
+pp-number .
+
+

Non-digits are letters and underscores.

+

Summarized as below.

+
    +
  1. Starts with a digit or .digit.
    +
  2. The rest is sequences of letters (alphabets), underscores, digits, periods, and e+, e-, E+, or E- in any order.
    +
+

Pp-number includes all floating-constants and integer-constants, and even non-numerical sequences, 3E+xy, for example. Pp-number was adopted to make preprocessing simple and is considered to be helpful for the tokenization of this type of sequence which precedes semantic interpretation. *3

+

It is correct that tokenization becomes simple, however, a non-numeric pp-numbers is not a valid token. Therefore, it must disappear before completing preprocessing. Use of non-numeric pp-numbers deliberately in source is highly unlikely. The only case I can think of is that a numeric pp-number and another type of pp-token are concatenated to become a non-numeric pp-number in the macro defined by using a ## operator and it is stringized by a macro defined by a # operator. Any pp-token becomes a valid token if it is put in a string literal. However, without accepting the existence of non-numeric pp-number, the one generated by concatenation will not become a valid pp-token (the result becomes undefined.)

+

Although this type of usage is extremely special and need not to be examined in detail, pp-numbers provide an interesting subject matter in terms of token-oriented preprocessing.

+

Note:

+
+*1 C90 6.1.8 Preprocessing numbers
+   C99 6.4.8 Preprocessing numbers
+
+

*2 In C99, pp-number p sign and pp-number P sign sequences were added to enable hexadecimal expression for floating point numbers. In addition, the nondigit above was replaced by the identifier-nondigit. This is a change accompanied by the approval of using an UCN (universal character name) and implementation-defined multi-byte characters in an identifier. (Refer to 2.8.) In other words, an UCN can be used in a pp-number and an implementation using multi-byte characters is supported. This is allowed in case of stringizing by ## and # operators though no UCN or multi-byte characters are included in a numerical value token.

+
+*3 C89 Rationale 3.1.8 Preprocessing numbers
+   C99 Rationale 6.4.8 Preprocessing numbers
+
+ +

2.3.3. Token-based Operations and Token Concatenation

+

C90 acquired pp-token concatenation capability with the ## binary operator in a macro definition. This is known as a "new feature" in C90. This, however, is something introduced to replace a hack rather than a new feature. What I would like to pay attention here is that this is essential for token-oriented preprocessing.

+

The traditional token concatenation method, uses a specification of replacement of a comment with 0 character, known as the so-called "Reiser type cpp." On other occasions, token concatenation occurs unintentionally in the preprocessor with character-oriented operations. And, there were hacks taking advantage of it. I can say all took advantage of flaws in character-oriented preprocessing.

+

On the other hand, C90 allows explicit token concatenation by token-oriented operations. Source file is decomposed into sequences of pp-tokens and white spaces in translation phase 3. The only cases of combining pp-tokens later is ## operator concatenation and # operator stringizing, header-name construction, and the concatenation of string literals or wide character string literals next to each other. The handling of non-numeric pp-numbers is clear if its existence is considered in this context. That is to say, there are the following principles of C90 tokenization.

+

Pp-tokens are not concatenated implicitly. Concatenation must be done explicitly by ## operators. Pp-tokens concatenated once will never be separated again.

+

In pre-Standard character-oriented preprocessing, macro call expansion sometimes caused unintended concatenation with tokens before and after with the token sequence as its result. However, this can be thought as something which must not occur in token-oriented C90 preprocessing. *1

+

Note:

+

*1 Refer to 3.4.21.

+
+ +

2.4. Evaluation Type of #if Expression

+

In C90, the #if expression was evaluated with one type of size, either long or unsigned long. This also simplified preprocessing and helped reducing implementation-dependent parts at the same time. Compared with the int size, which varies greatly depending on implementations, long/unsigned long are 32 bits for the most part and sometimes 64 or 36 bit. This assures considerable portability in general #if expressions. *1, *2, *3

+

Note:

+
+*1 C90 6.8.1 Conditional inclusion -- Semantics
+
+*2 C99 6.10.1 Conditional inclusion
+
+

In C99, the #if expression type was specified as the maximum integer type for the compiler system. Since C99 requires long long/unsigned long long, this would be long long/unsigned long long or wider. This, however, reduces the portability of #if expressions.

+

*3 There will be more implementations with 64 bit long in the future, but I am not sure if that is good... By the way, I personally believe that the integer type size should be defined as below.

+
    +
  1. short as 2 bytes and long as 4 bytes.
    +
  2. longlong (not long long) or quadra as 8 bytes.
    +
  3. int should be CPU dependent. In other words, either short, long, or longlong.
    +
  4. Stop using the usage of short int and long int by modifying int with short or long.
    +
+

In other words, there has been a constraint of sizeof (short) <= sizeof (int) <= sizeof (long) since the arrival of 64 bit compiler systems which made everything constrained and caused no type to maintain portability. It will be better to remove this constraint and to decide types by absolute size.

+
+ +

2.5. Portable Preprocessor

+

Standard C preprocessing specifications above allow writing the source code for a preprocessor itself portably. That is because the preprocessor needs to know nothing about the implementation-dependent parts of compiler proper. Only peripheral parts as below become problems when you actually try to write preprocessors portably in Standard C compiler systems.

+
    +
  1. Path list description format of OS for #include processing. Where standard header files exist.
    +
  2. Format to pass filename and line number information to a compiler proper.
    +
  3. Runtime options.
    +
  4. Character set.
    +
  5. The size of long/unsigned long in C90 or the maximum integer type in C99 must not go below that of the target implementation in cross implementations.
    +
+

2 and 3 above are necessary only if they are implemented for existing implementations. I expect that 2 will be standardized in the #line 123 "filename" format same as a source file. 3 is not necessary (logically, leaving convenience aside) for Standard C preprocessing. 4 can be written in the form such that special implementations are not required depending the source code (though implementations are easier for a basic character set if a table is used in the source code.) 5 will not be a problem since the integer type size for a host implementation is seldom smaller than that of target one in reality.

+

Needless to say, mcpp was also created with a motive that these Standard C preprocessing specifications are independent of compiler proper (though there are many #if sections in order to assure the portability since this mcpp is intended to be ported to many compiler systems.)

+
+ +

2.6. Function-like Macro Expansion

+

Macro expansion method with arguments is specified modeling after function calls in C90 and called a function-like macro. If macros are contained in an argument, they are expanded before substitution for a parameter in principle.

+

This point was not clear for pre-Standard implementations. I suspect that most used the method that an argument was substituted for a parameter without the macro within it being expanded and was expanded at rescanning. So to speak, the editor-like text replacement repetition is speculated to be behind this type of expansion. In general, text replacement repetitions for editors are fine for macro expansion without arguments, but I wonder if they were extended to the macro expansion with arguments for many preprocessors.

+

However, this method causes a strange way of using macros totally different from function call-like appearance in source. When calling a nested macro with arguments, the situation where it is not clear which argument is which occurs. Given these points, implementation-specific features will increase. In short, I can say that it became too heavy a load for the editor-like text replacement repetition as macro expansion of C grew to take on advanced features.

+ +

2.6.1. Analogous to Function Call

+

In consideration of this confusion, the grammar was organized in Standard C by positioning function-like macro calls as replacements for function calls. The Rationale states the following principles for which the Standard C specifications of macros are grounded. *1

+
- Allow macros to be used wherever functions can be.
+- Define macro expansion such that it produces the same token sequence whether the macro calls appear in open text, in macro arguments, or in macro definitions.
+

This stands to reason for function calls, but not for macros with arguments. It is obvious that this is not for editor-like text replacement repetition.

+

Note:

+
+*1 C89 Rationale 3.8.3 Macro replacement
+   C99 Rationale 6.10.3 Macro replacement
+
+ +

2.6.2. Argument Expansion Before Substitution

+

What is essential for achieving the principle of macro expansion parallel to function calls is to expand macros in an argument first before substituting a parameter with the argument. And, the macro call within an argument must have been completed within that argument (it causes an error if not completed.) A macro within an argument must not absorb the text right after it. Thus, nested function-like macro calls can maintain logical clarity. *1

+

Note:

+

*1 Refer to 3.4.25.

+ +

2.6.2.1. No Expansion for the Operand of the # or ## Operator

+

Operands for the # operator, however, are not supposed to be macro-expanded. Operands for the ## operator are not macro-expanded, either. The pp-token generated by concatenation becomes subject to macro expansion at rescanning. Why do we need this specification?

+

This specification is meaningful when an argument includes macros indeed. It is helpful if you want to stringize or concatenate token sequences including macros as they are. On the contrary, to expand a macro before stringizing and concatenation, it needs wrapping another macro which does not use # and ## operators. In order for a programmer to be able to choose either of these, a specification is needed so that no macro-expansion is performed for the operands of # and ## operators. *1

+

Note:

+

*1 Refer to 3.4.25, misc.t/PART 3 and 5. A typical example where the specification of no macro expansion for the operand of the # operator helps is the assert() macro. Refer to 5.1.2.

+ +

2.6.3. Rescanning

+

Now, after macro calls are replaced with a replacement list and function-like macro arguments are substituted for parameters in the replacement list after being expanded, the replacement list is rescanned searching for more macro calls.

+

This rescanning is a specification since K&R 1st. And there seems to have been an "editor-like text replacement repetition" approach in the background. In Standard C, however, function-like macro arguments have been completely expanded already except for operands of ## operators. What on earth is expanded at rescanning?

+

Rescanning is necessary for macros in replacement list other than parameters, and for macros with ## operators. What is needed rescanning other than those is so-called cascaded macros, where macro "definitions" are nested. If "arguments" for macro calls are nested, they usually do not get expanded again at rescanning since they have been expanded in the nesting structure before rescanning (though there are exceptions. Refer to 2.7.6 and 3.4.27.)

+ +

2.6.4. Prevention of Recursive Macro Expansion

+

Although cascaded macros are expanded one after another, it may be a problem sometimes. That is the case the macro definition itself is recursive. If this is expanded as is, it will fall into infinite recursion. The same problems occur in not only the direct recursive case where a macro is included in the definition itself, but also the indirect recursion of 2 or more definitions. In order to avoid this situation, Standard C adds a specification of "If the name of the macro being replaced is found during the rescan of the replacement list, it is not replaced." The phrases are difficult, but its intention is easy to understand.

+

This is a point where a function-like macro has different grammar from the function. It is also different from the editor-like replacement. Since it is a macro specific specification and has been used as a convenient processing, which is used only in macros, I think it is appropriate to keep this specification by clearly defining it.

+
+ +

2.7. Issues

+

I have covered above only good aspects or simple and clear aspects of Standard C preprocessing specifications. If I go into more detail, however, there are parts that are irregular or lacking in their utility or portability for their implementation overhead. Most of these are there without being able to settle traditional or implicit pre-Standard preprocessing methods. The existence of this type of useless area like an appendix which confuses the specification and makes implementation troublesome. Standard C also includes a few parts which caused new unnecessary complications. Those problems are sorted out below.

+ +

2.7.1. Header Name in the <stdio.h> Format

+

Although header-names enclosed by < and > have been used traditionally since K&R 1st, they are extremely exceptional and irregular as tokens. Because of this, Standard C has many undefined and implementation-defined parts regarding header-name pp-token. For example, it is undefined if the /* sequence is included. Also, if it is not a header-name as in <stdio.h>, the part which is divided into multiple pp-tokens as in <, stdio, . , h, and > must be combined to one pp-token as far as the #include line goes. That method is implementation-defined. Tokenization is performed in translation phase 3. However, if the line turns out to be a #include directive in phase 4, tokenization needs to be redone. I would have to say it is a very illogical specification. The processing in case a space exists between (temporary) pp-tokens, which were once tokenized in phase 3, is also implementation-defined. Directives such as #include <stdio.h> appear to have most portability, but have low portability in respect of preprocessing implementations. Irregularity increases more if the argument of the #include line is a macro.

+

Header-names enclosed by " and " have no problems like these. However, \ is not handled as an escape character as in header-names enclosed by < and > and this is the difference from string literals. It is not illogical that no escape sequence exists in a header-name which is processed in phase 4 since escape sequences are processed in phase 6 (\ within a header-name is undefined by the Standard. This must be a consideration to ease implementation. In reality, no problem occurs unless \ comes right before " inside of " and ". It is a little more complicated inside of < and >.) *1

+

Also, the difference between #include <stdio.h> and #include "stdio.h" is only that the former searches a specific implementation-defined location while the latter first searches (a relative path from) the current directory and the same location as <stdio.h> if it is not found (as Standard C does not assume an OS, it does not use the term, "current directory." But it is interpreted for most operating systems.) Therefore, #include <stdio.h> can be simply written as #include "stdio.h".

+

By having two kinds of header-name formats, there is a readability advantage of spotting at a glance the distinction between user defined and system provided headers. But it does not have to go to the trouble of providing an irregular token for that purpose. All it needs is to distinguish one from another by using different suffixes as in "stdio.h" and "usr.H" (if I add just in case, it is acceptable if a system does not distinguish uppercase and lowercase of a filename since this is a readability issue. Naturally, they can be "usr.hdr", "usr.usr", "usr.u", and etc.)

+

I believe that header-names enclosed by < and > should be abolished since it serves no use as a language specification and complicates preprocessing tokenization. It cannot be abolished out of the blue, but I would like it to be specified as an obsolescent feature.

+

Note:

+

*1 UCN starting with \ was introduced by C99, which is a little troublesome.

+ +

2.7.2. # Operator Specification with Legacy from Character-based Preprocessing

+

The next problem is the handling of white spaces as token separators between operands of # operators. One or more white spaces are compressed into one space and no space is inserted if there is no white space.

+

This is half-defined specification. In order to ensure token-based operations, the existence of token separators must not have an influence. For that reason, it should have been defined so that all token separators are deleted or a space is placed between every pp-token. C89 Rationale 3.8.3.2 (C99 Rationale 6.10.3.2) states that the # operator was decided "as a compromise between token-based and character-based preprocessing discipline" within this specification.

+

This compromise led to an extra burden rather than easing preprocessor implementation and brought ambiguity to complicated macro expansion as well. There is an example shown below in Example 4 of C90 6.8.3, C99 6.10.3 Macro replacement -- Examples.

+
+#define str(s)      # s
+#define xstr(s)     str(s)
+#define INCFILE(n)  vers ## n
+
+#include xstr(INCFILE(2).h)
+
+

This #include line is expanded as:

+
+#include "vers2.h"
+
+

This example is filled with many problems. There is no vagueness in INCFILE(2) being replaced with vers2. However, the expansion result of INCFILE(2).h, an argument for xstr(), is a sequence of 3 pp-tokens, vers2, ., and h. The expansion example in the Standard is handled with no white spaces among 3 pp-tokens. This involves issues as below.

+
    +
  1. vers2 is not a pp-token which was in source, but generated by macro replacement. To guarantee there are no white spaces after vers2, macro replacement must not generate white spaces before or after. However, pp-tokens may implicitly merge as a result of macro expansion at least for the preprocessors which are independent of the compiler if macro replacement is always such. This is against token-based preprocessing principles.
    +
    +
  2. Without generating white space before and after the macro replacement, which can be the operands of # operators and to avoid the implicit concatenation of pp-tokens, a little trick is necessary; for the macro replacement which exists in an argument for a function-like macro call, wrap the replacement result with temporary white spaces internally, delete them if it becomes an operand for a # operator, and replace only the temporary white spaces left after all replacement is complete with real spaces (*1.) This is quite a burden for a preprocessing implementation. And there is no merit. Furthermore, it is not clear from the Standard text that this type of processing is necessary and it is unclear what is the right process.
    +
+

All these ambiguity and complexity come from the incompleteness of token separator handling in operands for # operators.

+

I think it is better to have the specification such that # operators are stringized after each pp-token is separated with a single space in order to avoid implicit concatenation of pp-tokens and causing complicated problems and to show what kind of pp-token sequence the argument stringized is. If defined that way, this macro will be expanded as "vers2 . h". Needless to say, this is not an appropriate macro.

+

As this example shows, the only case where it will be troublesome to insert a space where none exists is the macro for the #include line using # or ## operator. The #include line to be processed in translation phase 4 cannot use the concatenation of the string literals to be processed in phase 6. However, the macro for the #include line can be simply defined as a string literal without bothering to be parameterized using # and ## operators. Sacrificing token-based principles just because of this parameterization is a great loss in the balance.

+

In the Standard C preprocessing specification, the syntax is token-based while the semantics specification of # operators is suddenly character-based, losing logical consistency.

+

Moreover, this example of the Standard assumes the specification, which is not necessarily clear from the Standard text. It is an inappropriate example and should be deleted.

+

Note:

+

*1 mcpp was compelled to be implemented in the same way.

+ +

2.7.3. White Space Handling at Macro Re-definition

+

There is a similar specification to white space handling in operand of # operators with regards macro re-definition. It is defined; "A macro re-definition must be equivalent to the original macro. In order to be equivalent, the number and name of parameters must be the same and the replacement list must have the same spellings. However, in the case of white spaces in the replacement list, their existence must be the same though the number can be different."

+

If the specification of the # operators are as above, this is an obvious conclusion since same handling is necessary for white spaces in the replacement list. Still, the cause of the problem is the specification of the # operators.

+

If the # operator is handled in such a way that one space exists between every pp-token in operands, there will be no issue regarding the existence of white spaces for macro re-definition.

+

Moreover, this can be generalized in the preprocessor implementation, by replacing with one space between every pp-token in source as a principle. By doing so, tokenization for macro expansion can be done easily and accurately. However, there are two exceptions to this principle. One is <newline> in the preprocessing directive line and another is whether there are white spaces between a macro name and the subsequent '(' in macro definition. This traditionally has been the basis of preprocessing in C and cannot be changed after all these years.

+ +

2.7.4. Parameter Name at Function-like Macro Re-definition

+

I have mentioned in 2.7.3 that parameter names must match regarding macro re-definition in the specification, but I believe this is an excessive specification. Parameter names, of course, do not make any difference to macro expansion. However, in order to check for re-definition, a preprocessor needs to store parameter names of all macro definitions. Even so, its usage is nothing other than re-definition checking within the specification. It is not such a great idea to give overhead to implementations only for almost meaningless checking.

+

I think it is better to remove the specification that parameter names must match at macro re-definition.

+ +

2.7.5. Unpredictable Evaluation of Character Constant in #if Expression

+

#if expression as an argument for the #if line is a constant expression in the integer type. Its evaluation must be independent of the execution environment since it is done in preprocessing. Because of that, a cast, the sizeof operator, and enum constants, which require references to the execution environment (these are first evaluated in translation phase 7) are excluded from #if expression compared to standard integer constant expressions. Character constants (and wide character constants), however, are not excluded.

+

Character constant evaluation is implementation-defined with many factors as shown below and has little portability.

+
    +
  1. Even the value of a basic character differs depending on the basic character set (ASCII, EBCDIC, and others.)
    +
    +
  2. Even a single-character character constant, within the same basic character set, has implementation-defined sign handling (depending on whether char is signed in the compiler proper.)
    +
    +
  3. Multi-character character constant evaluation is implementation-defined and the value may not be the same even if the sign handling is the same as basic character set. It is not defined whether 'ab' is 'a' * 256 + 'b' or 'a' + 'b' * 256 when CHAR_BIT is 8 and char is unsigned.
    +
    +
  4. Multi-byte character encoding is implementation-defined. Wide character encoding is same as multi-byte character encoding. The size of wchar_t and whether it is signed or unsigned is implementation-defined.
    +
    +
  5. Even if multi-byte character encoding is the same, the evaluation of a character may not. There is an issue same as 3.
    +
    +
  6. All above are common problems with character constant evaluation in compiler proper. In addition, the character set in preprocessing can differ from the one the compiler proper sees.
    +A source character set is applicable up to translation phase 4 and an execution character set is applicable at phase 6 and after. Phase 5 converts the characters in character constants and string literals from the source character set into the execution character set. That is to say, either or both basic character sets and multi-byte character encodings also may differ between source and runtime.
    +Character constants in the #if expression are evaluated in phase 4. This can be either the value of the source character set or simulated value of the execution character set. It is not defined as a source character set either.
    +
    +
  7. Even if the character set evaluated in a #if and the execution character set are the same, the methods of evaluation can differ. That is to say, sign handling and the byte order of multi-character character constant and multi-byte character constant evaluation may differ between phase 4 and phase 7.
    +
    +
  8. Furthermore, while the character constants including multi-byte character constants are evaluated in int and wide character constants in wchar_t in phase 7, they are all evaluated in long or unsigned long in phase 4. In other words, int is handled as if it has the same internal representation as long and unsigned int as if it has the same internal representation as unsigned long in phase 4. Therefore, for the implementation of INT_MAX < LONG_MAX, even if character sets, sign handling, evaluation byte orders are totally identical between phase 4 and 7, the character constant which does not overflow in phase 4 can overflow in phase 7. As a negative number in phase 7 may be a long positive number in phase 4, even whether it is positive or negative is not always the same. The integer constant token, which is not a character constant, does not become a negative number, however, whether positive or negative can hardly be predicted in general for character constants.
    +
    +
  9. In C99, the #if expression type became the maximum integer type of its implementation. In other words, the evaluation type may vary depending on the implementation.
    +
    +
  10. In addition, multi-byte characters have an encoding problem though it exists in compilation as well as preprocessing. For example, UTF-8 encodes a two byte Unicode character in between one byte and three bytes, however, what is the "value" of its character constant? Is a Kanji value the "value" which results from evaluating the three byte UTF-8 code or the "value" of the original Unicode? It will be implementation-defined, however, it is not even clear what sort of specification is reasonable.
    +
    +
  11. Though this is also a common problem with compilation, UCN was also introduced in C99 and C++98. Is a character expressed in UCN and one written in multi-byte characters the same "character"? They should be the same in nature, however, their "value" will be different depending on the encoding of multi-byte characters.
    +
+

As above, little can be predicted how evaluation is done since the character constant values for the #if expressions have no portability among implementations and may differ even within the same implementation depending on the compilation phases.

+

In general, the specification of the C language integer type has few ambiguous parts. Although negative value handling is implementation-defined with respect to computation, they are CPU-dependent and there are few parts implementers can decide optionally with character constant evaluation as an only exception. Many aspects are determined at the discretion of implementers other than the CPU specification, basic character set, and multi-byte character encoding.

+

The range of discretion for implementations increases immensely for the character constants of the #if expressions and no matching is guaranteed among compilation phases. Little of what is evaluated is understood even if this is evaluated. Character constant evaluation can be thought to require a reference to the execution environment under normal conditions. Standard C preprocessing removed this process of requiring a reference, but not character constants only somehow. And, it seems that the specification, which does not require a reference, was forced to be created, which created ambiguity.

+

How are this type of character constants for #if expressions used? The value of a char type variable is often compared with a character constant in the compilation phase, but there is no usage in the preprocessing phase in which no variables are used. I cannot think of any appropriate examples for the use of a character constant in a #if expression. This is a useless thing and should be removed from the #if expression subject just as cast and sizeof. There will be less source with issues if this is removed compared even with cast or sizeof removal.

+ +

2.7.6. Non-Function-like Rescanning of Function-like Macro

+

Macro calls are once replaced with the replacement list, and then rescanned. The messiest thing in the rescanning specification in Standard C is that the token sequence after the macro call is rescanned continuously to the replacement list as if the sequence is following the replacement list. This is completely deviated from the principle of function-like macro specification modeled after function calls and becomes the most outstanding factor to make macro expansion incomprehensible. I think that this specification of the subsequent token sequence as a rescanning subject should be removed and that the rescanning subject should be limited to the replacement list only.

+

Actually, rescanning subsequent token sequence seems to have been a long time implicit specification since around K&R 1st. This specification is no longer necessary in Standard C, but remained in an appendix as a legacy. Since this issue concerns the basis of macro expansion, I will study it further in detail below.

+

It is not an easy thing to describe the macro rescanning method in writing. The text in the Standard or in K&R 2nd is not easy to understand, either. For example, K&R 2nd A.12 says "the replacement list is repeatedly rescanned." However, the Standard does not state "repeatedly". It can be read as one rescanning. It can also be read as recursive rescanning, but not clearly described as such either.

+

This cannot be explained accurately without using an actual example. Furthermore, it cannot be understood intuitively without explaining the implementation method. That is how close macro rescanning is to the traditional implementation of macro expansion.

+

First, we will take a silly example. To simplify the problem, assume x and y are not a macro. How can this macro call be expanded?

+
+#define FUNC1( a, b)    ((a) + (b))
+#define FUNC2( a, b)    FUNC1 OP_LPA a OP_CMA b OP_RPA
+#define OP_LPA          (
+#define OP_RPA          )
+#define OP_CMA          ,
+
+FUNC2( x, y)
+
+1:  FUNC2( x, y)
+2:  FUNC1 OP_LPA x OP_CMA y OP_RPA
+3:  FUNC1 ( x , y )
+
+

It becomes clear at once that 1: is replaced with 2: and 3: is generated by rescanning in 2:. Then, is 3: a macro call? More specifically, should this be rescanned again from the beginning?

+

Is rescanning something repeated many times from the beginning or whose applicable range is gradually narrowed down recursively? The truth is neither.

+

As a matter of fact, rescanning seems to have been performed in a certain type of exceptional recursion or in a certain type of repetition resulting in the same. Its classical example is the one in the Macro Processing chapter in "Software Tools" by Kernighan & Plauger. This is something to be developed into the M4 macro processor later and this itself is not a C preprocessor. It is indicated that the macro processor was originally designed and implemented in C by Ritchie. The prototype of the preprocessor implementation is available.

+

In this macro processor, rescanning is realized by sending back the replacement list to the input for re-reading when there is a macro call. When there is another macro call in the replacement list, the new macro replacement list is sent back and re-read as if "it had been in the input originally." As it is written; "it provides an elegant way to implement the rescanning of macro replacement text", "This is how we handle the recursion implicit in nested sources of input", and others, this method greatly helps macro processor program to be structured and understood easily.

+

Many of C preprocessors perform rescanning by putting the replacement list in pseudo inputs, a type of stack, and re-reading it.

+

In the example above, if FUNC1 turns out not to be a macro call at this point when 2: is being rescanned, this token is established at the same time and the replacement hereafter will be for OP_LPA and after whether repetition or recursion. If OP_LPA is replaced with ( and turns out not to be a macro, x and later will be applicable next. This way, establishing a token is done sequentially starting with the beginning and 3: becomes the last result. This is no longer a macro call.

+

This method since "Software Tools" (or even before that) is certainly a concise implementation method. Though not mentioned in "Software Tools", there is also a pitfall. The problem is that there is a chance that rescanning may scan the part after the original macro call beyond the replacement list since the replacement list sent back to the input is read-in consecutively with source. In nested macros, the nesting level may get shifted; unnoticed while rescanning. A macro without arguments expanded into the name of the macro with arguments and a abnormal macro where the replacement list comprises the first half of another macro call with arguments causes this situation.

+
+#define add( x, y)      ((x) + (y))
+#define head            add(
+
+head a, b)
+
+

This is the example. This strange macro call is expanded as ((a) + (b)). This for some reasons ended up with being officially acknowledged by Standard C. In fact, this macro is legal rather than undefined.

+

I cannot think that C preprocessors were intended for abnormal macros like this. However, I wonder perhaps whether the original C preprocessor implementation was as above, which resulted in expanding these macros somehow in silence, and some programs consciously took advantage of these holes to the point where this became a de facto standard specification and finally approved in Standard C. That is to say, a small defect in the original C preprocessor implementation led to a strange de facto standard and left a trail even in Standard C. This is the reason an appendix is an appendix.

+

Now, returning to the topic of whether rescanning is recursive or repetitive, I believe that it is not necessarily wrong to say this is either an irregular recursion or repetition. It is recursion, but it has the strange characteristic that it is not always narrowed down its applicable range as in ordinary recursion, but rather the range is gradually shifted. This is repetition. However, the repetition is not from the beginning, but from the middle by including following parts gradually.

+

Therefore, it is possible to process the text, after all comments and preprocessor directives are processed, from the beginning until the end with this shifted rescanning only. In fact, such method is used in "Software Tools" and there is some using a similar way in the current C preprocessor source. In other words, rescanning is a synonymous with macro expansion and also the macro expansion for all text.

+

The fact that rescanning subjects are shifted gradually causes many problems. The next example was listed in C89 Rationale 3.8.3.4 (C99 Rationale 6.10.3.4) as an example of a macro, which is unclear how to be expanded. It is stated that the reason why this process was not defined as a specification was that "as the Committee saw no useful purpose in specifying all the quirks of preprocessing for such questionably useful constructs." However, this example is suggestive. Rather, this was not possible to be defined as a specification.

+
+#define f(a)    a*g
+#define g(a)    f(a)
+
+f(2)(9)
+
+

In this example, f(2) is replaced with 2*g at first. If the "subsequent preprocessing tokens" is not to be rescanned, macro expansion is completed and f(2)(9) becomes the token sequence of 2*g(9). However, as the "subsequent token sequence" is applicable, this g(9) forms a macro call and replaced with f(9). Here, it is not clear whether this f(9) should be replaced with 9*g again or not by applying the rule of no re-replacement for the macro with a same name. The token sequence of f(9) is generated by rescanning the continuation of g, that is the end of the first replacement result of f(2), and (9) of the "subsequent token sequence" and it is unclear whether this is inside or outside the f(2) call nest.

+

This problem was corrected in C90 Corrigendum 1, which adds the next example to Annex G.2 Undefined behavior.

+
-- A fully expanded macro replacement list contains a function-like macro name as its last preprocessing token (6.8.3).
+

This correction, however, only causes more confusion.

+

First of all, the wording, "fully expanded macro replacement list", is not clear in meaning. This can be only interpreted as "the replacement list after the macro within the argument is expanded if there is an argument." In that case, in the example of f(2)(9), f(2) is replaced with 2*g before considering the re-replacement of the macro with a same name and it becomes undefined already when g is a function-like macro name by rescanning it. In other words, if f is called, it always becomes undefined in this f and g macro definition.

+

If this "correction" is applied, the following example for macro rescanning in ISO/IEC 9899:1990 6.8.3 Examples will be undefined to begin with.

+
+#define f(a)    f(x * (a))
+#define x       2
+#define g       f
+#define w       0,1
+#define t(a)    a
+
+t(t(g)(0) + t)(1);      /* f(2 * (0)) + t(1);   */
+g(x+(3,4)-w)            /* f(2 * (2+(3,4)-0,1)) */
+
+

The Standard states that these macro calls will be expanded as in the comments, but this is not the case if the Corrigendum is applied. In these macro definitions of f and g, they will be always undefined when the g identifier appears. It is because f, a function-like macro name, is the only and last pp-token in the replacement list for g.

+
+t(t(g)(0) + t)(1)
+
+

At first, the argument of the first t call will be expanded.

+
+    t(g)(0) + t
+
+

Since there is another macro call, t(g), it will be expanded, but the argument must be expanded first for that.

+
+        g
+
+

And if this is replaced with f, it will become undefined here.

+

Even if replacements are continued as is, it will become:

+
+    t(f)
+    f
+
+

And it will be undefined again since the last pp-token of the t(f) expansion result is f. If replacements continue further, it will become:

+
+    f(0) + t
+        f(x * (0))
+        f(2 * (0))
+    f(2 * (0)) + t
+t(f(2 * (0)) + t)
+f(2 * (0)) + t
+
+

This ends the expansion of the first t call in any case, but it will be undefined for the third time since the end of this replacement list is a function-like macro name, t.

+

How about the following?

+
+g(x+(3,4)-w)
+
+

This will be undefined by the time g is replaced with f.

+

This results in confusion by contradicting Examples with G.2.

+

If the examples in the Examples are omitted, the correction in the Corrigendum does not relieve confusion. First of all, G.2 is not a part of the Standard and this addition does not have grounds in the text of Standard proper. In the text of Standard, it is only written that the "subsequent token sequence" is also to be rescanned. Secondly, even if this Corrigendum is included in the Standard proper,

+
+#define head            add(
+
+

in the previous example, add is correct since it is not in the end of the replacement list.

+
+#define head            add
+
+

is undefined, however. This is too unbalanced. Also, there is an issue of the wording, "fully expanded", being unclear in meaning. *1, *2

+

It goes without saying that these are quirks brought by the specification on "subsequent token sequence" as rescanning subject. The more plausible they try to make it sound, the more confusing it gets. The Standard states the specification forbidding the replacement of the macro with a same name in extremely difficult sentences. A reason for this difficulty comes also from these quirks.

+

On the other hand, Standard C defines that macro expansion in an argument must be performed only within the argument for function-like macro calls. Since it will be turmoil if the macro expansion in an argument eats up the text behind it, this is no wonder.

+

As a result of this, however, an imbalance occurs between the macro within an argument and not so.

+
+#define add( x, y)      ((x) + (y))
+#define head            add(
+#define quirk1( w, x, y)    w x, y)
+#define quirk2( x, y)       head x, y)
+
+head a, b);
+quirk1( head, a, b);
+quirk2( a, b);
+
+

In this quirk1() call, it will be a violation of constraint as an incomplete macro call at rescanning after the first argument, head, is replaced with add(. Put simply, it is an error. However, quirk2() and head a, b) will not be an error, but expanded as:

+
+((a) + (b))
+
+

It may sound repetitious, but this type of absurdity all comes from the fact that even the "subsequent token sequence" is applicable for macro rescanning in general. As a matter of implementation, the nesting level information needs to be added in order for the argument expansion to be performed independent of other text parts even using the method of sending the replacement list back to input. By using that method, it will be easy not to have the "subsequent token sequence" rescanned in general. Rather, in the current half-baked specification, it is necessary to change the process depending on whether it is inside an argument or not, resulting in extra load for implementations.

+

Macro expansion in C has been traditionally influenced by editor-like string replacement. We can say that pre-Standard macro expansion is something that has been added to string replacement for editors and become complicated to excess.

+

By contrast, Standard C took the trouble to name the macro with arguments a function-like macro. I can guess that it tried to bring the call syntax closer to a function call. The specification that the macro in an argument is replaced with a parameter after being fully expanded and the one that the expansion is performed only within the argument conform this principle. However, this principle is spoiled by the specification that macro rescanning in general includes the subsequent token sequence. It is an inheritance of text replacement repetition from its ancestor.

+

If the subsequent token sequence was removed from the rescanning subject, it could have been defined that macro expansion is completely recursive, and that the applicable range is narrowed or (at least not extended) forward or backward on every recursion. And, it would have been clear as an appropriate macro for the name, function-like macro. I cannot think there is much source code which would have had problems by this decision. I can only think that ANSI C committee could not make a decision on cutting an appendix inherited from an ancestor. *3

+

I wished C99 would cut it off cleanly, but the appendix has survived again.

+

Note:

+

*1 The object-like macro which is expanded into a function-like macro name is sometimes seen in actual programs. It is as below.

+
+    #define add( x, y)      ((x) + (y))
+    #define sub( x, y)      ((x) - (y))
+    #define OP  add
+        OP( x, y);
+
+

This is not as abnormal as an expansion into the first half of the function-like macro call as the former, but there is no reason why it must be this way. It is good to define a function-like macro nesting in a function-like macro as below.

+
+    #define OP( x, y)       add( x, y)
+
+

*2 The reason for this correction by Corrigendum is in "Record of Responses to Defect Reports" by C90 ISO C committee (SC 22 / WG 14) (#017 / Question 19.) The question on the macro expansion in f(2)(9) of ANSI C Rationale 3.8.3.4 was brought up again. The direct issue in this example must have been the application range of the specification on "prohibiting the re-replacement of macros with a same name", but the committee has answered as a common problem unlimited to macros with a same name. They did not realize that this interpretation might cause contradictions in the Examples.

+

In addition, this wording, "fully expanded", is strange. When f(2) is replaced with 2*g and rescanned up to g, is it fully expanded? If so, no more replacements will be performed. Therefore, it will not be undefined, either. If not fully expanded yet, g is rescanned with the succeeding (9) and replaced by f(9). If this is fully expanded, the last pp-token of 2*f(9) is not a function-like macro name. Therefore, this answer does not apply. In other words, it says "after macro expansion is completed" where the issue is when macro expansion ends. Thus, when macro expansion ends became more confusing.

+

In C99 draft in November, 1997, this item in the Corrigendum was included in Annex K.2 Undefined behavior but deleted in the draft in August, 1998 replaced by a following paragraph below in Annex J.1 Unspecified behavior. This eventually was adopted in C99.

+
+

When a fully expanded macro replacement list contains a function- like macro name as its last preprocessing token and the next preprocessing token from the source file is a (, and the fully expanded replacement of that macro ends with the name of the first macro and the next preprocessing token from the source file is again a (, whether that is considered a nested replacement.

+
+

It seems that the committee finally realized the contradiction in the Corrigendum. Fundamental problems in the text proper of the Standard, however, still remain. Also, when macro expansion ends is unspecified in the end. Furthermore, the distinction by the presence of '(' in the source means the difference in the result when the same macro exists in the source and when it exists in the replacement list of another macro. This is an inconsistent specification.

+

On this issue, refer also to section 3.4.26.

+

Also, the specification of macro expansion in C++ Standard is same as C90 without an equivalent of Corrigendum 1 in C90 nor the specification added in Annex J.1 of C99.

+

*3 Even with this decision, FUNC2( x, y) in the previous example will be FUNC1 (x, y) in argument expansion if this is in the argument of another macro call and again expanded into ((x) + (y)) at the original macro rescanning. In other words, the final expansion results differ depending whether in an argument or not so. However, this is another level of problem and not an inconvenience.

+ +

2.7.7. C90 Corrigendum 1, 2 and Amendment 1

+

With respect to ISO/IEC 9899:1990, Corrigendum 1 was released in 1994, Amendment 1 in 1995, and finally Corrigendum 2 in 1996.

+

Corrigendum 1 contains trivial corrections in wording mostly but only 2 impacts preprocessing. One is regarding macro rescanning of 2.7.6 described above.

+

Another is a specification extremely special regarding the case that a macro name in macro definition includes $ and others.

+

In Standard C, '$' is not accepted as a character in an identifier though there are implementations allowing this traditionally. In an example of 18.9 in test-t/e_18_4.t, $ is a character and interpreted as a pp-token in Standard C. The macro name is THIS and $ and after becomes the replacement list of an object-like macro, which is totally different result from the intention of the program which is a function-like macro with the name, THIS$AND$THAT.

+

In Corrigendum 1, an exception specification was added regarding this type of example; "if object-like macro replacement list starts with a non-basic character, a macro name and a replacement list must be separated by white-space." Standard C must output a diagnostic message to this example in 18.9. It is supposed to preventing the situation where the source with $ or @ used in macro names is silently preprocessed into an unintended result. It is a painstaking specification, but it is annoying that this type of exception increases. In implementations not accepting $ and/or @ as an identifier, macros like this always become an error in the compilation phase even if they are not an error in preprocessing. So, it does not seem to be necessary to define this exception specification. *1

+

In addition, ISO 9899:1990 had an ambiguous constraint that a pp-token, header-name, can be appear only in #include directives. However, it was corrected in Corrigendum 1 so that a header-name is recognized only in a #include directive.

+

In Amendment 1, the core is multi-byte characters, wide characters, and the library functions operating those strings. Accompanied by those, <wchar.h> and <wctype.h> standard headers were added. In addition, the <iso646.h> standard header and the specification on digraphs are added as alternatives to trigraphs as characters not included in ISO 646 character set or a notation method for token and pp-token using those characters. <iso646.h> is a quite easy header which define some operators as macros and it does not have any special problems. *2

+

The problem is a digraph. This is very similar to a trigraph and the usage is almost the same though the positioning in preprocessing is completely different. A trigraph is a character and converted into a regular character in translation phase 1 while a digraph is a token and pp-token. If a digraph sequence is stringized by the # operator, it must be stringized as is without conversion (though this # itself is also written as %: in a digraph.) Because of this, and only this, implementations need to retain this as a pp-token at least until phase 4 completes. If it were to be converted, it is later (convert the digraph sequence left as a token, not in string literal.)

+

This imposes an unnecessary burden on implementations. Implementations are more concise recognizing a digraph as a character just as a trigraph and to convert it in phase 1. There is no benefit to keep this as a pp-token. The Amendment also notes that the difference between a digraph and a usual token occurs only when they are stringized. It might be seen that it would be troublesome in writing a string literal like "%:" if a conversion is done in phase 1. But this is similar in trigraphs and too special of a problem to consider. If it must be written, just "%" ":" is enough. Digraphs should be re-positioned so that they are converted in phase 1 as an alternative to trigraphs.

+

Corrigendum 2 has no corrections regarding preprocessing.

+

Note:

+

*1 This specification disappeared in C99 and C++ Standard.

+

In C99, the following generalized specification was added to 6.10.3 Macro replacement/Constraints instead.

+
There shall be white space between the identifier and the replacement list in the definition of an object-like macro.
+

As this is also a tokenization exception specification, it is not praiseworthy.

+

*3 In C++ Standard, these identifier-like operators are tokens, not macros. Though it is difficult to understand why it is so (could it be an idea to cut down what preprocessing must do?), it is troublesome for implementations in any case.

+ +

2.7.8. Redundant Specifications

+

In C90 5.1.1.2, C99 5.1.1.2 Translation phases 3, there are redundant specifications though they are harmless.

+
A source file shall not end in a partial preprocessing token or comment.
+

Since translation phase 2 specifies that source files must not end without a <new-line> or with <backslash><newline>, the source file that passes phase 2 always end with a <newline> without a <backslash>. It never ends with a partial preprocessing token. Within Partial preprocessing token categories, there are ", ', <, and >, which are unmatched in logical lines, which are considered to be undefined in C90 6.1 Lexical Elements/Semantics and not problems limited to the source ending. "Partial preprocessing token or" is unnecessary wording.

+

C90 6.8.1, C99 6.10.1 Conditional inclusion/Constraints contains expressions, which cause a misunderstanding.

+
it shall not contain a cast; identifiers (including those lexically identical to keywords) are interpreted as described below;
+

This "it shall not contain a cast; " is superfluous. In the succeeding parts and Semantics, it is made clear that all identifiers including an identifier the same as a keyword are expanded if macro and remaining identifiers are evaluated as 0. A cast does not need to be considered. In the (type) syntax, it is clear that type is handled as a simple identifier.

+

On the contrary, if this is in a constraint, it can be interpreted that the implementation recognizes the cast syntax and must output a diagnostic message. That is not the intention of the Standard. There is no keyword in translation phase 4, cast has no way to be recognized. As far as this is concerned, sizeof is also the same. It is strange that only cast is mentioned without mentioning sizeof. This type of wording is called "superfluous."

+
+ +

2.8. Preprocessing Specification in C99

+

The following specification regarding preprocessing was added to C99.

+
    +
  1. The hexadecimal sequence in the \uxxxx or \Uxxxxxxxx format in identifiers, string literals, character constants, or pp-numbers is called UCN (universal-character-name) and means a Unicode character value. This must specify extended characters not included in the basic source character set. Whether a \ should be inserted when a UCN is stringized by the # operator is implementation-defined.
    +
    +
  2. Implementation-defined characters can be used in identifiers. Therefore, implementations that allow the use of multi-byte-characters such as Kanji characters in identifiers became possible.
    +
    +
  3. Handle // to the end of the line as a comment.
    +
    +
  4. As e+, E+, e-, and E-, the sequence of p+, P+, p-, and P- is accepted in a pp-number. This is for writing the bit pattern of a floating-point number hexadecimal such as 0x1.FFFFFEp+128.
    +
    +
  5. The type of the #if expression is a maximum integer type in the implementation. As long long/unsigned long long is required, the type of the #if expression has the size of long long or wider.
    +
    +
  6. Variable argument macros can be used.
    +
    +
  7. An empty argument of a macro call is a valid argument.
    +
    +
  8. Add a predefined macro, __STDC_HOSTED__. This is defined as 1 on a hosted implementation, 0 otherwise. A predefined macro, __STDC_VERSION__, is defined in 199901L.
    +
    +
  9. Add predefined macros, __STDC_ISO_10646__, __STDC_IEC_559__, and __STDC_IEC_559_COMPLEX__ as options.
    +
    +
  10. The new _Pragma operator.
    +
    +
  11. Reserve the directive name starting with #pragma STDC for the Standard and implementation and add three #pragma STDC directives which show floating point operation methods. Directives starting with #pragma STDC are not to be macro-expanded, but other #pragma lines not so are implementation-defined.
    +
    +
  12. When a wide-character-string-literal and a character-string-literal are side by side, it was considered to be undefined in C90. However, they are concatenated as a wide character string literal.
    +
    +
  13. Extend the range of the line number used as an argument for #line to [1,2147483647].
    +
    +
  14. Raise translation limits as below.
    +
    + + + + + + + + + +
    Length of a source logical line 4095 bytes
    Length of a string literal, character constant, and header name4095 bytes
    Length of an internal identifier 63 characters
    Number of #include nesting 15 levels
    Number of #if, #ifdef, #ifndef nesting 63 levels
    Number of parenthesis nesting in an expression 63 levels
    Number of parameters of a macro 127
    Number of macros definable 4095
    +
    +
  15. Header name was guaranteed up to 6 characters + . + 1 character. This is changed to 8 characters + . + 1 character.
    +
+

Variable argument macros are as below. If there is a macro definition,

+
+#define debug(...)  fprintf(stderr, __VA_ARGS__)
+
+

a macro call,

+
+debug( "X = %d\n", x);
+
+

is expanded as:

+
+fprintf(stderr, "X = %d\n", x);
+
+

In other words, ... in the parameter list means one or more parameters and __VA_ARGS__ in the replacement list corresponds to it. Even if there are multiple arguments which correspond to ... in a macro call, the result of merging those including ',' is handled as one argument.

+

Among undefined behaviors in C90, there are some in which adequately meaningful interpretations are possible. An empty argument in macro calls is one of them and there is a case that it is useful to interpret this as 0 pp-token. This became a valid argument in C99.

+

C99 mentions an extension operator called _Pragma which is converted into #pragma foo bar if written as _Pragma( "foo bar"). In C90, the argument for the #pragma line does not get macro-expanded and the line similar to a #pragma directive as a result of macro expansion is not handled as a directive and cannot write #pragma in the replacement list of macro definition. On the other hand, the _Pragma expression can be written in the macro replacement list and #pragma which came from its result is handled as a directive. The extension by _Pragma tries to improve the portability of cumbersome #pragma.

+

It is simpler to make a modification that the argument of #pragma is subject to macro expansion, without this type of irregular extension. It will largely achieve the intention of portability improvement. However, in that case, there still remains a constraint that #pragma cannot be written in a macro and there will be an issue that the argument of #pragma which must not be macro-expanded has to have its name changed to start with __ in order to separate from the user name space. Though _Pragma() operator is irregular, its implementation is not so troublesome and it is a reasonable specification.

+

There are too many issues on the introduction of Unicode. First of all, implementations must prepare a huge table for multi-byte characters and Unicode conversion, causing large overheads. It is virtually impossible to implement it on the systems with 16 bits and less. There are systems that do not handle Unicode. In addition, there are many cases that a Unicode and a multi-byte character do not have a one-on-one mapping. It seems too aggressive to place Unicode in a C language standard in the name of programming language internationalization.

+

In C99, UCN handling drastically reduced compared with the draft in November, 1997 and C++ Standard. The preprocessing load became small relatively. Therefore, a certain implementation became possible in mcpp as well. *1

+

However, there are still some large loads on compiler proper. Also, since these are unreadable expressions, I expect that they will end up not being used much as trigraphs. *2

+

Note:

+

*1 In the draft in November, 1997, almost same as C++ Standard, it was supposed to be that the extended characters which are not in the basic source character set are all converted into UCN in translation phase 1 and converted again into the execution character set at phase 5.

+

In case of implementing this, it is speculated that a tool will be called to convert these before and after processing. As the conversion is OS-dependent, separate tools will be realistic.

+

*2 According to C99 Rationale 5.2.1 Character sets, this specification assumes that unreadable expressions are converted between the source in multi-byte characters by a tool included in the compiler system to be used. This must mean separating multi-byte character string literal parts in a separate file to process. I wonder how practical that is.

+
+ +

2.9. Toward Clear Preprocessing Specifications

+

Problems in Standard C preprocessing specifications and what I think mentioned above are also requests for Standard C in the future. In summary, there are following items.

+
    +
  1. Header-names in the <stdio.h> format should be an obsolescent feature. In the next version after the next, header-names should be only in the string literal format.
    +
    +
  2. Stick to the token-based preprocessing principle. The # operator should be stringized after a single space is inserted between each pp-token even without a token separator so that whether a token separator exists in an argument does not influence.
    +
    +
  3. Similarly, macro re-definition is not influenced by whether a token separator exists in the replacement list.
    +
    +
  4. Parameter name differences should not be an issue at macro re-definition, since checking parameter name differences just increases the overheads in implementation and has no value.
    +
    +
  5. Character constant evaluation normally requires a reference to the execution environment and has no use in the #if expression. Therefore, this should be removed from the #if expression subject.
    +
    +
  6. Function-like handling of function-like macros should be consistent. Whether a macro call is in an argument or replacement list, macro rescanning should be applicable only for the replacement list and not for the succeeding pp-token sequence of a macro call so that the same pp-token sequence is generated in principle.
    +
    +
  7. A digraph should not be a token, but an alternate spelling of a character similar to a trigraph. It should be converted in translation phase 1.
    +
    +
  8. Remove "partial preprocessing token or" from translation phase 3.
    +
    +
  9. Remove a description regarding the #if expression, "it shall not contain a cast; ", from the constraint and move it to footnote 140 in C99.
    +
    +
  10. Trigraphs should be abolished as they are not used in Europe.
    +
+

These are all intended to reorganize irregular rules and make preprocessing specifications simple and clear. There is no doubt that these will make preprocessing easier to understand. On the contrary, there should be little annoyance.

+

I believe that mcpp V.2 implemented all preprocessing specifications in Standard C in the Standard mode including the parts I do not think highly of. In the 'post-Standard' mode, preprocessing with modifications above is implemented (also excluding UCN, the use of multi-byte characters in an identifier.)

+

Amendment 1 and Corrigendum 1 in C90 took the direction of increasing the irregularity of preprocessing rather than cleaning it up.

+

C99 added various new features, but did not clean up the confusion of logic above either, unfortunately. *1

+

Regarding the specifications added in C99, I have the following request.

+
    +
  1. The introduction of Unicode (UCN) should be limited to an option. +
+

In addition, there is an issue other than the problems described above regarding evaluation rules for the integer type applicable to #if expressions.

+
    +
  1. There is a constraint that the constant expression shall evaluate to a constant in the range of representable values for its type. It is not clear if this applies to all constant expressions. Since there are no exceptions described, I can only interpret that all constant expressions are applicable, but I expect that the intention of Standard C is something like "where a constant expression is necessary." It should be clear. On the other hand, there is a specification, "computation involving unsigned operands can never overflow." It is vague as to whether a diagnostic message should be output in case that the result of unsigned type constant evaluation goes beyond its range (since a constant expression can be evaluated at compilation, it seems appropriate to output a diagnostic message.) +
+

Since this is not a preprocessing specific issue, it will not be discussed further.

+

Also, in C90 it was defined that the result of / or % when one or both operands are negative is implementation-defined, which was a terrible specification. This became the same specification as div() and ldiv() in C99.

+

Note:

+

*1 Various defect reports regarding C99, responses to them, and corrigendum drafts are on the ftp site below. This is the official ftp server for ISO/SC22/WG14 and you can ftp as anonymous at least for now (SC stands for a steering committee and WG means a working group. SC22 deliberates programming language Standards and WG14 handles C Standards.)

+
+

http://www.open-std.org/jtc1/sc22/wg14/

+
+
+ +

3. Validation Suite Explanation

+ +

3.1. Validation Suite for Conformance of Preprocessing

+

Items in the test-t, test-c, test-l, and tool directories and this cpp-test.html itself are "Validation Suite for Standard C Conformance of Preprocessing" developed by myself. It tests the level of Standard C (ANSI/ISO/JIS C) conformance for preprocessing in optional compiler systems in detail. It is intended to cover all preprocessing specifications defined in Standard C. It also covers C++ preprocessing. There are many additions addressing issues outside the specification.

+

As Standard C conformance requirements, not only that compiler systems shall behave correctly, but also that documents shall contain necessary items mentioned accurately. I will explain this in 3.5.

+ +

3.1.1. Testcases in test-t Directory

+

The test-t directory contains 183 sample text files. Out of 183, 30 are header files, 145 sample text files, and 8 are files gathering small pieces of sample text. All but header files have a name in the *.t format, except some of *.cc. These have nothing to do with compilation phases, but test preprocessing phases. Therefore, they are not necessarily in the correct C programming format. They are rather sample text files for testing preprocessing.

+

As Standard C implementations can compress preprocessing and compilation to a single process, it is not possible to test preprocessing separately, depending on the implementation. You can say that these *.t samples themselves do not conform Standard C. However, there are many implementations that can be tested by separating preprocessing only. In fact, specifications and problems are clear if they can be separated. The *.t sample files are for those.

+

*.cc files are samples for C++ preprocessing, provided for some preprocessors which do not accept the files named *.c or *.t as C++ source. Those have the same content with corresponding *.t files.

+

Among sample text files, there are ones with names starting with n_ (meaning normal), i_ (meaning implementation-dependent), m_ (meaning multi-byte character) and e_ (meaning erroneous.)

+

Files starting with n_ are samples that do not contain errors, something causing undefined behavior, or implementation-defined parts. Preprocessors conforming to Standard C must be able to process these properly.

+

Files starting with i_ are samples dependent on implementation-defined specifications regarding character sets assuming the ASCII basic character set. (*) Preprocessors for the implementations with ASCII character set conforming to Standard C must be able to process these properly without errors.

+

Files starting with e_ are samples that contain some sort of violation of syntax rules or constraints, in other words, errors. Preprocessors conforming to Standard C must be able to diagnose these, but not overlook these.

+

Files with a number succeeding n_, i_, m_ or e_ are samples that test preprocessing in C90 and common preprocessing specifications in C90 and C99. Among header files, pragmas.h, ifdef15.h, ifdef31.h, ifdef63.h, long4095.h and nest9.h to nest15.h are samples to test C99 preprocessing specifications and others are for common specifications in C90 and C99.

+

Files with alphabetics other than std or post after n_, i_, e_, or u_, are samples for C99 and C++. n_dslcom.t, n_ucn1.t, e_ucn.t and u_concat.t are samples to test preprocessing specifications common in C99 and C++98, n_bool.t, n_cnvucn.t, n_cplus.t, e_operat.t and u_cplus.t for C++, and the rest for C99.

+

The file named ?_std.t combines pieces of files in C90 together.
+?_std99.t is an equivalent for C99. ?_post.t and ?_post99.t files are bonus files and used for testing mcpp in the 'post-Standard ' mode.

+

The files named u_*.t are bonus files and the pieces of files to test undefined behaviors. undefs.t combines those as one file. unbal?.h is a header file used in those. unspcs.t tests unspecified behaviors and warns.t does not belong to any of the above, but is the file describing texts for which warnings are desirable. unspcs.t and warns.t are also bonus. Files named m_*.t are samples for several encodings as multi-byte character and wide character sets. It is desirable to process many encodings properly. m_*.t belong to quality test items like u_*.t.

+

misc.t, recurs.t and trad.t are real bonuses. misc.t is a collection of what is in Standards and other documentation, tests with different results depending on the internal representation of the integer type, tests related to translation phase 5 or 6, tests for enhanced functions, and others. recurs.t is a special case of recursive macro, and trad.t is a sample for the old "Reiser model cpp".

+ +

3.1.2. Testcases in test-c Directory

+

There are 133 files in the directory called test-c. 26 of those are header files (24 files are same as the ones in test-t), 102 of them are pieces of sample source files, 3 of them are files which combine pieces of sample source, and the other 2 are files used for automatic testing. Among these, 32 files are bonus sample source files. Source files other than header files are named *.c. This is in the C program format.

+

Naturally, file names start with n_, i_, m_ or e_. Ones starting with n_ are strictly conforming programs (which does not have any errors nor implementation-dependent portions) in Standard C. Implementations must be able to compile these files correctly without errors and execute them correctly. In case of correct execution, the messages below are displayed.

+
+started
+success
+
+

With exceptions of n_std.c and i_std.c, these messages are not displayed. However, only the end message,

+
+<End of "n_std.c">
+
+

, is displayed. Otherwise, some sort of error message is displayed. Some files starting with i_ are samples of character constant assuming ASCII. Implementations with ASCII character set must be able to compiles these files correctly and execute them correctly as ones starting with n_. Files starting with e_ must be correctly diagnosed by compiler systems at compilation (preprocessing.)

+

Testing by compilation or execution is the most proper testing method. However, the method detects the existence of error in an implementation, but there are cases it is not clear where errors are. You can give more accurate evaluation by applying *.c files only to a preprocessor and performing testing by looking through the results as far as the implementation allows (*.t files are even more straightforward.)

+

The files called ?_std.c combines pieces of files.

+

Files named u_*.c are bonus and pieces of files which test undefined behaviors. undefs.c collects them in one file. unspcs.c tests unspecified behaviors while warns.c does not belong to any of the above, but is the file of texts for which warnings are desirable. unspcs.c and warns.c are a bonus. Those starting with m_ are samples of several multi-byte character encodings.

+

C99 tests are not included in the test-c directory since there is no compiler proper supporting C99 fully. C++ tests are only in the test-t directory.

+ +

3.1.3. Testcases in test-l Directory

+

The test-l directory contains samples for testing translation limits that exceed specifications. All 144 files are bonus. They are a mix of *.c, *.t, and *.h files.

+

Many *.h files overlap in each directory, test-t, test-c, and test-l. If the duplicate header files are gathered in one directory, the following way of including method is necessary, for example.

+
+#include "../test-t/nest1.h"
+
+

However, the method of searching this type of path list format or files (where to locate the base directory etc.) is all implementation-defined and the compatibility is not guaranteed. In order to avoid this problem, those header files are placed in each directory regardless of duplication (Even the concept of "directory" is excluded from C Standard.)

+ +

3.1.4. Tools in tool Directory

+

The tool directory includes tools necessary for automatic testing.

+ +

3.1.5. Testcases for GCC/testsuite in cpp-test Directory

+

The files in cpp-test directory are the testcases for GCC/testsuite. They are rewrites of the samples in test-t and test-l directories.

+
+ +

3.2. Testing Method

+

When performing tests using the Validation Suite and if a compiler system has options to make closer to Standard C, all should be set (refer to 6.1 for a concrete example.)

+ +

3.2.1. Manual Testing

+

Each of test-t and test-c directories contain 2 kinds of samples, big files with multiple pieces put together and small files divided into pieces. If a preprocessor conforms to Standard C well, only big files with multiple pieces put together are necessary to test n_*. However, if the level of conformance is not high, a preprocessor will fall into confusion in the middle with these files and the rest of the items cannot be tested. Therefore, small pieces of files are also provided. Since the number of files gets too large and it is a lot of trouble to do testing if I divide the pieces into too many files, I made a reasonable compromise. Depending on the implementation, even these small pieces of files cannot be processed till the end. In such event, please divide the sample into even smaller pieces to continue testing.

+

As the #error directive terminates a process depending on implementations, samples testing #error are not included in big files with pieces put together. The #include error also often terminates a process, it is not included in big files with pieces put together.

+ +

3.2.1.1. Viewing the preprocessing result directly

+

The *.t samples are used in case a preprocessor is an independent program or that a compiler has an option to output the text after preprocessing. By checking the result of preprocessing these files directly, you can compare if they match correct results written in comments. Since it is possible to view preprocessing results directly, it is possible to make more accurate judgment this way as long as implementations permit.

+

Many *.c programs include the "defs.h" header. As 2 kinds of assert macro definitions are written in "defs.h", set 0 to 1 in #if 0 for any of these. The first one only includes <assert.h>. The second one is the assert macro which does not abort on an assertion failure. This, of course, is not a correct assert macro, but more convenient in this test.

+

In multi-byte character processing, behavioral specifications of implementations may differ depending on the runtime environment, thus testing m_* requires attention (refer to 4.1.)

+ +

3.2.1.2. Target item to test

+

This type of testing has a difficult issue since testing an item may be caught by another failure in an implementation. For example, if <limits.h> has an error and is included to test #if, it is not clear whether <limits.h> or #if is tested. The test which compiles and execute *.c files are more troublesome than one for preprocessing *.t files. If the last result is wrong, it will make it appear that there is some sort of error in the implementation, but not necessarily in the item tested.

+

I tried to contrive ways to aim the target item in this Validation Suite. However, there is a restriction that the Validation Suite itself has to be portable. In addition, in order to test an item, the correct implementation of other language specification must be assumed. Therefore, the preprocessing item used as this "assumption" is implicitly tested in areas other than the test item that was targeted for the item. Please note such implicit allocation of points also exist in the "allocation of points" which will be described next. It may not be possible to judge whether the sample failed in the test item that it really targeted or by another factor in case an implementation fails a sample process without looking at another test.

+ +

3.2.1.3. Scoring

+

Each test item is set by each allocation of points. Marking criteria are also written. Standard C does not have subsets, therefore unless all items match specifications, an implementation cannot be said to be Standard C conforming, strictly speaking. In reality, there are not many such implementations and we cannot help using the measure of Standard C conformance level to evaluate implementations. In addition, as there are large differences in the importance of items, counting the number of passed items will not do, rather a weighting depending on the importance should be applied.

+

However, this weighting does not have objective criteria, of course. The marking of this Validation Suite was decided by myself and does not have a grounded base. Still, it will be a guideline in evaluating compliance levels for implementations objectively.

+

n_*, i_*, e_*, and d_* are tests related to Standard conformance and marking for these is in 2 point unit in general. In testing outside of Standards and quality evaluation, marking for q_* is in 2 point and the rest is in 1 point units. Where a diagnostic message should be displayed, no points will be scored in case it is wide of the mark although it is displayed. A partial score may be given to a diagnostic message not absolutely incorrect but rather off the point. An implementation is free to issue diagnostics on correct program if it correctly processes the program, however, wrong diagnostics will be subject to subtraction.

+ +

3.2.2. Automatic Testing by cpp_test

+

If you compile the cpp_test.c program in the tool directory and run it in the test-c directory, you can test n_*.c and i_*.c for C90 automatically. However, this only scores pass or fail and it does not provide any detail. It does not include tests such as e_*.?. It just takes aim at the conformance level of preprocessors for C90 briefly. No tests regarding C99 are included. That is because most compilers do not support C99 sufficiently yet. *1, *2, *3

+

How to use cpp_test is, in an example of Visual C++ 2005, as follows.

+
+cpp_test VC2005 "cl -Za -TC -Fe%s %s.c" "del %s.exe" < n_i_.lst
+
+

The second argument and on need to be enclosed by " and " respectively (in case the shell removes ", ", it is necessary to take the measure to enclose the second argument to the last one all together in ' and '.) %s will be replaced by a sample program name without .c such as n_* and i_*.

+

The first argument: Specifies the name of a compiler system. This must be within 8 bytes and must not include '.'. Files with this name plus .out, .err, or .sum are created.

+

The second argument: Writes the command to compile.

+

The third argument and later: Writes the command to delete the files no longer necessary. Multiple of these are allowed.

+

n_i_.lst is in the test-c directory. It includes the list of n_*.c and i_*.c without .c respectively.

+

Depending on the implementation, they may start runaway processing some source files. In such an event, change the source name in n_i_.lst to a name which does not exist, none, for example, then run the test again.

+

By running cpp_test this way, n_*.c and i_*.c are compiled and executed sequentially. The outputs to stderr for sample programs are recorded in the n_*.err and i_*.err files. In addition, the score results are written on a column in VC2005.sum. However, there are only 3 kinds of marking below.

+
*: Pass
+o: Compiles, but the execution result failed.
+-: Could not be compiled.
+

In VC2005.out, the command line that called cpp_test is recorded and so is the message which was output to stdout by the compiler system if any. Messages output to stderr by a compiler system are recorded in VC2005.err if any.

+

Look at these for more information.

+

Now, use the following command.

+
+paste -d'\0' side_cpp *.sum > cpp_test.sum
+
+

By doing so, the *.sum files which are test results for each compiler system are combined horizontally to create one table to be recorded in cpp_test.sum. side_cpp is the table side portion where test item titles are written and exists in the test-c directory.

+

cpp_test.sum that I created this way is located in the doc directory. In 6.2, the detail results of manual testing are written. They test more preprocessors than cpp_test.sum. Among those preprocessors, there are some that do not support compiler drivers for any compiler systems. They cannot be tested automatically by cpp_test.

+

Note:

+

*1 This cpp_test.c was written based on runtest.c and summtest.c in "Plum-Hall Validation Sampler."

+

*2 cpp_test.c does not operate with expected behavior if it is compiled on Borland C / bcc32. This is because cpp_test calls system() to redirect stdout and stderr but standard I/O path does not seem to get inherited by the descendant process in bcc32. If cpp_test.c is compiled in Visual C or LCC-Win32, it operates without problems.

+

*3 m_36_*.c are the tests of encoding which has a byte of 0x5C ('\\') value. cpp-test does not use them, since some systems do not use these encodings.

+ +

3.2.3. Automatic Testing by GCC / testsuite

+ +

3.2.3.1. TestSuite

+

GCC source contains something called testsuite. Do 'make check' after compiling the GCC source files, testcases of this testsuite are checked one after another and the results are reported.

+

My Validation Suite, since V.1.3, was appended the edition which is rewritten so that it could be used as testsuite of GCC. Putting this in testsuite allows automatic checking by 'make check'. While the cpp_test tool in 3.2.2 can test only samples with n_* or i_* as a name, testsuite allows samples which require diagnostic messages such as e_*, w_*, and u_* to be tested automatically. This set of testcases is applicable to cpp0 (cc1, cc1plus) of GCC 2.9x and later and mcpp.

+

Here, I will explain how to use the Validation Suite in GCC / testsuite.

+

The cpp-test directory of the Validation Suite is the edition for GCC / testsuite created by rewriting the test-t and test-l directories and cpp-test contains each directory of test-t and test-l.

+

GCC / testsuite, however, cannot change the execution environment. The files named m_* or u_1_7_* are the testcases for several multi-byte character encodings. Since those testcases need different environments each other for at least GCC 3.3 or former, those are excluded from this testsuite edition. *1

+

GCC and testsuite specifications have been changed many times thus far and are expected to be changed in the future as well. It may require a partial fix to the Validation Suite accordingly, especially in case of addition or change of diagnostics. However, no extensive fix seems to be necessary so far unless the version of GCC is extremely old. The testcases in cpp-test have been verified in each cpp0 (cc1, cc1plus) of GCC 2.95.3, 3.2, 3.3.2, 3.4.3, 4.0.2 and 4.1.1, and mcpp.

+

Runtime options cannot be changed in the testsuite depending on the target implementation. As a matter of fact, multiple standards coexist and it is necessary to specify a version of the standard using the 'std=' option. However, this option does not exist in older versions of GCC. Therefore, my testsuite applies to GCC 2.9x and later and mcpp V.2.3 and later.

+

Testsuite is executed by interpreting the comments in the following format written in the testcase. This is a comment which does not affect tests in other compiler systems.

+
+/* { dg-do preprocess } */
+/* { dg-error "out of range" "" }  */
+
+

The samples with the comment, dg-error or dg-warning, written test diagnostic messages. Testing multiple compiler systems is supported by writing diagnostic messages of each compiler system with '|' (OR) in-between.

+

This is executed by the tool called DejaGnu and it is directly a shell-script called runtest. The setup of DejaGnu is written in some files named *.exp. *.exp are the scripts for the tool called Expect. And, Expect is a program written in the command language called Tcl.

+

Therefore, using testsuite requires these many tools of appropriate versions according to the testsuite. This is same when my Validation Suite is used.

+

Note:

+

*1 In fact, GCC does not work properly even if the environment variable is set.

+ +

3.2.3.2. Installation to TestSuite and Testing

+

My Validation Suite is used in GCC / testsuite in the following manner.

+

First, copy the cpp-test directory to an appropriate directory in testsuite of GCC.

+

The cpp-test directory is the one created by copying necessary files in each directory of test-t and test-l and adding the configuration file cpp-test.exp. The suffix of the files named *.t is mostly changed to .c, the suffix of the files for C++ is changed to .C.

+

Most samples test the preprocessor only. Since two samples cannot test the preprocessor due to the problems in DejaGnu and Tcl, they are for compiling and running (named *_run.c). These two samples contain the line:

+
+{ dg-options "-ansi -no-integrated-cpp" }
+
+

where -no-integrated-cpp is an option for GCC 3 and 4. GCC 2 does not support the option, which need to be removed in order to test in GCC 2. To accommodate both GCC 2 and GCC 3 or 4, there are two types of files, *_run.c.gcc2 and *_run.c.gcc3, for these two testcases. Link the appropriate one to *_run.c.

+

Below, I will take an example of GCC 3.4.3 on my Linux. Suppose the source files of GCC 3.4.3 are located in /usr/local/gcc-3.4.3-src. Also, the GCC compilation is done by /usr/local/gcc-3.4.3-objs.

+
+cp -r cpp-test /usr/local/gcc-3.4.3-src/gcc/testsuite/gcc.dg
+
+

This copies files under cpp-test to the gcc.dg directory.

+

By doing this, if you

+
+make bootstrap
+
+

in /usr/local/gcc-3.4.3-objs to compile the GCC source files and you

+
+make -k check
+
+

then the entire testsuite including testcases in cpp-test will be tested.

+

Also, testing by using cpp-test only is done as below in the /usr/local/gcc-3.4.3-objs/gcc directory.

+
+make check-gcc RUNTESTFLAGS=cpp-test.exp
+
+

The testsuite logs are recorded in gcc.log and gcc.sum under the ./testsuite directory.

+

When you do 'make check', depending on the environment, you need to set up the environment variable called DEJAGNULIBS, TCL_LIBRARY as explained in INSTALL/test.html of the GCC source files.

+

In addition, the environment variable, LANG and LC_ALL, should be C to set the environment to English.

+

Please note that it is xgcc, cc1, cc1plus, cpp0 etc. generated in the gcc directory that are used in make check at compiling GCC, not gcc, cc1 and such that have already been installed.

+

Tests can be executed in any directory as follows.

+
+runtest --tool gcc --srcdir /usr/local/gcc-3.4.3-src/gcc/testsuite cpp-test.exp
+
+

Logs are output to the current directory. In this case, what is to be tested is gcc, cc1, and cpp0 which have already been installed. cpp-test requires testsuite as it contains various configuration files for GCC (config.*, *.exp).

+

The argument 'gcc' of "runtest --tool gcc" should be exactly 'gcc'. If the name of the compiler to be tested is not 'gcc', for example 'cc' or 'gcc-3.4.3', you should make symbolic link so that the compiler is invoked by the name of 'gcc'.

+

Also, cpp-test contains the testcases for warnings in the cases where it is thought to be desirable for a preprocessor to issue a warning. The GCC preprocessor passes less than a half of those cases, however, not passing does not mean that the behavior is wrong or that the preprocessor was not compiled properly. This is not the issue of being right or wrong, but rather of the "quality" of the preprocessor.

+ +

3.2.3.3. mcpp Automatic Testing

+

This cpp-test can test mcpp also. Therefore, substituting the GCC preprocessing with mcpp and calling

+
+make check-gcc RUNTESTFLAGS=cpp-test.exp
+
+

in the gcc directory checks mcpp of Standard mode automatically. Tests can be done also using runtest command in any directory.

+
+runtest --tool gcc --srcdir /usr/local/gcc-3.4.3-src/gcc/testsuite cpp-test.exp
+
+

If mcpp is executed in GCC 3 or 4, all testcases for cpp-test except one should pass. There is another testcase which does not pass when executed in GCC 2. However, it is because gcc calls mcpp with the -D__cplusplus=1 option and not mcpp's fault.

+

Please refer to mcpp-manual.html#3.9.5 and mcpp-manual.html#3.9.7 for how to substitute the preprocessing with mcpp. To apply the testsuite, mcpp startup needs the -23j options to be set. -2 is an option to enable digraph and -3 is one to enable trigraphs. -j is an option for not adding information such as source lines to diagnostic message output. Do not use other options. Additionally, testsuite can test mcpp in standard mode only, no other.

+

The method above is done after the make with GCC, however, automatic testing can be done by 'configure' and 'make' of mcpp itself as long as GCC / testsuite is installed and is ready to execute. This case is the easiest as 'make check' automatically performs necessary settings. See the INSTALL in mcpp for this method.

+ +

3.2.3.4. TestSuite and Validation Suite

+

GCC has had testsuite for a long time, but very few samples about preprocessing up to V.2.9x. You can see how little attention preprocessing was paid to. The number of testcases for preprocessing increased quite a lot in V.3.x. You can tell preprocessing was given more importance as it was completely changed with up-to-date preprocessor source and documents.

+

However, these testcases are still quite unbalanced. The causes seem to come from the following nature of testsuite.

+
    +
  1. Collection of bug reports submitted by users. In other words, concentrate on the areas to correct bugs actually detected and to prevent reappearance.
    +
  2. The testcases added for debugging when developers implement new functionalities there.
    +
+

This is the way of debugging special to the open source project and became possible as GCC has been used by many excellent programmers in the world. However, this method might have brought the randomness and imbalance of testcases at the same time.

+

In addition, most of these testcases are valid only in GCC and cannot be used in other compiler systems. Also, testcases for GCC 3 contain many testcases which cannot be applied to even GCC 2 / cpp. The reason is the differences in preprocessing output spacing and diagnostic messages.

+

On the other hand, my Validation Suite was originally written by myself only in order to debug my preprocessor and rewritten so that the entire preprocessing specifications are tested. Many samples are organized systematically on the whole.

+

It will have considerable meaning to add these systematic testcases to GCC / testsuite.

+

Also, my testsuite edition of Validation Suite is written so that it can test three preprocessors, GCC 2.9x / cpp, GCC 3.x, 4.x / cc1 (cc1plus), and mcpp. In other words, the use of the regular expression facility in DejaGnu and Tcl can absorb the implementation differences in preprocessing output spacing and diagnostic messages. *1

+

Below are the results of applying the testsuite edition of the Validation Suite to these three preprocessors (tested mcpp in March, 2007, others in October, 2006).

+

Below is the case where the preprocessor is replaced by mcpp V.2.6.3 in GCC 4.1.1.

+
+            === gcc Summary ===
+
+# of expected passes            264
+# of unexpected failures        1
+# of expected failures          4
+/usr/local/bin/gcc version 4.1.1
+
+

There is one failure due to a lack of the universal-character-name <=> multi-byte character conversion implementation in C++98.

+

Here is the GCC 3.2 / cc1 case.

+
+            === gcc Summary ===
+
+# of expected passes            216
+# of unexpected failures        51
+# of unexpected successes       2
+# of expected failures          2
+/usr/local/bin/gcc version 3.2
+
+

Most of failures are due to a missing warning.

+

GCC 4.1.1 / cc1 is almost the same.

+
+            === gcc Summary ===
+
+# of expected passes            214
+# of unexpected failures        53
+# of unexpected successes       2
+# of expected failures          2
+/usr/local/bin/gcc  version 4.1.1
+
+

Here is the GCC 2.95.3 / cpp0 case.

+
+            === gcc Summary ===
+
+# of expected passes            181
+# of unexpected failures        87
+# of unexpected successes       3
+# of expected failures          1
+gcc version 2.95.3 20010315 (release)
+
+

There are less warnings than GCC 3, 4 / cc1. There are also some diagnostic messages that are off the point. Half of new C99 and C++98 specifications have not been implemented yet, either.

+

The number of items differ among different versions of GCC, since multiple failures can occur in one testcase.

+

Note:

+

*1 This makes dg script in my testcases difficult to read with frequent use of \ and symbols. The regular expression processing in DejaGnu and Tcl has a considerable number of peculiarities and flaws requiring ingenuity to perform all the automatic testing achieved on multiple compiler systems. Currently, however, runtime options used in testcases for those compiler systems have to be common.

+
+ +

3.3. Violation of syntax rules or Constraints and Diagnostic Messages

+

Standard C implementations must certainly process correct source correctly, but they also must issue diagnostic messages for erroneous source. Standard C also contains portions where behavior specifications are up to the implementation or not defined. They are as below in summary. *1

+
    +
  1. Correct programs and data whose outcomes are the same in every implementation.
    +
    +
  2. Correct programs and data whose process methods are not specified. These do not need to be described in documents and the results are called unspecified behavior.
    +
    +
  3. Correct programs and data whose processing is up to implementations. These specifications must be mentioned in documents by each implementation. These results are called implementation-defined behavior.
    +
    +
  4. Programs or data that are erroneous or not portable and their processing is not defined as specifications at all. Implementations may or may not output diagnostic messages. They may process them as some sort of valid programs. These results are called undefined behavior.
    +
    +
  5. Erroneous programs or data for which implementations must issue diagnostic messages. There are violations of syntax rules and violations of constraint among these. *2
    +
+

Among these, programs and data in 1 only are called strictly conforming (it is interpreted that 2 and 3 may be included if their results do not differ depending on implementation or special cases.)

+

Programs and data in 1, 2, and 3 only are called conforming programs.

+

How to issue diagnostic messages is implementation-defined. Supposedly, one or multiple diagnostic messages of some sort are issued for one translation unit that includes some sort of violations of syntax rules or constraints. It is up to the implementation whether diagnostic messages should be issued for the programs with no violation of syntax rules or constraint. However, strictly conforming programs or conforming programs matching implementation-defined or unspecified specifications for the implementation must be able to be processed correctly until the end.

+

Violations of syntax rules or constraints are called an "error" in this document. Among e_* files in this Validation Suite, there are many which include multiple errors. In scoring below, it is expected that a compiler system issues one or more diagnostic messages. However, there may be compiler systems that issue just one diagnostic message (such as "violation of syntax rules or constraints") for one translation unit no matter how many errors there are. In addition, there may be compiler systems that get confused after an error. These types of problems are of "quality", but not of Standard conformance level. Please make samples into pieces and test them again as needed. The problems of quality will be discussed in 4 separately.

+

Note:

+
+*1 C90 3 Definitions of Terms
+   C90 4 Compliance
+   C90 5.1.1.3 Diagnostics
+   C99 3 Terms, definitions, and symbols
+   C99 4 Conformance
+   C99 5.1.1.3 Diagnostics
+
+

*2 Although C++98 differs from C90 or C99 in these terms, it does not much differ in the meanings.

+
+ +

3.4. Details

+

Each test item is explained one by one below. This is also a description of Standard C preprocessing itself. The specifications in common with K&R 1st are not explained again. Item numbers are common in *.t and *.c files.

+ +

3.4.1. Trigraphs

+ +

n.1.1. 9 trigraph sequences

+

As there are 9 characters not included in the Invariant Code Set of ISO 646:1983 among the basic character set in C, these can be written in source using 3 character sequence below. This is a new specification introduced in C90. *1

+
+ + + + + + + + + + +
??=#
??([
??/\
??)]
??'^
??<{
??!|
??>}
??-~
+
+

Equivalent characters replace these 9 trigraph sequences in translation phase 1. On systems where you can type in these 9 characters on keyboard, it is not necessary to use trigraphs, of course. However, it is necessary for preprocessing conforming Standard C to be able to do trigraph conversion on even those systems.

+

Scoring: 6. 6 points if all 9 are processed correctly. Each trigraph which cannot be processed properly, 2 points are reduced with 0 at the lowest limit.

+

Note:

+
+*1 C90 5.2.1.1 Trigraph sequences
+   C90 5.1.1.2 Translation phases
+   C99 5.2.1.1 Trigraph sequences
+   C99 5.1.1.2 Translation phases
+
+ +

n.1.2. Trigraph sequences in control lines

+

Since trigraph conversion is performed prior to tokenization in translation phase 3 or control line processing in phase 4, trigraphs can be written wherever on a control line.

+

Scoring: 2.

+ +

n.1.3. Only 9 trigraphs

+

There are only 9 trigraphs mentioned above, therefore sequences starting with ?? other than those are never translated into another character nor ?? can be skipped. Preprocessing must be able to handle the case of sequences with a trigraph and ?'s which are not trigraphs.

+

Scoring: 2.

+ +

3.4.2. Line Splicing by <backslash><newline>

+

In case there is a \ at the end of a line and a <newline> immediately afterward, this sequence of <backslash><newline> is deleted in translation phase 2 unconditionally. As a result, 2 lines are connected. In Standards, the line on a source file is called a physical line to distinguish it while the line connected by removing <backslash><newline> (if any) is called a logical line. Processing in translation phase 3 is performed with this logical line as subject. *1

+

In K&R 1st, the #define line and string constants can continue on the next source line using <backslash><newline>, but other cases are not mentioned. Actual implementations allow other control lines may connected, not only #define.

+

Note:

+
+*1 C90 5.1.1.2 Translation phases
+   C99 5.1.1.2 Translation phases
+
+ +

n.2.1. Between a parameter list and replacement list on the #define line

+

The #define line connections are accepted in K&R 1st and most of implementations.

+

Scoring: 4. 4 points for processing correctly and 0 point otherwise.

+ +

n.2.2. Inside a parameter list on the #define line

+

There are some implementations which cannot handle <backslash><newline> in unusual places such as inside a parameter list even on the #define line.

+

Scoring: 2.

+ +

n.2.3. Inside a string literal

+

<backslash><newline> inside a string literal has been supported since K&R 1st.

+

Scoring: 2.

+ +

n.2.4. Inside an identifier

+

In Standard C, <backslash><newline> must be removed unconditionally even if it is inside an identifier or anywhere.

+

Scoring: 2.

+ +

n.2.5. <backslash> as a trigraph

+

<backslash> is not only \, but also ??/ as a trigraph. ??/ in source is converted into \ in translation phase 1, it is obviously \ itself in phase 2.

+

Scoring: 2.

+ +

3.4.3. Comments

+

In translation phase 3, a logical line is broken into pp-tokens and white spaces. A comment is converted into a single space at that time. *1

+

Here, implementations may convert consecutive white spaces (including comments) into a single space. However, <newline> is not converted and stays as is in any case. That's because the process of preprocessing directive in the next phase 4 is subject to this "line."

+

In case the comment expands over lines, line splicing is performed virtually by a comment.

+

Note:

+
+*1 C90 5.1.1.2 Translation phases
+   C99 5.1.1.2 Translation phases
+
+ +

n.3.1. Conversion into one space

+

In the old cpp so-called Reiser type, comments functioned as token separators only internally in cpp and were removed before output. By taking advantage of it, there was a method of using comments for token concatenation. However, this specification derailed K&R 1st and was clearly rejected by Standard C. In Standard C, the ## operator is used for token concatenation.

+

Scoring: 6.

+ +

n.dslcom. Comment by //

+

From K&R 1st to C90, comments started with /* and ended with */. *1

+

However, C99 started supporting C++ style of comment, //. *2

+

Scoring: 4.

+

In C90, this should be processed as just a sequence of pp-token '/' and '/', not a comment. However, as implementations which handle // as comments even prior to C99 were common, mcpp treats this as a comment and issues a warning in C90 mode.

+

Note:

+
+*1 C90 6.1.9 Comments
+
+*2 C99 6.4.9 Comments
+
+ +

n.3.3. Comment processing prior to pp-directive processing

+

The preprocessing directive starting with # is for a "line", but this "line" is not necessarily a physical line in source. It could be a logical line combined by <backslash><newline> or the "line" which extend over multiple physical and logical lines by a comment. This is not surprising if you think about the order of translation phase 1 through 4.

+

Scoring: 4.

+ +

n.3.4. Comments and <backslash><newline>

+

There are pp-directive lines that extend over some physical lines by both <backslash><newline> and a comment. Preprocessors that do not implement translation phases properly cannot handle this correctly.

+

Scoring: 2.

+ +

3.4.4. Special Tokens (digraphs) and Characters (UCN)

+

In C90/Amendment 1 (1994), alternative spelling called digraph was added for some of operators and punctuators. *1

+

In C99, a character code called UCN (universal character sequence) was added. *2

+

In e.4.?, token errors are covered.

+

Note:

+
+*1 Amendment 1/3.1 Operators, 3.2 Punctuators (added to ISO 9899/6.1.5, 6.1.6)
+   C99 6.4.6 Punctuators
+
+*2 C99 6.4.3 Universal character names
+
+ +

n.4.1. Digraph spelling in a preprocessing directive line

+

Digraphs are handled as tokens (pp-tokens.) '%:' is another spelling for '#'. It can certainly be used as the first pp-token of a preprocessing directive line or as a string operator.

+

Scoring: 6.

+ +

n.4.2. Digraph spelling stringizing

+

Different from trigraphs, as digraphs are tokens (pp-tokens), they are stringized as they are in spelling without being converted (meaningless specification.)

+

Scoring: 2.

+ +

n.ucn1. UCN recognition 1

+

UCN is recognized in string literals, character constants, and identifiers.

+

Scoring: 8. 4 points if UCN in a string literal passes preprocessing as is. 2 points each if UCN is processed correctly in a character constant or identifier. No good if UCN is not recognized and output as is.

+ +

n.ucn2. UCN recognition 2

+

UCN can be used inside a pp-number as well. However, it has to disappear from a number-token by the end of preprocessing. This specification exists in C99, not in C++.

+

Scoring: 2.

+ +

e.ucn. UCN errors

+

UCN must be 8 digit hexadecimal if it starts with \U or 4 digit hexadecimal if it starts with \u.

+

UCN must not be in the range between [0..9F] and [D800..DFFF]. However, 24($), 40(@), and 60(`) are valid.

+

Scoring: 4. 1 point each for each correct diagnosis regarding 4 samples.

+ +

e.4.3. Empty character constants

+

Even sequences not in C token format are also recognized as pp-tokens. Therefore, there are not many error cases in tokenization of preprocessing.

+

However, there are some cases other than this which become undefined behavior (refer to 4.2.)

+

Empty character constants are violations of syntax rules in a preprocessing #if line or compiling. *1

+

Scoring: 2.

+

Note:

+
+*1 C90 6.1.3.4 Character constants -- Syntax
+   C99 6.4.4.4 Character constants -- Syntax
+
+ +

3.4.5. Spaces and Tabs on a Preprocessing Directive Line

+

Spaces, tabs, vertical-tabs, form-feeds, carriage-returns, and new-lines are all white spaces. White spaces that are not in string literals, character constants, header names, or comments usually have a meaning as a token separator. However, new lines that remain until translation phase 4 are special and become a pp-directive separator. There are slight restrictions in white spaces that can be used in pp-directive lines.

+ +

n.5.1. Spaces and tabs before and after #

+

In Standard C, spaces and tabs before and after the #, which is the first pp-token on a preprocessing directive line are guaranteed to end in the same results whether they exist or not (*1.) In K&R 1st, this is not clear and there were actually implementations which do not accept spaces and tabs before and after #.

+

In K&R 1st, it is interpreted that spaces and tabs after that in the line are accepted as just a token separator as in Standard C.

+

However, in the case where there are white spaces other than spaces and tabs on the pp-directive line, it is undefined (refer to u.1.6 of 4.2.)

+

Scoring: 6.

+

Note:

+
+*1 C90 6.8  Preprocessing directives -- Description, Constraints
+   C99 6.10 Preprocessing directives -- Description, Constraints
+
+ +

3.4.6. #include

+

#include is the most basic pp-directive since K&R 1st. However, the specifications on this directive in Standard C have more undefined and implementation-defined portions (*1.) The reasons are below.

+
    +
  1. A pp-token called header-name which is an argument for this directive is dependent on OS file systems and difficult to standardize.
    +
  2. "Standard" location to search files depends on implementations.
    +
  3. Even the header-name in the format similar to the string literal enclosed by ", " is another pp-token different from a string literal as \ is not an escape character. Furthermore, a header-name enclosed by < and > is the most irregular pp-token.
    +
+

In n.6.*, the most basic test below is not performed by different categories. This is included with other test items on the premise that not being able to process this is out of the question since many tests will not be able to be performed.

+
+#include    <ctype.h>
+#include    "header.h"
+
+

Note:

+
+*1 C90 6.8.2 Source file inclusion
+   C99 6.10.2 Source file inclusion
+
+ +

n.6.1. Standard header include in 2 formats

+

There are 2 formats in header-names. The difference is only that the format enclosed by < and > searches the header from a implementation-defined specific location (may be multiple locations) while the one enclosed by " and " searches the source file first in implementation-defined method and performs the same process as the one enclosed by < and > upon failure. Therefore, the format enclosed by " and " can include standard headers as well. This point was the same in K&R 1st.

+

In Standard C, same standard headers can be included many times. Either way, however, this is not a preprocessor issue, but on how to write standard headers (refer to 5.1.1.)

+

Scoring: 10. 4 scores if only one of 2 samples is processed.

+ +

n.6.2. Header-name by a macro - Part 1

+

In K&R 1st, no macro could be used on the #include line, however, it was officially permitted in Standard C. In case the #include argument does not match either of the 2 formats, the macro included there is expanded. The result must match either one of the 2 formats.

+

This specification has something subtle. For example, how should the following source be handled?

+
+#define MACRO   header.h>
+#include    <MACRO
+
+

Should MACRO be expanded first as below?

+
+#include    <header.h>
+
+

Or, should this be an error as > matching < does not exist prior to macro expansion?

+

I cannot think that Standards are written with this level of detail in mind. Therefore, I believe it is more straightforward to handle < and > as quotation delimiters similar to " and ". Though, expanding macros first cannot be said to be against Standards. This Validation Suite does not include tests which dig holes of this type of specifications.

+

Scoring: 6.

+ +

n.6.3. Header-name by a macro - Part 2

+

This is not so interesting, but it does not have to be a single macro.

+

Scoring: 2.

+ +

3.4.7. #line

+

The #line pp-directive is not usually used by a user, but used to pass along the filename of the original source and line numbers occasionally in case another tool or something pre-preprocesses source (not necessarily C.) As this has been around since K&R 1st, it must have some purpose in its own way traditionally.

+

In addition, #line or its variant is used to pass along a filename and line number information to a compiler proper for preprocessor output in general. However, this is not defined as a specification.

+

The filename and line number specified in #line become the value of predefined macro, __FILE__ and __LINE__ (in addition, __LINE__ will be incremented for every physical line.) *1

+

Note:

+
+*1 C90 6.8.4 Line control
+   C99 6.10.4 Line control
+   C90 6.8.8 Predefined macro names
+   C99 6.10.8 Predefined macro names
+
+ +

n.7.1. Line number and filename specification

+

#line specifying a line number and a filename was in K&R 1st, but the filename was not surrounded by " and ".

+

A filename is a string literal in Standard C, but a different token from the header-name for #include. Strictly speaking, it has subtle problems in \ handling and the like. However, no problems will arise for valid source (it is fortunate that the filename for #line are not in the <stdio.h> format.)

+

Scoring: 6.

+ +

n.7.2. No filename may be specified

+

The filename argument is optional and it does not have to exist. This is same as K&R 1st (undefined if no line number is specified.)

+

Scoring: 4.

+ +

n.7.3. Line number and filename specification by a macro

+

In K&R 1st, the #line argument could not use a macro. This is permitted in Standard C.

+

Scoring: 4.

+ +

n.line. Line number range

+

The line number range for the #line directive was [1.32767] in C90, but was extended to [1.2147483647] in C99.

+

Scoring: 2.

+ +

e.7.4. Filename in wide string literal

+

The filename argument must be a string literal. This is not so interesting, but wide string literals become a violation of constraint (pp-tokens other than that are undefined for some reasons. This is an imbalanced specification.)

+

Scoring: 2.

+ +

3.4.8. #error

+

#error is a directive newly introduced in Standard C. It displays an error message that includes an argument as a part at preprocessing. In old implementations, there were some with directives such as #assert. However, these were not standard.

+

It is not specified that #error should end a process. According to the Rationale, it was not specified since the Standard cannot make requirements to that extent. However, it says that ending a process is the ANSI C committee's intention. *1

+

Note:

+
+*1 C90 6.8.5 Error directive
+   ANSI C Rationale 3.8.5
+   C99 6.10.5 Error directive
+   C99 Rationale 6.10.5
+
+ +

n.8.1. No macro expansion

+

Macros on the #error line are not expanded. Macros which are expanded on control lines are only for #if (#elif), #include, and #line. *1

+

Scoring: 8. 2 points for processing by expanding macros. Whether to terminate the process does not matter.

+

Note:

+
+*1 C90 6.8  Preprocessing directives -- Semantics
+   C99 6.10 Preprocessing directives -- Semantics
+
+ +

n.8.2. Optional message

+

This is not so interesting, but the #error line argument is optional and it does not have to exist.

+

Scoring: 2.

+ +

3.4.9. #pragma, _Pragma() operator

+

#pragma was also introduced in Standard C. Extended directives which are unique to an implementation are all supposed to be implemented by #pragma sub-directives. *1

+

Note:

+
+*1 C90 6.8.6 Pragma directive
+   C99 6.10.6 Pragma directive
+
+ +

n.9.1. No error for unrecognized #pragma

+

Different #pragma sub-directives are recognized for each implementation. As it is not possible to write portable programs if each unrecognized #pragma becomes an error, #pragma which cannot be recognized by implementations is ignored. In preprocessing, only the #pragma recognizably regarding preprocessing is processed while the rest of #pragma is all passed to compiler proper as is.

+

Scoring: 10. #pragma must not be an error, however, it is acceptable to issue a warning. 10 points for the case that preprocessing does not issue an error but the compiler proper does, which should not occur, though it is not a mistake in preprocessing even if it does. 0 points as a matter of convenience in case this distinction does not exist in the implementation where preprocessors are not independent.

+ +

n.pragma. _Pragma() operator

+

C99 introduced the _Pragma() operator which has the same effect as #pragma but can be written in a macro definition as opposed to #pragma.

+

In addition, when a pp-token following a pragma has a standard feature if it is STDC and macro expansion is prohibited in this case. In other cases, however, whether macro expansion is applicable is implementation-defined.

+

Scoring: 6.

+ +

e.pragma. _Pragma() argument is string literal

+

The _Pragma() operator argument must be a string literal.

+

Scoring: 2.

+ +

3.4.10. #if, #elif, #else, and #endif

+

#if, #else, and #endif have been supported since K&R 1st. (*1) In the implementations which cannot use #if, none of n.10.1, n.11.*, n.12.*, n.13.*, e.12.*, and e.14.* can be processed as well as many other tests.

+

Note:

+
+*1 C90 6.8.1 Conditional inclusion
+   C99 6.10.1 Conditional inclusion
+
+ +

n.10.1. #elif support

+

#elif was added in Standard C. By using this, we can avoid illegibility of multiple #if nesting.

+

Macros can be used in the #if expression. The identifier not defined as a macro is evaluated as 0.

+

In Standards, #if to the corresponding #endif is called a #if section and a block divided by #if (#ifdef, #ifndef), #elif, #else, or #endif in the section is called a #if group. The #if and #elif line expressions are called a #if expression.

+

Scoring: 10.

+ +

n.10.2. pp-token processing in the #if group which is skipped

+

In the #if group skipped, preprocessing directives are not processed other than checking #if, #ifdef, #ifndef, #elif, #else, and #endif in order to trace the correspondence of #if group and macros are not expanded, either.

+

However, tokenization takes place. First of all, that is because C source is a sequence of comments and pp-tokens from the beginning till the end. Secondly, it is necessary to process comments at least in order to check the corresponding relation of #if and others, and in order to check if /* and others are comment symbols, they must be made sure that they are not in a string literal or character constant.

+

Scoring: 6.

+ +

3.4.11. #if defined

+

An operator, defined, was introduced for #if expressions in Standard C. This integrates #ifdef and #ifndef into #if (#elif) and prevents illegibility of multiple #ifdef nesting.

+ +

n.11.1. #if defined

+

The operand for the defined operator is an identifier. Both enclosing it by ( and ) and not doing so are supported as a writing style. Both mean the same and are evaluated as 1 if an operand is defined as a macro, 0 otherwise.

+

Scoring: 8. 2 scores if only one of 2 #if sections is processed.

+ +

n.11.2. defined is an unary operator

+

defined is one of the operators and provides either value of 1 or 0. Therefore, it is possible to do an operation on its result and another expression.

+

Scoring: 2.

+ +

3.4.12. #if Expression Type

+

The #if expressions were vaguely defined as constant expressions in K&R 1st and their types were not clear. In C90, the #if expressions are integer constant expressions and it was made clear that int and unsigned int have the same internal representation as long and unsigned long respectively. In other words, the #if expressions including sub-expressions in them are all evaluated in long and unsigned long. To restate, they are handled as if constant tokens all had L or UL suffix. *1

+

In addition, the #if expression type became the maximum integer type for each implementation in C99. typedef to the type names, intmax_t and uintmax_t, is applied to this type in the standard header called <stdint.h>. As long long is required in C99, the #if expression type is long long or a wider size. Suffixes, LL (ll)/ULL (ull), are used to write long long/unsigned long long constants. *2

+

A length modifier, %ll, and an appropriate conversion specifier (such as %lld, %llu, and %llx) are used to display the value of long long/unsigned long long in printf(). The length modifier to display the value of intmax_t or uintmax_t is %j (%jd, %ju, %jx and others.) *3

+

Note:

+
+*1 C90 6.8.1 Conditional inclusion -- Semantics
+
+*2 C99 6.10.1 Conditional inclusion -- Semantics
+
+*3 C99 7.19. 6.1 The fprintf function -- Description
+
+ +

n.12.1. long type #if expressions

+

In C90, constant expressions of the long type in the #if expressions must be evaluated.

+

Scoring: 6.

+ +

n.12.2. unsigned long type #if expressions

+

In C90, constant expressions of the unsigned long type in the #if expressions must be evaluated.

+

Scoring: 4.

+ +

n.12.3. Octal numbers

+

Octal numbers must be evaluated in the #if expressions. It is similar in K&R 1st, however the constant exceeding the maximum value of long was evaluated as a negative value of long in K&R 1st while it is evaluated as unsigned long in C90. *1

+

Scoring: 4. 2 points when recognized as an octal number but evaluated as a negative number or overflow. 0 points for not recognized as an octal number.

+

Note:

+
+*1 C90 6.1.3.2 Integer constants
+   C99 6.4.4.1 Integer constants
+
+ +

n.12.4. Hexadecimal numbers

+

Hexadecimal numbers must be also evaluated in the #if expressions. It is similar in K&R 1st, however the difference is that the constant exceeding the maximum value of long was evaluated as a negative value of long in K&R 1st while it is evaluated as unsigned long in C90.

+

Scoring: 4. 2 points when recognized as a hexadecimal number but evaluated as a negative number or overflow. 0 points for not recognized as a hexadecimal number.

+ +

n.12.5. Suffixes L and l

+

Constant tokens with a suffix, L or l, must be also evaluated in the #if expressions. The constants not exceeding the maximum value of long are the same in K&R 1st also. This suffix does not matter in preprocessing for evaluation.

+

Scoring: 2.

+ +

n.12.6. Suffixes U and u

+

Constant tokens with a suffix, U or u, must be also evaluated in the #if expressions. This was the notation not supported in K&R 1st and was officially accepted in C90.

+

Scoring: 6.

+ +

n.12.7. Negative numbers

+

Negative numbers must be also handled in the #if expressions. This is a specification since K&R 1st.

+

Scoring: 4.

+ +

e.12.8. Constant token value out of range to represent

+

In C90, it is an violation of constraint or error, to put it simply, if the integer constant token value which appears in the #if expression is not in the range which can be represented in long or unsigned long. This is not something directly defined as a specification for the #if expressions, however, there is a specification regarding constant expressions in general. The #if expressions are not exceptions, either. *1

+

The character constant overflow is tested in e.32.5, e.33.2, and e.35.2.

+

Scoring: 2.

+

Note:

+
+*1 C90 6.4  Constant expressions -- Constraints
+   C99 6.6 Constant expressions -- Constraints
+
+ +

n.llong. long long/unsigned long long evaluation

+

At least, constant expressions in long long/unsigned long long must be evaluated in the #if expressions in C99.

+

The constant exceeding the maximum value of long long is evaluated as unsigned long long.

+

Suffixes, LL, ll, ULL, and ull, are added in C99. *1

+

Scoring: 10. 2 points each for processing each of 5 samples correctly.

+

Note:

+
+*1 C99 6.4.4.1 Integer constants
+   C99 6.6 Constant expressions -- Constraints
+
+ +

e.intmax. Operation result out of intmax_t range

+

The constant or constant expression which exceeds the intmax_t or uintmax_t range is a violation of constraint in the #if expression for C99.

+

Scoring: 2. In case there is no <stdint.h>, it is acceptable to write a macro appropriately.

+ +

3.4.13. #if Expression Evaluation

+

The #if expressions are a kind of integer constant expressions. Compared with usual integer constant expressions, there are differences below.

+
    +
  1. In C90, int and unsigned int are evaluated as if they have the same internal representation as long and unsigned long respectively. In C99, int and long are evaluated as if they have the same internal representation as intmax_t. unsigned int and unsigned long are evaluated as if they have the same internal representation as uintmax_t.
    +
    +
  2. The 'defined' operator is supported.
    +
    +
  3. All identifiers remained after macro expansion are evaluated as 0. *1
    +
    +
  4. As there exists no keywords in preprocessing, identifiers with same name as a keyword are treated as just an identifier. Therefore, neither cast nor sizeof can be used.
    +
+

Function calls and comma operators cannot be used in integer constant expressions. Since constant expressions are not variables, no assignments, increments, decrements, nor arrays can be used.

+

In n.13, evaluation rules common with generic integer constant expressions are tested. Among these, n.13.5 is different from K&R 1st. n.13.6 is the area which was all different in pre-Standard #if expressions. n.13.13 and n.13.14 were not clear in K&R 1st. The rest is unchanged since K&R 1st. *2

+

The n.13.* uses only small values so that this rule can be tested in the implementations where only int values can be evaluated in the #if expressions. The defined operator and >= are not in n.13, but somewhere else.

+

Note:

+

*1 In C++ Standard, 'true' and 'false' are treated differently and evaluated as 1 and 0 respectively. These are not macros, but keywords; however, they are treated as boolean literals in preprocessing.

+
+*2 C90 6.3 Expressions
+   C90 6.4 Constant expressions
+   C99 6.5 Expressions
+   C99 6.6 Constant expressions
+
+ +

n.13.1. << and >>

+

Bit shift operations have no troublesome issues regarding positive numbers, at least.

+

Scoring: 2.

+ +

n.13.2. ^, |, and &

+

Since the bit pattern of the same value is same despite of CPUs or implementations in positive integers as long as it is in the type range, operations such as ^, |, and & which may appear to be dependent on CPU specifications have the exact same results in that range on any implementation.

+

Scoring: 2.

+ +

n.13.3. || and &&

+

All implementations should be able to process these.

+

Scoring: 4.

+ +

n.13.4. ? :

+

All implementations should be able to process these, too (it seemed so, but not so in reality.)

+

Scoring: 2.

+ +

n.13.5. No usual arithmetic conversion in << and >>

+

Usual arithmetic conversions are performed in many binary operators in order to match types on both sides. In K&R 1st, usual arithmetic conversions were performed in shift operators while this is not the case in Standard C. This is an adequate specification considering that the right side value is always small positive number and that a bit pattern changes also if a negative number is converted into a positive number in internal representation other than 2's complement which creates a confusion. *1

+

Scoring: 2.

+

Note:

+
+*1 C90 6.3.7 Bitwise shift operators -- Semantics
+   C99 6.5.7 Bitwise shift operators -- Semantics
+
+

It says point by point, "If both operands have arithmetic type, the usual arithmetic conversions are performed on them.", regarding many binary operators. However, this is not mentioned as far as << and >> are concerned. There is an explanation regarding this in C89 Rationale 3.3.7 (C99 Rationale 6.5.7.)

+ +

n.13.6. Conversion from a negative number into a positive number by usual arithmetic conversion

+

Usual arithmetic conversions are applied to operands on both sides for binary operators such as *, /, %, +, -, <, >, <=, >=, ==, !=, &, ^, and |, in order to match types on both sides. Same for the second and third operands for tertiary operator, ? :. Therefore, if one side is an unsigned type, the other is converted into an unsigned type that causes a negative value to be converted into a positive number.

+

In standard integer constant expressions, the integer promotion is applied to the operand before the usual arithmetic conversion if each operand is in the integer type shorter than int. However, in the #if expressions, no integer promotion occurs since all operands are handled as the same size type.

+

Scoring: 6. 2 points each for processing one of 3 tests correctly.

+

This evaluation rule is same in K&R 1st, however, this sample cannot be processed in K&R 1st based implementations since the constant token, 0U, uses the U suffix.

+ +

n.13.7. Evaluation short-circuit in ||, &&, and ? :

+

The order of evaluation is defined for the || and && operators and the right side is not evaluated if the result is determined by the left side evaluation. In ? :, either the second or third is evaluated but not the other as a result of the first operand evaluation. *1

+

Therefore, even division by 0 is not an error in the term not evaluated.

+

Scoring: 6. Subtract 2 points each from 6 if one of the 5 samples fails. 0 point for failure of 3 or more samples. Subtract 2 points for wrong diagnostics, even if an implementation succeeds to process.

+

Note:

+

*1 In the ? : operator, however, the usual arithmetic conversion is performed between the second operand and the third one. It is strange to perform a conversion even when no evaluation is done. Especially, as the type for an integer constant token used in the #if expression is not determined until a value is evaluated, the value cannot be helped being evaluated in order for the type (though it is just if signed or unsigned) to be determined. However, no division by 0 is allowed. This is rather messy.

+ +

n.13.8. Grouping of unary operators, -, +, !, and ~

+

From n.13.8 to n.13.12 are tests for grouping sub-expressions in the #if expressions. Sub-expressions are grouped according to the precedence and associativity of operators. Though there are parts decided by the syntax prior to the precedence in standard integer constant expressions, the #if expressions do not have areas with syntax problems other than ( and ) of grouping. n.13.8 to n.13.10 are tests for associativity and n.13.8 is a test for the associativity for unary operators, -, +, !, and ~. All unary operators associate from right to left.

+

Scoring: 2.

+ +

n.13.9. Grouping of ? :

+

The conditional operator, ? :, is associated from right to left.

+

Scoring: 2.

+ +

n.13.10. Grouping << and >>

+

All binary operators are associated from left to right. n.13.10 tests << and >>.

+

Scoring: 2.

+ +

n.13.11. Grouping of operators with different precedence - Part 1

+

Here, we test expressions including unary operators, -, +, and !, and binary operators, *, /, and >>, which have different precedence and associativity.

+

Scoring: 2.

+ +

n.13.12. Grouping of operators with different precedence - Part 2

+

Here, we test grouping of even more complex expressions including unary operators, -, +, ~, and !, binary operators, -, *, %, >>, &, | ^, ==, and !=, and tertiary operator, ? :.

+

Scoring: 2.

+ +

n.13.13. Macros expanded into operators

+

The use of macros are allowed in the #if expressions. These macros are usually expanded into integer constants, however, we do not test these here since they are included in n.10.1, n.12.1, n_12.2, and n.13.7 tests.

+

Though macros expanded into operators are not ordinary, they should be handled as operators in principle. A standard header called <iso646.h> was defined as a specification in ISO C 1990/Amendment 1 which defines some operators using macros (*1.) The purpose seems to be that source can be written without using characters such as &, |, !, ^, and ~. Preprocessing is required to expand these macros in #if and handle them as operators.

+

On the other hand, there is a specification in which it is undefined if macros in the #if expressions are expanded to 'defined'. I suspect that defined is handled separately since it is similar to an identifier (refer to u.1.19.)

+

Scoring: 4.

+

Note:

+

*1 In C++ Standard, these identifier-like operators are not macros but tokens for some reasons.

+ +

n.13.14. Macro expanded into 0 piece of token

+

The #if expression including a macro which expands into 0 piece of token is not ordinary, either. This should be evaluated after the macro is removed (expanded.)

+

Scoring: 2.

+ +

3.4.14. #if Expression Error

+

From e.14.1 to e.14.10 are tests for violations of syntax rules and violations of constraint in the #if expressions. Compiler systems must issue diagnostic messages for all source including one of these. *1

+

Note:

+
+*1 C90 6.8.1 Conditional inclusion
+   C90 6.4 Constant expressions
+   C99 6.10.1 Conditional inclusion
+   C99 6.6 Constant expressions
+
+ +

e.14.1. String literals

+

As the #if expressions are integer constant expressions and pointers cannot be used, string literals cannot be used.

+

Scoring: 2.

+ +

e.14.2. Operators such as =, ++, --, and .

+

As the #if expressions are constant expressions, operators and variables with side effects cannot be used. A --B is different from A - -B and a violation of constraint.

+

Scoring: 4. 2 points if one of 4 samples cannot be correctly diagnosed. 0 point if 2 or more.

+ +

e.14.3. Incomplete expressions

+

Missing one operand in a binary operator or parenthesis is also a violation of syntax rules.

+

Scoring: 2.

+ +

e.14.4. Missing #if defined parenthesis

+

An argument for defined operator on the #if line may or may not be enclosed by ( and ), however, it is a violation of constrains if only one of the parenthesis pair exists.

+

Scoring: 2.

+ +

e.14.5. No expressions

+

Only #if without any expression is certainly a violation of syntax rules.

+

Scoring: 2.

+ +

e.14.6. No expression after macro expansion

+

The identifier not defined as a macro is evaluated as 0, however, the argument of the #if line which disappears after macro expansion is a violation of syntax rules.

+

Scoring: 2.

+ +

e.14.7. Unrecognized keyword - sizeof

+

sizeof, a pp-token, is simply treated as an identifier and evaluated as 0 in the #if expression if it is not defined as a macro. A pp-token called int is the same. Therefore, sizeof (int) becomes 0 (0) and it is a violation of syntax rules.

+

Scoring: 2.

+ +

e.14.8. Unrecognized keyword - type name

+

Just as e.14.7, (int)0x8000 becomes (0)0x8000 and it is a violation of syntax rules.

+

Scoring: 2.

+ +

e.14.9. Division by 0

+

This e.14.9 and the next e.14.10 admit of several interpretations regarding a diagnostic message should be issued and specifications are ambiguous. There are following specifications in the Standards.

+

C90 6.4 Constant expressions -- Constraints
+C99 6.6 Constant expressions -- Constraints

+
+

Each constant expression shall evaluate to a constant that is in the range of representable values for its type.

+
+

The applicable range in this specification is not clear, however, it is clear that this is applied to at least where constant expressions are necessary. The #if expressions must be constant expressions. On the other hand, there are specifications below.

+

C90 6.3.5 Multiplicative operators -- Semantics
+C99 6.5.5 Multiplicative operators -- Semantics

+
+

if the value of the second operand is zero, the behavior is undefined.

+
+

C90 6.1.2.5 Types
+C99 6.2.5 Types

+
+

A computation involving unsigned operands can never overflow,

+
+

Which specification should be applied between division by 0 and unsigned operation? It seems either interpretation is possible.

+

However, we will make an interpretation this way here -- include division by 0 where a constant expression is required and a diagnostic message must be issued in case it does not fit in the range of the type --. That is because it seems appropriate to issue a diagnostic since only an error in program can cause this type of result and constant expressions are something evaluated at compilation rather than execution. In addition, that is also because it is unnatural to treat only division by 0 as an exception. However, since the specification gets doubly vague in case the result of an unsigned operation is out of range, we do not include it here, but interpret it as undefined.

+

ISO 9899:1990/Corrigendum 1 added a specification, "A conforming implementation shall produce at least one diagnostic message .. if .. translation unit contains a violation of any syntax rule or constraint, even if the behavior is also explicitly specified as undefined or implementation-defined." This was carried on by C99. *1

+

Scoring: 2.

+

Note:

+
+*1 C99 5.1.1.3 Diagnostics
+
+ +

e.14.10. Operation results out of representable range

+

In C90, values of the #if expressions must be in the range representable as long/unsigned long.

+

Scoring: 4. 4 points for correctly diagnosing all 4 tests. 2 points for correctly diagnosing 2 or 3 tests. 0 points if only 1 or none is correctly diagnosed.

+ +

3.4.15. #ifdef and #ifndef

+

The n.15.* test #ifdef and #ifndef. These are exactly same between K&R 1st and Standard C. e.15 tests the violation of syntax rules for that. *1

+

Note:

+
+*1 C90 6.8 Preprocessing directives -- Syntax
+   C90 6.8.1 Conditional inclusion
+   C99 6.10 Preprocessing directives -- Syntax
+   C99 6.10.1 Conditional inclusion
+
+ +

n.15.1. #ifdef macro testing

+

Scoring: 6.

+ +

n.15.2. #ifndef macro testing

+

Scoring: 6.

+ +

e.15.3. Argument which is not an identifier

+

Arguments on the #ifdef and #ifndef lines must be identifiers.

+

Scoring: 2.

+ +

e.15.4. Extra argument

+

Arguments on the #ifdef and #ifndef lines must not have extra tokens other than identifiers.

+

Scoring: 2.

+ +

e.15.5. Missing argument

+

It is a violation of syntax rules not to have any arguments.

+

Scoring: 2.

+ +

3.4.16. #else and #endif Errors

+

Next is a test of violations of syntax rules for #else and #endif. This syntax has not changed since K&R 1st. (However, Standard C introduced a new specification that a diagnostic message must be issued for a violation of syntax rules or constraints.) *1

+

Note:

+
+*1 C90 6.8 Preprocessing directives -- Syntax
+   C99 6.10 Preprocessing directives -- Syntax
+
+ +

e.16.1. Extra token in #else

+

The #else line must not have any other tokens.

+

Scoring: 2.

+ +

e.16.2. Extra token in #endif

+

The #endif line must not have any other tokens.

+

Do not write below.

+
+#if     MACRO
+#else   ! MACRO
+#endif  MACRO
+
+

Use below instead.

+
+#if     MACRO
+#else   /* ! MACRO  */
+#endif  /* MACRO    */
+
+

Scoring: 2.

+ +

3.4.17. #if, #elif, #else, and #endif Mismatching Errors

+

Next tests violations of syntax rules for matching #if (#ifdef, #ifndef), #elif, #else, and #endif. This syntax is almost the same since K&R 1st except that #elif was added to Standard C. In addition, K&R 1st was not clear in the point that these must match within the source file unit. *1

+

Note:

+
+*1 C90 6.8 Preprocessing directives -- Syntax
+   C99 6.10 Preprocessing directives -- Syntax
+
+ +

e.17.1. #endif without #if

+

#endif without a preceding #if is obviously a violation of syntax rule.

+

Scoring: 2.

+ +

e.17.2. #else without #if

+

#else without a corresponding #if is also an error.

+

Scoring: 2.

+ +

e.17.3. Another #else after #else

+

Having another #else after a #else is also prohibited.

+

Scoring: 2.

+ +

e.17.4. #elif after #else

+

#elif after #else is not allowed.

+

Scoring: 2.

+ +

e.17.5. #endif without #if in the file included

+

#if, #else, and #endif must be matched in the source file (preprocessing file) unit. It is not acceptable for the file included to be treated as if it existed from the beginning or in the original file.

+

Scoring: 2.

+ +

e.17.6. #if without #endif in the file included

+

Scoring: 2.

+ +

e.17.7. #if without #endif

+

Forgetting #endif actually happens quite often, however, compiler systems must issue a diagnostic message for that.

+

Scoring: 2.

+ +

3.4.18. #define

+

For the #define syntax, the # and ## operators were added in C90 whereas they did not exit in K&R. The rest is unchanged. *1

+

In C99, variable argument macros were added (refer to 2.8.) *2

+

Note:

+
+*1 C90 6.8 Preprocessing directives -- Syntax
+   C90 6.8.3 Macro replacement
+
+*2 C99 6.10 Preprocessing directives -- Syntax
+   C99 6.10.3 Macro replacement
+
+ +

n.18.1. Object-like macro definition

+

The first token on the #define line is a macro name. However, in case there are white spaces immediately after, the second token is considered to be the beginning of the replacement list even if it is '(' and not considered as a function-like macro definition. If there is no token after a macro name, the macro is defined as 0 pieces of token.

+

Scoring: 30. 10 points if only one of 2 macros are defined correctly.

+ +

n.18.2. Function-like macro definition

+

If '(' is immediately after a macro name without having white spaces between, it is considered to be the beginning of the function-like macro parameter list. This specification has been around since K&R 1st and has a trace of character-oriented preprocessing which is influenced by the existence of white spaces. Nothing can be done at this point.

+

Scoring: 20.

+ +

n.18.3. No replacement applicable inside string literals

+

In a so-called "Reiser" model preprocessor, the same spelling as a parameter in string literals or character constants in the replacement list, that portion was substituted for an argument by macro expansion. However, this was not accepted by Standard C nor K&R 1st. This replacement is a specification characterized well by character-oriented preprocessing, however, it is out of the question in token-oriented processing.

+

Scoring: 10.

+ +

n.vargs. Variable argument macros

+

Variable argument macros were introduced in C99.

+

Scoring: 10.

+ +

e.18.4. Missing name

+

The first token on the #define line must be an identifier.

+

Scoring: 2.

+ +

e.18.5. Missing argument

+

If there is not a single token on the #define line, it is a violation of syntax rules.

+

Scoring: 2.

+ +

e.18.6. Empty parameter

+

Empty parameter is also a violation of syntax rules. *1

+

Scoring: 2.

+

Note:

+
+*1 C90 6.5.4 Declarators -- Syntax
+   C99 6.7.5 Declarators -- Syntax
+
+ +

e.18.7. Duplicate parameter names

+

Duplicate parameter names in the parameter list for one macro definition is a violation of constraints. *1

+

Scoring: 2.

+

Note:

+
+*1 C90 6.8.3 Macro replacement -- Constraints
+   C99 6.10.3 Macro replacement -- Constraints
+
+ +

e.18.8. Parameter which is not an identifier

+

A parameter in a macro definition must be an identifier. *1

+

Scoring: 2.

+

Note:

+

*1 The ... parameter was added in C99. __VA_ARGS__ in the replacement list is a special parameter name that corresponds to it.

+ +

e.18.9. Special combination of a macro name and a replacement list

+

Though '$' is not accepted as a character within an identifier in Standard C, there are compiler systems which accept it. This sample is the kind that can be seen in the source compiled by those compiler systems. Since this example interprets $ as one character and one pp-token in Standard C, the macro name is THIS and $ and after becomes a replacement list for an object-like macro which is totally different from the program purpose of a function-like macro named THIS$AND$THAT.

+

In the Corrigendum 1 of ISO 9899:1990, an exceptional specification was added to this type of example. A conforming implementation must issue a diagnostic message regarding this example. *1

+

Conversely, C99 defined that white spaces must exist between a macro name a replacement list in object-like macro definition in general. *2

+

Scoring: 2.

+

Note:

+

*1 Addition to Constraints in C90 6.8 by Corrigendum 1.
+This specification, however, has disappeared in C++ Standard.

+
+*2 C99 6.10.3 Macro replacement -- Constraints
+
+ +

e.vargs1. __VA_ARGS__ not in the replacement list

+

Variable argument macros in C99 use __VA_ARGS__ in the replacement list corresponding to a parameter ... in the parameter list of the macro definition. This identifier must not be used anywhere else.

+

Scoring: 2. 2 points if 2 samples are correctly diagnosed. 0 points if only one is diagnosed correctly.

+ +

3.4.19. Macro Re-definition

+

Macro re-definition was not mentioned in K&R 1st and implementations were all different as well. In Standard C, some re-definition of the original definition is allowed, but not a different one. Macros are virtually not re-defined (unless they are voided by #undef). *1, *2

+

Note:

+
+*1 C90 6.8.3 Macro replacement -- Constraints
+   C99 6.10.3 Macro replacement -- Constraints
+
+*2 However, many compiler systems issue a warning and accept redefinition. So does mcpp starting with V.2.4, to maintain compatibility with existing compiler systems.

+ +

n.19.1. Differences in white spaces before and after a replacement list

+

Re-definition where only the number of white spaces are different, is allowed.

+

Scoring: 4.

+ +

n.19.2. Differences in white spaces in a parameter list and differences in white spaces extending over lines

+

White spaces include ones extending over source lines by <backslash><newline> sequence or comments.

+

Scoring: 4.

+ +

e.19.3. Differences in token sequence in a replacement list

+

Re-definition where token sequences in a replacement list are different is a violation of constraint.

+

Scoring: 4.

+ +

e.19.4. Differences in the existence of white spaces in a replacement list

+

Re-definition where the existence of white spaces in a replacement list is different is a violation of constraints. This has a trace of character-oriented preprocessing.

+

Scoring: 4.

+ +

e.19.5. Different parameter usage

+

As re-definition of different parameter usage is essentially a different definition, it is a violation of constraints.

+

Scoring: 4.

+ +

e.19.6. Differences in parameter names

+

Re-definition where only parameter names are different but which is essentially the same is a violation of constraints. This seems to be an excessive constraint.

+

Scoring: 2.

+ +

e.19.7. Sharing function-like and object-like macro names

+

As a macro name belongs to one name space, a function-like macro and an object-like macro cannot use the same name.

+

Scoring: 2.

+ +

3.4.20. Macro Names Same as Keywords

+

Since no keyword exists in preprocessing, an identifier with same name as a keyword can be defined as a macro and expanded. *1

+

Note:

+
+*1 C90 6.1 Lexical elements -- Syntax
+   C99 6.4 Lexical elements -- Syntax
+   C89 Rationale 3.8.3 (C99 Rationale 6.10.3) Macro replacement
+
+ +

n.20.1. Names are all subject to macro expansion

+

Scoring: 6.

+ +

3.4.21. Macro Expansion Requiring Pp-token Separation

+

Tokenizing a source file into pp-tokens is performed in translation phase 3. And the case where multiple pp-tokens are concatenated into 1 pp-token later is defined only by the case where the concatenation is done by expanding the macro defined using the ## operator, the case where stringizing takes place by macro expansion defined by the # operator, and the case of concatenating adjacent string literals. Therefore, it is interpreted that implicit concatenation of multiple pp-tokens must not happen. This is obvious in the principle of token-oriented preprocessing. *1

+

Note:

+
+*1 C90 5.1.1.2 Translation phases
+   C90 6.8.3 Macro replacement
+   C99 5.1.1.2 Translation phases
+   C99 6.10.3 Macro replacement
+
+ +

n.21.1. Pp-tokens are not concatenated implicitly

+

In case preprocessing is done in an independent program, it is necessary to separate and pass 3 -'s in the output of this sample by some sort of token separator so that compiler proper can figure out 3 are separate pp-tokens.

+

Scoring: 4.

+ +

n.21.2. Separation of macro in outer macro's argument

+

Even if a macro is invoked in an argument of outer macro, expansion result of the macro should not be merged with its surrounding pp-tokens in outer macro's replacement list.

+

Scoring: 2.

+ +

3.4.22. Macro-like Sequence in a Pp-number

+

Preprocessing-numbers were introduced by Standard C for the first time. They have a wider range than integer constant tokens and floating point constant tokens put together and may include identifier-like portion. They were defined as a specification in order to simplify tokenization in preprocessing. However, in case there is a macro-like sequence in a pp-number, a wrong result may occur unless this simple tokenization is done exactly. *1

+

Note:

+
+*1 C90 6.1.8 Preprocessing numbers
+   C99 6.4.8 Preprocessing numbers
+
+ +

n.22.1. Macro-like Sequence in a Pp-number - Part 1

+

Since the sequence, 12E+EXP, is one pp-number, it will not be expanded even if a macro, EXP, is defined.

+

Scoring: 4.

+ +

n.22.2. Macro-like Sequence in a Pp-number - Part 2

+

A pp-number starts with a digit or .

+

Scoring: 2.

+ +

n.22.3. Macros outside of a pp-number are expanded

+

In C90, + or - can appear inside a pp-number only if it immediately follows E or e. 12+EXP is different from 12E+EXP and is divided into 3 pp-tokens, 12, +, and EXP. These are a pp-number, an operator, and an identifier, respectively. EXP is expanded if it is a macro.

+

Scoring: 2.

+ +

n.ppnum. [Pp][+-] sequence

+

In C99, the sequence of + or - following P or p in a pp-number was added to write a floating point number in hexadecimal.

+

In order to display a floating point number in printf(), conversion specifiers such as %a and %A are used. *1

+

Scoring: 4.

+

Note:

+
+*1 C99 7.19. 6.1 The fprintf function -- Description
+
+ +

3.4.23. Macros Using the ## Operator

+

## is an operator newly introduced in Standard C and used only in the replacement list on the #define line. The pp-tokens before and after a ## are concatenated into one pp-token. If pp-tokens before and after ## are parameters, they are first replaced by actual arguments at macro expansion and concatenated. *1

+

Note:

+
+*1 C90 6.8.3.3 The ## operator
+   C99 6.10.3.3 The ## operator
+
+ +

n.23.1. Token concatenation

+

This is an example of the most simple function-like macro using the ## operator.

+

Scoring: 6.

+ +

n.23.2. Pp-number generation

+

Since operands of the ## operator are not macro-expanded, using another macro which appears to be meaningless together such as xglue() in this example often takes place. This is for expanding a macro in an argument, then concatenating the result. The 12e+2 sequence which was generated by a macro call in this sample is a valid pp-number.

+

Scoring: 2.

+ +

e.23.3. Missing tokens before or after ## - object-like macros

+

There must be some pp-tokens before and after the ## operator in a replacement list. This is an example of an object-like macro. It is meaningless to use ## in an object-like macro, but not an error.

+

Scoring: 2.

+ +

e.23.4. Missing tokens before or after ## - function-like macros

+

This is an example of a function-like macro definition without pp-tokens before or after the ## operator in a replacement list.

+

Scoring: 2.

+ +

3.4.24. Macros Using the # Operator

+

The # operator was introduced in Standard C. It is used only in the replacement list for the #define line which defines a function-like macro. The operands of the # operator are parameters and corresponding actual arguments at those macro expansion are converted to string literals. *1

+

Note:

+
+*1 C90 6.8.3.2 The # operator
+   C99 6.10.3.2 The # operator
+
+ +

n.24.1. Argument stringizing

+

The argument corresponding to the operand for the # operator is enclosed by " and " on both ends and stringized.

+

Scoring: 6. 2 points if a space is inserted between token as "a + b".

+ +

n.24.2. White space handling between argument tokens

+

In case the argument corresponding to the operand for the # operator comprise of multiple pp-token sequence, white spaces between those pp-tokens are converted into a space and stringized. No space is inserted if there are no white spaces. That is to say, the results differ by the existence of white spaces though they are not influenced by the number of white spaces (this still has a trace of character-oriented preprocessing.) White spaces before and after an argument are deleted.

+

Scoring: 4.

+ +

n.24.3. \ insertion

+

In case a string literal or character constant is in the argument corresponding to the operand for the # operator, \ is inserted immediately prior to the \ or " in it and the " which encloses a string literal. This is same as the method of writing string literals to display string literals or character constants as they are.

+

Scoring: 6.

+ +

n.24.4. Calling macro including <backslash><newline>

+

As the <backslash><newline> sequences are removed in translation phase 2, they do not exist at macro expansion.

+

Scoring: 2.

+ +

n.24.5. Token separator inserted by macro expansion should not remain

+

Macro expansion routine generally guards the expansion result with token separators in order to avoid token-merging with surrounding tokens. (See 3.4.21.) In case of stringization, however, the inserted token-separators should not remain.

+

These cumbersome issues arise from character-oriented portion of the Standard mixed into token-based principle.

+

Scoring: 2.

+ +

e.24.6. Operand for the # operator is not a parameter name

+

The operand for the # operator must be a parameter name.

+

Scoring: 2.

+ +

3.4.25. Macro Expansion in a Macro Argument

+

When macros in an argument should be expanded in a function-like macro call was not mentioned in K&R 1st. Implementations were all different in pre-C90 preprocessors. More might have expanded at rescanning a replacement list. In Standard C, it was defined as a specification that this was expanded after an argument was identified first, then before substituted for a parameter. The order is similar to the argument evaluation of function calls, which is easy to understand. However, in case the argument corresponds the parameter which is an operand for the # or ## operator, a macro is not considered as a macro call and is not get expanded even if the macro name is included. *1

+

Note:

+
+*1 C90 6.8.3.1 Argument substitution
+   C99 6.10.3.1 Argument substitution
+
+ +

n.25.1. Macro in an argument is expanded first

+

A macro in an argument is expanded after the argument is identified, then substituted for a parameter in the replacement list. Therefore, the one identified as one argument is one argument even if it appears multiple arguments after expansion.

+

Scoring: 4.

+ +

n.25.2. Argument expanded into 0 piece of token

+

Similarly, arguments which become 0 piece of token after expansion are legitimate.

+

Scoring: 2.

+ +

n.25.3. Calling macro using the ## operator in an argument

+

In case the operand for the ## operator is a parameter, the argument corresponding to it does not get macro-expanded. Therefore, it is necessary to nest another macro in order to do macro expansion.

+

Since xglue() does not use the ## operator in this example, glue( a, b), which is an argument for it, gets macro-expanded and becomes 'ab' and the replacement for xglue() becomes glue(ab, c). This is rescanned and 'abc' is the final result.

+

Scoring: 2.

+ +

n.25.4. No expansion for the operand for the ## operator

+

Since glue() is directly called, a macro does not get expanded even if a macro name is in the argument.

+

Scoring: 6.

+ +

n.25.5. No expansion for the operand for the # operator

+

The argument corresponding to the parameter which is an operand for the # operator is not macro-expanded.

+

Scoring: 4.

+ +

e.25.6. Macro expansion in an argument incomplete in the argument

+

Macro expansion in an argument is done only in that argument. Incomplete macro is a violation of constraints. Though a function-like macro name is not a macro call by itself, it becomes the beginning of a macro call sequence if it is followed by '('. Once it begins, ')' corresponding to this '(' must exist. *1

+

Scoring: 4.

+

Note:

+
+*1 C90 6.8.3 Macro replacement -- Constraints
+   C99 6.10.3 Macro replacement -- Constraints
+
+ +

3.4.26. Macros of a Same Name during Macro Rescanning

+

In case macro definition is recursive, expanding the macro as is causes infinite recursion. Because of this, recursive macros could not be used in K&R 1st. Standard C introduced a new specification that the macro name replaced once does not get replaced again in order to allow recursive macro expansion, preventing infinite recursion. This specification is quite difficult, but can be paraphrased as below. *1

+
    +
  1. While rescanning the replacement list of macro A, the name, A, even if found, will not be replaced again.
    +
    +
  2. In case of nested replacement which has the name, A, in the middle of macro B replacement when there is a macro B call in the replacement list of macro A, the A will not be replaced again.
    +
    +
  3. However, in case of macro B replacement included the token sequence after the replacement list of the original macro A, A at this part included is replaced, if and only this A is in the source file (not in replacement list of any macro).
    +
    +
  4. 1 to 3 are recursively applied to macro B replacement. In other words, if B appears again in the middle of macro B replacement and it is on the token sequence after the replacement list of the original B, and this B is not in the source file, this B will not be replaced.
    +
    +
  5. In case there is macro C call in the argument for the original macro A call and C which appeared in the middle of replacement of C applies 1 through 3 and is forbidden from replacement, this C will not be replaced again even when the replacement list of the original macro A is rescanned.
    +
+

After all these paraphrasing, it is still difficult. Especially, 3 comes from a traditional macro rescan specification of including subsequent token sequence and this complicates the problem unnecessarily. The Standard has issued a corrigendum and made corrections concerning this subject, however, it just gets more confusing. Furthermore, the Standard changes macro expansion depending whether the subsequent token sequence is in the source file or not. This is an inconsistent specification. *2

+

Not only that the macro expansion involving the succeeding token sequence is uncommon, but also it is doubly uncommon that the macro, whose re-replacement at that part has been prohibited, appears again. The Validation Suite does not have this type of macro as a test item other than n.27.6. I hope this abnormal specification regarding macro expansion of "including a succeeding token sequence" will be removed. *3

+

Note:

+
+*1 C90 6.8.3.4 Rescanning and further replacement
+   C99 6.10.3.4 Rescanning and further replacement
+
+

*2 Refer to 2.7.6.

+

*3 At the newsgroup comp.std.c, there has been some controversy on the Standard's specification about recursive macro expansion. Mainly two interpretations have been insisted on this subject. recurs.t is one of the samples used in the discussion. Refer to the comment in recurs.t. This Validation Suite does not evaluate preprocessors behavior on this sample.

+

mcpp V.2.4.1 or later in Standard mode implements the two ways of recursive macro expansion. mcpp sets, by default, the range of non-re-replacing of the same name as wide as the explanation above 1-5, and expands this sample as 'NIL(42)'. mcpp sets, by '-@compat' option, the range narrower, and expands this sample as '42'. The difference of these two specifications appears, in 3 above, when the first half of a function-like macro call of A is in the replacement list of B. mcpp, by default, prohibit re-replacing of A even if only the name of A is in the replacement list of B. On the other hand, mcpp, by -@compat option, prohibit re-replacing if and only the name of A and the arguments list with '(', ')' surrounding it are all in the replacement list of B, and does not distinguish whether the name is in the source file or not.

+ +

n.26.1. No re-expansion for direct recursive object-like macros

+

This is an example of direct recursion for object-like macros.

+

Scoring: 2.

+ +

n.26.2. No re-expansion for indirect recursive object-like macros

+

This is an example of indirect recursion for object-like macros.

+

Scoring: 2.

+ +

n.26.3. No re-expansion for direct recursive function-like macros

+

This is an example of direct recursion for function-like macros.

+

Scoring: 2.

+ +

n.26.4. No re-expansion for indirect recursive function-like macros

+

This is an example of indirect recursion for function-like macros.

+

Scoring: 2.

+ +

n.26.5. Recursive macros in arguments

+

In Standard C, there is a difficult specification meaning "the macro whose re-replacement has been prohibited will not be replaced at rescan in another context." What applies to this in concrete is the handling at rescanning the parent macro for the macro in the argument. When there is a recursive macro in an argument, it is replaced only once. It is not replaced at the rescan of the parent macro, either.

+

Scoring: 2.

+ +

3.4.27. Macro Rescanning

+

Rescanning of macro replacement lists has been a specification since K&R 1st. Macros found at rescan are replaced as long as they are not recursive macros. This takes care of nested macro definitions. There was no special change in Standard C, though what was not obvious in K&R 1st became somewhat clearer. *1

+

Note:

+
+*1 C90 6.8.3.4  Rescanning and further replacement
+   C99 6.10.3.4 Rescanning and further replacement
+
+ +

n.27.1. Nested object-like macro

+

This is same in K&R 1st as well.

+

Scoring: 6.

+ +

n.27.2. Nested function-like macro

+

This is same in K&R 1st as well.

+

Scoring: 4.

+ +

n.27.3. Name generated by the ## operator is subject to expansion

+

The argument corresponding to the operand for the ## operator is not macro-expanded, however, the pp-token newly generated by pp-token concatenation is subject to macro expansion at rescan.

+

Scoring: 2.

+ +

n.27.4. Function-like macros formed in replacement list

+

In case a function-like macro name, even if any, does not follow (, it is not considered to be a macro call. If a function-like macro name is obtained from an argument and a function-like macro call is formed by using the name in the replacement list, it will be expanded.

+

Scoring: 6.

+ +

n.27.5. Replacement list forming the first half of a function-like macro

+

The unusual macro that a replacement list forms the first half of a function-like macro call was an unspoken specification in pre-Standard, but was officially accepted in Standard C. The pp-token sequence subsequent to the replacement list is included to complete a macro call.

+

Scoring: 2.

+ +

n.27.6. Same name macro to be re-replaced

+

In general, the same name macro is not re-replaced while rescanning. Some unusual cases are, however, re-replaced. In case of nested macro call, when the replacement list involves the subsequent pp-tokens and finds the same name in source file, the name is re-replaced.

+

Scoring: 2.

+ +

e.27.7. Mismatched number of arguments at rescan

+

The number of arguments must match that of parameters in function-like macro calls. It is also the same in the function-like macros found at the rescan of the replacement list. However, the number of arguments may not be easy to recognize intuitively in tricky macros since arguments are separated by ,.

+

Scoring: 2.

+ +

3.4.28. Predefined Macros

+

C90 introduced a specification that 5 special macros are predefined by implementations. *1, *2

+

Furthermore, a macro named __STDC_VERSION__ was introduced in C90/Amendment 1.

+

__FILE__ and __LINE__ are extremely special macros that change definitions dynamically. It is used in the assert(), debug tools, and others. The rest of Standard predefined macros do not change during the processing of one translation unit.

+

Note:

+
+*1 C90 6.8.8 Predefined macro names
+
+*2 C99 6.10.8 Predefined macro names
+
+ +

n.28.1. __FILE__

+

This is defined to be the string literal for the source file name being preprocessed. As the file name is used for the source file included by #include, it changes in the same translation unit also.

+

Scoring: 4. 0 points for just a name as in n_28.t, rather than a string literal as in "n_28.t".

+ +

n.28.2. __LINE__

+

This is defined to the decimal constant for the line number in the source file being preprocessed. The line number starts with 1.

+

Scoring: 4. 2 points if the line number starts with 0.

+ +

n.28.3. __DATE__

+

This is defined to the string literal for the date on which preprocessing is performed. The format is "Mmm dd yyyy" and almost the same as the one generated by the asctime() function with an exception that the 1st digit of dd is a space, not 0, in case the day is prior to the 10th.

+

Scoring: 4. 2 points if the 1st digit of dd is 0 in case the day is prior to the 10th.

+ +

n.28.4. __TIME__

+

This is defined to the string literal for the time at which preprocessing is performed. The format is "hh:mm:ss", same as the one generated by the asctime() function.

+

Scoring: 4.

+ +

n.28.5. __STDC__

+

This is defined to a constant, 1, in C90 or C99 compliant implementations.

+

Scoring: 4.

+ +

n.28.6. __STDC_VERSION__

+

This is defined to 199409L in implementations supporting C90/Amendment 1:1995. *1

+

Scoring: 4.

+

Note:

+
+*1 Amendment 1/3.3 Version macro (addition to ISO 9899:1990 / 6.8.8)
+
+ +

n.stdmac. C99 predefined macros

+

In C99, the value of __STDC_VERSION__ is 199901L.

+

Also, a predefined macro, __STDC_HOSTED__, was added. This is defined to 1 for a hosted implementation, 0 otherwise.

+

Scoring: 4. 2 points each.

+ +

n.28.7. __LINE__ and others in files included

+

Since __FILE__ and __LINE__ are subject to the source files, not translation units, they are the name of file included and a line number in the source included.

+

Scoring: 4. 2 points if the line number starts with 0.

+ +

3.4.29. #undef

+

#undef has been supported since K&R 1st and there are no major changes. It cancels the macro definition previously defined. The valid range for the macro is from when it is defined by #define until when it is canceled by #undef. *1

+

Note:

+
+*1 C90 6.8.3.5 Scope of macro definitions
+   C99 6.10.3.5 Scope of macro definitions
+
+ +

n.29.1. Macro cancellation by #undef

+

The macro name is no longer a macro after #undef.

+

Scoring: 10.

+ +

n.29.2. #undef for the macro without being defined

+

Applying #undef to the name which has not been defined as a macro is allowed. Compiler systems must not reject this as an error.

+

Scoring: 4.

+ +

e.29.3. Missing name

+

An identifier is required on the #undef line.

+

Scoring: 2.

+ +

e.29.4. Extra token

+

The #undef line must not have other than one identifier.

+

Scoring: 2.

+ +

e.29. 5. Missing argument

+

Missing an argument on the #undef line is a violation of syntax rules.

+

Scoring: 2.

+ +

3.4.30. Macro Calls

+

In a macro call, a <newline> is treated as simply one of white spaces. Therefore, a macro call can extend over multiple lines, which was not clear in K&R 1st. *1

+

Arguments for function-like macro calls are separated by ','. However, the , inside of a pair of ( and ) is not considered to be a separator for arguments. This is not tested here directly, however, it is implicitly tested throughout the Suite, in n.25 as an example. Since many of *.c samples use the assert() macro, quite complicated testing regarding this is performed.

+

Note:

+
+*1 C90 6.8.3 Macro replacement -- Semantics
+   C99 6.10.3 Macro replacement -- Semantics
+
+ +

n.30.1. Macro call extending over multiple lines

+

Scoring: 6.

+ +

n.nularg. Empty arguments in macro calls

+

In C99, an empty argument in macro calls was accepted. This is different from insufficient arguments. The ',' to separate arguments cannot be omitted (though both cannot be identified in case of one parameter.)

+

Scoring: 6.

+ +

3.4.31. Macro Call Error

+

The next are some errors regarding macro calls.

+ +

e.31.1. Too many arguments

+

Different number of arguments and parameters is a violation of constraint, not undefined. *1

+

Scoring: 2.

+

Note:

+
+*1 C90 6.8.3 Macro replacement -- Constraints
+   C99 6.10.3 Macro replacement -- Constraints
+
+ +

e.31.2. Insufficient arguments

+

The number of arguments less than that of parameters is a violation of constraints.

+

In C99, an empty argument was accepted. This is different from insufficient arguments. The ',' to separate arguments must exist.

+

Scoring: 2.

+ +

e.31.3. Incomplete macro call on the control line

+

In general, a macro call can extend over multiple lines. However, since the preprocessing directive line starting with # completes in the line (possibly spliced by multi-line comment), a macro call in it must complete in the line as well.

+

Scoring: 2.

+ +

e.vargs2. No Arguments for Variable Argument Macros

+

Variable argument macros in C99 need at least one actual argument for __VA_ARGS__.

+

Scoring: 2.

+ +

3.4.32. Character Constant in #if Expression

+

The #if expressions can use character constants. However, the evaluation is mostly implementation-defined and does not have much portability. 32.? Covers the most simple single byte character constants. *1

+

Note:

+
+*1 C90 6.1.3.4 Character constants
+   C90 6.8.1 Conditional inclusion -- Semantics
+   C99 6.4.4.4 Character constants
+   C99 6.10.1 Conditional inclusion -- Semantics
+
+

Below, the sources of the Standards for the 33, 34, and 35 tests are also the same.

+ +

n.32.1. Character octal escape sequences

+

In character constants, octal escape sequences are supported. These are same in any implementation and there are no implementation-defined areas.

+

Scoring: 2.

+ +

n.32.2. Character hexadecimal escape sequences

+

In character constants, hexadecimal escape sequences are also supported. There are no implementation-defined areas here either. Hexadecimal escape sequences did not exist in K&R 1st.

+

Scoring: 2.

+ +

i.32.3. Single-byte character constants

+

Single byte character constants not in an escape sequence are simple, however, values depend on basic character sets. In a cross compiler whose basic character set varies at compilation and at runtime, it is acceptable to use either of them in the #if expression evaluation.

+

Even the same basic character sets are implementation-defined in terms of sign handling. Moreover, handling can be different between the compiler proper (translation phase 7) and preprocessing (phase 4.)

+

Therefore, judging a basic character set from the value of a character constant in the #if expression is not a guaranteed method.

+

Scoring: 2.

+ +

i.32.4. '\a' and '\v'

+

Standard C added new escape sequences, '\a' and '\v'.

+

Scoring: 2.

+ +

e.32.5. Escape sequence value out of the unsigned char range

+

As an escape sequence in a character constant represents a single-byte character value, it must be in the unsigned char range.

+

Scoring: 2.

+ +

3.4.33. Wide Character Constant in #if Expression

+

Wide character constants were introduced in Standard C. The value evaluation is even more implementation-defined than a single-byte character constant and even byte evaluation order is not specified.

+

Although there are various encodings of wide character, only the wide character corresponding to ASCII character is tested here. For the other encodings, see 4.1.

+ +

e.33.2. Wide character constant value out of range

+

Hexadecimal or octal escape sequences can be used in wide character constant values as well, however, the values must be in the range representing one wide character value unsigned.

+

Scoring: 2.

+ +

3.4.35. Multi-Character Character Constant in #if Expressions

+

Character constants include something called multi-character character constants. They appear similar to multi-byte character constants and confusing, however they are different concept and means character constants comprising of multiple characters. Among these characters, there are single-byte characters, multi-byte characters, and wide characters and the multi-character character constants corresponding to each exist (in Standards, the term, character, is used as a single-byte character, but it refers to 3 kinds of characters here.)

+

There seems to be no usage for multi-character character constants. The reason why these has been accepted since K&R 1st seems to be simply because whatever is in the int range is fine as the character constant type is int.

+ +

i.35.1. Multi-character character constant evaluation

+

Multi-character character constants for single-byte characters have been around since K&R 1st. (A.16.) However, the evaluation byte order is not defined in K&R 1st or Standard C.

+

Scoring: 2.

+ +

e.35.2. Multi-character character constant value out of range

+

Multi-character character constant values in a hexadecimal or octal escape sequence must be in the int or unsigned int range. However, since int/unsigned int are treated as if they have the same internal representation as long/unsigned long in the #if expressions in C90, checking if values are in the long or unsigned long range seems enough. This point is not clear in the Standards. It can be interpreted that range checking is implementation-defined since the method of value evaluation itself is implementation-defined.

+

In any case, it is appropriate for this sample to issue a diagnostic message since this sample exceeds the unsigned long range in the 64-bit long or lower compiler systems no matter how evaluation is performed.

+

In C99, the #if type became the maximum integer type in the implementation.

+

Scoring: 2.

+ +

i.35.3. Multi-character wide character constant evaluation

+

There exists something called wide character multi-character constants. The evaluation method is also implementation-defined overall, however, a wide character multi-character constant needs to match the multi-character constant for corresponding multi-byte character.

+

Scoring: 0.

+ +

3.4.37. Translation limits

+

Standard C specified the minimum for each translation limit that can be handled by compiler systems. However, this specification is quite lenient. Regarding 22 kinds of limitation values, each program including one or more examples meeting each limitation value must be processed and executed. As you can see in this Validation Suite sample, it is possible to write this program extremely simple and impractically with the minimum load for a compiler system. Please note that these translation limits are not guaranteed all the time. The translation limit specification is only an indication. These samples test only 8 kinds of translation limits regarding preprocessing. *1, *2, *3

+

A part of these test samples has lines wrapped to fit on a screen. These tests may fail in the compiler system that cannot process line splicing correctly (for example, Borland C.) Since line splicing testing is not the purpose here, please concatenate lines with an editor to re-test the sample if it fails.

+

Note:

+
+*1 C90 5.2.4.1 Translation limits
+
+*2 C99 5.2.4.1 Translation limits
+
+

In C99, translation limits are expanded to a large extent. They are even more so in the C++ Standard (refer to 4.6.)

+ +

n.37.1. 31 parameters in a macro definition

+

In C90, up to 31 parameters in a macro definition are guaranteed in any case.

+

Scoring: 2.

+ +

n.37.2. 31 arguments in a macro call

+

Similarly, up to 31 arguments in a macro call are guaranteed in C90 in any case.

+

Scoring: 2.

+ +

n.37.3. 31 characters in an identifier

+

In C90, the top 31 characters of the internal identifier (including macro names) in a translation unit are guaranteed to be significant. Preprocessing goes without saying, but 31 byte names also need to be passed. *1

+

Scoring: 4.

+

Note:

+
+*1 C90 6.1.2 Identifiers - Implementation limits
+
+ +

n.37.4. 8 levels of nested conditional inclusion

+

In C90, 8 levels of #if (#ifdef, #ifndef) section nesting is guaranteed in any case.

+

Scoring: 2.

+ +

n.37.5. 8 levels of nested #include

+

In C90, 8 levels of #include nesting is guaranteed in any case.

+

Scoring: 4.

+ +

n.37.6. #if expression with 32 levels of parentheses

+

In C90, 32 nesting levels of parentheses are guaranteed in an expression in any case. This seems to apply to the #if expressions as well (Different from generic expressions, it does not seem to be necessary to guarantee to that extent for the #if expressions. The only specifications which are defined as an exception are the #if expressions are integer constant expressions, which are evaluated only in long/unsigned long, do not require a query to execution environment, and that same evaluation methods as runtime or phase 7 are not required. Since the rest receive no special treatment, there are some parts where the specification seems somewhat extreme.)

+

Scoring: 2.

+ +

n.37.7. 509 byte string literal

+

In C90, the length of string literals is guaranteed up to 509 bytes. This length is that of a token and not the number of elements in a char array. It includes " in both ends and \n is counted as 2 bytes. In a wide string literal, the L prefix is included in the number.

+

Scoring: 2.

+ +

n.37.8. 509 byte logical line

+

In C90, the length of a logical line is guaranteed up to 509 bytes in any case.

+

Scoring: 2.

+ +

n.37.9. 1024 macro definitions

+

In C90, 1024 macro definitions are guaranteed in any case. This is the most ambiguous among specifications regarding translation limits. The amount of memory required by compiler systems for the simplest macros in this sample are totally different from that for many long macros. Also, test programs vary depending predefined macros are included in the 1024 macros. In an actual program, many macros are defined in standard headers before they are defined in a user program. This specification is truly only rough indication. The real limitations shall be determined by the memory amount, which can be provided by the system.

+

Scoring: 4.

+ +

n.tlimit. C99 translation limits

+

In C99, translation limits were extended to a large extent.

+

Scoring: 2 for each of below.

+ +

n.37.1.L. 127 parameters in a macro definition

+ +

n.37.2.L. 127 arguments in a macro call

+ +

n.37.3.L. 63 characters in an identifier

+ +

n.37.4.L. 63 levels of nested conditional inclusion

+ +

n.37.5.L. 15 levels of nested #include

+ +

n.37.6.L. #if expression with 63 levels of parentheses

+ +

n.37.7.L. 4095 byte string literal

+ +

n.37.8.L. 4095 byte logical line

+ +

n.37.9.L. 4095 macro definitions

+
+ +

3.5. Documentation of Implementation-Defined Items

+

Standard C has items called implementation-defined. Specifications in these items vary depending on implementations. However, it is required that implementations describe specifications in a document. *1

+

Among the specifications that are implementation-defined, there are ones determined by CPU and OS in addition to the ones by compiler systems themselves. In case of cross compilers, CPU and OS may differ at translation and runtime.

+

The items below check if the implementation-defined items in preprocessing are described in a document. Since this is for preprocessing, it is for translation time as far as CPU and OS are concerned. d.1.* are for preprocessing specific specifications and d.2.* are related to compiler proper specifications. However, the #if expression evaluation can have different specifications from compiler proper.

+

Other than items below, there are some implementation-defined aspects in the #if expression evaluation. The first one is character sets (basic character set is ASCII or EBCDIC and such.) The integer representation (2's complement, 1's complement, or sign+absolute value) is another one. Same as a result converted from a signed integer into an unsigned by usual arithmetic conversion. However, since these are all machine and OS dependent, just those documents should be enough and they do not need to be described in the preprocessor documents. Therefore, these are not subject to scoring.

+

Note:

+
+*1 C90 3 Definitions of Terms
+   C99 3 Terms, definitions, and symbols
+
+ +

d.1.1. Header-name construction method

+

A header-name is a special pp-token. How to combine sequences enclosed by < and > or " and " into one pp-token called a header-name is implementation-defined. It is easy since what is enclosed by " and " is treated as a pp-token called a string literal as far as implementation is concerned, however, what is enclosed by < and > has extremely special problems. That is because <stdio.h> is divided into 5 pp-tokens, <, stdio, ., h, and >, in translation phase 3 and composed into 1 pp-token in phase 4. In case this part is written using macros, even more delicate issues arise. *1

+

Scoring: 2. 2 points if this specification is described in implementation documents, 0 points otherwise.

+

Case-sensitivity in header-names and file name rules are also implementation-defined, however they do not necessarily need describing in implementation documents since these are OS dependent.

+

Note:

+
+*1 C90 6.8.2 Source file inclusion -- Semantics
+   C99 6.10.2 Source file inclusion
+
+ +

d.1.2. Header search method in #include

+

How to search the header file after a header-name is taken out of the #include line is also implementation-defined. In case of the header-name enclosed by " and ", the files is searched in an implementation-defined method first and searched in the same way as the header-name enclosed by < and > if not found. However, the latter is also implementation-defined. This specification does not make any sense at all, however, it cannot be helped since Standard C cannot make assumptions regarding the OS.

+

In the OS with directory structures, the former searches the relative path to the current directory while the latter searches the directory specified by the implementation. However, some implementations search the relative path to the file that is the source of include. This cannot be said wrong, either, since it is implementation-defined. This is explained by the Rationale that the committee's intention is the specification of the search in the relative path to the current directory, but that it could not be officially defined since the OS cannot be assumed. *1

+

Also, the former search does not have to be supported (it is acceptable to treat the header-name enclosed by " and " in the same way as one enclosed by < and >.) The latter does not necessarily have to be a file, either. There may be a header built in implementations. *2

+

Scoring: 4. 4 points if these header search methods are fully described in documents, 2 points if not fully, and 0 point if almost no description.

+

Note:

+
+*1 ANSI C Rationale 3.8.2 Source file inclusion
+   C99 Rationale 6.10.2 Source file inclusion
+
+*2 C90 6.8.2 Source file inclusion -- Semantics
+   C99 6.10.2 Source file inclusion
+
+ +

d.1.3. #include nesting limitation

+

The number of the #include nesting level is implementation-defined. Though, at least 8 levels for C90 and 15 levels for C99 must be guaranteed. *1, *2

+

Scoring: 2.

+

Note:

+
+*1 C90 5.2.4.1 Translation limits
+   C99 5.2.4.1 Translation limits
+
+
+*2 C90 6.8.2 Source file inclusion -- Semantics
+   C99 6.10.2 Source file inclusion
+
+ +

d.1.4. #pragma sub-directives that are implemented

+

The #pragma preprocessing directive is a directive to specify enhanced functionalities specific to implementations. Enhanced functionalities must be all implemented as #pragma sub-directives in preprocessing as well. *1

+

Scoring: 4. 4 points if enough description is in documents regarding the #pragma sub-directives valid in the implementation (at least all #pragma sub-directives for preprocessing in preprocessing documents), 2 points if the descriptions are not enough, and 0 points if almost no description. Deduct 2 points if there is a directive specific to the implementation other than #pragma sub-directives (0 point is the lowest limit. The directives, which are prohibited by options specifying the closest specification to Standard C, are not included.)

+

Note:

+
+*1 C90 6.8.6 Pragma directive
+   C99 6.10.6 Pragma directive
+
+ +

d.pragma. Macro expansion in #pragma

+

In C90, pp-tokens on the #pragma line was not subject to macro expansion. In C99, however, the line with the STDC token following #pragma is not subject to macro expansion and the macro expansion for the rest of #pragma sub-directives became implementation-defined.

+

Scoring: 2.

+ +

d.1.5. Predefined macros

+

Predefined macros other than __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__ (also __STDC_HOSTED__ in C99) are implementation-defined. They must have a name with one _ followed by uppercase letters or starting with 2 _'s. *1

+

Scoring: 4. 2 points if the description is not enough. Deduct 2 points in case there is a predefined macro with the name which does not follow the specification restrictions (0 point is the lowest limit. The directives, which are prohibited by options specifying the closest specification to Standard C, are not included.)

+

Note:

+
+*1 C90 6.8.8 Predefined macro names
+   C99 6.10.8 Predefined macro names
+
+ +

d.predef. C99 predefined macros

+

C99 added the macros, __STDC_IEC_559__, __STDC_IEC_559_COMPLEX__, and __STDC_ISO_10646__, which are predefined conditionally.

+

__STDC_IEC_559__ and __STDC_IEC_559_COMPLEX__ are defined as 1 respectively in the implementation matching IEC 60559 floating point specification. These 2 are determined by the floating point operation library and it may be appropriate to define these in <fenv.h> or another actually. They do not necessarily have to be predefined in a preprocessor.

+

__STDC_ISO_10646__ is defined as a constant in the format such as 199712L which represents the year and month of the specification including amendments and corrigenda in complying ISO/IEC 10646 in case values of characters in the wchar_t type are all some sort of coded implementations of ISO/IEC 10646 (Universal Character Set of Unicode system.) This may also be defined in <wchar.h> or another and it does not seem to have to be predefined in a preprocessor.

+

In any case, the explanation is required in documents.

+

Scoring: 6. 2 points each for each of 3.

+ +

d.1.6. Whether white-spaces should be compressed in phase 3

+

In Standard C, tokenization is performed in translation phase 3. Whether a white-space sequence other than <newline> should be compressed into one space at that time is implementation-defined. *1

+

However, as this is an internal behavior that does not usually influence the compilation result, it is not a user concern. White-spaces in the beginning and end of a line may be removed.

+

If you are wondering this specification is unnecessary, it is not so, but there is one case necessary. That is in case the preprocessing directive line has [VT] and [FF]. This is defined as a specification in an incomprehensible way in Standard C. On one hand, this is treated as a violation of constraints; the specification above is established on the other hand. In other words, [VT] and [FF] can be compressed into one space together with spaces or tabs before and after in phase 3. In that case, [VT] and [FF] do not remain in phase 4, but they do remain in case they are not compressed to cause a violation of constraints.

+

I think it is enough if [VT] and [FF] handlings are described in documents.

+

Scoring: 2.

+

Note:

+
+*1 C90 5.1.1.2 Translation phases 3
+   C90 6.8 Preprocessing directive -- Constraints
+   C99 5.1.1.2 Translation phases 3
+   C99 6.10 Preprocessing directive -- Constraints
+
+ +

d.ucn. Whether UCN's \ should be repeated in stringizing

+

In case stringizing pp-tokens including UCN by the # operator, whether UCN's \ should be repeated is implementation-defined. *1

+

Scoring: 2.

+

Note:

+
+*1 C99 6.10.3.2 The # operator
+
+ +

d.2.1. #if: Single-character character constant evaluation

+

In general, the evaluation of character constant values is implementation-defined. This has several levels.

+
    +
  1. What is the basic character set.
    +
  2. What are multi-byte character and wide character encodings.
    +
  3. How is sign handled.
    +
  4. What is the byte order for multi-byte character constant evaluation.
    +
+

Among these, 1 is not subject to scoring since they are OS dependent. The problems are 2, 3 and 4.

+

Even single byte single-character character constants are implementation-defined in terms of sign handling. Moreover, different evaluation between preprocessing and compilation is permitted. *1

+

Scoring: 2. 2 points if a document includes descriptions or if it has descriptions regarding the evaluation in the compilation phase and the same evaluation is performed in the #if expression. 0 points if no accurate description is written.

+

Note:

+
+*1 C90 6.1.3.4 Character constants
+   C90 6.8.1 Conditional inclusion -- Semantics
+   C99 6.4.4. 4 Character constants
+   C99 6.10.1 Conditional inclusion -- Semantics
+
+ +

d.2.2. #if: Multi-character character constant evaluation

+

There is an issue of a byte order in multi-character character constant evaluation such as 'ab'. This is also implementation-defined.

+

Scoring: 2. The scoring method is same as d.2.1.

+ +

d.2.3. #if: Multi-byte character constant evaluation

+

Other than encoding, there are differences in sign handling and byte order in multi-byte character constant evaluation. These are all implementation-defined.

+

Scoring: 2. The scoring method is same as d.2.1.

+ +

d.2.4. #if: wide character character constant evaluation

+

Other than encoding, there are differences in sign handling and byte order in wide character constant evaluation. These are all implementation-defined.

+

Scoring: 2. The scoring method is same as d.2.1.

+ +

d.2.5. #if: right shift for a negative number

+

In general, how sign bits are handled in the right bit shift for a negative integer is implementation-defined. This depends on the CPU specification, but also the implementation of the compiler system. *1

+

Scoring: 2. The scoring method is same as d.2.1.

+

Note:

+
+*1 C90 6.3.7 Bitwise shift operators -- Semantics
+   C99 6.5.7 Bitwise shift operators -- Semantics
+
+ +

d.2.6. #if: Division and modulo of a negative number

+

In general, in case one or both of right-hand side and left-hand sides are negative integers, the results of division and modulo are implementation-defined. This depends on the CPU specification, but also the implementation of the compiler system. *1, *2

+

Scoring: 2. The scoring method is same as d.2.1.

+

Note:

+
+*1 C90 6.3.5 Multiplicative operators -- Semantics
+   C99 6.5.5 Multiplicative operators -- Semantics
+
+

*2 In C99, quotients are rounded off to the direction of 0 just as div() and ldiv().

+ +

d.2.7. Valid length of identifiers

+

Up to which byte of the identifier including a macro name from the beginning is significant is implementation-defined. For macro names and internal identifiers, 31 bytes for C90 and 63 bytes for C99 must be guaranteed. *1

+

Scoring: 2.

+

Note:

+
+*1 C90 6.1.2 Identifiers -- Implementation limits
+   C99 6.4.2.1 Identifiers -- General -- Implementation limits
+
+ +

d.mbident. Multi-byte characters in identifiers

+

In C99, implementations using multi-byte characters in identifiers are permitted. This specification is implementation-defined. *1

+

Scoring: 2.

+

Note:

+
+*1 C99 6.4.2.1 Identifiers -- General
+
+
+ +

4. Evaluation of Aspects Unspecified by Standard

+

Even if something is not required to implementations by Standards, they may be important in order to evaluate the "quality" of implementations. In this chapter, quality evaluation testing is explained.

+
+ +

4.1. Multi-byte Character Encoding

+

There are various encodings for multi-byte character and wide character. The specification of encoding is implementation-defined. In this section, however, the "quality" matter of implementations are explained, that is how many encodings the implementation can handle and to what degrees can handle.

+

This Validation Suite provides samples supporting several encodings for m_33, m_34, and m_36. Compiler systems not only have to support the standard encoding on the system, but also must support many encodings in order to process source files supporting multiple languages. *1

+

However, the method of testing differs depending on the system and compiler systems and is not easy.

+

In GCC, use environment variables, LC_ALL, LC_CTYPE, and LANG, change behavior, but their implementations are half-finished and not reliable. Moreover, whether this feature is available depends on the configuration when GCC itself was compiled.

+

GCC 3.4 changed its way of multi-byte character processing entirely. It converts every encoding of source file to UTF-8 at the start of preprocessing (so to say the translation phase 1). Hence, a multi-byte character constant in #if expression cannot be evaluated in other than UTF-8 which is irrelevant to the original encoding.

+

The C++98 Standard has a similar problem. Since it stipulates to convert multi-byte character into UCN at translation phase 1, multi-byte character constant in #if expression cannot be evaluated in other than UCN.

+

Considering the rather confused status of the Standards and the implementations, and considering the lack of portability and lack of meaning of character constant in #if expression, I excluded the tests of multi-byte/wide character constants in #if expression (m.33, m.34, m.36.1) from the subject of scoring since Validation Suite V.1.5.

+

In Visual C++, use #pragma setlocale, which is a convenient directive. On Windows, "Regional and Language Options" is supposed to change the language to use but is ill-defined and cumbersome. #pragma setlocale is convenient for a programmer since it can be used without tampering with Windows (though how well Visual C++ itself implements it is a separate story).

+

As far as other compiler systems I have tested are concerned, they support only their default encoding only. Many of them support functions such as setlocale() in the library, which have nothing to do with preprocessing or compiling source files. What is necessary is a capability for a compiler system itself to recognize and process the encoding of source files.

+

Note:

+

*1 In C99, Unicode sequences starting with \u or \U were introduced which made it difficult to understand the relationship with multi-byte/wide character. The C++ Standard is even more complicated.

+ +

m.33.1. Wide character constant evaluation

+

For wide character constant, see 3.4.33.

+

Scoring: none.

+ +

m.34. Multi-byte character constant evaluation

+

Multiple byte multi-byte character constants are supported in the #if expressions (in Standards, the term, multi-byte characters, include single-byte characters, however, in this document, they refer to only multi-byte characters which are not single-byte to avoid confusion.) The evaluation is even more implementation-defined than single-byte character constants.

+

Scoring: none.
+This test needs to be determined along with the test in u.1.7 described later. Simply evaluating a character value does not mean recognizing an encoding. u.1.7 tests whether a multi-byte character is in the range accepted for the encoding. The encoding of a character is properly recognized only after its value is correctly evaluated in m.34 and after an appropriate diagnostic message is displayed in u.1.7.

+ +

m.36.1. 0x5c in Multi-byte Characters is not an escape character

+

If the encoding of (multi-byte | wide) characters is shift-JIS, Big-5, or ISO-2022-*, cumbersome issues arise as there may be a byte with the 0x5c value in a character which is same as '\\'. Compiler systems must not interpret this as a \ (backslash) escape character. A (multi-byte | wide) character is one character and not two single-byte characters.

+

0x5c in the value for multi-byte character constants must not be interpreted as the beginning of an escape sequence.

+

Scoring: none.

+ +

m.36.2. The # operator does not insert \ in Multi-byte Characters

+

'\\' must not be inserted where a multi-byte character with 0x5c is included in an argument of an operand for the # operator. Though there is a method of supporting multi-byte characters, not supported in the compiler proper, in a preprocessor by inserting '\\', is at another level.

+

In addition, there are troublesome issues different from other literals in the tokenization for this type of character constant and string literal including multi-byte characters.

+

As multi-byte characters encoded in ISO-2022-* include not only '\\', but also bytes of values matching '\'' or '"', sloppy processing will end up with a tokenization failure.

+

Scoring: 7. 2 points each for the Shift-JIS and Big-5 encoding. 1 point each for 3 samples of ISO-2022-JP.

+

This item needs to test not only m_36_*.t, but also m_36_*.c. This is because the preprocessor which correctly processes stringizing may fail identifying the complex string literal including a Kanji character with 0x5c as an argument in the assert() macro. m_36.c also tests the tokenization of string literals.

+

GCC 3.4-4.1 converts the encodings to UTF-8, and often fails to convert back to the original encoding. Though the GCC's conversions are usually unwanted ones, these testcases do not check such conversions, they check only the handling of 0x5c byte (lenient tests.)

+
+ +

4.2. Undefined Behavior

+

In Standard C, there are many specifications of an undefined behavior. What causes an undefined behavior is incorrect programs or data or at least programs without portability. However, it is not mandatory to issue a diagnostic message, different from violation of syntax rules or constraints. Implementations can process this in any way. Some sort of reasonable processing as a valid program or handling it as an error by issuing a diagnostic message are acceptable, and it is not against Standards even if the process is canceled or run out of control without issuing a diagnostic message.

+

However, in order to evaluate the "quality" of an implementation, concretely what undefined behavior is a question. I think it is appropriate for an implementation to issue some sort of diagnostic message. Not to mention an error case, even in the case of handling it as a valid program, it is helpful to issue a warning in order to indicate portability issues. Runaway is out of the question.

+

The following tests check whether implementations issue an appropriate diagnostic message for source that causes an undefined behavior. Diagnostic messages may be an error or warning. In case of a warning, some sort of reasonable processing is necessary.

+

u.1.* are preprocessing specific problems and u.2.* are common in constant expressions in general.

+

Scoring: 1 point each for an item unless otherwise noted if an appropriate diagnostic message is issued. 0 points for an off-center or no diagnostic message.

+ +

u.1.1. Source files not ending with <newline>

+

Source files which are not empty and whose end is not the <newline> cause undefined behavior (Depending on OS, no newline character data exists in a file and a newline is automatically added by the implementation when a file is read.) *1

+

u.1.1, u.1.2, u.1.3, and u.1.4 are all ones with incomplete source files. In case the translation unit ends within the file, most implementations seem to issue a diagnostic message. However, even with such implementations, there is a possibility that the incomplete file is treated as valid source by processing the file included within another. Although this is also a type of undefined behavior and not an erroneous process, it is appropriate to issue a diagnostic message.

+

Note:

+
+*1 C90 5.1.1.2 Translation phases
+   C99 5.1.1.2 Translation phases
+
+ +

u.1.2. Source files ending with <backslash><newline>

+

Source files ending with the <backslash><newline> sequence cause an undefined behavior. *1

+

Note:

+
+*1 C90 5.1.1.2 Translation phases
+   C99 5.1.1.2 Translation phases
+
+ +

u.1.3. Source files ending in the middle of comments

+

Source files ending in the middle of comments cause an undefined behavior. This is actually the case of unclosed or nested comments. *1

+

Note:

+
+*1 C90 5.1.1.2 Translation phases
+   C99 5.1.1.2 Translation phases
+
+ +

u.1.4. Source files ending in the middle of a macro call

+

Source files ending with an incomplete macro call is undefined. *1

+

This occurs in case that a parenthesis is missing to close a macro argument and it is important to have a diagnostic message.

+

Note:

+
+*1 C90 6.8.3.4 Rescanning and further replacement
+   C99 6.10.3.4 Rescanning and further replacement
+
+ +

u.1.5. Invalid character in places other than quotes

+

Extremely limited characters can be written in places other than string literals, character constants, header-names, and comments. They are uppercase and lowercase alphabets, numbers, 29 symbols, and 6 kinds of white space characters. It is no wonder since these are for source. *1

+

Here, we test the case of control codes other than white spaces. Although control codes are invalid even in string literals and elsewhere, compiler proper can check this. As there are many locale-specific or implementation-defined aspects in character sets in general and the range is not necessarily clear, we do not test those. Kanji characters are undefined in places other than above, but not tested for similar reasons.

+

Note:

+
+*1 C90 5.2.1 Character sets
+   C99 5.2.1 Character sets
+
+UCN was added in C99.

+ + +

u.1.6. [VT][FF] on control lines

+

Preprocessing directive lines starting with #, even if white space characters, cause a violation of constraints when other than [SPACE][TAB] exists. However, this is the case of translation phase 4 and it is possible to compress those with a sequence of white spaces before and after which are other than <newline> into one space in phase 3 prior to phase 4. In such event, no violation occurs. *1

+

So as in Standards, it is appropriate to issue a diagnostic message to this. This is not an undefined behavior test, however, it is included here as a matter of convenience since it is difficult to classify this elsewhere.

+

Note:

+
+*1 C90 5.1.1.2 Translation phases
+   C99 5.1.1.2 Translation phases
+   C90 6.8 Preprocessing directives -- Constraints
+   C99 6.10 Preprocessing directives -- Constraints
+
+ +

u.1.7. Invalid multi-byte character sequences in quotes

+

Even inside a string literal, character constant, header-name, or comment, a sequence that is not accepted as multi-byte characters causes undefined behavior. This is the case where the next byte of the first byte of a multi-byte character cannot be used as the second byte. *1

+

Scoring: 9. 1 point each for 6 types of encodings other than UTF-8, 3 points for UTF-8. +The UTF-8 testcase has 4 testing lines: the first is normal sequence, and the rest 3 are illegal ones. +Give 1 point each for the 3 illegal lines diagnosed appropriately. +Give no point to a preprocessor which issues off-target message at the normal case. +Also, refer to the explanation of m.34.

+

Note:

+
+*1 C90 5.2.1.2 Multibyte characters
+   C99 5.2.1.2 Multibyte characters
+
+ +

u.1.8. Logical lines ending in the middle of a character constant

+

The character constant pp-token must complete on that logical line. If there is a ' without corresponding ' on a logical line, it is undefined. *1

+

An optional message can be written on the #error line. However, it must be arranged in the pp-token sequence and a single apostrophe is not allowed. In this sample, the part intended for a comment is eaten by searching the ' which should be at the end of the character constant.

+

Note:

+
+*1 C90 6.1 Lexical elements -- Semantics
+   C99 6.4 Lexical elements -- Semantics
+
+ +

u.1.9. Logical lines ending in the middle of a string literal

+

String literals must complete on that logical line. A single " is undefined. *1

+

String literals extending over lines seem to have been accepted in many UNIX compiler systems. Source files expecting it can still be seen sometimes.

+

Note:

+
+*1 C90 6.1 Lexical elements -- Semantics
+   C99 6.4 Lexical elements -- Semantics
+
+ +

u.1.10. Logical lines ending in the middle of a header name

+

Incomplete header-names on the #include logical line is also undefined. *1

+

Note:

+
+*1 C90 6.8.2 Source file inclusion -- Semantics
+   C99 6.10.2 Source file inclusion -- Semantics
+
+ +

u.1.11. ', ", /*, or \ in a header name

+

', /*, or \ in the header-name pp-token is undefined. The case " exists in the header-name enclosed by < and > is also the same (error since " becomes the end of the pp-token from the beginning in the header-name of a string literal format.) *1

+

These, except for \, are all confusable with a character constants, string literal, or comment and can be interpreted either way.

+

\ is mistakable with an escape sequence. Though a header-name has no escape sequence, this is not determined as a header-name until phase 4 after tokenization in translation phase 3. Therefore, implementations suffer from identifying this case. Though escape sequences are processed in phase 6, it is necessary to recognize an escape sequence since \" is interpreted as an escape sequence rather than the end of a string literal in phase 3.

+

However, \ is a Standard path-delimiter in the OS such as DOS/Windows and implementations on those OS certainly handle this as a valid character (except for the case that the last character is \ in the header-name of a string literal format.) Many cases causing an undefined behavior are erroneous programs, but not always so. It is not recommended to write \ where / is adequate. Implementations should issue a warning. On other OS's, it will be an error when opening files; no diagnosis is necessary in preprocessing tokenization.

+

Note:

+
+*1 C90 6.1.7 Header names -- Semantics
+   C99 6.4.7 Header names -- Semantics
+
+ +

u.1.12. #include argument is not a header name

+

It is undefined if the argument on the #include line is not a header-name. In other words, this is the case where an argument is not in the string literal format or not enclosed by < and >, or no macro which is expanded into either of these exists. *1

+

Note:

+
+*1 C90 6.8.2 Source file inclusion -- Semantics
+   C99 6.10.2 Source file inclusion -- Semantics
+
+ +

u.1.13. Extra token in the #include argument

+

The argument on the #include line is one header-name only. Extra pp-token other than that is undefined. *1

+

Note:

+
+*1 C90 6.8.2 Source file inclusion -- Semantics
+   C99 6.10.2 Source file inclusion -- Semantics
+
+ +

u.1.14. Missing line number in the #line argument

+

It is undefined if the argument on the #line has no line number (A file name is optional. A line number must be the first argument.) *1

+

Note:

+

*1 The sources of Standards up to u.1.18 are all same below.

+
+    C90 6.8.4 Line control -- Semantics
+    C99 6.10.4 Line control -- Semantics
+
+ +

u.1.15. The #line file name argument is not a string literal

+

The file name which is the second argument of #line must be a string literal.

+

If this is a wide string literal, it is a violation of constraints while the rest of the #line errors are undefined. This specification lacks balance.

+ +

u.1.16. Extra token in the #line arguments

+

Three or more arguments on the #line line cause undefined errors.

+ +

u.1.17. The line number argument for #line is out of [1, 32767] range

+

In C90, the line number argument for #line must be in the range of [1, 32767]. It is undefined otherwise.

+

This sample tests the case where the #line specification is within this range, but the line number of the source exceeds the range afterward. Depending on implementations, the line number may silently wrap. It is appropriate to issue a warning.

+

Scoring: 2. 1 point if 1 or 2 out of 3 samples can be diagnosed.

+ +

u.line. C99: the line number argument for #line is out of range

+

In C99, this range is [1, 2147483647].

+ +

u.1.18. The line number argument for #line is not decimal

+

The line number argument for #line must be a decimal number. Hexadecimal and others are undefined.

+ +

u.1.19. Macro on the #if line expanded into defined

+

The fact that 'defined' is an operator and confusable with an identifier causes various problems. Since it is once tokenized as an identifier in translation phase 3 and recognized as an operator in phase 4 only if this exists on the #if line, defining a macro which is expanded into defined on the #define line is possible. If this macro actually appears on the #if line, it is undefined. There is no guarantee for the result of its expansion to be treated as an operator. *1

+

Defining a macro named defined is itself undefined (refer to u.1.21), however, such an example is not seen in reality. Although, the macro definition which has a token named defined in the replacement list can be seen from time to time. Some compiler systems treat this as legitimate by performing a special process, which is not a logical specification.

+

Scoring: 2. 1 point if only 1 out of 2 samples can be diagnosed.

+

Note:

+
+*1 C90 6.8.1 Conditional inclusion -- Semantics
+   C99 6.10.1 Conditional inclusion -- Semantics
+
+ +

u.1.20. defined, __LINE__, etc. for the #undef argument

+

It is undefined if the #undef argument is defined, __LINE__, __FILE__, __DATE__, __TIME__, __STDC__, or __STDC_VERSION__. *1, *2, *3

+

Note:

+
+*1 C90 6.8.8 Predefined macro names
+   C99 6.10.8 Predefined macro names
+
+
+*2 Amendment 1/3.3 Version macro
+
+

*3 __STDC_HOSTED__, __STDC_ISO_10646__, __STDC_IEC_559__, and __STDC_IEC_559_COMPLEX were added in C99.

+ +

u.1.21. defined, __LINE__, etc. for the #define macro name

+

It is undefined if the macro name defined by #define is defined, __LINE__, __FILE__, __DATE__, __TIME__, __STDC__, or __STDC_VERSION__. *1, *2, *3

+

Scoring: 2. 1 point if 2 out of 3 samples are diagnosed.

+

Note:

+
+*1 C90 6.8.8 Predefined macro names
+
+
+*2 Amendment 1/3.3 Version macro
+
+

*3 __STDC_HOSTED__, __STDC_ISO_10646__, __STDC_IEC_559__, and __STDC_IEC_559_COMPLEX were added in C99.

+ +

u.1.22. Invalid pp-token generation by the ## operator

+

The result of pp-token concatenation by the ## operator must be a valid (single) pp-token. It is undefined, otherwise. *1

+

In this sample, the subject matter is the pp-token called a pp-number which was defined as a new specification in Standard C.

+

Note:

+
+*1 C90 6.8.3.3 The ## operator -- Semantics
+   C99 6.10.3.3 The ## operator -- Semantics
+
+ +

u.concat. C99: Invalid pp-token generation by the ## operator

+

The // mark is used for a comment in C99 and C++, but is not a pp-token. The result of generating this sequence with the ## operator is undefined.
+A comment is converted into a space before a macro is defined or prior to expansion, thus it is not possible for a macro to generate a comment.

+ +

u.1.23. Invalid pp-token generation by the # operator

+

The result of pp-token concatenation by the # operator must be a valid (single) string literal. It is undefined otherwise. *1

+

This problem rarely occurs. As you can see in this sample, it is limited to odd cases where \ is outside of a literal and even more special cases. This sample shall be diagnosed in the compilation phase rather than preprocessing and that is enough. However, implementations should not crash or silently ignore the problem.

+

Note:

+
+*1 C90 6.8.3.2 The # operator -- Semantics
+   C99 6.10.3.2 The # operator -- Semantics
+
+ +

u.1.24. Empty argument in a macro call

+

Having an empty argument in a function-like macro call is undefined in C90. *1

+

Performing reasonable macro expansion by interpreting an empty argument as 0 pieces of token is very possible. *2

+

This is an example where implementations can give the undefined specification a meaningful definition. Such implementations, however, also have no portability in pre-C99 at least. It will be appropriate to issue a warning.

+

Scoring: 2. 1 point if 3 of 4 out of 5 samples are diagnosed.

+

Note:

+
+*1 C90 6.8.3 Macro replacement -- Semantics
+
+*2 C99 6.10.3 Macro replacement -- Semantics
+
+ +

u.1.25. Argument similar to the control line in a macro call

+

A function-like macro call can extend over multiple logical lines. Therefore, there may be a line confusable with a preprocessing directive in an argument; the result is undefined. *1

+

This type of "argument" will be interpreted as a preprocessing directive if it is in the #if group to be skipped.

+

Note:

+
+*1 C90 6.8.3 Macro replacement -- Semantics
+   C99 6.10.3 Macro replacement -- Semantics
+
+ +

u.1.26. Macro expansion ending with a function-like macro name

+

In C90, the macro expansion result ending with a function-like macro name is considered to be undefined. This is an interpretation added later, but not clear in meaning. Please refer to 2.7.6. *1

+

This was included as a test in this Validation Suite up to V.1.2, but omitted from V.1.3.

+

Note:

+

*1 ISO/IEC 9899:1990 / Corrigendum 1

+

This specification was removed in C99 and a complicated specification was added.

+ +

u.1.27. Invalid directives

+

In case the first pp-token on a line is # and there is another pp-token after that, what follows # must be a preprocessing directive usually. The line of # only is accepted for some reason. *1

+

However, # at the beginning of a line or followed by an invalid directive or other pp-token are not violations of syntax or constraint for preprocessing. As you can see in u.1.25, that is because all lines starting with # do not have to be preprocessing directive lines. Which one is a preprocessing directive line depends on the context.

+

Standards do not specify this as undefined, however, it is in a way undefined in the sense that "it is not defined as a specification." It is desirable for an implementation to issue some sort of diagnostic message. However, this does not necessarily have to be diagnosed by preprocessing. If preprocessing outputs this line as is, it will be an error in the compilation phase. That is acceptable as well. There is no danger as long as preprocessing avoids the case where it interprets silently #ifdefined as #if defined.

+

In C99, something not clear in the meaning called # non-directive was added. However, its content is not defined and I can say it is undefined, practically speaking. *2

+

Note:

+
+*1 C90 6.8 Preprocessing directives -- Syntax
+
+*2 C99 6.10 Preprocessing directives -- Syntax
+
+ +

u.1.28. Directive name not macro-expanded

+

In order for the line starting with # to be a preprocessing directive, only a directive name is allowed as the next pp-token. Directive names are never macro-expanded.

+

In the case where an identifier which is not a directive name comes after # and it is a macro name, there are 2 processing steps; diagnosing it as a missing directive and considering it as usual text to expand a macro for an output. Even the latter needs some sort of diagnosis. Since the latter should cause an error in the compilation phase, that is acceptable as well. Only processing what is macro-expanded as a "correct" preprocessing directive should not happen.

+ +

u.2.1. Undefined character escape sequence in the #if expression

+

Character escape sequences in a string literal or character constant support only \', \", \?, \\, \a, \b, \f, \n, \r, \t, and \v as a specification. Other character sequences starting with \ are undefined. Especially, sequences with \ followed by a lowercase are reserved for future use. *1

+

Many of these diagnoses are handled by the compilation phase, however, only preprocessing diagnoses the case where these exist in a character constant for the #if expression.

+

Note:

+
+*1 C90 6.1.3.4 Character constants -- Description
+   C99 6.4.4.4 Character constants -- Description
+   C90 6.9.2 Character escape sequences
+   C99 6.11.4 Character escape sequences
+
+

In C99, UCN (universal-character-name) escape sequences in the \uxxxx or \Uxxxxxxxx format were added.

+ +

u.2.2. Bit shift operation with invalid shift count in the #if expression

+

In a bit shift operation for a integer type, the case that the right operand (shift count) is a negative value or greater than or equal to the width of the left operand type is undefined. *1

+

If this is in the #if expression, it should be diagnosed by preprocessing.

+

Note:

+
+*1 C90 6.3.7 Bitwise shift operators -- Semantics
+   C99 6.5.7 Bitwise shift operators -- Semantics
+
+
+ +

4.3. Unspecified Behavior

+

In Standard C, there is a specification called unspecified. This is for valid programs without a processing method unspecified and whose processing method is not necessarily documented by the implementation.

+

There are not many examples for this. Only extremely special cases have different results according to the processing method. However, it is desirable to issue a warning even if it is a special case.

+

The result of a program depending on unspecified behavior is undefined.

+

It is unspecified in preprocessing and the ones which have different results according to processing methods are the following. In these 2 tests, 2 points are given for each, whether an invalid pp-token is generated and a diagnostic message is issued or whether a warning for no portability is issued. In case of the latter, it can be at macro definition or expansion.

+

Additionally, evaluation order within an #if expression is unspecified. This is not included in testing since the #if expression result does not change because of this.

+ +

s.1.1. Unspecified evaluation order of the # and ## operators

+

In case both the # and ## operators are in one macro definition, which is evaluated first is not specified. *1

+

This sample is the example of different results depending on which of # and ## is evaluated first. Furthermore, if ## is evaluated first, # is treated as a pp-token rather than an operator, causing the concatenation result to generate an invalid pp-token. As this type of macro does not have portability, it is preferable for an implementation to issue a warning.

+

Scoring: 2.

+

Note:

+
+*1 C90 6.8.3.2 The # operator -- Semantics
+   C99 6.10.3.2 The # operator -- Semantics
+
+ +

s.1.2. Unspecified evaluation order for multiple ## operators

+

In case there are multiple ## operators in one macro definition, the evaluation order is not specified. *1

+

In this sample, an invalid pp-token is generated on the way of evaluation depending on the evaluation order. As this type of macro does not have portability, it is preferable for an implementation to issue a warning.

+

Scoring: 2.

+

Note:

+
+*1 C90 6.8.3.3  The ## operator -- Semantics
+   C99 6.10.3.3 The ## operator -- Semantics
+
+
+ +

4.4. Other Cases Where a Warning is Preferable

+

Other than undefined and unspecified, there are cases for which it is preferable for implementations to issue a warning. Those are below.

+

The w.1.* and w.2.* are totally valid programs as far as Standards are concerned, however, they have probably some sort of errors and diagnosis is important. w.1.* are preprocessing specific problems and w.2.* are #if expression versions of the problems common with operations in the compilation phase.

+

The w.3.* concern a specification with implementation-defined aspects of translation limits. Implementing the translation limits beyond the minimum value guaranteed by a Standard can be said to improve the quality of the implementation. On the other hand, programs depending on it will have the problem of limited portability. Therefore, it is preferable for an implementation which implements translation limits beyond the minimum value to issue warnings.

+

In tests below, it is a pass if an appropriate diagnostic message is issued. w.3.* allow an error when the translation limits of an implementation match the minimum value of the Standard. It is a failure if an error occurs without meeting the minimum value (whether meeting the minimum value is determined in n.37.*.)

+ +

w.1.1. /* inside a comment

+

There are many nested comments and typos in source missing a comment mark. Among those, nested comments, /* /* */ */, and a comment with only */ always cause an error in the compilation phase since the */ sequence does not exist in the C language. However, when */ is missing, it may not cause an error since the part up to the end of the next comment is interpreted as a comment. This is a dangerous mistake and it is important for preprocessing to issue a warning. Even if the case some sort of error occurs in the compilation phase, the cause is no longer clear at that time.

+

Scoring: 4.

+ +

w.1.2. Inclusion of a subsequent token sequence by macro rescan

+

The case of the inclusion of a token sequence after a replacement list at macro rescan is an unwritten specification in K&R 1st and the official Standard C. However, this situation is brought about only by an unusual macro. Especially, the one where the replacement list comprises the first half part of another function-like macro call is an extremely unusual macro. In reality, the possibility of an error in a macro definition is large, it is preferable for the implementations to issue a warning. I sometimes see an object-like macro expanded into a function-like macro name though such writing style causes bad readability.

+

This is a problem of Standard. I think that incomplete rescan in a replacement list should be specified as an error (violation of constraints) (refer to 2.7.6.)

+

Scoring: 4. 1 point if only 1 out of 2 samples can be diagnosed.

+ +

w.2.1. Negative value converted into an unsigned number by the usual arithmetic conversion in the #if expression

+

In the mixed mode operation of signed and unsigned integers, "usual arithmetic conversion" is performed and signed numbers are converted into unsigned numbers. In case the original signed integer is positive, the value does not change. However, if it is negative, it is converted into a large positive number. This is not an error, but not normal and there is a possibility of an error. It is preferable to issue a warning. In preprocessing, this phenomenon is seen in the #if expression.

+

Scoring: 2.

+ +

w.2.2. Unsigned operation in the #if expression wraps round

+

In the case the result of an unsigned operation is out of the range, it may not be an error since it is supposed to be wrapped round. Since there is a possibility of an error, it is preferable to issue a warning.

+

Scoring: 1.

+ +

w.3.1. Identifier of 32 bytes or longer, 32 or more macro parameters, 32 or more macro arguments

+

w.3.1, w.3.2, w.3.3, w.3.4, and w.3.5 are all tests regarding the translation limits in C90. The contents are clear by themselves and no explanation is necessary. Compare these with n.37.*.

+

Scoring: 3. 1 point each for each of 3 items.

+ +

w.3.2. 9 or more levels of #if (#ifdef, #ifndef) nesting

+

Scoring: 1.

+ +

w.3.3. 9 or more levels of #include nesting

+

Scoring: 1.

+ +

w.3.4. 33 or more sub-expression nesting in the #if expressions

+

Scoring: 1.

+ +

w.3.5. 510 bytes or longer string literals

+

Scoring: 1.

+ +

w.3.6. 510 bytes or longer logical lines

+

Scoring: 1.

+ +

w.3.7. 1025 or more macro definitions

+

Only this is same as n.37.8. This is the most approximate one in the specification for translation limits. Whether built-in macros should be counted in 1024 macros and whether the macros defined in standard headers should be counted vary the number. The macro tested in this sample is the 1024th in header files, but there are some macros defined prior in warns.t and warns.c. In any case, this macro exceeds the 1024th. Implementations are expected to issue warnings at appropriate places.

+

Scoring: 1.

+ +

w.tlimit. C99 translation limits

+

In C99, translation limits were largely extended. It is preferable even for the implementation with the specification exceeding this to issue a warning for the source exceeding the specification for the portability.

+

Scoring: 9. 1 point each for the following 9 items.

+

Test samples are in the test-l directory. l_37_8.c is pseudo source which can be preprocessed, but not compiled.

+ +

w.3.1.L. 128 or more macro parameters

+ +

w.3.2.L. 128 or more macro arguments

+ +

w.3.3.L. 64 bytes or longer identifier

+ +

w.3.4.L. 64 or more levels of #if (#ifdef, #ifndef) nesting

+ +

w.3.5.L. 16 or more levels of #include nesting

+ +

w.3.6.L. 64 or more levels of sub-expression nesting in the #if expressions

+ +

w.3.7.L. 4096 bytes or longer string literals

+ +

w.3.8.L. 4096 bytes or longer logical lines

+ +

w.3.9.L. 4096 or more macro definitions

+
+ +

4.5. Other Quality Matters

+

Below is the items concerning the quality such as implementation's ease of use. Cases other than q.1.1 cannot be tested by sample programs.

+

q.1.* are regarding behaviors.
+q.2.* are regarding options and extended functionalities.
+q.3.* are regarding the runnable systems and the efficiency on them.
+q.4.* are regarding documents.

+

Among these, some cannot help relying on rather subjective evaluation. Others can be evaluated objectively, but the measure may not be specified clearly. Refer to 6.2 to score them appropriately.

+ +

4.5.1. Qualities regarding Behaviors

+ +

q.1.1. Translation limits above the specification

+

Concerning translation limits, the minimum specification is defined leniently in Standards. However, the actual implementations should have the specification above this. Especially, the requirement of nesting levels of #if and #include are too low in C90.

+

In C99, translation limits were largely raised. Also, restricting identifier length to less than 255 bytes is described as an obsolescent feature.

+

In the q.* items, only these are prepared as test samples. l_37_?.t and l_37_?.c in the test-l directory each test the translation limits as below. These exceed the C99 specification (however, the translation limit values in the C++ Standard guideline are higher than these.)

+
+ + + + + + + + + + +
37.1LNumber of parameters in a macro definition 255
37.2LNumber of arguments in a macro call 255
37.3LLength of an identifier 255 bytes
37.4LNesting level for #if 255
37.5LNesting level for #include 127
37.6LNesting level for sub-expressions in the #if expressions255
37.7LLength of a string literal 8191 bytes
37.8LLength of a logical line in source 16383 bytes
37.9LNumber of macro definitions 8191
+
+

l_37_8.c does not become an execution program even if it is compiled. Only preprocessing is necessary, however, make an object file by doing cc -c l_37_8.c to compile. If preprocessing is successful, you can find out how long line the compiler proper can accept.

+

Scoring: 9. 1 point for each of 9 kinds of samples. Compiler proper testing is not included.

+ +

q.1.2. Accuracy of diagnostic messages

+

Though a diagnostic message is issued, it can be difficult to understand, too vague, or not obvious about the point of the problem. Some diagnostic messages are detailed while others may lack focus. A diagnostic message should not be simply "syntax error", but should show the reason for the error. The implementation should indicate the line and point out the token of the problem.

+

The error message of a mismatched #if section is desired to indicate the corresponding line. Otherwise, it is not possible to detect where the error resides.

+

Duplicate diagnostic messages for the same error are not desirable.

+

Scoring: 10.

+ +

q.1.3. Accuracy of line number display

+

It is not acceptable for the line number that a preprocessor passes to the compiler proper to be mismatched. This appears in a diagnostic message, however, it is treated as a separate item as a matter of convenience. This scoring is done whether line numbers are accurately displayed in the sample programs thus far. There are preprocessors that do not output the line number information. These are out of the question.

+

Scoring: 4.

+ +

q.1.4. Runaway or abort

+

Scoring: 20. Deduct points as below for implementations which runaway or abort in any of the samples in this Validation Suite. A "runaway" means that the program must be aborted by ^C, must be reset, or leaves a discrepancy in the file system. An "abort" means that the damage is not done though the program ends prematurely.

+
    +
  1. 0 point for a runaway in n_std.c (strictly conforming program.)
    +
    +
  2. 10 points (testing the part after where aborted causes another runaway, classify it as a "runway") if a processed is aborted in n_std.c.
    +
    +
  3. 10 points for a runaway in any of other samples.
    +
+ +

4.5.2. Options and extended functionalities

+ +

q.2.1. Specifying the include directory

+

The so-called include directory where standard header files are located is fixed to one location in the most simple case. However, it is often the case that multiples exist and there are cases that users have to specify one. About user level header files, there is no problem in case those are in the current directory, however, the directory search rule is different depending on the implementation in case they are in another directory and they include another header file. In any case, it is inconvenient if the include directory cannot be specified by users explicitly by using options and environment variables (many implementations use -I option.) In addition, the option to exclude specified directories in the system is necessary in the case of searching multiple directories in sequence. The option to change the search rule itself justifies its existence.

+

Scoring: 4.

+ +

q.2.2. Macro definition option

+

It is valuable to have the option that allows an object-like macro to be defined at compilation rather than in source (many implementations use the -D option.) This makes it possible for the same source to generate objects of different specifications or to be compiled in different systems. In case of omitting a replacement list, there are some implementations defining 1 and others defining 0 piece of token, requiring a user to check documentation.

+

Some implementations have options to define the macro with arguments.

+

Scoring: 4.

+ +

q.2.3. Macro cancellation option

+

There should be an option to cancel implementation-specific built-in macros. There are the following types.

+
    +
  1. 2. The -U option which undefines a macro.
    +
  2. 3. The option that removes implementation-specific built-in macros all at once.
    +
  3. 4. The option that removes built-in macros prohibited in Standard C only ('unix' and others which do not start with _) all at once.
    +
+

Scoring: 2. 2 points with 1 or 2 option. 3 is not applicable as it is evaluated in d.1.5.

+ +

q.2.4. Trigraphs option

+

Though trigraphs are always used in the environment that needs them, they are hardly used in most environments since they are not needed. This should be enabled or disabled by an option at compilation.

+

Scoring: 2.

+ +

q.2.5. Digraphs options

+

Similarly, digraphs also should be enabled or disabled by an option at compilation.

+

Scoring: 2.

+ +

q.2.6. Warning specifying option

+

It will be more helpful to have warnings other than violations of syntax rules or constraints issued as much as possible, however, they can be annoying sometimes. The option to specify a warning level or one to enable or disable warnings by type is needed.

+

Scoring: 4.

+ +

q.2.7. Other options

+

There are other helpful options in preprocessing. Having too many options makes things complicated, however, there are some that are convenient. The option not to output the line number information (-P in most cases) is relatively common and it seems to be used for the purposes other than C language. There are some which output without deleting comments. Depending on command processors of OS, there are cases where implementations need to implement redirection of diagnostic messages. In addition, so-called one-pass compilers in which preprocessing is not an independent program should have an option to specify the output after preprocessing.

+

The option to identify C90 (C95), C99, and C++ is obviously necessary. Furthermore, the option to achieve the compatibility between C99 and C++ (making C++ preprocessing closer to C99's) is helpful.

+

There is an option to output source file dependency relations in order to generate a Makefile.

+

Scoring: 10.

+ +

q.2.8. Extension by #pragma

+

In Standard C, implementation specific directives are all implemented as sub-directives of #pragma. Preprocessing usually passes #pragma to a compiler as is and processes some of #pragma on its own. There are not many examples of the #pragma that preprocessing processes.

+

The header file with #pragma once written may be read only once even if #include to it is applied many times. This not only prevents multiple inclusion, but also is effective in improving processing speed. In case the whole header file is included without using #pragma once, for example, by

+
+#ifndef __STDIO_H
+#define __STDIO_H
+..
+#endif
+
+

some implementations automatically do not access this for a second time.

+

In mcpp, there is a #pragma directive which makes many header files combined as one file as a "pre-preprocess." In other words, this is the functionality to preprocess the header included by #include to output and add the #define directives which appeared there to the combined output. Including this is enough in compiling the original source. This way, the size of the header file gets smaller since comments, #if, and macro calls disappear. There is only one file to access. As a result, preprocessing speed is faster.

+

Some implementations are equipped with a header pre-compilation feature. This seems to have been introduced to process huge header files in C++, however, there is a tendency that the size of pre-compiled header gets larger than the total of original header files. The speed improvement cannot be seen very much in C, at least. The content of the pre-compiled header depends on the internal specification of compiler-proper. And the fact that it becomes a black box, which a user cannot see, is also a drawback.

+

In any case, above are all intended to speed up preprocessing and nothing else. Therefore, these features are not evaluated here, but rather in q.3.1.

+

Some implementations have #pragma which specifies the encoding of multi-byte characters. It is complete as a method of passing along the encoding of source files to a preprocessor or compiler.

+

mcpp also has #pragma which traces preprocessing and outputs debug information. As no debugging can be performed for preprocessing using a regular debugger, this is an important feature that can be done only in a preprocessor. This feature is easier to use since debug points can be restricted by using #pragma rather than specifying an option.

+

Some implementations implement what is normally specified as an option at compilation by #pragma such as error and warning control specification. While #pragma has merits of no portability issues in as far as Standard C compliant implementations are concerned and of being able to specify the location on source, it has the demerit that the source files have to be rewritten when making changes to it. If this were to be implemented, it should be done so in addition to the implementation of the compilation option.

+

There are not very many other #pragma which are processed in preprocessing.

+

By the way, #pragma sub-directives are implementation-defined and have a possibility of name collision between implementations. Some device to avoid name collision is desirable. GCC 3 uses the name GCC as '#pragma GCC poison'. This is a good idea. mcpp has adopted this idea as '#pragma MCPP debug' since V.2.5.

+

Scoring: 10.

+ +

q.2.9. Extended functionalities

+

Although extended functionalities should be implemented as #pragma sub-directives, some preprocessors implement directives other than #pragma as proposals of new preprocessing specifications.

+

In Linux system headers, GCC / #include_next directive is used. Using of this directive means, however, organization of the system headers are unnecessarily complicated, and is not praiseworthy. GCC implements also non-Standard directives such as #warning, #assert, etc. whose needs are not high.

+

GCC / cc1 has a "traditional" mode option other than the standard behavioral mode. mcpp has options for various behavioral specifications. Those experiments also have some meanings.

+

Scoring: 6.

+ +

4.5.3. Efficiency and others

+ +

q.3.1. Processing speed

+

Though the accuracy of processing and diagnosis is the most important thing, the faster the speed is, the better.

+

The #pragma and option to improve speed are called out to find out the result of the speed.

+

Scoring: 20. The speed of the program that does nothing but copying input to output is set as 20 points. Comparative scoring is done speed relative to this benchmark. Refer to 6.2 for concrete measurements. Since the absolute speed varies depending on hardware, comparison should be done with same level of hardware. In addition, the speed of processing same program depends on the amount of standard headers to be read. Comparison should be done with mcpp as a point of reference.

+

In order to measure time, the time command (built-in command in bash or tcsh) is used for UNIX systems. On the Windows systems, there is a time command in bash if CygWIN is installed. Also, WindowsNT has a similar command called TimeThis in the "resource kit." On systems where these are not available, compile tool/clock_of.c for use (though it is rather inaccurate.) *1

+

Since preprocessing is usually done in an instant on recent hardware, it is hard to measure the time of preprocessing. +On Windows, the inclusion of Windows.h is a very heavy task, fortunately or unfortunately, and can be used to measure it. +On UNIX-like systems, we have to find some relatively heavy task from glibc sources or such.

+

Note:

+

*1 Some WindowsNT resource kit programs can be used on WindowsXP while others do not. TimeThis seems to be usable.

+ +

q.3.2. Memory usage

+

The smaller the memory usage is, the better it is. This is a serious problem especially where there is a strict limitation in memory usage.

+

As preprocessing is a part of compilation, the memory usage for overall compiler system actually becomes an issue. Since the compiler proper itself eats up more memory usually in case preprocessing is performed by an independent preprocessor, memory usage by a preprocessor shall not be a problem. However, in case there are many macro definitions and such, a preprocessor may consume more memory. Memory usage includes not only the size of a program, but also data area usage.

+

Scoring: 20. +There is no appropriate command to measure memory usage of a program. +On UNIX-like systems, we can roughly know the memory usage of cc1 or mcpp by 'top' command while doing 'make' of some large software such as glibc or firefox. +On Windows, memory usage of a preprocessor can be roughly known by 'task manager' about inclusion of Windows.h.

+ +

q.3.3. Portability

+

The portability of preprocessor source itself becomes an issue when it replaces a resident preprocessor of the compiler system or when it is being updated or customized. The following shall be subject to evaluation.

+
    +
  1. Whether source is open (0 points if not open.)
    +
  2. Whether many compiler systems - OS's are supported.
    +
  3. What is the range of compiler systems - OS's for porting? Under what conditions?
    +
  4. Whether the source is easy to port.
    +
  5. Whether porting documents are provided.
    +
+

Scoring: 20. I only read one and a half source. I just took a glance at the rest. So, this scoring is just a guess.

+ +

4.5.4. Quality of Documents

+ +

q.4.1. Quality of documents

+

In d.*, we saw only whether there are documents regarding "implementation-defined items" by Standard C. Here, we will also evaluate the quality of documents.

+

In addition to implementation-defined items, the following are necessary documents at minimum.

+
    +
  1. Difference with Standard C.
    +
  2. Option specifications.
    +
  3. Meaning of diagnostic messages.
    +
+

In addition, having the description of the overall preprocessing specification including the Standard C would be of course much better.

+

Accuracy, readability, searchability, easiness of viewing and others become subjects for evaluation. The document for porting is included in the q.3.3 evaluation.

+

Scoring: 10.

+
+ +

4.6. C++ Preprocessing

+

Nowadays, in most compiler systems C and C++ are provided together. In that case, the same preprocessor seems to be used in both C and C++. Since preprocessing is almost the same in both, it is not necessary to prepare separate preprocessors for each. However, it is not exactly the same in both.

+

If you compare C++ Standard with C90, the C++ preprocessing is the C90 preprocessing plus the specifications below.

+
    +
  1. A character not included in the basic source character set is converted into a Unicode hexadecimal sequence in the \Uxxxxxxxx format in translation phase 1. And, this is converted again into an execution character set in the translation phase 5. *1
    +
    +
  2. // to the end of the line is a comment. *2
    +
    +
  3. Each of ::, .*, and ->* is treated as one pp-token. *3
    +
    +
  4. In the #if expression, 'true' and 'false' are evaluated as 1 and 0 respectively as a boolean literal. *4
    +
    +
  5. 11 kinds of identifier-like operators defined as a macro in the <iso646.h> standard header in ISO C : Amendment 1 (1995) are all tokens, not macros in C++ (pointless specification.)(*3) Similarly, 'new' and 'delete' are also operators. *5
    +
    +
  6. The __cplusplus macro is predefined in 199711L. *6
    +
    +
  7. Whether __STDC__ is defined and how it should be defined if so are implementation-defined (On the contrary, it is undefined in C99 if __cplusplus is defined.) *6
    +
    +
  8. Translation limits are extended to a large extent as below. However, these are just guidelines, not requirements. Implementations must explicitly document translation limits. *7
    +
    + + + + + + + + + +
    Length of a source logical line 65536 bytes
    Length of a string literal, a character constant, and a header name65536 bytes
    Length of an identifier 1024 characters
    #include nesting 256 levels
    #if, #ifdef, and #ifndef nesting 256 levels
    #if expression parentheses nesting 256 levels
    Number of macro parameters 256
    Number of definable macros 65536
    +
    +
  9. The restriction (by Standards) in the length prior to '.' in a header name no longer exists. *8
    +
+

In C99, only the second of these are the same and the others are different. In C99, there occurred new differences due to additions such as p+ and P+ sequences in floating point numbers, official multi-byte character support in identifiers, variable macros, legitimization of empty arguments, macro expansion for the argument on the #pragma line, _Pragma() operator, #if expression evaluation in long long and wider, concatenation of a neighboring wide-character-string-literal and a character-string-literal as a wide-character-string-literal and others. UCN became a specification only in translation phase 5 in C99. The constraint on UCN is also slightly different. Though translation limits were also largely extended in C99 compared with C90, it was not as extreme as C++ Standard and there are differences here, too.

+

These may not seem to be too many differences but enough not to use the same preprocessing in C and C++. In addition, in C, C90 (C95) and C99 cannot use the same preprocessing.

+

Besides, predefining __STDC__ in C++ is a cause of trouble and not desirable.

+

Although some implementations define __cplusplus using the -D option, it is inappropriate, as it becomes one of the user-defined macros.

+

Although whether each of ::, .*, and ->* should be treated as one token is hardly an issue in preprocessing, handling it correctly is always the best.

+

Therefore, in order to share a preprocessor among C90 (C95), C99, and C++, a decent implementation seems to use a runtime option and change processing to accommodate differences above.

+

Please note that mcpp does not support the following two points among the specifications above since implementing them is too much burden for the value. I believe what I have is almost enough in practice.

+
    +
  1. The conversion to UCN in translation phase 1 is not implemented. The C++ Standard states that UCN conversion does not necessarily have to be performed as long as the same outcome is obtained. Apart from the practical use, however, no same outcome would be obtained without conversions, strictly speaking. You can see this if you think about the character constant comparison between UCNs and multi-byte characters in the #if expression. In the stringizing by the # operator also, a problem occurs in a narrow sense. *9
    +
    +
  2. Only up to 255 parameters at maximum for a macro.
    +
+

The conformance tests for C++ specific preprocessing specifications added to C90 preprocessing specifications are shown below.

+

In the implementations which do not recognize file names as C++ source unless they are in the format of *.cc, copy files to *.cc to test.

+

Samples more than what are in the test-l directory are not provided for translation limits. In C++, translation limits are only guidelines, so they are not subjects for scoring here. In addition, the length of header names will not be tested since it is OS dependent.

+

Note:

+
+*1 C++ 2.1 Phases of translation
+
+*2 C++ 2.7 Comments
+
+*3 C++ 2.12 Operators and punctuators
+
+*4 C++ 2.13.5 Boolean literals
+
+

In C99, bool, true, false, and __bool_true_false_are_defined are defined in <stdbool.h> as _Bool, 1, 0, and 1 respectively as a macro.

+
+*5 C++ 2.5 Alternative tokens
+
+*6 C++ 16.8 Predefined macro names
+
+*7 C++ Annex B Implementation quantities
+
+*8 C++ 16.2 Source file inclusion
+
+

In C90 6.8.2. only up to 6 characters to the left starting with '.' in a header name were guaranteed. 8 characters in C99 6.10.2. This restriction was removed in C++.

+

*9 In C99, whether extra \ is inserted when UCN is stringized by the # operator is implementation-defined. C++ does not have this specification.

+

If extra \ is added, the UCN no longer goes back to a multi-byte character. Therefore, it is a better implementation without an extra \. However, not having the extra \ is an "wrong" implementation in the C++ specification.

+ +

4.5.n.ucn1. UCN recognition

+

Scoring: 4.

+ +

4.5.n.cnvucn. Conversion from a multi-byte character to UCN

+

Scoring: 2.

+ +

4.5.n.dslcom. // Comments

+

Scoring: 4.

+ +

4.5.n.bool. 'true' and 'false' are boolean literals

+

Scoring: 2.

+ +

4.5.n.token1. ::, .*, and ->* are tokens

+

Scoring: 2. Even if the test appears successful, it is invalid if token concatenation "succeeds" without any warning when processing it in C as well.

+ +

4.5.n.token2. Alternative token for operators

+

Scoring: 2.

+ +

4.5.n.cplus. __cplusplus predefined macro

+

Scoring: 4. 1 point for __cplusplus < 199711L.

+ +

4.5.u.cplus. #define, #undef __cplusplus

+

Scoring: 1. 1 point if a diagnostic message such as a warning is issued.

+ +

4.5.d.tlimit. Documents on the translation limits

+

Scoring: 2.

+
+ +

5. Issues Around C Preprocessing

+

Below are issues faced when a preprocessor is actually used other than those of C preprocessor Standard conformance level and quality.

+
+ +

5.1. Standard Header Files

+

Samples in this Validation Suite include some standard headers. Without those headers correctly written, testing a preprocessor itself cannot be performed accurately.

+

The followings are prone to problems in practice in the standard header implementation.

+ +

5.1.1. General Rules

+

The standard headers must not only include all function declarations, type definitions, and macro definitions, but also meet the conditions below.

+
    +
  1. The identifier not specified by the Standard nor reserved must not be declared nor defined. The range declarable is determined for each standard header (range may be duplicate or shared between more than one standard header.) *1
    +
    +
  2. Therefore, it is usually not acceptable for one standard header to include another one.
    +
    +
  3. No matter in which order multiple standard headers are included, the results must be the same. *2
    +
    +
  4. No matter how many times the same standard header is included, the result must be the same for other than <assert.h>. *2
    +
    +
  5. Everything defined as an object-like macro which is expanded into an integer constant must be the #if expression. *3
    +
+

The range of the identifier reserved is specified by the Standard and other identifiers must be open to users. Since names starting with one or two '_' are reserved for some sort of usage, they can be used in standard headers by implementations (On the other hand, they must not be defined by users.)

+

This is a little constrained specification. No traditional names outside of Standards can be used in Standard C unless they are changed to the names starting with '_'. In POSIX which became a starting point for libraries and standard headers in Standard C, names outside of Standard C are also enclosed by:

+
+#ifdef  _POSIX_SOURCE
+    ...
+#endif
+
+

At least when this part is used, implementations are no longer Standard C.

+

Also, even if function names such as open(), creat(), close(), read(), write(), and lseek() do not appear in standard headers, implementing functions such as fopen(), fclose(), fread(), fgets(), fgetc(), fwrite(), fputs(), fputc(), fseek() etc. by using open() etc. violates user's name space indirectly. Therefore, dividing open() etc. in _POSIX_SOURCE or separating them in separate headers such as <unistd.h> on the surface is meaningless.

+

This type of "system call functions" should be changed to the names starting with '_' or ones that are essential in reality should be included in Standard C.

+

Although 2 is not clearly described in a specification, a standard header including another standard header usually results in the declaration of the name which the standard header cannot declare which is caught by 1. Each header including <stddef.h> is against the rule. To avoid this, non-standard header of a different name called <sys/_defs.h> or so can be provided and included by a standard header (also <stddef.h> itself.) And, names used there should all start with '_'. *4, *5

+

3 will not become an issue in reality.

+

4 had problems in old implementations but is complied by most current implementations.

+

The method of enclosing the whole standard header as below is common.

+
+#ifndef _STDIO_H
+#define _STDIO_H
+...
+#endif
+
+

In addition, there is a method of using extended directive such as #pragma once.

+

What becomes an issue in 5 is there are implementations where macros using sizeof or cast are written in standard headers. In Standard C, sizeof and cast are not allowed in the #if expression. Since sizeof and cast are available in the #if expression as well in the implementations actually using sizeof or cast in standard headers (Borland C 5.5), they must consider this as an extended specification.

+

As long as a user does not use sizeof and cast in the #if expression in his/her program, no portability problem or no other problems will arise. However, this preprocessing implementation is not an "extension" of Standard C, but rather a "deviation." That is because #if is processed in translation phase 4 in Standard C and no keyword exists in this phase. Keywords are recognized in phase 7 for the first time. In phase 4, names same as keywords are all treated as simple identifiers and identifiers not defined as macros are all evaluated as 0 on the #if line. So, sizeof (int) becomes 0 (0) and (int)0x8000 becomes (0)0x8000, causing a violation of syntax rule. Implementations must issue a diagnostic message for this. Not issuing a diagnostic message is not an "extension" but rather a "deviation" from Standard C. Recognizing only a part of keywords in phase 4 is a bit of a stretch as preprocessing logical configuration and confuses the meaning as "pre"-process phase in the compilation phase (translation phase 7.) *6

+

Note:

+
+*1 C90 7.1.3 Reserved identifiers
+   C99 7.1.3 Reserved identifiers
+
+
+*2 C90 7.1.2 standard headers
+   C99 7.1.2 standard headers
+
+
+*3 C90 7.1.7 Use of library functions
+   C99 7.1.4 Use of library functions
+
+

*4 This method is used in the book below. This book has many points which serve as useful references to the implementation of compiler systems especially.

+
+

P. J. Plauger "The Standard C Library", 1992, Prentice Hall

+
+

*5 In the GNU glibc system, other standard headers such as <stddef.h> are read in by a standard header itself multiple times. However, what is defined at that time seems to be only the name in the range reserved. Although this is not against Standards, it is not a good method as it loses the readability of standard headers and it makes the maintenance difficult. It is better to use the file such as <sys/_defs.h>.

+

*6 Refer to 2.3 and 3.4.14.

+ +

5.1.2. <assert.h>

+

Next, we will look at each standard header. From what I see the standard headers attached to some implementations, the ones with most problems seem to be <assert.h> and <limits.h>. Although these 2 are the most easy headers, they tend to have errors in the implementation since they are newly defined as specifications in Standard C. The usage for these 2 is covered a little here.

+

At first, it is <assert.h>. *1, *2

+

Different from other standard headers, including this file many times is not the same. Depending on the NDEBUG is defined by a user changes the results every time the file is included. In other words, as needed, this header is used as below.

+
+#undef      NDEBUG
+#include    <assert.h>
+    assert( ...);
+
+

And, starting with area where debugging is complete, it becomes below.

+
+#define     NDEBUG
+#include    <assert.h>
+    assert( ...);
+
+

If NDEBUG is defined, assert(...); disappears after macro expansion even if it remains in source (even if ... is the expression with side effects, the side effects do not occur since the expression is not evaluated.)

+

In order for <assert.h> to be used like this, it must not be enclosed by:

+
+#ifndef _ASSERT_H
+#define _ASSERT_H
+    ...
+#endif
+
+

#pragma once must not be written, either.

+

Also, as you can see from this, assert() is a macro and changes its definition. <assert.h> must apply #undef assert and the assert macro must be redefined according to NDEBUG.

+

In the assert(expression) call, when NDEBUG is not defined, nothing happens if the expression is true. If it is false, that is reported in the standard error output. This report displays the expression as is (not expanded even if there is a macro) and also the file name of the source and the line number. This can be easily implemented as long as the # operator and the __FILE__ and __LINE__ macros are correctly implemented.

+

In reality, some of the old implementations do not implement the # operator correctly or do not implement <assert.h> correctly. There are many samples in this Validation Suite which includes <assert.h>, testing the preprocessor itself cannot be correctly performed if <assert.h> is not written correctly. Since it is easy to write <assert.h> correctly, it is better to rewrite the ones that are not right among the files in an implementation. The following is an example from C89 Rationale 4.2.1.1. In this as well, the correct result cannot be obtained if the # operator is not correctly implemented. However, it is a preprocessor problem and cannot be helped.

+
+#undef  assert
+#ifndef NDEBUG
+#   define  assert( ignore)     ((void) 0)
+#else
+extern void __gripe( char *_Expr, char *_File, int _Line);
+#   define  assert( expr)   \\
+    ((expr) ? (void)0 : __gripe( #expr, __FILE__, __LINE__))
+#endif
+
+

The __gripe() function can be written as below (the name, __gripe, can be anything as long as it starts with '_'.)

+
+#include    <stdio.h>
+#include    <stdlib.h>
+
+void    __gripe( char *_Expr, char *_File, int _Line)
+{
+    fprintf( stderr, "Assertion failed: %s, file %s, line %d\n",
+        _Expr, _File, _Line);
+    abort();
+}
+
+

Some implementations write fprintf(), fputs(), or abort() directly in <assert.h> without using __gripe(). That is also acceptable, however, it requires declarations for these functions. The FILE and stderr declarations are also necessary. However, it is quite complicated since <stdio.h> cannot be included. There will be no mistake if a separate function is implemented.

+

This is not so significant, but a duplicate string literal is generated every call in case all are implemented by macros. If implementations do not perform optimization by merging duplicate string literals into one, this is not wise in terms of the code size.

+

Note:

+
+*1 C90 7.2 Diagnostics <assert.h>
+   C99 7.2 Diagnostics <assert.h>
+
+

*2 Starting C99, the assert() macro started displaying from which function a macro was called. The internal identifier, __func__, is defined for this type of purpose.

+ +

5.1.3. <limits.h>

+

This standard header is where macros representing the range of the integer type and others are written. These macros must be written so that their values match specifications and also the following conditions must be met. *1

+
    +
  1. Must be an integer constant expression which can be used in the #if directive.
    +
    +
  2. Must be the expression of the same type as the object of the corresponding type after integer promotion.
    +
+

There are implementations that use cast. We discussed that sizeof and cast in the #if expression are not in the range of Standard C in 5.1. First of all, the meaning that <limits.h> was newly specified is in that a preprocessor does not have to perform query regarding the execution environment such as cast and sizeof.

+

For example, instead of

+
+#if (int)0x8000 < 0
+
+

and

+
+#if sizeof (int) < 4
+
+

the following is used:

+
+#include    <limits.h>
+#define VALMAX  ...
+#if INT_MAX < VALMAX
+
+

In #if, cast and sizeof are not necessary if <limits.h> macros are used.

+

Examples where the <limits.h> macros are wrong in the type can be seen from time to time. Those do not come from the preprocessor specification, but it seems that the person writing <limits.h> forgets 2 above and integer promotion, the usual arithmetic conversion rule, or the evaluation rule for integer constant tokens.

+

For example, there is a definition as below.

+
+#define UCHAR_MAX   255U
+
+

The unsigned char values are all in the int range (if CHAR_BIT is 8) and the data object values in the unsigned char type becomes int by integer promotion. Therefore, UCHAR_MAX also must be evaluated as int. However, it becomes unsigned int in 255U. This must be:

+
+#define UCHAR_MAX   255
+
+

Although either way does not seem to have any issues in practice, it is not necessarily so. Operations including unsigned type cause "usual arithmetic conversion" and force the conversion from signed type to unsigned of the same size. Therefore, the result of value comparison varies.

+

This is easy to see in the following:

+
+assert( -255 < UCHAR_MAX);
+
+

This mistake is related to the circumstance that the integer promotion and usual arithmetic conversion rules were changed in Standard C from the ones adopted in many conventional implementations. The unsigned char, unsigned short, and unsigned long types were not in K&R 1st, but were implemented in many implementations later. In addition, in most of those implementations, unsigned was always converted into unsigned.

+

In the integer promotion in Standard C, however, unsigned char and unsigned short are promoted into int as long as all values stay in the int range and they are promoted into unsigned int otherwise. Also, in the usual arithmetic conversion between unsigned int and long, all values of unsigned int are converted into long if they are in the long range and into unsigned long otherwise. This is called the change from "unsigned preserving rules" to "value preserving rules." The reason for the specification is that this is supposed to be more predictable intuitively. A caution is necessary for this rule in <limits.h>. *2

+

In all examples below, short is 16 bit and long is 32 bit. The value of USHRT_MAX is 65535, but how to write depends on if int is 16 bit or 32 bit.

+
+#define USHRT_MAX   65535U      /* if int is 16 bit   */
+#define USHRT_MAX   65535       /* if int is 32 bit   */
+
+

Since unsigned short is not in the int range if int is 16 bit, it is promoted into unsigned int. Therefore, USHRT_MAX also must be evaluated as unsigned int. In 65535, it is evaluated as long. The suffix, 'U', is necessary. On the other hand, since unsigned short values are all in the int range if int is 32 bit, they are promoted into int. Therefore, USHRT_MAX also must be evaluated as int. 'U' must not be attached. However, there is an example opposite of this.

+
+#define USHRT_MAX   0xFFFF
+
+

In this example, correct evaluation will be performed whether int is 16 bit or 32 bit. In Standard C, octal or hexadecimal integer constant tokens without U, u, L, and l suffix are evaluated in the type which can express the value non-negative in the order of int, unsigned int, long, and unsigned long. In other words, 0xFFFF is evaluated as 65535 of unsigned int if int is 16 bit and 65535 of int if int is 32 bit. On the other hand, decimal integer tokens without a suffix are evaluated in the order of int, long, and unsigned long. 65535 is evaluated as long if int is 16 bit and as int if int is 32 bit. *3

+

C99 added long long/unsigned long long. It also added the _Bool type which has only the 0 or 1 value. Other types of integers became implementable as well. Rules for integer promotion were extended and the integer constant tokens that cannot be expressed as unsigned long are evaluated as long long/unsigned long long.

+

In accordance with the increased integer types and the acceptance of the implementation-defined integer types, the size relations of types became confusing. Therefore, the concept of integer conversion rank was introduced. This concept is a little complex, but there is no need to worry in practice. In standard integer types, the size relations of the rank are as below.

+

long long > long > int > short > char > _Bool

+

Here, the point is that the rank size for the implementations of the same size, for example, long and int which are both 32 bit, are distinguished. *4, *5

+

Note:

+
+*1 C90 5.2.4.2.1 Sizes of integral types <limits.h>
+   C99 5.2.4.2.1 Sizes of integer types <limits.h>
+
+*2 C90 6.2.1 Arithmetic operands
+   C99 6.3.1 Arithmetic operands
+
+*3 C90 6.1.3.2 Integer constants
+   C99 6.4.4.1 Integer constants
+
+*4 C99 6.4.4.1 Integer constants
+
+

*5 C99 added standard headers called <stdint.h> and <inttypes.h> in order to absorb the differences in integer types by implementations. These typedef some type names other than the long and short names since the number of integer types increased due to the arrival of 64 bit systems and the corresponding relations became confusing. However, there are 26 kinds of these type names, 42 kinds of macros representing the maximum and minimum values corresponding to these, 56 kinds of macros converted into the format specifier of corresponding fprintf(), and 56 kinds of macros converted into the format specifier of fscanf() similarly. Although there is no much load on implementations, too much complexity gives the impression of terminal symptoms.

+ +

5.1.3.1. INT_MIN

+

Among all macros in <limits.h>, the most confusing ones are INT_MIN and LONG_MIN in the system with the internal representation of 2's complement. Especially, the INT_MIN in the implementation where int is 16 bit and long is 32 bit shows all the problems above. These are specially covered in separate sections.

+

In this case, it is understood that the range of int is [-32768,32767]. Additionally, there are no problems by having INT_MAX as 32767 or 0x7FFF in any implementation. However, I see an example where INT_MIN is defined as below.

+
+#define INT_MIN     (-32767)
+
+

Why is this type of definition different from the reality?

+

On the other hand, there are no implementations with this type of definition, as might be expected.

+
+#define INT_MIN     (-32768)
+
+

-32768 consists of 2 tokens, - and 32768. And, 32768 is not in the range which can be expressed in int. So, this is evaluated as long. Therefore, -32768 becomes the meaning of - (long) 32768.

+

Some make a definition like this:

+
+#define INT_MIN     ((int)0x8000)
+
+

No comment is repeated for the definition using cast. It is also invalid since 0x8000 only becomes the meaning of (unsigned) 32768.

+

Then, how can the definition be in order to make an evaluation as (int) -32768 without casting?

+
+#define INT_MIN     (-32767-1)
+
+

This is fine. 32767 can be INT_MAX or 0x7FFF. This definition has a subtraction operation, but it is not an issue (unary - is an operator in the first place.) *1, *2

+
+#define INT_MIN     (~INT_MAX)
+#define INT_MIN     (1<<15)
+
+

These are also correct definitions.

+
+#define INT_MIN     (-32767)
+
+

I can imagine that this gave up defining a correct value since the idea of operation did not occur.

+

Then, is the definition of -32767 wrong or correct?

+

The bottom line is that this is wrong.

+

INT_MIN is defined as a macro representing the minimum value of int. If INT_MIN is -32767, what does this mean? And, what is INT_MIN-1 at all? Or, what are ~INT_MAX and 1<<15?

+

Regarding the INT_MIN-1 in this case, there seems to be thought of as the bit pattern representing out of range such as "NaN" in floating point operation.

+

However, compared with the Standard C specification regarding integer type, this interpretation has no basis. First, the result of bit operations on integer types is undefined in case the value of op2 is negative or the number of bit for op1 type and above where op1 << op2 or op1 >> op2, and not undefined, returning all unique values of integer type, otherwise. The result of ~op is int if op is int and the results of op1 & op2, op1 | op2, op1 << op2, and op1 >> op2 are int if both op1 and op2 are int. Therefore, the results of ~INT_MAX and 1<<15 are both int. You may think 1<<15 will overflow, but it is not so. Since the bit operation returns the value corresponding to the bit pattern as result of the bit operation, overflow cannot occur.

+

In C, the integer type operations are defined well in general. There are extremely few undefined areas. Especially, the relationship between a bit pattern and a value corresponds one-on-one completely except when 2 bit patterns exist for 0 in the internal representations of 1's complement and sign+absolute value. This is consistent from K&R 1st to Standard C. C has no way to write a bit pattern itself and "Not-a-Number" can be written only as (-32767-1) etc. This is an int value itself as you can see. C89 Rationale mentions some grounds and made clear there is no room for bit patterns representing an "invalid integer" or "illegal integer" in the integer type. *3, *4

+

In the internal representation of 2's complement, ~INT_MAX is the value of INT_MIN and I must say that the definition bigger than that is wrong.

+

Note:

+

*1 I saw this definition in "The Standard C Library" by P. J. Plauger for the first time. This style of limits.h is getting popular in recent implementations.

+

However, limits.h in this book also contains a mistake. The definitions for the compiler system with 16 bit int and 32 bit long are as below.

+
+    #define UINT_MAX    65535
+    #define USHRT_MAX   65535
+
+

These will evaluate to long. The correct definitions are:

+
+    #define UINT_MAX    65535U
+    #define USHRT_MAX   65535U
+
+

*2 In recent compiler systems, *_MIN is typically defined in the form of (-*_MAX - 1) and there are few mistakes though they are still found occasionally. Vc7/include/limits.h and Vc7/crt/src/include/limits.h in Visual C++ 2003 contains:

+
+#define LLONG_MIN   0x8000000000000000
+
+

0x8000000000000000 evaluates to unsigned long long. Since this type has the highest rank, the result of integer promotion has the same type. It never becomes a negative value. Therefore,

+
+#if LLONG_MAX > LLONG_MIN
+
+

does not turn out as expected.

+

LLONG_MIN in include/limits.h of LCC-Win32 2003-08, 2006-03 is as below.

+
+#define LLONG_MIN   -9223372036854775808LL
+
+

9223372036854775808LL is a violation of constraints as this token value overflows the range of signed long long. If LLONG_MIN is defined as:

+
+#define LLONG_MIN   -9223372036854775808LLU
+
+

9223372036854775808LLU becomes unsigned long long. Using the unary - operator on an unsigned type does not change the result type, however, the result becomes a value which cannot be expressed in unsigned long long and ends up undefined.

+

In Visual C++ 2003 and LCC-Win32, all other *_MIN definitions are (-*_MAX - 1), but why is only LLONG_MIN wrong? If it is defined as below, there will be no problem.

+
+#define LLONG_MIN   (-LLONG_MAX - 1LL)
+
+

In Visual C++ 2005, this definition was revised correctly.

+
+*3 C89 Rationale 3.1.2.5 Types
+   C99 Rationale 6.2.6.2 Integer types
+
+

*4 In C99, the handling of the specific bit pattern as "trap representation" which causes an exception is allowed in implementations.

+

I do not know what sort of implementations fall under this specification in reality.

+ +

5.1.4. <iso646.h>

+

ISO C 9899:1990/ Amendment 1 added the standard header called iso646.h. This provides the operators including &, |, ~, ^, or ! with the replacement spelling expressed only in invariant character set in ISO 646. Replacement spelling is provided for |, ~, and ^ in trigraphs as well, however, trigraphs lack in readability. Alternatively, iso646.h defines 11 types of operators in macros in the token unit.

+

This implementation is very easy and the following example is enough. Since macro expansion is performed in preprocessing, there is no trouble for implementations. *1

+
+/* iso646.h     ISO 9899:1990 / Amendment 1 */
+
+#ifndef _ISO646_H
+#define _ISO646_H
+
+#define and     &&
+#define and_eq  &=
+#define bitand  &
+#define bitor   |
+#define compl   ~
+#define not     !
+#define not_eq  !=
+#define or      ||
+#define or_eq   |=
+#define xor     ^
+#define xor_eq  ^=
+
+#endif
+
+

Note:

+

*1 In the C++ Standard, these identifier-like operators are specified as operator-tokens rather than macros. This is a troublesome and meaningless specification for implementations.

+
+ +

6. Preprocessor Test Results

+ +

6.1. Preprocessors Tested

+

Compiler systems tested and execution methods are as below. Compiler systems are sorted in the order of release time.

+

Runtime options slightly vary in each of C95 (C90), C99, and C++98.

+

If there are problems in <assert.h> and <limits.h>, testing was done after correctly rewriting them.

+
+Number: OS          / Compiler System       / Execution program (version)
+    Runtime option
+    Comment
+
+1   :   Linux       /                       / DECUS cpp
+    C95:    cpp
+
+
+DECUS cpp original version by Martin Minow (June 1985.) It was ported to some systems such as various DEC systems, UNIX, and MS-DOS at that time, but what used in this test was modified by kmatsui and compiled on Linux / GCC. Macros were rewritten so that translation limits clear as many specifications as possible. +
+
+2   :   FreeBSD 2.2.7   / GCC V.2.7.2.1     / cpp (V.2.0)
+    GO32            / DJGPP V.1.12          / cpp (V.2.0)
+    WIN32           / BC 4.0                / cpp (V.2.0)
+    MS-DOS          / BC 4.0, TC 2.0        / cpp (V.2.0)
+    MS-DOS          / LSI C-86 V.3.3        / cpp (V.2.0)
+    OS-9/6x09       / Microware C/09        / cpp (V.2.0)
+    C95:    cpp -23 (-S1 -S199409L) -W15
+            gcc -ansi -Wp,-2,-W15
+    C99:    cpp -23 (-S1) -S199901L -W15
+    C++:    cpp -23+ -S199711L -W15
+
+
+Open-source-software by kmatsui (August, 1998.) Called mcpp. Rewrite of DECUS cpp. +I have compiled with GCC on Linux and used the executable for this test. +
+ +
+3   :   WIN32       / Borland C++ V.5.5J    / cpp32 (August, 2000)
+    C95:    cpp32 -A -w
+            bcc32 -A -w
+    C99:    cpp32 -A -w
+    C++:    cpp32 -A -w
+
+
+Trigraphs are not processed by cpp32 nor bcc32. Instead, a conversion program called trigraph.exe is provided. +It just set up an alibi called "Standard conformance." In Borland C, I used this program to convert trigraphs in advance to test (lenient testing.) This trigraph.exe, however, processes even line splicing by <backslash><newline>. +Therefore, the line number is out of alignment (deduct scores in q.1.2.) +
+ +
+4   :   Linux, CygWIN   / GCC V.2.95.3 (March, 2001)    / cpp0
+    C95:    cpp0 -D__STRICT_ANSI__ -std=c89 -$ -pedantic -Wall
+            gcc -ansi -pedantic -Wall
+    C99:    cpp0 -std=c9x -$ -Wall
+    C++:    g++ -E -trigraphs -$ -Wall
+
+
+Since GCC is portable source, the person who ported it should prepare the specification for what has been ported to a specific system. However, no such document is provided. Only GNU cpp.info exists as a cpp document. +
+ +
+5   :  Linux        / GCC V.3.2 (August, 2002)  / cpp0
+    C95:    cpp0 -D__STRICT_ANSI__  -std=iso9899:199409 -$ -pedantic
+                                                            -Wall
+            gcc -std=iso9899:199409 -pedantic -Wall
+    C99:    cpp0 -std=c99 -$ -Wall
+    C++:    g++ -E -trigraphs -$ -Wall
+
+
+Compiled from the source by kmatsui. Configured with --enable-c-mbchar option. +
+ +
+6   :   Linux       /                       / ucpp (V.1.3)
+    C95:    ucpp -wa -c90
+    C99:    ucpp -wa
+
+
+Open-source-software by Thomas Pornin (January, 2003.) A portable compiler-independent preprocessor. I compiled it on Linux by GCC. +
+ +
+7   :   WIN32       / Visual C++ 2003       / cl
+    C95:    cl -Za -E -Wall -Tc
+    C99:    cl -E -Wall -Tc
+    C++:    cl -E -Wall -Tp
+
+
+Since the -E option does not process comments and <backslash><newline> properly, a compilation testing is used together (April, 2003.) +
+ +
+8   :   WIN32       / LCC-Win32 2003-08     / lcc
+    C95:    lcc -A -E
+            lcc -A
+    C99:    lcc -A -E
+    C++:    lcc -A -E
+
+
+An integrated development environment which Jacob Navia wrote based on open-source-software by C. W. Fraser & Dave Hanson (August, 2003.) The preprocessing part is based on source originally written for Plan9 by Dennis Ritchie. +
+ +
+9   :   WIN32, Linux, etc.  /                   / wave (V.1.0)
+    C95:    wave
+    C99:    wave --c99
+    C++:    wave
+
+
+Open-source-software by Hartmut Kaiser (January, 2004.) A portable compiler-independent preprocessor. Implemented using the C++ library called "Boost preprocessor library" by Paul Mensonides et al. Used a binary on Windows made by the author of wave. +
+ +
+10 :    FreeBSD, Linux, CygWIN   / GCC 2.95, 3.2
+    WIN32, MS-DOS   / Visual C 2003, BCC, etc.  / mcpp_std (V.2.4)
+    C95:    mcpp_std -23 (-S1 -V199409L) -W31
+            gcc -ansi -Wp,-2,-W31
+    C99:    mcpp_std -23 (-S1) -V199901L -W31
+    C++:    mcpp_std -23+ -V199711L -W31
+
+
+mcpp V.2.4 (February, 2004), in Standard mode. Compiled with Linux / GCC. +
+ +
+11  :    Linux      / GCC V.3.4.3 (November, 2004)  / cc1, cc1plus
+    C95:    gcc -E -std=iso9899:199409 -pedantic -Wall
+    C99:    gcc -E -std=c99 -$ -Wall
+    C++:    g++ -E -std=c++98 -$ -Wall
+
+ +
+12 :   WIN32        / Visual C++ 2005       / cl
+    C95:    cl -Za -E -Wall -Tc
+    C99:    cl -E -Wall -Tc
+    C++:    cl -E -Wall -Tp
+
+
+Since the -E option does not process comments and <backslash><newline> properly, a compilation testing is used together. (September, 2005.) +
+ +
+13 :    WIN32       / LCC-Win32 2006-03     / lcc
+    C95:    lcc -A -E
+            lcc -A
+    C99:    lcc -A -E
+    C++:    lcc -A -E
+
+
+LCC-Win32 2006-03 (March, 2006.) +
+ +
+14 :    Linux       / GCC V.4.1.1 (May, 2006) / cc1, cc1plus
+    C95:    gcc -E -std=iso9899:199409 -pedantic -Wall
+    C99:    gcc -E -std=c99 -$ -Wall
+    C++:    g++ -E -std=c++98 -$ -Wall
+
+15 :   WIN32        / Visual C++ 2008       / cl
+    C95:    cl -Za -E -Wall -Tc
+    C99:    cl -E -Wall -Tc
+    C++:    cl -E -Wall -Tp
+
+
+Since the -E option does not process comments and <backslash><newline> properly, a compilation testing is used together. (December, 2007.) +
+ +
+16: Linux, WIN32, etc.  /                       / wave (V.2.0)
+    C95:    wave (--c99)
+    C99:    wave --c99
+    C++:    wave
+
+
+wave V.2.0 (2008/08) +Compiled by kmatsui on Linux/GCC and Windows/Visual C++ from the source contained in Boost C++ Library V.1.36.0 with its default settings. +Used with configuration files for header files of GCC and Visual C++. +
+ +
+17: FreeBSD, Linux, Mac OS X, CygWIN, MinGW / GCC 2.95-4.1
+    WIN32  / Visual C 2003-2008, BCC, LCC-Win32     / mcpp (V.2.7.2)
+    C95:    mcpp -23 (-S1 -V199409L) -W31
+            gcc -ansi -Wp,-2,-W31,-fno-dollars-in-identifiers
+    C99:    mcpp -23 (-S1) -V199901L -W31
+    C++:    mcpp -23+ -V199711L -W31
+
+
+mcpp V.2.7.2 (2008/11) +
+
+ +

6.2. Lists of Marks

+
+                D   M   B   G   G   u   V   L   W   M   G   V   L   G   V   W   M
+                E   C   C   C   C   c   C   C   a   C   C   C   C   C   C   A   C
+                C   P   C   C   C   p   2   C   v   P   C   2   C   C   2   V   P
+                U   P   5   2   3   p   0   0   e   P   3   0   0   4   0   E   P
+                S   2   5   9   2   1   0   3   1   2   4   0   6   1   0   2   2
+                C   0   C   5       3   3   0   0   4   3   5   0   1   8   0   7
+                P       P   3               8                   3               2
+                P       P                                                   
+
+        max     1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
+
+[K&R: Processing of sources conforming to K&R and C90] (31 items)
+n.2.1     4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.2.2     2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.2.3     2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.6.1    10    10  10  10  10  10  10  10  10   4  10  10  10  10  10  10  10  10
+n.7.2     4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.10.2    6     0   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.12.3    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.12.4    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.12.5    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.12.7    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.13.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.13.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.13.3    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.13.4    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.13.7    6     6   6   4   6   6   6   4   6   0   6   6   4   4   6   4   6   6
+n.13.8    2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.13.9    2     2   2   2   2   2   2   0   2   0   2   2   0   2   2   0   2   2
+n.13.10   2     2   2   2   2   2   2   0   0   2   2   2   2   0   2   2   2   2
+n.13.11   2     0   2   2   2   2   2   0   0   0   2   2   2   0   2   2   2   2
+n.13.12   2     0   2   2   2   2   2   2   0   0   2   2   2   0   2   2   2   2
+n.15.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.15.2    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.18.1   30    30  30  30  30  30  30  30  30  30  30  30  30  30  30  30  30  30
+n.18.2   20    20  20  20  20  20  20  20  20  20  20  20  20  20  20  20  20  20
+n.18.3   10    10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
+n.27.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.27.2    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.29.1   10    10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
+n.32.1    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+i.32.3    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+i.35.1    2     2   2   2   2   2   2   0   0   0   2   2   0   0   2   0   1   2
+stotal  166   150 166 164 166 166 166 156 158 140 166 166 160 156 166 160 165 166
+
+[C90: Processing of strictly conforming sources] (76 items)
+n.1.1     6     0   6   6   6   6   6   6   6   0   6   6   6   6   6   6   6   6
+n.1.2     2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.1.3     2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.2.4     2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.2.5     2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.3.1     6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.3.3     4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.3.4     2     0   2   0   2   2   0   2   2   2   2   2   2   2   2   2   2   2
+n.4.1     6     0   6   0   6   6   6   6   0   0   6   6   6   0   6   6   6   6
+n.4.2     2     0   2   0   2   2   2   2   0   0   2   2   2   0   2   2   2   2
+n.5.1     6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.6.2     6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.6.3     2     0   2   0   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.7.1     6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.7.3     4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.8.1     8     0   8   8   8   8   8   8   8   8   8   8   8   8   8   8   2   8
+n.8.2     2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.9.1    10    10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
+n.10.1   10    10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
+n.11.1    8     8   8   8   8   8   8   8   8   8   8   8   8   8   8   8   8   8
+n.11.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.12.1    6     0   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.12.2    4     0   4   4   4   4   4   4   4   0   4   4   4   4   4   4   4   4
+n.12.6    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.13.5    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.13.6    6     0   6   6   6   6   4   6   4   0   6   6   4   4   6   4   6   6
+n.13.13   4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.13.14   2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.19.1    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.19.2    4     2   4   4   4   4   4   4   4   2   4   4   4   4   4   4   4   4
+n.20.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.21.1    4     0   4   0   4   4   4   0   4   4   4   4   0   4   4   0   4   4
+n.21.2    2     0   2   0   2   2   2   0   2   2   2   2   0   2   2   0   2   2
+n.22.1    4     0   4   0   4   4   4   4   4   0   4   4   4   4   4   4   4   4
+n.22.2    2     0   2   0   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.22.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   0   2
+n.23.1    6     2   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.23.2    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.24.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.24.2    4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.24.3    6     0   6   0   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.24.4    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.24.5    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.25.1    4     2   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.25.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.25.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.25.4    6     0   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.25.5    4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.26.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.26.2    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.26.3    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.26.4    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.26.5    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.27.3    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.27.4    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   2   4
+n.27.5    2     2   2   2   2   2   2   0   2   0   2   2   0   2   2   0   0   2
+n.27.6    2     0   0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.28.1    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.28.2    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.28.3    4     0   4   4   4   4   2   4   4   4   4   4   4   4   4   4   4   4
+n.28.4    4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.28.5    4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.28.6    4     0   4   0   4   4   2   0   0   4   4   4   0   0   4   0   4   4
+n.28.7    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.29.2    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.30.1    6     6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
+n.32.2    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+n.37.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.3    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.37.4    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.5    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.37.6    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.7    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.8    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+n.37.9    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+stotal  286   160 284 252 286 286 278 274 272 240 286 286 272 272 286 272 274 286
+
+[C90: Processing of implementation defined portions] (1 item)
+i.32.4    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+stotal    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+
+[C90: Diagnosing of violation of syntax rule or constraint] (50 items)
+e.4.3     2     2   2   1   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.7.4     2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.12.8    2     0   2   2   2   2   2   2   0   2   2   2   2   0   2   2   2   2
+e.14.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.2    4     2   4   2   4   4   2   2   4   4   4   4   4   4   4   4   4   4
+e.14.3    2     2   2   2   2   2   1   2   2   2   2   2   2   2   2   2   2   2
+e.14.4    2     2   2   2   2   2   1   2   2   2   2   2   2   2   2   2   2   2
+e.14.5    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.6    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.7    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.8    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.9    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.14.10   4     0   4   2   0   0   0   0   0   0   4   0   0   0   0   0   4   4
+e.15.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.15.4    2     2   2   1   2   2   2   1   2   2   2   2   2   2   2   2   2   2
+e.15.5    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.16.1    2     2   2   1   2   2   2   1   2   2   2   2   2   2   2   2   2   2
+e.16.2    2     2   2   1   2   2   2   1   2   2   2   2   2   2   2   2   2   2
+e.17.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.17.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.17.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.17.4    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.17.5    2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.17.6    2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.17.7    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.18.4    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.18.5    2     2   2   2   0   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.18.6    2     0   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.18.7    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.18.8    2     2   2   2   2   2   2   2   2   0   2   2   2   2   2   2   2   2
+e.18.9    2     0   2   0   2   2   2   2   0   0   2   0   2   0   2   2   0   2
+e.19.3    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+e.19.4    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+e.19.5    4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+e.19.6    2     0   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.19.7    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.23.3    2     0   2   2   2   2   2   2   0   0   2   2   2   0   2   2   0   2
+e.23.4    2     2   2   2   2   2   2   2   0   0   2   2   2   0   2   2   0   2
+e.24.6    2     2   2   2   2   2   2   2   0   0   2   2   2   0   2   2   0   2
+e.25.6    4     0   4   0   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+e.27.7    2     0   2   2   2   2   2   0   2   2   2   2   0   2   2   0   2   2
+e.29.3    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.29.4    2     2   2   1   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.29.5    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.31.1    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.31.2    2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+e.31.3    2     2   2   0   2   2   2   1   2   2   2   2   1   2   2   1   2   2
+e.32.5    2     0   2   2   2   2   0   2   0   0   2   2   2   0   2   2   2   2
+e.33.2    2     0   2   0   0   2   0   2   0   0   2   2   2   0   2   2   2   2
+e.35.2    2     0   2   1   2   2   0   2   0   2   2   2   2   0   2   2   2   2
+stotal  112    74 112  92 104 108  98 100  92  86 112 106 105  92 108 105 104 112
+
+[C90: Documents on implementation defined behaviors] (13 items)
+d.1.1     2     0   2   0   0   2   0   0   0   0   2   2   0   0   2   0   0   2
+d.1.2     4     2   4   4   4   4   0   4   0   0   4   4   4   0   4   4   2   4
+d.1.3     2     0   2   0   0   2   0   0   2   2   2   2   0   0   2   0   2   2
+d.1.4     4     0   4   4   4   4   0   4   4   2   4   4   4   4   4   4   2   4
+d.1.5     4     2   4   4   2   4   4   4   4   4   4   2   4   4   2   4   4   4
+d.1.6     2     0   2   0   0   1   0   0   0   0   2   1   0   0   1   0   0   2
+d.2.1     2     0   2   2   2   2   2   0   0   0   2   2   2   0   2   2   0   2
+d.2.2     2     0   2   2   0   2   0   0   0   0   2   2   2   0   2   2   0   2
+d.2.3     2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+d.2.4     2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+d.2.5     2     0   2   0   0   0   0   2   0   0   2   0   2   0   0   2   0   2
+d.2.6     2     0   2   2   0   0   0   2   0   0   2   0   2   0   0   2   0   2
+d.2.7     2     0   2   2   0   2   0   2   0   0   2   2   2   0   2   2   0   2
+stotal   32     4  32  20  12  23   6  18  10   8  32  21  22   8  21  22  10  32
+
+[C90: Degree of Standard C conformance] (171 items)
+mttl90  598   390 596 530 570 585 550 550 534 476 598 581 561 530 583 561 555 598
+
+[C99: Conformance to new features] (20 items)
+n.dslcom  4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.ucn1    8     0   0   0   0   6   8   2   0   2   8   6   8   0   6   8   6   8
+n.ucn2    2     0   0   0   0   0   2   0   0   0   2   2   2   0   2   2   0   2
+n.ppnum   4     0   4   0   4   4   4   0   0   0   4   4   0   4   4   0   0   4
+n.line    2     0   2   2   2   2   2   2   0   2   2   2   2   0   2   2   2   2
+n.pragma  6     0   6   0   0   6   6   0   0   2   6   6   0   0   6   0   2   6
+n.llong  10     0   0   0  10  10   8  10   0   0  10  10  10   0  10  10  10  10
+n.vargs  10     0  10   0  10  10  10   0   0  10  10  10  10   2  10  10  10  10
+n.stdmac  4     0   2   0   0   4   4   0   0   4   4   4   0   0   4   0   4   4
+n.nularg  6     0   6   0   6   6   6   2   0   6   6   6   2   0   6   2   6   6
+n.tlimit 18     0  18  14  18  18  17  18  14  18  18  18  18  12  18  18  16  18
+e.ucn     4     0   0   0   0   0   2   0   0   2   4   0   2   0   0   2   2   4
+e.intmax  2     0   0   0   2   2   2   0   0   0   2   1   0   0   1   0   2   2
+e.pragma  2     0   2   0   0   2   2   0   0   2   2   2   0   0   2   0   2   2
+e.vargs1  2     0   0   0   0   2   1   0   0   1   2   2   0   0   2   0   2   2
+e.vargs2  2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+d.pragma  2     0   2   0   0   2   2   2   0   0   2   2   2   0   2   2   2   2
+d.predef  6     0   0   0   0   6   6   0   0   0   6   6   0   0   6   0   0   6
+d.ucn     2     0   0   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+d.mbiden  2     0   0   0   0   2   2   1   0   0   2   2   1   0   2   1   0   2
+mttl99   98     0  58  20  56  86  88  41  18  53  98  87  61  22  87  61  70  98
+
+[C++: Conformance to new features not in C90] (9 items)
+n.dslcom  4     0   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+n.ucn1    4     0   0   0   0   4   4   2   0   2   4   4   2   0   4   2   2   4
+n.cnvucn  4     0   0   0   0   0   1   0   0   0   0   0   0   0   0   0   0   0
+n.bool    2     0   0   0   0   2   0   0   0   2   2   2   0   0   2   0   0   2
+n.token1  2     0   2   0   0   2   0   0   2   2   2   2   0   2   2   0   2   2
+n.token2  2     0   0   0   0   2   0   2   0   2   2   2   2   0   2   2   2   2
+n.cplus   4     0   2   2   2   2   0   4   0   4   4   2   4   0   2   4   4   4
+e.operat  2     0   0   0   0   2   0   0   0   2   2   2   0   0   2   0   2   2
+d.tlimit  2     0   2   0   0   2   0   1   0   0   2   2   1   0   2   1   0   2
+mttl++   26     0  10   6   6  20   9  13   6  18  22  20  13   6  20  13  16  22
+
+[C90: Qualities / 1 : handling of multibyte character] (1 item)
+m.36.2    7     0   2   2   0   0   0   4   0   0   7   5   2   0   5   2   0   7
+stotal    7     0   2   2   0   0   0   4   0   0   7   5   2   0   5   2   0   7
+
+[C90: Qualities / 2 : diagnosis of undefined behaviors] (29 items)
+u.1.1     1     0   1   0   1   1   0   0   0   1   1   1   0   0   1   0   1   1
+u.1.2     1     0   1   0   1   1   0   1   0   1   1   1   0   0   1   0   1   1
+u.1.3     1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.4     1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.5     1     1   1   1   1   1   1   1   1   0   1   1   1   1   1   1   1   1
+u.1.6     1     0   1   0   1   1   0   0   1   0   1   1   0   1   1   0   0   1
+u.1.7     9     0   1   0   0   0   0   0   0   0   6   6   0   0   6   0   0   9
+u.1.8     1     1   1   0   1   1   0   0   0   0   1   0   0   1   0   0   0   1
+u.1.9     1     1   1   0   1   1   1   0   1   0   1   0   0   1   0   0   0   1
+u.1.10    1     1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.11    1     1   1   1   0   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.12    1     1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.13    1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.14    1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.15    1     0   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
+u.1.16    1     0   1   1   1   1   1   1   1   0   1   1   1   1   1   1   1   1
+u.1.17    2     0   2   0   1   1   0   0   1   0   2   1   0   1   1   0   1   2
+u.1.18    1     0   1   0   1   1   1   0   0   0   1   1   0   0   1   0   1   1
+u.1.19    2     0   2   0   0   1   1   0   0   1   2   1   0   0   1   0   1   2
+u.1.20    1     0   1   1   1   1   1   1   0   1   1   1   1   1   1   1   1   1
+u.1.21    2     0   2   1   0   1   2   2   2   2   2   1   2   2   1   2   2   2
+u.1.22    1     0   1   0   0   1   1   0   1   1   1   1   0   1   1   0   1   1
+u.1.23    1     1   1   0   1   0   0   1   1   0   1   0   1   1   0   1   0   1
+u.1.24    2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   2   2
+u.1.25    1     0   1   0   0   1   0   0   0   0   1   1   0   0   1   0   1   1
+u.1.27    1     1   1   1   0   1   1   1   1   0   1   1   1   1   1   1   1   1
+u.1.28    1     1   1   1   0   1   1   1   1   0   1   1   1   1   1   1   1   1
+u.2.1     1     1   1   1   1   1   0   1   0   1   1   1   1   0   1   1   1   1
+u.2.2     1     0   1   1   0   1   1   0   0   0   1   1   0   0   1   0   0   1
+stotal   41    10  33  16  19  26  20  18  19  16  38  30  17  21  30  17  25  41
+
+[C90: Qualities / 3 : Diagnosis of unspecified behaviors] (2 items)
+s.1.1     2     0   2   0   0   0   2   0   0   0   2   0   0   0   0   0   0   2
+s.1.2     2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+stotal    4     0   4   0   0   0   2   0   0   0   4   0   0   0   0   0   0   4
+
+[C90: Qualities / 4 : Diagnosis of suspicious cases] (12 items)
+w.1.1     4     4   4   0   4   4   0   0   0   0   4   4   0   0   4   0   0   4
+w.1.2     4     0   4   0   0   0   0   0   0   2   4   0   0   0   0   0   2   4
+w.2.1     2     0   2   1   0   0   0   0   0   0   2   2   0   0   2   0   0   2
+w.2.2     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.1     1     1   1   0   0   0   0   0   0   0   1   0   0   1   0   0   0   1
+w.3.3     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.4     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.5     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.6     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.7     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.8     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+w.3.9     1     0   1   0   0   0   0   0   0   0   1   0   0   0   0   0   0   1
+stotal   19     5  19   1   4   4   0   0   0   2  19   6   0   1   6   0   2  19
+
+[C90: Qualities / 5 : Other features] (17 items)
+q.1.1     9     0   9   6   9   9   8   7   4   9   9   9   7   5   9   7   8   9
+q.1.2    10     6  10   4   8  10   4   4   4   4  10  10   4   4  10   4   4  10
+q.1.3     4     4   4   2   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+q.1.4    20    10  20  10  20  20  20  10  20  10  20  20  10  20  20  10  10  20
+q.2.1     4     2   4   2   4   4   4   4   2   4   4   4   4   2   4   4   4   4
+q.2.2     4     4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
+q.2.3     2     2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
+q.2.4     2     2   2   0   2   2   0   0   0   0   2   2   0   0   2   0   0   2
+q.2.5     2     0   2   0   0   0   0   0   0   0   2   0   0   0   0   0   0   2
+q.2.6     4     0   4   2   4   4   2   4   2   0   4   4   4   2   4   4   0   4
+q.2.7    10     4   6   4   8   8   4   4   4   2   8   8   4   4   8   4   4   8
+q.2.8    10     0   6   2   2   2   0   6   4   4   8   2   6   4   2   6   4   8
+q.2.9     6     2   2   0   2   2   0   0   0   2   2   2   0   0   2   0   2   4
+q.3.1    20    10   8   8  14  12   8  10  10   6   8  12  10  10  12  10   6   8
+q.3.2    20    20  20  18  16  16  18  16  18  14  18  14  14  18  12  14  12  16
+q.3.3    20    10  14   0  10  12   8   0   0   8  14  12   0   0  12   0  10  16
+q.4.1    10     2   6   6   4   6   2   4   6   4   4   6   4   6   6   4   4   8
+stotal  157    78 123  70 113 117  88  79  84  77 123 115  77  85 113  77  78 129
+
+[C90: Qualities] (61 items)
+mttl90  228    93 181  89 136 147 110 101 103  95 191 156  96 107 154  96 105 200
+
+[C99: Qualities of new features] (3 items)
+u.line    2     0   2   0   1   1   0   0   0   0   2   1   0   0   1   0   2   2
+u.concat  1     0   1   0   0   1   0   0   0   0   1   1   0   0   1   0   0   1
+w.tlimit  8     0   8   0   0   0   3   2   0   0   8   0   2   0   0   2   0   8
+mttl99   11     0  11   0   1   2   3   2   0   0  11   2   2   0   2   2   2  11
+
+[C++: Qualities of features not in C90] (1 item)
+u.cplus   1     0   1   1   0   0   0   1   0   1   1   0   1   0   0   1   1   1
+mttl++    1     0   1   1   0   0   0   1   0   1   1   0   1   0   0   1   1   1
+
+[Overall] (265 items)
+gtotal  962   483 857 646 769 840 760 708 661 643 921 846 734 665 846 734 749 930
+
+                D   M   B   G   G   u   V   L   W   M   G   V   L   G   V   W   M
+                E   C   C   C   C   c   C   C   a   C   C   C   C   C   C   A   C
+                C   P   C   C   C   p   2   C   v   P   C   2   C   C   2   V   P
+                U   P   5   2   3   p   0   0   e   P   3   0   0   4   0   E   P
+                S   2   5   9   2   1   0   3   1   2   4   0   6   1   0   2   2
+                C   0   C   5       3   3   0   0   4   3   5   0   1   8   0   7
+                P       P   3               8                   3               2
+                P       P                                                   
+
+        max     1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
+
+
+ +

6.3. Characteristics of Each Preprocessor

+ +

1 : Linux / / DECUS cpp

+
+

This was written around the early stage of ANSI draft and the Standard conformance level is low by now. Diagnostic messages are adequate, however, there is almost no documentation. It is a well-structured stable program.

+

The portability of source is high and it has been ported to some compiler systems. The source code is easy to read as if reading a textbook and you can learn a lot from by just reading it. I modeled mcpp after this source.

+
+ +

3 : WIN32 / Borland C++ V.5.5J / cpp32

+
+

The C90 conformance level is relatively high and troublesome shift-JIS is respectably supported. Documents are well provided. Although e_* usually issues diagnostic messages, most of them are hasty and the quality is not good.

+

"Quality other than Standards" is poor and there are no special extension features. Not many diagnostic messages are issued for undefined parts and the program runs away sometimes. Supporting Standards only seems to be the best it could do.

+

Different from Turbo C, the speed is no longer fast. Merits in one-pass compiler seem to have disappeared and only demerits seem to have remained. I wonder how long Borland continue this style.

+
+ +

4 : Linux, CygWIN / GCC V.2.95.3 / cpp0

+
+

The C90 and C95 Standard conformance level is quite high and diagnostic messages are accurate. The behavior is near stable and the speed is extremely fast. There are plentiful options which are almost too abundant. mcpp also modeled after some of those options.

+

Though there were a few painful bugs in older versions, V.2.95 has almost no bugs.

+

The remaining issues are that new specifications in C99 and C++98 have not been implemented, there are not enough diagnostic messages, documentation is lacking, there are many extension features against Standards which do not use #pragma, that many obsolete pre-Standard specifications are hidden, and that multi-byte character encoding support is half-finished and does not reach practical level.

+

The cpp.info document is excellent as the explanation of overall GCC/cpp and Standard C preprocessing. However, it is really too bad that documentation for implementation-defined areas do not exist in CygWIN, FreeBSD, or Linux. "Portability" is not only for programs.

+

The source is a full of patches and difficult to read, and the program structure is still dragging old macro processor structure. However, since overall GCC compiler systems are good, this is ported to many systems.

+
+ +

5 : Linux / GCC V.3.2 / cpp0

+
+

GCC V.3 changed the source for preprocessing completely from V.2. At the same time, it changed documentations completely. Token-based principles are fully enforced, warnings are issued while allowing pre-Standard specifications, and the number of undocumented specifications decreased. On the whole, it has improved to the direction I had hoped for to a large extent. I suspect that future improvements will be easier since the program structure has changed completely.

+

Diagnostic messages, documentations, C99 support, multi-byte character support are not enough yet. The speed is slightly slower than V.2, but it is still one of the faster ones.

+

However, it is troublesome that header files became complex and setting the search order of include directories is getting complicated. Also, while old options are no longer necessary, many new options are introduced and it is taking forever for options to get organized. It is unfortunate that the internal interface between preprocessing and compilation parts is complicated for some reasons although preprocessing become combined with the compiler proper in V.3.

+
+ +

6 : Linux / / ucpp (V.1.3)

+
+

The characteristics are the support for C99, open source, and portable. The Standard conformance level is rather high. This version is supposed to support UCN and UTF-8, but the support is insufficient. The diagnostic messages are somewhat poor. Documentation is not sufficient, either.

+
+ +

7 : WIN32 / Visual C++ 2003 / cl
+12 : WIN32 / Visual C++ 2005 / cl
+15 : WIN32 / Visual C++ 2008 / cl

+
+

Though in 2003 few C99 specifications are implemented, more than half of them are implemented in 2005. There remain, however, some bugs regarding the specifications for C90 and prior. The most fundamental problem is confusion in the translation phases. The upgrades must have been rework of some very old source code.

+

The diagnostic messages are often somewhat off the point. An error often terminates the preprocessing which makes this software bothersome to use. Updating of the manuals is sometimes far behind the implementation.

+

The merits are large translation limits and a relatively large number of #pragma. #pragma setlocale in particular is useful. However, it is problematic that the #pragma line is macro-expanded even in C90 but that #pragma sub-directive uses user's name space.

+

2008 is almost the same with 2005 as for preprocessing. +The only difference is implementation of __pragma() operator which is a substitute of _Pragma() of C99. +The system headers used by Visual C++ have had only a few problems on the whole up to 2005. +On 2008, however, number of macros with '$' suddenly increased for some reason. +

+ +

8 : WIN32 / LCC-Win32 2003-08 / lcc
+13 : WIN32 / LCC-Win32 2006-03 / lcc

+
+

Jacob Navia modified the preprocessing part of the source code for Plan9 by Dennis Ritchie, but this lacks in debugging and there are quite a number of bugs in the #if expression evaluation and others. The specifications since C95 are not supported. Lack of documentation.

+

There are few differences of preprocessing between 2003-08 and 2006-03.

+
+ +

9 : WIN32, Linux, etc. / / wave (V.1.0)
+16: WIN32, Linux, etc. / / wave (V.2.0)

+
+

This preprocessor has been developed for "meta-programming" of C++ STL as a primary purpose. Wave has an unique construction: it is consisted of mainly C++ libraries, and its source is consisted of mainly header files. The examples of meta-programming use recursive macros heavily, and Wave expands those macros as GCC / cpp or -@compat option of mcpp, i.e. limiting the scope of "inhibition of once-replaced macro's re-replacement" narrower than the Standard's wording. (see 3.4.26.)

+

Wave intends also to be used as a usual preprocessor, and intends conforming to C++98 and C99. Though the degree of perfection was not high in V.1.0, it was greatly improved in V.2.0. It was reported that a lot of bugs were fixed after V.1.0 using the validation suite of mcpp. Further improvement of diagnostics and documents are still desired. Another problem is that a few mistakes are found in the author's interpretation of the Standards expressed in wave's diagnostics and its accompanying testcases.

+
+ +

11 : Linux / GCC V.3.4.3 / cc1, cc1plus
+14 : Linux / GCC V.4.1.1 / cc1, cc1plus

+
+

The scoring is almost the same with V.3.2. However, the construction of preprocessing has changed largely. Although V.3.2 seemed to proceed in the direction to portability, GCC has changed the direction on V.3.3 and 3.4. It has become one huge and complex compiler, removing independent preprocessor, predefining many macros and restoring some old specifications which was once obsoleted by V.3.2. It is a question whether these changes can be said improvements. It has also given a privileged place to UTF-8 among many encodings of multi-byte character. I am afraid that it might narrow the wide variety of multi-lingualization.

+

V.4.1 has not big differences from V.3.4 as for preprocessing.

+
+ +

2 : FreeBSD, DJGPP, WIN32, MS-DOS, OS-9/09 / / mcpp (V.2.0)
+10 : FreeBSD, Linux, CygWIN, WIN32, MS-DOS / / mcpp (V.2.4)
+17 : FreeBSD, Linux, Mac OS X, CygWIN, MinGW, WIN32 / / mcpp (V.2.7.2)

+
+

Since I created and tested this myself, the conformance level is the best, of course. It should be the world's most accurate preprocessor. The plentifulness and accuracy of diagnostic messages and the detailed documentation is also the best. Useful options and #pragma directives are provided. The C99 specification is fully supported in V.2.3 and later. +The portability of source is also the best.

+However, there are some features still to be implemented. +So I would appreciate your contribution.

+
+
+ +

6.4. Overall Review

+

As we test many preprocessors, we can find that nowadays many have high level of C90 Standard conformance. However, each compiler system still has many issues. I am not going to speak for mcpp since most of the items score full.

+

More compiler systems can process the n_* samples correctly now. GCC 2.95 and later, BC (Borland C) 5.5, LCC-Win32 2003-08 and later, Visual C++ (VC) 2003 and later, Ucpp 1.3, and Wave 2.0 have reached the level with not so many problems in practice. However, each compiler system has unexpected bugs.

+

The most surprising is that compiler systems including Visual C often have the division by 0 errors in n_13_7.t (n_13_7.c.) The basic specification of C, the "short-circuit evaluation" by &&, || and a ternary operator, is not handled. Borland C issues a warning in n_13_7.c and it issues only the same warning for the real division by 0 in e_14_9.c as well. In Turbo C, the real division by 0 and partial expression with skipped evaluation caused the same error while the same diagnostic message is downgraded only to warning in Borland C. This is an example of a "hasty diagnostic message" in this compiler system.

+

In the C90 specification, there are some with errors in the stringizing implementation using the # operator.

+

The specifications added by Amendment 1, Corrigendum 1 are implemented to some extent by GCC 2.95 and later, VC 2003 and later, and Ucpp.

+

In the C99 specification, only GCC 3.2 and later and Ucpp implements largely but not completely. The // comments has been implemented by many compiler systems for quite some time. In addition, GCC has long long, has considerable room in translation limits, and properly processes empty arguments of macros. GCC has variable argument macro of its own specification, but the one in the C99 specification is also implemented since 2.95. _Pragma() is implemented since 3.2. UCN is implemented by Ucpp and VC 2005 and later only. GCC 3.2 and later implements UCN in string literals and character constants only. Wave 2.0 implements more than half of C99 specifications.

+

In C++98, GCC 3.2 and later, Wave and VC 2005 and later implements most of the specifications.

+

The queer specification of C++98 to convert extended-characters to UCN is not yet implemented by any preprocessor.

+

In processing the implementation-defined area in i_*, many cannot handle wide characters in the #if expression. Though this is specified in Standards, using not only wide characters, but also character constants in the #if expression is almost meaningless and it will not hurt even if these cannot be used. This type of meaningless specification should be removed from the Standard.

+

Visual C supports relatively many encodings for multi-byte characters, though not enough. Other preprocessors are poor. The implementation of GCC 2.95,3.2 are half-finished and does not reach a practical level. GCC 3.4-4.1 has begun to support many encodings, by converting all encodings to UTF-8. The actual implementation is, however, not yet practical level on some encodings.

+

In the systems using shift-JIS or BIG-5, tokenization of literals and stringizing using the # operator requires attention. Visual C supports these well. Also BC 5.5J support shift-JIS.

+

In the diagnostic messages for e_*, GCC 2.95 and later are superior. Though Visual C and Ucpp issue diagnostics to comparatively many items, they are often vague or off-target. Very few preprocessors issue diagnostic messages to the overflow in the #if expression and only BC, Ucpp and GCC do to some extent.

+

In documents for implementation-defined areas, GCC 3.2 and later are at adequate level and the rest are all very poor.

+

In the diagnostics for u_*, GCC 3.2 and later is only adequate. The rest are very poor. I don't think it is acceptable for compiler systems not to do anything just because the result is undefined.

+

Almost no compiler systems handle s_* and w_*. It is unexpected that very few compiler systems issue even a warning for nested comments.

+

In "other various quality", GCC stand out with plentiful options, accurate diagnostic messages, high speed, and portability.

+

Overall, GCC V.3.2 and later, excels the most in the Standard conformance level, ease of use, and stability without many big problems.

+

Certainly, it is understood that mcpp exceeds in most aspects though only speed is inferior.

+

After the huge volume of testing, what I realize is the importance of test samples. mcpp is the result of creating samples and debugging in parallel. Since you cannot notice the existence of bugs without enough samples, it is anything but debugging.

+

If Standards come with this type of exhaustive test samples, the quality of each compiler system will be exponentially improved. Also, creating exhaustive test samples reveals the problems in Standards at the same time. Test samples are the illustration of Standards.

+
+ +

6.5. Test Reports and Comments

+

I look forward to opinions about this Validation Suite and preprocessing test reports for various compiler systems using this tool. Please use the "Open Discussion Forum" at:

+

http://mcpp.sourceforge.net/

+

or email.

+

If you perform the detail testing of a preprocessor, cut out the 6.2 score table and send it. To calculate the total score, please compile and use tool/total.c. The score table is cpp_test.old and if

+

total 18 cpp_test.old cpp_test.new

+

each field of stotal (sub-total), mtotal (mid-total), and gtotal (grand-total) is written and output to cpp_test.new. Specify the compiler system number at "18".

+

You can test automatically GCC by the testsuite edition of Validation Suite. I am waiting for the test reports on various versions of GCC. Please send me the log files (gcc.sum and gcc.log), and I will supplement my testsuite edition with the diagnostics of various versions if any differences exist.

+

Also, the development of Validation Suite and mcpp are in progress in the mcpp project above in SourceForge. Please send me email if you would like to join the development.

+ + diff --git a/libraries/mcpp/doc/cpp_test.sum b/libraries/mcpp/doc/cpp_test.sum new file mode 100644 index 000000000..7c77c8753 --- /dev/null +++ b/libraries/mcpp/doc/cpp_test.sum @@ -0,0 +1,46 @@ + M B G G V L M G V L G M + C C C C C C C C C C C C + C C C C 2 C P C 2 C C P + P 5 2 3 0 W P 3 0 | 4 P + 2 5 9 2 0 I 2 4 0 0 1 2 + 0 | 5 3 N 4 3 5 6 1 6 + 3 3 3 0 + 2 2 3 + +n_1: Trigraph sequences. * - * * * * * * * * * * +n_2: Line splicing by . * - * * * * * * * * * * +n_3: Handling of comment. * * * * * * * * * * * * +n_4: Tokens spelled by digraphs. * - * * * - * * * - * * +n_5: Spaces or tabs in pp-directive. * * * * * * * * * * * * +n_6: #include directive. * - * * * * * * * * * * +n_7: #line directive. * * * * * * * * * * * * +n_9: #pragma directive. * * * * * * * * * * * * +n_10: #if, #elif pp-directive. * * * * * * * * * * * * +n_11: Operator "defined" in #if. * * * * * * * * * * * * +n_12: Pp-number and type of #if expr. * * * * * * * * * * * * +n_13: Valid operators in #if expr. * * * * * * * * * * * * +n_13.5: Usual arithmetic conversion. * * * * o o * * o o * * +n_13.7: Short-circuit evaluation of #if. * * * * - * * * - * * * +n_13.8: Grouping of #if sub-expressions. * * * * - o * * - o * * +n_13.13: #if expression with macros. * * * * * * * * * * * * +n_15: #ifdef, #ifndef directives. * * * * * * * * * * * * +n_18: #define directive. * * * * * * * * * * * * +n_19: Valid re-definitions of macros. * * * * * * * * * * * * +n_20: Macro name identical to keyword. * * * * * * * * * * * * +n_21: Tokenization (no token merging). * - * * - * * * - * * * +n_22: Tokenization of pp-number. * o * * o * * * o * * * +n_23: ## operator in macro definition. * * * * * * * * * * * * +n_24: # operator in macro definition. * - * * * * * * * * * * +n_25: Pre-expansion of macro args. * * * * * * * * * * * * +n_26: No recursive replacement. * * * * * * * * * * * * +n_27: Rescanning of a macro. o o * * - * * * - * * * +n_28: Standard pre-defined macros. * - * * - - * * - - * * +n_29: #undef directive. * * * * * * * * * * * * +n_30: Macro call crossing lines. * * * * * * * * * * * * +n_32: Escape sequence in char-const. * * * * * * * * * * * * +n_37: Translation limits. * * * * * * * * * * * * +i_32.3: Character constant in #if. * * * * * * * * * * * * +i_35: Multi-character character const. * * * * o * * * o * * * +i_35.3: Multi-character wide character. * * * * * o * * * o * * + +Total number of tests unpassed. 1 9 0 0 8 5 0 0 8 5 0 0 diff --git a/libraries/mcpp/doc/mcpp-manual.html b/libraries/mcpp/doc/mcpp-manual.html new file mode 100644 index 000000000..8364037c0 --- /dev/null +++ b/libraries/mcpp/doc/mcpp-manual.html @@ -0,0 +1,4617 @@ + + + + + + + + +
+

MCPP-MANUAL

+

== How to Use MCPP ==

+
+
+

for V.2.7.2 (2008/11)
+Kiyoshi Matsui (kmatsui@t3.rim.or.jp)

+
+
+

Contents

+
+
1. Overview +
1.1. High Portability +
1.2. Standard C Mode with Highest Conformance and Other Modes +
1.3. Notations in this Manual +
+
+
2. Invocation Options and Environment Settings +
2.1. Two Kinds of Build and Five Behavioral Modes +
2.2. How to Specify Invocation Options +
2.3. Common Options +
2.4. Options by mcpp Behavioral Modes +
2.5. Common Options Except for Some Compiler Systems +
2.6. Options by Compiler System +
2.7. Environment Variables +
2.8. Multi-Byte Character Encodings +
2.9. How to Use mcpp in One-Pass Compilers +
2.10. How to Use mcpp in IDE +
2.10.1. How to Make mcpp available in Visual C++ IDE +
2.10.2. How to Make mcpp available in Mac OS X / Xcode.app
+
+
3. Enhancement and Compatibility +
3.1. #pragma MCPP put_defines, #pragma MCPP preprocess and others +
3.1.1. Pre-preprocessing of Header File
+
3.2. #pragma once +
3.2.1. Tool to Write #pragma once to Header Files
+
3.3. #pragma MCPP warning, #include_next, #warning +
3.4. #pragma MCPP push_macro, #pragma __setlocale and others +
3.5. #pragma MCPP debug, #pragma MCPP end_debug, #debug, #end_debug +
3.5.1. #pragma MCPP debug path, #debug path +
3.5.2. #pragma MCPP debug token, #debug token +
3.5.3. #pragma MCPP debug expand, #debug expand +
3.5.4. #pragma MCPP debug if, #debug if +
3.5.5. #pragma MCPP debug expression, #debug expression +
3.5.6. #pragma MCPP debug getc, #debug getc +
3.5.7. #pragma MCPP debug memory, #debug memory +
3.5.8. #pragma MCPP debug macro_call
+
3.6. #assert, #asm, #endasm +
3.7. New C99 Features (_Pragma() operator, Variadic Macro and others) +
3.8. Particular specifications for certain compiler system +
3.8.1. Variadic macro of GCC and Visual C +
3.8.2. Handling of 'defined' by GCC +
3.8.3. Asm Statement in Borland C and Other Special Syntaxes +
3.8.4. #import and Others
+
3.9. Problems of GCC and Compatibility with GCC +
3.9.1. Preprocessing FreeBSD 2/Kernel Sources +
3.9.2. Preprocessing FreeBSD 2/Libc +
3.9.3. Problems Concerning GCC 2/cpp +
3.9.4. Preprocessing Linux/glibc 2.1 +
3.9.5. To Use mcpp with GCC 2 +
3.9.5.1. To Sort mcpp's Warnings
+
3.9.6. Preprocessing GCC 3.2 Source +
3.9.7. To Use mcpp with GCC 3 or 4 +
3.9.8. Preprocessing Linux/glibc 2.4 +
3.9.9. The Problems of Linux / stddef.h, limits.h and #include_next +
3.9.10. Problems of Mac OS X / Apple-GCC and its System Headers +
3.9.11. Preprocessing firefox 3.0b3pre
+
3.10. Visual C++ System Header Problems +
3.10.1. Comment Generating Macro? +
3.10.2. '$' in Identifiers
+
+
4. Implementation-defined Behaviors +
4.1. Status Value on Exit +
4.2. Include Directory Search Path +
4.3. How to Construct Header Name +
4.4. Evaluation of #if Expression +
4.5. Character Constant Evaluation in #if Expression +
4.6. #if sizeof (type) +
4.7. How to Handle White-Space Sequence +
4.8. Default Specifications for mcpp Executables +
+
+
5. Diagnostic Messages +
5.1. Diagnostic Messages Format +
5.2. Translation Limits +
5.3. Fatal Errors +
5.3.1. mcpp's Own Bugs +
5.3.2. Physical Errors +
5.3.3. Translation Limits and Internal Buffer Errors +
5.3.4. #pragma MCPP preprocessed Related Errors
+
5.4. Errors +
5.4.1. Character and Token Related Errors +
5.4.2. Unterminated Source File Related Errors +
5.4.3. Ill-Balanced Preprocessing Group Related Errors +
5.4.4. Simple Syntax Errors on Directive Lines +
5.4.5. Syntax Errors in #if Expressions +
5.4.6. #if Expression Evaluation Errors +
5.4.7. #define Related Errors +
5.4.8. #undef Related Errors +
5.4.9. Macro Expansion Errors +
5.4.10. #error and #assert +
5.4.11. Failure of #include +
5.4.12. Other Errors
+
5.5. Warnings (Class 1) +
5.5.1. Character, Token and Comment Related Warnings +
5.5.2. Unterminated Source File Related Warnings +
5.5.3. Directive Line Related Warnings +
5.5.4. #if Expression Related Warnings +
5.5.5. Macro Expansion Related Warnings +
5.5.6. Line Number Related Warnings +
5.5.7. #pragma MCPP warning, #warning
+
5.6. Warnings (Class 2) +
5.7. Warnings (Class 4) +
5.8. Warnings (Class 8) +
5.9. Warnings (Class 16) +
5.10. Diagnostic Messages Index +
+
+
6. Reporting on Bugs and Others +
+
+ +

1. Overview

+

mcpp is a C preprocessor developed by kmatsui (Kiyoshi Matsui) based on DECUS cpp written by Martin Minow, and then rewritten entirely. mcpp means Matsui cpp. This software is supplied as source codes, and to use mcpp in any compiler systems, a small amount of modifications to adapt to the compiler system are required before it can be compiled into an executable. *1

+

This document describes the specification for mcpp executables that has been already ported to certain compiler systems. For those who want to know more about mcpp or want to port it to other compiler systems, refer to mcpp source and its document mcpp-porting.html.

+

All these sources and related documents are provided as an open-source-software.

+

Before going into detail, some of the mcpp features are introduced here.

+

Note:

+

*1 mcpp V.2.6.3 onward provides some binary packages too, at the following site.

+
+

http://mcpp.sourceforge.net/

+
+
+ +

1.1. High portability

+

mcpp is a portable preprocessor, supporting various operating systems, including Linux, FreeBSD and Windows. Its source has a wide portability, and can be compiled by any compilers which support Standard C or C++ (ANSI/ISO C or C++). The library functions used are only the classic ones.

+

To port mcpp to each compiler system, in many cases, one only needs to change some macro definitions in the header files and simply compile it. In the worst case, adding several dozen of lines into a source file would be enough.

+

To process multi-byte characters (Kanji), it supports Japanese EUC-JP, shift-JIS and ISO2022-JP, Chinese GB-2312, Taiwanese Big-5 and Korean KSC-5601 (KSX 1001), as well as UTF-8. For shift-JIS, ISO2022-JP or Big-5, mcpp can complement the compiler-proper if it does not recognize them.

+
+ +

1.2. Standard C mode with highest conformance and other modes

+

mcpp has various behavioral modes. Other than Standard-conforming mode, there are K&R 1st mode, "Reiser" cpp mode and what I call post-Standard mode. mcpp has also an execution option for C++ preprocessor.

+

Different from many existing preprocessors, Standard mode of mcpp has the highest conformance to Standards: all of C90, C99 and C++98. It has been developed aiming to become the reference model of the Standard C preprocessor. Those versions of the Standard can be specified by an execution option. *1

+

In addition, it provides several useful enhancements: '#pragma MCPP debug', which traces the process of macro expansion or #if expression evaluation, and the header file "pre-preprocessing" facility.

+

mcpp also provides several useful execution options, such as warning level or include directory specification options.

+

Even if there are any mistakes in the source, mcpp deals suitably with accurate plain diagnostic messages without running out of control or displaying misguiding error messages. It also displays warnings for portability problems. The detailed documents are also attached.

+

In spite of its high quality, mcpp's code size and memory usage is relatively small.

+

A disadvantage of mcpp, if any, is slower processing speed. It takes two or three times time of GCC 3.*, 4.* / cc1, but seeing that its processing speed is almost the same as that of Borland C 5.5/cpp32 and that it runs a little bit faster when the header file pre-preprocessing facility is used, it cannot be described as particularly slow. mcpp puts an emphasis on standard conformance, source portability and operability in a small memory space, making this level of processing speed inevitable.

+

Validation Suite for Standard C Preprocessing, which is used to test the extent to which a preprocessor conforms to Standard C, its documentation cpp-test.html, which contains results of applying Validation Suite to various preprocessors, are also released with mcpp. When looking through this file, you will notice that so-called Standard-conforming preprocessors have so many conformance-related problems.

+

During the course of developing mcpp V.2.3, it was selected as one of the "Exploratory Software Projects for 2002" by Information-technology Promotion Agency (IPA), Japan, along with its Validation Suite. From July 2002 to February 2003, the project, financed by IPA, proceeded under advice of Yutaka Niibe project manager. I asked "HighWell, Inc." Limited Company, Tokyo, for translation of all the documents. For technical details, I revised and corrected the translated documents.

+

mcpp was continuously adopted to one of the "Exploratory Software Projects" in 2003 by Hiroshi Ichiji project manager. The update of mcpp proceeded into the next version, V.2.4. *2

+

After the project, I am still going on updating mcpp and Validation Suite.

+

Note:

+

*1 ISO/IEC 9899:1990 (JIS X 3010-1993) had been used as C Standard, but in 1999, ISO/IEC 9899:1999 was adopted as a new Standard. This document calls the former C90 and latter C99. The former is generally called ANSI C or C89 because it migrated from ANSI X3.159-1989. ISO/IEC 9899:1990 + Amendment 1995 is sometimes called C95. C++ Standards are ISO/IEC 14882:1998 and its corrigendum version ISO/IEC 14882:2003. This document calls both of them C++98.

+

*2 The outline of the "Exploratory Software Project" can be seen at the following site (Japanese only).

+
+

http://www.ipa.go.jp/jinzai/esp/

+
+

mcpp from V.2.3 through V.2.5 had been located at:

+
+

http://www.m17n.org/mcpp/

+
+

In April 2006, mcpp project moved to:

+
+

http://mcpp.sourceforge.net/

+
+

The old version of mcpp, cpp V.2.2 and Validation Suite V.1.2 are located in the following Vector's web site. They are in the directory called dos/prog/c, but they are not for MS-DOS exclusively. Sources are for UNIX, WIN32, MS-DOS. The documents are Japanese only.

+
+http://www.vector.co.jp/soft/dos/prog/se081188.html
+http://www.vector.co.jp/soft/dos/prog/se081189.html
+http://www.vector.co.jp/soft/dos/prog/se081186.html
+
+

The text files in these archive files available at Vector use [CR]+[LF] as a <newline> and encode Kanji in shift-JIS for DOS/Windows. On the other hand, those from V.2.3 through V.2.5 available at SourceForge use [LF] as a <newline> and encode Kanji in EUC-JP for UNIX. From V.2.6 on two types of archive, .tar.gz file with [LF]/EUC-JP and .zip file with [CR]+[LF]/shift-JIS, are provided.

+
+ +

1.3. Notations in this Manual

+

Though this manual was text-file in the older versions, it has changed to html-file at V.2.6.2.
+This manual uses the following typographical conventions:

+
    +
  • source:
    +Navy colored constant-width font is used for code snippets and command line inputs.
    +
  • __STDC__:
    +Maroon colored constant-width font is used for Standard predefined macros or any other macros found in some codes.
    +
  • STD:
    +Italic font is used for the macros defined in mcpp source file named system.H. This manual uses these names to denote various mcpp settings. Note that these macros are only used in compilation of mcpp, and that the mcpp executable does not have such macros.
    +
+
+ +

2. Invocation Options and Environment Settings

+ +

2.1. Two Kinds of Build and Five Behavioral Modes

+

There are two types of build (or compiling configuration) for mcpp executable. *1, *2

+
    +
  1. Compiler-independent-build: the preprocessor which behaves on its own not depending on compiler system. The invocation options of compiler-independent-build are the same across the compilers with which mcpp is compiled. Although it can preprocess source files, it cannot behave as an integrated part of a compiler system.
    +
  2. Compiler-specific-build: the preprocessor to replace the resident preprocessor of certain compiler system, if possible. Each compiler-specific-build has some different specifications for compatibility with the compiler system. It has the options common with the compiler-independent-build, except a few options different from the commons to avoid conflict with the compiler system.
    +
+

Each mcpp executable has following 5 behavioral modes regardless of the building types.

+
    +
  1. STD: Standards (C90, C99, C++98) conforming mode. This is the default.
    +
  2. COMPAT: A variation of STD mode, which expands recursive macro more than the Standards' specification.
    +
  3. POSTSTD: Special "post-Standard" mode created by the author, based on the Standards and simplified removing all the Standards irregular specifications.
    +
  4. KR: K&R 1st specification mode.
    +
  5. OLDPREP: "Reiser" model cpp mode (old-preprocessor mode).
    +
+

The mode of mcpp is specified by the run-time options as follows:

+
    +
  • -@std
    +The STD mode (default).
    +
  • -@compat
    +The COMPAT mode.
    +
  • -@poststd, -@post
    +The POSTSTD mode.
    +
  • -@kr
    +The KR mode.
    +
  • -@oldprep, -@old
    +The OLDPREP mode.
    +
+

In this document, I group OLDPREP and KR into pre-Standard modes, and group STD, COMPAT and POSTSTD into Standard modes. Since COMPAT mode is almost the same with STD mode, STD includes COMPAT unless otherwise mentioned. *3

+

There are differences in the macro expansion methods between Standard and pre-Standard modes. Roughly speaking, this difference is the difference between C90 and pre-C90. The biggest difference is the expansion of the function-like macros (macros with arguments). For the arguments with macros, while in Standard mode, mcpp substitutes the parameter within the replacement list of the original macro after completely expanding the arguments, in pre-Standard, mcpp substitutes the parameter without expanding, then expands the argument at rescan time.

+

Also, in Standard mode, a macro is not expanded recursively in principle, even if the macro definition is recursive directly or indirectly. If there is a recursive macro definition in pre-Standard mode, it causes infinite recursion and becomes an error at expansion time.

+

Handling of \ at line end is also different by mode. In Standard mode, after processing the trigraph, the sequence of <backslash><newline> gets deleted before tokenization, but in pre-Standard mode, these only get deleted when they are within the string literals or in a #define line.

+

There is a subtle difference in tokenization (token parsing, decomposition to tokens). In Standard mode, it tokenizes on "token based processing" principle. To put it concretely, in Standard mode, spaces will be inserted surrounding the expanded macro to prevent the unexpected merging with its adjacent tokens. In pre-Standard mode, traditional, convenient and tacit tokenization and the macro expansion methods of "character based text replacement" are left a trace. About these, please see cpp-test.html#2.

+

In Standard mode, it handles the numeric token, called preprocessing number, according to the Standard specification. In pre-Standard, the numeric tokens are the same as integer constant tokens or floating point tokens. The suffix 'U', 'u', 'LL' and 'll' of the integer constant and the suffixes 'F', 'f', 'L' and 'l' of floating point are not recognized as a part of the tokens in pre-Standard.

+

The string literals and character constants of wide characters are recognized as single tokens only in Standard mode.

+

Digraph, #error, #pragma, and _Pragma() operator are available only in Standard mode. Also, -S <n> option (strict-ansi specs) and -+ option (the one run as C++ preprocessor) are used only in Standard mode. Pre-defined macros __STDC__, __STDC_VERSION__ are defined in Standard mode, and they don't get defined in pre-Standard.

+

#if defined, #elif cannot be used in pre-Standard mode. Macros cannot be used within argument of #include or #line in pre-Standard. Predefined macros, __FILE__, __LINE__, __DATE__, __TIME__ are not defined at pre-Standard.

+

On the other hand, #assert, #asm (#endasm), #put_defines and #debug are available in pre-Standard mode only.

+

#if expression is evaluated in long / unsigned long or long long / unsigned long long at Standard mode, and in (signed) long only at pre-Standard. sizeof (type) in #if expression can be used only in pre-Standard.

+

Trigraphs and UCN (universal character name) are available only in STD mode.

+

The output of diagnostic messages is also slightly different between the modes. Please see chapter 5 for details.

+

Any other items, which do not have any distinct rules between K&R 1st and the Standards, follow the C90 rules in pre-Standard mode.

+

The difference of OLDPREP mode from KR mode and the difference of POSTSTD and COMPAT modes from STD mode are as follows:

+
    +
  • OLDPREP
    +
      +
    1. Convert comment to 0 space instead of 1 space. Usually this conversion is done in the output at the end. In macro definition, however, the conversion is done immediately after the definition.
      +
    2. When there are string literals or character constants in the replacement list of the macro definition, and if any of the parameter names match to any part of these, that part will be substituted with the argument corresponding to the parameter when calling the macro. That is to say, when the content of the string literal or character constant is searched as token sequence, stripping the enclosing quotes, if a parameter name is found, that will be substituted.
      +
    3. You can write anything you like in the lines of #else, #endif. (One usually writes MACRO of corresponding #if MACRO or #ifdef MACRO.)
      +
    4. It stops "unterminated string literal" and "unterminated character constant" errors. If there is no closure of the literal " or ', it assumes the close at line end.
      +
    5. It treats '# 123' line as '#line 123'.
      +
    +
    +
  • COMPAT
    +Expand recursive macro more than the Standard's specification. On expanding recursive macro, set the range of non-re-replacing of the same name narrower than the Standard.
    +
    +Refer to cpp-test.html#3.4.26 about the specifications of recursive macro expansion. See test-t/recurs.t for a sample of recursive macro. *4
    +
    +
  • POSTSTD
    +This mode differs from STD mode in the following points:
    +
      +
      +
    1. Does not recognize trigraphs. Digraphs are converted at translation phase 1, that is, the beginning of preprocessing. Does not deal with digraph as a token.
      +
    2. Simplified tokenization according to complete token-base rule. When there is no white space, as a token separator between preprocessing tokens in the source code, insert a space automatically. (However, this does not get inserted between macro name and the following "(" within macro definition). Therefore, even for stringizing by # operator, it gets stringized after a space is inserted between all the preprocessing tokens. Also, at the re-definition of macros, it does not matter whether there is a token separator or not.
      +
    3. At the re-definition of function-like macros, the difference of the parameter name is not relevant.
      +
    4. Character constants cannot be used in #if expressions (it will cause an error).
      +
    5. It removed irregular "function-unlike" rules for function-like macro expansion. Hence, rescanning only targets to the replacement list of the macro, and not the sequence after that.
      +
    6. Normally, the header name with the format of #include <stdio.h> is accepted, but it gets a warning. (by class 2 warning option.) If the header name with the format of <stdio.h> is used in a macro, it can get an error at a particular instance. It recommends to use the format of #include "stdio.h".
      +
    7. The rule, a space is required between macro name and replacement list in macro definition, is added in C99, but this rule is not complied with. (A space is inserted automatically at tokenization.)
      +
    8. UCN (universal-character-name) is not recognized. Multi-byte characters in identifier are not recognized.
      +
    9. In C++, eleven identifier-like operators are not dealt as operators.
      +
    +
+

Moreover, there is a mode called lang-asm. +That is a mode to process anomalous sources which are assembler sources and nevertheless have comments, directives and macros of C embedded. +While POST_STD cannot become this mode, STD, KR and OLD get to this mode when specified by an option. +See 2.5 for its specifications.

+

For the above reasons, there are some different specifications in mcpp executables. So, please read this manual carefully. This chapter describes first the common options, next the behavioral-mode-dependent options, then the the options common to most compiler systems, finally the compiler-dependent options for each compiler-specific-build.

+

Note:

+

*1 There is another one named subroutine-build which is called as a subroutine from some other main program. The behavioral specification of subroutine-build is, however, the same with either of compiler-specific-build or compiler-independent-build according to its compile time setting. Hence, this manual does not mention subroutine-build particularly. +As for subroutine-build, refer to mcpp-porting.html#3.12.

+

*2 The binary packages provided at the SourceForge site are of compiler-independent-builds.

+

*3 mcpp had two separate executables for Standard mode and pre-Standard mode; they were integrated into one at V.2.6.

+

*4 This option is for compatibility with GCC, Visual C++ and other major implementations. 'compat' means "compatible mode".

+
+ +

2.2. How to Specify Invocation Options

+

The <arg> and [arg] shown below indicate required and optional arguments respectively. Note that the <, >, [, or ] character itself must not be entered.

+

mcpp invocation takes a form of:

+
+mcpp [-<opts> [-<opts>]] [in_file] [out_file] [-<opts> [-<opts>]]
+
+

Note that you have to replace the above "mcpp" with other name, depending on how mcpp is installed.

+

When out_file (an output path) is omitted, stdout is used unless the -o option is specified. When in_file (an input path) is omitted, stdin is used. A diagnostic message is output to stderr unless the -Q option is specified.

+

If any of these files cannot be opened, preprocessing is terminated, issuing an error message.

+

For an option with argument, white-space characters may or may not be inserted between the option character and an argument. In other words, both of "-I<arg>" and "-I <arg>" are acceptable. For options without argument, both of "-Qi" and "-Q -i" are valid.

+

For an option with an argument, missing a required argument causes an error except for the -M option,

+

If -D, -U, -I, or -W option is specified multiple times, each of them is valid. For -S, -V, or -+ option, only the first one is valid. For -2, or -3 option, its specification switches each time an option is specified. For other options, the last one is valid.

+

The option letters are case sensitive.

+

The switch character is '-', not '/', even under Windows.

+

When invalid options are specified, a usage statement is displayed. To check valid options, enter a command, such as "mcpp -?". In addition to the usage message, there are several error messages, but they are self-explanatory. I will omit their explanations.

+
+ +

2.3. Common Options

+

This section covers common options across mcpp modes or compiler systems.

+
    +
  • -C
    +Output also comments in source code. This option is useful for debugging. Note that a comment is moved ahead of a logical source line when output. This is because a comment is processed before macro expansion or directive processing, and a comment may appear during a macro invocation.
    +
    +
  • -D <macro>[=[<value>]]
    +
  • -D <macro(a,b)>[=[<value>]]
    +Define a macro named "macro". This option can be used to change the definitions of predefined macros other than __STDC__, __STDC_VERSION__, __FILE__, __LINE__, __DATE__, __TIME__ and __cplusplus. (__STDC_HOSTED__, C99's predefined macro, is exceptionally redefined by this option, because some compiler systems, like GCC V.3, use the -D option to define __STDC_HOSTED__.) To specify a value, use "=<value>". If "=<value>" is omitted, 1 is assumed. (Note that in bcc32, the macro is defined as zero-token by default.) Do not enter white-space characters immediately before "=". If a white-space character is entered immediately after "=", the macro is defined as zero token.
    +A macro with arguments can be defined by this option.
    +This option can be specified repeatedly.
    +
    +
  • -e <encoding>
    +Change a multi-byte character encoding to <encoding>. For <encoding>, refer to 2.8.
    +
    +
  • -I <directory>
    +Specify the first directory in the include directory search path order with <directory>. For a search path, refer to 4.2. If a directory name contains spaces, it has to be enclosed with " and ".
    +
    +
  • -I 1, -I 2, -I 3
    +Specify a directory from which mcpp begins searching when it encounters a #include "header" directive (i.e. not <header> format). -I1, -I2 and -I3 indicate the current directory, the source file (i.e. includer) directory, and the both respectively. For details, see 4.2.
    +
    +
  • -j
    +On outputting a diagnostic message, mcpp displays only one line of diagnostic without additional information, such as source lines. (By default, one line of diagnostic message is followed by a source code line having a problem. If the source code line in question is found in a #included file, all the #including file names and including line numbers are also displayed in sequence. For a diagnostic on macro, mcpp displays also its definition information).
    +When Validation Suite is used in the GCC testsuite, this option has to be specified to output a diagnostic message in the same format as GCC.
    +
+

The -M* options are to output source file dependency lines for makefile. When there are several source files and the -M* option is specified for each of these source files to process and merge the outputs into a file, dependency description lines are aligned. These options are similar to those of GCC, but there are several differences. *1

+
    +
  • -M
    +Output lines that describe dependency among source files. The output destination is the file specified in a command line, or stdout if omitted. If a dependency description is too long to fit in a line, it is folded over the next lines. The preprocessing result is not output.
    +
    +
  • -MM
    +Almost the same with -M, except that the following header files are not output.
    +
      +
    1. Files specified in the format of #include <stdio.h>.
      +
    2. Files specified using an absolute path name, such as #include "/usr/include/stdio.h".
      +
    3. Files specified in the format of #include "stdio.h" that are found not in the current or source directory, depending on compiler systems or the -I <n> option, but in system include directories, including those specified with the -I <directory> option or with environment variables.
      +
    +But, GCC-specific-build differs from this, it output the header files excluding only system headers, as GCC does.

    +
  • -MD [FILE]
    +Almost the same with -M, except that the preprocessing result is output to the specified file on a command line or stdout. If FILE is specified, mcpp outputs dependency description lines to that file. Otherwise, they are output to a file having the same base filename with the source file and the suffix of ".d" instead of ".c".
    +
    +
  • -MMD [FILE]
    +Almost the same with -MD, except that, like -MM, the files that are regarded as system header are not output. An output file mcpp outputs dependency description lines to is same as -MD [FILE].
    +
    +
  • -MF FILE
    +The dependency lines are output to FILE. -MF FILE takes precedence over -MD FILE or -MMD FILE.
    +
    +
  • -MP
    +"Phony targets" are also output. Each included file can be written as a phony target without a dependency as follows:
    +
    +test.o: test.c test.h
    +test.h:
    +
    +
  • -MT TARGET
    +The target name is specified as TARGET not foo.o. -MT '$(objpfx)foo.o' outputs the following line.
    +
    +$(objpfx)foo.o: foo.c
    +
    +
  • -MQ TARGET
    +Same as -MT, except that a string that has a special meaning to 'make' is 'quoted' as follows:
    +
    +$$(objpfx)foo.o: foo.c
    +
    +
  • -N
    +Disable all the predefined macros, including those that begin with "_", except for the ones required by Standards and __MCPP. The Standard predefined macros include __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__, as well as __STDC_HOSTED__ for C99 and __cplusplus for C++. If you want to disable __MCPP, use the -U option.
    +
    +
  • -o <file>
    +Output the preprocessed source to the file. If this option is omitted, the second file argument is regarded as an output path, so this option is not necessary, however, some compiler drivers use this option.
    +
    +
  • -P
    +Do not output line number information for the compiler-proper. This option is specified when you want to use mcpp for purpose other than C preprocessing.
    +
    +
  • -Q
    +Output diagnostic messages to the "mcpp.err" file in the current directory. As these messages are appended to this file, it may become bigger. Delete it from time to time.
    +
    +
  • -U <macro>
    +Undefine predefined macro named "macro". This option cannot undefine __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, __STDC_VERSION__ (and __STDC_HOSTED__ for C99), as well as __cplusplus invoked with -+ options.
    +
    +
  • -v
    +Output the mcpp version and a search order of include directories to stderr.
    +However, when -K option, explained at 2.4, is specified or #pragma MCPP macro_call directive, explained at 3.5.8, is specified, this option changes its meaning.
    +
    +
  • -W <level>
    +Specify a warning level with <level>. <level> should be 0 or "OR" of any one or more values of 1, 2, 4, 8 and 16. 1, 2, 4, 8 or 16 indicates a warning class. For example, if -W 5 is specified, warnings of classes 1 and 4 are output. If 0 is specified, no warnings are output. If this option is specified several times, all the specified values are "ORed" together. For example, -W 1 -W 2 -W 4 is equivalent to -W 7. Instead of -W 7 you can also write as -W "1|2|4". (Enclose with " and " so as | is not interpreted as a pipe.) If this option is omitted, -W 1 is assumed. For warning messages, refer from 5.5 through 5.9.
    +
    +
  • -z
    +The preprocessing results of the #included files are not output, but macros are defined. The #include lines themselves are output instead, though #include lines in an included file is not output. This option is used in debug of preprocessing.
    +
+

Note:

+

*1 mcpp differs from GCC in that:

+
    +
  1. mcpp does not provide the -MG option because its option specification is too complicated. (Therefore, I will omit its explanation.) The -M option can substitute for the -MG option because when include files cannot be found using the -M option, mcpp fails but outputs dependency description lines.
    +
  2. mcpp, other than GCC-specific-build, excludes a wider range of header files when using the -MM and -MMD options.
    +
+
+ +

2.4. Options by mcpp Behavioral Modes

+

mcpp has several behavioral modes. For their specifications refer to sec 2.1.

+

This manual shows a list of various mcpp behaviors by mode, which may not be readable. Please be patient. In this manual, all the uppercased names that do not begin with "__" and displayed in italics, such as DIGRAPHS_INIT, TRUE, FALSE, etc, are macros defined in system.H. These macros are only used for compiling mcpp itself and a mcpp executable generated does not predefine these macros. You must understand this point clearly.

+

The following options are available in Standard mode:

+
    +
  • -+
    +Behave as C++ preprocessor. mcpp predefines the __cplusplus macro (its value is defined in system.H and defaults to 1), interprets the text from // to the end of a logical line as a comment and recognizes "::", ".*", "->*" as a single token. It evaluates "true" and "false" tokens in a #if expression to 1 and 0, respectively. If __STDC__ and __STDC_VERSION__ are defined, they are undefined. (For GCC-specific-mcpp, __STDC__ is not undefined for compatibility with GCC.) The predefined macros that do not begin with "_" are also undefined. However, extended characters are not converted to UCN. *1, *2
    +
    +
  • -2
    +Reverse initial settings for the digraphs processing. With DIGRAPHS_INIT == FALSE, mcpp recognizes digraphs. Otherwise, it doesn't.
    +
    +
  • -h <n>
    +Define the value of __STDC_HOSTED__ macro with <n>.
    +
    +
  • -S <n>
    +Change the value of __STDC__ to <n> in C. In C++, this option is ignored. The range of <n> has to be 0-9. With <n> set to 1 or higher, the predefined macros that do not begin with "_", such as unix, linux, are disabled. S indicates __STDC__. If this option is omitted, __STDC__ is set to a default value (i.e. 1).
    +For a GCC-specific-build, -pedantic, -pedantic-errors, or -lang-c89 is equivalent to -S1, so the next -S is ignored. +This option does not disable the non-conforming predefined macros such as unix, linux, i386 for compatibility with GCC. +These macros are disabled only by -ansi or -std=iso* options.
    +
    +
  • -V <value>
    +Change the values of the predefined macros __STDC_VERSION__ for C and __cplusplus for C++ to <value>. <value> is of a long type. (In C95, C99, and C++ Standard, this value is set to 199409L, 199901L and 199711L, respectively.) With __STDC__ set to 0, __STDC_VERSION__ is always set to 0L, overriding the -V option.
    +
    +If this option is omitted for C, __STDC_VERSION__ is set to the value of STDC_VERSION in system.H. (For GCC V.2.7 - V.2.9, 199409L. For others, 0L.) If specifying -V199901L results in __STDC_VERSION__ >= 199901L, mcpp conforms to the following C99 specifications (See 3.7.):
    +
    +
      +
    1. Treats the text from // to the end of a line as a comment. *3
      +
    2. Allows the sequence of p+, P+, p-, and P-, as well as e+, E+, e-, and E-, in the preprocessing-number. This is to represent a bit pattern of a floating-point number in Hex, like 0x1.FFFFFEp+128.
      +
    3. Enables the _Pragma operator (A _Pragma( "foo bar") has the same effect as specifying a #pragma foo bar.)
      +
    4. mcpp compiled with the EXPAND_PRAGMA macro set to TRUE will macro-expand an argument on a #pragma line that does not begin with STDC or MCPP. (By default, EXPAND_PRAGMA is set to FALSE in other than Visual C-specific-build and Borland C-specific-build, so macro expansion does not occur.)
      +
    5. Allows an escape sequence of Universal-Character-Name (UCN) in identifiers, character constants, string literals and pp-numbers. (This is only enabled in STD mode.)
      +
    +Note that although C99 provides for variable argument macros, mcpp allows them in the C90 and C++ modes. *4
    +
    +In C++ also, when specifying -V199901L results in __cplusplus >= 199901L, mcpp will enter the C99 compatibility mode, providing the above 2-4 enhancements. (1 is enabled unconditionally and 5 is almost the same.) These are mcpp's own enhancements that do not conform to the C++ Standard.
    +
    +The -D option cannot be used with __STDC__, __STDC_VERSION__, and __cplusplus. This is to distinguish system-defined macros from user-defined ones.
    +
+

The following option is available for STD mode:

+
    +
  • -3
    +Reverse initial settings for the trigraphs processing. With TRIGRAPHS_INIT == FALSE, mcpp recognizes trigraphs. Otherwise, it does not.
    +
  • -K
    +Enable macro notification mode which embeds macro notifications into comments. This mode is designed to allow reconstruction of the original source position from the preprocessed output. The primary purpose of the macro notification mode is to allow C/C++ refactoring tools to refactor source code without having to implement a special-purpose C preprocessor. This mode is also handy for debugging macro expansions. The goal for macro expansion mode is to annotate every macro expansion, while still allowing the code to be compiled. *5
    +This mode is also enabled by the following pragma: +
    +#pragma MCPP debug macro_call
    +
    +The -K option has almost the same effect with this pragma at top of an input file except predefined macros are notified only by this option. +About the specs of macro notification, see 3.5.8. #pragma MCPP debug macro_call.
    +This option implies -k option. +The -v option changes its meaning in this mode, and outputs more verbose notations. +On the other hand, -a (-x assembler-with-cpp) or -C options automatically disable -K option. *6
    +
  • -k
    +Keep horizontal white spaces ('\t' and space characters) without squeezing them into one space. +Comment is converted to spaces of the same length. +This option is to keep column position of source file in preprocessed output except within macro expansion. (Column position of macros are known by -K option.) *7 +
+

Note:

+

*1 C++'s __STDC__ is not desirable and causes many problems. GCC document says that __STDC__ needs to be predefined in C++ because many header files expect __STDC__ to be defined. The header files should be blamed for this. For common parts among C90, C99 and C++, "#if __STDC__ || __cplusplus" should be used.

+

*2 Different from C99, the C++ Standard makes much of UCN. So did C 1997/11 draft. Half-hearted implementation is not permitted. However, implementing Unicode in earnest is too much burden for preprocessor.

+

*3 In C90 mcpp treats // as a comment but issues a warning.

+

*4 This is for compatibility with GCC.

+

*5 If you install GCC-specific-mcpp, cc1 (cc1plus) is set to be handed from mcpp preprocessed file with -fpreprocessed option. +Though this option means that the input is already preprocessed, +cc1 still processes comment. +Therefore, you can safely pass output of -K to cc1 with -fpreprocessed. +Furthermore, if you add -save-temps option to gcc (g++) command, preprocessed output is left as *.i (*.ii) file, and you can read it by some refactoring tool.

+

*6 Comment insertion by -K option causes column shifts in sources, and this makes *.S file of GCC, which is not C/C++ source and compiled with -x assembler-with-cpp option, unable to be assembled. +Also comments kept by -C option are sometimes confusing with that inserted by -K option. +Therefore these options cannot be used at the same time.

+

*7 This option fails to keep column position on some particularly complex cases. +When line splicing by a <backslash><newline> and line splicing by a line-crossing comment are intermingled on one output line, or a comment crosses over 256 lines, column position will be lost. +Note that each '\v' and '\f' is converted to a space with or without this option.

+
+ +

2.5. Common Options Except for Some Compiler Systems

+

The following 2 options can be used on UNIX-like systems, for either of compiler-independent-build and GCC-specific-build. +On GCC-specific-build, however, these will get an error if the GCC does not support them.

+
    +
  • -m32
    +Predefine macros for 32bit mode. +If the CPU is x86_64 or ppc64, predefined macros for 64bit mode are used by default. +With this option, however, those for i386 or ppc respectively are used.
    +
  • -m64
    +Predefine macros for 64bit mode. +If the CPU is i386 or ppc, predefined macros for 32bit mode are used by default. +With this option, however, those for x86_64 or ppc64 respectively are used.
    +
+ +

Since GCC has so many options that GCC-specific-build of mcpp has some different options from the other builds in order to avoid conflicts with GCC. Note that the options in compiler-independent-build are all the same even if compiled by GCC. The options common to the builds other than GCC-specific are as follows.

+
    +
  • -a
    +Accept the following notations used in some assembler sources without causing an error.
    +
      +
    1. +
      +#APP
      +
      +

      If the token that follows the line top # does not agree with any of C directives as above, mcpp outputs this line as it is without causing an error.

      +
    2. +
      +# + any comment.
      +
      +

      If the token that follows the line top # is not even an identifier nor pp-number, mcpp discards the line with a warning, without causing an error.

      +
    3. +
      +"A very very
      +long long
      +string literal"
      +
      +

      The above old-fashioned string literals are concatenated into "A very very\nlong long\nstring literal".

      +
    4. Even if token concatenation using a ## operator generates an invalid pp-token, it is not regarded as error.

      +
    5. mcpp does not insert spaces around a macro expansion result, and does not regard an unintended token merging of the macro expansion result with its adjacent token as an error.
      +
    +

    These sometimes happen to GNU source code, however, this option for GCC is -x assembler-with-cpp or -lang-asm.
    +This option cannot be used in POSTSTD mode.
    +This manual calls this mode lang-asm mode.
    +This mode is recommended when you use mcpp as a macro processor for some text other than C/C++, for example, as a cpp called from xrdb.

    +
  • -I-
    +Cancel default include directories and enable only ones specified with an environment variable and the -I option. Instead of -I-, GCC-specific-build uses -nostdinc. In GCC, the -I- option provides quite different functionality. See 2.6.
    +
+
+ +

2.6. Options by Compiler System

+

To use mcpp replacing the compiler system's resident preprocessor, install it in the directory where the resident preprocessor is located under an appropriate name. Before copying mcpp, be sure to change the name of resident preprocessor so that it may not be overwritten.

+

For settings on Linux, FreeBSD, or CygWIN see 3.9.5. +For settings in GCC 3.*, 4.*, see also 3.9.7, and 3.9.7.1. +For MinGW, see 3.9.7.1.

+

Possibly the compiler driver cannot pass some options to mcpp in a normal manner. However, GCC provides the -Wp almighty option to allow you to pass any options to the preprocessor. For example, if you specify as follows:

+
+gcc -Wp,-W31,-Q23
+
+

The -W31 and -Q23 options are passed to preprocessor. The options you want to pass to preprocessor have to be specified following -Wp with each option delimited by ", ". *1, *2

+

For other compiler systems, if their compiler driver source is available, it is recommended that this type of an almighty option should be added to the source. If you modify the compiler driver source code in the way that, for example, when -P<opt> is specified, only -<opt> is passed to preprocessor, it would be very convenient because any options can be passed.

+

An alternative way to use all the options of mcpp is to write a makefile in which first preprocess with mcpp, then compile the output file of mcpp as a source file. For this method, refer to sections 2.9 and 2.10.

+

The following options are available for some compiler-specific-builds. The compiler-independent-build has not these options, of course.

+ +

The following options are available for the LCC-Win32-specific-build.

+
    +
  • -g <n>
    +Define the __LCCDEBUGLEVEL macro as <n>.
    +
  • -O
    +Defines the __LCCOPTIMLEVEL macro as 1.
    +
+

The following options are available for the Visual C-specific-build.

+
    +
  • -arch:SSE, -arch:SSE2
    +Define the macro _M_IX86_FP as 1, 2 respectively.
    +
  • -Fl <file>
    +Same as -include <file> for GCC.
    +
  • -G<n>
    +If <n> is one of 3, 4, 5, 6, B, define the macro _M_IX86 as 300, 400, 500, 600, 600, respectively.
    +
  • -GR
    +Define the macro _CPPRTTI to 1.
    +
  • -GX
    +Define the macro _CPPUNWIND to 1.
    +
  • -GZ
    +Define the macro __MSVC_RUNTIME_CHECKS to 1.
    +
  • -J
    +Define the macro _CHAR_UNSIGNED to 1.
    +
  • -RTC*
    +If -RTC1, -RTCc, -RTCs, -RTCu and such option is specified, define the macro __MSVC_RUNTIME_CHECKS to 1.
    +
  • -Tc, -TC
    +Specify that the source is written in C. The result is same with or without this option.
    +
  • -Tp, -TP
    +Same as -+.
    +
  • -u
    +Same as -N.
    +
  • -Wall
    +Same as -W17 (-W1 -W16).
    +
  • -WL
    +Same as -j.
    +
  • -w
    +Same as -W0.
    +
  • -X
    +Same as -I-.
    +
  • -Za
    +Undefine the macro _MSC_EXTENSIONS and prohibit '$' in identifiers.
    +
  • -Zc:wchar_t
    +Define the macros _NATIVE_WCHAR_T_DEFINED and _WCHAR_T_DEFINED to 1.
    +
  • -Zl
    +Define the macro _VC_NODEFAULTLIB to 1.
    +
+ +

mcpp on Mac OS X accepts the following option, on both of GCC-specific-build and compiler-independent-build.

+
    +
  • -F <framework>
    +Put the <framework> directory to top of the framework directories to search. +The standard framework directories are /System/Library/Frameworks and /Library/Frameworks by default. +
+

mcpp on Mac OS X accepts the following option on GCC-specific-build.

+
    +
  • -arch <arch>
    +Change the target architecture of machine as <arch> from the default one. +This causes changes of some predefined macros. +<arch> should be i386 or x86_64 on the preprocessor for x86, ppc or ppc64 on the one for ppc. +(You can specify any of these 4 for gcc command. +gcc command invokes the preprocessor for x86 on '-arch i386' or '-arch x86_64' options, and the one for ppc on '-arch ppc' or '-arch ppc64' options.) +
+

The following options (until at the end of this 2.6 section) are available for the GCC-specific-build. Note that since __STDC__ is set to 1 for GCC, the result is same with or without the -S1 option.

+

The followings are available across the modes.

+
    +
  • -$
    +Same as -fno-dollars-in-identifiers.
    +
  • -b
    +Output line number information just like C sources.
    +The format used to pass the line number information from a preprocessor to compiler-proper is usually as follows:
    +
    +#line 123 "filename"
    +
    +Most compiler systems can use this C source format, but some systems cannot. The default specification of mcpp is such that, in compiler-specific-build for the compiler systems that cannot use the C source format, mcpp outputs the line number information in a format that the compiler-proper can accept it.
    +However, with this option specified, even in compiler-specific-build for the compiler systems that do not accept the C source format outputs the line number information in that format. This option is used with '#pragma MCPP preprocess' to pre-preprocess header files.
    +
  • -dD, -dM
    +Output valid macro definitions in the form of #define lines at the end of preprocessing.
    +With the -dD option specified, the preprocessing result is output too. Predefined macros are not output.
    +With the -dM option specified, the preprocessing result is not output, and predefined macros are output except the Standard predefined ones. *3, *4
    +
  • -fexceptions
    +Define the macro __EXCEPTIONS to 1.
    +-fno-exceptions does not define this macro.
    +
  • -finput-charset=<encoding>
    +Same as -e <encoding>. Note that GCC convert the <encoding> to UTF-8 by this option, whereas mcpp does not convert any encoding.
    +
  • -fno-dollars-in-identifiers
    +Prohibit '$' in identifiers. (Allow it by default.)
    +
  • -fPIC, -fpic, -fPIE, -fpie
    +Any of these options defines both of the macro __PIC__, __pic__ to 1. +
  • -fstack-protector
    +Define the macro __SSP__ to 1.
    +
  • -fstack-protector-all
    +Define the macro __SSP_ALL__ to 2.
    +
  • -fworking-directory
    +Emit a special line as the second line of preprocessor's output to convey the current working directory.
    +
  • -I-
    +Switch the specification of the -I <directory> before and after this option; directories specified with the -I options before -I- are used to search for header files only in the form of #include "header.h"; the directories specified with -I after -I-, if any, are used to search for all #include directives. In addition, during the former search, includer's directories are not used.
    +
  • -include <file>
    +include the <file> before processing the main source file. This is equivalent to writing #include <file> at the beginning of the main source file.
    +
  • -iquote <dir>
    +Add <dir> to the include path for #include "header.h" form.
    +
  • -isysroot=<dir>, -isysroot <dir>, --sysroot=<dir>, --sysroot <dir>
    +Use <dir> as the logical root directory for system headers, that is, prefix <dir> to the path-list of system header directory. +For example, if the default include directory is /usr/include and <dir> is /Developer/SDKs/MacOSX10.4u.sdk, then alter the include directory to /Developer/SDKs/MacOSX10.4u.sdk/usr/include.
    +
  • -isystem <dir>
    +Add <dir> to the include path immediately before system-specific directories and immediately after site-specific directories.
    +
  • -lang-c, -x c
    +Perform C preprocessing. The same as not specifying this option at all.
    +
  • -mmmx
    +Predefine a macro __MMX__ to 1.
    +-mno-mmx undefines __MMX__.
    +
  • -nostdinc
    +Same as -I- for other compiler systems.
    +
  • -undef
    +Same as -N.
    +
  • -O?
    +If ? is a non-0 digit, define a macro __OPTIMIZE__ to 1.
    +
  • -Wcomment, -Wcomments
    +Same as -W1. The result is same with or without this option.
    +
  • -Wtrigraphs
    +Same as -W16.
    +
  • -Wall
    +Same as -W17. (With -Wall, mcpp does not issue class 2 and 4 warnings because these warnings are issued frequently and annoying for Linux or some other system's standard header files. Class 8 warnings are generally surplus and bothering, but are helpful to confirm portability and etc. To use this option, be sure to specify gcc -Wp,-W31.)
    +
  • -w
    +Same as -W0.
    +
+

The following options are available for Standard mode.

+
    +
  • -ansi
    +Define macro __STRICT_ANSI__ as 1. +Disable non-conforming predefined macros such as linux, i386.
    +Do not remove comma preceding absent variable argument of GCC-spec variadic. *5
    +
  • -digraphs
    +Recognize digraphs. Digraphs specification is also reversed by -2.
    +
  • -lang-c89, -std=gnu89
    +Same as -S1. Not only C90 but also C95 specifications are used. The result is same with or without this option.
    +
  • -std=c89, -std=c90
    +Almost same as -S1, except these imply -ansi.
    +
  • -lang-c99, -lang-c9x, -std=gnu99, -std=gnu9x
    +Same as -V199901L.
    +
  • -std=c99, -std=c9x
    +Same as -V199901L and also imply -ansi.
    +
  • -lang-c++, -x c++
    +Perform C++ preprocessing. Same as -+.
    +
  • -std=c++98
    +Same as -+ and also implies -ansi.
    +
  • -pedantic, -pedantic-errors
    +Same as -W7 (i.e. -W1 -W2 -W4).
    +
  • -std=iso<n>:<ym>
    +Specify a version of C Standard. To specify C, <n> is 9899 and C++, 14882. If <n> is 9899, <ym> is any of 1990, 199409, 1999 and 199901. If <n> is 14882, <ym> is 199711. If you enter other value than these in <ym>, __STDC_VERSION__ or __cplusplus is set to that value. In this case, <ym> must be specified in six digits, like 200503.
    +These options imply -ansi. +On the other hand, -std=gnu* do not imply -ansi, also -pedantic does not imply -ansi.
    +
+

For STD mode, following options are available. (These cannot be used in POSTSTD mode.)

+
    +
  • -lang-asm, -x assembler-with-cpp
    +Same as -a for other compiler systems. +Specify lang-asm mode. +In GCC-specific-build, a macro __ASSEMBLER__ is defined to 1, and '$' in identifiers are prohibited. +When the main source file is named *.S, lang-asm mode is implicitly specified without this option.
    +
  • -trigraphs
    +Recognize trigraphs. Trigraphs specification is also reversed by -3.
    +
+

The following option is available for pre-Standard mode of GCC-specific-build.

+
    +
  • -traditional, -traditional-cpp
    +Same as -@old.
    +
+

The next option is available on CygWIN GCC-specific-build.

+
    +
  • -mno-cygwin
    +Alter the include directory from /usr/include to /usr/include/mingw, and alter the predefined macros from the ones for cygwin1.dll to the ones for msvcrt.dll.
    +
+

mcpp neither makes the following options an error nor does anything about them. (It sometime issues a warning.)

+
    +
  • -A <predicate(answer)>
    +mcpp ignores this option. In GCC, this option is equivalent to writing #assert <predicate (answer)> in the source code. Standard C, does not permit extension directives other than #pragma. Fortunately, so far, gcc, by default, passes an equivalent macro with the -D option, so there are no actual problems unless a source program uses #assert, which is a rare case.
    +
    +
  • -g <n>
    +
  • -idirafter <dir>
    +
  • -iprefix <dir>, -iwithprefix <dir>, -iwithprefixbefore <dir>
    +
  • -noprecomp
    +
  • -remap
    +
+

In GCC V.3.3 or later, preprocessor has been absorbed into compiler, and independent preprocessor does not exist. Moreover, gcc often passes to preprocessor the options not for preprocessor, even if it is invoked with -no-integrated-cpp option. GCC-specific-build of mcpp for V.3.3 or later ignores the following options, if it cannot recognize them, as that kind of false options.

+
    +
  • -c
    +
  • -E
    +
  • -f*
    +
  • -m*
    +
  • -quiet
    +
  • -W*
    +
+

Note:

+

*1 -Wa and -Wl are almighty options for assembler and linker, respectively. The documentation on UNIX/System V/cc describes these options. Probably, GCC provides the -W<x> option for compatibility.

+

*2 In GCC V.3, cpp was absorbed into cc1 (cc1plus). Therefore, the options specified with -Wp are normally passed to cc1 (cc1plus). To have cpp (cpp0), not ccl, preprocess, the -no-integrated-cpp option must be specified on gcc invocation.

+

*3 GCC V.3.3 or later predefines several dozen of macros. -dD option does not regard these macros as predefined and output them.

+

*4 The output of -dM option is similar to that of '#pragma MCPP put_defines' ('#put_defines') with the following differences:

+
    +
  1. 'put_defines' outputs also Standard predefined macros as comments.
    +
  2. 'put_defines' outputs also the file name and the line number of the macro definition as a comment, arranging to readable format. On the other hand, -d* options output in the same simple format with GCC, because some makefiles expect that format.
    +
+

*5 Refer 3.9.6.3.

+
+ +

2.7. Environment Variables

+

In compiler-independent-build of mcpp, the include directories are not set up other than /usr/include and /usr/local/include in UNIX systems. Other directories, if required, must be specified using environment variables or runtime options. The environment variable in compiler-independent-build is INCLUDE for C and CPLUS_INCLUDE for C++. Searching the file starts from the includer's source directory by default. (refer to 4.2 for the search rule.) Besides, in Linux there is a confusion of include directories, hence special setup is necessary to cope with this problem. +Refer to 3.9.9 for the problem.

+

For the default include directories on GCC-specific-build, refer to noconfig/*.dif files, and for search rule and environment variable name, refer to 4.2.

+

For the environment variable LC_ALL, LC_CTYPE, LANG, refer to 2.8.

+
+ +

2.8. Multi-Byte Character Encodings

+

mcpp can process various multi-byte character encodings as follows.

+
+ + + + + + + + +
EUC-JP Japanese extended UNIX code (UJIS)
shift-JIS Japanese MS-Kanji
GB-2312 EUC-like Chinese encoding (Simplified Chinese)
Big-Five Taiwanese encoding (Traditional Chinese)
KSC-5601 EUC-like Korean encoding (KSX 1001)
ISO-2022-JP1International standard Japanese
UTF-8 A kind of Unicode encoding
+
+

The encoding used during execution can be specified as follows (Priority is given in this order):

+
    +
  1. The encoding specified in '#pragma __setlocale( "<encoding>")' in source code. (For Visual C-specific-build, '#pragma setlocale( "<encoding>")'.) This directive allows you to specify several encodings in one source file.
    +
  2. The encoding specified with -e <encoding> or -finput-charset=<encoding> as run-time option.
    +
  3. The encoding specified with the LC_ALL, LC_CTYPE and LANG environment variables. Priority is given in this order.
    +
  4. The default encoding specified when mcpp is compiled.
    +
+

How to specify a <encoding> is basically same across #pragma __setlocale, -e option, and the environment variables; in the table below, the encoding on the left-side hand is specified by the <encoding> on right-hand side; <encoding> is not case sensitive; '-' and '_' are ignored. Moreover, if it has '.', the character sequence to the '.' is ignored. Therefore, EUC_JP, EUC-JP, EUCJP, euc-jp, eucjp and ja_JP.eucJP are regarded as same. '*' represents any character sequence of zero or more bytes. (iso8859-1, iso8859-2 are equivalent to iso8859*.).

+
+ + + + + + + + + +
EUC-JP eucjp, euc, ujis
shift-JIS sjis, shiftjis, mskanji
GB-2312 gb2312, cngb, euccn
BIG-FIVE bigfive, big5, cnbig5, euctw
KSC-5601 ksc5601, ksx1001, wansung, euckr
IS0-2022-JP1 iso2022jp, iso2022jp1, jis
UTF-8 utf8, utf
Not specifiedc, en*, latin*, iso8859*
+
+

If any of the following encodings is specified, mcpp is no longer able to recognize multi-byte characters: C, en* (english), latin* and iso8859*. When a non-ASCII ISO-8859 Latin-<n> single-byte character set is used, one of these encodings must be specified. When an empty name is used (#pragma __setlocale( "")), the encoding is restored to the default.

+

Only in the Visual C-specific-build, the following encoding name can be specified with '#pragma setlocale'. This is for compatibility with Visual C++. It is recommended you should use these names because the Visual C++ compiler cannot recognize encoding names other than these. ('-' can be omitted for mcpp, but not for the Visual C++ compiler-proper.)

+
+ + + + + + +
shift-JIS japanese, jpn
GB-2312 chinese-simplified, chs
BIG-FIVE chinese-traditional, cht
KSC-5601 korean, kor
Not specifiedC, english
+
+

In Visual C++, the default multi-byte character encoding varies, depending on what language the language parameter and "Region and Language Option" of Windows are set to. However, the #pragma setlocale specification takes precedence over these Windows's settings.

+

GCC sometimes fails to handle shift-JIS, ISO2022JP and BIG-FIVE encodings, which contain the byte of 0x5c value. +So, GCC-specific-build of mcpp complements it. *1

+

Note

+

*1 If the --enable-c-mbchar option is specified to configure GCC itself, that GCC recognizes an encoding specified by an environmental variable LANG set to one of C-EUCJP, C-SJIS or C-JIS, gcc's info says. +This way of configuring seems to be available from 1998 onward, but it has been seldom used, and its implementation does not work. +Although GCC-specific-build of mcpp had supported these environmental variables, such as LANG=C-SJIS, it removed that feature since V.2.7.
+Also GCC info says that, besides LANG, environmental variables LC_ALL and LC_CTYPE can be used to specify an encoding. However, the difference between using LC_ALL or LC_CTYPE or not lies only in their diagnostic messages, in actual.

+
+ +

2.9. How to Use mcpp in One-Pass Compilers

+

Compilers whose preprocessor is integrated into themselves are called one-pass compilers. These includes Visual C, Borland C, and LCC-Win32. Such compilers are becoming more popular because they can achieve a little higher processing speed. However, the time for preprocessing becomes shorter due to better hardware performance. In the first place, there is much point for preprocessing to be a common phase, mostly independent of run-time environment and compiler systems. It is not desirable that one-pass compilers become more popular. There will be more compiler-system-specific specifications.

+

Anyhow, it is impossible to replace the preprocessor of a one-pass compiler with mcpp. To use mcpp, a source program is preprocessed with mcpp and then the output is passed to a one-pass compiler. As you see, preprocessing takes place twice. It is useless but inevitable. Using of mcpp still has merits of source checking and can avail functions not available in resident preprocessor.

+

To use mcpp with a one-pass compiler, the procedure must be written in makefile. For sample procedures, refer to the makefile re-compilation settings used to compile mcpp itself, such as visualc.mak, borlandc.mak, and lcc_w32.mak.

+

Although GCC 3 or 4 compiler now integrates its preprocessing facility into itself, gcc provides an option to use an external preprocessor. Use this option when mcpp is used. (See 3.9.7.)

+
+ +

2.10. How to Use mcpp in IDE

+

It is difficult to use mcpp in Integrated Development Environment (IDE) because IDE's GUI follows compiler-system-specific specifications and internal interfaces are not usually made available to third parties. Furthermore, one-pass compilers make it more difficult to insert a phase to use mcpp.

+

This subsection describes how to make mcpp available in Windows / Visual C++ 2003, 2005, 2008 IDE. Use the compiler-specific-build for Borland C and LCC-Win32 on command lines.

+

Also, it is described here how to make mcpp available in Mac OS X / Xcode.app / Apple-GCC.

+ +

2.10.1. How to Make mcpp Available in Visual C++ IDE

+

mcpp cannot be used in a normal "project" since the internal specifications of Visual C++'s IDE are not made available to third parties and the compiler is a one-pass compiler. However, once a makefile that uses mcpp is created, Visual C++'s IDE can recognize the makefile and you can create a "makefile project" using that file. This allows you to utilize most of the IDE functions, including source editing, search, and source level debugging.

+

"Creating a Makefile Project" of a Visual C++ 2003 document, Visual C++ 2005 Express Edition Help and Visual C++ 2008 Express Edition Help describe how to make a makefile project. Perform the following procedure to create a makefile project.

+
    +
  1. Login as a user with debugging privilege. *1
    +
  2. Write a makefile that specifies mcpp. (Refer to noconfig/visualc.mak.) *2
    +
  3. Start Visual Studio. *3
    +
  4. Click "New Project" to display the "New Project" window. Select "Makefile Project" and specify "Name" and "Location", and then click "OK".
    +
  5. Then the "Makefile Application Wizard" windows appears. Click "Application settings", and enter appropriate values in the "Build command line", "Output", "Clean commands", and "Rebuild command line" fields.
    +Let me explain the appropriate values for these fields by taking an example of making the compiler-independent-build of mcpp itself. (Assuming the name of mcpp executable as mcpp.exe.)
    +
    +"Build command line":   nmake
    +"Output":               mcpp.exe
    +"Clean command":        nmake clean
    +"Rebuild command line": nmake PREPROCESSED=1
    +
    +To make the Visual C-specific-build of mcpp, add an option COMPILER=MSC as: +
    +"Build command line":   nmake COMPILER=MSC
    +"Output":               mcpp.exe
    +"Clean command":        nmake clean
    +"Rebuild command line": nmake COMPILER=MSC PREPROCESSED=1
    +
    +Since a Makefile project does not provide a 'make install' equivalent command, you must write the makefile in such a way that the commands you specify in "Build command line" and "Rebuild command line" also perform installation. *4
    +If you do not compile mcpp, "Build command line" and "Rebuild command line" can be the same.
    +When completed, click "Finish".
    +
  6. Then the Makefile project appears in "Solution Explorer". Click the "Source Files" folder, choose "Add Existing Solution Item" from the "Project" menu, select all the source files, and then click "OK". Then the source file names appear in Solution Explorer.
    +
+

You can now use every functions, including Edit, Build, Rebuild and Debugging.

+

Note:

+

*1 On VC 2003 and 2005, to use the debugging function under Windows XP pro or Windows 2000, a user must belong to a group called "Debugger users". However, Windows XP HE does not provide such a group, so one has to login as an administrator. On VC 2008, such a limitation on users group was lifted.

+

*2 In order to perform the source level debugging function, makefile must be written in such a way that cl.exe is called with the -Zi option appended to generate debugging information.

+

*3 If you start Visual Studio by selecting "Start" -> "Programs", environment variables, such as for include directories, are not set. In order to have these variables set, you should open the 'Visual Studio command prompt' to start Visual Studio by typing on VC 2003:

+
+devenv <Project File> /useenv
+
+

On VC 2005 express edition and VC 2008 express edition:

+
+vcexpress <Project File> /useenv
+
+

*4 You must have a writing permission to the directory into which you install mcpp. +If you try to install into 'bin' or 'lib' directories of the compiler system, the permission should be carefully set by an administrator account. +It is recommended to make the user account belong to "Power users" or "Authenticated users" group and set "write" and "modify" permissions to the directory for the group. +Another way of controlling the permission is to install the compiler system into a directory which the user has wrinting permission on, such as a shared directory.

+ +

2.10.2. How to Make mcpp available in Mac OS X / Xcode.app

+

You can use Xcode.app, which is an IDE on Mac OS X, with mcpp without problems. *1

+

Xcode.app uses gcc (g++) in /Developer/usr/bin rather than /usr/bin for some reason. +(/Developer is the default install directory for Xcode.) +To use mcpp in Xcode.app, you must install GCC-specific-build for the gcc (g++) in that directory. +You should do as follows to install it. +(${mcpp_dir} means the directory where the source of mcpp is placed.)

+
+export PATH=/Developer/usr/bin:$PATH
+configure ${mcpp_dir}/configure --enable-replace-cpp
+make
+sudo make install
+
+

The installation method is the same with that for gcc in /usr/bin, except PATH setting. +So, please refer to INSTALL for installation to cross-compiler or installation of universal binary.

+

After installing mcpp in such a way, you can use Xcode.app without any special setting for mcpp. +Also the Apple-GCC-specific *.hmap files, which are "header map" files generated by Xcode.app, are read and processed by mcpp. +However, mcpp does not process precompiled-header. +It processes '#include "header.pch"' as an ordinary #include. +Also, mcpp does not preprocess Objective-C and Objective-C++, so *.m and *.mm source files are directly handed on to cc1obj and cc1objplus, bypassing mcpp.

+

When you use mcpp-specific options, specify them as follows:
+From screen top menu bar of Xcode.app, select "Project" > "Edit Project Settings". +The "project editor" window will appear. +Then, select "Build" pane of it, and edit "Other C flags" item. +The options should be specified following '-Wp,' and separated by commas, for example:

+
+-Wp,-23,-W3
+
+

Note:

+

*1 Here we refer to Mac OS X Leopard / Xcode 3.0.

+
+ +

3. Enhancements and Compatibility

+

mcpp has its own enhancements. Each compiler-system-resident preprocessor has its own enhancements, some of which are not available in mcpp. This section covers these enhancements and their compatibility problems.

+

Principally, mcpp outputs #pragma lines as they are. This principle is applied to the #pragma lines processed by mcpp itself. This is because the compiler-proper may interpret the same #pragma for itself.

+

However, mcpp does not outputs the lines beginning with '#pragma MCPP', since these are for mcpp only. Also, mcpp does not outputs lines of '#pragma GCC' followed by either 'poison', 'dependency' or 'system_header'. Moreover, mcpp outputs neither of '#pragma once', '#pragma push_macro', nor '#pragma pop_macro' because they are useless on the later phases. +On the other hand, '#pragma GCC visibility *' is outputted, because it is for the compiler and the linker. *1

+

mcpp compiled with EXPAND_PRAGMA == TRUE expands macros in #pragma line (in actual, EXPAND_PRAGMA is set TRUE only for Visual C-specific-build and Borland C-specific-build). However, #pragma lines followed by STDC, MCPP or GCC are never expanded.

+

#pragma sub-directives are implementation-defined, hence there are risks of same name sub-directive having different meanings to different compiler-systems. Some device is necessary to avoid name collision. Moreover, when EXPAND_PRAGMA == TRUE, there should be a device to avoid the name of #pragma sub-directive itself being macro expanded. This is why mcpp-specific sub-directives begin with '#pragma MCPP' and are not subject to macro expansion. This device is adopted from '#pragma STDC' of C99 and '#pragma GCC' of GCC 3.

+

'#pragma once' is, however, implemented as it is, since this pragma has been implemented in many preprocessors and has now no risk of name collision. '#pragma __setlocale' is prefixed with "__" instead of MCPP, because it has also meaning for compiler-proper, and because the prefix avoids user-name-space.

+

Note:

+

*1 The GCC-specific-build of mcpp only supports '#pragma GCC system_header' of the pragmas starting with GCC. It does not support '#pragma GCC poison' and '#pragma GCC dependency'.

+
+ +

3.1. #pragma MCPP put_defines, #pragma MCPP preprocess and others

+

mcpp in Standard mode uses '#pragma MCPP put_defines', '#pragma MCPP preprocess' and '#pragma MCPP preprocessed'. Pre-Standard mode uses #put_defines, #preprocess and #preprocessed. Let me explain by taking an example of #pragma.

+

When mcpp encounters '#pragma MCPP put_defines' directive, it outputs all the macros defined at that time in the form of #define lines. Of course, the #undef-ed macros are not output. The macros that cannot be #defined or #undef-ed, such __STDC__ and etc, are output in the form of #define lines, but are enclosed with comment marks. (Since __FILE__ and __LINE__ are special macros defined dynamically on a macro invocation, the replacement list output here means nothing.)

+

In pre-Standard mode and POSTSTD mode mcpp do not memorize parameter names of function-like macro definitions. So, these directives mechanically represent names of the first, second, third parameters as a, b, c, ... and so on. If it reaches the 27th parameter, it begins with a1, b1, c1, ..., a2, b2, c2, ... and so on.

+

If you enter the following directive after invoking mcpp from keyboard without specifying input and output files, all the predefined macros are listed.

+
+#pragma MCPP put_defines
+
+

It also outputs a comment to indicate the source file name where each macro definition is found, as well as its line number. If you invoke mcpp with options such as -S1 or -N, you will see a different set of predefined macros.

+

When mcpp encounters '#pragma MCPP preprocess' directive, it outputs the following line:

+
+#pragma MCPP preprocessed
+
+

This indicates that the source file has been already preprocessed by mcpp.

+

When mcpp encounters a '#pragma MCPP preprocessed' directive, it determines that the source file has been preprocessed by mcpp and continues to output the code it reads as it is, until it encounters a #define line. When mcpp does encounter a #define directive, mcpp determines that the rest of the source file are all #define lines and defines macros. At this time, mcpp would memorize the source filename and line number in the comment. *1, *2

+

A '#pragma MCPP preprocessed' is applied only to the lines that follow the directive in the source file where the '#pragma MCPP preprocessed' directive is found. If the source file is an #included one, when control is returned to the #including file, '#pragma MCPP preprocessed' is no longer applied.

+

Note:

+

*1 Actual processing is a little more complex. When mcpp encounters a '#pragma MCPP preprocessed', mcpp outputs lines it has read just as they are, except for #line lines, which compiler-specific-build of mcpp converts and outputs into a format that the compiler-proper can accept. mcpp disregards predefined standard macro because its #define line is enclosed with comment marks.

+

*2 Therefore, information on where a macro definition is found is not lost during pre-preprocessing.

+ +

3.1.1. Pre-preprocessing of Header File

+

With above directives, you can "pre-preprocess" header files. Pre-preprocessing considerably saves the entire preprocessing time. I think the explanation so far has already given you an understanding of how to pre-preprocess header files, but to deepen your understanding, let me explain it by taking an example of mcpp's own source code.

+

mcpp source consists of eight *.c files, of which seven files include "system.H" and "internal.H". No other headers are included. The source looks like this:

+
+#if PREPROCESSED
+#include  "mcpp.H"
+#else
+#include  "system.H"
+#include  "internal.H"
+#endif
+
+

The system.H includes noconfig.H or configed.H, as well as several standard header files. mcpp.H is not a source file I provide and is a "pre-preprocessed" header file I am going to generate.

+

To generate mcpp.H (of course, after setting up noconfig.H and other headers), invoke mcpp as follows:

+
+mcpp > mcpp.H
+
+

For compiler systems, such as GCC, also specify the -b option.

+

Enter the following directives from the keyboard:

+
+#pragma MCPP preprocess
+#include "system.H"
+#include "internal.H"
+#pragma MCPP put_defines
+
+

Enter "end-of-file" to terminate mcpp.

+

This has accomplished mcpp.H, which consists of the preprocessed system.H and internal.H and a set of #define lines following them. Including mcpp.H gives the same effect as including system.H and internal.H, but its size is one-nth of the original header files including the standard ones. This is because #if and comments are eliminated. It takes far less time to include mcpp.H in seven *.c files than to include system.H and internal.H seven times. By using '#pragma MCPP preprocess', much more time can be saved.

+

On compilation, use the -DPREPROCESSED=1 option.

+

It is recommended that the above procedure should be written in a file and the makefile should refer to it. The makefile and preproc.c appended to mcpp sources contain the procedure. Please refer to it.

+

Although the usage of independent preprocessor is limited for one-pass compilers like Visual C, Borland C or LCC-Win32, the pre-preprocessing facility is useful even for those.

+

The pre-preprocessing facility of header files is similar to that of the -dD option of GCC, but it differs from it in that:

+
    +
  1. GCC outputs line number information not in the form of '#line 123 "filename"', but in the form of '# 123 "filename"', which allows GCC to reprocess the information, but the Standard C preprocessor cannot.
    +
  2. GCC/cpp of older version outputs a #define line whenever it encounters it, but does not output a #undef line. Therefore, reprocessing the preprocessed result may produce a different result from what the original source intends.
    +
  3. By using '#pragma MCPP preprocess', which is not provided by GCC, mcpp can provides a higher processing speed.
    +
+

As far as the pre-preprocessing facility is concerned, mcpp is more accurate and practical than GCC.

+
+ +

3.2. #pragma once

+

#pragma once directive is available in Standard mode.

+

#pragma once is also available for GCC, Visual C, LCC-Win32 and compiler-independent preprocessor called Wave.

+

This directive is used when you want to include a header file only once. With the following directive in a header file, mcpp includes the header file only once even if a #include line for that file appears many times.

+
+#pragma once
+
+

Usually, compiler-system-specific standard header files prevent duplicate definitions by using the following code:

+
+#ifndef __STDIO_H
+#define __STDIO_H
+/* Contents of stdio.h */
+#endif
+
+

#pragma once provides similar functionality to this. Using macros always involves reading a header file. (The preprocessor cannot skip reading the code as people do and must read the entire header file for #if's or #endif's; It must read a comment before it can determine whether a line is a directive line, that is, a line with # at the beginning followed by a preprocessing directive; To do so, the preprocessor must identify a string literal; After all, it must read through the entire header file and perform most of tokenization.) #pragma once eliminates the need of even accessing to a header file, resulting in a improved processing speed for multiple includes.

+

To determine whether two header files are identical, file name characters, including directory names in a search path, are compared. Windows is not case sensitive. Therefore, "/DIR1/header.h" and "/DIR2/header.h" are regarded as distinct, but "header.h" and "HEADER.H" are regarded as the same on Windows, but distinct on UNIX-like systems. A directory is memorized after converting to absolute path, and a symbolic link in UNIX systems is memorized after dereferencing. Moreover, path-list is normalized by removing redundant part such as "foo/../". So, the identical files are determined always correctly. *1, *2, *3

+

I borrowed the idea of #pragma once from GCC V.1.*/cpp. GCC V.2.*, and V.3.* still has this functionality but it is regarded as obsolete. The specification of GCC V.2.*/cpp has been changed as follows: If the entire header file is enclosed with #ifndef _MACRO, #define _MACRO, and #endif, the cpp memorizes it and inclusion occurs only once, even without #pragma once.

+

However, this GCC V.2 and V.3 specification sometimes does not work for commercially available compiler systems that are not based on the GCC specification, due to a difference in the standard header file notation. In addition, the GCC V.2 and V.3 specification is more complex to implement. For this reason, I decided to implement only #pragma once.

+

As with other preprocessors, it is not advisable to rely only on #pragma once when the same header files are used. It is recommended that #pragma once should be combined with macros as follows:

+
+#ifndef __STDIO_H
+#define __STDIO_H
+#pragma once
+/* Contents of stdio.h */
+#endif
+
+

Note that #pragma once must not be written in <assert.h>. For the reason, see cpp-test.html#5.1.2. The same thing can be said with <cassert> and <cassert.h> of C++.

+

Another problem is that the recent GCC/GLIBC system has header files, like <stddef.h>, which are repeatedly #included by other system headers. They define macros, such as __need_NULL, __need_size_t, and __need_ptrdiff_t, and then #include <stddef.h>. Each time they do so, definitions such as NULL, size_t, and ptrdiff_t are defined in the <stddef.h>. The same thing can be said with <errno.h> and <signal.h>, and even with <stdio.h>. Other system headers define macros, such as __need_FILE, __need___FILE, and then #include <stdio.h>. Each time they do so, definitions such as FILE may be defined in <stdio.h>. #pragma once can not be used in such header files. *4

+

Note:

+

*1 The normalized result can be seen by '#pragma MCPP debug path'. See 3.5.1. +'#pragma MCPP put_defines' and diagnostics use the same result, too.
+However, the path-list is not normalized usually in #line line. +By default, the #line line is output as specified by #include line, prepending the normalized include path, if any. +But, if -K option is specified, it is normalized so as to be easily utilized by some other tools.

+

*2 On CygWIN, /bin and /usr/bin are the same directory in real, also /lib and /usr/lib are the same, and supposing / is C:/dir/cygwin on Windows, /cygdrive/c/dir/cygwin is the same as /. mcpp treats these directories as the same, converting the path-list to the format of /cygdrive/c/dir/cygwin/dir-list/file.

+

*3 On MinGW, / and /usr are the same directory in real. Supposing / is C:/dir/msys/1.0, /c/dir/msys/1.0 is the same as /, and supposing /mingw is C:/dir/mingw, /c/dir/mingw is the same with /mingw. mcpp treats each of these as the same directories, converting the path-list to the format of c:/dir/msys/1.0/dir-list/file or c:/dir/mingw/dir-list/file.

+

*4 This is applied at least to Linux/GCC 2.9x, 3.* and 4.*/glibc 2.1, 2.2 and 2.3. FreeBSD 4, 5, 6 has much simpler system headers because it does not use glibc.

+ +

3.2.1. Tool to Write #pragma once to Header Files

+

With a small number of header files, writing #pragma once to them does not require much effort, but it would be tremendous work if there are many header files. I wrote a simple tool to write it automatically to header files.

+

tool/ins_once.c is a tool written for old versions of GCC. As Borland 5.5 conform to the same standard header file notation with GCC, this tool can be used. However, it is advisable that this tool should not be used in the systems like Glibc 2 that has many exceptions shown above.

+

Even in the compiler systems that can use the tool, some header files do not strictly conform to the GCC notation. GCC's read-once functionality also does not work properly for these header files.

+

Compile ins_once.c and perform the following command in a directory, such as /usr/include or /usr/local/include, under UNIX.

+
+chmod -R u+w *
+
+

and then execute ins_once as follows:

+
+ins_once -t *.h */*.h */*/*.h
+
+

Ins_once reports header files that do not begin with #ifndef or #if !defined. Manually modify these files. Then, execute ins_once as follows:

+
+ins_once *.h */*.h */*/*.h
+
+

If the first directive in each header file is #ifndef or #if !defined, a #pragma once line is inserted immediate below the line. Only a root user or a user with an appropriate permission is eligible for this modification. When you modified access permission, use 'chmod -R u-w *' to restore to original permission.

+

Ins_once provides the following options. Select the most appropriate one for your system.

+
    +
  • -t: Check whether a header file begins with #ifndef or #if !defined, excluding a comment. This option does not modify the file.
    +
  • -p: Insert a #pragma once line at the beginning of file. By default, this line is inserted immediate below the #ifndef or #if !defined line.
    +
  • -g: For GCC system, <stddef.h>, <stdio.h>, <signal.h>, <errno.h> are also excluded. By default, only <assert.h>, <cassert> and <cassert.h> are excluded.
    +
+

ins_once roughly checks to write a #pragma once line only once in the same header file even if it is executed several times, but the check is not very strict. As this ins_once is of temporary and tentative nature, it scarcely performs tokenization. It worked as I expected with FreeBSD 2.0 and 2.2.7, Borland C 5.5, but it may not work properly for special header files. So before executing this tool, be sure to make a backup of an original file.

+

Have the shell expand a wild-card. (In case of buffer overflow, execute ins_once several times by specifying some of your system header files.)

+
+ +

3.3. #pragma MCPP warning, #include_next, #warning

+

These directives are provided for compatibility with GCC. GCC provides the #include_next and #warning directives. Although these directives are non-conforming, not only some source programs sometimes use them but also some Glibc2 system header files do. Taking this situation into consideration, I implemented the #include_next and #warning directives in GCC-specific-build to allow compilation of such source programs, however, mcpp issues a warning when it finds the directives. Regardless of the compiler systems mcpp is ported to, mcpp in Standard mode also implements #pragma MCPP warning.

+

With the following directive, mcpp skips the current file's directory and start searching header.h from the next directory of search path.

+
+#include_next  <header.h>
+
+

CygWIN and MinGW ignores the distinctions of alphabetical case of header names.

+

The following code outputs 'any message' to stderr as a warning message:

+
+#pragma MCPP warning    any message
+
+#warning  any message
+
+

Different from #error, this is not counted as an error.

+
+ +

3.4. #pragma MCPP push_macro, #pragma __setlocale and others

+

When I ported mcpp to Visual C, I implemented these directives in mcpp, and then made them available for other systems.

+

'#pragma MCPP push_macro( "MACRO")' and '#pragma MCPP pop_macro( "MACRO")' are used to "push" or "pop" a macro definition (MACRO) to the current macro definition stack.

+

'#pragma push_macro( "MACRO")' and '#pragma pop_macro( "MACRO")' are also available for Visual C.

+

push_macro saves a macro definition to the stack, and pop_macro retrieves the macro definition. The pushed macro definition remains valid after push_macro. To invalidate it, use #undef or redefine the macro with a new definition. push_macro can be used multiple times for a same name macro.

+

'#pragma __setlocale( "<encoding>")' changes the current multi-byte character encoding to <encoding>. The argument of setlocale must be a string literal. For <encoding>, refer to 2.8. This directive allows you to use several encodings in one translation unit.

+

In Visual C++, '#pragma __setlocale' cannot be used. Use '#pragma setlocale' instead. Encoding specification must be conveyed not only to mcpp but also to the compiler-proper. The latter can recognize only #pragma setlocale. For other compiler systems, when the compiler-proper cannot recognize an encoding, mcpp complements it.

+

There is not yet any compiler-proper which can recognize '#pragma __setlocale'.

+
+ +

3.5. #pragma MCPP debug, #pragma MCPP end_debug, #debug, #end_debug

+

'#pragma MCPP debug' and '#pragma MCPP end_debug' are for Standard mode. #debug and #end_debug are for pre-Standard mode.

+

The '#pragma MCPP debug <args>' directive can be written anywhere in a source program. <args> specifies a debug information type. One #pragma MCPP debug directive can take several <arg>. One or more <arg> must be specified for each directive. mcpp begins to output debug information when it finds this directive, and stops it when it encounters '#pragma MCPP end_debug <args>'. The <args> can be omitted, in which case all types of debug information is reset. If <args> contains an argument that is not supported by mcpp, mcpp issues a warning, but all the preceding arguments are regarded as valid.

+

All the debug information is output to the same path with the preprocessing output to synchronize with it. Therefore, this directive usually prevents compilation. +Nevertheless, #pragma MCPP debug macro_call outputs informations embedding into comments, and can be re-preprocessed and compiled.

+

When you noticed something was wrong with the preprocessing result, enclose the coding you want to debug with the following directives, for example:

+
+#pragma MCPP debug token expand
+/* Coding you want to debug  */
+#pragma MCPP end_debug
+
+

As this directive was originally used for debugging mcpp itself, it was not developed with end users in mind. So, you may not understand its behavior unless you read its source code, and you may sometimes feel it outputs too much information, but it is useful for tracing the preprocessing process. Be patient.

+

The following debug information types can be specified with <arg>.

+
+ + + + + + + + + +
path Displays the include file search path.
token Parses tokens one by one and displays its type.
expand Traces a macro expansion process.
macro_callEmbed macro notifications into comments on each macro definition and macro expansion.
if Displays the result (true or false) of #if, #elif, #ifdef and #ifndef.
expressionTraces #if expression evaluation.
getc Traces preprocess 1-byte by 1-byte.
memory Displays the status of heap memory used by mcpp.
+
+ +

3.5.1. #pragma MCPP debug path, #debug path

+

With these directives, mcpp displays include directories in the search path (excluding the current and source directories with which search begins) in the order of priority, starting with the highest one first.

+

In addition, with a #include directive, mcpp displays all the directories, including the current one, it actually searched for the #include file.
+When a header file with #pragma once specified is #included again, the message to that effect is displayed.
+Moreover, mcpp normalizes the path-list removing the redundant part such as "foo/../", and displays the result when the normalized path-list differs from the original one.
+Also mcpp dereferences the symbolic link to its linked-file, and displays the result when conversion is occurred.

+ +

3.5.2. #pragma MCPP debug token, #debug token

+

With these directives, mcpp displays a source line it has read, and then displays a token and its type on the source line each time it has read. This token, more specifically, is a preprocessing-token (pp-token). Not only pp-tokens on a source line but also ones mcpp reads again internally during macro expansion are displayed repeatedly.

+

However, the following 1-byte tokens are not displayed for mcpp program's convenience sake:

+
    +
  1. 1. '#' at the beginning of a preprocessing directive line.
    +
  2. 2. '(' at the beginning of a parameter list of a function-like macro definition.
    +
  3. 3. ',' delimiting between function-like macro definition parameters.
    +
  4. 4. '(' at the beginning of an argument list used for a function-like macro invocation.
    +
+

A pp-token has the following types:

+
+ + + + + + + + + + +
NAM Identifier
NUM Preprocessing-number
OPE Operator or punctuator
STR String literal
WSTRWide string literal
CHR Character constant
WCHRWide character constant
SPE Special pp-tokens, such as $ and @
SEP Token separator white space
+
+

Of SEP, other than <newline> are not normally displayed. Control codes such as <newline> are displayed as <^J> or <^M>.

+ +

3.5.3. #pragma MCPP debug expand, #debug expand

+

With these directives, mcpp traces the expansion process of a macro invocation. When mcpp in Standard mode encounters a #pragma MCPP debug, it behaves as follows:

+

If there is a macro invocation, mcpp displays the macro definition. Each argument is read, the argument is substituted for the corresponding parameter in the replacement list and the replacement list is rescanned. mcpp displays this whole process. In case of nested macro definitions, they are rescanned and expanded one by one. If an argument has a macro, mcpp traces the above process recursively before parameter substitution.

+

Each time control is passed to and returned from a certain set of mcpp internal functions, mcpp displays the trace information along with the function name. The following table shows the role of these functions. Reading mcpp source code will gives you a concrete idea on what each function is doing.

+
+ + + + + + + +
expand_macroEntrance routine for macro expansion
replace Expands a macro one level down.
collect_argsCollects arguments.
prescan Scans a replacement list and processes # and ## operator.
substitute Substitutes parameters with arguments.
rescan Rescans a replacement list.
+
+

Except for expand_macro, above functions are indirectly recursive with each other.

+

For replace and collect_args, mcpp displays data it internally stacks during macro expansion. This data is displayed using the following internal codes:

+
+ + + + + + +
<n> Nth parameter
<TSEP> Token delimiter inserted by mcpp
<MAGIC> Code that inhibits re-replacement of the macro of the same name
<RT_END>Code that indicates the end of a replacement list
<SRC> Code that indicates an identifier taken from source file while rescanning
+
+

<SRC> is used only in STD mode, and is not used in POSTSTD mode nor in COMPAT mode.

+

It is recommended that '#pragma MCPP debug token' should be also used.

+

If you specify also '#pragma MCPP debug macro_call' or -K option, macro notifications are output embedded in comments. +However, in replace() and its subordinate routines some magic characters (internal codes) are written or removed in the input stream instead of comment. +These magic characters are displayed as:

+
+ + + + + +
<MACm> Call of the m'th macro contained in one macro call
<MAC_END> The end of the macro call started by previous MACm
<MACm:ARGn>The n'th argument of the m'th macro call
<ARG_END> The end of the argument started by previous MACm:ARGn
+
+

If you specify -v option too, the MAC_END and the ARG_END markers also display the same numbers with corresponding starting markers.

+

For #debug expand, mcpp uses internal routines considerably different from those used for Standard mode. The explanations are omitted.

+ +

3.5.4. #pragma MCPP debug if, #debug if

+

With these directives, mcpp displays #if, #elif, #ifdef and #ifndef lines and reports their evaluation result (true or false). As for a skipped #if section, no report is made.

+ +

3.5.5. #pragma MCPP debug expression, #debug expression

+

With these directives, mcpp traces evaluation of a #if or #elif expression. DECUS cpp, based on which mcpp has been developed, provides these directives for the purpose of debugging cpp itself. I scarcely modified them. This directive outputs a very long list of internal functions, as well as variable names and their values. Unless you read the mcpp source code, you may not understand these variables. However, without the source code, you can manage to understand how the mcpp pushes onto and takes out of a evaluation stack a complex expression value.

+ +

3.5.6. #pragma MCPP debug getc, #debug getc

+

With these directives, mcpp outputs detailed data each time it calls get_ch(), a function to read one byte. When mcpp in Standard mode scans a pp-token, this routine is called to read only the first byte of the pp-token.

+

With a #debug getc, mcpp calls this routine during token scan, resulting in a tremendous amount of data output.

+

In any way, using these directives outputs a huge amount of data, so you scarcely need to use them.

+ +

3.5.7. #pragma MCPP debug memory, #debug memory

+

With these directives, mcpp reports the status of the heap memory it has internally allocated or released using malloc(), realloc() or free() only once. Only the kmmalloc I developed and some other types of malloc() provide this functionality. Refer to mcpp-porting.html#4.extra. In case of other malloc(), mcpp will neither cause an error nor report a status.

+

mcpp reports the heap memory status again when it terminates with these directives on. The same thing happens when mcpp terminates due to out of memory.

+ +

3.5.8. #pragma MCPP debug macro_call

+

With this directive, mcpp starts macro notification mode. +In this mode, on each macro definition and macro expansion, its line and column information on source file are output embedded in comments. +On a macro call with arguments, location information on each arguments are reported too. +Token concatenation by macro, however, may cause loss of macro information about the tokens before concatenation.
+In addition, some informations are output on #undef, #if (#elif, #ifdef, #ifndef) and #endif, too.
+This mode is specified also by -K option.

+

Macro notification mode is designed to allow reconstruction of the original source position from the preprocessed output. The primary purpose of this mode is to allow C/C++ refactoring tools to refactor source code without having to implement a special-purpose C preprocessor. This mode is also handy for debugging macro expansions. *1

+

The goal for macro expansion mode is to annotate every macro expansion, while still allowing the output to be compiled. +On the other hand, '#pragma MCPP debug expand' is to trace macro expansion and outputs detailed informations, but its output is not compilable.

+

Note:

+

*1 Most of the specifications of macro notification mode were proposed by Taras Glek. +He is working on refactoring of sources at mozilla project:

+

http://blog.mozilla.com/tglek/

+ +

3.5.8.1. Comment on #define

+

For example, macro definition directives such as:

+
+#define NULL 0L
+#define BAR(x, y) x ## y
+#define BAZ(a, b) a + b
+
+

produce the following output:

+
+/*mNULL 1:9-1:16*/
+/*mBAR 2:9-2:25*/
+/*mBAZ 3:9-3:24*/
+
+

where the format means:

+/*m[NAME] [start line]:[start column]-[end line]:[end column]*/ +

Line and column numbers start from 1. +When you specify -K option, predefined macros are output too, which have no location information.

+ +

3.5.8.2. Comment on #undef

+
+#undef  BAZ
+
+

This line produces the output: +

+/*undef 10*//*BAZ*/
+
+

The [lnum] and [NAME] in the format of /*undef [lnum]*//*[NAME]*/ indicate line number of the line and the undefined MACRO name.

+ +

3.5.8.3. Comment on Macro Expansion

+

Within source code other than directives, macros are expanded with markers indicating start and stop of the macro expansion. +The format allows for HTML-like nesting. /*<...*/ signals start of macro expansion and /*>*/ the end. +The start of macro expansion takes the following format replacing /*m of start of macro definition format to /*<:

+/*<[NAME] [start line]:[start column]-[end line]:[end column]*/ +

On macro with arguments, markers indicating source location of each argument and markers indicating start and end of each argument expansion are output too. +The marker for argument location takes the format of /*!...*/. +When a macro is found in an argument, informations on that macro is output recursively, with its location information if it is on the source file. +Macro argument marker also have a disambiguating naming scheme. An argument name is of the format:

+[func-like-macro-name]:[nesting level]-[argument number] +

This way, if someone calls 'BAZ(BAZ(a,b), c)', it would possible to distinguish nested macros of the same name and their arguments from each other. +The argument number starts from 0. +Then the location format follows it as:

+[start line]:[start column]-[end line]:[end column] +

The marker for start of an argument also takes the format:

+/*<[func-like-macro-name]:[nesting level]-[argument number]*/ +

The marker for end of an argument is the same with the one for end of a macro expansion: /*>*/.

+

The following lines:

+
+foo(NULL);
+foo(BAR(some_, var));
+foo = BAZ(NULL, 2);
+bar = BAZ(BAZ(a,b), c);
+
+

expand to:

+
+foo(/*<NULL 4:5-4:9*/0L/*>*/);
+foo(/*<BAR 5:5-5:20*//*!BAR:0-0 5:9-5:14*//*!BAR:0-1 5:16-5:19*/some_var/*>*/);
+foo = /*<BAZ 6:7-6:19*//*!BAZ:0-0 6:11-6:15*//*!BAZ:0-1 6:17-6:18*//*<BAZ:0-0*//*<NULL 6:11-6:15*/0L/*>*//*>*/ + /*<BAZ:0-1*/2/*>*//*>*/;
+bar = /*<BAZ 7:7-7:23*//*!BAZ:0-0 7:11-7:19*//*!BAZ:0-1 7:21-7:22*//*<BAZ:0-0*//*<BAZ 7:11-7:19*//*!BAZ:1-0*//*!BAZ:1-1*//*<BAZ:1-0*/a/*>*/ + /*<BAZ:1-1*/b/*>*//*>*//*>*/ + /*<BAZ:0-1*/c/*>*//*>*/;
+
+

Moreover, when -v option is specified along with -K option, the marker for end of macro expansion and the marker for end of an argument expansion also output the macro name and its number same with their starting markers as:

+
+foo(/*<NULL 4:5-4:9*/0L/*NULL>*/);
+foo(/*<BAR 5:5-5:20*//*!BAR:0-0 5:9-5:14*//*!BAR:0-1 5:16-5:19*/some_var/*BAR>*/);
+foo = /*<BAZ 6:7-6:19*//*!BAZ:0-0 6:11-6:15*//*!BAZ:0-1 6:17-6:18*//*<BAZ:0-0*//*<NULL 6:11-6:15*/0L/*NULL>*//*BAZ:0-0>*/ + /*<BAZ:0-1*/2/*BAZ:0-1>*//*BAZ>*/;
+bar = /*<BAZ 7:7-7:23*//*!BAZ:0-0 7:11-7:19*//*!BAZ:0-1 7:21-7:22*//*<BAZ:0-0*//*<BAZ 7:11-7:19*//*!BAZ:1-0*//*!BAZ:1-1*//*<BAZ:1-0*/a/*BAZ:1-0>*/ + /*<BAZ:1-1*/b/*BAZ:1-1>*//*BAZ>*//*BAZ:0-0>*/ + /*<BAZ:0-1*/c/*BAZ:0-1>*//*BAZ>*/;
+
+

As you see in this example, all the ending markers correspond to the last preceding starting markers of the same nesting level. +Hence, you can judge their correspondence automatically even without -v option.

+ +

3.5.8.4. Comment on #if (#elif, #ifdef, #ifndef)

+

On #if (#elif, #ifdef, #ifndef) line, informations on the macros in the line are shown.

+

For example, this is bar.h:

+
+#define NULL 0L
+#define BAR(x, y) x ## y
+#define BAZ(a, b) a + b
+
+

And here is foo.c:

+
+#include "bar.h"
+#ifdef  BAR
+#ifndef BAZ
+#if 1 + BAR( 2, 3)
+#endif
+#else
+#if 1
+#endif
+#if BAZ( 1, BAR( 2, 3))
+#undef  BAZ
+#endif
+#endif
+#endif
+
+

Then, foo.c produces the following output:

+
+#line 1 "/dir/foo.c"
+#line 1 "/dir/bar.h"
+/*mNULL 1:9-1:16*/
+/*mBAR 2:9-2:25*/
+/*mBAZ 3:9-3:24*/
+#line 2 "/dir/foo.c"
+/*ifdef 2*//*BAR*//*i T*/
+/*ifndef 3*//*BAZ*//*i F*/
+
+
+/*else 6:T*/
+/*if 7*//*i T*/
+/*endif 8*/
+/*if 9*//*BAZ*//*BAR*//*i T*/
+/*undef 10*//*BAZ*/
+#line 11 "/dir/foo.c"
+/*endif 11*/
+/*endif 12*/
+/*endif 13*/
+
+

As you see, on #if line, an annotation starts with a /*if [lnum]*/ format where [lnum] indicates the current line number. +Then one or more /*[NAME]*/ markers follow, if some macros are found, a /*[NAME]*/ for each macro. +The annotation terminates with /*i T*/ or /*i F*/ which indicates that the directive is evaluated true or false, respectively. +The expansion result is not displayed, unlike a macro on lines other than directives. +On a line such as '#if 1' which has no macro, no /*[NAME]*/ is displayed.

+

Also annotations on #elif, #ifdef and #ifndef start with /*elif [lnum]*/, /*ifdef [lnum]*/ and /*ifndef [lnum]*/, respectively, followed by /*[NAME]*/, if some macros are found, and terminate with /*i T*/ or /*i F*/.

+

In any blocks where compilation is to be skipped, no annotation is displayed.

+ +

3.5.8.5. Comment on #else and #endif

+

On #else line, as the above examples, an information is displayed in /*else [lnum]:[C]*/ format where [lnum] is the current line number and [C] is 'T' or 'F' which indicates that the #else - #endif block is to be compiled or to be skipped.

+

On #endif line, as the above examples, an information is displayed in /*endif [lnum]*/ format where [lnum] indicates the current line number. +Of course, the #endif corresponds to the last #if (#ifdef, #ifndef) which is not yet closed.

+ +

3.5.8.6. #line Output

+

In addition, on the macro notification mode, the output format of filename in #line line differs from the default. +It outputs the filename in the "normalized" full-path-list. +See 3.2. +This is for the convenience of refactoring tool making.

+
+ +

3.6. #assert, #asm, #endasm

+

#assert is available in pre-Standard mode, except the GCC-specific-build. #assert provides the functionality equivalent to the #error directive in the Standard C. The following code in the Standard C:

+
+#if ULONG_MAX/2 < LONG_MAX
+#error Bad unsigned long handling.
+#endif
+
+

can be expressed as:

+
+#assert LONG_MAX <= ULONG_MAX/2
+
+

The argument of #assert is evaluated as a #if expression. If it evaluates to true (non-zero), mcpp does nothing and if false (0), it displays the following message and then the argument line (after processing line splicing and comments):

+
+Preprocessing assertion failed
+
+

mcpp counts this as error but continues processing.

+

This #assert is quite different from that of System V or GCC.

+

mcpp in pre-Standard mode regards a block enclosed with the #asm and #endasm directives as assembler coding. mcpp implements this functionality for Microware C/6809 only. To implement this functionality in other compiler systems, do_old() and put_asm() in system.c must be modified.

+

For a #asm block, mcpp performs trigraphs conversion and deletes <backslash><newline> sequence, but it neither performs comment processing, checks tokens or characters, nor deletes white-space characters at the beginning of a line. Also, it does not expand a token that happens to have the same name with a macro and outputs it as it is. Other directive lines have no meaning within the #asm block.

+

These #asm and #endasm directives do not conform to Standard C. In the first place, extension directives in the form other than "#pragma sub-directive" are not Standard C conforming. Changing their directive names to #pragma asm and #pragma endasm does not solve this problem. In Standard C, the source code must consist of a C token sequence (more precisely, a preprocessing token sequence), however, an assembler program is not a C token sequence. To use assembly code in the Standard C, there is no other way but to embed it in a string literal token. Then, you have to implement a built-in function that processes that string literal in the compiler-proper and call it as follows:

+
+asm (
+    " leax _iob+13,y\n"
+    " pshs x\n"
+);
+
+

However, this is not suitable for a longer assembly code, in which case, you had better write the assembly code as a separate file like a library function, and assemble and link the program. This seems to be inconvenient, but it is necessary to separate the assembler portion completely to write a portable C program. It is recommended that you should write assembly code in a separate file rather than using #asm.

+
+ +

3.7. New C99 Features (_Pragma() operator, Variadic Macro and others)

+

These features are available in Standard mode. The -V199901L option with __STDC_VERSION__ set to 199901L enables the following C99's features. The same thing can be said with C++ for the -V199901L option with __cplusplus set to 199901L or more. Although C++ Standard does not provides for the features other than 1 or 7, mcpp in Standard mode provides them for better compatibility with C99. Standard mode also allows variable argument macros even in the C90 and C++ modes. *1

+
    +
  1. Treats the text from // to the end of a line as a comment.
    +
    +
  2. Enables variable argument macros.
    +
    +
  3. Allows the sequence of p+, P+, p-, and P-, as well as e+, E+, e-, and E-, in the preprocessing-number. This is to represent a bit pattern of a floating-point number in Hex, like 0x1.FFFFFEp+128.
    +
    +
  4. Enables the _Pragma() operator.
    +
    +
  5. mcpp compiled with the EXPAND_PRAGMA macro set to TRUE macro-expands the argument of #pragma line that do not begin with STDC, MCPP nor GCC. (By default, mcpp is compiled with EXPAND_PRAGMA == FALSE, so it is not subject to macro expansion. It is macro expanded only in Visual C-specific-build and Borland C-specific-build.)
    +
    +
  6. For compiler-systems with long long, a #if expression is evaluated in long long or unsigned long long.
    +
    +
  7. Allows an escape sequence named UCN for Unicode in the forms of \unnnn and \Unnnnnnnn in identifiers, character constants, string literals and pp-numbers. The value of a UCN in #if expression is evaluated as a hexadecimal representation. (UCN cannot be used in POSTSTD mode.)
    +
+A variable argument macro takes a form of:
+
+#define debug(...)  fprintf(stderr, __VA_ARGS__)
+
+

Here is a macro invocation:

+
+debug( "X = %d\n", x);
+
+

This macro is expanded as follows:

+
+fprintf(stderr, "X = %d\n", x);
+
+

... in the parameter list corresponds to one or more parameters. In the above example, ... corresponds to __VA_ARGS__ in the replacement list. During a macro invocation, several arguments that correspond to the ..., including ",", are concatenated to be treated as one argument.

+

_Pragma( "foo bar") has the same effect as specifying #pragma foo bar. The argument of the _Pragma() operator must be one string literal or wide string literal. For a wide string, the prefix (L) is deleted and treated as same as a string literal. For a string literal, " enclosing that string literal is deleted, and \" and \\ in that literal is replaced with " and \, respectively, before it is treated as a #pragma argument.

+

#pragma must be written somewhere in one logical line and its argument is not macro-expanded at least for C90. On the other hand, the _Pragma() operator can be written anywhere in source code (even in a replacement list), which gives the same effect with #pragma written in a logical line. The _Pragma() operator generated during macro expansion is also valid. This flexibility provides the pragma directive with a wide range of portability and allows a header file to absorb the difference in #pragma among compiler systems. (For this sample, see pragmas.h and pragmas.t of "Validation Suite".) *2

+

C99 stipulates a #if expression is of maximum integer type. As "long long" and "unsigned long long" are required types, the type of an #if expression is "long long / unsigned long long" or larger. C90 and C++98 stipulate the type is long / unsigned long. mcpp, however, evaluates it by long long / unsigned long long even in C90 and C++98, and issues a warning when the value is out of range of long / unsigned long. *1

+

Note:

+

*1 This is for compatibility with GCC and Visual C++ 2005, 2008. It is difficult also for other compiler systems to implement C99 specifications all at once. Probably, they will begin to implement them little by little with __STDC_VERSION__ set to 199409L or so.

+

*2 C99 says that a #pragma argument that begins with STDC is not macro-expanded. For other #pragma arguments, whether macro is expanded is implementation-defined.

+
+ +

3.8. Particular specifications for certain compiler systems

+

mcpp of compiler-specific-builds have some specifications peculiar to each compiler system. +Such particular specifications, other than execution option and #pragma, are explained in this section.

+ +

3.8.1. Variadic macro of GCC and Visual C

+

GCC has variadic macro of its own specification from V.2 as shown in 3.9.1.6. +In this manual we call this as GCC2-spec variadic macro. +Moreover, GCC implemented one more spec of variadic from V.3 as shown in 3.9.6.3, which we call GCC3-spec variadic macro. +GCC V.2.95 and later implements C99 variadic, too. +Nevertheless, softwares such as glibc or Linux system headers do not use C99 variadic, nor even GCC3-spec one, and still use that of GCC2-spec.

+

mcpp of GCC-specific-build on STD mode implemented GCC3-spec variadic from V.2.6.3, and GCC2-spec one from V.2.7, in order to avoid inconveniences on Linux or some other softwares. +Yet, mcpp warns at use of them. +GCC-spec variadics, especially GCC2-spec one, are not only unportable, but also syntactically unclean. +Use of them in sources to write in future is not recommendable.

+

Visual C had not implemented variadic macro up to 2003. +But, Visual C 2005 finally implemented it. +Its specification is C99 one with a modification like GCC3-spec one. +When variable arguments are absent, Visual C removes their immediately preceding comma. +It does not use '##' token used in GCC3-spec. +The specification is illustrated as below. +Visual C document says that in the third example, a comma is not removed. +In actual, however, it removes even the comma in this case.

+
+#define EMPTY
+#define VC_VA( format, ...)     printf( format, __VA_ARGS__)
+VC_VA( "var_args: %s %d\n", "Hello", 2005);     /* printf( "var_args: %s %d\n", "Hello", 2005); */
+VC_VA( "absence of var_args:\n");               /* printf( "absence of var_args:\n");   */
+VC_VA( "empty var_args:\n", EMPTY);             /* printf( "empty var_args:\n", );  */  /* trailing comma   */
+
+

Visual C-specific-build of mcpp implemented in STD mode this special handling from V.2.7. +Still, it warns at use of the spec. +mcpp implements the behavior on the above third example as its spec, and does not remove the comma.

+ +

3.8.2. Handling of 'defined' by GCC

+

On a macro with 'defined' token in it, GCC expands it differently from usual when it is in #if line. +I explain this problem at 3.9.4.6.

+

mcpp of GCC-specific-build from V.2.7 onward handles this sort of macro like GCC in STD mode. +This behavior was implemented to cope with a few wrong macros used in Linux system headers. +Yet, it warns at use of 'defined' token in macro on #if line. +You should write correct #if expression.

+ +

3.8.3. Asm Statement in Borland C and Other Special Syntaxes

+

Borland C has the asm keyword. This keyword is used to write assembly code as follows:

+
+asm {
+    mov x,4;
+    ...;
+}
+
+

This is quite irregular and deviates from the C grammar. If there happen to be a token with the same name as a macro, it will be macro-expanded. The same can be said with Borland C itself and mcpp. It is recommended that an assembler program should be written in a separate .asm file. +mcpp does not treat this specially.

+

Visual C++ also has the __asm keyword, which provides the similar functionality to this.

+

GCC provide a Standard-conforming built-in function asm() which is used as asm( " mov x,4\n").

+ +

3.8.4. #import and Others

+ +

3.8.4.1. #import of Mac OS X / GCC

+

GCC has #import directive, which is a feature of Objective-C and imported to C/C++. +#import is a #include with an implicit '#pragma once'. +It is occasionally used in C/C++ sources on Mac OS X.

+

mcpp V.2.7 and later implements this directive only on Mac OS X, in both of GCC-specific-build and compiler-independent-build.

+ +

3.8.4.2. #import and #using of Visual C

+

Visual C has peculiar directives named #import and #using, which have form of preprocessing-directive, in fact, they are directives for compiler and linker. +The #import of Visual C has no relation to that of GCC.

+

mcpp of Visual-C-specific-build outputs these lines as they are.

+
+ +

3.9. Problems of GCC and Compatibility with GCC

+

Although I tried to develop mcpp in such manner that the GCC-specific-build provides compatibility with GCC / cpp (cc1) to the extent that it does not hinder practical use, it is still incompatible in many aspects.

+

First of all, as shown in Chapter 2, there are many differences in execution options. mcpp implements neither -A option nor non-conforming directives, including #assert and #ident. *1

+

Fortunately, there seems to be quite few sources that cannot be compiled due to a lack of this compatibility.

+

It is more problematic that there are some sources that assume special behaviors of old preprocessors. Most of such source code receives a warning when -pedantic is specified in GCC. mcpp in Standard mode, by default, provides almost the same behavior as GCC's -pedantic since it implements Standard conforming error checking. However, since GCC/cpp, by default, allows such Standard violations without issuing a diagnostic, there are some sources that take advantage of this.

+

It is very easy to rewrite such non-conforming code to Standard-conforming code in most cases, so it is meaningless to take the trouble to write non-conforming code only to impair portability and, what is worse, to provide a hotbed of bugs. When you find such code, do not hesitate to correct it. *2

+

Note:

+

*1 The functionality of #assert and #ident should be implemented using #pragma, if necessary. The same can be said with #include_next and #warning, but these directives seem to be sometimes used in GCC system, so I grudgingly implemented them in GCC-specific-build, however, a warning is issued when they are used.

+

*2 From 3.9 through 3.9.3 sections of this document was written in 1998, when the sources depending on traditional preprocessors were frequently found. +After that time, such sources have greatly decreased, +and on the other hand, sources depending on the local features and implementation trivialities of GCC have much increased. +The 3.9.4 and later, especially 3.9.8 and later sections describe mainly such problems. (2008/03)

+ +

3.9.1. Preprocessing FreeBSD 2/Kernel Source

+

Taking FreeBSD 2.2.2-R (1997/05) kernel source code as an example, this section explains some preprocessing problems. All the directories that appear in this section are installed in /sys (/usr/src/sys). Of the items I point out below, 3.9.1.7 and 3.9.1.8 are not necessarily Standard violations and work as expected in mcpp, but mcpp issues a warning because their coding is confusing. 3.9.1.6 is an enhancement and C99 provides the same functionality, but it differs from GNUC/cpp in notation.

+ +

3.9.1.1. Multi-Line String Literal

+

Assembly codes are embedded by the following manner in i386/apm/apm.c, i386/isa/npx.c, i386/isa/seagate.c, i386/scsi/aic7xxx.h, dev/aic7xxx/aic7xxx_asm.c, dev/aic7xxx/symbol.c, gnu/ext2fs/i386- bitops.h, pc98/pc98/npx.c:

+
+asm("
+    asm code0
+#ifdef PC98
+    asm code1
+#else
+    asm code2
+#endif
+    ...
+");
+
+

When no " closing a string literal appears by the end of line, GCC/cpp, by default, interprets that the string literal ends at the end of line. The above coding is based on this specification. In addition, the compiler-proper seems to interpret the whole content of asm() as a string literal spreading across lines.

+

I think that assembler source code should be written in a separate file, but if you want to embed it in ".c" file by all means, write it in the following manner, instead of using the confusing coding shown above.

+
+asm(
+    "  asm code0\n"
+#ifdef PC98
+    "  asm code1\n"
+#else
+    "  asm code2\n"
+#endif
+    "  ...\n"
+);
+
+

Standard C conforming preprocessors will accept it.

+ +

3.9.1.2. #else junk, #endif junk

+

The following line appears in ddb/db_run.c, netatalk/at.h, netatalk/aarp.c, net/if-ethersubr.c, i386/isa/isa.h, i386/isa/wdreg.h, i386/isa/tw.c, i386/isa/b004.c, i386/isa/matcd/matcd.c, i386/isa/sound/sound_calls.h, i386/isa/pcvt/pcvt_drv.c, pci/meteor.c, and pc98/pc98/pc98.h:

+
+#endif MACRO
+
+

This line should be changed to:

+
+#endif /* MACRO */
+
+ +

3.9.1.3. #ifdef 0

+

To my surprise, i386/apm/apm.c contains the following strange line:

+
+#ifdef 0
+
+

Of course, this should be written as:

+
+#if 0
+
+

This code must have been neither debugged nor used.

+ +

3.9.1.4. Duplicate Definition of Macro

+

gnu/i386/isa/dgb.c has a duplicate definition of the following macro:

+
+#define DEBUG
+
+

Some of header files have a macro definition conflicting with this.

+

The Standard C regards duplicate definitions as "violation of constraint", but how they are treated depends on compiler systems; some make the first definition valid after issuing an error message and others, like GCC 2/cpp, make the last definition valid without issuing any message by default. To make the last definition valid, the following code should be added immediately before the last definition.

+
+#undef DEBUG
+
+ +

3.9.1.5. #warning

+

i386/isa/if_ze.c, and i386/isa/if_zp.c have the #warning directive. This is the only Standard violation directive I found in the kernel source. To conform to the Standard C, there is no way but to comment out this line.

+

mcpp accepts #warning.

+ +

3.9.1.6. Variable Argument Macros

+

gnu/ext2fs/ext2_fs.h and i386/isa/mcd.c have the following macro that takes variable number of arguments:

+
+#define MCD_TRACE(fmt, a...)        \
+{                                   \
+    if (mcd_data[unit].debug) {     \
+        printf("mcd%d: status=0x%02x: ",    \
+            unit, mcd_data[unit].status);   \
+        printf(fmt, ## a);          \
+    }                               \
+}
+
+#   define ext2_debug(fmt, a...)  { \
+        printf("EXT2-fs DEBUG (%s, %d): %s:",   \
+            __FILE__, __LINE__, __FUNCTION__);  \
+        printf(fmt, ## a);          \
+        }
+
+

This is a GCC-specific enhanced specification and cannot be applied to other compiler systems. The above "## a" can be simply written as "a". With ## and in the absence of an argument corresponding to "a..." in a macro invocation, the preceding comma is deleted. C99 also provides for variable argument macros, but their notation differs from that of GCC. The above example is written as follows in C99:

+
+#define MCD_TRACE( ...)             \
+{                                   \
+    if (mcd_data[unit].debug) {     \
+        printf("mcd%d: status=0x%02x: ",    \
+            unit, mcd_data[unit].status);   \
+        printf( __VA_ARGS__);       \
+    }                               \
+}
+
+#  define ext2_debug( ...)     {    \
+       printf("EXT2-fs DEBUG (%s, %d): %s:",   \
+           __FILE__, __LINE__, __FUNCTION__);  \
+       printf( __VA_ARGS__);   \
+       }
+
+

The most annoying difference is that in C99 requires one or more arguments on a macro invocation corresponding to "..." while GNUC/cpp requires 0 or more arguments corresponding to "a...". To handle this, when there is no argument corresponding to "...", mcpp issues a warning, instead of making it an error. Therefore, you can change the above code as follows:

+
+#define MCD_TRACE(fmt, ...)         \
+{                                   \
+    if (mcd_data[unit].debug) {     \
+        printf("mcd%d: status=0x%02x: ",    \
+            unit, mcd_data[unit].status);   \
+        printf(fmt, __VA_ARGS__);   \
+    }                               \
+}
+
+#  define ext2_debug(fmt, ...)     {    \
+       printf("EXT2-fs DEBUG (%s, %d): %s:",   \
+           __FILE__, __LINE__, __FUNCTION__);  \
+       printf(fmt, __VA_ARGS__);   \
+       }
+
+

This is simpler with one-to-one correspondence. However, this way of writing has a disadvantage that a comma immediately before an empty argument remains, resulting in, for example, printf( fmt, ). In this case, there is no other way but to write a macro definition in accordance with C99 specifications, or avoid using an empty argument in a macro invocation. Harmless tokens, such as NULL or 0, are used to write, for example, MCD_TRACE(fmt, NULL). *1

+

Note:

+

*1

GCC 2.95.3 or later also implements variable argument macros based on the C99 syntax. It is recommended to use this syntax. GCC specific one provides the flexibility of allowing for zero number of variable argument, but its notation is bad in that (1) for the "args..." parameter, a white space must not be inserted between "args" and "...", but such a pp-token is not permitted in C/C++, and that (2) it is not desirable that the notation for a token concatenation operator is used for different meaning in a replacement list. It is desirable to allow zero number of variable arguments based on the C99 notation. GCC 3 introduced a notation for variable argument macros that is a mixture of GCC 2's traditional notation and C99 one. For details, refer to 3.9.6.3.

+ +

3.9.1.7. Empty Argument in Macro Call

+

The following macro invocations appear in nfs/nfs.h, nfs/nfsmount.h, nfs/nfsmode.h, netinet/if_ether.c, netinet/in.c, sys/proc.h, sys/socketvars.h, i386/scsi/aic7xxx.h, i386/include/pmap.h, dev/aic7xxx/scan.l, dev/aic7xxx/aic7xxx_asm.c, kern/vfs_cache.c, pci/wd82371.c, vm/vm_object.h, and vm/device/pager.c. So do in /usr/include/nfs/nfs.h.

+
+LIST_HEAD(, arg2)
+TAILQ_HEAD(, arg2)
+CIRCLEQ_HEAD(, arg2)
+SLIST_HEAD(, arg2)
+STAILQ_HAED(, arg2)
+
+

The first argument is empty. C99 approved empty arguments but C90 regarded them as undefined. Taking it consideration that an argument may happen to be empty during a nested macro invocation, empty arguments should be approved, however, it is neither necessary nor desirable to write an empty argument in source code. Note that for a one-argument macro, there is syntax ambiguity between an empty argument and a lack of argument.

+

Taking everything into consideration, the following notation is recommended:

+
+#define EMPTY
+
+LIST_HEAD(EMPTY, arg2)
+TAILQ_HEAD(EMPTY, arg2)
+CIRCLEQ_HEAD(EMPTY, arg2)
+SLIST_HEAD(EMPTY, arg2)
+STAILQ_HAED(EMPTY, arg2)
+
+

Any Standard C conforming preprocessor will accept this notation.

+

By the way, some of the header files (in the nfs directory) shown above neither have the macro definitions shown above nor #include any other header files. This is because such header files assume that these macro definitions exist in sys/queue.h and that *.c programs will #include sys/queue.h first. These files arise ambiguity.

+

kern/kern_mib.c has the following macro definitions:

+
+SYSCTL_NODE(, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
+
+

In this case, the first argument cannot be changed to EMPTY. Because the corresponding macro definition in the sys/sysctl.h is as follows:

+
+#define SYSCTL_NODE(parent, nbr, name, access, handler, descr)      \
+    extern struct linker_set sysctl_##parent##_##name;              \
+    SYSCTL_OID(parent, nbr, name, CTLTYPE_NODE|access,              \
+        (void*)&sysctl_##parent##_##name, 0, handler, "N", descr);  \
+    TEXT_SET(sysctl_##parent##_##name, sysctl__##parent##_##name);
+
+

In other words, these arguments are not macro-expanded. The arguments of the SYSCTL_OID macro shown above, including the first one, are not macro expanded. In this case, there is no way but to leave the empty argument as it is. *1

+

Note:

+

*1 C99 approves empty arguments as legitimate. Taking macros, such as SYSCTL_NODE() and SYSCTL_OID(), into consideration, the EMPTY macro is not almighty and using empty arguments has some reason. In addition, even if EMPTY is used, a nested macro invocation may cause empty arguments. However, for source readability, using EMPTY is recommended whenever possible.

+ +

3.9.1.8. Object-Like Macros Replaced with Function-like Macro Name

+

i386/include/endian.h, as well as /usr/include/machine/endian.h, has the following macro definitions. (There are four same kinds of definitions.)

+
+#define __byte_swap_long(x) (replacement text)
+#define NTOHL(x)            (x) = ntohl ((u_long)x)
+#define ntohl               __byte_swap_long
+
+

The problem is the ntohl definition. Although ntohl is an object-like macro, it is expanded to a function-like macro name, then rescanned with subsequent text, and is expanded as if it were a function-like macro. This way of macro-expansion has been regarded as an implicit specification since K&R 1st, and the Standard C somehow approved it as legitimate. However, as I discuss in other documents, it is this specification that makes macro-expansion unnecessarily complicated and brings confusion to Standard documents. This is a bug specification. *1

+

This ntohl is actually a function-like macro, written as an object-like macro omitting the parameter list. You had better define this like a function-like macro that it is:

+
+#define ntohl(x)    __byte_swap_long(x)
+
+

This causes no problem.

+

i386/isa/sound/os.h has the same kind of macro definitions:

+
+#define INB         inb
+#define INW         inb
+
+

This should be written as follows:

+
+#define INB(x)      inb(x)
+#define INW(x)      inb(x)
+
+

Note:

+

*1 ISO 9899:1990 Corrigendum 1:1994 regarded the notation as undefined. C99 replaced this article with other. However, Standard documents are still confusing about this. For details, see cpp-test.html#2.7.6.

+ +

3.9.1.9. Preprocessing .S File

+

Some kernel sources are contained in several ".S" files, that is, they are written in assembler. These sources contain #include's or #ifdef's, which require preprocessing. To preprocess them, in FreeBSD 2.2.2-R, 'cc' is called with the '-x assembler-with-cpp' option, and 'cc' calls '/usr/libexec/cpp' with the '-lang-asm' option and then calls 'as'.

+

Of course, this ways of using .S files is non-conforming. This assembler source code must not contain a token that happens to have the same name with a macro. White spaces between tokens and at the beginning of a line must be retained during preprocessing. In addition, if the first token at the beginning of a line is a # indicating an assembler comment, special processing is required on the preprocessor side. This not only considerably limits available preprocessors but also increases the possibility of unknowingly introducing bugs. So, using .S files in this way is not recommended. *1

+

To preprocess source code for use with several types of machines, the code should be written in the following manner and be saved in not ".S" but ".c" file. 4.4BSD-Lite actually adopts this way of coding.

+
+asm(
+    "  asm code0\n"
+#ifdef Machine_A
+    "  asm code1\n"
+#else
+    "  asm code2\n"
+#endif
+    "  ...\n"
+);
+
+

Note:

+

*1 In FreeBSD 2.0-R, these kernel sources are contained not in *.S but in *.s file. The Makefile is so defined as to call 'cpp', instead of 'cc', to process them. Then the 'cc' calls 'as'. When the 'cpp' is called, '/usr/bin/cpp' is invoked. '/usr/bin/cpp' is a shell-script that calls '/usr/libexec/cpp -traditional'. This method was more convenient in that it provides a way to change preprocessors to be used by modifying the script.

+ +

3.9.2. Preprocessing FreeBSD 2/libc Source

+

I compiled all the source files in /usr/src/lib/libc of FreeBSD 2.2.2R. There was no problem, probably because most of them comes from 4.4BSD-Lite without much modification. It is quite rare and surprising that a huge amount of source files in excellent quality is gathered together.

+

Only at one place, I found the following coding in gen/getgrent.c. Of course, ";" at the end of line is surplus.

+
+#endif;
+
+ +

3.9.3. Problems Concerning GCC 2/cpp

+

As seen so far, writing a Standard-conforming source code with better portability in a more secure manner neither requires much effort nor provides any demerits. In spite of it, why does source code less conforming to Standards still exist at all?

+

When comparing the FreeBSD 2.0-R kernel sources with those of 2.2.2-R, non-conforming ones do not decrease in number. The problem is that newer sources are not necessarily more conforming to the Standards. There are few non-conforming sources in 4.4BSD-Lite. This is probably because the 4.4BSD sources were rewritten to become conforming to the Standard C and POSIX. However, during the process of implementing these sources to FreeBSD, the old writing style revived in some sources. For example, although the ntohl shown above is written as ntohl(x) in 4.4BSD-Lite, it is written as ntohl in FreeBSD. Why did the notation once put away revive?

+

I blame GCC/cpp for this revival, which passes these non-conforming sources without issuing a diagnostic. If -pedantic had been a default behavior, the old style source would have never revived. If -pedantic-errors had been a default behavior, although, GCC/cpp would not have been put into practical use because too many sources failed to be compiled. The gcc's man page describes the -pedantic option as: "There is no reason to use this option except for satisfying pedants." Now that eight years have already passed since Standard C was established, it is a high time that GCC/cpp should set -pedantic as default, not go so far as to set -pedantic-errors. *1

+

In FreeBSD 2.0-R, nested comments were sometimes found, but in 2.2.2-R, they disappeared. This is because GCC/cpp no longer allowed them. This has nothing to do with -pedantic, but I want to say how influential preprocessor's source checking is.

+

Note:

+

*1 I wrote 3.9.3 subsection in 1998. After that, gcc's man page or info deleted this expression, however, the specification remains almost the same.

+ +

3.9.4. Preprocessing Linux/glibc 2.1

+

I compiled glibc (GNU LIBC) 2.1.3 sources (February, 2000). Different from those of FreeBSD libc, I found many problems. Some sources are written based on GCC/cpp's undocumented specifications, in which case it took me a lot of time to identify them.

+ +

3.9.4.1. Multi-Line String Literal

+

sysdeps/i386/dl-machine.h and stdlib/longlong.h have many multi-line string literals as shown below:

+
+#define MACRO asm("
+    instr 0
+    instr 1
+    instr 2
+")
+
+

Some string literals are very long. compile/csu/version-info.h created by make also has a multi-line string literal. Of course, it is non-conforming, but GCC treats it as a string literal with embedded <newline>.

+

The -lang-asm (-x assembler-with-cpp, -a) option allows mcpp to convert a multi-line string literal into the following code:

+
+#define MACRO asm("\n  instr 0\n  instr 1\n  instr 2\n")
+
+

However, this option cannot work properly for a string literal with a directive inserted in the middle as shown in 3.9.1.1, in which case there is no way but to rewrite the source.

+ +

3.9.4.2. #include_next, #warning

+

#include_next appears in the following files:

+

catgets/config.h, db2/config.h, include/fpu_control.h, include/limits.h, include/bits/ipc.h, include/sys/sysinfo.h, locale/programs/config.h, and sysdeps/unix/sysv/linux/a.out.h

+

sysvipc/sys/ipc.h has #warning.

+

Although these directives are not approved by the Standard C, #include_next, in particular, becomes indispensable for glibc 2. So, mcpp for GCC implements #include_next and #warning.

+

The problems concerning #include_next is that it is not only a standard violation but also that what headers are actually included depends on the setting of include directories and a search order, which are changed by users via environment variables.

+

When glibc is installed, some files in glibc's include directory are copied to the /usr/include directory. These files are used as system header files. That these header files contain #include_next means system headers become patchy. It seems to be time to reorganize them.

+ +

3.9.4.3. Variable Argument Macros

+

The following files contain definitions of macros with variable number of arguments based on the GCC specification, as well as macro invocations:

+

elf/dl-lookup.c, elf/dl-version.c, elf/ldsodefs.h, glibc-compat/nss_db/db-XXX.c, glibc-compat/nss_files/files-XXX.c, linuxthreads/internals.h, locale/loadlocale.c, locale/programs/linereader.h, locale/programs/locale.c, nss/nss_db/db-XXX.c, nss/nss_files/files-XXX.c, sysdeps/unix/sysdep.h, sysdeps/unix/sysv/linux/i386/sysdep.h, and sysdeps/i386/fpu/bits/mathinline.h

+

This is a deviation from the C99 Standard. You must rewrite the source code before you can use mcpp. *1

+ +

Note:

+

*1 This is a spec since GCC2. There is another spec of GCC3 which is a compromise of GCC2 and C99 specs. See 3.9.6.3.

+ +

3.9.4.4. Empty Argument During Macro Calls

+

The following files have macro invocations with empty arguments:

+

catgets/catgetsinfo.h, elf/dl-open.c, grp/fgetgrent_r.c, libio/clearerr_u.c, libio/rewind.c, libio/clearerr.c, libio/iosetbuffer.c, locale/programs/ld-ctype.c, locale/setlocale.c, login/getutent_r.c, malloc/thread-m.h, math/bits/mathcalls.h, misc/efgcvt_r.c, nss/nss_files/files-rpc.c, nss/nss_files/files-network.c, nss/nss_files/files-hosts.c, nss/nss_files/files-proto.c, pwd/fgetpwent_r.c, shadow/sgetspent_r.c, sysdeps/unix/sysv/linux/bits/sigset.h, sysdeps/unix/dirstream.h

+

math/bits/mathcalls.h, in particular, contains as much as 79 empty arguments. This header file is installed in /usr/include/bits/mathcalls.h and is #included by /usr/include/math.h. Even with an EMPTY macro, nested macro invocations generate a lot of empty arguments. Are there any other ways to write macros more clearly?

+ +

3.9.4.5. Object-Like Macros Replaced with Function-like Macro Name

+

The following files contain object-like macro definitions replaced with function-like macro names:

+

argp/argp-fmtstream.h, ctype/ctype.h, elf/sprof.c, elf/dl-runtime.c, elf/do-rel.h, elf/do-lookup.h, elf/dl-addr.c, io/ftw.c, io/ftw64.c, io/sys/stat.h, locale/programs/ld-ctype.c, malloc/mcheck.c, math/test-*.c, nss/nss_files/files-*.c, posix/regex.c, posix/getopt.c, stdlib/gmp-impl.h, string/bits/string2.h, string/strcoll.c, sysdeps/i386/i486/bits/string.h, sysdeps/generic/_G_config.h, sysdeps/unix/sysv/linux/_G_config.h

+

Of these, some function-like macros, like the ones in math/test-*.c , are first replaced with an object-like macro name and then further replaced with a function-like macro name. Why did these macros have to be written in this way?

+ +

3.9.4.6. Macros Expanded to 'defined'

+

sysdeps/generic/_G_config.h, sysdeps/unix/sysv/linux/_G_config.h, and malloc/malloc.c contain the following macro definition expanded to the "defined" pp-token.

+
+#define HAVE_MREMAP defined(__linux__) && !defined(__arm__)
+
+

The intention of this macro definition is that with the following directive,

+
+#if HAVE_MREMAP
+
+

the above line is expected to be expanded as follows:

+
+#if defined(__linux__) && !defined(__arm__)
+
+

However, the behavior is undefined in Standard C when a #if line has a "defined" pp-token in a macro expansion result. Apart from it, this macro definition is strange in the first place.

+

The HAVE_MREMAP macro is first replaced with the following,

+
+defined(__linux__) && !defined(__arm__)             (1)
+
+

and then the identifiers defined, __linux__ and __arm__ are rescanned for more macro replacement. If any of them is a macro, it is expanded. In this case, defined cannot be defined as a macro (Otherwise, it causes another undefined result), and if __linux__ is defined as 1 and __arm__ is not defined, this macro is finally expanded as follows:

+
+defined(1) && !defined(__arm__)
+
+

defined(1), of course, is a syntax error of a #if expression.

+

However, GCC/cpp stops macro expansion at (1) and regards it as the final macro expansion result of the #if line. Since this is "undefined" anyhow, this GNU specification cannot be described as wrong, but it lacks of consistency in that how to expand a macro differs between macros in a #if line and in other lines. At least, it lacks of portability. *1

+

The above code should be written as follows:

+
+#if defined(__linux__) && !defined(__arm__)
+#define HAVE_MREMAP 1
+#endif
+
+

I hope this kind of confusing code be eliminated as early as possible. *2

+

Note:

+

*1 GCC 2/cpp internally treats defined in a #if line as a special macro. For this reason, when GCC/cpp rescans the following sequence of tokens for macro expansion, it evaluates it as a #if expression, as a result of special handling of defined pseudo-macro, instead of expanding the original macro. In other words, distinction between macro expansion and #if expression evaluation is ambiguous.

+
+defined(__linux__) && !defined(__arm__) +
+

This problem relates to GCC/cpp' own program structure. GCC 2/cpp has a de facto main routine rescan(), which is a macro rescanning routine. This routine reads and processes source file from the beginning to the end, during the course of which, it calls a preprocessing directive processing routine. Although implementing everything using macros is a traditional program structure of a macro processor, this structure can be thought to cause mixture of macro expansion and other processing.

+

*2 In glibc 2.4, this macro was corrected. +Nevertheless, many other macros of the same sort were newly defined.

+ +

3.9.4.7. Preprocessing .S File

+

The files named *.S contain assembler source code requiring preprocessing. Some of these files have preprocessing directives, such as #include, #define, and #if. In addition, the file named compile/csu/crti.S generated by Make contains the following lines:

+
+#APP
+
+

or

+
+#NO_APP
+
+

From a syntax point of view, preprocessors cannot tell whether these lines are invalid preprocessing directives or valid assembler comments. GCC seems to leave these lines as they are during preprocessing and treat it as assembler comments.

+

Concatenation of pp-tokens using the ## operator sometimes generates an invalid pp-token. GCC/cpp outputs these pp-tokens without issuing a diagnostic.

+

For compatibility with GCC, I reluctantly decided that, with the -lang-asm (-x assembler-with-cpp, -a) option, mcpp does not treat these non-conforming directives and invalid pp-tokens generated by ## as error, and outputs them as they are and issues a warning.

+

Essentially, these sources should be processed with an assembler macro processor. GNU seems to provide a macro processor called gasp, but it seems to be scarcely used for some reason.

+ +

3.9.4.8. Problems of rpcgen and -dM Option

+

When invoked with the -dM option, GCC outputs only macro definitions, which is used by stdlib/isomac.c in 'make check' routine.

+

The problem of the isomac.c is that it accepts only GCC/cpp's macro definition file format and regards a comment or a blank line as an error.

+

Glibc make sometimes uses a program called rpcgen. The problem of rpcgen is that it accepts only GCC/cpp's output format of preprocessor line number information as follows:

+
+#123 "filename"
+
+

Rpcgen does accept neither:

+
+#line 123
+
+

nor

+
+#line 123 "filename"
+
+

Rpcgen regards them as error.

+

I reluctantly decided that GCC-specific-mcpp uses the GCC format by default. Rpcgen's specification is poor in that it is based on a particular compiler system's format and cannot accept the standard one.

+ +

3.9.4.9. -include, -isystem and -I- Options

+

Glibc 2.1 'makefile' often uses the -include option and sometimes uses -isystem and -I- options. The former can be substituted with #include at the beginning of source code. The latter two are less necessary; these are only necessary to update system headers.

+

Only GCC-specific-build of mcpp implements these two options, but I would like these less necessary options to be made obsolete. *1

+

Note:

+

*1 GCC/cpp provides several more options that specify include directories and their search orders, such as -iprefix, -iwithprefix, and -idirafter. It also provides the -remap option that specifies mapping between long-file-names and MS-DOS 8+3 format filenames. On CygWIN systems, specs files contain these options, but it is not necessary to use these options because include directories can be specified with environment variables and because such mapping is no longer necessary on CygWIN.

+ +

3.9.4.10. Undocumented Predefined Macros

+

This is not a problem of glibc, but of GCC. The following macros are GCC/cpp predefined macros although their names do not appear in documentation.

+
+__VERSION__,  __SIZE_TYPE__,  __PTRDIFF_TYPE__, __WCHAR_TYPE__
+
+

On Vine Linux 2.1 (egcs-1.1.2) systems, __VERSION__ is set to "egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)". On many systems, including Linux/i386, the values of other three macros have types unsigned int, int, and long int, respectively. However, on FreeBSD and CygWIN systems, their types are slightly different from them (I do not know why). Why does those predefines macros remain undocumented?

+ +

3.9.4.11. Undocumented Environment Variables

+

The most strange thing is the undocumented environment variable named SUNPRO_DEPENDENCIES. sysdeps/unix/sysv/linux/Makefile contains the following script:

+
+SUNPRO_DEPENDENCIES='$ (@:.h=.d)-t $@' \
+$ (CC) -E -x c $ (sysinclude) $< -D_LIBC -dM | \
+... \
+etc.
+
+

The intent of this script is to specify a file name with the environment variable SUNPRO_DEPENDENCIES, and to have cpp output macro definitions in source code and dependency description lines between source files to that file.

+

I had no other way but to read the GCC/cpp source code (egcs-1.1.2/gcc/cccp.c) to know how this environment variable works.

+

In addition, there is another environment variable, DEPENDENCIES_OUTPUT, which has a similar function. The difference between the two is that SUNPRO_DEPENDENCIES also outputs dependency description lines among system headers, but DEPENDENCIES_OUTPUT does not.

+

Only GCC-specific-build of mcpp enables these two environment variables, but I would like these undocumented specifications to be made obsolete as early as possible.

+ +

3.9.4.12. Other Problems

+

Linux (i386)/GCC 2 appends the -Asystem(unix), -Acpu(i386) or -Amachine(i386) to cpp invocation options by using specs file. As long as the glibc 2.1.3 for Linux/x86 is concerned, there seems to be no source code that utilizes this functionality.

+

It is a big problem that glibc's system headers have become patchy and very complicated. A small difference in settings may result in a big difference in preprocessing results.

+

On the other hand, Glibc 2.1.3 did not contain #else junk, #endif junk, or duplicate macro definitions that were found in FreeBSD 2.2.2/kernel sources. In some aspects, Glibc 2.1 source is better organized than FreeBSD 2/kernel source.

+

However, as a whole, there were not a few sources that are based on GCC-specific specifications in glibc 2.1, which impairs portability to other compiler systems although such sources form only a small portion of several thousand source files. Dependence on GCC local specifications is not desirable for program readability and maintainability. I hope that GCC V.3 will make obsolete these local specifications and that all the source code based on them will be completely rewritten.

+ +

3.9.5. To Use mcpp with GCC 2

+

You must modify some source code as follows before you can use mcpp to compile glibc 2.1 sources: *1

+
    +
  1. Macro definitions with variable number of arguments: Modify the 14 files in 3.9.4.3 as shown in 3.9.1.6. Of course, you had better save the original files.
    +
    +
  2. Macros contained in the three files shown in 3.9.4.6 that has defined in its replacement list: /usr/include/_G_config.h is a file generated when sysdeps/unix/sysv/linux/_G_config.h is installed and has the same contents with this. You had better modify /usr/include/_G_config.h.
    +
+

In addition to the options specified in Makefile or specs file, you must specify the -lang-asm (-xassembler-with-cpp) option to process *.S files containing multi-line string literals or assembler comments before you can invoke mcpp. Usually, you can leave this option specified when preprocessing other files.

+

When you want to use GCC/cpp or mcpp, or change the default options, you had better perform the following steps:

+
    +
  1. Become a super-user to move to the directory where cpp resides (here assuming /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66). Let me assume that this directory has GCC/cpp installed under the name of cpp and mcpp as mcpp.
    +
    +
  2. Create a file called mcpp.sh with the following contents. *2
    +
    +#!/bin/sh
    +/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/mcpp -Q -lang-asm "$@"
    +
    +The -Q options are optional, however, I recommend that you should use -Q to record a large amount of diagnostic messages.
    +
    +
  3. Enter the following commands:
    +
    +chmod a+x mcpp.sh
    +mv cpp cpp_gnuc
    +ln -sf mcpp.sh cpp
    +
    +These commands execute mcpp.sh linked to cpp when gcc calls cpp, and mcpp.sh calls mcpp using the above options before the ones specified by gcc.
    +
    +
  4. To change default options, modify mcpp.sh or call mcpp directly. To use GCC/cpp do:
    +
    +ln -sf cpp_gnuc cpp
    +
    +
+

Note:

+

*1 mcpp V.2.7 implemented these specs. +Hence, editing of sources are not necessarily required.

+

*2 If you use 'configure' and 'make' to compile GCC-specific-build of mcpp, the 'make install' command will set the script appropriately. The only thing left for you here is to add '-Q -lang-asm' options to the script.

+ +

3.9.5.1. To Sort mcpp's Warnings

+

Another problem of using mcpp is that it issues a huge amount of warning messages. You can redirect them to a file using the -Q option, but when you preprocess a large amount of source code, such as glibc, total of several hundred MB or more of 'mcpp.err' are created, so it is impossible for you to look through the whole files.

+

Taking a close look at mcpp.err, you will find same warnings being issued repeatedly. This is because the same *.h files are #included by many source programs. To make the files more readable, perform the following procedure:

+
    +
  1. To find error messages, enter the following command:
    +
    +grep 'fatal:' `find . -name mcpp.err`
    +grep 'error:' `find . -name mcpp.err`
    +
    +
  2. To sort warning messages, enter the following command:
    +
    +grep 'warning:' `find . -name mcpp.err` | sort -k3 -u > mcpp-warnings-sorted
    +
    +
  3. To find all the source lines causing a 'warning:', enter the following command:
    +
    +grep 'warning:' `find . -name mcpp.err` | sort -k3 | uniq > mcpp-warnings-all
    +
    +
  4. To find a particular type of 'warning:'s, enter the following command, for example:
    +
    +grep 'warning: Replacement' `find . -name mcpp.err` | sort -k3 | uniq | less
    +
    +After you get an overall idea of what source lines are causing what kinds of errors or warnings, you can see a particular mcpp.err by "less" and then, if necessary, see the source file in question.
    +
    +In addition, you can sandwich the source code in question with '#pragma MCPP debug expand' and '#pragma MCPP end_debug' and preprocess it again to see the output, in which case I recommend you to invoke mcpp in the following manner so that preprocessing results and diagnostic messages are output to the same file:
    +
    +mcpp <-opts> in-file.c > in-file.i 2>&1
    +
    +When you use "make", you must temporarily change the above shell-script.
    +
+ +

3.9.6. Preprocessing GCC 3.2 Source

+

I first compiled GCC 3.2 sources on Linux and FreeBSD, then I used the generated gcc to compile mcpp and then I recompiled GCC 3.2 sources using mcpp for preprocessing.

+

New GCC compilers are bootstrapped during various phases of make; gcc and cc1, etc generated in an earlier phase are used to recompile themselves, and those generated compiler drivers and compiler-propers are used again to recompile themselves, and so on. During the bootstrap, gcc exists under the name of xgcc.

+

Other than cc1 and cc1plus, GCC 2 has a separate preprocessor called cpp. In GCC 3, cpp was absorbed into cc1 and cc1plus. However, there still exists a separate preprocessor cpp0. To have cpp0 preprocess, the -no-integrated-cpp option must be specified when you invoke gcc or g++. Therefore, to have mcpp preprocess, you must use a shell-script that have gcc (xgcc) or g++ invoke mcpp first then invoke cc1 or cc1plus. *1

+

In the GCC compiler system, the settings of system headers and their search order are becoming very complex. So, a small difference in settings may result in a difference in preprocessing results. Even successful compilation was often difficult to attain. In addition, compilation and tests require a lot of other software. Older versions of such software may cause failure in compilation or tests. Actually, compilation sometimes failed due to some hardware problems on my machine.

+

Actually, I failed to compile GCC 3.2 source under FreeBSD 4.4R. I had to upgrade FreeBSD to 4.7R and changed software packages to those for FreeBSD 4.7R before I was able to succeed in compilation. *2

+

I used VineLinux 2.5 on two PCs. Although compilation of GCC 3.2 sources using GCC 2.95.3 was successful on one PC (K6/200MHz), recompilation of GCC 3.2 sources using the generated GCC 3.2/cc1 failed, and caused many segmentation faults. Then I changed CPU from K6 to AthlonXP. This time, recompilation was successful; no segmentation faults occurred. Hardware may have caused the problem.

+

When I compiled GCC 3.2 sources using GCC 2.95.4 under FreeBSD on K6, "make -k check" of the generated gcc was almost successful. When I recompiled GCC 3.2 itself using the generated GCC 3.2, in "make -k check" of g++ and libstdc++-v3, about 20 percent of testsuite was unsuccessful. However, when using AthlonXP, instead of K6, everything went OK. Hardware may have caused the problem.

+

On both VineLinux PCs, when I recompiled GCC 3.2 sources using GCC 3.2 itself and mcpp, "make -k check" of the generated gcc was successful. However, in "make -k check" of g++ and libstdc++-v3, 20 percent of testsuite failed. *3, *4, *5

+

In anyway, the cause of this testsuite failure seems to lie not in the generated compilers themselves, such as gcc, g++, cc1 and cc1plus, but in the header files or some other settings.

+

mcpp cannot be described as completely compatible with GCC/cpp, but is highly compatible. So, mcpp and GCC/cpp can be used interchangeably.

+

GCC 3.2 sources were compiled in the following environment:

+
+ + + + + +
OS make library CPU
VineLinux 2.5GNU makeglibc 2.2.4Celeron/1060MHz
VineLinux 2.5GNU makeglibc 2.2.4K6/200MHz, AthlonXP/2.0GHz
FreeBSD 4.7R UCB makelibc.so.4 K6/200MHz, AthlonXP/2.0GHz
+
+

Only C and C++ were compiled.

+

Note:

+

*1 I had to do this for each bootstrap stage. Since makefile is too large and too complex to change, I employed an inelegant method; I kept on sitting in front of PC screen during the entire process of bootstrap. At each end of the stages, I entered ^C and replaced xgcc and others with shell-scripts.

+

*2 Due to dependency between packages, the system falls into confusion unless appropriate versions are installed. Actually, for this reason, my FreeBSD temporarily failed to invoke kterm.

+

*3 "make -k check" cannot be used with mcpp because diagnostics of mcpp are different from those of GCC.

+

*4 "make -k check" seems to require an English environment, so the LANG environment variable should be set to C.

+

*5 All the testsuite failures were caused by inability of the pthread_* functions, such as pthread_getspecific and pthread_setspecific, to be linked in the library i686-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.5.0.0. When a correctly generated library was installed, "make -k check" was successful. On FreeBSD, this problem never happened. This is probably because of small differences in settings.

+ +

3.9.6.1. Multi-Line String Literal

+

This very old way of coding was no longer found in GCC 3.2 sources. Multi-line string literals were made obsolete as late as at GCC 3.2. GCC 3.2 processes a source with a multi-line string literal as you expect, but issues a warning.

+ +

3.9.6.2. #include_next and #warning

+

limits.h and syslimits.h in build/gcc/include generated during the course of make have #include_next. When GCC 3.2 is installed, these header files are copied to limits.h and syslimits.h in lib/gcc-lib/i686-pc-linux-gnu/3.2/include.

+

GCC 3.2 sources does not have #warnings.

+ +

3.9.6.3. Variable Argument Macros

+

GCC 3.2 sources have some variable argument macros, but most of them are found in testsuite and they are nothing but test samples. Although GCC 3.2 still supports variable argument macros in GCC 2 notation, the ones using __VA_ARGS__ (in C99 notation) are more frequently found in GCC 3.2 sources.

+

In GCC 3, variable argument macros in a mixed notation of GCC 2 and C99 are found: *1

+
+#define eprintf( fmt, ...)   fprintf( stderr, fmt, ##__VA_ARGS__)
+
+

This definition corresponds to the following one of GCC 2 spec.

+
+#define eprintf( fmt, args...)   fprintf( stderr, fmt, ##args)
+
+

According to the GCC specifications, in the absence of an argument corresponding to "...", the comma immediately before "##" is deleted. So, this is expanded as follows:

+
+eprintf( "success!\n")  ==>  fprintf( stderr, "success!\n")
+
+

As far as this example is concerned, this specification seems to be convenient, but is not desirable in that (1) a comma in a replacement list of a macro definition is not always used to delimit parameters, (2) it allows a token concatenation operator (##) to have other functionality, (3) it makes rules more complex by allowing exceptions. *2, *3, *4

+ +

Note:

+

*1 This manual calls the variadic macro of specification since GCC 2 as GCC2 spec, and that of created in GCC 3 as GCC3 spec.

+

*2 While on GCC 2.* 'args...' in definition of GCC2 spec variadic macro should not be separated as 'args ...', on GCC 3 the intervening spaces are allowed.

+

*3 When -ansi option (or any of -std=c* or -std=iso* option) is specified, GCC, however, does not remove the comma even if the variable argument is absent. +Nevertheless, the '##' disappears silently.

+

*4 mcpp V.2.6.3 implemented variadic macro of GCC3 spec for STD mode on GCC-specific-build only. +V.2.7 even implemented GCC2 spec one.

+ +

3.9.6.4. Empty Arguments in Macro Invocation

+

Apart from #include-ed system headers, such as /usr/include/bits/mathcalls.h and /usr/include/bits/sigset.h, empty arguments in a macro invocation are found only in gcc/libgcc2.h of GCC 3.2 sources themselves. *1

+

Note:

+

*1 These two header files are copied into the system header directory when glibc is installed. They do not exist on FreeBSD because glibc is not used.

+ +

3.9.6.5. Object-Like Macros Replaced with Function-Like Macros

+

gcc/fixinc/gnu-regex.c and libiberty/regex.c have object-like macros that are replaced with function-like macro name. /usr/lib/bison.simple, a #included file, also has such macros. These macros are all relevant to alloca. For example, libiberty/regex.c has the following macro definitions.

+
+#define REGEX_ALLOCATE  alloca
+#define alloca( size)   __builtin_alloca( size)
+
+

This should be written as follows:

+
+#define REGEX_ALLOCATE( size)   alloca( size)
+
+

Why did they omit (size)?

+

In addition, regex.c also has another alloca, which is defined as follows:

+
+#define alloca  __builtin_alloc
+
+

Their writing style is inconsistent.

+

Furthermore, regex.c has a #include "regex.c" line, which is including itself. regex.c is a strange and unnecessarily complicated source.

+ +

3.9.6.6. Macros Expanded to 'defined'

+

GCC 3.2 sources do not have macros expanded to 'defined'. According to GCC 3.2 documents, this type of macro is preprocessed in the same way as GCC 2/cpp, but GCC 3.2 issues a warning to indicate "may not portable". However, GCC 3.2 does not issue a warning to an example shown in 3.9.4.6.

+ +

3.9.6.7. Preprocessing of .S Files

+

cpp.info of GCC 3 says:

+
Wherever possible, you should use a preprocessor geared to the +language you are writing in. Modern versions of the GNU assembler have +macro facilities.
+

However, the gcc/config directory has several *.S files.

+ +

3.9.6.8. rpcgen and -dM Option

+

Make of GCC 3.2 uses neither rpcgen nor -dM option. However, specifications of rpcgen and the -dM option do not seem to change from the previous versions.

+ +

3.9.6.9. -include, -isystem and -I- Options

+

These options are frequently used in make of GCC 3.2. Sometimes, the -isystem option is used to specify several system include directories at one time. Is it inevitable to use the option during software compilation that updates system headers themselves? I think they had better use an environment variable to specify all the system include directories.

+

On the other hand, GCC 3/cpp documents discourage to use the -iwithprefix and -iwithprefixbefore options. GCC provides many options to specify include directories. Does GCC 3.2 move toward reorganization or reduction in number of them? *1

+

Note:

+

*1 GCC 3.2 Makefile uses the -iprefix option in a stand alone manner (without using -iwithprefix or -iwithprefixbefore), although the -iprefix option makes sense only when used with one of these two options following it.

+ +

3.9.6.10. Undocumented Predefined Macros

+

GCC 2 did not document predefined macros, such as __VERSION__, __SIZE_TYPE__, __PTRDIFF_TYPE__ and __WCHAR_TYPE__. Even with the -dM option, their existence was unknown. GCC 3 not only documents them but also enhances -dM to show their definitions.

+ +

3.9.6.11. Undocumented Environment Variables

+

GCC 3 documents the SUNPRO_DEPENDENCIES environment variable GCC 2 did not. (I do not know why this environment variable is needed.)

+ +

3.9.6.12. Other Problems

+

GCC 3 implements following #pragmas:

+
+#pragma GCC poison
+#pragma GCC dependency
+#pragma GCC system_header
+
+

Of these, GCC 3.2 sources use poison and system_header. mcpp does not support these #pragmas because I do not think them necessary. (I omit explanation of their specifications.) *1

+

GCC 3 deprecates assertion directives, such as #assert, although gcc, by default, specifies the -A option.

+

In GCC 2, the -traditional option is implemented in one and the same cpp, result in a strange mixture of very old specifications and C99 ones. In GCC 3, its preprocessor was divided into two: non-traditional cpp0 and tradcpp0. The -traditional option is valid only for gcc. cpp0 does not provides it. gcc -traditional invokes tradcpp0 for preprocessing.

+

tradcpp0 is getting closer to a true traditional preprocessor before C90. They say that they no longer maintain tradcpp0 except for serious bugs.

+

The strange specifications of GCC 2/cpp seem to have been significantly revised.

+

Note:

+

*1 mcpp V.2.7 onward supports #pragma GCC system_header on GCC-specific-build.

+ +

3.9.7. To Use mcpp with GCC 3 or 4

+

As seen above, as far as preprocessing is concerned, GCC 3.2 sources have been much improved than glibc 2.1.3 sources in that the traditional way of writing has been almost eliminated and that meaningless options are no longer used.

+

GCC 3.2/cpp0 itself is also much superior to GCC 2/cpp in that it regards traditional specifications as obsolete and articulates the token-based principle. Undocumented specifications have been significantly reduced. Although these improvements are not still sufficient, GCC is certainly moving toward the right direction.

+

However, GNU / Linux system headers become so complex that it is difficult to grasp their entire structure, which may one of the biggest causes of problems in the GNU / Linux system.

+

Another pitiful fact is that the preprocessor is absorbed into the compiler-proper. Therefore, to use mcpp, the -no-integrated-cpp option must be specified when invoking gcc or g++. If you compile a large amount of source files with complicated or many makefiles, or if some program automatically invoke gcc, you should create a shell-script that invokes gcc or g++ with the -no-integrated-cpp option automatically specified.

+

Let me take an example of this. Place the following shell-scripts in the directory where gcc and g++ reside (on my Linux, /usr/local/gcc-3.2/bin), under the names of gcc.sh and g++.sh, respectively.

+
+#!/bin/sh
+/usr/local/gcc-3.2/bin/gcc_proper -no-integrated-cpp "$@"
+
+#!/bin/sh
+/usr/local/gcc-3.2/bin/g++_proper -no-integrated-cpp "$@"
+
+

Move to this directory and enter the following commands:

+
+chmod a+x gcc.sh g++.sh
+mv gcc gcc_proper
+mv g++ g++_proper
+ln -sf gcc.sh gcc
+ln -sf g++.sh g++
+
+

In the directory where cpp is located (on my Linux, /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2), create a script that executes mcpp when cpp0 is invoked, as you did for GCC 2 (See 3.9.5). By doing this, gcc or g++ first invokes mcpp and then invokes cc1 or cc1plus with the -fpreprocessed option appended. -fpreprocessed indicates the source has been preprocessed already. *1

+

Note that when a GCC version other than the system standard one is installed, additional include directory settings may be required. mcpp embeds these settings when mcpp itself is compiled, thus eliminating the need to set them with environment variables.

+

If possible, I want to replace the cpplib source, the preprocessing part of cc1 or cc1plus, with mcpp. The source files that define the internal interface between cpplib and ccl or cc1plus, as well as the external interface between cpplib and user programs that use it, amount to as much as 46KB. It is impossible to replace. Why is the interfaces so complex? It is a pity.

+

Note:

+

*1 mcpp gets all the necessary informations by 'configure' and sets these scripts by 'make install'.

+ +

3.9.7.1. To Use mcpp with GCC 3.3 and 3.4-4.1

+

Although GCC 3.2 seemed to go in the direction of better portability, GCC turned its direction to a different goal on 3.3 and 3.4. V.3.3 and 3.4 differ from 3.2 in the following points.

+
    +
  1. Independent preprocessor cpp0 was abolished. The execution option '-no-integrated-cpp' changed its meaning, gcc invokes cc1 (cc1plus) instead of cpp0 as a preprocessor even if this option is specified, and gcc passes to the preprocessor some options which are irrelevant to preprocessing. (What a dirty implementation!)
    +
  2. Many (several dozen of) macros are predefined. The relationship between the system headers and GCC became more complicated.
    +
  3. Tradcpp was also abolished and absorbed to an execution option of cc1. Some old specifications, which were obsoleted or deprecated in V.3.2, were restored.
    +
+

GCC / cc1 is becoming one huge and complex compiler absorbing preprocessor and some system header's contents. I doubt whether this is a better way of compiler construction, especially of developing open source one.

+

As regards mcpp, it is a nuisance that gcc arbitrarily hands to preprocessor some irrelevant options. Since it is risky to ignore all the options unrecognized by mcpp, I didn't adopt this. Although mcpp ignores the wrong options such as -c or -m* which are frequently handed from gcc, it will get an error if other unexpected options are passed on.

+

In order to avoid conflicts with those wrong options, mcpp V.2.5 changed some options, -c to -@compat, -m to -e, and some others.

+

To use mcpp with GCC 3.2 or former, it is necessary only to replace invoking of cpp0 by mcpp. To use mcpp with GCC 3.3 or later, it is necessary to divide invoking of cc1 to mcpp and cc1. src/set_mcpp.sh will write shell-scripts for this purpose in the GCC libexec directory on mcpp installation. The 'make install' command will also get GCC predefined macros using -dM option and set those for mcpp. *1, *2, *3

+

In addition, GCC 3.4 changed processing of multi-byte characters. Its document says as: *4

+
    +
  1. It converts every encodings of multi-byte characters to UTF-8 at the first phase of preprocessing.
    +
  2. It uses libiconv functions for the conversion, therefore it can handle all the encodings iconv can do.
    +
  3. It has '-finput-charset=<encoding>' option to specify the source file's encoding. (In other words, the encoding is not converted without this option.)
    +
  4. It has also '-fexec-charset=<encoding>' option to specify the output encoding which defaults to UTF-8. *5
    +
+

There is a trend to identify "internationalization" with "unicodization", especially in the Western people who do not use multi-byte characters. It seems that this trend has reached to GCC.

+

What is worse, GCC 3.4 or later does not implement their specification sufficiently. In actual, it behaves as:

+
    +
  1. As for EUC-JP, GB2312, KSC-5601 and Big5, it converts these encodings to UTF-8 correctly with -finput-charset option, and it passes them as they are without this option. *6
    +
  2. The -fexec-charset option has no effect on V.3.4 nor V.4.0. On V.4.1-4.3, the option has effect, and works correctly.
    +
  3. With ISO2022-JP, GCC cannot preprocess on V.3.4 or 4.0, whereas on V.4.1-4.3 it can preprocess the encoding.
    +
  4. As for shift-JIS, all the versions confuse in preprocessing when -finput-charset is specified.
    +
+

mcpp takes -e <encoding> option to specify an encoding, and the GCC-specific-build inserts <backslash> to the byte in multi-byte character which has the same value with <backslash>, '"' or '\'', when the encoding is one of BIG-5, shift-JIS or ISO2022-JP, in order to complement GCC's inability. However, it does not convert the encoding to UTF-8. mcpp also treats -finput-charset as the same option as -e. I adopted these specifications because: *7

+
    +
  1. As for shift-JIS, GCC of any version cannot process it if -f*-charset options are specified. +But, as for shift-JIS, ISO2022-JP and Big5, if the encodings are not converted but supplemented with <backslash>es, the multi-byte characters are output as they are by cc1 on any version of GCC. +Also EUC-JP, GB2312, KSC-5601 and UTF-8 are passed as they are, if -f*-charset are not specified. +That is to say, the multi-byte characters are treated as single-byte character sequences.
    +
  2. GCC up to V.4.0 / cc1 does not convert back from UTF-8 to the original encodings.
    +
  3. I hope that GCC will change the multi-byte character handling in the near future.
    +
+

Note:

+

*1 The output of -dM option, however, slightly differs each other depending on other options. +What is worse, most of the predefined macros are undocumented ones. +As a result, the whole picture cannot be grasped easily.

+

*2 MinGW does not support symbolic link. Though the 'ln -s' command exists, it does not link but only copy. Moreover, MinGW's GCC rejects to invoke a shell-script even if it is named cc1. To cope with this, mcpp's MinGW GCC-specific-build generates a binary executable named cc1.exe (copied also to cc1plus.exe) which invokes mcpp.exe or GCC's cc1.exe/cc1plus.exe.

+

*3 CygWIN / GCC has -mno-cygwin option which alters system include directory and alters GCC's predefined macros. mcpp V.2.6.1 onward, CygWIN GCC-specific-build supports this option and generates two sets of header files for the predefined macros.

+

*4 On GCC in my FreeBSD 6.3, multi-byte character conversion to UTF-8 does not work at all, though libiconv seems to be linked to them. +It was the same with FreeBSD 5.3 and 6.2, too.

+

*5 This conversion seems not to be done in preprocessing phase, but in compilation phase. +Output of -E option is still UTF-8.

+

*6 GCC V.4.1-4.3 fail to compile due to a bug of GCC, if -save-temps or -no-integrated-cpp option is specified at the same time with -f*-charset option.

+

*7 When you pass the output of mcpp to cc1, you should not specify -fexec-charset option nor -finput-charset option.

+ +

3.9.8. Preprocessing Linux/glibc 2.4

+ +

I compiled glibc 2.4 (March, 2006) source, and checked preprocessing problems in it. +As a compiler system, I used GCC 4.1.1 with mcpp 2.6.3. +Since my machine is x86 type, I did not check the codes for other CPUs.

+This is a six years newer version than glibc 2.1.3 (February, 2000) which I checked formerly, so it has naturally some parts largely changed from the old version. +However, It has remarkably many parts unchanged. +On the whole, most of the problems I noticed in the old version have not been revised, on the contrary, unportable sources have increased.

+ +

3.9.8.1. Multi-Line String Literal

+ +

The old-fashioned "multi-line string literal" has disappeared.

+ +

3.9.8.2. #include_next, #warning

+ +

#include_next is found in the following source files. +Its occurrence has increased as compared with the six years older version.

+ +

+catgets/config.h, +elf/tls-macros.h, +include/bits/dlfcn.h, +include/bits/ipc.h, +include/fpu_control.h, +include/limits.h, +include/net/if.h, +include/pthread.h, +include/sys/sysctl.h, +include/sys/sysinfo.h, +include/tls.h, +locale/programs/config.h, +nptl/sysdeps/pthread/aio_misc.h, +nptl/sysdeps/unix/sysv/linux/aio_misc.h, +nptl/sysdeps/unix/sysv/linux/i386/clone.S, +nptl/sysdeps/unix/sysv/linux/i386/vfork.S, +nptl/sysdeps/unix/sysv/linux/sleep.c, +sysdeps/unix/sysv/linux/ldsodefs.h, +sysdeps/unix/sysv/linux/siglist.h +

+ +

Though the following is not a part of glibc itself but a testcase file to test glibc by 'make check', #include_next is found also in it.

+ +

sysdeps/i386/i686/tst-stack-align.h

+ +

#warning appears in sysvipc/sys/ipc.h. +This directive is in a block to be skipped in normal processing, and does not cause any problem.

+ +

3.9.8.3. Variable Argument Macros

+ +

There are definitions of variable argument macros in the following files. +All of these are that of the old spec since GCC2. +There is not any macro of C99 spec, nor even GCC3 spec one.

+ +

elf/dl-lookup.c, +elf/dl-version.c, +include/libc-symbols.h, +include/stdio.h, +locale/loadlocale.c, +locale/programs/ld-time.c, +locale/programs/linereader.h, +locale/programs/locale.c, +locale/programs/locfile.h, +nptl/sysdeps/pthread/setxid.h, +nss/nss_files/files-XXX.c, +nss/nss_files/files-hosts.c, +sysdeps/generic/ldsodefs.h, +sysdeps/i386/fpu/bits/mathinline.h, +sysdeps/unix/sysdep.h, +sysdeps/unix/sysv/linux/i386/sysdep.h

+ +

The following testcase files also have variadic macro definitions of GCC2 spec.

+ +

localedata/tst-ctype.c, +posix/bug-glob2.c, +posix/tst-gnuglob.c, +stdio-common/bug13.c

+ +

Moreover, many of the calls of these macros lack actual argument for variable argument. +As much as 142 files have such macro calls lacking variable argument, and 120 files of them have such unusual macro calls as the replacement list of which have ", ##" sequence immediately preceding variable argument and hence removal of the ',' happen.

+

As a variable argument macro specification, C99 one is portable and is recommendable. +However, it is not so easy to rewrite GCC specs macro to C99 one. +Both of GCC2 spec and GCC3 spec variadic macros do not necessarily correspond to C99 spec one-to-one, because GCC specs cause removal of the preceding comma in case of absence of variable argument. +If you rewrite GCC spec macro definition to C99 one, you also need to rewrite macro calls of absent variable argument and supplement an argument.

+

In glibc 2.1.3, GCC2 spec macros were not so many, and it was not a heavy work for a user to rewrite them with an editor. +In glibc 2.4, however, such macro definitions increased and especially their calls vastly increased. +As a consequence, it is impossible now for a user to rewrite them.

+

To cope with this situation, mcpp V.2.6.3 onward implemented GCC3 spec variadic macro for GCC-specific-build only. +Furthermore, mcpp V.2.7 implemented GCC2 spec one, too. +However, you should not write GCC2 spec macro in your sources, because the spec is too deviant from token-based principle. +Since GCC2 spec corresponds to GCC3 spec one-to-one, it is easy to rewrite a macro definition to GCC3 spec, and call of that macro need not be rewritten. +The already written macros with GCC2 spec will become a little clearer, if rewritten this way. *1

+

To rewrite a GCC2 spec variadic macro to GCC3 spec one, for example, change:

+ +
+#define libc_hidden_proto(name, attrs...)   hidden_proto (name, ##attrs)
+
+ +

to:

+ +
+#define libc_hidden_proto(name, ...)    hidden_proto (name, ## __VA_ARGS__)
+
+ +

That is, change the parameter attrs... to ..., and change attrs in the replacement-list to __VA_ARGS__.

+ +

Note:

+

*1 As for variadic macro of GCC2 spec and GCC3 spec, see 3.9.1.6, 3.9.6.3 respectively.

+ +

3.9.8.4. Empty Argument During Macro Calls

+ +

The macro calls with any empty argument are found in as many as 488 source files. +They have greatly increased since the old version. +C99 approval of empty macro argument may have influenced the tendency.

+ +

In particular, math/bits/mathcalls.h has as many as 79 macro calls with empty argument. +That is the same with the old version.

+ +

3.9.8.5. Object-Like Macros Replaced with Function-like Macro Name

+ +

The following files have object-like macro definitions replaced to function-like macro names:

+ +

argp/argp-fmtstream.h, +hesiod/nss_hesiod/hesiod-proto.c, +intl/plural.c, +libio/iopopen.c, +nis/nss_nis/nis-hosts.c, +nss/nss_files/files-hosts.c, +nss/nss_files/files-network.c, +nss/nss_files/files-proto.c, +nss/nss_files/files-rpc.c, +nss/nss_files/files-service.c, +resolv/arpa/nameser_compat.h, +stdlib/gmp-impl.h, +string/strcoll_l.c, +sysdeps/unix/sysv/linux/clock_getres.c, +sysdeps/unix/sysv/linux/clock_gettime.c

+ +

elf/link.h has function-like macro definitions replaced to function-like macro names. For example,:

+ +
+#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
+                                        /* sysdeps/generic/ldsodefs.h:46    */
+#define _ElfW(e,w,t)    _ElfW_1 (e, w, _##t)            /* elf/link.h:32    */
+#define _ElfW_1(e,w,t)  e##w##t                         /* elf/link.h:33    */
+#define __ELF_NATIVE_CLASS __WORDSIZE               /* bits/elfclass.h:11   */
+#define __WORDSIZE 32           /* sysdeps/wordsize-32/bits/wordsize.h:19   */
+#define ELF32_ST_TYPE(val) ((val) & 0xf)                /* elf/elf.h:429    */
+
+ +

with the above macro definitions,

+ +
+    && ELFW(ST_TYPE) (sym->st_info) != STT_TLS      /* elf/do-lookup.h:81   */
+
+ +

in this macro call, ELFW(ST_TYPE) is expanded with the following steps:

+ +
+    ELFW(ST_TYPE)
+    _ElfW(ELF, __ELF_NATIVE_CLASS, ST_TYPE)
+    _ElfW_1(ELF, 32, _ST_TYPE)
+    ELF32_ST_TYPE
+
+ +

Then, ELF32_ST_TYPE with the subsequent sequence (sym->st_info) is expanded to ((sym->st_info) & 0xf). +That is to say, a function-like macro call of _ElfW_1(ELF, 32, _ST_TYPE) is expanded to name of another function-like macro ELF32_ST_TYPE.

+ +

These macros become more clear, if the 3 definitions of above 6 are written as:

+ +
+#define ELFW( type, val)        _ElfW( ELF, __ELF_NATIVE_CLASS, type, val)
+#define _ElfW( e, w, t, val)    _ElfW_1( e, w, _##t, val)
+#define _ElfW_1( e, w, t, val)  e##w##t( val)
+
+ +

and if they are used as:

+ +
+    && ELFW(ST_TYPE, sym->st_info) != STT_TLS
+
+ +

Although these arguments may seem to be a little redundant, these are more natural than the original ones, if we think of function call syntax.

+ +

3.9.8.6. Macros Expanded to 'defined'

+ +

The following files contain macro definitions whose replacement-lists have the 'defined' token. *1

+ +

iconv/skeleton.c, +sysdeps/generic/_G_config.h, +sysdeps/gnu/_G_config.h, +sysdeps/i386/dl-machine.h, +sysdeps/i386/i686/memset.S, +sysdeps/mach/hurd/_G_config.h, +sysdeps/posix/sysconf.c

+ +

Those macros are used in some #if lines of the following files, and also some of the above files themselves.

+ +

elf/dl-conflict.c, +elf/dl-runtime.c, +elf/dynamic-link.h

+ +

In glibc 2.1.3, malloc/malloc.c had a macro definition of HAVE_MREMAP whose replacement-list contained the 'defined' token. +In glibc 2.4, that macro definition has been revised to portable one, nevertheless the unportable macros of the same sort have increased in other source files.

+

In a #if expression, the result of a macro expansion whose replacement-list has the 'defined' token is undefined according to the Standards, and it is only self-satisfaction of GCC to preprocess the expression plausibly and arbitrarily. +In order to make these sources portable among other preprocessors, at least the definitions of these macros should be rewritten, and in some cases the calls of the macros should be rewritten, too. *2

+

In most cases, the simple rewriting is sufficient as seen in 3.9.4.6. +In some cases, however, this method does not work. +Those are the cases where evaluation result of 'defined MACRO' differs depending on its timing. +For example, sysdeps/i386/dl-machine.h has the following macro definition, which is used in some #if expressions on other files.

+ +
+#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
+
+ +

Rewriting the definition as follows will not do.

+ +
+#if defined RTLD_BOOTSTRAP
+#define ELF_MACHINE_NO_RELA 1
+#endif
+
+ +

The macro RTLD_BOOTSTRAP is defined in elf/rtld.c, if and only that file is included before dl-machine.h. +In other words, the evaluation result of 'defined RTLD_BOOTSTRAP' depends on the order of including the two files. +In order to rewrite these sources portable, the macro ELF_MACHINE_NO_RELA should be abandoned since it is useless macro found only in #if lines, and the #if line:

+ +
+#if ELF_MACHINE_NO_RELA
+
+ +

should be rewritten as:

+ +
+#if defined RTLD_BOOTSTRAP
+
+ +

In glibc, this portable style of #if lines are found on many places, at the same time, the undefined style as above example are also found on some places. + +

Note:

+

*1 On Linux, /usr/include/_G_config.h is the header file installed from glibc's sysdeps/gnu/_G_config.h, therefore it has the same macro definition as:

+
+#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
+
+

This should be rewritten to:

+
+#if defined (_STATBUF_ST_BLKSIZE)
+#define _G_HAVE_ST_BLKSIZE 1
+#endif
+
+

*2 mcpp V.2.7 and later in STD mode on GCC-specific-build handles 'defined' token generated by macro expansion in #if line like GCC. +Yet, such a bug-to-bug handling should not be depended on.

+ +

3.9.8.7. Preprocessing .S File

+ +

*.S files are provided for each CPU type, so their number is very large and amounts to more than 1000. +The files for one CPU type as x86 are some portion of them.

+

*.S file is an assembler source with inserted preprocessing directives such as #if or #include, comments or macros of C. +Since assembler source is not consisted of C token sequence, it accompanies some risks to preprocess it by C preprocessor. +To process an assembler source, the preprocessor must pass such characters as % or $ (which are not used in C except in string literal or in character constant) as they are, and retain existence or non-existence of spaces as they are. +Furthermore, the preprocessor must relax syntax checking to pass a sequence which would be an error if it was in C source. +On the other hand, it must process #if lines or macros like C, and must do some sort of error checking, too. +What a nuisance! +These specifications have not any logical basis at all, these are GCC's local and mostly undocumented behaviors and no more.

+ +

To illustrate the problems, let me take an example of the following fragment from nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S.

+ +
+    .byte   8               # Return address register
+                            # column.
+#ifdef SHARED
+    .uleb128 7              # Augmentation value length.
+    .byte   0x9b            # Personality: DW_EH_PE_pcrel
+                            # + DW_EH_PE_sdata4
+
+ +

'#ifdef SHARED' intends to be a directive of C. +On the other hand, the latter part of each line starting with # are supposed to be comments. +'# column.' is, however, syntactically indistinguishable from invalid directive, since the # is the first non-white-space-character of the line. +'# + DW_EH_PE_sdata4' causes even syntax error in C.
+Another file has the following line, where a single character appears singly. +In C, a pair of the single quote is used to quote a character constant, and unmatched single quote causes a tokenization error.

+ +
+    movl 12(%esp), %eax     # that `fixup' takes its parameters in regs.
+
+ +

The above pthread_cond_wait.S also has the following line which is a macro call.

+ +
+versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+          GLIBC_2_3_2)
+
+ +

The macros are defined as:

+ +
+# define versioned_symbol(lib, local, symbol, version) \
+  versioned_symbol_1 (local, symbol, VERSION_##lib##_##version)
+                                    /* include/shlib-compat.h:65    */
+# define versioned_symbol_1(local, symbol, name) \
+  default_symbol_version (local, symbol, name)
+                                    /* include/shlib-compat.h:67    */
+# define default_symbol_version(real, name, version) \
+     _default_symbol_version(real, name, version)
+                                    /* include/libc-symbols.h:398   */
+#   define _default_symbol_version(real, name, version) \
+     .symver real, name##@##@##version
+                                    /* include/libc-symbols.h:411   */
+#define VERSION_libpthread_GLIBC_2_3_2  GLIBC_2.3.2
+                            /* Created by make: abi-versions.h:145  */
+
+ +

The line is expected to be expanded as:

+ +
+.symver __pthread_cond_wait, pthread_cond_wait@@GLIBC_2.3.2
+
+ +

The problem is the definition of _default_symbol_version. +There is no C token containing '@' (except string-literal or character-constant). +Though pthread_cond_wait@@GLIBC_2.3.2 is a sequence generated by concatenating some parts with ## operator, this is not a C token. +The concatenation generates illegal tokens also in midst of its processing. +The macro uses ## operator of C, nevertheless its syntax is far from C.

+

In order to do a sort of preprocessing on an assembler source, essentially an assembler macro processor should be used. +To process assembler codes with C, it is recommended that the asm() or __asm__() function should be used whenever possible, to embed the assembler code in a string literal, and that not *.S but *.c should be used as a file name.
+libc-symbols.h has another version of the above macro as follows which is used for *.c. +This macro can be processed by Standard-conforming C preprocessor without problem.

+ +
+#   define _default_symbol_version(real, name, version) \
+     __asm__ (".symver " #real "," #name "@@" #version)
+
+ +

glibc also has many *.c or *.h files which use asm() or __asm()__. +Nevertheless, it has much more *.S files.

+

If you process an assembler source by C preprocessor in any way, at least you should use /* */ or // as comment notation instead of #. +In actual, many sources of glibc use /* */ or //, whereas some sources use #.

+

Having said so, mcpp V.2.6.3 onward relaxed grammar checking largely in lang-asm mode to process these unusual sources, considering that glibc 2.4 has too many *.S files and out-of-C-grammar-sources has increased since 2.1.3.

+ +

3.9.8.8. Problems of versions.awk, rpcgen and -dM Option

+ +

The problem of stdlib/isomac.c which I referred to at 3.9.4.8 is the same in glibc 2.4.

+

Also the problem of rpcgen is unchanged.

+

In addition, glibc 2.4 has scripts/versions.awk file, which presupposes GCC's peculiar behavior about the number of line top spaces of preprocessed output. +In order to use mcpp or other preprocessors, this file should be revised as follows.

+ +
+$ diff -c versions.awk*
+*** versions.awk        2006-12-13 00:59:56.000000000 +0900
+--- versions.awk.orig   2005-03-23 10:46:29.000000000 +0900
+***************
+*** 50,56 ****
+  }
+
+  # This matches the beginning of a new version for the current library.
+! /^ *[A-Z]/ {
+    if (renamed[actlib "::" $1])
+      actver = renamed[actlib "::" $1];
+    else if (!versions[actlib "::" $1] && $1 != "GLIBC_PRIVATE") {
+--- 50,56 ----
+  }
+
+  # This matches the beginning of a new version for the current library.
+! /^  [A-Za-z_]/ {
+    if (renamed[actlib "::" $1])
+      actver = renamed[actlib "::" $1];
+    else if (!versions[actlib "::" $1] && $1 != "GLIBC_PRIVATE") {
+***************
+*** 65,71 ****
+  # This matches lines with names to be added to the current version in the
+  # current library.  This is the only place where we print something to
+  # the intermediate file.
+! /^ *[a-z_]/ {
+    sortver=actver
+    # Ensure GLIBC_ versions come always first
+    sub(/^GLIBC_/," GLIBC_",sortver)
+--- 65,71 ----
+  # This matches lines with names to be added to the current version in the
+  # current library.  This is the only place where we print something to
+  # the intermediate file.
+! /^   / {
+    sortver=actver
+    # Ensure GLIBC_ versions come always first
+    sub(/^GLIBC_/," GLIBC_",sortver)
+
+ +

3.9.8.9. -include, -isystem, -I- Options

+ +

-isystem and -I- options are no longer used.

+

On the other hand, -include option is used extremely frequently. +A header file include/libc-symbols.h is included by this option as many as 7000 times. +This -include is an option to push out a #include line from source to makefile. +It makes source incomplete, and is not recommendable.

+ +

3.9.8.10. Undocumented Predefined Macros

+ +

This is not a problem of glibc but of GCC. +While a few important predefined macros were undocumented in GCC 2, they got documented in GCC 3. +On the other hand, GCC 3.3 and later predefines many macros, and most of them are undocumented.

+ +

3.9.8.11. Other Problems

+ +

debug/tst-chk1.c has a queer part which is not processed as its intension by other preprocessor than GCC, unless revised as follows.

+ +
+$ diff -cw tst-chk1.c*
+*** tst-chk1.c  2007-01-11 00:31:45.000000000 +0900
+--- tst-chk1.c.orig     2005-08-23 00:12:34.000000000 +0900
+***************
+*** 113,119 ****
+  static int
+  do_test (void)
+  {
+-   int   arg;
+    struct sigaction sa;
+    sa.sa_handler = handler;
+    sa.sa_flags = 0;
+--- 113,118 ----
+***************
+*** 135,146 ****
+    struct A { char buf1[9]; char buf2[1]; } a;
+    struct wA { wchar_t buf1[9]; wchar_t buf2[1]; } wa;
+
+  #ifdef __USE_FORTIFY_LEVEL
+!   arg = (int) __USE_FORTIFY_LEVEL;
+  #else
+!   arg = 0;
+  #endif
+!   printf ("Test checking routines at fortify level %d\n", arg);
+
+    /* These ops can be done without runtime checking of object size.  */
+    memcpy (buf, "abcdefghij", 10);
+--- 134,146 ----
+    struct A { char buf1[9]; char buf2[1]; } a;
+    struct wA { wchar_t buf1[9]; wchar_t buf2[1]; } wa;
+
++   printf ("Test checking routines at fortify level %d\n",
+  #ifdef __USE_FORTIFY_LEVEL
+!         (int) __USE_FORTIFY_LEVEL
+  #else
+!         0
+  #endif
+!         );
+
+    /* These ops can be done without runtime checking of object size.  */
+    memcpy (buf, "abcdefghij", 10);
+
+ +

Contrary to its innocent looking, the original source defines printf() as a macro, and as its consequence, #ifdef and other directive-like lines are usually eaten as an argument of the macro call. +According to the Standards, the result is undefined when there is a line in an argument of a macro which would otherwise act as a directive. +Since directive processing and macro expansion should be done in the same translation phase, it is an arbitrariness of GCC to process directive first. +In the first place, processing of #ifdef __USE_FORTIFY_LEVEL line also contains macro processing, therefore it is extremely arbitrary to process this line and the other directive-like lines first then expand printf() macro. +C preprocessing should be done sequentially from the top.

+

The configure script of glibc also has a portion to use GCC's peculiar help message. +The script searches help message of compiler for "-z relro" option. +If you use mcpp as a preprocessor, this portion does not yield the expected result. +In spite of this problem, fortunately, compiling and test of glibc is done normally.

+

By the way, while GCC up to 3.2 appended many useless -A options by default on its invocation, GCC 3.3 onward ceased to do it.

+ +

3.9.8.12. Increasing Dependency on GCC

+ +

Most of the portability problems I had found in glibc 2.1.3 have not been cleared in glibc 2.4 the six years newer version. +On the contrary, number of sources lacking portability has increased.

+

There have been a few improvements such as disappearance of multi-line-string-literal, -isystem, -I- options and -A options on GCC side.

+

Meanwhile, sources with such unportable features have largely increased as #include_next, variadic macro of GCC2 spec, its call without variable argument, macro definition with 'defined' token in its replacement-list, *.S file and -include option. +Macro calls with an empty argument have also increased. +Above all it is most annoying that the writings which do not correspond to Standard C one-to-one, and hence cannot be easily converted to portable one, have increased.

+

All of these are problems of dependency on GCC's local specification and undocumented behavior. +In a large scale software as glibc, once such unportable sources are created, it becomes difficult to revise them because many source files are interrelated. +As a consequence, the same writings tend to be inherited for years, and even new sources are written so as to suit the old interfaces. +For example, it shows this relationship directly that only the variadic macros of GCC2 spec are used, and neither of C99 spec nor GCC3 spec are not used at all. +Besides, even if some unportable parts in a few sources are revised, at the same time the old unportable codings often appear newly in other sources. +The old style writings are not easily cleared.

+

On the other hand, change of GCC behavior breaks many sources, and the possible influence becomes greater with time, therefore GCC becomes difficult to change its behavior. +I think that both of GCC and glibc need to tidy up their old local specifications and old interfaces drastically in the near future.

+ +

3.9.9. The Problems of Linux / stddef.h, limits.h and #include_next

+

On Linux, the system compiler is GCC, and the standard library is glibc. +In these circumstances, there are some system headers which presuppose only GCC. +Those are the obstacles to use other compiling tools than GCC such as mcpp of compiler-independent-build. +For example, stddef.h and some other Standard header files are located only in GCC's version specific include directory, and are not found in /usr/include. +These are rude deficiencies of the system header structure, and mcpp needs some workarounds for them.

+

On Linux, GCC installs a version specific include directory such as /usr/lib/gcc-lib/SYSTEM/VERSION/include where the Standard headers stddef.h, limits.h and some others are located. These headers and GCC behavior on them are queer. The problems are the same on CygWIN as on Linux. Mac OS X also has a few problems on some Standard headers.

+ +

3.9.9.1. /usr/include Lacks Standard Headers

+

In the first place, on Linux, five of the Standard C header files float.h, iso646.h, stdarg.h, stdbool.h, stddef.h are located only in the GCC version specific directory, not in /usr/include nor /usr/local/include. The system headers on Linux seem to more or less intend that compiler systems other than GCC use only /usr/include and GCC uses its version specific directory in addition to /usr/include. In fact, /usr/include lacks some Standard headers, that is the problem for non-GCC compilers or preprocessors.

+

If non-GCC preprocessor uses also GCC version specific directory, then on limits.h in this directory, the preprocessor encounters #include_next which is a GCC specific directive. If that is the case, why doesn't the preprocessor implement #include_next? Then, the limits.h causes a problem, because it is not cleanly written. What is worse, GCC V.3.3 or later predefines practically by itself the macros to be defined by limits.h, hence the header is useless for other preprocessors.

+

Besides, as for GCC itself, it shows queer behavior with #include_next in this header.

+

Although these problems are complicated to explain, I will describe them here, because they have been neglected for years for some reason.

+

Note that only mcpp of compiler-independent-build suffers this problem. +GCC-specific-build is not affected. + +

3.9.9.2. Queer Handling of #include_next

+

The include directories for GCC are typically set as:

+
+/usr/local/include
+/usr/lib/gcc-lib/SYSTEM/VERSION/include
+/usr/include
+
+

These are searched from upper to lower. The second is the GCC specific include directory. SYSTEM is i386-vine-linux, i368-redhat-linux or such, VERSION is 3.3.2, 3.4.3 or such. If you install another version of GCC into /usr/local, the /usr/lib/gcc-lib part above will become /usr/local/lib/gcc. In C++, some other directories are set with higher priority than /usr/local/include. For GCC V.3.* and 4.*, those are:

+
+/usr/include/c++/VERSION
+/usr/include/c++/VERSION/SYSTEM
+/usr/include/c++/VERSION/backward
+
+

The name of these directories seem GCC specific, nevertheless no other C++ standard directories do not exist, so the other preprocessors can use no directories but these. For GCC 2.95, the include directory in C++ was:

+
+/usr/include/g++-3
+
+

In addition, the directories specified by -I option or by environment variables are prepended to the list.

+

Let me take an example of limits.h in C on GCC V.3.3 or later focusing on definition of LONG_MAX, in order to make the explanations below simple. There are two limits.h: one in /usr/include and another in the version specific directory.

+
+#include <limits.h>
+
+

By this line, GCC includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h. This header file starts as:

+
+#ifndef _GCC_LIMITS_H_
+#define _GCC_LIMITS_H_
+#ifndef _LIBC_LIMITS_H_
+#include "syslimits.h"
+#endif
+
+

Then, GCC includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h which is a short file as:

+
+#define _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#undef _GCC_NEXT_LIMITS_H
+
+

Now, limits.h is included again. Which limits.h? Since this directive is #include_next, it would skip the /usr/lib/gcc-lib/SYSTEM/VERSION/include, and would search /usr/include. GCC's cpp.info says:

+
+

This directive works like `#include' except in searching for the specified file: it starts searching the list of header file directories _after_ the directory in which the current file was found.

+
+

In fact, however, GCC does not include /usr/include/limits.h, but includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h again somehow.
+This time _GCC_LIMITS_H_ has been defined already, so the block beginning with the line:

+
+#ifndef _GCC_LIMITS_H_
+
+

is skipped, and the next block is evaluated:

+
+#else
+#ifdef _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#endif
+#endif
+
+

Again, just the same #include_next <limits.h> which were found in /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h. Does GCC include /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h again as the previous time, which is the current file, and run into infinite recursion? No, it does not, but it includes /usr/include/limits.h this time. The behavior of GCC is beyond my understanding.

+

In /usr/include/limits.h, <features.h> and some other headers are included. Also, /usr/include/limits.h has a block beginning with the line:

+
+#if !defined __GNUC__ || __GNUC__ < 2
+
+

In this block, <bits/wordsize.h> is included, and the Standard required macros are defined depending whether wordsize is 32 bit or 64 bit. For example, if wordsize is 32 bit, LONG_MAX is defined as:

+
+#define LONG_MAX     2147483647L
+
+

Of course, GCC skips this block. Then, going to the end of this file, it returns to /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h. Then, ending this file of the second inclusion, it returns to /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h. Then, this file ends too, and GCC returns to the first inclusion of /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h. In this file, after the above cited part, there are definitions of the Standard required macros. For instance, LONG_MAX is defined as:

+
+#undef LONG_MAX
+#define LONG_MAX __LONG_MAX__
+
+

Then, the file ends.

+
+#include <limits.h>
+
+

The processing of this line has ended. After all, LONG_MAX is defined to __LONG_MAX__ and it is the end. What is __LONG_MAX__? As a matter of fact, GCC V.3.3 or later predefines many macros including __LONG_MAX__ which is predefined to 2147483647L for 32 bit system. As with the other Standard required macros, the situations are almost the same as LONG_MAX, because they are defined using the predefined ones. If so, what is the purpose of these complicated header files and #include_next handling at all?

+

The behavior of GCC V.2.95, V.3.2, V.3.4, V.4.0 and V.4.1 on #include_next is the same as V.3.3. That is to say:

+
+#include_next <limits.h>
+
+

by this line in /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h, GCC includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h, and by the same line in this file:

+
+#include_next <limits.h>
+
+

it includes /usr/include/limits.h. As a result, in processing the line:

+
+#include <limits.h>
+
+

/usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h is included twice. This duplicate inclusion happens to produce the same result, nevertheless it is redundant, and first of all, the behavior differs from the specification and is not consistent. In addition, this part of the file is redundant if the behavior accords to the specification.

+
+#else
+#ifdef _GCC_NEXT_LIMITS_H
+#include_next <limits.h>
+#endif
+
+

3.9.9.3. Standard Headers not Available for Preprocessors other than GCC

+

Now, what happens to compiler or preprocessor other than GCC using Linux standard headers? stddef.h and some other Standard headers are not found in /usr/include nor /usr/local/include. If so, how about using also GCC version specific directory?

+
+#include <limits.h>
+
+

By this line, the preprocessor includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h, and from this file it includes /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h, and in this file, it sees the line:

+
+#include_next <limits.h>
+
+

Then, how about implementing #include_next? If the #include_next is implemented as its specification, the preprocessor searches by this line the "next" include directory /usr/include, and includes /usr/include/limits.h. Then, this non-GCC preprocessor processes the block beginning with this line:

+
+#if !defined __GNUC__ || __GNUC__ < 2
+
+

In this block it defines LONG_MAX as:

+
+#define LONG_MAX     2147483647L
+
+

and defines also the other macros appropriately. Then, it ends this file, and returns to /usr/lib/gcc-lib/SYSTEM/VERSION/include/syslimits.h. Then, it ends this file, and returns to /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h. And it encounters these lines:

+
+#undef LONG_MAX
+#define LONG_MAX __LONG_MAX__
+
+

At the end of the long run, all the correct definitions are canceled, and they become the undefined name __LONG_MAX__ or such!

+

Up to GCC V.3.2, the corresponding part of version specific limits.h had the lines like:

+
+#define __LONG_MAX__ 2147483647L
+
+

Hence, the canceled macros are redefined correctly. Although the most part of the processing is useless, the results were correct. With the header files of V.3.3 or later, a non-GCC preprocessor is taken around here and there to get vain results.

+ +

3.9.9.4. Workarounds for the Present

+

The problems are summarized as below: *1, *2, *3, *4

+
    +
  1. /usr/include lacks Standard C headers float.h, iso646.h, stdarg.h, stdbool.h and stddef.h which are necessary to make Linux system headers usable to non-GCC compiler system.
    +
  2. C++ include directories do not exist other than /usr/include/c++/VERSION/*. In order to make C++ standard include directories independent on GCC version, /usr/include/c++ should be used instead of /usr/include/c++/VERSION which should be limited to GCC specific headers. +Though, having said that, this is a difficult task, since the C++ standard library is libstdc++ distributed with GCC on all of FreeBSD, Linux and Mac OS X.
    +
  3. The behavior of GCC on #include_next differs from its specification and is inconsistent.
    +
  4. It is meaningless to process the complicated limits.h headers, since GCC predefines the Standard required macros by itself in effect. It is doubly meaningless, since /usr/lib/gcc-lib/SYSTEM/VERSION/include/limits.h does #undef all. As far as Linux and CygWIN are concerned, there seems to be no necessity for splitting limits.h to two. Since these headers in this directory are auto-generated ones by GCC installation, some redundancies are inevitable. Yet, these are too dirty to install as system headers.
    +
+

Under these problems lies the excessively complicated system header structure. The extension directive #include_next enhances the complication. The use of this directive is very limited. Though GCC and glibc use it in compiling and installing of themselves, it does not exist in the installed system headers except for limits.h. The rare example in limits.h causes GCC above mentioned confusion. This presents a question on the reason of its existence.

+

Anyway, the compiler-independent-build of mcpp needs the following workarounds for the present. In order to avoid confusion, the compiler-independent-build does not implement #include_next nor uses GCC specific include directories.

+
    +
  1. Link /usr/include/stddef.h to /usr/lib/gcc-lib/SYSTEM/VERSION/include/stddef.h. In case of multiple versions of GCC have been installed, a link to any of them will work for mere preprocessing. This setting does no harm on GCC nor GCC-specific-build of mcpp. The same can be said about stdarg.h, though it expands macros to GCC built-in functions.
    +
  2. Copy or move iso646.h and stdbool.h from one of the GCC specific directories to /usr/include, since these are quite simple headers and independent on any system. As for limits.h, the existing /usr/include/limits.h is enough for non-GCC preprocessor.
    +
  3. float.h is useless for other preprocessor, such as DBL_MAX_EXP is defined to __DBL_MAX_EXP__. If required, you must write the header referring to the internal setting of GCC or some other source. *5
    +
  4. Do not set GCC specific include directory in C include directories list by environment variable.
    +
  5. Set C++ include directories by environment variable CPLUS_INCLUDE as /usr/include/c++/VERSION:/usr/include/c++/VERSION/SYSTEM:/usr/include/c++/VERSION/backward.
    +
+

For the GCC-specific-build of mcpp, no special setting is required, because it has GCC specific include directories list, implements #include_next as its specification, and predefines the macros as GCC does.

+

Note:

+

*1 I have checked the descriptions of this 3.9.9 section on Linux / GCC 2.95.3, 3.2, 3.3.2, 3.4.3, 4.0.2, 4.1.1, 4.3.0 and on CygWIN / GCC 2.95.3, 3.4.4. As with CygWIN, the behavior on #include_next was as its specification on GCC 2.95.3, but on 3.4.4 it changed to the same behavior as Linux. The C++ include directories in CygWIN was /usr/include/g++-3 on 2.95.3, while they are /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++ and its sub-directories on 3.4.4.

+

*2 On FreeBSD 6.2 or 6.3 and its bundled GCC 3.4.6, all the Standard C headers are present in /usr/include, #include_next is not used in any system headers, and GCC specific C include directory does not exist. However, C++ include directories are GCC version dependent as /usr/include/c++/3.4, /usr/include/c++/3.4/backward.
+Even on FreeBSD, an installation of another version of GCC makes GCC-version-specific include directory. Most of the headers in the directory are redundant. However, the headers in /usr/include remain unchanged.

+

*3 On Mac OS X Leopard / Apple-GCC 4.0.1, as on Linux, there is a GCC-version-specific include directory, #include_next is used in limits.h and a few other headers, also two limits.h are found. +However, #include_next in syslimits.h has been deleted by Apple. +float.h, iso646.h, stdarg.h, stdbool.h, stddef.h are all found in /usr/include, hence so much special settings are not necessary for mcpp. +But, float.h, stdarg.h are only for GCC and Metrowerks (for powerpc), so if you use them with mcpp, you must rewrite float.h yourself and make stdarg.h to include GCC-version-specific one. +Note that some definitions in float.h are different between x86 and powerpc.

+

*4 On MinGW / GCC 3.4.*, though the include directories and their precedence differ from the other systems, the behavior of GCC on #include_next is the same, and also some Standard headers are not in the standard include directory /mingw/include but in its version-specific-directory.

+

*5 float.h for i386 system can be written as follows referring to GCC's setting:

+
+/* float.h  */
+
+#ifndef _FLOAT_H___
+#define _FLOAT_H___
+
+#define FLT_ROUNDS      1
+#define FLT_RADIX       2
+
+#define FLT_MANT_DIG    24
+#define DBL_MANT_DIG    53
+#define LDBL_MANT_DIG   64
+
+#define FLT_DIG         6
+#define DBL_DIG         15
+#define LDBL_DIG        18
+
+#define FLT_MIN_EXP     (-125)
+#define DBL_MIN_EXP     (-1021)
+#define LDBL_MIN_EXP    (-16381)
+
+#define FLT_MIN_10_EXP  (-37)
+#define DBL_MIN_10_EXP  (-307)
+#define LDBL_MIN_10_EXP (-4931)
+
+#define FLT_MAX_EXP     128
+#define DBL_MAX_EXP     1024
+#define LDBL_MAX_EXP    16384
+
+#define FLT_MAX_10_EXP  38
+#define DBL_MAX_10_EXP  308
+#define LDBL_MAX_10_EXP 4932
+
+#define FLT_MAX         3.40282347e+38F
+#define DBL_MAX         1.7976931348623157e+308
+#define LDBL_MAX        1.18973149535723176502e+4932L
+
+#define FLT_EPSILON     1.19209290e-7F
+#define DBL_EPSILON     2.2204460492503131e-16
+#define LDBL_EPSILON    1.08420217248550443401e-19L
+
+#define FLT_MIN         1.17549435e-38F
+#define DBL_MIN         2.2250738585072014e-308
+#define LDBL_MIN        3.36210314311209350626e-4932L
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define FLT_EVAL_METHOD 2
+#define DECIMAL_DIG     21
+#endif /* C99 */
+
+#endif /* _FLOAT_H___ */
+
+
+ +

3.9.10. Problems of Mac OS X / Apple-GCC and its System Headers

+

On V.2.7, mcpp began to support Max OS X / GCC. +This section describes the problems of the system found by mcpp. +The author, however, does not know the system so much yet. +He has only compiled mcpp itself and firefox on the system. +He knows nothing about Objective C nor Objective C++.

+

Since GCC is practically the only compiler on this system now, some dependencies on GCC-local specs are found in some of its system headers. +Such dependencies are not so much as Linux, maybe because its standard library is not glibc. +But, they are not so few as FreeBSD. +Some tidy-ups are desirable.

+

Another characteristic of this system is that the system compiler is a GCC largely modified and extended by Apple. +In the system headers and some sources of Apple on Max OS X, dependencies on Apple-GCC-local specs are more conspicuous than those on general-GCC-local specs. +In particular, the extended specs to support both of Intel-Mac and PowerPC-Mac on a machine are the most characteristic.

+

Here, we refer to the system of Mac OS X Leopard / Apple-GCC 4.0.1.

+ +

3.9.10.1. #include_next, #warning

+

The GCC-local directive #include_next are not many, but found in float.h, stdarg.h, varargs.h in /usr/include/ and the files of the same name in /Developer/SDKs/MacOSX10.*.sdk/usr/include/. +All of them are to include different real header files depending on whether the compiler is GCC or Metrowerks. +When the compiler is GCC, stdarg.h, for example, does '#include_next <stdarg.h>'.
+The limits.h in GCC-version-specific include directory has #include_next as Linux, but the one in syslimits.h has been removed and a bit tidied up.

+

Though this directive is used modestly, it is a problem that float.h, stdarg.h presuppose only GCC and Metrowerks. +Those can be written more portable as on FreeBSD. *1
+In addition, #include_next for GCC on a header in /usr/include is a nonsense, because the priority of that include directory is lower than GCC-version-specific one. +Consequently this #include_next is never executed.

+

Another GCC-local directive #warning is sometimes found in objc/, wx-2.8/wx/ and a few other directories in /usr/include/, and their corresponding directories in /Developer/SDKs/MacOSX*.sdk/usr/include/. +Most of the directives are warnings against obsolete or deprecated files or usages.
+backward_warning.h in /usr/include/c++/VERSION/backward/ and its corresponding file in /Developer/SDKs/MacOSX*.sdk/ are to execute #warning against these deprecated headers. +And all the headers in the directories include this header. +This is the same with Linux or FreeBSD.

+

Note:

+

*1 About how to use these headers with compiler-independent-build of mcpp, refer 3.9.9.4 and its note 3.

+ +

3.9.10.2. A Macro Expanded to 'defined'

+

/usr/include/sys/cdefs.h and its corresponding file of the same name in /Developer/SDKs/MacOSX*.sdk/ have a macro definition as:

+
+#define __DARWIN_NO_LONG_LONG   (defined(__STRICT_ANSI__) \
+                && (__STDC_VERSION__-0 < 199901L) \
+                && !defined(__GNUG__))
+
+

And it is used in stdlib.h and a few others as: +

+#if __DARWIN_NO_LONG_LONG
+
+

This macro should be defined as: *1

+
+#if     defined(__STRICT_ANSI__) \
+                && (__STDC_VERSION__-0 < 199901L) \
+                && !defined(__GNUG__)
+#define __DARWIN_NO_LONG_LONG   1
+#endif
+
+

Note:

+

*1 As for its reason, see 3.9.4.6 and 3.9.8.6.

+ +

3.9.10.3. Tokens in #endif line

+

gssapi.h, krb5.h, profile.h in /System/Library/Frameworks/Kerberos.framework/Headers have queer #endif lines like:

+
+#endif \* __KERBEROS5__ */
+
+

This \* __KERBEROS5__ */ seems to intend to be a comment. +I cannot understand why they must invent such a writing. +Though GCC usually warns at it, Apple-GCC does not issue any warning even if -pedantic or any other options are specified. +Apple-GCC does not warn at the following case, too. +It still trails a sense of pre-C90.

+
+#endif __KERBEROS5__
+
+ +

3.9.10.4. Some Special Usages of Macro

+

As far as a compilation of firefox 3.0b3pre source is concerned, any of the following special usages of macro, which are frequently found in glibc sources and Linux system headers, is not found in the Mac OS X system headers included from the firefox source.

+
    +
  • GCC-specific variable argument macro.
    +While a few variadics of C99-spec are found, no GCC-specific one is found. +
  • Empty argument of macro call. +
  • Object-like macro replaced with a function-like macro name. +
+ +

3.9.10.5. Apple-GCC's Peculiar Specifications

+

Apple-GCC has some peculiar specifications different from the general GCC.

+
    +
  • Specs to generate binaries for both of Intel-Mac and PowerPC-Mac on either machine

    +

    Mac OS X has a pair of compilers for x86 and ppc. +(One is a native compiler, and other is a cross compiler.) +This pair of Apple-GCCs have their own option -arch. +If you specify multiple CPUs as '-arch i386 -arch ppc', gcc will be repeatedly invoked, binaries for the specified CPUs will be generated, and a "universal binary" which bundles all the binaries will be created. +Also they have another peculiar option -mmacosx-version-min=. +You can use this option along with -isysroot or --sysroot option, and widen the range of compatibility of the binary to the older versions of Mac OS X to some extent. +These specs are convenient to make a binary package for Mac OS X.

    +

    As for preprocessing, you should remember that some predefined macros differ depending on the CPU specified.

    +
  • "framework" directories

    +

    Mac OS X has "framework" directories inherited from NeXTstep. +Framework is a hierarchical directory that contains shared resources such as header files, library, documents, and some other resources. +To include a header file in these directories, such a directive is used as:

    +

    +
    +#include <Kerberos/Kerberos.h>
    +
    +

    This format is the same with:

    +
    +#include <sys/stat.h>
    +
    +

    However, these two have quite different meanings. +While the latter includes the file sys/stat.h in some include directory (in this case /usr/include), <Kerberos/Kerberos.h> is not a path-list, and Kerberos is not even a directory name. +This is a file Kerberos.framework/Headers/Kerberos.h in a framework directory /System/Library/Frameworks. +And in actual, Kerberos.framework/Headers is a symbolic-link to Kerberos.framework/Versions/Current/Headers. +This is the most simple case of framework header file location. +There are many other far more complex cases.

    +

    Who has invented such a complex system? +This system burdens a preprocessor, because it needs to search system headers in framework directories repeatedly building and rebuilding path-list. +Some headers further include many other headers.

    +
  • "header map" file

    +

    Xcode.app is an IDE on Max OS X. +It uses "header map" file, which is a list of include files. +One of the tools of Xcode checks source files, searches the files to be included, and records the path-list of the files into a file named *.hmap, and Apple-GCC refers to it instead of include directories. +This is an extended feature of Apple-GCC.

    +

    Header map file is a device to lessen burdens of header file searching. +However, it is a binary file of a peculiar specification and lacks transparency. +In order to lessen heavy burdens of framework header searching, it is more desired to reorganize the framework system.

    +
  • Tokens in #endif line

    +

    As shown in the previous section, Apple-GCC does not issue even a warning whatever junks are on a #endif line, regardless of whatever options specified. +It is quite an anachronism.

    +
  • Non-ASCII characters in comments

    +

    This is not a problem of GCC, but a problem of system headers in framework directory. +In many headers, some non-ASCII characters are frequently found in comments, such as the copyright mark (0xA9) and others of ISO-8859-* (?). +They are nuisances on an environment of multibyte characters, even if in comments. +A little bit of character encoding consciousness is desired. +Though the characters of this kind are sometimes found also in /usr/include of Linux, they are far more often found in framework headers of Mac OS.

+ +

3.9.11. Preprocessing firefox 3.0b3pre

+

I compiled source of firefox developing version 3.0b3pre (January, 2008), or 3.0-beta3-prerelease, by GCC replacing its preprocessor with mcpp V.2.7 on Linux/x86 + GCC 4.1.2 and Mac OS X + GCC 4.0.1. +mcpp were executed with -Kv option passing its output to cc1 (cc1plus). +As its results, the compilations successfully completed, and the firefox binaries were generated. *1

+

The preprocessing portability of firefox source on the whole is rather high. +The dependencies on GCC-local specifications, such as frequently found in glibc sources, are not found so many. +It is portable enough to officially support both of GCC on Linux, Mac OS X and Visual C++ on Windows.

+

Preprocessing portability of a source is, however, not necessarily sufficient, even if GCC and Visual C pass it. +In the sections below, I will check some problems, sometimes comparing them with glibc sources. +I omit explanations on GCC's problems here to avoid duplication. +For GCC's problems, refer to 3.9.4, 3.9.8 +, which also comment on glibc sources. *2

+

Note:

+

*1 I checked out the sources from CVS repository of mozilla.org. +One of the motivations to compile firefox source was to test -K option of mcpp. +This option was proposed by Taras Glek, and he was working on refactoring of C/C++ source at mozilla.com. +So, I also used firefox source to test -K option and other behaviors of mcpp. +About -K (-Kv) option, refer to 2.4.

+

*2 There is a list of coding-guidelines for firefox as below. +But, its content is too old.
+portable-cpp

+ +

3.9.11.1. GCC-local specifications are rarely used

+

The following GCC-local-specs, which are sometimes used in glibc sources, are not used in firefox sources. +Though compiling firefox on Linux includes system headers, and some of which contain such as GCC2-spec variadic macros, they are not firefox sources themselves.

+
    +
  • GCC-local variadic macro
    +Even C99 spec variadic macro is not yet used, too. +
+

The following features are not used even in recent glibc, and not used in firefox at all.

+
    +
  • Multi-line string-literal +
  • #warning +
  • -isystem, -I- options +
+ +

3.9.11.2. #include_next

+

However, a lot of #include_next are found only in one directory: config/system_wrappers/, which is generated by configure. +All of the 900 files generated in the directory are short header files of the same pattern. +For example, stdio.h is:

+
+#pragma GCC system_header
+#pragma GCC visibility push(default)
+#include_next <stdio.h>
+#pragma GCC visibility pop
+
+

This is a code to utilize '#pragma GCC visibility *' directive implemented in GCC 4.*. +At the same time, there is a file 'config/gcc_hidden.h' as below. +The file is specified by -include option for most of the translation units, and read in at the start of the units.

+
+#pragma GCC visibility push(hidden)
+
+

system_wrappers directory should be the include directory with the highest priority, so you should specify it as a first argument of -I option. +In spite of such a constraint, this usage of #include_next is simple and seems to has no problem.

+

On the other hand, for many sources in nsprpub directory, '-fvisibility=hidden' option is used instead of '-include gcc_hidden.h', and the headers in system_wrappers are not used. +This nsprpub directory seems still to be reorganized.

+ +

3.9.11.3. Using C99 specs without specifying C99

+

Many sources use C99 specifications without specifying C99. +GCC use "gnu89" spec by default on *.c source, which is a compromising spec of C90 plus some of C99 specs and GCC-local specs. +Some of firefox sources use the following C99 specs implicitly, depending on GCC's default behavior.

+
    +
  • Empty argument in macro call

    +

    Though empty argument in macro call is rare in firefox, these 3 files have it. +The actual macro called with any empty argument is only one named NS_ENSURE_TRUE.

    +

    layout/style/nsHTMLStyleSheet.cpp, layout/generic/nsObjectFrame.cpp, intl/uconv/src/nsGREResProperties.cpp

    +

    Also the following files in gfx/cairo/cairo/src/ have it. +The actual macro is only one: slim_hidden_ulp2.

    +

    cairoint.h, cairo-font-face.c, cairo-font-options.c, cairo-ft-font.c, cairo-ft-private.h, cairo-image-surface.c, cairo-matrix.c, cairo-matrix.c, cairo-pattern.c, cairo-scaled-font.c, cairo-surface.c, cairo-xlib-surface.c, cairo.c

    +

    Though these empty macro arguments are used on Linux, they are not used on Mac OS X. +Anyway, these are not tricky ones.

    +
  • Translation limits beyond C90

    +

    Length of an identifier, nesting level of #include, number of macro definitions and so forth often exceed C90 translation limits.
    +Identifiers longer than 31 bytes are found especially frequently in the directory gfx/cairo/cairo/src/. +Nesting of #include over than 8 level and macro definitions over than 1024 are often found, too. +These are almost inevitable on Linux and Mac OS X, since only inclusion of some system headers often reaches these limits.

    +
  • Using // comment in C source

    +

    Some C sources have this type of comments. +The list of guidelines prohibits this. +However, this causes few problem nowadays.

    +
+

Above specifications are also available on Visual C 2005, 2008. +Since GCC has -std=c99 option, we might use this to specify C99 explicitly. +Visual C, however, has no option to specify a version of Standard. +We cannot help to use C99 specs implicitly. +Therefore, firefox sources cannot be blamed for using C99 specs implicitly, in the current states of the major compiler-systems. *1

+

By the way, firefox sources do not use variadic macro for some reason, in spite of using some other C99 specs implicitly. +Visual C up to 2003 did not implement variadic macro. +Is that why firefox did not use the feature? +The circumstances has changed since Visual C 2005 implemented it.

+

Note:

+

*1 On C++, GCC defaults to "gnu++98" spec, which is explained as "C++98 plus GCC extensions". It has in actual, however, some C99 specs mixed. +Meanwhile, Visual C says that it is based on C90 and C++98 for C and C++ respectively. +In actual, both of C and C++ of Visual C have C99 features mixed in it as well as a few Visual C extensions, especially in Visual C 2005 and 2008. +Both of GCC and Visual C have such mixture of versions of Standard and their own extensions and modifications, thus bring about some ambiguities. +The absence of option in Visual C to specify a version of Standard is the most inconvenient problem.

+ +

3.9.11.4. Object-like macro replaced with function-like macro name

+

Object-like macro replaced with function-like macro name is found sometimes in many other programs, and is found also in firefox sources below, though not frequently.

+content/base/src/nsTextFragment.h, +modules/libimg/png/mozpngconf.h, +modules/libjar/zipstub.h, +modules/libpr0n/src/imgLoader.h, +nsprpub/pr/include/obsolete/protypes.h, +nsprpub/pr/include/private/primpl.h, +nsprpub/pr/include/prtypes.h, +parser/expat/lib/xmlparse.c, +security/nss/lib/jar/jarver.c +security/nss/lib/util/secport.h, +xpcom/glue/nsISupportsImpl.h + +

In addition, building of firefox creates, in a directory for developing environment, many links to header files, which are copied into /usr/include/firefox-VERSION/ when you install developing environment for firefox. +Some of these header files have symbolic links to the above files. +mozilla-confic.h, that is created by configure, has a macro definition of this kind, too.

+

These macros should be written as function-like macro to improve readability. +In actual, many other macros in firefox sources are defined as function-like macro replacing to another function-like macro with the same arguments. +There are coding style differences among the authors. +It would be better to set a coding guideline on this matter.

+ +

3.9.11.5. Macro expanded to 'defined'

+

A Macro with 'defined' token in its replacement text, sometimes found in glibc, is found in firefox only once.

+

modules/oji/src/nsJVMConfigManagerUnix.cpp +defines a macro as: +

+#define NS_COMPILER_GNUC3 defined(__GXX_ABI_VERSION) && \
+                          (__GXX_ABI_VERSION >= 102) /* G++ V3 ABI */
+
+and uses it in itself as:

+
+#if (NS_COMPILER_GNUC3)
+
+

This macro should be removed and the #if line should be rewritten as:

+
+#if defined(__GXX_ABI_VERSION) && (__GXX_ABI_VERSION >= 102) /* G++ V3 ABI */
+
+

Maybe this file is to be compiled only by GCC, nevertheless it is not good practice to depend on preprocessor's wrong implementation.

+

Note:

+

*1 GCC-specific-build of mcpp V.2.7 enabled GCC-like handling of 'defined' in macro on #if line. +But mcpp warns at it, and you would better to revise the code.

+ +

3.9.11.6. Tokens in #endif line

+

The following files in jpeg directory have #endif lines with comments without comment mark. +All of the lines has appeared by some recent updates.

+
+jmorecfg.h, jconfig.h, jdapimin.c, jdcolor.c, jdmaster.c
+
+

Though this style of writing was frequently seen in some sources for UNIX-like systems up until middle of 1990s, it has almost completely disappeared nowadays, and cannot be found even in that glibc sources. +GCC usually warns at it as expected. +For all that, these sources take such a writing style. +Only Apple-GCC does not warn at it. +Have these sources been edited on Mac OS?

+ +

3.9.11.7. Assembler Source Which Needs Preprocessing

+

The assembler sources are written as *.s (*.asm) files, and some of which contain macros, but in principle, they do not call for preprocessor.

+

On Mac OS X / ppc, however, there is only one exception. +xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_rhapsody.s calls for preprocessor, because it has a #if block containing only one line. +The block seems to be unnecessary already.

+ +

3.9.11.8. -include option

+

Compilation of firefox begins with configure, which generates mozilla-config.h. +In compilation of most of the sources, this header file is specified by -include option. +config/gcc_hidden.h is also specified similarly. +Why don't the sources #include these headers at their top?

+ +

3.9.11.9. Redefinition of macro

+

Some silent redefinition of macros are found, though they are rare.

+
    +
  • In compilation of most of the sources, -DZLIB_INTERNAL option is specified. +In other words, the macro is defined as 1. +It is, however, defined by some sources in modules/zlib/src/ as:

    +
    +#define ZLIB_INTERNAL
    +
    +

    It is defined to zero token. +And it is used as: +

    +#    ifdef ZLIB_INTERNAL
    +
    +

    Though the difference does not make different result in this case, different definitions of the same macro is not recommended. +Maybe the option by Makefile is redundant.

    +
  • xpcom/build/nsXPCOMPrivate.h defines a macro MAXPATHLEN differently from /usr/include/sys/param.h. +This discrepancy stems from an inconsistency among the related header files about whether include /usr/include/sys/param.h or not. +The related header files should be reorganized.

    +
  • On Mac OS X, assert macro, once defined in /usr/include/assert.h, is redefined in netwerk/dns/src/nsIDNKitInterface.h. +'#undef assert' should precede it.

    +
  • On Mac OS X, in modules/libreg/src/VerReg.c, queer redefinition of macro VR_FILE_SEP occurs as:

    +
    +#if defined(XP_MAC) || defined(XP_MACOSX)
    +#define VR_FILE_SEP ':'
    +#endif
    +#ifdef XP_UNIX
    +#define VR_FILE_SEP '/'
    +#endif
    +
    +

    , because on Mac OS X, configure defines both of XP_MACOSX and XP_UNIX. +This redefinition may be an intended one. +Anyway, it is misleading. +It would be better to write as below, clearly showing the priority of XP_UNIX. +

    +#ifdef XP_UNIX
    +#define VR_FILE_SEP '/'
    +#elif defined(XP_MAC) || defined(XP_MACOSX)
    +#define VR_FILE_SEP ':'
    +#endif
    +
    +
+ +

3.9.11.10. Too long comments

+

The following files have too long comments crossing over several hundred lines or more.

+

extensions/universalchardet/src/base/Big5Freq.tab, extensions/universalchardet/src/base/EUCKRFreq.tab,intl/unicharutil/src/ignorables_abjadpoints.x-ccmap, layout/generic/punct_marks.ccmap

+

Especially, in the directories intl/uconv/ucv*/, there are many files with too long comments. +There is even a case of single comment crossing over 8000 lines! +All of these files have name of *.uf or *.ut, and are mapping tables between Unicode and each Asian encodings, generated automatically by some tool. +They do not seem to be source of C/C++, but they are included from other C++ sources. +Most part of these files are comments, which seem to be a sort of document or table for some other tool.

+

It is not recommendable to include long documents or tables in source files. +They should be separated from source files, even if placed in source tree.

+

Though these files are used in Linux, they are not used in Mac OS X. +On the other hand, on Mac OS X, system headers in framework directories are frequently used, and some of them are queer files mostly occupied with comments.

+ +

3.9.11.11. Mixed encodings of newline

+

The encoding of newline in firefox source is [LF]. +A few files, however, have a small block of lines ending with [CR][LF]. +All of these [CR][LF] lines seem to be fragments inserted as patches. +Some conversion tools should be used when one edit source file on Windows.

+
+ +

3.10. Visual C++ System Header Problems

+

I used mcpp to preprocess some sample programs provided by Visual C++ 2003, 2005 and 2008. The system headers seem to have only a few compatibility problems shown below. These problems are often seen in other compile systems and do not have a serious impact on preprocessing.

+
    +
  1. Since when Visual C++ scarcely implemented the C99 specifications, // comments have often been used in C source code.
    +
  2. Object-like macro definitions that are expanded into function-like macro names are sometimes found.
    +
  3. On Visual C++ 2003, there was one wrong macro definition in limits.h. (It was revised on Visual C++ 2005. See Note 2 in cpp-test.html#5.1.3.1)
    +
+

Although the Linux system-headers and glibc sources often contain GCC local specification based coding, Visual C++ system headers has only a few Visual C++ local coding.

+ +

3.10.1. Comment Generating Macro?

+

I found only one outrageous macro in Visual C++. Vc7/PlatformSDK/Include/WTypes.h has the following macro definition: *1

+
+#define _VARIANT_BOOL   /##/
+
+

This macro definition is used in oaidl.h and propidl.h in Vc7/PlatformSDK/Include/ as follows:

+
+_VARIANT_BOOL bool;
+
+

What does this macro aim at?

+

This macro seems to expect _VARIANT_BOOL to be expanded into // and the line to be commented out. Actually, this expectation is met in Visual C cl.exe !

+

In the first place, // is not a token (preprocessing-token). Macro definitions should be processed and expanded after source are parsed into tokens and a comment is converted into one space. Therefore, it is irrational for a macro to generate comments. When this macro is expanded into //, the result is undefined because // is not a valid preprocessing-token.

+

In order to use these header files with mcpp, comment out these macro definitions and change many _VARIANT_BOOL occurrences as follows:

+
+#if !__STDC__ && (_MSC_VER <= 1000)
+    _VARIANT_BOOL bool;
+#endif
+
+

If you use only Visual C 5.0 or later, this line can be simply commented out as follows:

+
+// _VARIANT_BOOL bool;
+
+

This macro is, indeed, out of question, however, it is Visual C/cl.exe, which allows such an outrageous macro to be preprocessed as a comment, should be blamed. This example reveals the following serious problems this preprocessor has:

+
    +
  1. Preprocessing is not token-based but character-based at least in this example.
    +
  2. The macro expansion result is treated as comment, which indicates the translation phases are confusing.
    +
+

Probably, the cl.exe preprocessor was developed based on a very old somewhat character-based preprocessor. It is easy to presume that the preprocessor has been upgraded by repeating partial revision to the old preprocessor.

+

There are many preprocessors which presumably have a very old program structure. GCC 2/cpp, shown in 3.9, is one of such preprocessors. Repeated partial revision of such a preprocessor will only makes its program structure more complicated. However much such revision may be made, there are limits to quality such preprocessor can achieve. Unless a old source is given up and completely rewritten, a clear and well-structured preprocessor cannot be obtained.

+

At GCC 3/cpp0, a total revision was made to GCC 2; the entire source code was rewritten. So, GCC 3/cpp0 has become quite different from GCC 2. Although mcpp was initially developed based on the source of an old preprocessor, DECUS cpp, the source code was totally rewritten soon.

+

Note:

+

*1 Visual C++ 2005 Express Edition does not contain Platform SDK. However, you can download "Platform SDK for Windows 2003", and use it with VC2005. wtypes.h, oaidl.h, propidl.h in this PlatformSDK/Include directory also have the same macro definition and its usage as VC2003 Platform SDK.
+Also on Visual C++ 2008, in the header files of the same name in 'Microsoft SDKs/Windows/v6.0A/Include' directory, that macro definition and its usage are quite the same.

+ +

3.10.2. '$' in Identifiers

+

Another problem is use of '$' in identifiers. +Its use in macro names suddenly increased in the system headers on Visual C++ 2008. +Though such macros were also found on Visual C++ 2005, they were rare. +But, on Visual C++ 2008, they are found here and there.

+

'Microsoft Visual Studio 9.0/VC/include/sal.h' is the most conspicuous one. +This header defines macros for so-called SAL (standard source code annotation language) of Microsoft, and has many names containing '$'. +This file is included from many standard headers via 'Microsoft Visual Studio 9.0/VC/include/crtdefs.h', so most sources are compiled with these macros without knowing it.

+

If you specify -Za option to invoke the compiler cl, the SAL is disabled and all of the names with '$' in the sal.h disappear. +The necessity of this notation is, however, hard to understand. +Though GCC also enables '$' in identifiers by default, its actual use is rarely found nowadays.

+

This kind of names are also found in the system headers named specstrings*.h in 'Microsoft SDKs/Windows/v6.0A/Include' directory. +They are included from Windows.h via WinDef.h, and the names with '$' do not disappear even -Za option is specified. +The option causes only errors. +So, you cannot use the -Za option to compile a source which includes Windows.h.

+
+ +

4. Implementation-defined Behaviors

+

This chapter does not contain all the C preprocessor specifications. For details on Standard C preprocessing, refer to cpp-test.html. For mcpp behaviors in each mode, refer to 2.1. This chapter covers several preprocessor-related specifications, including those called implementation-defined by Standards. For more details on mcpp implementation-defined-behaviors, see Chapter 5, "Diagnostic Messages".

+
+ +

4.1. Status Value on Exit

+

The header file internal.H defines values returned by mcpp to a parent process. mcpp returns 0 on success, and errno for errno != 0 and 1 for errno == 0 on error. Success means that no error has occurred.

+
+ +

4.2. Include Directory Search Path

+

This section explains the order in which mcpp searches directories for an include file when it encounters a #include directive.

+
    +
  1. If a #include directive argument takes A Form of neither "file-name" nor <file-name>, and is a macro, the macro is expanded. The resulting filename must take a form of either "file-name" or <file-name>. Otherwise, it causes an error.
    +
    +
  2. If the resulting filename, either in form of "file-name" or <file-name>, is a full path name, mcpp tries to open it. If it fails, it causes an error.
    +
    +
  3. If the resulting filename is not a full path but takes a form of "file-name", mcpp regards it as a filename relative from the current directory or source file directory, and begins searching from that directory. The former is a directory from which mcpp was invoked and the latter is a directory where the source file that includes the "file-name" resides. Depending on the specified options and compiler systems, mcpp begins searching directories as follows:
    +
    +
      +
    1. If -I1 is specified, search begins from current directory. +
    2. If -I2 is specified, source file directory. +
    3. If -I3 is specified, current first and then source file directory. +
    +
    +By default, the compiler-specific-builds for UNIX compiler systems, GCC or Visual C begin searching from the source file directory. +The other compiler-specific-builds begin searching at the current directory. However, Borland C-specific-build searches current first and then source file directory. +The compiler-independent-build of mcpp begins search from the source file directory.
    +For GCC, the directories specified by -iqoute option are searched next. +For Visual C, also the directories of each ancestor file of source file are searched one by one.
    +If mcpp fails to find the desired file, it begins searching as shown in step 4.
    +
    +In case of a nested #include, if search begins at current directory, the base directory is always the same. If search begins at a source file directory, the base directory changes each time a header file resides in other directory.
    +
    +
  4. If the resulting filename is not a full path name but takes a form of <file-name>, mcpp searches directories in the following order. If any of these directories are specified as a relative path, then mcpp regards it as a relative directory from the current directory at mcpp startup. If mcpp fails to find or open the desired file after searching all the directories in these order, it causes an error.
    +
      +
      +
    1. Directory(s) specified with the -I <directory> option on mcpp invocation. If several directories are specified, they are searched in the order in which specified (with the left first). +
    2. For GCC-specific-build, directories specified with the -isystem option. If several directories are specified, they are searched in the order specified (from the left). +
    3. Directories specified with an environment variable. ENV_C_INCLUDE_DIR in noconfig.H (configed.H) defines environment variable names. In C++, ENV_CPLUS_INCLUDE_DIR, if defined, takes precedence over ENV_C_INCLUDE_DIR. GCC-specific-build uses C_INCLUDE_PATH (and also CPLUS_INCLUDE_PATH for C++) as default environment variable. Other mcpp uses INCLUDE (and also CPLUS_INCLUDE for C++) as default. If an environment variable specifies several directories with each separated with a delimiter, they are searched in the order in which specified. Windows and other OSs use ";" and ":" as delimiter, respectively. +
    4. Implementation-specific directories for C++ defined by the CPLUS_INCLUDE_DIR? macros in noconfig.H (configed.H). +
    5. Site-specific directories defined by setsysdirs() in system.c (For UNIX systems, /usr/local/include). +
    6. Implementation-specific directories defined by the C_INCLUDE_DIR? macros in noconfig.H (configed.H). +
    7. System-specific directories defined by setsysdirs() in system.c (For UNIX systems, /usr/include). +
    +
+

With the -I- option (-nostdinc option for GCC-specific-build and -X for Visual C-specific-build), the directories specified in 4.4 and later are not searched.

+

ANSI C Rationale says the ANSI committee intends to define a current directory as base directory. I think this is acceptable, in that the base directory is always constant and that the specification is clearer. However, some implementations, such as UNIX, seem to define a source file directory as base one at least for #include "header". The compiler-independent-build of mcpp also takes source file directory as base, according to the majority.

+
+ +

4.3. How to Construct Header Name

+

This section explains how to construct a header-name pp-token and extract a file name from it.

+
    +
  1. If source code contains a header file name in the string literal format, mcpp regards it as a header-name and removes the " at the both ends to construct a filename. This can be applied to a string literal resulting from macro expansion in source code.
    +
    +
  2. If source code contains a header file name in the <filename> format, mcpp regards it as a header-name and removes the < and > at the both ends to construct a filename. This can be applied to a <filename> format sequence resulting from macro expansion. The spaces in the macro are retained squeezing multiple spaces into one space.
    +
    +
  3. In any case, mcpp converts \ to /, although both of "\" and "/" can be used as path delimiters on Windows.
    +
    +
+
+ +

4.4. Evaluation of #if Expression

+

Evaluation of #if expression depends on the largest integer type of the host compiler (by which mcpp was compiled) and that of the target compiler (which uses mcpp). Since the compiler-independent-build has no target compiler, the type depends only on the host compiler.

+

mcpp in Standard mode evaluates #if expression in the common largest integer type of the host and target compiler. Nevertheless, mcpp in pre-Standard mode evaluates it in (signed) long.

+

In the compiler-systems having type "long long", if __STDC_VERSION__ is set to 199901L or higher using the -V199901L option, mcpp evaluates a #if expression in "long long" or "unsigned long long", according to the C99 specification. Although C90 and C++98 stipulate that #if expression is evaluated in long / unsigned long, mcpp evaluate it in long long / unsigned long long even in C90 or C++98 mode, and issues a warning in case of the value overflows the range of long / unsigned long. *1

+

Visual C and Borland C 5.5 do not have a "long long" type, but have an __int64 type of the same length. So, a #if expression is evaluated as __int64 / unsigned __int64. (However, since LL and ULL suffixes cannot be used in Visual C++ 2002 or earlier and Borland C 5.5, these suffixes must not be used in coding other than #if lines.)

+

In addition, when you invoke with the -+ option for C++ preprocessing, mcpp evaluates pp-tokens 'true' and 'false' in a #if expression to 1LL (or 1L) and 0LL (or 0L), respectively.

+

mcpp in Standard mode evaluates #if expression as follows. For a compiler without long long, please read "long long" and "unsigned long long" hereinafter, until the end of 4.5, as "long" and "unsigned long", respectively. For pre-Standard mode read all of them as "long".

+
    +
  1. An integer constant token with a U suffix, including character constants, is evaluated in unsigned long long. (Note that pre-Standard mode does not recognize the U suffix).
    +
  2. Otherwise, a token within the range of non-negative long long is evaluated in long long.
    +
  3. Otherwise, a token within the range of unsigned long long is evaluated in unsigned long long.
    +
  4. Otherwise, it is diagnosed as an out of range error.
    +
  5. In a binary operation, if either operand is unsigned long long, both are converted to unsigned long long. Otherwise, an operation is performed in signed long long.
    +
+

Anyway, an integer constant token always has a non-negative value.
+In pre-Standard mode, an integer constant token is evaluated within the range of non-negative long. A token beyond that range is diagnosed as an out of range error. All the operations are performed within the range of long.

+

If both of host and target compilers have type unsigned long long and the range of unsigned long long of the host is narrower than that of the target, a beyond that host range is evaluated to an out of range error.

+

If an operation using constant tokens produces a result out of range of long long, an out of range error occurs. If it produces a result out of range of unsigned long long, a warning is issued. This can be applied to intermediate operation results.

+

Since a bitwise right shift of a negative value or a division operation using it does not provide portability, mcpp issues a warning. If an operation using a mixture of unsigned and signed operands converts a signed negative value to an unsigned positive value, a warning is also issued. How these values are evaluated depends on the specification of the compiler-proper of the host system.

+

C90 and C++98 makes it a rule that a preprocessor evaluates a #if expression in long/unsigned long (in C99, the maximum integer type is used). These specifications are rougher than those of compiler-propers. A (#)if expression is often evaluated differently between preprocessor and compiler-proper, especially when sign extension is involved.

+

In addition, since keywords are not used during Standard C preprocessing, sizeof or cast cannot be used in a #if expression. Of course, neither variables, enumeration constants, nor floating point numbers can be used there. Standard mode allows the "defined" operator in a #if expression as well as the #elif directive. Except for these differences, mcpp evaluates a #if expression in accordance with priority of and the associative law among operators, just as compiler-propers do. In a binary operation, an arithmetic conversion often takes place to equalize the types on both-hand sides; If one operand is unsigned long long and the other is long long, the both are converted to unsigned long long.

+

Note:

+

*1 mcpp up to V.2.5 evaluated #if expression in C90 and C++98 by long long / unsigned long long internally, and issued an error on overflow of long / unsigned long. From V.2.6 onward, mcpp degraded the error to warning for compatibility with GCC or Visual C.

+
+ +

4.5. Character Constant Evaluation in #if Expression

+

Constant tokens in a #if expression includes identifiers (macros and non-macros), integer tokens and character constants. How to evaluate character constants is implementation-defined and lacks of portability. Even (#)if 'const' is sometimes evaluated differently between preprocessor and compiler-proper. Note that Standards does not even guarantee that (#)if 'const' is evaluated to the same.

+

mcpp in POSTSTD mode does not evaluate a character constant in a #if expression, which is almost meaningless, and makes it an error.

+

Like other integer constant tokens, mcpp evaluates a character constant in a #if expression within the range of long long or unsigned long long. (In pre-Standard mode, long only.)

+

A multi-byte character or a wide character is generally evaluated with 2-bytes type, except for the UTF-8 encoding, which is evaluated with 4-bytes type. Since UTF-8 has a variable length, mcpp evaluates it with 4-byte type. mcpp does not support EUC's 3 byte encoding scheme. (A 3-byte character is recognized as 1 byte + 2 bytes. As a consequence, its value is evaluated correctly.) Although there are some implementations using the 2-byte encoding scheme that define wchar_t as 4-byte, mcpp has no relevance to wchar_t. The following paragraphs describe two-byte multi-byte character encodings.

+

Multi-byte character constants, such as 'X', are evaluated to ((First byte value << 8) + Second byte value). (8 is the value of CHAR_BIT in <limits.h>.) Note that 'X' is used here to designate a multi-byte character. Though 'X' itself is not a multi-byte character, it is used here to avoid character garbling.

+

Let me take an example of multi-character character constants, such as 'ab', '\x12\x3', and '\x123\x45'. 'a', 'b', '\x12', '\x3' and '\x123' are regarded as one byte. When a multi-character character constant is evaluated, each one byte, starting from the highest one, is evaluated within the range of [0, 0xFF] and combined by shifting it to left by 8. (0xFF is the value of UCHAR_MAX in <limits.h>.) If the value of one escape sequence exceeds 0xFF, an out of range error occurs. Therefore, in the implementation of the ASCII character set, the above three tokens are evaluated to 0x6162, 0x1203 and error, respectively.

+

L'X' is evaluated to the same value as 'X'. Let me take an example of multi-character wide character constants, such as L'ab', L'\x12\x3', and L'\x123\x45'. L'a', L'b', L'\x12', L'\x3', L'\x123', and L'\x45' are regarded as one wide character. When a multi-character wide character constant is evaluated, each wide character, starting from the highest one, is evaluated within the range of [0, 0xFFFF] and combined by shifting it to left by 16. If the value of one escape sequence exceeds the maximum value of an unsigned 2-byte integer, an out of range error occurs. Therefore, in the implementation of the ASCII character set, the above three tokens are evaluated to 0x00610062, 0x00120003, and 0x01230045, respectively.

+

If the values of a multi-character character constant and a multi-character wide character constant exceed the range of unsigned long long, an out of range error occurs.

+

With __STDC_VERSION__ or __cplusplus set to 199901L or higher, mcpp evaluates a Universal Character Name (UCN) in the form of \uxxxx and \Uxxxxxxxx as a hex escape sequence. (I know this evaluation is nonsense but no other way.)

+

If the compiler-proper of the target compiler system uses a signed char or signed wchar_t, a character constant in a (#)if expression may be evaluated differently between mcpp and compiler-proper. The range that causes a range error may also differ between them. In addition, evaluation of multi-character character constants and multi-byte character constants varies even among preprocessors and among compilers. Standard C does not define whether, with CHAR_BIT set to 8, 'ab' is evaluated to 'a' * 256 +'b' or 'a' + 'b' * 256.

+

In general, character constants should not be used in an #if expression, as long as you have an alternative method. I think an alternative method always exists.

+
+ +

4.6. #if sizeof (type)

+

Standard C stipulates that preprocessing is a process independent of run-time environments or compiler-proper specifications, thus prohibiting it from using sizeof and cast in an #if expression. However, pre-Standard mode allows sizeof (type) in a #if expression. This was done as a part of my effort to add necessary modifications to DECUS cpp, such as adding long long and long double processing, while retaining its original functionality. As to cast, I neither implemented nor had a will to do so because it would require troublesome work.

+

A series of macros beginning with S_, such as S_CHAR, in eval.c define the size of each type. Under cross implementation, these macros must be modified to specify size of the types, in integer values, used in the target system.

+

I have to admit that mcpp does not provide the full functionality of #if sizeof. mcpp just ignores the letter of "signed" or "unsigned" preceding char, short, int, long, and long long when it appears in a #if sizeof. Also mcpp does not support sizeof (void *). I know this is a half-hearted implementation but I do not want to increase the number of flags in system.H in vain for this non-conforming function. I initially thought of removing the sizeof code from the original version because I did not intend to support cast at all, but on the second thought, I decided to make a small amount of modifications to make use of the existing code.

+
+ +

4.7. How to Handle White-Space Sequence

+

mcpp in principle compresses a white-space sequence, excluding <newline>, as a token separator into one space character during tokenization in the translation phase 3. If -k or -K option is specified in STD mode, however, it outputs horizontal white spaces as they are without compressing. It also deletes a white-space sequence at the end of a line.

+

A white-space sequence at the beginning of a line is deleted in POSTSTD mode, and putout as they are in other modes. The latter is special treatment for convenience of human reading. *1

+

This compression and deletion occurs during the intermediate phase. The next phase 4 involves macro expansion and preprocess-directive-line processing. Macro expansion may sometimes produce several space characters before and after the macro. Of course, the number of space characters does not affect compilation results.

+

Standard C says that whether implementation compresses a white-space sequence into one space character during the translation phase 3 is implementation-defined, but you usually do not have to worry about this. <Vertical-tab> or <form-feed> in a preprocessor directive line may adversely affect portability, since this is undefined in Standard C. mcpp converts it to one space character.

+

Note:

+

*1 Up to V.2.6.3 mcpp squeezed line top white spaces into one space. +In V.2.6.4, it changed the behavior.

+
+ +

4.8. Default Specifications for mcpp Executables

+

This section describes the specifications of mcpp executables generated when DIFfile and makefile for each compiler system in the noconfig directory are used to compile mcpp with default settings. When a configure script is used to compile mcpp, the generated mcpp may differ, depending on configure's results, however, as long as OS and compiler system versions are same, generated mcpps would be same except for include directories.

+

The compiler-independent-build of mcpp has the constant specifications regardless of the compiler system with which mcpp was compiled, except a few features dependent on OS and CPU.

+

There are compiler-independent-build and compiler-specific-build for mcpp executables, and each executable has several behavioral modes. For those, refer to 2.1. This section describes the settings centering on STD mode.

+

DIFfiles and makefiles are for the following compiler systems:

+
+ + + + + + + + + + + + +
FreeBSD 6.3 GCC V.3.4
Vine Linux 4.2 / x86 GCC V.2.95, V.3.2, V.3.3, V.3.4, V.4.1
Debian GNU/Linux 4.0 / x86 GCC V.4.1
Ubuntu Linux 8.04 / x86_64 GCC V.4.2
Fedora Linux 9 / x86 GCC V.4.3
Mac OS X Leopard / x86 GCC V.4.0
CygWIN 1.3.10 (GCC V.2.95), 1.5.18 (GCC 3.4)
MinGW & MSYS GCC 3.4
WIN32 LCC-Win32 2003-08, 2006-03
WIN32 Visual C++ 2003, 2005, 2008
WIN32 Borland C++ V.5.5
+
+

In addition, for the following compilers which I don't have, the difference files contributed from some users are contained here.

+
+ + + +
WIN32 Visual C++ V.6.0, 2002
WIN32 Borland C++ V.5.9 (C++Builder 2007)
+
+

Of all the macros defined in noconfig.H and system.H, the settings of those mentioned below are identical among every mcpp executable, regardless of their compiler systems.

+

Each mcpp is compiled with DIGRAPHS_INIT == FALSE, so enables digraph when the -2 (-digraphs) option is specified.
+With TRIGRAPHS_INIT == FALSE, trigraph is enabled with the -3 (-trigraphs) option.
+With OK_UCN set to TRUE, Universal Character Name (UCN) can be used in C99 and C++.
+With OK_MBIDENT set to FALSE, multi-byte-characters cannot be used in identifiers.

+

With STDC set to 1, the initial value of __STDC__ is 1.

+

The translation limits are set as follows.

+
+ + + + + + + + + + +
NMACPARS (Maximum number of macro arguments) 255
NEXP (Maximum number of nested levels of #if expressions) 256
BLK_NEST (Maximum number of nested levels of #if section) 256
RESCAN_LIMIT (Maximum number of nested levels of macro rescans)64
IDMAX (Valid length of identifier) 1024
INCLUDE_NEST (Maximum number of #include nest level) 256
NBUFF (Maximum length of a source line) *1 65536
NWORK (Maximum length of an output line) 65536
NMACWORK (Size of internal buffers used for macro expansion) 262144
+
+

On GCC-specific-build and Visual C-specific-build, however, NMACWORK is used as the maximum length of an output line.

+

This macro differs on OS regardless of build types.

+

MBCHAR (Default encoding of multibyte character):

+
+ + + +
Linux, FreeBSD, Mac OS X EUC-JP
WIN32, CygWIN, MinGW SJIS
+
+

The settings of the macros below are different among compiler systems.

+

STDC_VERSION (Initial value of __STDC_VERSION__):

+
+ + + +
Compiler-independent, GCC 2199409L
Others 0L
+
+

HAVE_DIGRAPHS (Is digraphs output as it is?):

+
+ + + +
Compiler-independent, GCC, Visual CTRUE
Others FALSE
+
+

EXPAND_PRAGMA (Is a #pragma line macro-expanded in C99?):

+
+ + + +
Visual C, Borland CTRUE
Others FALSE
+
+

GCC 2.7-2.95 defines __STDC_VERSION__ to 199409L. However, in GCC V.3.*,V.4.*, __STDC_VERSION__ is no longer predefined by default and is now defined in accordance with an execution option. mcpp setting for GCC follows these variations.

+

If STDC_VERSION is set to 0L, mcpp predefines __STDC_VERSION__ as 0L. So, specifying the -V199409L option sets __STDC__ and __STDC_VERSION__ to 1 and 199409L, respectively and allows only predefined macros that begin with '_', resulting in mcpp in the strictly C95 conforming mode. The -V199901L option specifies C99 mode.

+

In C99 mode, mcpp predefines __STDC_HOSTED__ as 1.

+

mcpp itself predefines neither __STDC_ISO_10646__, __STDC_IEC_559__ nor __STDC_IEC_559_COMPLEX__. These values are compiler-system-specific. In glibc 2 / x86, the system header defines __STDC_IEC_559__ and __STDC_IEC_559_COMPLEX__ as 1. Other compiler systems do not define them.

+

If HAVE_DIGRAPHS is set to FALSE, digraph is output after converting to usual token.

+

The argument of #pragma line beginning with STDC, MCPP or GCC is never macro-expanded even if EXPAND_PRAGMA == TRUE.

+

Include directories are set as follows:

+

System-specific or site-specific directories under UNIX-like OSs are as follows (common to compiler-independent-build and compiler-specific-build):

+
+ + +
FreeBSD, Linux, Mac OS X, CygWIN/usr/include, /usr/local/include
+
+

Mac OS X has also the framework directories set to /System/Library/Frameworks and /Library/Frameworks by default.

+

On MinGW, /mingw/include is the default include directory.

+

CygWIN GCC-specific-build changes /usr/include to /usr/include/mingw by -mno-cygwin option.

+

For the implementation-specific directories that vary among compiler systems and their versions, see the DIFfiles. The compiler-independent-build does not set implementation-specific directories. mcpp for the compiler systems on Windows does not preset any directory but uses the environment variables: INCLUDE, CPLUS_INCLUDE. These environment variables are used by the compiler-independent-build too.

+

If these default settings do not suit you, change settings to recompile mcpp, or use environment variables or the -I option.

+

When the length of a preprocessed line exceeds NWORK-1, mcpp generally divides it into several lines so that each line length becomes equal to or less than NWORK-1. A string literal length must be equal to or less than NWORK-2. +mcpp of GCC-specific-build and Visual C-specific-build, however, do not divide output line.

+

Again for confirmation, the macros mentioned above in italics are used only to compile mcpp, and are not built-in macros in a mcpp executable.

+

If you invoke mcpp without an input file and enter '#pragma MCPP put_defines', the built-in macros will be displayed.

+

With __STDC__ set to 1 or higher, the macros that do not begin with '_' are deleted. The -N (-undef) option deletes all the macros other than __MCPP. After -N, you can use -D to defines macro symbols over again. When you use a different compiler system version from those specified here, -N and -D allow you to redefine your version macro without recompiling mcpp. The -D option allows you to redefine a particular macro without using -N or -U.

+

When you use the -+ (-lang-c++) option to specify C++ preprocessing, __cplusplus is predefined with its initial value of 1L. In addition, some other macros are also predefined:

+

Although there are some predefined macros in GCC, those predefined by GCC were few, until GCC V.3.2. Most of them are passed from gcc to cpp by the -D option. So, it is not necessary for mcpp to define them for compatibility. However, mcpp predefines these macros for being used in a stand alone manner, such as pre-preprocessing.

+

GCC V.3.3 and later predefines 60 or 70 macros (suddenly). GCC-specific-build of mcpp V.2.5 and later for GCC V.3.3 or later also includes these predefined macros other than the above ones. These GCC-specific predefined macros are written in mcpp_g*.h header files, which is generated by installation of mcpp.

+

Since FreeBSD, Linux, CygWIN, MinGW / GCC and LCC-Win32, Visual C 2008 have a type long long, an #if expression is evaluated in long long or unsigned long long. Visual C 6.0, 2002, 2003, 2005 and Borland C 5.5 do not have a "long long" type but __int64 and unsigned __int64 instead. These types are used.

+

In the above compiler systems with type long ranges:

+
+[-2147483647-1, 2147483647] ([-0x7fffffff-1, 0x7fffffff])
+
+

and unsigned long ranges:

+
+[0, 4294967295] ([0, 0xffffffff]).
+
+

In the compiler systems with type long long ranges:

+
+[-9223372036854775807-1, 9223372036854775807]
+([-0x7fffffffffffffff-1, 0x7fffffffffffffff]),
+
+

and unsigned long long ranges:

+
+[0, 18446744073709551615] ([0, 0xffffffffffffffff]).
+
+

All the compiler-propers of the above compiler systems internally represent a signed integer as two's complement number. So do bit operations. This can be applied to mcpp's #if expression.

+

Right shift of a negative integer is an arithmetic shift. This can be applied to mcpp's #if expression. (Right shifting an integer by one bit halves the value with the sign retained)

+

In an integer division or modulus operation, if either or both operands are negative values, an algebraic operation like Standard C's ldiv() function is performed. This can be applied to mcpp's #if expression.

+

These OSs use the ASCII basic character set. So does mcpp.

+

There is a memory management routine, kmmalloc, that I developed. This routine has malloc(), free(), realloc() and other memory handling functions. If kmmalloc is installed in systems other than CygWIN or Visual C 2005 or 2008, kmmalloc is linked when the MALLOC=KMMALLOC (or -DKMMALLOC=1) option is specified in make. Also its heap memory debugging routine is linked. mcpp for Linux and LCC-Win32 uses EFREEP, EFREEBLK, EALLOCBLK, EFREEWRT and ETRAILWRT with an errno of 2120, 2121,2122, 2123 and 2124 assigned, and other mcpp uses 120, 121, 122, 123, and 124. (Refer to mcpp-porting.html#4.extra.) *2

+

On the systems other than GNU and Visual C, you should preset the environment variable TZ, for example JST-9 in Japan. Or, the __DATE__ and __TIME__ macros are not set correctly.

+

Note:

+

*1 This limit applies also to the line spliced by <backslash><newline> deletion. Moreover, it applies to the line after converting a comment into a space and possibly concatenated multiple logical lines by a comment spreading across the lines.

+

*2 CygWIN 1.3.10 and 1.5.18 provides malloc() that has an internal routine named _malloc_r() which is called by a few other library functions. So this malloc() cannot be replaced with other malloc(). Also in Visual C 2005 and 2008, the program terminating routine calls an internal routine of resident malloc(), hence other malloc() cannot be used.

+
+ +

5. Diagnostic Messages

+ +

5.1. Diagnostic Messages Format

+

This section covers diagnostic messages issued by mcpp, as well as their meaning. By default, these messages are output to stderr. With the -Q option, they are redirected to the mcpp.err file in the current directory. A diagnostic message is output in the following manner:

+
    +
  1. "filename: line: " is followed by "fatal error: ", "error: " or "warning: " and then by any of the diagnostic messages shown in sections 5.3 to 5.9. Although the specification that a diagnostic message has to fit in one line that begins with "filename: line:" seems to lack of flexibility, I followed because it is a traditional way of implementing messages in C on UNIX and because various tools have already assumed that. Some mcpp messages do not fit in a line of usual terminal.
    +
    +
  2. If an error occurs during macro expansion, the macro invocation is displayed. For nested macro invocation, mcpp shows each macro names and its definitions, as well as the source filename and line number where the macro is defined.
    +
    +
  3. The source file name, the line number and the line at which an error has occurred are displayed. If an error has occurred in an included file, the names, line numbers and the #include lines of all the including files are displayed. Usually, a logical line with comments replaced with a space character is displayed. The logical line is constructed from one or more physical lines with '\' at the line end. If a comment spreads over several lines, several logical lines are concatenated into one, which is displayed as the line. In this case, the line number of the last concatenated physical line is displayed. Note that if an error occurs during the translation phase before processing a comment, the line in the phase is displayed.
    +
+

If the -j option is specified, mcpp outputs neither the above 2 nor 3.

+

Diagnostic messages are divided into three levels:

+
+ + + + +
fatal errorIndicates an error is so serious that it is no longer meaningful to continue preprocessing.
error Indicates there is a syntax or usage error.
warning Indicates code lacks of portability or may contain a bug.
+
+

Warnings are further divided into five classes:

+
+ + + + + + +
Class 1 Source code may contain a bug or at least lack portability.
Class 2 Probably, source code will present no problem in practical use, but is problematic in terms of Standard conformance.
Class 4 Probably, source code will present no problem in practical use, but is problematic in terms of portability.
Class 8 Rather surplus warnings to #if groups skipped, sub-expression in #if expression whose evaluation is skipped, and etc.
Class 16Warning to trigraphs and digraphs.
+
+

Warnings other than Class 1 or 2 are rather specific to mcpp.

+

mcpp has various types of diagnostic messages. For example, STD mode provides the following types of diagnostics for each level and class.

+
+ + + + + + + + +
fatal error 17 types
error 76 types
warning class 1 49 types
warning class 2 15 types
warning class 4 17 types
warning class 8 30 types
warning class 16 2 types
+
+

Principally, these messages point the coding in question. The diagnostic messages below have a sample value embedded in a token or a numeric value from source code. For the messages with a macro name embedded, a value the macro is expanded into is shown in real messages.

+

Depending on cases, a same message is issued as warning or error, in which case, this manual gives the first occurrence a detailed description. For the subsequent occurrences, the message is only listed.

+
+ +

5.2. Translation Limits

+

Of all the errors shown below, some errors, such as a buffer overflow, occur due to mcpp specification restrictions. Some macros in system.H define translation limits, such as a buffer size. Enlarge the buffer size and recompile mcpp if necessary, however, be careful not to increase it too much. A large buffer in a system with a small amount of memory may cause an "out of memory" error frequently.

+
+ +

5.3. Fatal Errors

+

A fatal error occurs and preprocessing is terminated when it is no longer possible to continue preprocessing due to an I/O error or a shortage of memory, or it is no longer meaningful to do so due to a buffer overflow. A status value of failure is returned to a parent process.

+ +

5.3.1. mcpp's Own Bugs

+
    +
  • Bug:
    +This message has several types. Should it be issued, it would indicate mcpp's own bug. I think this message is rarely issued, but should it be issued, do not hesitate to let me know the situation.
    +
+ +

5.3.2. Physical Errors

+
    +
  • File read error
    +An error has occurred during reading a source file. Disk or file-system may have been damaged.
    +
    +
  • File write error
    +An error has occurred during writing to a file. Disk or file-system may have been damaged or full.
    +
    +
  • Out of memory (required size is 0x1234 bytes)
    +Runs short of memory. mcpp tried to obtain memory of 0x1234 bytes from the heap, but in vain. This error occurs when there are too many long macro definitions on a system with a small amount of memory. Divide your source file to decrease the number of macro definitions in one translation unit.
    +
+ +

5.3.3. Translation Limits and Internal Buffer Errors

+
    +
  • Too long header name "long-file-name"
    +The length of the full path name of a file to include (file name concatenated with the specified directory path) has exceeded PATHMAX.
    +
    +
  • Too long source line
    +The length of a physical line in source file has exceeded NBUFF-2. The source code may not be written in C.
    +
    +
  • Too long logical line
    +The length of a logical line, which is constructed from the several physical lines with \ at the line end, has exceeded NBUFF-2. This error may occur when a defined macro is too long. The code should be written not as a macro but as a function.
    +
    +
  • Too long line spliced by comments
    +The length of a preprocessed line with a comment replaced with a space character has exceeded NBUFF-2. This error occurs when several lines are concatenated into one if a comment spreads over several lines. Divide the comment into several parts and write each on a separate line.
    +
    +
  • Too long token
    +A preprocessed line has a token with a length more than NWORK-2. mcpp tries to divide the preprocessed line into a length NWORK that the compiler-proper can accept. However, if a line contains a extremely long token, it sometimes fails to do so.
    +
+

The following four errors may also be caused by a buffer overflow at a token that is not so particularly long during macro expansion, in which case, you should divide the macro invocation.

+
    +
  • Too long quotation "long-string"
    +A string literal, character constant or header-name is too long. In case of a string literal, divide it. Standard conforming compiler concatenate adjacent string literals for you.
    +
    +
  • Too long pp-number token "1234567890toolong"
    +A preprocessing-number token is too long. This error is issued in Standard mode.
    +
    +
  • Too long number token "12345678901234......"
    +A number token is too long. This error is issued in pre-Standard mode.
    +
    +
  • Buffer overflow scanning token "token"
    +A buffer overflow has occurred during token scan. This message is issued to tokens other than string literals, character constants, header-names and pp-numbers.
    +
    +
  • More than BLK_NEST nesting of #if (#ifdef) sections
    +The depth of nested #if, #ifdef, and #ifndef has exceeded BLK_NEST. (In real message, the macro name BLK_NEST is replaced with an actual numerical value. This is applied to all the messages below with a macro name embedded.) Divide the #if section.
    +
    +
  • More than INCLUDE_NEST nesting of #include
    +The depth of nested #included has exceeded INCLUDE_NEST. Probably the #includes are in infinite recursion.
    +
    +
+ +

5.3.4. #pragma MCPP preprocessed Related Errors

+
    +
  • This is not the preprocessed source
    +Although the "#pragma MCPP preprocessed" directive is found, this is not a source preprocessed by mcpp.
    +
    +
  • This preprocessed file is corrupted
    +This seems to be a source preprocessed by mcpp, but cannot be used because it is destroyed.
    +
+
+ +

5.4. Errors

+

mcpp issues an error message when it found a grammatical error. Standard C stipulates that a compiler system should issue a diagnostic message when they encounter a violation of syntax rules or constraints. Principally, Standard mode issues an error message to this type of violation, but sometimes issues a warning.

+

mcpp issues an error message or warning to most of undefined items in Standard C. However, mcpp issues neither an error nor a warning to the following undefined items:

+
    +
  1. ' or /* in a header name in the form of a string literal: mcpp regards them as characters, resulting in a file open error. (' or /* in a header name enclosed with < and > is regarded as the beginning of a character constant or a comment, resulting in some errors.) Although how to treat \ in a header name is undefined in Standard C, mcpp does not check it because it may eventually cause an error when mcpp actually tries to open the file. mcpp on Windows issues a class 2 warning to \ and converts it to /.
    +
    +
  2. #undef defined: Although #undef-ing a name "defined" yields an undefined result, mcpp does not issue a message because, in the first place, mcpp does not allow definition of a macro named "defined", so the macro to be undefined never exists.
    +
  3. Illegal multi-byte character sequence in a comment: Although how to deal with such character sequence is undefined in Standard C, mcpp does not issue a message because it does no harm. (mcpp issues a warning to an illegal multi-byte character sequence in string literals, character constants and header names.)
    +
    +
  4. Identifiers that begin with _ (Reserved for compiler systems): Although using these identifiers in a user program will cause an undefined result, mcpp does not check it because mcpp does not always have a means to decide whether these identifiers are used in a user program or the compiler-system.
    +
    +
  5. __STDC_ISO_10646__, __STDC_IEC_559__, and __STDC_IEC_559_COMPLEX__: Although #defining or #undef-ing these optional C99 predefined macros yields an undefined result, mcpp does not check it because mcpp does not always have a means to determine whether these macros appear in a user program or the compiler-system. (These macros are most likely to be defined in a header file of a compiler system.)
    +
    +
  6. UCN equivalent sequence: Although it is undefined in C99 how to deal with a UCN equivalent sequence generated by deleting <backslash><newline> during the translation phase 2 or by concatenating string literals, mcpp does not issue a message and regards it as a UCN.
    +
+

For details on what is a violation of syntax rule or constraint, undefined, unspecified or implementation-defined in Standard C preprocessing, refer to cpp-test.html.

+

Even if an error occurs, mcpp continues preprocessing as long as they are not fatal one. mcpp shows the number of errors and returns the status of failure to the parent process when it exits.

+ +

5.4.1. Character and Token Related Errors

+
    +
  • Illegal control character 0x1b, skipped the character
    +A control code other than a white space character is found in a string literal, character constant, header name or comment. mcpp skips it and continues preprocessing.
    +
+

The following several messages are all token-related errors. For the first four, mcpp skips the line in question and continues preprocessing. The first three are string literal or other token-related errors, indicating that a closing quotation mark is not found by the end of the logical line. This type of error occurs when you write a text that does not take a form of a preprocessing-token sequence in neither a string literal nor comment, as shown below:

+
+#error I can't understand.
+
+

As processing-tokens are not so strictly defined as C tokens in the compiler-proper, most character sequences are regarded as pp-token sequences, as long as they belong to a source character set. Therefore, it is only this type of coding that causes a preprocessing-token error. Pp-token errors may occur in a skipped #if group.

+
    +
  • Unterminated string literal "string
    +A string literal is unterminated. A string literal cannot spread over several logical lines. If necessary, write a string literal on each of several lines and have the compiler concatenate them. This error may occur during conversion into a string by a #operator, in which case the line in question is not skipped. mcpp in OLDPREP mode does not make an unterminated string literal an error. (Instead, it regards the line end as literal end.) Nor mcpp does when invoked with the -a (-lang-asm, -x assembler-with-cpp) option (it issues a warning); it regards an unterminated string literal as a literal spreading over several lines and concatenates a line with the next by inserting \n.
    +
    +
  • Unterminated character constant 't understand.
    +A character constant is not terminated. mcpp in OLDPREP mode and lang-asm mode does not make it an error. (Instead, it regards the line end as literal end.)
    +
    +
  • Unterminated header name <header.h
    +A header-name is not terminated. " or ' in a header-name enclosed with < and > causes the above two errors, not this one. If /* is found in a header-name enclosed with < and >, mcpp regards it and the following text as a comment.
    +
    +
  • Empty character constant ''
    +A character constant is empty. +In lang-asm mode, mcpp only issues a warning, but an error in other modes.
    +
    +
  • Illegal UCN sequence
    +mcpp in STD mode invoked with __STDC_VERSION__ set to 199901L or in C++ mode can recognizes UCN. This message is issued when the number of orders of a hex sequence that begins with \u and \U in an identifier is less than four and eight, respectively. (If this occurs in a character constant in a #if expression, an undefined escape sequence warning results. Other tokens are not checked by mcpp.)
    +
    +
  • UCN cannot specify the value "0000007f"
    +UCN cannot specify a hex value in the ranges of 0 to 9f, except for 0x24 ($), 0x40 (@) and 0x60 (`), and of d800 to dfff. The former range agrees with the range of the basic source character set. The latter range falls into the reserved area for special characters. Note C++ does not have the latter restriction. (Specifications slightly differ among Standards for an unknown reason.) However, when mcpp in STD mode is invoked as C++ with -V199901L to preset the __cplusplus macro to 199901L or higher, mcpp behaves in accordance with the C99 specifications in this respect.
    +
    +
  • Illegal multi-byte character sequence "XY"
    +mcpp in STD mode compiled with OK_MBIDENT == TRUE allows for a multi-byte character in an identifier in C99, however, it will cause an error when it finds a character sequence that cannot be regarded as a multi-byte character although the first byte of the sequence is that of a multi-byte character. (In other than identifier, this illegal sequence causes a warning.)
    +
+ +

5.4.2. Unterminated Source File Related Errors

+

This section covers messages issued when a source file ends with an unterminated #if section or macro invocation. If the file (not included file) marks the end of input, the message "End of input", not "End of file", is issued.

+

These diagnostic messages are issued as an error or warning, depending on mcpp modes.

+

Standard mode issues these messages as error, in which case mcpp skips the macro invocation in question and restores relationship between paired directives in a #if section to that of when the file is initially included.

+

On the other hand, pre-Standard mode issues warnings. OLDPREP mode does not even issue warning except on unterminated macro call.

+
    +
  • End of file within #if (#ifdef) section started at line 123
    +#if (#ifdef or #ifndef) on the line 123 does not have a corresponding #endif.
    +
    +
  • End of file within macro invocation started at line 123
    +A macro invocation that begins at the line 123 is not terminated by the end of the file. This error may occur when an argument has an ill-balanced parenthesis, or when a token error occurs between opening and closing parentheses, in which case, mcpp continues to read tokens for a corresponding parenthesis until it reaches to the file end. (Possibly, a buffer overflow may occur before reaching there.) In addition, since macro expansion specifications vary among modes, a macro that is successfully expanded in a mode may not in other modes.
    +
+ +

5.4.3. Ill-Balanced Preprocessing Group Related Errors

+

This section covers errors caused by ill balanced directives of #if, #else and etc. Even if mcpp finds ill balance among these directives, it continues processing, assuming that the processing group so far still continues. mcpp checks to see whether directives are balanced even in a skipped #if group.

+

The #if (#ifdef) section is a block between #if (#ifdef or #ifndef) and #endif. The #if (#elif, #else) group is a smaller block, say, between #if (#ifdef or #ifndef) and #elif, between #elif and #else, or between #else and #endif within the #if (#ifdef) section.

+
    +
  • Already seen #else at line 123
    +Another #else (#elif) is found after #else at the line 123. #endif may be missing.
    +
    +
  • Not in a #if (#ifdef) section
    +#else (#elif, #endif) is found without #if (#ifdef or #ifndef).
    +
    +
  • Not in a #if (#ifdef) section in a source file
    +An included file has #else (#elif or #endif) without #if (#ifdef or #ifndef). If the included file in question had been in the including source file, this error would never have occurred. In other words, each of these directives contained in a separate file is not balanced by itself. The only Standard mode issues this error. (pre-Standard mode issues a warning.)
    +
+

The following two errors occur when #asm and #endasm are not balanced. These messages are issued only by compiler-specific-build for a particular compiler system and in pre-Standard mode.

+
    +
  • In #asm block started at line 123
    +A #asm block that begins at the line 123 has another #asm. #asm cannot be nested. Maybe, the programmer forgot to write #endasm.
    +
    +
  • Without #asm
    +#endasm is found in a non #asm block.
    +
+ +

5.4.4. Simple Syntax Errors on Directive Lines

+

This section covers simple syntax errors on directive lines that begin with #. The errors hereinafter discussed until 5.4.12 do not occur within a skipped #if group. (mcpp invoked with the -W8 option issues a warning to an unknown directive.)

+

When mcpp finds a directive line with a syntax error, it ignores the line and continues processing, in which case, it neither regards #if as the beginning of a section nor changes line numbers even with a #line. If a #include or #line line has a macro argument, Standard mode expands the macro and checks the syntax. Pre-Standard mode does not expand the macro.

+

Although the messages below do not show the directive name in question, the source line that follows the message show it. (A directive line with a comment converted to a space character always becomes one line, which is called "preprocessed line" here.)

+
    +
  • Illegal #directive "123"
    +A token that immediately follows # is not a name. The token must be a directive name. (OLDPREP mode regards #123 as #line 123.)
    +
    +
  • Unknown #directive "pseudo-directive"
    +The directive "pseudo-directive" is not implemented. mcpp invoked with the -a (-lang-asm or -x assembler-with-cpp) option issues a warning, not an error.
    +
    +
  • No argument
    +#if, #elif, #ifdef, #ifndef, #assert or #line has no arguments.
    +
    +
  • No header name
    +A #include line does not have an argument, or expansion of a macro argument of a #include line results in no token.
    +
    +
  • Not a header name "UNDEFINED_MACRO"
    +The specified argument is not a header name. This message is issued when a macro that should define a header name is not defined. A header name must be enclosed with < and >, or ", ".
    +
    +
  • Not an identifier "123"
    +#ifdef, #ifndef, #define or #undef requires an identifier as an argument, but 123 is not an identifier.
    +
    +
  • No identifier
    +#define or #undef does not have an argument.
    +
    +
  • No line number
    +#line has a macro argument, but its expansion has resulted in no token.
    +
    +
  • Not a line number "name"
    +The first argument of a #line is not a numeric token (preprocessing number).
    +
    +
  • Line number "0x123" isn't a decimal digits sequence
    +The first argument of a #line must be a decimal integer. Standard mode issues this message. In pre-Standard mode, hex and octal integer tokens are allowed although a warning is issued.
    +
    +
  • Line number "2147483648" is out of range of [1,2147483647]
    +The first argument of a #line must be within the range of 1 to 2147483647. 0 is regarded as an error. This is applied to Standard mode.
    +
    +
  • Not a file name "name"
    +The second argument of a #line, if any, must be a string literal. An identifier or wide string literal is not allowed here.
    +
+

The following error occurs only in Standard mode and this directive is ignored. OLDPREP mode issues neither an error nor a warning. KR mode issues a warning and continues preprocessing as if there had been no "junk" text.

+
    +
  • Excessive token sequence "junk"
    +#else, #endif, #asm, or #endasm line has a junk text, or such text follows a valid argument of #ifdef, #ifndef, #include, #line or #undef line.
    +
+ +

5.4.5. Syntax Errors in #if Expressions

+

This section covers syntax-related errors in #if, #elif and #assert directives. If a #if (#elif) line has these errors, mcpp evaluates it to false, skips the #if (#elif) group, and continues processing.

+

For a skipped #if (#ifdef, #ifndef, #elif or #else) group, mcpp checks validity of C preprocessing tokens and balance of these directives, but not other grammatical errors.

+

A #if line has a sub-expression whose evaluation is skipped. For example, in case of #if a || b, if "a" is evaluated to true, "b" is not evaluated at all. However, the following 14 types of syntax errors or translation limit errors are checked, even if they are located in a sub-expression whose evaluation is skipped.

+
    +
  • More than NEXP*2-1 constants stacked at "12"
    +The number of constants in the stack has exceeded NEXP*2-1 when mcpp tried to evaluate "12" in a #if expression. The depth of nested #if expressions is too deep.
    +
    +
  • More than NEXP*3-1 operators and parens stacked at "+"
    +The total number of operators and parenthesis in the stack has exceeded NEXP*3-1 when mcpp tried to evaluate '+' in a #if expression. (A pair of parentheses is counted as two.) The depth of nested #if expressions is too deep.
    +
    +
  • Misplaced constant "12"
    +A #if expression has a constant '12' where no constant should be found. This error occurs when casting, such as (int)0x8000, is used in a #if expression, where casting is not allowed. In this case, (int)0x8000 is evaluated to (0)0x8000, causing this error. The int is regarded as an identifier that is not defined as macro and is evaluated to 0.
    +
    +
  • Operator ">" in incorrect context
    +A #if expression has a > operator where no > should be found. If a macro MACRO is defined as 0 token, #if MACRO > 0 will be expanded to #if > 0, causing this error, which is indicated by the preceding warning -- Macro "MACRO" is expanded to 0 token.
    +
    +
  • Unterminated expression
    +A #if expression is not terminated. This error is caused by, for example, #if a || MACRO with MACRO defined as 0 token.
    +
    +
  • Excessive ")"
    +A #if expression has a ")" that does not corresponds to "(".
    +
    +
  • Missing ")"
    +A #if expression does not have a ")" that corresponds to "(".
    +
    +
  • Misplaced ":", previous operator is "+"
    +: without a corresponding ?.
    +
    +
  • Bad defined syntax
    +A #if defined has a syntax error. This error is caused by an unbalanced parenthesis or missing identifier in an argument. When a macro expansion causes this error, mcpp displays this message followed by an expansion result.
    +
    +
  • Can't use a string literal "string"
    +A string literal is not allowed as a constant in a #if expression.
    +
    +
  • Can't use a character constant 'a'
    +In POSTSTD mode, a character constant, or a wide character constant is not allowed as a constant in a #if expression.
    +
    +
  • Can't use the operator "++"
    +A #if expression has an illegal operator, such as = or ++.
    +
    +
  • Not an integer "1.23"
    +Only integers, including character constants, are allowed as a constant in a #if expression.
    +
    +
  • Can't use the character 0x24
    +A #if expression contains an illegal character (code 0x24), which is not any of the preprocessing tokens: identifiers, operators, punctuators, string literals, character constants, and preprocessing numbers. (Control codes are excluded since they had been checked before.) +Even compiler-specific-builds for compiler systems that allow $ in an identifier disallow it depending options. +Of course, this is not checked in a skipped group.
    +
+

The following error messages are relevant to #if sizeof. Only pre-Standard mode issues this error.

+
    +
  • sizeof: Syntax error
    +A #if sizeof has a syntax error. This error is caused by an unbalanced parenthesis or missing arguments.
    +
    +
  • sizeof: No type specified
    +Like sizeof(*), the "type" of #if sizeof (type) is not specified. Note that sizeof ((*)()) is a valid syntax to determine the size of a pointer to a function.
    +
+ +

5.4.6. #if Expression Evaluation Errors

+

The following errors do not occur in a sub-expression whose evaluation is skipped. (mcpp invoked with the -W8 option issues a warning.)

+

The Standards say that #if expression is evaluated by the largest integer type in C99 and long / unsigned long in C90 and in C++98. mcpp evaluate it by long long / unsigned long long even if in C90 or C++98, and issues a warning on the value outside of long / unsigned long in C90 and in C++98. In this subsection, please read the following long long / unsigned long long as long / unsigned long for the compiler without long long, and as long in pre-Standard mode. In POSTSTD mode, character constant in #if expression is not available and causes a different error.

+
    +
  • Constant "123456789012345678901" is out of range
    +An integer constant has a value that exceeded the range of unsigned long long.
    +
    +
  • Integer character constant 'abcdefghi' is out of range
    +A character constant 'abcdefghi' has a value that exceeded the range of unsigned long long.
    +
    +
  • Wide character constant L'abcde' is out of range
    +A wide character constant L'abcde' has a value that exceeded the range of unsigned long long. This error occurs only in STD mode.
    +
    +
  • 8 bits can't represent escape sequence 'x123'
    +An escape sequence in a character constant has exceeded the range of 8 bits ([0, 0xFF]).
    +
    +
  • 16 bits can't represent escape sequence L'x12345'
    +An escape sequence in a wide character constant has exceeded the range of 16 bits (32 bits for UTF-8). This error occurs only in STD mode.
    +
    +
  • Division by zero
    +A #if expression contains a division by zero. A division can be expressed using / or %. This error may be caused by a #if dividend/divisor with the divisor not defined as a macro. To avoid this error, "#if defined divisor && (dividend/divisor ..)" is recommended.
    +
    +
  • Result of "op" is out of range
    +An operation result using the operator op is out of range of (unsigned) long long. Op is any of binary operators: *, /, %, +, and -. When two's complement representation is used, the unary operator '-' will cause an overflow with -LLONG_MIN. Unsigned long long will never cause an overflow, so it does not cause this error. If the result of an algebraic calculation is out of range, a warning is issued.
    +
+

The following errors are relevant to sizeof. They are not issued in a sub-expression whose evaluation is skipped (The -W8 option issues a warning). Only in pre-Standard mode.

+
    +
  • sizeof: Unknown type "type"
    +The "type" of #if sizeof (type) is unknown.
    +
    +
  • sizeof: Illegal type combination with "type"
    +A type combination, like #if sizeof (long float), is invalid.
    +
+ +

5.4.7. #define Related Errors

+

This section covers #define related errors. A macro will not be defined if an error occurs at #define. The # and ## operator related errors occurs in Standard mode. __VA_ARGS__ related errors also occur in Standard mode. Although variable argument macro is a C99 specification, mcpp allows these macros to be used in C90 and C++ modes for compatibility with GCC and Visual C++ 2005, 2008. (A warning is issued.)

+
    +
  • "defined" shouldn't be defined
    +A macro named "defined" cannot be defined. Standard mode checks this.
    +
    +
  • "__STDC__" shouldn't be redefined
    +The __STDC__ macro cannot be #defined. The same can be said with __STDC_VERSION__, __FILE__, __LINE__, __DATE__ and __TIME__ (__STDC_HOSTED__ in C99 mode, and __cplusplus when mcpp is invoked with -+ option). Standard mode checks these macros.
    +
    +
  • "__VA_ARGS__" shouldn't be defined
    +C99 allows a variable argument macro with the __VA_ARGS__ parameter in the replacement list, but this identifier cannot be defined as a macro.
    +
    +
  • More than NMACPARS parameters
    +The number of parameters of a macro definition has exceeded NMACPARS.
    +
    +
  • Empty parameter
    +A macro definition has an empty parameter.
    +
    +
  • Illegal parameter "123"
    +A token other than an identifier is used in a parameter of a macro definition. In Standard mode, even an identifier __VA_ARGS__ cannot be used.
    +
    +
  • Duplicate parameter name "a"
    +A macro definition has a duplicate parameter name "a".
    +
    +
  • Missing "," or ")" in parameter list "(a,b"
    +A macro definition does not have a parenthesis ")" that closes a parameter list. Or, a parameter is followed by neither ',' nor ')'.
    +
    +
  • No token before ##
    +No token precedes the ## operator in the replacement list of a macro definition.
    +
    +
  • No token after ##
    +No token follows the ## operator in the replacement list of a macro definition.
    +
    +
  • ## after ##
    +The replacement list of a macro definition has a token sequence of "## ##". Some may do not regard this as error, but since concatenation of ## with other token always generates an invalid token, when this happens in macro expansion, it always causes an error. mcpp makes it an error when it finds this in a macro definition.
    +
    +
  • Not a formal parameter "id"
    +A function-like macro definition has a # operator whose operand id is not a parameter name.
    +
    +
  • "..." isn't the last parameter
    +"..." must be the last parameter of a macro definition. In pre-Standard mode, "..." causes an illegal parameter error.
    +
    +
  • "__VA_ARGS__" without corresponding "..."
    +"__VA_ARGS__", an identifier in a replacement list, can be used only when it has a corresponding "..." parameter.
    +
+

In STD mode of GCC-specific-build, if you write GCC2-spec variadic using __VA_ARGS__, you will get this error. +__VA_ARGS__ should be used only in GCC3-spec or C99-spec variadic.

+
    +
  • __VA_ARGS__ cannot be used in GCC2-spec variadic macro
    +
+ +

5.4.8. #undef Related Errors

+

This section covers #undef related errors.

+
    +
  • "__STDC__" shouldn't be undefined
    +The __STDC__ macro cannot be #undefined. The same can be said with __STDC_VERSION__, __FILE__, __LINE__, __DATE__ and __TIME__ (__STDC_HOSTED__ in C99 mode, and __cplusplus when invoked with -+ option). Standard mode checks these macros.
    +
+ +

5.4.9. Macro Expansion Errors

+

This section covers macro expansion errors. mcpp displays a macro definition, as well as the source filename and line number where it is found. The errors related to # or ## operator can occur only in Standard mode.

+
    +
  • Less than necessary N argument (s) in macro call "macro( a)"
    +A macro invocation has an insufficient number of arguments. This macro requires N number of arguments. mcpp assigns a zero token to missing arguments and continues to process. mcpp does not regard a macro that takes only one parameter with zero number of arguments specified as error because it cannot distinguish an empty argument from a missing argument. OLDPREP mode issues a warning instead of an error on this case.
    +
    +
  • More than necessary N argument (s) in macro call "macro( a, b, c)"
    +A macro invocation has too many arguments. The macro should take N number of arguments. mcpp ignores surplus arguments and continues processing. In OLDPREP mode, a warning is issued instead of an error.
    +
    +
  • Not a valid preprocessing token "+12"
    +The ## operator has concatenated two pp-tokens, resulting in an invalid token "+12". The token may be separated at a later time. Standard mode continues processing. STD mode invoked with the -lang-asm (-x assembler-with-cpp, -a) option also issues a warning instead of an error.
    +
    +
  • Not a valid string literal "\\"str\""
    +When a # operator tried to convert macro invocation's argument into a string, a token sequence of "\\"str"" has resulted, instead of a single valid string literal. \ that precedes or follows the literal cause the error. (When STD mode tries to convert such an argument into a string, it may or may not cause an unterminated string literal error.) STD mode tries to continue processing but maybe an error occurs again in the compilation phase. This error can not occur in POSTSTD mode. (An unterminated string literal error may occur).
    +
+

When the following errors occur, the macro invocation will be skipped.

+
    +
  • Buffer overflow expanding macro "macro" at "something"
    +A buffer overflow has occurred at "something" during macro expansion. Divide the macro.
    +
    +
  • Unterminated macro call "macro( a, (b, c)"
    +A macro invocation is not terminated. This error usually occurs when a macro invocation on the directive line is not terminated at that line. In Standard mode, a macro in an argument is expanded before argument substitution, in which case the macro invocation must be terminated in the argument. In POSTSTD mode, a macro invocation unterminated in a replacement list also causes this error.
    +
    +
  • Rescanning macro "macro" more than RESCAN_LIMIT times at "something"
    +The depth of nested macros is so deep that the number of rescans has exceeded RESCAN_LIMIT at "something" during expansion. This error occurs only in Standard mode but it is quite rare.
    +
    +
  • Recursive macro definition of "macro" to "macro"
    +A macro definition is recursive. This error occurs only in pre-Standard mode. When the number of rescans has exceeded PRESTD_RESCAN_LIMIT, mcpp regards it as a recursive macro definition.
    +
+

The following errors can occur only with -K option in STD mode. +These errors mean that the macro is extremely complex and buffer for macro notification ran short. +Almost impossible to happen in real life.

+
    +
  • Too many magics nested in macro argument +
  • Too many nested macros in tracing MACRO +
+ +

5.4.10. #error and #assert

+
    +
  • #error
    +A #error directive has been executed. Following this message, the #error line is displayed. If an argument itself contains a token error, such as unterminated strings, #error is not executed. The only Standard mode has #error.
    +
    +
  • Preprocessing assertion failed:
    +A #assert directive has been executed. Following this message, #assert line arguments are displayed. If any of the arguments contains an error, mcpp regards assertion has failed. The only mcpp of other than GCC-specific-build in pre-Standard mode has #assert.
    +
+ +

5.4.11. Failure of #include

+
    +
  • Can't open include file "file-name"
    +This error occurs when a file to include does not exist. Probably, this is due to wrong spelling of the file name or an "include directory" should have been specified.
    +
+ +

5.4.12. Other Errors

+

The following two are checked when mcpp is invoked with the -V199901L option. The same thing can be said when mcpp is invoked with the -V199901L option in C++ mode.

+
    +
  • Operand of _Pragma() is not a string literal
    +The _Pragma() operator must take an argument of one string literal or wide string literal. +
  • _Pragma operator found in directive line
    +_Pragma() operator is an alternative to #pragma directive. +It cannot be used in a directive line. +
+
+ +

5.5. Warnings (Class 1)

+

A warning is issued when source, although syntactically correct, possibly contains some coding mistakes or has a portability problem. Warnings are divided into five classes: 1, 2, 4, 8, and 16. These classes are enabled when the -W <n> option is specified on mcpp invocation. <n> specifies a ORed value of any of 1, 2, 4, 8, and 16. Class 4, for example, can be specified explicitly with -W4, and implicitly with -W<n>, where <n> is 1|4, 1|2|4, 2|4, 1|4|8, 4|8, 4|16, etc., because the AND-ed value of <n> and 4 is 4 (non-0).

+

Standard mode issues an error message to most of the source code that causes a Standard C undefined behavior, but a warning to some.

+

Likewise, Standard mode always issues a warning to the source code which uses Standard C unspecified specifications, except for the following:

+
    +
  1. Evaluation order of sub-expressions in a #if expression: Although the evaluation order of the operands of operators other than ||, &&, ? , and : is unspecified in Standard C, mcpp does not issue a warning because #if expression does not cause side-effects and therefore the evaluation order does not affect results. mcpp always evaluates integer constant tokens from left to right in the order they appear and performs an operation in accordance with an operator grouping rule when their values are needed. +
+

Standard mode issues a warning to many implementation-defined behaviors, except for the following:

+
    +
  1. Directories the #include directive searches for a file to include and how to construct a header-name pp-token from #include's argument: mcpp does not issue a warning because there will be too many warnings if it actually does. Unless a header name is a macro, the source token sequence, including spaces, are used as it is. If it is a macro, the expanded result, including spaces, is used. (In POSTSTD mode, a space character is inserted between pp-tokens during macro expansion. A header-name is constructed by concatenating the resulting pp-tokens from < to > and then by removing space characters. Anyway, in POSTSTD, a header-name enclosed with < and > is obsolete.) When mcpp encounters '#pragma MCPP debug path' or '#debug path', it displays a search path, instead of issuing a warning.
    +
    +
  2. Evaluation of a single byte character constant, such as 'a', and of a wide character constant that consists of only one multi-byte character, such as L'X', in a #if expression.: mcpp does not issue a warning because even with the same basic character set used, there are an unlimited number of factors that limits the portability, such as single byte Katakana, presence or absence of a sign, encoding scheme of Kanji, and etc. The same thing can be said with UCN.
    +
    +
  3. Bit operations using negative numbers in a #if expression: Although bit operation results depend on internal representation of an integer on a machine, most of the machines use two's complement representation, thus causing no portability problem. However, mcpp issues a warning to a right bit shift operation of a negative value and a division operation involving either or both of negative operands because they lack of portability.
    +
    +
  4. A sequence of several white space characters as a token separator: Standard C states that it is implementation-defined whether a sequence of white space characters is replaced by one space character in the translation phase 3, but you do not have to worry about this. Portability becomes an issue only when a preprocessing directive line has <vertical-tab> or <form-feed>. mcpp converts it into one space character and issues a warning. For a sequence of several space characters and tabs, mcpp compresses it into one space character without a warning.
    +
    +
  5. Compiler system's own built-in macros will not cause warning.
    +
    +
  6. #pragma sub-directive: Principally, mcpp does not issue a warning to #pragma sub-directive, however, for #pragma once, #pragma __setlocale, #pragma MCPP * which mcpp itself processes, it issues a warning if they have an invalid argument. In addition, mcpp issues a warning to GCC V.3's #pragmas, such as #pragma GCC poison (dependency), that resident preprocessor processes but mcpp does not.
    +
    +
  7. Doubled \: Although it is implementation-defined in C99 whether a single \ is changed into double \ (\\) when the # operator converts a UCN sequence into a string, mcpp does not issue a warning to this. mcpp does not double \.
    +
+

As you see, mcpp can perform almost all the portability checks necessary at a preprocessing level.

+

POSTSTD mode is identical with STD mode except for some specification differences described in section 2.1.

+

Regardless of the number of warnings, mcpp always returns a status of success. mcpp invoked with the -W0 option does not issue a warning.

+ +

5.5.1. Character, Token and Comment Related Warnings

+
    +
  • Converted [CR+LF] to [LF]
    +Converted the newline code from [CR+LF] to [LF]. This warning is issued when the source file for Windows is compiled on UNIX-like systems. This warning is issued only once, on warning level of class 1 in compiler-independent-build and class 2 in compiler-specific-build.
    +
    +
  • Illegal control character 0x1b in quotation
    +A string literal, character constant or header name has a control code other than a white space character, which may cause an error in the compiler-proper. This way of coding is not desirable. A control code in string literals or character constants should be written using an escape sequence.
    +
    +
  • Illegal multi-byte character sequence "XY" in quotation
    +The first byte (X) of "XY" in a string literal, character constant or header name is the first byte of a multi-byte character (Kanji), while the second byte (Y) is not the second byte of a multi-byte character. "XY" may be displayed garbled. mcpp does not regard "XY" as a single multi-byte character. It treats the first byte as a single-byte character and the second byte as the next character.
    +
    +mcpp usually does not issue a warning to a character in an external character set, as long as it is within the proper range. Even within the proper range, there are some holes (no corresponding characters). mcpp does not check whether such a character is defined or not. The following table shows the range of each multi-byte character set:
    +
    + + + + + + + + +
    Encoding first byte second byte
    shift-JIS 0x81-0x9f, 0xe0-0xfc0x40-0x7e, 0x80-0xfc
    EUC-JP 0x8e, 0xa1-0xfe 0xa1-0xfe
    KS C 5601 0xa1-0xfe 0xa1-0xfe
    GB 2312-80 0xa1-0xfe 0xa1-0xfe
    Big Five 0xa1-0xfe 0x40-0x7e, 0xa1-0xfe
    ISO-2022-JP0x21-0x7e 0x21-0x7e
    +
    +Beside character codes, ISO-2022-JP has a shift sequence. Apart from the shift sequence, all the multi-byte characters other than UTF-8 are two bytes length.
    +
    +In UTF-8, multi-byte characters are mostly 2 or 3 bytes, and possibly 4 bytes length. +Most of kanji are encoded in 3 bytes. +The first byte is within the range of 0xc2 to 0xef, second, third and fourth 0x80 to 0xbf. +Details are omitted here. +Anyway, all the bytes must fall within these ranges. +In addition, there are some illegal sequences even in these ranges: mcpp warns at those sequences.
    +
    +Note that since mcpp is unable to recognize EUC-JP's three byte encoding (JIS X 0213), it regards 0x8f + 0xa1-0xfe + 0xa1-0xfe not as one character but as two characters of 0x8f and 0xa1-0xfe + 0xa1-0xfe. As a result, mcpp does not issue a warning to the three byte encoding and can evaluate it correctly, except for a wide character constant in a #if expression. In EUC-JP, a character with the first byte of 0x8e (a half-width Katakana) is encoded in two bytes, and treated as a multi-byte character.
    +
    +This warning is not issued in a skipped #if group.
    +
    +
  • "/*" in comment
    +A comment has a sequence of /*. Unless it is intended, the programmer may have forgot to enclose the comment. Comments cannot be nested.
    +
    +
  • Too long identifier, truncated to "very_long_identifier"
    +Since the length of an identifier has exceeded IDMAX, it is truncated to IDMAX.
    +
    +
  • Illegal digit in octal number "089"
    +An octal numeric token contains 8 or 9. The only pre-Standard mode issues this warning. Standard mode does not check whether a numerical token on lines other than #if directives is correct or not. If a #if expression has an octal numeric token of 8 or 9, it will cause a "Not an integer" error.
    +
    +
  • Unterminated string literal, catenated to the next line
    +Although an unterminated string literal in a logical line is normally regarded as an error, mcpp invoked with the -lang-asm (-x assembler-with-cpp, -a) option regards it as a multi-line string literal and concatenates the line with the next by inserting '\n'. This way of writing has no advantage. Using a functionality to concatenate adjacent string literals is preferable.
    +
  • Unterminated character constant 't understand.
    +mcpp in lang-asm mode does not regard this an error.
    +
  • Empty character constant ''
    +A character constant is empty. +In lang-asm mode, mcpp only issues a warning.
    +
+ +

5.5.2. Unterminated Source File Related Warnings

+

On unterminated line or comments, the following messages are issued. OLDPREP mode does not issue warning.

+
    +
  • End of file with no newline, supplemented newline
    +A file must be terminated with a newline. mcpp supplements the line with <newline>.
    +
    +
  • End of file with \, deleted the \
    +A file must not be terminated with <backslash><newline>. mcpp deletes the <backslash>.
    +
    +
  • End of file with unterminated comment, terminated the comment
    +A comment is not terminated. mcpp terminates the comment.
    +
+

The following warning messages are issued in pre-Standard mode. Pre-Standard mode ignores these warnings to continue processing until it reaches the end of input, causing many unexpected results. Standard mode issues an error. OLDPREP mode does not issue even warning, except on unterminated macro.

+
    +
  • End of file within #if (#ifdef) section starting from line 123
    +
    +
  • End of file within macro invocation starting from line 123
    +
    +
  • End of file with unterminated #asm block starting from line 123
    +#asm on the line 123 does not have a corresponding #endasm.
    +
+ +

5.5.3. Directive Line Related Warnings

+
    +
  • The macro is redefined
    +mcpp displays this message followed by the source filename and line number where this macro definition is found.
    +The macro has been redefined with a different content. Source must not be well organized. The following conditions must be met for macro definitions with the same name to exist. Or, the new definition is regarded as a redefinition, and a warning is issued.
    +
    +
      +
    1. Have the same number of parameters.
      +
    2. Have the same replacement list. (One or more white space character between tokens are regarded as one. In POSTSTD, the difference of the token separators does not matter because any number of space characters is changed into one, regardless of the presence or absence of the token separators.)
      +
    3. In Standard mode, parameter names must be the same. In POSTSTD mode and in pre-Standard mode, they are not checked.
      +
      +
    +
  • Unknown argument "name"
    +There is no such an argument of '#pragma MCPP debug' or '#debug' as "name".
    +
  • No argument
    +A '#pragma MCPP debug' or '#debug' does not have an argument.
    +
  • Not an identifier "123"
    +The argument of a '#pragma MCPP debug' or '#debug' is not an identifier.
    +
+

The following message is issued only in Standard mode.

+
    +
  • "and" is defined as macro
    +"and" is defined as a macro in C++.
    +Whereas in C95 "and" or other 11 names are defined as macros by <iso646.h>, those are operator tokens in C++,
    +
+

The following message is issued only in STD mode.

+
    +
  • No space between macro name "MACRO" and repl-text
    +There is no space between macro name and replacement list of a #define line. Normally, this does not happen, but it does happens when an illegal character is used in a macro name as follows:
    +
    +#define THIS$AND$THAT(a, b)   ((a) + (b))
    +
    +mcpp interprets this as follows:
    +
    +#define THIS  $AND$THAT(a, b) ((a) + (b))
    +
    +and issues a warning. Of course, this is a quite rare case.
    +
+

The following warnings are issued only in lang-asm mode.

+
    +
  • Illegal #directive "+" +
  • Unknown #directive "pseudo-directive"
    +Though these are usually errors, lang-asm mode issues only warnings.
    +
+

The following warnings on #pragma line are issued only in Standard mode. +The lines are outputted in principle in spite of the warnings. +However, the lines to be processed by preprocessor such as most of the lines starting with #pragma MCPP or #pragma GCC are not outputted. +The pragmas for compiler or linker such as #pragma GCC visibility * are outputted without warning.

+
    +
  • No sub-directive
    +A #pragma line does not have any argument. The line is ignored.
    +
    +
  • Unknown encoding "encoding"
    +The encoding name, "encoding", specified with #pragma __setlocale( "encoding") is not implemented. For the encoding name, refer to 2.8.
    +
    +
  • Too long encoding name "encoding"
    +The encoding name, "long-long-encoding", specified with #pragma __setlocale( "long-long-encoding") exceeds 19 bytes. mcpp ignores it.
    +
    +
  • Bad push_macro syntax
    +
  • Bad pop_macro syntax
    +There is a syntax error in #pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro or #pragma pop_macro. To use these #pragma directives, first enclose a macro name in an argument with ", " and then further enclose with ( ). For example, ("MACRO"). (A redundant specification for compatibility with Visual C.)
    +
    +
  • "MACRO" has not been defined
    +MACRO in the argument,("MACRO"), for #pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro, or #pragma pop_macro is not defined as a macro.
    +
  • "MACRO" is already pushed
    +MACRO of #pragma MCPP push_macro ("MACRO") has been pushed and then further #undef-ed. Without redefining the MACRO, push would not be possible.
    +
  • "MACRO" has not been pushed
    +MACRO in #pragma MCPP pop_macro( "MACRO") has not been pushed. It may have been already popped.
    +
+

The GCC-specific-build issues the following warnings:

+
    +
  • Ignored #ident
    +
  • Ignored #sccs
    +#ident or #sccs lines are ignored.
    +
+

GCC-specific-build issues a Class 2 warning to a line with #pragma GCC followed by either poison or dependency and does not output the line. GCC V.3 resident preprocessor process the line but mcpp does not.

+

The following warnings are issued only in pre-Standard mode. Standard mode regards them as errors.

+
    +
  • Not in a #if (#ifdef) section in a source file
    +
  • Line number "0x123" isn't a decimal digit sequence
    +
+

KR mode issues the following warning. Standard mode issues the same warning only to #pragma once, #pragma MCPP put_defines, #pragma MCPP push_macro, #pragma MCPP pop_macro, #pragma push_macro, #pragma pop_macro, #pragma MCPP debug, #pragma MCPP end_debug, and #endif for GCC-specific-build on STD mode; for other directives, Standard mode issues an error. OLDPREP mode issues neither an error nor a warning.

+
    +
  • Excessive token sequence "junk"
    +
+ +

5.5.4. #if Expression Related Warnings

+

The following three warnings are relevant to an argument of #if, #elif, or #assert:

+
    +
  • Macro "MACRO" is expanded to "defined"
    +The macro MACRO in a #if expression has been expanded to "defined". mcpp treats this strange macro not as identifier but as operator. How to treat it is undefined in Standard C.
    +
    +
  • Macro "MACRO" is expanded to "sizeof"
    +The macro MACRO in a #if expression has been expanded to sizeof. mcpp treats this strange macro not as identifier but as operator. Pre-Standard mode issues this warning.
    +
    +
  • Macro "MACRO" is expanded to 0 token
    +The macro MACRO has been expanded to zero token. If this happens in a #if expression, it almost always causes an error. The purpose of this warning is to indicate the cause of an error.
    +
+

The followings warnings are also relevant to an argument of #if, #elif or #assert. They are not issued in a sub-expression whose evaluation is skipped. (mcpp invoked with the -W8 option issues them.)

+
    +
  • Undefined escape sequence '\x'
    +There is no such escape sequence as \x. \x is evaluated to a two byte sequence. (Of course, an escape sequence of "\x" followed by a hex string is valid.) This warning is also issued to a UCN with an insufficient number of orders.
    +
+

The followings warnings are relevant to operations and types in a constant expression on #if, #elif or #assert lines. No warnings are also issued in a skipped sub-expression. (mcpp invoked with -W8 issues them.)

+

mcpp evaluate #if expression by long long / unsigned long long even if in C90 or C++98, and issues a warning on the value outside of long / unsigned long in C90 and in C++98. Also on LL suffix in other than C99, mcpp issues a warning. These warnings are of class 1 in compiler-independent-build and class 2 in compiler-specific-build. In POSTSTD mode, character constants are not used in #if expression, hence no warning is issued. (Those make errors.)

+
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +An integer constant has a value that exceeded the range of unsigned long.
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +A character constant 'abcde' has a value that exceeded the range of unsigned long.
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +A wide character constant L'abc' has a value that exceeded the range of unsigned long. This error occurs only in STD mode.
    +
  • Result of "op" is out of range of (unsigned) long
    +An operation result using the operator op is out of range of (unsigned) long. Op is any of binary operators: *, /, %, +, and -. When two's complement representation is used, the unary operator '-' will cause an overflow with -LONG_MIN. Unsigned long will never cause an overflow, so it does not cause an error. If the result of an algebraic calculation is out of range, a warning is issued.
    +
  • LL suffix is used in other than C99 mode "123LL"
    +LL suffix is used for an integer in other than C99 mode.
    +
  • Shift count "40" is larger than bit count of long
    +The value of the right operand of a bit shift operator, << or >>, exceeds the bit count of long.
    +
    +
  • Negative value "-1" is converted to positive "18446744073709551615"
    +A mixture of signed and unsigned operations results in conversion of a signed negative value into an unsigned positive value. This is not an error, but indicates source code may contain a bug. For both operands of a binary operator, such as *, /, %, +, -, <, >, <=, >=, ==, !=, &, ^ and | , and the second and third operands of a ternary operator, ? and :, if one operand is unsigned and the other is signed, the signed one is always converted into unsigned.
    +
    +
  • Illegal shift count "-1"
    +The value of the right operand of a bit shift operator, << or >>, is a negative number or exceeds the bit count of long long. Probably, this is also a bug in source code.
    +
    +
  • "op" of negative number isn't portable
    +If an operation using a binary operator (op) results in either or both of negative operands, it lacks of portability. "Op" is any of /, %, and >>. The >> operator with a negative left operand provides portability across compiler systems on computers having an arithmetic shift command, where a one-bit shift means a division by 2. Otherwise, it does not provide portability.
    +
+ +

5.5.5. Macro Expansion Related Warnings

+

In these warnings, mcpp displays a macro definition followed by the source filename and line number where the macro is defined.

+
    +
  • Macro started at line 123 swallowed directive-like line
    +mcpp has read a line that begins with # as an argument of the macro that begins at the line 123. Maybe, the macro invocation has a bug. If it had not been for the macro, the line that begins with # would have been interpreted as a directive line. The same thing could be said if the macro had been located in a #if group whose evaluation is skipped, and the line is treated as a directive, because such macro is never expanded.
    +
    +
  • Replacement text "sub(" of macro "head" involved subsequent text
    +Rescanning of the replacement list "sub(" of the macro "head" has involved the text succeeding the macro invocation. K&R 1st to Standard C did not regard this as an error, but if you used this type of macro without having these standards in mind to receive this warning, your macro definition or macro invocation is probably not correct. If you are intended to use such macro, it is an unusual macro. The only STD mode issues this warning. COMPAT mode issues this warning only on class 8. In pre-Standard mode, the same situation may arise but no warning is issued. POSTSTD mode never issues this warning because rescanning does not involve the text succeeding the replacement list. (A macro may be expanded quite differently or causes an "unterminated macro call" error.)
    +
    +
  • Less than necessary N argument (s) in macro call "macro( a)"
    +An insufficient number of arguments of a macro invocation. Normally, this causes an error, but in case of missing only one argument of a macro that takes a variable number of arguments, mcpp issues a warning. This is to decrease migration problems of variable argument macros between GCC and C99.
    +
    +
  • Removed ',' preceding the absent variable argument
    +Since variable argument is absent and the replacement list has a sequence ", ## __VA_ARGS__", removed the comma immediately preceding "## __VA_ARGS__". +This warning is issued only in Standard mode of GCC-specific-build.
    +
    +
  • Old style predefined macro "linux" is used
    +The non-conforming predefined macro without leading '_' is used. +This warning is only on Standard mode of GCC-specific-build.
    +
+

The following two are issued only in OLDPREP mode. (In other mode it causes an error.) +

    +
  • Less than necessary N argument(s) in macro call "macro( a)"
  • More than necessary N argument(s) in macro call "macro( a, b, c)"
    +
+ +

5.5.6. Line Number Related Warnings

+

This section covers line number related warnings.

+
    +
  • Line number "32768" is out of range of [1,32767]
    +In C90 and C++, the first argument of a #line must be within the range of 1 to 32767. 0 is also out of range. With __STDC_VERSION__ >= 199901L or __cplusplus >= 199901L, the valid range is 1 to 2147483647. Therefore, in C90 or C++ mode, mcpp issues a warning, not an error, to the range of 32768 to 2147483647. Standard mode issues this warning.
    +
+

In C90, when you use #line to specify a value slightly below 32767, you won't receive an error, but sooner or later, the line number will exceed 32767, in which case, mcpp continues to increase the line number while issuing a warning. Some compiler-proper may not accept this large line number. It is not desirable to specify a large number with #line.

+
    +
  • Line number 32768 got beyond range
    +The source line number has reached 32768, at which a warning is issued one time.
    +
    +
  • Line number 32769 is out of range
    +When the __LINE__ macro is expanded, the lime number has exceeded 32767.
    +
+ +

5.5.7. #pragma MCPP warning, #warning

+
    +
  • #warning
    +
  • #pragma MCPP warning
    +A #pragma MCPP warning (#warning) directive has been executed. Following the above message, the line is displayed. (If an argument of #pragma MCPP warning has a token error, such as unterminated string, #pragma MCPP warning is not executed.) Although this directive appears in the Warning Level 1 section, this warning is issued at every warning level. Standard mode has #pragma MCPP warning, while pre-Standard mode has #warning.
    +
+
+ +

5.6. Warnings (Class 2)

+

This section covers warnings to code that does not contains a bug but causes a portability problem.

+
    +
  • Converted [CR+LF] to [LF]
    +Converted the newline code from [CR+LF] to [LF]. This warning is issued on warning level of class 1 in compiler-independent-build and class 2 in compiler-specific-build.
    +
+

mcpp evaluate #if expression by long long / unsigned long long even if in C90 or C++98, and issues a warning on the value outside of long / unsigned long in C90 and in C++98. Also LL suffix in other than C99 mode gets a warning as well as i64 suffix of compiler-specific-builds for Visual C and Borland C. These warnings are of class 1 in compiler-independent-build and class 2 in compiler-specific-build.

+
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +
  • Result of "op" is out of range of (unsigned) long
    +
  • LL suffix is used in other than C99 mode "123LL"
    +
  • I64 suffix is used in other than C99 mode "123i64"
    +
  • Shift count "40" is larger than bit count of long
    +
+

Only the Standard mode issues the following five warnings:

+
    +
  • Parsed "//" as comment
    +A text from // to the end of the line is interpreted as a comment. This is a legal notation in C99 and C++. In C90 mode mcpp treats it as a comment after issuing a warning.
    +
    +
  • Variable argument macro is defined
    +Although it is the C99 Standard that stipulates variable argument macros, a variable argument macro has been defined in C90 or C++ mode.
    +
    +
  • Empty argument in macro call "MACRO( a, ,"
    +A macro invocation has an empty argument, in which case, mcpp regards the argument as zero number of pp-token sequences and treats it as such. The empty argument is legal in C99, while it is undefined in C90, thus causing a lack of portability. (mcpp regards an empty argument even without a ',' not as an empty argument, but as a missing argument, thus issuing an error. Since zero number of arguments and one empty argument is syntactically indistinguishable, mcpp does not make both an error.) Writing an empty argument in source code is not generally preferable. I recommend that you should code:
    +
    +#define EMPTY
    +
    +, if possible, and then write EMPTY where an empty argument is written.
    +
    +
  • Skipped the #pragma line
    +GCC V.3 provides several #pragma directives in the form of #pragma GCC <args>. Its preprocessor processes some of them, but mcpp does not support #pragma GCC poison and #pragma GCC dependency. This warning is issued to a #pragma directive compiler-specific preprocessors process but mcpp does not.
    +
    +
  • Not a valid preprocessing token "+12"
    +Concatenating two pp-tokens with the ## operator results in an invalid token "+12", which normally causes an error. However, mcpp invoked with the -lang-asm (-x assembler-with-cpp, -a) option does not regard it as an error.
    +
+

The following warning is issued only in POSTSTD mode.

+
    +
  • Header-name enclosed by <, > is an obsolescent feature <stdio.h>
    +The header name in the form of <stdio.h> is one of the specifications I want to abolish. I recommend to use "stdio.h".
    +
+

The following two warnings are issued only in some compiler systems. Of course, the coding in question is valid in those particular systems, but it lacks of portability, so a warning is issued to remind users of it.

+
    +
  • #include_next is not allowed by Standard
    +
  • #warning is not allowed by Standard
    +These directives are valid in GCC but not Standard C-conforming and lack of portability.
    +
  • GCC2-spec variadic macro is defined
    +Though GCC2-spec variadic macro is valid in GCC-specific-build, this macro is not portable.
    +
    +
  • Converted to /
    +A #include directive contains \ in the header name. mcpp converts \ into /. "\" is a valid path delimiter in OSs, such as Windows, but undefined in Standard C. It is safe to use /. mcpp on Windows issues this warning only once. (mcpp does not regard " preceded by \ as a delimiter of a string literal, raising an "unterminated string literal" error.)
    +
    +
  • '$' in identifier "THIS$AND$THAT"
    +An identifier has a '$'. The only mcpp compiled with DOLLAR_IN_NAME set to TRUE issues this warning only once because '$' lacks of portability although it is valid in this mcpp. '$' being regarded as a pp-token, other mcpp parses THIS$AND$THAT into five components THIS, $, AND, $ and THAT, resulting in a compiler error.
    +
+
+ +

5.7. Warnings (Class 4)

+

Standard C guarantees some minimum translation limits. It is desirable that a preprocessor imposes translation limits that exceed these values, but source programs that uses preprocessor' own translation limits will restrict portability. mcpp provides some macros in "system.H" that allows you to set translation limits to any values you like. mcpp in Standard mode issues a warning to source code that exceeds a Standard C guaranteed limit. However, these messages are excluded from Class 1 and 2 because they may be issued frequently, depending on standard headers of compiler systems or source programs.

+
    +
  • Logical source line longer than 509 bytes
    +The length of a logical source line has exceeded 509 bytes.
    +
    +
  • Quotation longer than 509 bytes "very_very_long_string"
    +The length of a string literal, character constant or header name has exceeded 509 bytes.
    +
    +
  • More than 8 nesting of #include
    +The depth of nested #includes has exceeded 8. This warning is issued only when it reaches 9.
    +
    +
  • More than 8 nesting of #if (#ifdef) sections
    +The depth of nested #ifs, #ifdefs, or #ifndefs has exceeded 8. This warning is issued only when it reaches 9.
    +
    +
  • More than 1024 macros defined
    +The number of defined macros has reached 1024. This number includes both of pre-defined macros and those defined in header files.
    +
    +
  • String literal longer than 509 bytes "very_very_long_string"
    +Expansion of a macro using the # operator has generated a string literal longer than 509 bytes.
    +
+

The following warnings are not issued in a skipped #if group.

+
    +
  • More than 32 nesting of parens in #if expression
    +The depth of nested parentheses in a #if expression has exceeded 32. This warning is issued only when it reaches 33.
    +
    +
  • More than 31 parameters
    +The number of parameters of a macro definition has exceeded 31.
    +
    +
  • Identifier longer than 31 bytes "very_very_long_name"
    +The length of an identifier has exceeded 31 bytes.
    +
+

With __STDC_VERSION__ >= 199901L, the Standard specified translation limits are as follows:

+
+ + + + + + + + + +
Length of logical source line 4095 bytes
Length of string literal, character constant, or header name4095 bytes
Identifier length 63 characters
Depth of nested #includes 15
Depth of nested #ifs, #ifdefs, or #ifndefs 63
Depth of nested parentheses in #if expression 63
Number of macro parameters 127
Number of definable macros 4095
+
+

Note that the length of a UCN or multi-byte-character in an identifier is counted as the number of characters, not bytes. (A queer stipulation)

+

When mcpp is invoked with the -+ option to specify C++ preprocessing, the Standard guideline of translation limits are as follows:

+
+ + + + + + + + + +
Length of logical source line 65536 bytes
Length of string literal, character constant, or header name65536 bytes
Identifier length 1024 characters
Depth of nested #includes 256
Depth of nested #ifs, #ifdefs, or #ifndefs 256
Depth of nested parentheses in #if expression 256
Number of macro parameters 256
Number of definable macros 65536
+
+

Note that mcpp allows the maximum number of macro parameters of 255. So, when it reaches 256, mcpp issues an error.

+

The following warnings are excluded from class 1 and 2 because they are issued too frequently.

+
    +
  • Converted 0x0c to a space
    +[FF], [VT], [CR] (other than in [CR][LF] sequence) in source code as token separators are converted into a space character. How to deal with these token separators located on a directive line is undefined in Standard C. If they are located in comments, string literals, or character constants, mcpp does not convert them. (Of course, mcpp can do so, but I do not want mcpp to impose a greater restriction on a character set used since it essentially depends on the compiler-proper.) On the other hand, [TAB] as a token separator is converted into a space character, but no warning is issued because it does not affect compilation at all. ([TAB] means nothing but a space to both of preprocessor and compiler-proper.) [FF] are found sometimes in actual source to indicate "end of page". This is not a recommendable style.
    +
    +
  • Undefined symbol
    +In #if line the identifier "name" is not defined as a macro. It is evaluated to zero. This is not an error at all, but may be a program bug. No warning is issued to an argument of a #if defined. This warning can be avoided by writing #if defined name && (name ..), instead of #if name .., or by invoking mcpp with the -D name=0 option. C++ gives "true" and "false" tokens special treatment and evaluates to 1 and 0, respectively, without a warning.
    +
    +
  • Multi-character wide character constant L'ab' isn't portable
    +A wide character constant value varies even among compiler systems using the same character set because the encoding scheme of wide character constants and how to evaluate multi-characters depend on compiler systems. Therefore, #if expressions using them do not provide portability. The only STD mode issues this warning. POSTSTD mode does not permit character literal in #if expression, so this causes an error. (The next item is also treated the same way.)
    +
    +
  • Multi-character or multi-byte character constant 'XY' isn't portable
    +Since how to evaluate the value of a multi-character or multi-byte character constant depends on compiler systems, #if expressions using them do not provide portability. The only STD mode issues this warning.
    +
+

The following two warnings are issued only in Standard mode.

+
    +
  • Macro with mixing of ## and # operators isn't portable
    +A function-like macro has a token sequence of "## #" in the replacement list. This sequence of two operators lack of portability because their priority is unspecified in Standard C. mcpp takes precedence # over ##. Note that if a function-like macro has a token sequence in the reverse order "# ##", mcpp regards it as an error because the operand of the # operator must be a parameter.
    +
    +
  • Macro with multiple ## operators isn't portable
    +A macro definition has only one token or parameter inserted between ## operators in the replacement list. This macro may lack of portability because the evaluation order of ## operators is unspecified in Standard C. mcpp applies the ## operator from left to right.
    +
+

This warning is only with -K option in STD mode.

+
    +
  • Too long comment, discarded up to here
    +The comment is longer than 256 lines, mcpp discards it up to here. +It is not a good style to include long document in source.
    +
+
+ +

5.8. Warnings (Class 8)

+

There is little chance that the indicated source code contains a bug, but these messages are issued to call attention to it. mcpp invoked with the -W8 option issues these warnings.

+

In a skipped #if group, whether preprocessing directives, such as #ifdef, #ifndef, #elif, #else, and #endif, are balanced or not is checked. However, mcpp invoked with the -W8 option also checks non-conforming or unknown directives. Standard mode issues a warning when the depth of nested #ifs exceeds 8.

+
    +
  • Illegal #directive "+" (in skipped block)
    +
  • Unknown #directive "pseudo-directive" (in skipped block)
    +
  • More than 8 nesting of #if (#ifdef) sections (in skipped block)
    +
  • #include_next is not allowed by Standard (in skipped block)
    +
  • #warning is not allowed by Standard (in skipped block)
    +
+

The following warnings are related to #if expression. Given an expression of #if a || b, for example, if "a" is true, "b" is not evaluated. However, mcpp invoked with -W8 issues a warning to non-evaluated sub-expressions, in which case, the note saying "in non-evaluated sub-expression" is appended.

+
    +
  • Constant "123456789012345678901" is out of range
    +
  • Constant "123456789012" is out of range of (unsigned) long
    +
  • LL suffix is used in other than C99 mode "123LL"
    +
  • I64 suffix is used in other than C99 mode "123i64"
    +
  • Shift count "40" is larger than bit count of long
    +
  • Integer character constant 'abcdefghi' is out of range
    +
  • Integer character constant 'abcde' is out of range of unsigned long
    +
  • Wide character constant L'abcdef' is out of range
    +
  • Wide character constant L'abc' is out of range of unsigned long
    +
  • 8 bits can't represent escape sequence 'x123'
    +
  • 16 bits can't represent escape sequence L'x12345'
    +
  • Division by zero
    +
  • Undefined symbol "name", evaluated to 0
    +
  • sizeof: Unknown type "type"
    +
  • sizeof: Illegal type combination with "type"
    +
  • Multi-character wide character constant L'ab' isn't portable
    +
  • Multi-character or multi-byte character constant 'XY' isn't portable
    +
  • Undefined escape sequence '\x'
    +
  • UCN cannot specify the value "0000007f"
    +
  • Negative value "-1" is converted to positive "18446744073709551615"
    +
  • Result of "op" is out of range
    +
  • Result of "op" is out of range of (unsigned) long
    +
  • Illegal shift count "-1"
    +
  • "op" of negative number isn't portable
    +
    +
  • sizeof is disallowed in C Standard
    +The purpose of this warning is to remind users of the fact that Standard C does not allow for #if sizeof, although pre-Standard mode implements it.
    +
    +
  • "MACRO" wasn't defined
    +An undefined name is specified with #undef. Standard C does not regard it as an error.
    +
    +
  • Macro "macro" needs arguments
    +A token with the same name as a macro with arguments appears in a stand alone manner. mcpp does not expand it and leave it as it is. The only pre-Standard mode issues this warning. (Standard mode does not issue a warning since such a token does not cause any problem.)
    +
    +
  • Replacement text "sub(" of macro "head" involved subsequent text
    +Rescanning of the replacement list "sub(" of the macro "head" has involved the text succeeding the macro invocation. COMPAT mode issues this warning only on class 8, whereas STD mode issues on class 1.
    +
+
+ +

5.9. Warnings (Class 16)

+

Trigraphs and digraphs are not used at all in an environment where they are not need to. If they are found in such an environment, attention needs to be paid. The purpose of the -W16 option is to find such trigraphs and digraphs. On the other hand, these warnings are very bothersome in an environment where trigraphs or digraphs are used on a regular basis because they are issued very frequently. For this reason, I set up a separate class for these warnings. Anyway, mcpp issues these messages only in the state where the trigraphs or digraphs are enabled. Digraph is for Standard mode only, and trigraph is for STD mode only.

+
    +
  • 2 trigraph(s) converted
    +Two trigraph sequences in this physical line have been converted. Does the programmer really intend to write trigraph?
    +
    +
  • 2 digraph(s) converted
    +Two digraph sequences in this line have been converted. Does the programmer really intend to write digraphs? mcpp compiled with HAVE_DIGRAPHS == FALSE in STD mode converts a digraph into a regular token in the following manner after preprocessing:
    +
    +<% -> {      <: -> [      %:    -> #
    +%> -> }      :> -> ]      %:%:  -> ##
    +
    +Therefore, the compiler-proper is not necessary to be able to handle digraphs. However, POSTSTD mode converts a digraph into a regular pp-token during the translation phase 1. The difference of this behavior between the modes appears when a # operator converts a digraph into a string; STD mode directly converts a digraph sequence into a string, while POSTSTD mode converts it into a regular pp-token, and then into a string. In addition, if a string literal contains a character sequence which is equivalent to a digraph sequence, STD mode does not convert it, while POSTSTD mode converts it into a character sequence of the corresponding pp-tokens.
    +
    +STD mode does not issue a warning to a digraph that appears on a preprocessing-directive line and disappears in a due course because this warning is issued only to converted digraphs.
    +
+
+ +

5.10. Diagnostic Messages Index

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Diagnostic MessageFatal
error
ErrorWarning class
124816
"..." isn't the last parameter5.4.7
"/*" in comment5.5.1
"and" is defined as macro5.5.3
"defined" shouldn't be defined5.4.7
"MACRO" has not been defined5.5.3
"MACRO" has not been pushed5.5.3
"MACRO" is already pushed5.5.3
"MACRO" wasn't defined5.8
"op" of negative number isn't portable5.5.45.8
"__STDC__" shouldn't be redefined5.4.7
"__STDC__" shouldn't be undefined5.4.8
"__VA_ARGS__" without corresponding "..."5.4.7
"__VA_ARGS__" cannot be used in GCC2-spec variadic macro5.4.7
## after ##5.4.7
#error5.4.10
#include_next is not allowed by Standard5.65.8
#warning5.5.7
'$' in identifier "THIS$AND$THAT"5.6
16 bits can't represent escape sequence L'\x12345'5.4.65.8
2 digraph(s) converted5.9
2 trigraph(s) converted5.9
8 bits can't represent escape sequence '\x123'5.4.65.8
_Pragma operator found in directive line5.4.12
Already seen #else at line 1235.4.3
Bad defined syntax5.4.5
Bad pop_macro syntax5.5.3
Bad push_macro syntax5.5.3
Buffer overflow expanding macro "macro" at "something"5.4.9
Buffer overflow scanning token "token"5.3.3
Bug:5.3.1
Can't open include file "file-name"5.4.11
Can't use a character constant 'a'5.4.5
Can't use a string literal "string"5.4.5
Can't use the character 0x245.4.5
Can't use the operator "++"5.4.5
Constant "123456789012" is out of range of (unsigned) long5.5.45.65.8
Constant "1234567890123456789012" is out of range5.4.65.8
Converted 0x0c to a space5.7
Converted [CR+LF] to [LF]5.5.15.6
Converted \ to /5.6
Division by zero5.4.65.8
Duplicate parameter names "a"5.4.7
Empty argument in macro call "MACRO( a, ,"5.6
Empty character constant ''5.4.15.5.1
Empty parameter5.4.7
End of file with no newline, supplemented the newline5.5.2
End of file with unterminated #asm block started at line 1235.4.25.5.2
End of file with unterminated comment, terminated the comment5.5.2
End of file with \, deleted the \5.5.2
End of file within #if (#ifdef) section started at line 1235.4.25.5.2
End of file within macro call started at line 1235.4.25.5.2
Excessive ")"5.4.5
Excessive token sequence "junk"5.4.45.5.3
File read error5.3.2
File write error5.3.2
GCC2-spec variadic macro is defined5.6
Header-name enclosed by <, > is an obsolescent feature 5.6
I64 suffix is used in other than C99 mode "123i64"5.65.8
Identifier longer than 31 bytes "very_very_long_name"5.7
Ignored #ident5.5.35.8
Ignored #sccs5.5.35.8
Illegal #directive "123"5.4.45.5.35.8
Illegal control character 0x1b in quotation5.5.1
Illegal control character 0x1b, skipped the character5.4.1
Illegal digit in octal number "089"5.5.1
Illegal multi-byte character sequence "XY" in quotation5.5.1
Illegal multi-byte character sequence "XY"5.4.1
Illegal parameter "123"5.4.7
Illegal shift count "-1"5.5.45.8
Illegal UCN sequence5.4.1
In #asm block started at line 1235.4.3
Integer character constant 'abcde' is out of range of unsigned long5.5.45.65.8
Integer character constant 'abcdefghi' is out of range5.4.65.8
Less than necessary N argument(s) in macro call "macro( a)"5.4.95.5.5
Line number "0x123" isn't a decimal digits sequence5.4.45.5.6
Line number "2147483648" is out of range of 1,21474836475.4.4
Line number "32768" got beyond range5.5.6
Line number "32768" is out of range of 1,327675.5.6
Line number "32769" is out of range5.5.6
LL suffix is used in other than C99 mode "123LL"5.5.45.65.8
Logical source line longer than 509 bytes5.7
Macro "MACRO" is expanded to "defined"5.5.4
Macro "MACRO" is expanded to "sizeof"5.5.4
Macro "MACRO" is expanded to 0 token5.5.4
Macro "macro" needs arguments5.8
Macro started at line 123 swallowed directive-like line5.5.5
Macro with mixing of ## and # operators isn't portable5.7
Macro with multiple ## operators isn't portable5.7
Misplaced ":", previous operator is "+"5.4.5
Misplaced constant "12"5.4.5
Missing ")"5.4.5
Missing "," or ")" in parameter list "(a,b"5.4.7
More than 1024 macros defined5.7
More than 31 parameters5.7
More than 32 nesting of parens in #if expression5.7
More than 8 nesting of #if (#ifdef) sections5.75.8
More than 8 nesting of #include5.7
More than BLK_NEST nesting of #if (#ifdef) sections5.3.3
More than INCLUDE_NEST nesting of #include5.3.3
More than necessary N argument(s) in macro call "macro( a, b, c)5.4.9
More than NEXP*2-1 constants stacked at "12"5.4.5
More than NEXP*3-1 operators and parens stacked at "+"5.4.5
More than NMACPARS parameters5.4.7
Multi-character or multi-byte character constant 'XY' isn't portable5.75.8
Multi-character wide character constant L'ab' isn't portable5.75.8
Negative value "-1" is converted to positive "18446744073709551615"5.5.45.8
No argument5.4.45.5.3
No header name5.4.4
No identifier5.4.4
No line number5.4.4
No space between macro name "MACRO" and repl-text5.5.3
No sub-directive5.5.3
No token after ##5.4.7
No token before ##5.4.7
Not a file name "name"5.4.4
Not a formal parameter "id"5.4.7
Not a header name "UNDEFINED_MACRO"5.4.4
Not a line number "name"5.4.4
Not a valid preprocessing token "+12"5.4.95.6
Not a valid string literal5.4.9
Not an identifier "123"5.4.45.5.3
Not an integer "1.23"5.4.5
Not in a #if (#ifdef) section5.4.3
Not in a #if (#ifdef) section in a source file5.4.35.5.3
Operand of _Pragma() is not a string literal5.4.12
Operator ">" in incorrect context5.4.5
Old style predefined macro "linux" is used5.5.5
Out of memory (required size is 0x1234 bytes)5.3.2
Parsed "//" as comment5.6
Preprocessing assertion failed5.4.10
Quotation longer than 509 bytes "very_very_long_string"5.7
Recursive macro definition of "macro" to "macro"5.4.9
Removed ',' preceding the absent variable argument5.5.5
Replacement text "sub(" of macro "head" involved subsequent text5.5.55.8
Rescanning macro "macro" more than RESCAN_LIMIT times at "something"5.4.9
Result of "op" is out of range5.4.65.8
Result of "op" is out of range of (unsigned) long5.5.45.65.8
Shift count "40" is larger than bit count of long5.5.45.65.8
sizeof is disallowed in C Standard5.8
sizeof: Illegal type combination with "type"5.4.65.8
sizeof: No type specified5.4.5
sizeof: Syntax error5.4.5
sizeof: Unknown type "type"5.4.65.8
Skipped the #pragma line5.6
String literal longer than 509 bytes "very_very_long_string"5.7
The macro is redefined5.5.4
This is not a preprocessed source5.3.4
This preprocessed file is corrupted5.3.4
Too long comment, discarded up to here5.7
Too long header name "long-file-name"5.3.3
Too long identifier, truncated to "very_long_identifier"5.5.1
Too long line spliced by comments5.3.3
Too long logical line5.3.3
Too long number token "12345678901234"5.3.3
Too long pp-number token "1234toolong"5.3.3
Too long quotation "long-string"5.3.3
Too long source line5.3.3
Too long token5.3.3
Too many magics nested in macro argument5.4.9
Too many nested macros in tracing MACRO5.4.9
UCN cannot specify the value "0000007f"5.4.15.8
Undefined escape sequence '\x'5.5.45.8
Undefined symbol "name", evaluated to 05.75.8
Unknown #directive "pseudo-directive"5.4.45.5.45.8
Unknown argument "name"5.5.3
Unterminated character constant 't understand.5.4.1
Unterminated expression5.4.5
Unterminated header name 5.4.1
Unterminated macro call "macro( a, (b,c)"5.4.9
Unterminated string literal5.4.1
Unterminated string literal, catenated to the next line5.5.1
Variable argument macro is defined5.6
Wide character constant L'abc' is out of range of unsigned long5.5.45.65.8
Wide character constant L'abc' is out of range5.4.65.8

+
+ +

6. Reporting on Bugs and Others

+ +

I have developed the Validation Suite to verify conformance of preprocessing to Standard C/C++, and released it along with mcpp source. The Validation Suite is intended to allow you to verify all the Standard C preprocessing specifications. Of course, I used the Validation Suite to check mcpp. And what is more, I have compiled mcpp in many compiler systems to verify its behavior. Therefore, I am confident that mcpp is now almost flawless, free of bugs and misinterpretation of specifications, however, I cannot deny the possibility that it still contains some bugs.

+

If you find a strange behavior, do not hesitate to let me know. If you receive a diagnostic message saying "Bug: ...", it is undoubtedly a bug of mcpp or a compiler system. (Probably, it's mcpp's.) How illegal a user program may be, should mcpp lose control, it is mcpp that is to be blamed for it.

+ +

When you report a bug, please be sure to provide the following information:

+
    +
  1. Compiler system mcpp is ported to.
    +
  2. A sample source (shorter is better) that allows reproduction of what looks like a bug.
    +
  3. Preprocessing results.
    +
+ +

Other than bugs, I would appreciate if you give me feedback on mcpp usage, diagnostic messages or this manual.

+

For your feedback or information, please post to "Open Discussion Forum" at:

+

http://mcpp.sourceforge.net/

+

or send via e-mail.

+ + + diff --git a/libraries/mcpp/doc/mcpp-porting.html b/libraries/mcpp/doc/mcpp-porting.html new file mode 100644 index 000000000..2f819fbc7 --- /dev/null +++ b/libraries/mcpp/doc/mcpp-porting.html @@ -0,0 +1,1181 @@ + + + + + + + + +
+

MCPP-PORTING

+

== How to Port MCPP ==

+
+
+

for V.2.7.2 (2008/11)
+Kiyoshi Matsui (kmatsui@t3.rim.or.jp)

+
+
+

Contents

+
+ +

1. Overview +
1.1. High portability +
1.2. Standard C mode with highest conformance and other modes +
1.3. Notations in this document +

+
2. History +

+
3. How to port mcpp to each compiler system: Overview +
3.1. Already supported compiler systems: Making compiler-specific-build of mcpp +
3.1.1. Commonly required settings +
3.1.2. FreeBSD / GCC V.2.*, V.3.*, V.4.* +
3.1.3. Linux / GCC V.2.*, V.3.*, V.4.* +
3.1.4. Mac OS X / Apple-GCC V.4.* +
3.1.5. CygWIN / GCC V.2.*, V.3.* +
3.1.6. MinGW / GCC V.3.* +
3.1.7. LCC-Win32 2003-08, 2006-03 +
3.1.8. Visual C++ V.6.0, 2002, 2003, 2005, 2008 +
3.1.9. Borland C V.5.*
+
3.2. Compiler systems to which DECUS-cpp had been ported +
3.3. noconfig.H, configed.H, system.H +
3.4. system.c +
3.5. Library functions +
3.6. Standard headers +
3.7. Makefile and recompilation using mcpp +
3.8. Compiler systems which can compile mcpp +
3.9. Host compiler system and target compiler system +
3.10. Compiler systems on MS-DOS and DJGPP +
3.11. Making compiler-independent-build of mcpp +
3.12. Making subroutine-build of mcpp +
3.12.1. Using configure +
3.12.2. Using noconfig/*.mak +
3.12.3. Static library and shared library or DLL
+
+
4. How to port mcpp to each compiler system: Details +
4.1. Setting of noconfig.H, configed.H, system.H +
4.1.1. PART 1: Setting of Target system: for Compiler-specific-build +
4.1.1.1. Predefined macros +
4.1.1.2. Include directories and others +
4.1.1.3. Output format of line number information and others +
4.1.1.4. Settings corresponding to the compiler system's language specification +
4.1.1.5. Multi-byte character +
4.1.1.6. Target and host system common settings
+
4.1.2. PART 2: Setting of Host system +
4.1.3. PART 3: Setting of the mcpp behavior specification +
4.1.3.1. Several behavioral modes of new and old +
4.1.3.2. Specifying the details of the behavioral modes +
4.1.3.3. Specifying translation limits
+
4.2. system.c +
4.extra. malloc() +

+
5. Bug reporting and porting report +
5.1. Is this a bug? +
5.2. Check for malloc() related bugs +
5.3. Bug report +
5.4. Porting report +
5.5. Information about configure for other compiler systems than GCC +
5.6. I will try to port if you send me the data. +
5.7. Please report the test of other compiler systems by the Validation Suite. +
5.8. The feed back for improvement +

+
6. Long way to mcpp +
6.1. Three days to plan and six years to develop +
6.2. V.2.3 +
6.3. Selected to "Exploratory Software Project" +
+
+ +

1. Overview

+

mcpp is a C preprocessor developed by kmatsui (Kiyoshi Matsui) based on the DECUS cpp written by Martin Minow, and then rewritten entirely. mcpp means Matsui cpp. This software is supplied as source codes, and to use mcpp in any systems, a small amount of compiler-system-specific modifications are required before it can be compiled into an executable. *1

+

This document explains how to port the source to different compiler systems. Please refer to the separate manual called "mcpp-manual.html" for the operating instructions of the generated executable.

+

All these sources and related documents are provided as an open-source-software.

+

Before going into detail, some of the mcpp features are introduced here.

+

Note:

+

*1 mcpp V.2.6.3 onward provides some binary packages too, at the following site. This document, however, does not explain them. As for the binary packages, see the web page.

+
+

http://mcpp.sourceforge.net/

+
+
+ +

1.1. High portability

+

mcpp is a portable preprocessor, supporting various operating systems, including Linux, FreeBSD and Windows. Its source has a wide portability, and can be compiled by any compilers which support Standard C (ANSI/ISO C). The library functions used are only the classic ones.

+

To port mcpp to each compiler system, in many cases, one only needs to change some macro definitions in the header files and simply compile it. In the worst case, adding several dozen of lines into a source file would be enough.

+

To process multi-byte characters (Kanji), it supports Japanese EUC-JP, shift-JIS and ISO2022-JP, Chinese GB-2312, Taiwanese Big-5 and Korean KSC-5601 (KSX 1001), as well as UTF-8. For shift-JIS, ISO2022-JP or Big-5, mcpp can complement the compiler-proper if it does not recognize them.

+
+ +

1.2. Standard C mode with highest conformance and other modes

+

mcpp has various behavioral modes. Other than Standard-conforming mode, there are K&R 1st mode, "Reiser" cpp mode and what I call post-Standard mode. mcpp has also an execution option for C++ preprocessor.

+

Different from many existing preprocessors, Standard mode of mcpp has the highest conformance to Standards: all of C90, C99 and C++98. It has been developed aiming to become the reference model of the Standard C preprocessor. Those versions of the Standard can be specified by an execution option. *1

+

In addition, it provides several useful enhancements: #pragma MCPP debug, which traces the process of macro expansion or #if expression evaluation, and the header file "pre-preprocessing" facility.

+

mcpp also provides several useful execution options, such as warning level or include directory specification options.

+

Even if there are any mistakes in source, mcpp deals suitably with accurate plain diagnostic messages without running out of control or displaying misguiding error messages. It also displays warnings for portability problems. The detailed documents are also attached.

+

In spite of its high quality, mcpp code size and memory usage is relatively small.

+

A disadvantage of mcpp, if any, is slower processing speed. It takes two or three times time of GCC 3.*, 4.* / cc1, but seeing that its processing speed is almost the same as that of Borland C 5.5/cpp32 and that it runs a little bit faster when the header file pre-preprocessing facility is used, it cannot be described as particularly slow. mcpp puts an emphasis on standard conformance, source portability and operability in a small memory space, making this level of processing speed inevitable.

+

Validation Suite for Standard C Preprocessing, which is used to test the extent to which a preprocessor conforms to Standard C, its documentation cpp-test.html, which contains results of applying Validation Suite to various preprocessors, are also released with mcpp. When looking through this file, you will notice that so-called Standard-conforming preprocessors have so many conformance-related problems.

+

Note:

+

*1 ISO/IEC 9899:1990 (JIS X 3010-1993) had been used as C Standard, but in 1999, ISO/IEC 9899:1999 was adopted as a new Standard. This document calls the former C90 and latter C99. The former is generally called ANSI C or C89 because it migrated from ANSI X3.159-1989. ISO/IEC 9899:1990 plus its Amendment 1995 is sometimes called C95. C++ Standards are ISO/IEC 14882:1998 and its corrigendum version ISO/IEC 14882:2003. This document calls both of them C++98.

+
+ +

1.3. Notations in this Document

+

Though this document was text-file in the older versions, it has changed to html-file at V.2.6.2.
+This document uses the following typographical conventions:

+
    +
  • source:
    +Navy colored constant-width font is used for code snippets and command line inputs.
    +
  • __STDC__:
    +Maroon colored constant-width font is used for Standard predefined macros or any other macros found in some codes.
    +
  • STD:
    +Italic font is used for the macros defined in mcpp source file named system.H. This document uses these names to denote various mcpp settings as well as to denote the macro itself. Note that these macros are only used in compilation of mcpp, and that the mcpp executable does not have such macros.
    +
+
+ +

2. History

+
    +
  1. DECUS cpp was created by Martin Minow, and released in usenet/net.sources on May 1984. Apparently, DECUS is an acronym for "DEC User's Society" which was a user group of DEC (Digital Equipment Corporation). DECUS cpp is the C preprocessor written for DEC's C compiler systems of those days, such as PDP-11 / RT11, PDP-11 / RSX, VAX / VMS, VAX / ULTRIX. As it had been written well for portability, it was quite easy to port to other systems. Even the original version had already been ported to some other UNIX systems besides DEC's.
    +
    +
  2. I used the distribution No.243, of the C Users' Group, to be the base for mcpp. According to the revision history of this source, the original author's final modification was June 1985. I do not hear that the author has upgraded it since then.
    +
    +
  3. After that, some people ported it to some of the compiler systems on MS-DOS until December 1988. This is the version which is included in the CUG disc.
    +
    +
  4. There are also sources in ftp.ora.com/pub/examples/nutshell/imake/DECUS-cpp.tar.gz. The time stamp of this shows Feb 1993, but the actual contents are older than CUG's and it is Jan 1985's. According to the README by Martin Minow which was included there, this program is stated to be "public domain". (This README also seems to be of 1984 or 1985.)
    +
    +
  5. The one ported to Microware C of OS-9/6x09, by Gigo & others, had been registered in NIFTY-SERVE / FOS9 / lib 2 in April 1989.
    +
    +
  6. mcpp V.2 is based on these, and I rewrote it entirely. I improved the portability further. In order to completely comply with the Standard C, I changed the partitioning of source files, added lots of macros and drastic addition/separation/rewriting/renaming of functions and variables has been done. The size of the source is three times that of the original version. All the documents and the Validation Suite are written completely new by me.
    +I release these as an open-source-software. I do not have any relationship with DECUS.
    +The original version does not have a version number, but I refer to them as "DECUS cpp" to differentiate them from mcpp.
    +
    +
  7. For the algorithm of macro expansion for Standard C, the source of CPP V.5.3 (Aug 1989, CUG #319) - PDS on MS-DOS by E.Ream, was also referred to. Additionally, I took some hints from the behavior of GCC/cpp and J. Roskind's JRCPP document.
    +
    +
  8. mcpp V.2.0 was released with Validation Suite V.1.0 on NIFTY SERVE / FC / LIB2 in August 1998, and also re-distributed on Vector's web site.
    +
    +
  9. V.2.1 was a revised V.2.0 according to the C99 1998/08 draft. In September 1998, this had been uploaded with Validation Suite V.1.1 to NIFTY SERVE / FC / LIB2 and at the same time to Vector's web site.
    +
    +
  10. V.2.2 was an updated V.2.1 according to the C++ Standard (ISO/ IEC 14882:1998), which was adopted on July 1998. With the Validation Suite, this had been uploaded to NIFTY SERVE / FC / LIB2 and at the same time to Vector's web site in November 1998.
    +
    +
  11. mcpp V.2.3 was an updated V.2.2 according to C99. Added porting to Linux / GCC 2.95, GCC 3.2, etc., and augmented the compatibility with GCC/cpp. Also, the execution time options are added and some options were changed. In V.2.3, English versions of the documents are also created. In the Validation Suite attached to mcpp, an edition which allows automatic testing as a part of GCC / testsuite is added.
    +
    +
  12. In the middle of development of V.2.3, mcpp with Validation Suite V.1.3. was selected for one of the 2002 "Exploratory Software Projects" of the Information-technology Promotion Agency, Japan (IPA) by the project manager, Yutaka Niibe. During the period of July 2002 - Feb 2003, the development was progressed by the IPA's funding, and based on PM Niibe's advice. The documents are consigned to "HighWell inc." (Tokyo) for translation to an English version, and completed with my modifications. During this project, "cvs repository" and "ftp site" were prepared. V.2.3 was developed with pre-release 1 in August 2002, pre-release 2 in December 2002, and then the released version in February 2003. Since then, V.2.3 patch 1 was released in March 2003. *1
    +
    +
  13. mcpp has continued to be selected as the "Exploratory Software Projects" for 2003 by the project manager, Hiroshi Ichiji. During the period of June 2003 - Feb 2004, the update to V.2.4. was proceeded with the IPA's funding, and based on PM Ichiji's advice. In this project, V.2.4 pre-release was developed in November 2003. In this version, the porting to Visual C++ 2003 is added, and also a configuration script to automate 'make' of mcpp was created. Also, mcpp did not have a clear license indication so far, but a BSD style license has been included from this version. Furthermore, the release version was developed in February 2004. In this version, the processing of multi-byte characters was enhanced. The documents were consigned to HighWell for translation to an English version, as they were updated from the Japanese version.
    +In March 2004, V.2.4.1 was released. In this version, recursive macro expansion was revised.
    +
    +
  14. In March 2005, V.2.5 was released. In this version, the compile time mode named POST_STANDARD was absorbed into STANDARD mode as an execution time option, the compile time setting named OLD_PREPROCESSOR was absorbed into an execution time option of PRE_STANDARD. Recursive macro expansion was revised again and became perfect. While the portings to GCC V.3.3 and 3.4 were added, most of the documents on 16-bits system compilers was removed.
    +
    +
  15. In July 2006, V.2.6 was released. In this version, STANDARD and PRE_STANDARD modes are integrated into one executable, all the behavioral modes are made to be specified by the execution options. The specifications of compiler-independent-build became entirely independent from compiler systems. While the portings to new versions of some compiler systems are added, the settings for pre-C90 compiler systems and settings for MS-DOS compiler systems are removed. The sources were rewritten in many parts. I think that so much rewriting as this version will not happen hereafter, except adding codes and refining details.
    +In August 2006, V.2.6.1 was released. In this version, porting to MinGW was added, some bugs were fixed and some relatively small improvements were done.
    +In November 2006, V.2.6.2 was released. In this version, most of the text file documents were converted to html, some bugs were fixed, and subroutine-build of mcpp was implemented by contribution from Juergen Mueller.
    +In April 2007, V.2.6.3 was released. In this version, compatibility of GCC-specific-build to GCC was increased, and output to memory buffer was implemented in subroutine-build by contribution from Greg Kress. In addition, binary packages for some systems were begun to be provided.
    +In May 2007, V.2.6.4 was released. This is a bug-fixed version of V.2.6.3.
    +
    +
  16. In March 2008, V.2.7 was released. +In this version, 'macro notification mode' to embed macro informations into comments was implemented, and much codes were added. +This mode enables to know the line and column position of macro calls on the source file from the preprocessed output. +It was implemented for C/C++ refactoring tools. +A porting to Mac OS X / Apple-GCC was added. +Also a porting to Visual C++ 2008 was done. +GCC-specific-build became closer to GCC. +Some bugs of the previous version were fixed.
    +In May 2008, V.2.7.1 was released. +This is a bug-fixed version of V.2.7. +This version changed each binary package on UNIX-like systems to install a shared library or DLL of mcpp and an mcpp executable linking the library.
    +In November 2008, V.2.7.2 was released. +This is a bug-fixed version of V.2.7.1.
    +
+

Note:

+

*1 The outline of the "Exploratory Software Project" can be seen at the following site (Japanese pages only).

+
+

http://www.ipa.go.jp/jinzai/esp/

+
+

mcpp from V.2.3 through V.2.5 had been located at:

+
+

http://www.m17n.org/mcpp/

+
+

In April 2006, mcpp project moved to:

+
+

http://mcpp.sourceforge.net/

+
+

The older version of mcpp, cpp V.2.2 and Validation Suite V.1.2 are located in the following Vector's web site. They are in the directory called dos/prog/c, but they are not for MS-DOS exclusively. Sources are for UNIX, WIN32, MS-DOS. The documents are Japanese only.

+
+http://www.vector.co.jp/soft/dos/prog/se081188.html
+http://www.vector.co.jp/soft/dos/prog/se081189.html
+http://www.vector.co.jp/soft/dos/prog/se081186.html
+
+

The text files in these archive files available at Vector use [CR]+[LF] as a <newline> and encode Kanji in shift-JIS for DOS/Windows. On the other hand, those from V.2.3 through V.2.5 available at SourceForge use [LF] as a <newline> and encode Kanji in EUC-JP for UNIX. From V.2.6 on two types of archive, .tar.gz file with [LF]/EUC-JP and .zip file with [CR]+[LF]/shift-JIS, are provided.

+
+ +

3. How to port mcpp to each compiler system: Overview

+

The source of mcpp consists of five header files and seven *.c files. The parts which are dependent on OS or compiler system are included in the four source files configed.H, noconfig.H, system.H and system.c. Either of configed.H or noconfig.H is used depending the compiling method, they are never used simultaneously. There are also a few library function sources in system.c. When mcpp is compiled by any compiler system, these source files need to be modified to match that compiler system.

+

There are several types of MCPP executable corresponding to its building methods. +The building methods of MCPP have following two axis:

+ +
    +
  1. stand-alone-build vs subroutine-build +
  2. compiler-independent-build vs compiler-specific-build +
+
    +
  • stand-alone-build: The preprocessor which is invoked as a command. +Some of this type is invoked by compiler-driver. +
  • subroutine-build: The preprocessor to be called as a subroutine +(repeatedly, if required) from other main program. +This build is explained in 3.12. +
+
    +
  • compiler-independent-build: The preprocessor which behaves on its own not depending on any compiler system. The invocation options, for example, are the same across the compilers with which mcpp is compiled. Although it can preprocess source files, it cannot behave as an integrated part of the compiler system. *1
    +It is quite easy to make a compiler-independent-build. It is explained in 3.11. *2 +
  • compiler-specific-build: The preprocessor to replace (if possible) +the resident preprocessor of certain compiler system. +It has some peculiar specifications for the compiler system and is installed +into the compiler-system-specific directory. +
+ +

The following sections from 3.1 through 3.9 explain compiler-specific-builds. "mcpp for GCC", "implemented for Visual C" or such in this document mean GCC-specific-build, Visual C-specific-build, respectively.

+

There are two ways to compile mcpp. The first is to automatically generate a header file named config.h and a Makefile by executing the 'configure' script. After generating them, just run 'make; make install'. The header file named configed.H will be used in this way. However, the configure script can only be used in UNIX-like systems and CygWIN or MinGW.

+

Another way is to 'make' using a makefile for each compiler system, with the modified/edited (if required) header file by difference files. noconfig.H will be used in this case. Difference files and makefiles are in the 'noconfig' directory. Even for systems which can use the configure script, editing header files and makefiles directly allows you to control compilation in detail. However, difference files are only available for supported compiler systems.

+

In this chapter, I explain how to compile mcpp using the difference files. Please refer to INSTALL for the configure script.

+

Note:

+

*1 While V.2.6 and V.2.6.1 called this as 'stand-alone-build', V.2.6.2 changed the name according to the creation of subroutine-build.

+

*2 mcpp V.2.6.3 and later provides some binary packages at the SourceForge site. They are all stand-alone and compiler-independent-builds.

+
+ +

3.1. Already supported compiler systems: Making Compiler-specific-build of mcpp

+

The C/C++ compiler systems I could use are the following, and mcpp has been ported to all of these. Therefore, it has been verified that this source code can be compiled, and that generated preprocessors run correctly on each compiler system. In any case the CPU used is the x86 type. The systems are all 32 bit version, except Ubuntu which is 64 bit version.

+
+ + + + + + + + + + + + + +
FreeBSD 6.3 GCC V.3.4.6
Vine Linux 4.2 GCC V.2.95.3, V.3.2, V.3.3.6, V.3.4.3, V.4.1.1
Fedora Linux 9 GCC V.4.3.0
Debian LInux 4.0 GCC V.4.1.2
Ubuntu Linux 8.04 / x86_64 GCC V.4.2.3
Mac OS 10.5 GCC V.4.0.1
CygWIN 1.3.10 GCC V.2.95.3
CygWIN 1.5.18 GCC V.3.4.4
MinGW (MSYS 1.0.11)GCC V.3.4.5
WIN32 Visual C++ 2003, 2005, 2008
WIN32 Borland C++ V.5.5J
WIN32 LCC-Win32 2003-08, 2006-03
+
+

In addition, there are informations from some users on Visual C++ V.6.0, Visual C++ 2002 and C++Builder 2007 (aka BCC V.5.9), and you can compile mcpp on them, too.

+

Settings are quite easy for creating mcpp executables by these compiler systems. One only needs to change some macro definitions in noconfig.H.

+

*.dif files in noconfig directory are difference files for modifying noconfig.H, which is by default for FreeBSD 6.* / GCC 3.4, to use with each compiler system.

+

For Visual C++ 2005, as an example, in the src directory, doing the following command modifies these files.

+
+patch -c < ..\noconfig\vc2005.dif
+
+

Patch is a standard UNIX command, and has been ported to Windows or other. Of course, you can directly edit the source file referring the difference file without using patch.

+

Modifications to match your own systems, such as specifying include directory have to be done by yourself, apart from the modifications made by difference file.

+

Makefiles for each compiler system which are to compile these modified sources, are also attached. (See sec. 3.7)
+Copy the makefile into the src directory as:

+
+copy ..\noconfig\visualc.mak Makefile
+
+

All the following operations should be done in the src directory. These are all modifications of noconfig.H unless it is otherwise mentioned.

+
+ +

3.1.1. Commonly required settings

+

For any of the following compiler systems, in order to make the compiler-specific-build, change the macro INDEPENDENT of the line:

+
+#define COMPILER        INDEPENDENT
+
+

to the macro for the compiler system, for example:

+
+#define COMPILER        MSC
+
+

Next, change the line appropriately:

+
+#define VERSION_MSG     "GCC 3.4"
+
+

as:

+
+#define VERSION_MSG     "Visual C 2005"
+
+

You can also overwrite the definition of COMPILER by make option as:

+
+nmake COMPILER=MSC
+nmake COMPILER=MSC install
+
+

If you modify noconfig.H applying the difference file, the compiler-specific setting will be also modified for the compiler system, so you need not rewrite the definition of COMPILER in the file. Then, if you do 'make' with option defining COMPILER, compiler-specific-build will be made, otherwise compiler-independent-build will be made.

+

In case of the default include directories are different from the ones in this file, the macros C_INCLUDE_DIR1 and C_INCLUDE_DIR2 should be rewritten. If C++ has its own include directories different from the ones in C, these should be written in CPLUS_INCLUDE_DIR1, CPLUS_INCLUDE_DIR2 and CPLUS_INCLUDE_DIR3. (These directories can be specified also by environment variables or the -I option at the time of execution.) All of these directories are of compiler-system-specific ones.

+

Include directories are also set in system.c. In UNIX terms, those set by system.c are OS-specific (usually /usr/include) and site specific (usually /usr/local/include). As for Windows, nothing is set for include directories in system.c nor in noconfig.H by default, they are to be specified by environment variables INCLUDE and CPLUS_INCLUDE.

+

If required, you should also change built-in macro names defined by the macros such as COMPILER_STD1 or COMPILER_STD2.

+

The default setting of multi-byte character encodings is set to EUC-JP on UNIX, shift-JIS on Windows. If required, modify the macro called MBCHAR to change the encoding. (The change of multi-byte character encoding can be done also by the environment variables, execution options and #pragma.)

+

On certain compiler systems, because they do not support encodings such as shift-JIS or Big5, the tokenization gets errors when there is the same value byte of 0x5c as '\\' within multi-byte characters. For these systems, mcpp needs special setting to compensate for an inability of the compiler. Please refer to sec 4.1.1.5 for this setting.

+

With regard to the attached makefiles, you need to rewrite BINDIR, which is the directory where the executables of the compiler system are located.

+

In GCC V.3, V.4, the preprocessor is absorbed into the compiler (ccl, cclplus). So, to use mcpp, you must replace the call of gcc, g++ with shell-script and set to execute first mcpp, then cc1 or cc1plus. The attached makefiles set this automatically by doing:

+
+make COMPILER=GNUC
+make COMPILER=GNUC install
+
+

For the details, please see mcpp-manual.html#3.9.7.

+

When the user does not have write permission into the BINDIR, you must do 'sudo make COMPILER=GNUC install' on UNIX-like systems. On Windows, you must modify the permission of the directory by an administrator account, prior to installation.

+ +

3.1.2. FreeBSD / GCC V.2.*, V.3.*, V.4.*

+

The source is to be compiled by GCC (GNU C) V.3.4 on FreeBSD 6.* and to make mcpp of compiler-independent-build. In order to make the compiler-specific-build for FreeBSD 6.* / GCC V.3.4.*, first change the line:

+
+#define COMPILER    INDEPENDENT
+
+

to:

+
+#define COMPILER    GNUC
+
+

Then, just complete it by compiling. +You can also overwrite COMPILER by 'make COMPILER=GNUC' command.

+

For the other version of GCC, modify the version number of the VERSION_MSG, and

+
+#define COMPILER_EXT_VAL    "3"
+#define COMPILER_EXT2_VAL   "4"
+#define COMPILER_CPLUS_VAL  "3"
+#define GCC_MAJOR_VERSION   3
+
+

For the first, write major version number of GCC, and for the second, write minor version number, both by string-literal. The third is value of the macro __GNUG__, which is the same with the first. +And for the fourth, write the same number with the first by a digit.

+

If the version of FreeBSD is not 6.*, then change the following values.

+
+#define SYSTEM_EXT_VAL      "6"     /* V.5.*: 5, V.6.*:6    */
+
+

Furthermore, in case of include directories are different from the default ones of FreeBSD 6.*, you need to change the following definition.

+
+#define CPLUS_INCLUDE_DIR1  "/usr/include/c++/3.4"
+#define CPLUS_INCLUDE_DIR2  "/usr/include/c++/3.4/backward"
+
+

In some cases you may need to set also C_PLUS_INCLUDE_DIR3 and C_INCLUDE_DIR1.

+

If the version of GCC is 2.7-2.95, then change the following macro to 199409L.

+
+#define STDC_VERSION        0L
+
+

Even for other UNIX-like OSes, if the compiler system is GCC, I suspect one only needs to change things like these version numbers, the setting of include directories or OS specific built-in macros. (See sec 4.1.1)

+ +

3.1.3. Linux / GCC V.2.*, V.3.*, V.4.*

+

To change the setup for GCC on FreeBSD to GCC on Linux, you should change the line:

+
+#define SYSTEM      SYS_FREEBSD
+
+

to:

+
+#define SYSTEM      SYS_LINUX
+
+

Then modify the macros, as on FreeBSD, COMPILER, VERSION_MSG, COMPILER_EXT_VAL, COMPILER_EXT2_VAL, COMPILER_CPLUS_VAL, GCC_MAJOR_VERSION, CPLUS_INCLUDE_DIR1, CPLUS_INCLUDE_DIR2, C_INCLUDE_DIR1.

+

For GCC 2.* modify the value of STDC_VERSION. and change:

+
+#define COMPILER_SP3_VAL    "int"
+
+

to:

+
+#define COMPILER_SP3_VAL    "long int"
+
+

You should make sure the include directories by these commands:

+
+gcc -xc -E -v /dev/null
+g++ -xc++ -E -v /dev/null
+
+

The difference files in 'noconfig' directory named linux_gcc2953.dif, linux_gcc32.dif, linux_gcc336.dif, linux_gcc343.dif and linux_gcc411.dif are for VineLinux 4.0 / GCC V.2.95.3, V.3.2, V.3.3.6, V.3.4.3 and V.4.1.1, respectively. For the compiler-specific-build, change COMPILER too. The include directories may vary between distributions of Linux. Also, if another version is installed in addition to the system standard version of GCC, it should create another include directory for the specific version. Specify the particular directory using the above macros.

+

The specification of getopt() of glibc is different from the standard ones such as POSIX, please use the mcpp_getopt() in system.c instead.

+ +

3.1.4. Mac OS X / Apple-GCC V.4.*

+

On Mac OS X, you can install GCC by installing the Xcode package.

+

After that installation, you will find many gcc, cc, g++, c++ or such in /usr/bin. +In Mac OS X 10.5 Leopard on Intel-Mac, i686-apple-darwin9-gcc-4.0.1 and i686-apple-darwin9-g++-4.0.1 are the native compilers for the machine. +The cross compilers are installed, too. +On Intel-Mac, powerpc-apple-darwin9-gcc-4.0.1 and powerpc-apple-darwin9-g++-4.0.1 are the cross compilers to generate a binary for PowerPc. +The names just gcc and g++ are symbolic links to gcc-4.0 and g++-4.0, +which behave as native compilers by default, but when invoked with '-arch ppc' option, call the compiler-propers cc1 or cc1plus for powerpc. +Note that these compilers are also installed into /Developer/usr/bin.

+

These are GCCs with many extensions specific to Mac OS X made by Apple. +The compiler system of Mac OS X differs from the GCCs on other systems in some important aspects. +First, it handles the special directories called "framework" as its system header directories. +Second, it can generate both of the binaries for Intel-Mac and PowerPc-Mac on either machine. +Moreover, it has a mechanism to make a "universal binary", which is a bundle of both binaries and is able to run on either machine. +In fact, gcc-4.0, i686-apple-darwin9-gcc-4.0.1, powerpc-apple-darwin9-gcc-4.0.1 and their corresponding g++s and cc1, cc1plus and other compiler-propers in /usr/libexec/gcc/SYSTEM/4.0.1 are all universal binaries for i386 and ppc. +(SYSTEM is i686-apple-darwin9 and powerpc-apple-darwin9.) +If we copy these universal binaries from Intel-Mac to PowerPc-Mac, they will run reversing native and cross positions, I suppose. +In addition, Intel-Mac even executes most of ppc binaries automatically translating to x86 codes.

+

To sum up: there are many gccs and g++s in /usr/bin and /Developer/usr/bin: also there are links to them; +there are libexec directories for x86 and ppc: +an executable contains two binaries bundled in it: +a binary for ppc runs on x86. +Such being the situation, we easily lose which is which. +Be careful. +Here, I take examples of Mac OS X 10.5 (Leopard) on Intel-Mac. +On PowerPc-Mac, read these sections swapping i686 and powerpc (ppc). +On Mac OS X 10.4 (Tiger), read darwin9 as darwin8.

+ +

3.1.4.1. Native compiler versus cross compiler

+

It is quite simple to install mcpp by the native compiler. +To make settings for Mac OS X 10.5 / GCC 4.0.1 on Intel-Mac, apply mac_gcc401_i686.dif to noconfig.H. +Use mac_osx.mak as a Makefile. +The command sequence 'make; sudo make install' will generate a compiler-independent-build, and 'make COMPILER=GNUC; sudo make COMPILER=GNUC install' will install a GCC-specific-build. +The compilers in /usr/bin will be used for these commands, since usually /Devepoler/usr/bin is not set to $PATH.

+

To install mcpp on Intel-Mac with or for the cross compiler for PowerPc, apply mac_gcc401_powerpc.dif to noconfig.H. +Then edit the Makefile (mac_osx.mak).

+

For a compiler-independent-build, change the definition of variables NAME, CC and CXX to those containing "powerpc" as noted by the comments in mac_osx.mak. +Then, do 'make; sudo make install'. +The binary is the one compiled "with the cross compiler", so should run on ppc-Mac.

+

For a GCC-specific-build, change the definition of variables NAME, INCDIR, BINDIR, target_cc and arch to those containing "powerpc" (do not change CC and CXX), and do 'make COMPILER=GNUC; sudo make COMPILER=GNUC install'. +This is a binary "for the cross compiler" running on Intel-Mac, hence runs on Intel-Mac.

+

On PowerPc-Mac, mac_gcc401_powerpc.dif makes settings for the native compiler, and mac_gcc401_i686.dif do for the cross compiler, in reverse of Intel-Mac. +To compile mcpp with or for the cross compiler for Intel-Mac on PowerPc-Mac, change the definition of the variables above to those containing "i686".

+ +

3.1.4.2. Universal binary

+

To make a universal binary, just enable the variable UFLAGS in mac_osx.mak removing the '#' which comments out the line. +All the other settings are the same with the section above.

+ +

3.1.5. CygWIN / GCC V.2.*, 3.*

+

For CygWIN V.1.3.10 / GCC V.2.95.3, add the changes in cyg1310.dif to noconfig.H.
+For CygWIN V.1.5.18 / GCC V.3.4.4, apply cyg1518.dif.

+

Then, rewrite the macro CYGWIN_ROOT_DIRECTORY to define CygWIN's root directory on Windows as:

+
+#define CYGWIN_ROOT_DIRECTORY   "C:/pub/compilers/cygwin"
+
+

The letters in the path-list are case-insensitive.

+

For other versions, it should be able to be ported by modifying macros such as VERSION_MSG, C_INCLUDE_DIR?, CPLUS_INCLUDE_DIR? and CYGWIN_ROOT_DIRECTORY.

+

Although CygWIN is a system on Windows, it simulates UNIX file system. Therefore, mcpp treats CygWIN/GCC in almost the same way with UNIX/GCC, and presets include directories as mcpp on UNIX.

+ +

3.1.6. MinGW / GCC V.3.*

+

For MinGW / GCC V.3.4.5, add the changes in mingw345.dif to noconfig.H. Then, rewrite the macro MSYS_ROOT_DIRECTORY and MINGW_DIRECTORY to define MSYS's / and /mingw directory on Windows as:

+
+#define MSYS_ROOT_DIRECTORY "C:/Program Files/MSYS/1.0"
+#define MINGW_DIRECTORY     "C:/Program Files/MinGW"
+
+

The letters in the path-list are case-insensitive.

+

For other versions, it should be able to be ported by modifying macros such as VERSION_MSG, C_INCLUDE_DIR?, CPLUS_INCLUDE_DIR?, MSYS_ROOT_DIRECTORY and MINGW_DIRECTORY. The path-list for the include directories may be either of absolute path as "c:/dir/mingw/include" or MinGW's own path as "/mingw/include".

+

Since MinGW does not support symbolic link, GCC-specific-build of mcpp cannot be invoked from gcc through symbolic link. Moreover, MinGW / gcc rejects to invoke a shell-script even if it is named cc1. Therefore, the compiling of mcpp generates an executable named cc1.exe instead of shell-script. In execution, gcc invokes this cc1.exe from which mcpp.exe or GCC's cc1.exe/cc1plus.exe are invoked.

+

Although the include directories are preset on GCC-specific-build, they are not set on compiler-independent-build, hence you should specify them by the environment variables INCLUDE and CPLUS_INCLUDE.

+ +

3.1.7. LCC-WIN32 2003-08, 2006-03

+

In LCC-WIN32 2003-08 or 2006-03, it needs to be changed as per lcc0308.dif, lcc0603.dif respectively. In other versions, the VERSION_MSG macro needs to be modified.

+ +

3.1.8. Visual C++ V.6.0, 2002, 2003, 2005, 2008

+

In Visual C++ 6.0, 2002, 2003, 2005, 2008, it needs modifications as vc6.dif, vc2002.dif, vc2003.dif, vc2005.dif, vc2008.dif respectively. For the compiler-specific-build, modify COMPILER or overwrite it by the nmake option, of course.

+

For other versions of Visual C, besides modifying VERSION_MSG macro, the values of predefined macros, _MSC_VER and _MSC_FULL_VER, should be changed by modifying the definition of COMPILER_EXT_VAL and COMPILER_EXT2_VAL respectively.

+ +

3.1.9. Borland C++ V.5.*

+

In Borland C V.5.5, V.5.9 (C++Builder 2007) / bcc32, it needs to be changed with bc55.dif, bc59.dif respectively.

+

In other versions of Borland C++, besides the VERSION_MSG macro, the values of predefined macros, __TURBOC__, __BORLANDC__ and __BCPLUSPLUS__ should be changed by modifying macros COMPILER_STD2_VAL, COMPILER_EXT_VAL and COMPILER_CPLUS_VAL, in noconfig.H. (Refer Sec 4.1.1.1.) If the version can handle digraphs, the definition of HAVE_DIGRAPHS needs to be changed. If the version has __STDC_VERSION__ macro, change the definition of STDC_VERSION.

+
+ +

3.2. Compiler systems to which the DECUS-cpp had been ported

+

The DECUS cpp seems to had supported RT-11/DECUS C and RSX/DECUS C on PDP-11, VMS/VAX-11C, PDP-11/UNIX and VAX/ULTRIX - some kind of C on VAX. It also seemed to have supported a quite old version of Microsoft C and Lattice C on MS-DOS. I removed these, as I suppose it is no longer required and I cannot maintain them.

+
+ +

3.3. noconfig.H, configed.H, system.H

+

system.H includes configed.H when the macro HAVE_CONFIG_H is defined to non-0, otherwise it includes noconfig.H. PART 1 and PART 2 of the mcpp setting are in configed.H and noconfig.H, and PART 3 is in system.H.

+

In these files, some macros which are required to port to each compiler system are defined. When porting to compiler systems which have not been ported to yet, one needs to add from a few lines to a dozen lines in Part 1.

+

Part 1 is the definition dependent on OS and target compilers, Part 2 is the definition dependent on host systems, and Part 3 is the definition of the mcpp behavior specification.

+

In configed.H and noconfig.H, the target compiler system is assumed to be the same as the host, so PART 2 needs to be modified when it is different.

+

When you do porting with different configurations from the default, please make sure to look through these files.

+
+ +

3.4. system.c

+

system.c absorbs the discrepancies of OS or compiler which cannot be absorbed solely by configed.H (noconfig.H) or system.H macros. To port to a new compiler system, adding tens of lines of source into this file may be required.

+

This file includes functions such as options for mcpp invocation, usage message, include directory, the handling of OS unique directory paths when opening header files or source files, processing of #pragma, and processing of compiler system unique extension directives. Most of them are setup for the target OS and target compiler systems.

+
+ +

3.5. Library functions

+

Of library functions, C source code for getopt() and stpcpy(), which are not in Standard, are written in system.c. Though mcpp uses also getcwd(), stat() and in UNIXes readlink(), they are not included here, because they are functions dependent on OS, so cannot be written portably. They are only three low-level functions used in mcpp. Though they are not Standard C function, they are required by POSIX. Every compiler system seems to provide it. *1, *2

+

Usage of library functions in mcpp does not depend on the specification difference on different compiler systems, so those functions of any compiler systems will not cause a problem unless there is a bug.

+

Note:

+

*1 On MinGW, spawnv() is used too.

+

*2 mcpp up to V.2.6.4 had a separate source file lib.c. +But, it was absorbed into system.c on V.2.7, since the functions written in it decreased to only two (getopt() and stpcpy()). +At the same time, getopt() was renamed to mcpp_getopt() in order to prevent linking troubles.

+
+ +

3.6. Standard headers

+

In the source code of mcpp, stdio.h, string.h, stdlib.h, ctype.h, errno.h, limits.h, time.h, sys/types.h, sys/stat.h are included unconditionally. For UNIX-like systems, unistd.h is also included. There should not be a compiler system which does not have these.

+
+ +

3.7. Makefile and recompilation using mcpp

+

*.mak are the makefiles for each compiler system, and a detailed setup is possible. 'make' command itself is assumed to the one which is attached to each compiler system or the standard for the system. For Visual C, 'nmake' should be used instead of 'make'.

+

Except for FreeBSD/GCC, modify the noconfig.H as follows: (Assume the system is xyz)

+
+patch -c < ../noconfig/xyz.dif
+
+

Then edit macros COMPILER and VERSION_MSG, and edit the macros such as C_INCLUDE_DIR? in noconfig.H to suit your own system. After copying the corresponding noconfig/xyz.mak to Makefile, and setting up the target directory to match your system, run as

+
+make
+make install
+make clean
+
+

For other compiler systems, please write the necessary makefile referring to these files. The dependencies of the source files are simple:

+
    +
  1. main.c, directive.c, eval.c, expand.c, support.c, system.c, mbchar.c depend on system.H, internal.H
    +
  2. system.H depends on configed.H (noconfig.H)
    +
+

system.H needs to be included before internal.H.
+internal.H further includes mcpp_lib.h.

+

To recompile mcpp using mcpp itself, place the executable into the location where the preprocessor of the compiler system exists. For instance, in the cases of GCC 2.95, rename the resident cpp0 to something like cpp0_gnuc and link cpp0 to whichever cpp you use at the time. Therefore, if mcpp is the preprocessor you are going to use, you need to do

+
+ln -sf mcpp cpp0
+
+

For Windows, you need to copy the one you are going to use, to cpp32.exe or such. *1

+

You can name the executable of mcpp as:

+
+make NAME=mcpp
+
+

(The same thing needs to be done in BC make requires make -DNAME=mcpp. For UCB make, -D can be either added or not. For GNU make, -D should not be added.)

+

Using the attached makefiles, 'make install' does not do any detailed work. Except for GCCs (i.e.: freebsd.mak, linux.mak, mac_osx.mak, cygwin.mak and mingw.mak), please do rest of the work manually. Please copy the resident preprocessor into the other name beforehand, so as to prevent being deleted by 'make install'.

+

When you recompile mcpp using the one-pass compiler such as Visual C or Borland C, you should supply the output file of mcpp as the source file to the compiler. (For instance, output the preprocessed result of source file main.c as main.i, and compile that with cl or bcc32.)

+

When recompiling using mcpp, if the "pre-preprocess" functionality for the header file is used, the preprocess time will be reduced dramatically. When you use the attached makefile, for UCB make, GNU make or MS nmake, you run

+
+make PREPROCESSED=1
+
+

for BC make, you run

+
+make -DPREPROCESSED=1
+
+

which automatically pre-preprocesses the header files, next preprocess, then compiles. For LCC-Win32's 'make', 'if' statement cannot be used, so you need to edit the makefile and recompile. The details of the modification are in the makefile itself as comments.

+

In BSD make, GNU make or MS nmake, if you run make with the option MALLOC=KMMALLOC, this links the malloc() which I wrote. About this, please refer to 4.extra. For BC make, the same thing can be done by the option -DKMMALLOC. To link my malloc() with the make of LCC-Win32, you need to edit the makefile.

+

Note:

+

*1 In FreeBSD, the standard directory in which preprocessor is located is /usr/libexec. See mcpp-manual.html#2.1. In Linux, it is located in the really deep directory as /usr/lib/gcc-lib/i686-redhat-linux/3.3.2. In Linux/GCC, according to the distribution or the version, this directory setting in the makefile needs to be modified. There are various different include directories, for which you need to check.

+

Also, in Linux or FreeBSD, there is /usr/bin/cpp which calls cpp0 or cc1, and gcc also calls cpp0 or cc1.
+For further information, see mcpp-manual.html#3.9.5 and mcpp-manual.html#3.9.7. In GCC V.3 or V.4, the preprocessor is absorbed in the compiler (ccl, cclplus), so the call of gcc, g++ needs to be replaced with shell-scripts if you want to use mcpp.

+
+ +

3.8. Compiler systems which can compile mcpp

+

Though some configuration is required to port to each compiler system, compiling mcpp's source code can be done by any compiler system which satisfies C90 specifications. *1, *2

+

The char type can be either signed or unsigned.

+

Floating point operation is not necessary.

+

This source code is written so as not be affected by the minor discrepancies of the compiler systems. Of course, it is necessary to avoid the compiler system's own bugs in order to actually compile with the compiler system. This cannot be found out until it has to be done. When I was porting to some compiler systems, there were a few cases which took me a long time to trace the bug and to find out a work around.

+

The compiler systems which mcpp does not support are those with special character sets or special CPU, as well as pre-C90 compilers.

+

EBCDIC is not supported.

+

The CPUs for which integer operation is not two's complement are also not supported. If it is not two's complement, it may run incorrectly when an overflow has occurred at a #if expression.

+

Note:

+

*1 Up to V.2.5, mcpp source was compilable even by K&R 1st compiler. From V.2.6, it presupposes C90 compiler, because K&R spec is no longer required by current compiler systems. I tidied up the source and this document accordingly.

+

*2 Up to V.2.6.2, mcpp source was compilable by C++, too. V.2.6.3 and later, however, is compilable only by C.

+
+ +

3.9. Host compiler system and target compiler system

+

There is no need for the compiler system which compiles the mcpp source code (host) and the compiler system which will use the generated mcpp executable (target) to be the same. If these are different, select the target by SYSTEM and COMPILER and the host by HOST_SYSTEM and HOST_COMPILER within noconfig.H (configed.H). Also, the definitions in PART 1 are the settings for the target, and the ones in PART 2 are for the host. system.c is mainly for the target.

+

However, there are the following limitations.

+
    +
  1. The host compiler system should be on the same OS as the target compiler system, otherwise a cross-compiler has to be used. +The character set of the host system and the target system should be both ASCII. +
  2. 'long' ('unsigned long') in the host compiler system has to be an equal or wider range than the one in the target compiler system. This is also the condition required by the Standard. The same thing can be said for the 'long long' ('unsigned long long') in C99.
    +
+

By the way, the host and the target stated here are nothing to do with the ones in the cross-compiler. Cross-compiling is the job of the compiler itself, and in principle the preprocessor is not concerned about that. When mcpp is ported "to a cross-compiler", this cross-compiler is the target compiler system in here. As for the host compiler, you need to use the one which is not the cross-compiler. When mcpp is compiled "by a cross-compiler", the cross-compiler is the host compiler system, and the target of the cross-compiler becomes the target compiler system.

+
+ +

3.10. Compiler systems on MS-DOS and DJGPP

+

This section describes about the compiler systems which the older versions of mcpp had supported and later stopped support.

+

Although the following systems were supported in the older versions, mcpp V.2.4 removed the settings for them.

+
+ + +
MS-DOS Turbo C V.2.0
OS-9/6x09 Microware C
+

The documents on the following compiler systems were removed in V.2.5.

+
+ + +
DJGPP V.1.12 GCC V.2.7.1
MS-DOS LSI C-86 V.3.3 Trial Version
+

In V.2.6, the codes for the above two were removed, and codes and documents on the following compiler systems were removed.

+
+ + +
MS-DOS Borland C 4.0
Plan 9 pcc
+

V.2.6 also removed all the settings for MS-DOS and other small memory systems, and removed the settings for pre-C90 compiler systems.

+

V.2.7.2 removed a setting for the following system.

+
+ +
Win32 Borland C 4.0
+

The above compiler systems are old ones, and users of these systems probably have gotten small now.
+However, if you would like to compile mcpp with these compilers, you will easily succeed in making compiler-independent-build by the following procedures, as long as the compiler has most of C90 specifications, though compiler-specific-build is not easy because it requires various settings.

+

As for DJGPP, define SYSTEM, HOST_SYSTEM to SYS_WIN32 and HAVE_INTMAX_T, HAVE_INTTYPES_H to FALSE in noconfig.H, define NBUFF as about 1/4 of the default value in system.H. *1

+

As for the compiler systems on MS-DOS, define SYSTEM, HOST_SYSTEM to SYS_WIN32 and HAVE_LONG_LONG to FALSE in noconfig.H, define NBUFF as about 1/16 of the default, IDMAX as about 1/4 of the default in system.H, define SBSIZE as about 1/8 of the default in directive.c. Then compile with large memory model.
+However, since memory is scarce on MS-DOS, you may get an "out of memory" error on preprocessing a source which has many long macro definitions, even if you have compiled mcpp with these settings.

+

Note:

+

*1 It was reported that DJGPP / GCC 4.1.0 successfully compiled mcpp V.2.6.1 with this setting.

+
+ +

3.11. Making compiler-independent-build of mcpp

+

mcpp can be built as an independent preprocessor which behaves on its own not depending on any compiler systems. Making a compiler-independent-build is quite easy, because the almost only requirement is that the compiler system can compile mcpp's source successfully. The invocation options and other specifications of the compiler-independent-build are the same across the compilers with which mcpp is compiled. The include directories are not preset except /usr/include and /usr/local/include in UNIX-like systems, hence you have to specify the rest of them by environment variables or by -I option. *1, *2

+

To make a compiler-independent-build with GCC, simply do in the mcpp's root directory:

+
+./configure; make; make install
+
+

In this case, the header file configed.H is used. For further details of configuring, see the document INSTALL.

+

On a system where configure is not applicable, you can patch noconfig.H using the certain difference file in noconfig directory, if mcpp has already been ported to the compiler system. No other modification of source is needed. As a makefile, you can copy the corresponding *.mak file in noconfig directory, and edit the variable BINDIR to specify the installation directory. Then, in src directory, do 'make' and 'make install'.

+

In case of the version of the compiler differs a little from the already ported version, first apply the patch for the nearest version, then edit noconfig.H.

+

For the compiler systems to which mcpp is not yet ported, edit noconfig.H and modify or add several macros. First, define HOST_COMPILER appropriately. Next, define COMPILER as INDEPENDENT, and define VERSION_MSG appropriately. There is no target compiler for the compiler-independent-build, so nothing is required in PART 1.

+

PART 2 depends on the extent to which the host compiler implements the Standard's specifications, and also depends on whether the necessary functions are provided. +The most often encountered discrepancy among the compilers is implementation of 'long long' or its corresponding data type. +In Visual C 2002, 2003, 2005 and Borland C 5.5, the type is '__int64'. +It's length modifier for printf() is 'I64', not 'j' nor 'll', except Visual C 2005. +Hence, define the macro LL_FORM as "I64" for these compilers. +On MinGW, the specifier is also "I64", though it has long long. +In Visual C 2008, type name 'long long' is available.

+

If the compiler's library has not the function stpcpy(), define HOST_HAVE_STPCPY to FALSE.

+

Write makefile yourself referring the *.mak files. (Refer 3.7 too.)

+

Mac OS X provides a cross compiler as well as a native compiler so that we can make binaries for both of x86 and powerpc on either machine. +Moreover, it provides a mechanism to make a "universal binary", which is a bundle of binaries for x86 and powerpc. +Therefore, the settings necessary to compile mcpp on Mac OS X is a bit complex. +I explain compiler-independent-build and compiler-specific-build together at 3.1.4.

+

By the way, at the SourceForge site, mcpp V.2.6.3 and later supplies some binary packages of compiler-independent-build. These are the ones packaged after each packaging method, and their packaging specifications are found in the setting files contained in each corresponding source package. All the packages on FreeBSD, Linux and Mac OS X use configure script to compile.

+

Note:

+

*1 In mcpp V.2.4 and V.2.5, the specification of the compiler-independent-build was a compromise with the compiler's specification. From V.2.6 on, the specification is its own and independent from the compiler.

+

*2 Even if you could compile mcpp on MS-DOS, you may run into shortage of memory on execution, since the memory is very scarce on MS-DOS. You must largely cut down translation limits before compiling. Refer 3.10.

+
+ +

3.12. Making subroutine-build of mcpp

+

mcpp can be compiled as a subroutine to be called from some other main program. Like a stand-alone preprocessor, this subroutine accepts execution options from the caller, preprocesses the specified input file, writes its result into the output file, then returns to the caller. It can be called repeatedly on several input files, if required. It does not, however, pass on the output token by token to its caller.

+

The subroutine-build also can write output into on-memory buffer.

+

mcpp is compiled as a subroutine when a macro MCPP_LIB is defined to non-0. The entry to this subroutine is mcpp_lib_main() which is a rename of main() in stand-alone-build, and is declared as:

+
    int mcpp_lib_main( int argc, char ** argv);
+

If you use GCC, do not define the macro COMPILER to GNUC, leave it defined as INDEPENDENT, because GCC-specific setting generates an executable to be installed into GCC libexec directory and to be called from gcc command, which is not the desired one.

+

On the other hand, if you use Visual C, Borland C or LCC-Win32, you can define COMPILER to either of INDEPENDENT or one of MSC, BORLANDC, LCC, because these compilers have no independent preprocessor and they never call mcpp even if it is compiled with compiler-specific settings. Each compiler-specific setting defines the compiler-specific predefined macros, compiler-specific options, and some peculiar language specifications. You can choose either of compiler-specific or compiler-independent setting for your convenience.

+

There are two ways of compiling subroutine (library) build: using configure script and using noconfig/*.mak makefiles.

+ +

3.12.1. Using configure

+

You can use 'configure' script, if you compile with GCC.

+
+./configure --enable-mcpplib
+make
+sudo make install
+
+

On Linux and FreeBSD, these commands will generate libmcpp.a and libmcpp.so.$(SHLIB_VER) of compiler-independent-build, and will install them into /usr/local/lib by default. +Then libmcpp.so and libmcpp.so.0 will be created as links to libmcpp.so.$(SHLIB_VER). +The *.a is a static library, and the *.so is a shared library. +The file named libmcpp.la will also be created, which is for the tool 'libtool'. +$(SHLIB_VER) is 0.0.0 on mcpp V.2.6.3, 0.0.1 on V.2.6.4, 0.1.0 on V.2.7, 0.2.0 on V.2.7.1 and 0.3.0 on V.2.7.2. +Also header files mcpp_lib.h and mcpp_out.h are installed into /usr/local/include, which are necessary for user program to use libmcpp.

+

On Mac OS X, the name of the shared library is *.dylib, not *.so. +And, if you specify some CPUs by -arch option, such as "make CFLAGS+='-arch i386 -arch ppc'", a universal binary for those CPUs will be generated. +In addition, you can widen the range of Mac OS X version on which the binary will run by -isysroot and -mmacosx-version-min= options. +This is an example to generate a shared library on Leopard as a universal binary for i386 and ppc usable on Tiger.

+
+make CFLAGS+='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch ppc'
+
+

On CygWIN and MinGW, DLL named *.dll will be generated instead of *.so. +On CygWIN, libmcpp.a, libmcpp.dll.a, libmcpp.la will be generated and installed into /usr/local/lib, and cygmcpp-0.dll will be generated and installed into /usr/local/bin. +On MinGW, those are the same with CygWIN, except cygmcpp-0.dll changes to libmcpp-0.dll. +To use the DLL, link your main program against libmcpp.dll.a, which is an 'import library' for the DLL.

+

Also main_libmcpp.c is compiled and installed into /usr/local/bin under the name of mcpp which links the generated libmcpp.so. +As you see in the source, you should include mcpp_lib.h to use libmcpp. *1

+

Minimal documents are installed too.

+

You can compile testmain.c as well and link it against one of the libraries. +The configure does not do this. +See 3.12.2.

+

Note:

+

*1 The compiler-independent-build of stand-alone mcpp, which does not use libmcpp, is installed into the same directory under the same name. +So, they overwrite each other. +As for documents, the same ones are installed into the same directory, so overwrite each other.

+ +

3.12.2. Using noconfig/*.mak

+ +

If you use 'noconfig.H' and the makefiles in 'noconfig' directory, (after applying an appropriate patch to noconfig.H according to the compiler and its version, and adjusting the directory settings in the makefile), do:

+
+make MCPP_LIB=1 mcpplib
+make MCPP_LIB=1 mcpplib_install
+
+

While the above commands makes a compiler-independent-build, you can also make a compiler-specific-build by adding an option 'COMPILER=MSC' or the like, unless the compiler is GCC.
+For Visual C, use 'nmake' instead of 'make'.
+Since the 'make' command attached to LCC-Win32 cannot handle 'if' directive, you must edit the makefile whenever you do different 'make's.

+

On Linux, FreeBSD, Max OS X, CygWIN and MinGW, the result is the same with that of the configure above, except libmcpp.la is not created and the documents are not installed.
+On Mac OS X, if you remove the '#' which comments out the definition of variable UFLAGS in mac_osx.mak, universal binary will be generated for each library.
+On Windows, the name of the libraries are different from those on Linux as shown in the table below.

+ + + + + + +
FreeBSD / GCCLinux / GCCMac OS X / GCCCygWIN / GCCMinGW / GCCVisual C, Borland C, LCC-Win32
static librarylibmcpp.alibmcpp.alibmcpp.alibmcpp.alibmcpp.amcpp.lib
shared library or DLLlibmcpp.so.$(SHL_VER)libmcpp.so.$(SHLIB_VER)libmcpp.$(SHLIB_VER).dylibcygmcpp-$(DLL_VER).dlllibmcpp-$(DLL_VER).dllmcpp$(DLL_VER).dll
import library of DLLlibmcpp-$(DLL_VER).dll.alibmcpp-$(DLL_VER).dll.amcpp$(DLL_VER).lib
+ +

+$(SHL_VER) is 0, 1, 2, 3 on mcpp V.2.6.3-V.2.6.4, V.2.7, V.2.7.1, V.2.7.2, respectively. +$(SHLIB_VER) is 0.0.0, 0.0.1, 0.1.0, 0.2.0, 0.3.0 on mcpp V.2.6.3, V.2.6.4, V.2.7, V.2.7.1, V.2.7.2, respectively. +$(DLL_VER) is 0 on any of mcpp V.2.6.3, V.2.6.4, V.2.7, V.2.7.1 and V.2.7.2. +If the first digit of $(SHLIB_VER) or $(DLL_VER) is the same, the versions with the higher second or third digit of $(SHLIB_VER) are upper-compatible to the one with lower second or third digit.

+

On Windows, so-called 'import library' is generated too, which is to use the DLL. +In order to use the DLL, you must link your main program against this import library. +The static library and the import library are installed into the $(LIBDIR) specified in the makefile, and the DLL itself is installed into the $(BINDIR). +Note that any DLL must be located at some of the execution directories specified by the environment variable PATH on Windows.

+

mcpp_lib.h and mcpp_out.h are installed into $(INCDIR).

+

main_mcpplib.c is compiled and installed into $(BINDIR) under the name of mcpp, which links libmcpp. +On Windows, an option 'DLL_IMPORT=1' specifies to link against DLL.

+

You can test libmcpp further by compiling testmain.c as a main program and linking it against one of the libraries as follows.

+
+make testmain
+make testmain_install
+
+

testmain.c also has a sample to pass output via memory buffer. +To enable the memory buffer, include the header file 'mcpp_lib.h' in your main program, and use the functions declared in it. +The option 'OUT2MEM=1' will enable this in testmain.c. +Note that the macro OUT2MEM is only for testmain.c, not for mcpp. +

When you use the library-build of mcpp, write your makefile referring to noconfig/*.mak, and write your main program referring to testmain.c.

+ +

3.12.3. Static library and shared library or DLL

+

There are two kinds of library: static and shared. +On Windows the latter is called DLL (dynamically-linked library). +A static library is a collection of *.o (*.obj) files, which is linked (i.e. copied) to an executable at compile time. +All the global names of functions and data in the static library are visible to the executable, and face to danger of name collisions. +This is a problem for mcpp, since it had been developed without considering library use until V.2.6.1. +On the other hand, a shared library (or a DLL) is linked at run time, and shared by several executables, if any, at the same time.

+

On Windows, the global names in the DLL are not visible from outside, and only the names explicitly exported can be imported. +From the DLL of mcpp, for example, only the names in mcpp_lib.h can be imported.

+

On UNIXes, the global names in the shared library are all visible from outside by default, hence you have to be sensitive to name collisions. +GCC 4.0 and later, however, can cope with this problem. +From the shared library of mcpp V.2.7 and later, compiled by GCC V.4.0 or later, only the names in mcpp_lib.h are visible. *1, *2

+

To sum up, it is recommended to use DLL on Windows and shared library compiled by GCC 4.0 or later on UNIXes, because you need not to worry about name collision on these libraries.

+

Note:

+

*1 mcpp V.2.7 and later uses '#pragma GCC visibility *' directive which has been implemented since GCC V.4.0.

+

*2 Though GCC V.4.1 and later have '-fstack-protector' option, the option does not seem to coexist with '#pragma GCC visibility hidden' directive. +So, the option can't be used to compile libmcpp.

+
+ +

4. How to port mcpp to each compiler system: Details

+ +

4.1. Setting of noconfig.H, configed.H, system.H

+

I think you should be able to understand most of what is written in these header files if you read them. I have written lots of comments as well. In case, I write the following note.

+

noconfig.H (configed.H) contains PART 1 and PART 2 of the settings, and PART 3 is in system.H.

+

First, select the target system (the system for which mcpp is to be built) and the host system (the system which compiles mcpp.).

+
    +
  • SYSTEM
    +Select the OS which the target compiler will be operated on. The name of the OS is defined right after this. Define appropriately for the OS which is not defined.
    +
  • COMPILER
    +Select the target compiler system. The name of the compiler is defined right after this. Define appropriately for the compiler systems which are not defined. When COMPILER is defined as INDEPENDENT, compiler-independent-build of mcpp will be made, which has no target compiler. In this case, most of the settings in PART 1 are ignored.
    +
  • VERSION_MSG
    +Write the version information of the host compiler as a string literal to be displayed by -v option or by usage().
    +
  • HOST_SYSTEM, HOST_COMPILER
    +Select the host OS and the host compiler system. If these are the same as the target, set as
    +
    +#define HOST_SYSTEM     SYSTEM
    +#define HOST_COMPILER   COMPILER
    +
    +
+

Though there is a certain naming convention for SYSTEM and COMPILER, it is easier to see the source code. Though this is overstating it a bit, SYSTEM is only used for the type of path list of include files or to know the standard include directory of the OS, so one does not need to be concerned with it too much.

+ +

4.1.1. PART 1: Setting of Target system: for Compiler-specific-build

+ +

4.1.1.1. Predefined macros

+
    +
  • SYSTEM_OLD, SYSTEM_STD1, SYSTEM_STD2, SYSTEM_EXT, SYSTEM_EXT2, COMPILER_OLD, COMPILER_STD1, COMPILER_STD2, COMPILER_EXT, COMPILER_EXT2
    +Specify the unique macro name of the compiler system, which will be predefined in mcpp, in a string literal. Leave undefined any unnecessary ones (should not define to 0 token). *_OLD generate old style macros which do not begin with '_' (underscore), these won't be predefined at mcpp execution time if more than 1 is specified for <n> of the -S<n> option. +(Except GCC-specific-build which predefines these macros even in STD mode, unless -ansi or -std=iso* option is specified.) +In *_STD?, *_EXT and *_EXT2, always specify the macro name beginning with '_'. *_STD1 starts from __, and *_STD2 starts from __ and end with __. In SYSTEM_EXT, SYSTEM_EXT2, COMPILER_STD1, COMPILER_STD2, COMPILER_EXT and COMPILER_EXT2, the value of their macros are also specified by SYSTEM_EXT_VAL, SYSTEM_EXT2_VAL, COMPILER_STD1_VAL, COMPILER_STD2_VAL, COMPILER_EXT_VAL and COMPILER_EXT2_VAL, respectively. This is defined by a string literal which is the integer enclosed by "". The macro that expands to a 0 token is defined as "". If nothing is specified, the value of the macro becomes 1. All other predefined macros (the ones specified by SYSTEM_OLD, SYSTEM_STD1, SYSTEM_STD2, COMPILER_OLD) have a value of 1.
    +
  • SYSTEM_SP_OLD, SYSTEM_SP_STD
    +Write the compiler system unique special predefined macro name as a string literal, and define the values by SYSTEM_SP_OLD_VAL and SYSTEM_SP_STD_VAL.
    +
  • COMPILER_SP1, COMPILER_SP2, COMPILER_SP3
    +Write the compiler system unique special predefined macro name as a string literal, and define its values by COMPILER_SP1_VAL, COMPILER_SP2_VAL and COMPILER_SP3_VAL.
    +
  • COMPILER_CPLUS, COMPILER_CPLUS_VAL
    +Specify the name and the value of the compiler system's unique predefined macro, which is defined when -+ option (C++ preprocess) is specified, by the string literal as above. If COMPILER_CPLUS_VAL is not specified, the macro value becomes 1. The name has to begin with '_'. If not required, leave COMPILER_CPLUS itself undefined.
    +
+

There are some other macros predefined in system.c according to run-time options, such as CPU-dependent ones. Besides, GCC V.3.3 or later predefines many macros, hence mcpp installation auto-generates specific 4 header files named mcpp_g*.h for those macros.

+

All the macros predefined by above settings become disabled by the -N option at execution time.

+ +

4.1.1.2. Include directories and others

+
    +
  • C_INCLUDE_DIR1, C_INCLUDE_DIR2, CPLUS_INCLUDE_DIR1, CPLUS_INCLUDE_DIR2, CPLUS_INCLUDE_DIR3
    +Specify the include directory of the standard header files searched by mcpp. CPLUS_INCLUDE_DIR? should be set when the include directory of C++ is different from that of C. (When invoking mcpp, this is enabled by the -+ option.) As /usr/include, /usr/local/include in UNIX are set in system.c, compiler-system-specific-directories should be set in C_INCLUDE_DIR?.
    +
  • ENV_C_INCLUDE_DIR, ENV_CPLUS_INCLUDE_DIR
    +Define the environment variable name, with which the include directory for the standard header file searched by mcpp is specified at execution time.
    +ENV_CPLUS_INCLUDE_DIR is the name of the environment variable which specifies the include directory of C++.
    +Each of them is defined as "INCLUDE", "CPLUS_INCLUDE" as a default. For GCC-specific-build, "C_INCLUDE_PATH" and "CPLUS_INCLUDE_PATH" are the defaults.
    +Other search paths are setup in system.c and by the -I option. (About the priority of these, see mcpp-manual.html#4.2.)
    +
  • ENV_SEP
    +When writing multiple paths in the above environment variable, write separators in the literal constant. This is ':' of /usr/local/abc/include:/usr/local/xyz/include or ';' of C:/BC55/INCLUDE;C:/BC55/LOCAL/INCLUDE.
    +
  • SEARCH_INIT
    +Specify the default rule when searching the include file. When processing the directive such as #include "../dir/header.h", the rule of which directory should be searched first. If this is specified to CURRENT, it starts to search the relative path from the current directory of mcpp invocation. If specified as SOURCE, it starts searching from the directory with the source file (includer). If specified to (CURRENT & SOURCE), it starts searching the relative path from the current directory first, then the directory with the source file.
    +
+ +

4.1.1.3. The output format of line number information and others

+
    +
  • LINE_PREFIX
    +Specify the format for passing the file name and the line number information from mcpp to the compiler-proper.
    +
    +#line 123 "fname"
    +
    +The format of the above Standard C source code is set as default. Write an alternative sequence into the string literal to replace this "#line " for compilers which use other formats.
    +
    +#123 "fname"
    +
    +If the above is the format, define as "# ". If it is a peculiar format, which is not any of the above, define the format to match. (In some cases, these may need to be added to sharp() or other functions in main.c)
    +When mcpp is used in the front end of a one-pass compiler, such as Visual C or Borland C, the output of mcpp has to be the Standard C source code to be able to pass the output to the built-in preprocessor. Hence, the transfer of the line number has to be the first format.
    +
    +
  • EMFILE
    +If EMFILE is not the macro for the value of errno, which means "too many open files (for the process)" in <errno.h>, define EMFILE into the macro name (Of course, you can add to <errno.h> itself).
    +
    +
  • ONE_PASS
    +If the target compiler is the so-called one-pass-compiler in which the preprocessor is not separated, then set this to TRUE, otherwise set this to FALSE. If this is set to TRUE, all the predefined macros of the compiler system will be output enclosed within comment marks by #pragma MCPP put_defines (#put_defines). This is to prevent duplicate definitions, as it will be preprocessed again if the output of mcpp is passed onto the compiler.
    +Though GCC 3 or 4 integrate preprocessor into its compiler, this macro should be set to FALSE as an independent preprocessor can also be used.
    +
    +
  • FNAME_FOLD
    +Define this as TRUE for the OS which does not distinguish upper and lower case in file names as Windows, otherwise set this to FALSE.
    +
+ +

4.1.1.4. Settings corresponding to the system's language specifications

+
    +
  • EXPAND_PRAGMA
    +Set this to TRUE for the compiler which expand macro unless STDC is the first argument of #pragma line. This is set to FALSE in default. In Visual C and Borland C, set this to TRUE as the argument of #pragma line is always subject to macro expansion. In C99, it is implementation-defined whether or not the argument is macro expanded, and in C90 the argument is never expanded. However, mcpp, if and only it is implemented for Visual C or Borland C, expand macros even in C90 mode, except the argument of the #pragma line starts with STDC or MCPP.
    +
    +
  • HAVE_DIGRAPHS
    +Set this to TRUE when the compiler can process digraphs, otherwise set this to FALSE.
    +
    +
  • STDC
    +This defines the default value of the predefined macro __STDC__ in the target compiler. If __STDC__ is not defined, set this to 0.
    +
  • STDC_VERSION
    +This defines the default value of the predefined macro __STDC_VERSION__ in the target compiler. If __STDC_VERSION__ is not defined, set to 0L.
    +
    +
  • CHARBIT, UCHARMAX, LONGMAX, ULONGMAX
    +Write values of CHAR_BIT, UCHAR_MAX, LONG_MAX, ULONG_MAX in <limits.h> of the target compiler system.
    +Be careful about the definition of UCHAR_MAX, because limits.h of some system has a wrong definition. Define as a signed value as 255 or 0xff, do not define as an unsigned value as 255U or 0xffU. (See cpp-test.html#5.1.3.)
    +
+ +

4.1.1.5. Multi-byte characters

+

The macro called MBCHAR is used to specify the type of encoding for multi-byte characters. In mcpp, all the following encodings are implemented at the same time. MBCHAR only specifies the default encoding, that can be changed by environment variables/options/#pragma at execution time (Refer mcpp-manual.#2.3, mcpp-manual.html#2.8, mcpp-manual.html#3.4 for how to use).

+
    +
  • MBCHAR
    +Define the encoding for multi-byte characters, that is Kanji in Japanese, of the target.
    +
    + + + + + + + + +
    EUC_JP Japanese extended UNIX code (UJIS)
    SJIS Japanese shift-JIS (MS-Kanji)
    GB2312 Chinese EUC-like GB2312 (simplified-Chinese)
    BIGFIVE Taiwanese Big Five (traditional-Chinese)
    KSC5601 Korean EUC-like KSC-5601 (KSX 1001)
    ISO2022_JPInternational standard ISO-2022-JP1 Japanese
    UTF8 A type of encoding of Unicode, UTF-8
    +
    +The first five are all encodings with a character occupying 2-bytes and without shift-states. Though wchar_t is a 4-byte type in some compiler systems, despite the encoding of multi-byte characters and wide characters being 2-byte, the preprocessor is not concerned with the type of wchar_t. As multi-byte or wide characters occupy 2-bytes on source code, it processes accordingly.
    +
    +ISO-2002-* is the encoding with shift-states. UTF-8 is used to encode 2-byte Unicode to 1, 2 or 3-bytes. Kanji (Chinese characters) become 3-bytes.
    +
    +When MBCHAR is defined to 0, multi-byte character is not processed by default, and the environment variables/options/#pragma can change it at execution time.
    +
    +
  • SJIS_IS_ESCAPE_FREE
    +Set this to TRUE when the compiler-proper processes shift-JIS. If the compiler-proper does not process it, then set to FALSE.
    +In Shift-JIS, there are cases where the second byte of Kanji is the value of 0x5c which is the same as '\\'. If the compiler-proper does not recognize shift-JIS, it interprets it as an escape sequence and gets an error at tokenization.
    +If SJIS_IS_ESCAPE_FREE is set to FALSE, mcpp processes shift-JIS. That is, when 0x5c is the second byte of shift-JIS Kanji within the string literal or character constant at the final mcpp output time, it adds one more 0x5c. This tentatively makes the English version compiler support characters such as Shift-JIS.
    +
  • BIGFIVE_IS_ESCAPE_FREE
    +Same as above, set this to TRUE when the compiler-proper processes Big 5, and set to FALSE if not.
    +
  • IS02022_JP_IS_ESCAPE_FREE
    +Same as above, set this to TRUE if the compiler-proper processes ISO-2022-JP and set to FALSE if not. With ISO-2022-*, there may be the bytes which match not only to '\\', but also to '\'' or '"'. If ISO2022_JP_IS_ESCAPE_FREE is FALSE, mcpp inserts a 0x5c byte before all bytes matching to '\\', '\'', '"'.
    +
+

By the way, the behavior of the compiler as regards multi-byte characters may vary depending on the environment at execution time. Set these macros to match your environment. Regarding this, please refer to mcpp-manual.#2.8.

+ +

4.1.1.6. Target and host system common settings

+

The next two are written in PART 2 for convenience. Set these TRUE when both target and host systems have the nominated type, otherwise set to FALSE.

+
    +
  • HAVE_LONG_LONG
    +Set this to TRUE for the compiler system which has the data type of 'long long'. Set this to TRUE, for compilers such as Visual C of up to 2005 or Borland C 5.*, which do not have 'long long' but there are the same size data type __int64 and provides length modifier to display the value by printf(). +Visual C 2008 has the 'long long' type.
    +
  • HAVE_INTMAX_T
    +If the data type called 'intmax_t' is defined, set this to TRUE.
    +
    +
  • LL_FORM
    +If the system has 'long long', define the length modifier for displaying the maximum integer type value of the host compiler system in printf(). This is "j" in C99. Also, the length modifier of 'long long' is "ll" (ell-ell) in C99. In Visual C 2003 or older and Borland C 5.*, use "I64" to display the value of '__int64'. Also in MinGW, use "I64".
    +
+ +

4.1.2. PART 2: Setting of Host system

+

In noconfig.H and configed.H, the target system is assumed to be the same as the host system. If not, PART 2 needs to be rewritten.

+
    +
  • HOST_HAVE_STPCPY
    +If the library of the host system has stpcpy(), define this to TRUE. If not, define to FALSE. If it is set to FALSE, stpcpy() in system.c is used.
    +
    +
  • PATHMAX
    +The value of PATH_MAX defined in <limits.h> of the host system. +If it is not available, FILENAME_MAX in <stdio.h> will be used.
    +
+

Also in PART 1, there are a few parts which assume the target is the same as the host. Modify it, if required. For example, the line using the predefined macro of the host compiler as:

+
+#if _MSC_VER >= 1200
+
+ +

4.1.3. PART 3: Setting of the mcpp behavior specification

+ +

4.1.3.1. Several behavioral modes of new and old

+

In system.H, there are macro definitions to specify the behavioral specification of mcpp.

+

There is a variable named 'mcpp_mode' in mcpp source, and the value of this variable determines the frame of mcpp behavior, such as macro expansion method, available preprocessing directives and predefined macros. There are following 4 modes (4 values of variable 'mcpp_mode') in mcpp. The mode of mcpp is specified by the run-time options. Therefore, in compiling mcpp, nothing is required to be set concerning these 4 macros. Nevertheless, you must understand the difference of these behavioral modes in order to set the other macros correctly.
+There is another mode called COMPAT which is a variation of STD.

+
    +
  • OLD_PREP
    +"Reiser" model cpp behavior.
    +
  • KR
    +K&R 1st specification mode.
    +
  • STD
    +Standards (C90, C99, C++98) conforming mode.
    +
  • POST_STD
    +Special "post-Standard" mode created by the author, based on the Standards and simplified removing all the irregular specifications.
    +
+

In this document, I group OLD_PREP and KR into pre-Standard mode, and group STD and POST_STD into Standard mode. For the details of the specification of these modes, refer to mcpp-manual.html#2.1.

+ +

4.1.3.2. Specifying the details of the behavioral modes

+
    +
  • CPLUS
    +When executing as a C++ preprocessor by -+ option, the Standard macro __cplusplus is predefined to this value. This is 199711L for C++98. This can be changed at the execution time by -V option.
    +
    +
  • TRIGRAPHS_INIT
    +Specify the initial state of the trigraph processing. The -3 option reverses the state. If this is set to TRUE, trigraphs are recognized by default, while they become not recognized when invoked by -3 option. When this is set to FALSE, it is the other way around, trigraphs are not recognized by default, while they become recognized by the -3 option.
    +
  • DIGRAPHS_INIT
    +Specify the initial state of digraph processing. The -2 option reverses the state. If this is set to TRUE, digraphs are recognized as the default, while it becomes not recognized when invoked by the -2 option. When this is set to FALSE, it is the other way around, digraphs are not recognized by the default while it becomes recognized by the -2 option.
    +if HAVE_DIGRAPHS == FALSE, mcpp converts digraphs to normal tokens.
    +
  • OK_UCN
    +Set this to TRUE for making UCN (universal character name) effective when invoked by -V199901L or -+ options. Default is set to TRUE. *1
    +
  • OK_MBIDENT
    +Set this to TRUE to be able to use multi-byte characters in identifiers when invoked by -V199901L. Default is set to FALSE.
    +
    +
  • expr_t, uexpr_t
    +Typedef to the maximum integer type. If there are intmax_t, uintmax_t types, define to them. Else if the compiler systems have long long, unsigned long long, define to them. Else if the compiler systems have __int64, unsigned __int64, define to these. Else define to long, unsigned long. Note long long and unsigned long long is required in C99.
    +
  • EXPR_MAX
    +Define the maximum value of uexpr_t.
    +
+

Note:

+

*1 UCN is a C++98, C99 specification, notation of Unicode character value by hexadecimal escape sequence beginning with \u or \U. (See mcpp-manual.html#3.7, cpp-test.html#2.8, cpp-test.html#4.6).

+ +

4.1.3.3. Specifying translation limits

+
    +
  • RESCAN_LIMIT
    +Defines the limitation of rescan time at macro expansion in Standard mode. it does not need to be set to too big a value as the rescan time is usually small in Standard mode.
    +
  • PRESTD_RESCAN_LIMIT
    +Defines the limitation of rescan time at macro expansion in pre-Standard mode. An infinite loop can occur by recursive macro expansion, but this limitation can stop that.
    +
  • NBUFF
    +Define the maximum length +1 of the logical line (the line spliced deleting \ at the end of physical line of source code). The line after the comment converted to a space (it can spread out to multiple logical lines depending on comments) has to be within this length, too.
    +
  • NMACWORK
    +Define the internal buffer size of macro expansion. Hence, the result of expanding macros within one logical line (when macro call spreads out to multiple lines, the result of expansion), has to be within this size. This is also used for the maximum length for memorizing the replacement list of one macro definition internally. This should be greater or equal to NBUFF*2 and greater or equal to NWORK*2.
    +
  • NWORK
    +Defines the maximum length for output line of mcpp. This cannot be more than the maximum length +1 of what the compiler-proper can accept. Also, this cannot be more than the value of NBUFF. When the line length after the macro expansion exceeds this, mcpp divides that to the lines of length less than this value, then outputs. The length of string literal has to be within the range of NWORK-2. (The length of the string literal is not the number of elements of the char array, but the length of the string literal token in the source code including " on both sides. For example, \n is counted as 2 bytes. 'L' prefix is also counted for wide string literals.)
    +For GCC-specific-build and Visual C-specific-build, however, mcpp uses NMACWORK instead of NWORK for output line length. +In other words, it does not divide output line, because these compilers can accept very long line.
    +
  • IDMAX
    +Defines the maximum length of an identifier. A name longer than this value is not an error, but is cut down to this length.
    +
  • NMACPARS
    +Defines the maximum number of arguments of function-like macros. This cannot be bigger than UCHARMAX.
    +
  • NEXP
    +Defines the limit of the nest level bound by parentheses in #if expression (in reality, the nest level is not directly decided by this. Specifically, the number of constant tokens within an expression can be used up to two times of this, and the number of operator tokens that can be used is three times this value, counting a pair of parentheses as 2).
    +
  • BLK_NEST
    +Defines the limit of the nest level of #if (#ifdef, #ifndef) sections (how many levels #if and so on can be nested).
    +
  • INCLUDE_NEST
    +Define the limit of nest level of #include. This prevents infinite recursion of #includes. This can exceeds the limit imposed by OS on number of simultaneously opened files.
    +
  • SBSIZE
    +Defines the number of elements for the hash table when macros are internally classified by a hash and are stored. This has to be a power of 2. It operates correctly when the number is much smaller than the number of macros, but the process is slightly quicker when this is set to be bigger.
    +
+

The specification becomes better with bigger sizes for each, but the bigger the size of NWORK, NBUFF, NMACWORK or SBSIZE thus uses more memory. Other than the buffer, the actual memory consumption increases with the number of macro definitions. (Specifically, this is not the actual number of macro definitions themselves, but the total of each macro definition length, which is a problem. The internal format of macro definitions are written as 'struct defbuf' in internal.H)

+

NMACWORK, NEXP and RESCAN_LIMIT consumes stack.

+

Other settings do not need much memory, but it may be meaningless in real processing if the values are set to over the default ones within system.H.

+

The minimal limitations of translation limits required by C90 or C99 are written towards to the end of system.H. The translation limits of the C++98 are also written, but this is not the required specification, unlike the C Standards.

+
+ +

4.2. system.c

+

Some settings, mainly for the target compiler systems, are written here.

+
    +
  • PATH_DELIM
    +Defines path-delimiter of OS. PATH_DELIM must not be '\\' (for the program's convenience). This is set to '/' for Windows. Of course, you can use '\\' in user program, but it is converted to '/' internally.
    +
  • OBJEXT
    +Defines the suffix of the object file, generated by the compiler, in a string literal. These are "o" for compilers on UNIXes or "obj" for compilers on Windows. This is to be used for the output of the dependency lines for the makefile when one of the -M* option is specified.
    +
    +
  • do_options()
    +The invocation options are implemented. When port mcpp to compiler system to which mcpp hasn't been ported yet, you may need to add some lines to match the compiler driver of the system. When you add to do_options(), you also need to add to set_opt_list() and usage() correspondingly.
    +do_options() calls mcpp_getopt(), which has the same specification with getopt() of POSIX, so you have to decide whether the option character is with or without arguments. As a basic rule, the options like -P and -P- cannot be implemented simultaneously. (If this is necessary for compatibility with the compiler system's resident preprocessor, this can be done. Refer to the implementation of -M option.) Also, for the longer options such as -trigraphs, you have to implement by 't' as an option character and 'rigraphs' as an argument.
    +
  • set_opt_list()
    +Sets option characters for do_options().
    +
  • usage()
    +Usage message. The options are classified by modes and written in alphabetical order.
    +
  • set_sys_dirs()
    +Sets the include directory. Besides the compiler-specific directories specified in noconfig.H (configed.H) by the macros, C_INCLUDE_DIR? or CPLUS_INCLUDE_DIR?, /usr/include, /usr/local/include on UNIX OS are also set in this. (The include directories specified by environment variables, of which names are defined in noconfig.H or configed.H by the macros ENV_C_INCLUDE_DIR, ENV_CPLUS_INCLUDE_DIR, are setup in set_env_dirs()).
    +
    +
  • do_pragma()
    +The processing of #pragma is implemented. #pragma sub-directive, which mcpp does not process, is passed to the compiler-proper as is. Those which mcpp processes by itself, such as '#pragma MCPP debug', are processed by the functions called from this function. The sub-directives which mcpp processes by itself begin principally with the name of MCPP. '#pragma MCPP *' lines themselves are not outputted. Also, '#pragma once' line is not outputted. On the other hand, '#pragma __setlocale' line is outputted. In Standard C, the extension directive of individual compiler systems has to be implemented as #pragma sub-directive.
    +
  • do_old()
    +If you require the preprocessing directives which don't conform to Standard C (the ones which are not #pragma sub-directives such as #assert, #asm, #endasm, #include_next, #warning, #put_defines, #debug), add the function which processes that and call from here. (However, for GCC, #include_next, #warning can also be used in STD mode).
    +
+

Source code for getopt() and stpcpy() among non-Standard library functions are written here. getopt() is renamed to mcpp_getopt() in order to prevent linking troubles. The stpcpy() is used when HOST_HAVE_STPCPY == FALSE.

+
+ +

4.extra malloc()

+

"kmmalloc -- malloc() with debugging functions" is a portable source of malloc(), free(), realloc() and calloc() which I wrote. I wrote this to improve the memory efficiency and debugging convenience. I also attach the debug routine. Unexpected bugs can be caught if this is linked. *1, *2

+

The reason why I provide -DKMMALLOC -D_MEM_DEBUG -DXMALLOC options in noconfig/*.mak, is to link my malloc() which has debug routines. If the mcpp, linked with this, exits with error number EFREEP, EFREEBLK, EALLOCBLK, EFREEWRT or ETRAILWRT, it indicates a mcpp bug.

+

If you define any of BSD_MALLOC, DB_MALLOC or MALLOC_DBG to 1 and compile mcpp, with each debugging malloc() will be used, not my malloc(). In any case, to use the malloc() other than system library, you have to make the library before you compile. About this, please see the document of kmmalloc. (This document is written in Japanese only, sorry.)

+

Note:

+

*1 kmmalloc is at the following location.

+
+

http://download.vector.co.jp/pack/dos/prog/se026997.html

+
+

*2 In CygWIN, my malloc() cannot be used as other malloc()s are not allowed to be used by the library structure. +Also, Visual C 2005 and 2008 have the same kind of problem. +
+ +

5. Bug reporting and porting report

+ +

5.1. Is this a bug?

+

"The Validation Suite for the Standard C conformance of preprocessing" is also made public with mcpp. I tried to make this be able to verify all the specifications of Standard C preprocessing. Of course, mcpp is checked by this suite. It was also compiled by all the above mentioned compiler systems and verified. Therefore, I don't think there are much bugs or wrong specifications, but there may have been some left. When porting to new compiler systems never ported before, it may be that there are some bugs of the compiler systems.

+

If you find unusual behavior, please contact me. Please check the following points.

+
    +
  1. For STD mode, use the Validation Suite first to make sure your understanding of the Standard is correct. For the system with which GCC / testsuite can be used, automatic testing can be done by executing the 'configure' script with options first then executing 'make check'.
    +
  2. Check the document to make sure there are no mistakes in porting your mcpp.
    +
  3. Extract the sample source to reproduce the bug.
    +
  4. Trace the behavior of mcpp by enclosing the place where you get the bug with #pragma MCPP debug <args> and #pragma MCPP end_debug. Increase these <args> and trace in detail.
    +
+

If the diagnostic message of "Bug: ..." is displayed, that is definitely a bug of the mcpp or compiler systems (more like mcpp). Even if the mcpp goes out of control by processing jumbled "source", that is also a bug.

+

Of course, mcpp of modes other than STD behave "incorrectly" in the Validation Suite, as that is the specification. (Even that should not run uncontrollably). Please see 4.1.3 for details of the specifications.

+
+ +

5.2. Check for malloc() related bugs

+

There is a library called kmmalloc which I wrote, with functions such as malloc(). (Refer 4.extra

+

If mcpp is linked to my malloc() and exits out with the error number 120-124 (or 2120-2124 for some compilers), that is definitely the mcpp or compiler bug. (Possibly the library function's.) Also, if you write,

+
+#pragma MCPP debug memory
+
+

somewhere in the sample source used in the test, the information for the heap memory will be output at that location and at the end. If the error message "Heap error: ..." is shown there, then that is also the mcpp or compiler system's bug.

+

If any bugs are found, please repeat the test by enclosing each part of the sample source by #if 0 and #endif, and mark out where the bug is.

+
+ +

5.3. Bug report

+

Please attach the following data for the bug report.

+
    +
  1. The compiler system to which mcpp is ported.
    +
  2. Porting method (the configuration of noconfig.H, etc.)
    +
  3. Sample source to reproduce the problem.
    +
  4. The results.
    +
+
+ +

5.4. Porting report

+

I tried to write mcpp to be able to be ported relatively easily to any compiler system. However, I only have a small number of the compiler systems. Porting to other compiler systems will require adding some source code. I am looking forward to hearing about the porting reports to those compiler systems. I would like to feedback the reports into source.

+

Please include the following data in the porting report.

+
    +
  1. Compiler system.
    +
  2. The configuration of noconfig.H (configed.H), system.H and system.c. Possibly the difference file with the original is best, but just a note is fine for a simple one.
    +
+

For the compiler-specific-build, to check whether it has been ported correctly, it may be easiest replacing the preprocessor first and then re-compiling mcpp itself by using the pre-preprocess functionality.

+

Furthermore, use the Validation Suite for STD mode. However, this requires lots of effort when repeating the debug since there are so many files. During the debug, at first, compile 'n_std.c' to see if this compiles and executes correctly. Some compiler drivers attached to the system may not have the option to pass to the mcpp, please refer to mcpp-manual.html#2.2 for that. Alternatively, you can first preprocess with mcpp, then pass the output to the compiler.

+

If it failed, check manually where the problem is by using the sample n_std.t. If this is a success, check e_std.t, m_*.t, unspcs.t, warns.t and misc.t. In "post-Standard" mode, n_post.t and e_post.t should be used.

+

Process these with mcpp -QCz23 option (except -3 for post-Standard). If mcpp is compiled with STDC == 0, add -S1 -V199409L option as well. As the comments will also be outputted by the -C option, you should be able to see that the process result is the expected one or not.
+As the diagnostic messages are output to the file called mcpp.err by the -Q option, read it using a pager or similar. -z option omits the output of the header files.
+Digraph and trigraph becomes valid by -2 or -3. -S1 and -V199409L sets __STDC__ to 1 and __STDC_VERSION__ to 199409L.
+To test C99 compatibility, check n_std99.t, e_std99.t with -V199901L option.

+

If you use the program cpp_test.c in the Validation Suite, you can run the sample test of n_*.c, i_*.c automatically. (This is just to check yes and no, and this doesn't tell the details. Also, other tests such as e_*.?, u_*.?, unspcs.?, warns.? are not included. To test mcpp itself, it is quicker to compile n_std.c.)

+

Validation Suite has testcases for GCC / testsuite. Therefore, when mcpp is ported to one of the versions of GCC, mcpp's automatic test can be done by replacing the preprocessor of GCC to mcpp, if GCC / testsuite is installed. About this, please see cpp-test.html#3.2.3 and mcpp-manual.html#3.9.7.

+
+ +

5.5. Information about Configure for other compiler systems than GCC

+

mcpp provides the configure script available in UNIX-like systems. However, I do not have any idea for other compiler systems besides GCC in UNIX systems, so some options need to be specified to configure compiler-specific-build.

+

Someone who is using these compiler systems should know or be able to check about details of specifying these options. If you know, please let me know. I would like to do further work with the configure script.

+

Please refer INSTALL for the configure script.

+
+ +

5.6. I will try to port if you send me the data.

+

When you can't port successfully, please let me know what is happening. If you attach the following data, I may be able to return the ported source.

+

In environments where the configure can be used, you can find out lots of data through its use.

+

By the way, from mcpp V.2.6 onward, pre-C90 compiler system is excluded from supporting.

+
    +
  1. OS and the format of the path list. (I only know UNIX, DOS/Windows and OS-9.)
    +
  2. The compiler system and its version.
    +
  3. The basic character set is ASCII or not. The encoding of multi-byte characters (Kanji characters) is shift JIS or EUC-JP or something else. If the encoding includes the codes such as <backslash> in the multi-byte character like Shift-JIS, whether the compiler-proper recognizes this or not.
    +
  4. The shell (command processor) is case sensitive or not.
    +
  5. The file name is case sensitive or not.
    +
  6. The execution options which one wants to implement. The option passed from the compiler driver. The options when running by preprocessor alone. (One that cannot be implemented by getopt() is impossible.)
    +
  7. Whether the preprocessor is separated or built-in in the compiler.
    +
  8. The predefined macros of the compiler system and their values. How it goes for C++. (Distinguish between the macro passed from compiler driver by some options such as -D or the predefined macros of the preprocessor itself.)
    +
  9. Is there the data type long long? If there is long long, what is its length modifier for printf(). If there isn't long long, is there the same size type?
    +
  10. The argument of #pragma line is subject to the macro expansion?
    +
  11. What kind of name should be used for the environment variables to specify the include directory. What separator should be used for writing the multiple path in the environment variables.
    +
  12. Include directory for standard use. The rule when searching the header file by #include.
    +
  13. Is any necessary function missing from libraries?
    +
  14. Does the compiler proper recognize digraphs?
    +
  15. '$' needs to be used in an identifier?
    +
  16. Are there #asm and #endasm? How about the passing format of the block enclosed by these directives to the compiler proper? What are the other non-standard directives?
    +
  17. Which #pragma sub-directive should be processed by preprocessor?
    +
  18. How long is maximum length to be received by the compiler proper? (You can find out by compiling test_l/l_37_8.c in the Validation Suite.)
    +
  19. How many bytes can be identified for the identifier in the compiler proper?
    +
  20. After compiling, what is the suffix of "object file" before the link? (equivalent to .o of the compiler systems on UNIX or .obj of the systems on Windows.)
    +
  21. The result of the following sample t_line.c processed only by the preprocessor. (Use separated preprocessor or specify the output after preprocessing by option.) This is to see the method of passing the line number and file name information to the compiler proper. As the contents of <stdio.h> are too long, it is enough with the first 10-20 lines and the last 10-20 lines.
    +Also, for the compiler systems, which the processed results of #line 1000 does not become #line 1000 "t_line.c", but other formats such as #1000 "t_line.c", modify this to #line 1000 "t_line.c" and pass through to the compiler proper. Once it has been passed, check to see if this can be recognized or not. (If it does not error out by #line 1000 "t_line.c", it should have an error message in the line of the "error line;". Check to see how the line number displays in the error message.)
    +
+
+/* t_line.c */
+#include    <stdio.h>
+
+#line 1000
+
+    error line;
+
+main(void)
+{
+    return  0;
+}
+
+

If the host compiler and the target compiler are different, I need all the above data for both systems.

+

To look at it like this, there are so many things to check, but practically, most of the compiler systems should have common characteristics with the ones already successfully ported, so it should not have too many problems to port for just running. The implementations of the execution options, #pragma and the non-standard specification will be the relatively time consuming ones. These can be done gradually after porting just to be able to run. The only annoying aspects are when one gets caught by compiler bugs.

+
+ +

5.7. Please report the test of other compiler systems by the Validation Suite.

+

The Validation Suite results of preprocessors for the compiler systems I have are summarized in cpp-test.#6.

+

Please let me know the result of testing with other compiler systems. It may be a bit of effort, as there are so many items.

+

The test by cpp_test.c does not take long, please send me this. In case of GCC, the automatic test can be done by the Validation Suite.

+
+ +

5.8. The feedback for improvement

+

Besides reporting bugs, please send me feedback for anything, such as the handiness of mcpp, diagnostic messages, source code, Validation Suite, my interpretation of Standard C or the document writing method.

+

This preprocessor was created as a hobby, but it was the result of having devoted six and a half years, with lots of ideas even up until V.2.0. I want to make this the best, as much as I can, after such a work. About the C preprocessor, I think I have done almost everything meaningful, except testing and porting to the compiler systems I don't have. I would like to improve it if there are any problems that exist.

+

The code of Martin Minow was very clear, viceless and easy to understand, and I learned a lot by just reading this source code.

+

The people who are interested in this field may be very limited, but I am looking forward the feedback and the information.

+

Please send the information and the feedback to "Open Discussion Forum" at:

+

http://mcpp.sourceforge.net/

+

or by e-mail.

+
+ +

6. Long way to mcpp

+ +

6.1. Three days to plan and six years to develop

+

When I started messing about with DECUS cpp in Jan 1992, I had never even dreamed to take this long a stretch. I just thought I would change it a bit in the new years break.

+

Once I started, I realized I had to read the source properly and it took me about two months to read through. I did it because the source was worth reading as well. Then I revised some of the specification to adapt to C90. It was as planned till this point.

+

Then, I realized I did not really know the preprocessor specification of C90 precisely. When I read P. J. Plauger & Jim Brodie "Standard C" (1989), the function-like macro expansion methods turned my prejudice around completely. (A Japanese translation version of this part was miss-translated.) So I bought a copy of Standard C and I repeatedly read those difficult sentences related to preprocessing. As a result, I found the preprocessing of C90 is different in many points from the traditional one. The addition of #, ## operators are only a small part of them.

+

Significantly, I puzzled my brain about the function-like macro expansion routine. I thought it over for 2-3 weeks consulting the cpp source of E. Ream, and then I wrote the new macro expansion routine for C90. I have never used my brain so hard as for thinking the algorithm of the program. That was April, 1992.

+

Well, I thought I was over the hump and that the cpp playing was finished, but it took almost a further six years since then. There were not many problems that made me suffer during the rest. Nevertheless, it took so long. That was partly because I got bored thinking and couldn't concentrate on messing around with cpp. But that wasn't all. I did the following things.

+
    +
  1. Made the specification clearer. In Standard mode, completely adapted to the standard.
    +
  2. Re-structured the program/data structures to focus on the Standard C mode.
    +
  3. Changed the style of the source to improve portability.
    +
  4. To do debugging. Dealt with bugs or imperfections of the compiler systems.
    +
  5. Created the test programs which is the Validation Suite.
    +
  6. Tested other compiler systems.
    +
  7. Wrote documentation.
    +
  8. As I bought a new PC in July 1997, I spent the time for the installation and learning of WindowsNT/95, X Window System and their software. While doing that, C99-1997/11-draft had been released and it required adaptation to this.
    +
+

In this list, the documentation took a long time. Especially the last four years, the time changing the source was only a little bit while most of the time was dominated by writing the documentation. Due to that, the documentation became such a volume, but the time taken was not only because of the volume. When I was writing the documents, the uncertain parts of the specification kept coming up. Each time I re-read the Standards, I revised the source code. The length of time revising the source was not a lot, but the number of times revising the source was a lot. Not only the preprocess specifications, but I also read well whole of the Standard including the Rationale of ANSI C. It's like I learned C90 by creating the preprocessor. Also, I could understand the problems of the C90 standard through this.

+

At first, I wrote a few test programs as samples. However, I found unexpected bugs each time I wrote samples and tested on mcpp. Then I decided to write the Validation Suite which would test every specification of the C90 preprocess. The problems of C90 became obvious by writing this Validation Suite. To comply to the irregular parts of C90 was such trouble and a bit meaningless for myself, but I am sure there were more meaningful things.

+

What I learned through this work are the following things.

+
    +
  1. The program specification cannot be definite until finishing off the detailed document.
    +
  2. The debugging of the program cannot be completed until completion of the samples which test every specification.
    +
+

This thinking is a sort of perfectionism. Things in the world mostly cannot be achieved by perfectionism, and software is not an exception. Nevertheless, there are some areas for which perfectionism has a very important role. The language processing systems may be one of them.

+

I can say that I could spend so many years, through and through, because this was my hobby. But six and half years was too long. I kept thinking about who would be going to use this after I spent so many years to create a perfect program. I think this must be the limit of the size for making a program as a hobby.

+

Anyway, as I have already done mcpp, I will keep maintaining it. Therefore, could everyone please send me feedback, bug reports or porting reports.

+
+ +

6.2. V.2.3

+

After releasing mcpp V.2.0, I updated to V.2.1, V.2.2 and then V.2.3. These updates were adapting to C99 or officially approved ISO / C++, increasing the supported systems or fixing bugs.

+

I could update quite easily until V.2.2. It only took three months from V.2.0 to V.2.2. In contrast, it took nearly four years from V.2.2 to V.2.3. The main reason was that I became busy and didn't have enough time to spend. I cut down my jobs to 4 days a week after turning to 60 years of age in July 2000, then I went back to playing with cpp again.

+

V.2.3 not only took time but took quite a lot of work as well. When I ported to GCC V.2.9x, I found out that I had to modify a lot to keep the compatibility with GCC/cpp. I added many options and implemented the extended specifications. Also I eased restrictions of the Standard by downgrading some errors to warnings or removing the highly frequent warnings from the default warning class.

+

Lots of those modifications are backward ones and were not enjoyable. Especially, maintaining both the C99 specification and the part of the "traditional" specification earlier than C90 was very much against my will. Unfortunately, this is a reality of the open source world, I had to meet to certain expectations.

+

By relaxing the restrictions of the standard, I think mcpp became easier to use also for the other compiler systems, in replacing the system resident preprocessor.

+
+ +

6.3. Selected to "Exploratory Software Project"

+

During the update to V.2.3, mcpp and Validation Suite was selected to 2002 "Exploratory Software Project" of Information-technology Promotion Agency, Japan (IPA). I found out about this project by chance and I entered. Then, the project manager Yutaka Niibe selected me. That is how the development went from July 2002 to Feb 2003 by IPA's funding and based on PM Niibe's advice. The translation of the documents is also taken by HighWell.

+

Though this was relatively small software, it became a kind of my life work after spending so much time. I had confidence with the quality, but I was disappointed without having an opportunity to be known to the world. Finally, the opportunity was given. To accomplish this project, I cut down my job to three days a week.

+

These were the things that I had intended to do in this project.

+
    +
  1. Create English version of the documents. By using these, release mcpp and Validation Suite to the international sites. In the current situation of most C compiler systems being made outside Japan, it is vital to have English versions of the documents to spread and get evaluations for this.
    +
  2. Increase the compiler systems to support, especially the major commercial compiler systems, as well as the later versions of the compiler systems which have already been supported.
    +
+

Then, Project Manager Niibe proposed the following points:

+
    +
  1. Support GCC 3.x and make the Validation Suite to be able to be used in testsuite of GCC. +
  2. Make everything public during the development. +Adopt standard methods of sharing development and sharing the result, in order to ease sharing. +
+

As I wanted to do these things too, I gratefully added these points to the project.

+

Actually, however, my project had delay after delay for various reasons. First, I was hit by a disc crash. Whenever I did new things, it took a long time as I had to use new software never used before. It was also the first time to compile GCC from the source, but also I had got a few problems. The updating of massive volumes of documents and the review and the correction of English version also took a considerable time. Furthermore, my mother was admitted to hospital. As a result, a part of the project, such as the support of the commercial compiler systems, had to be given up at the end.

+

As I had always done the way which is like digging a hole deeper and deeper, it took a long time when I had to try to widen the hole. When an amateur-programmer digs deeper into the matter, this is the only way to do it. Nevertheless, to make the result to go out into the world, the hole had to be widened to some extent.

+

During the process of widening up the hole, I managed to learn some new software and to be in the frontline of development while receiving the advice and the encouragements from Project Manager Niibe. Also, I was delighted to see my documents coming back in a flowing English. Though being pressed for time was a painful thing, each experience was fresh and fun.

+

This "Exploratory Software Project" did not finish there. Project Manager Ichiji also selected mcpp as a continual project for year 2003. This is how I started to do some unfinished tasks from the previous year, and also some areas which I did not have experience of before.

+

This time, my six year old PC experienced some troubles, and there were also further troubles during the upgrade of the hardware and OS. It also took time to learn the new software, and of course, the development was getting behind schedule. The condition of my mother, who had been out of hospital and in relatively good condition, became worse along with getting closer to the end of the project. This was also a source of my anxiety. (My mother died in February, 2004.) However, thanks to Project Manager Ichiji setting the due date to a reasonable time frame, I could work the tasks through thoroughly without rushing.

+

I accomplished tasks such as the porting to Visual C++, the creation of the configure script and supporting the various multi-byte character encodings. I also managed to do the clean-up of the source code which, though inconspicuous, can not be ignored by myself as the author. The time consuming work of updating the Japanese and English documents was accomplished with the co-operation of HighWell.

+

With these achievements, I was evaluated as one of the "super-creator"s of software by PM Ichiji! Though it may be overestimation for my ability, I think it is mcpp development over years that was recognized, and I am very glad.

+

I think mcpp has become the world's best quality C/C++ preprocessor, thanks to the "Exploratory Software Project" which took nearly two years. As a middle-aged amateur-programmer, I am satisfied with myself having done my best.

+

I am keeping on updates of mcpp even after the project. Many tasks are still to be done. To achieve the remaining tasks and to make mcpp widely known, I will continue to proceed steadily.

+ + diff --git a/libraries/mcpp/doc/mcpp-summary.pdf b/libraries/mcpp/doc/mcpp-summary.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b6f2b52fada74647ebdff5e579ff1902a6264c57 GIT binary patch literal 170539 zcmbTd1yo$i(kPtZPH@-YHZZsbcXx*Y1`F;I9D=*M6Wk%V2M8JXOl>#c9r+Vt+~>awn??zO9-Ru-3JW@F(%rQX_}oIyq6Pmy6%Zgt1;|_3 zfk94IUSKnFHb_^AoQ;(g(n^!-k+ZRLv5|ALa*-Q6*IUsL} zKMyCcIVwa#4hUV=fBhgle!r31p(6bOu>rXt zN<9Dme;AOJi~AoiAP>hsU>uyRe}}QNa{q%KJI6m^yg>H9&xM$ajrVW#*m!t3*#8dW z1#w>^-9i{~HoIJjB=L5~ySI)B%V>!0fZq~t>i=6`Rv;_Kf7r#v31nph zc7o&&RDc>JbC5&CM+L~(ncI`|LYACd6_OHE?d@I2pAGW6r|blF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_{P%gPMA=-+Dtungdz*5BJ@1?=>Xe4M~;y_b)T3G~O< z*g$LmPVo2o*qE7E?~j8G%=%|OFqr9nyMX!qS(bzK{+$A1<7ED04gfR#!~WO-JH0\fP [\fI\fP]] +.SH DESCRIPTION +\fBmcpp\fR is a C/C++ preprocessor with the highest conformance which implements C90, C99 and C++98. +\fBmcpp\fR has plentiful diagnostics and many #pragmas. +It is useful to check portability of your program, and also useful to debug complicated macro. +This is a man-page for \fBmcpp\fR of GCC-specific-build. +.SH OPTIONS +\fBmcpp\fR expects two file names as arguments, \fI\fR and +\&\fI\fR. If not specified, \fI\fR defaults to standard input +and \fI\fR defaults to standard output. +.PP +It takes the following options. +.PP +Commonly used options: +.IP \fB-@MODE +Specify preprocessing mode. MODE should be one of these 4: +.IP " \fB-@std" +Standard conforming mode. (default) +.IP " \fB-@poststd, -@post" +special 'post-Standard' mode. +.IP " \fB-@kr" +K&R 1st mode. +.IP " \fB-@oldprep, -@old" +"old_preprocessor" mode (i.e. "Reiser model" cpp). +.IP \fB-b +Output #line lines in C source style (default: GCC style). +.IP \fB-C +Output also comments. +.IP "\fB-D [=]" +Define as (default:1). +.IP "\fB-D [=]" +Define as . +.IP "\fB-e " +Change the default multi-byte character encoding to one of: +euc_jp, gb2312, ksc5601, big5, sjis, iso2022_jp, utf8. +.IP \fB-finput-charset= +Same as -e . (Do not insert spaces around '='). +.IP "\fB-I " +Add to the #include search list. +.IP \fB-I- +Unset system or site specific include directories. +.IP "\fB-include " +Include the prior to the main input file. +.IP \fB-j +Do not output the source line in diagnostics. +.IP "\fB-M, -MM, -MD, -MMD, -MP, -MQ target, -MT target, -MF file" +Output source file dependency line for makefile. +.IP \fB-N +Don't predefine any non-standard macros. +.IP \fB-nostdinc +Unset system or site specific include directories. +.IP "\fB-o " +Output to . +.IP \fB-P +Don't output #line lines. +.IP \fB-Q +Output diagnostics to "mcpp.err" (default:stderr). +.IP "\fB-U " +Undefine . +.IP \fB-undef +Same as -N. +.IP \fB-v +Show version of \fBmcpp\fR. +.IP "\fB-W " +Set warning level to (OR of {0,1,2,4,8,16}, default:1). +.IP \fB-w +Same as -W0. +.IP \fB-z +Don't output the included file, only defining macros. +.PP +Options available with -@std (default) or -@poststd options: +.IP \fB-+ +Process C++ source. +.IP \fB-2 +Enable digraphs. +.IP \fB-digraphs +Enable digraphs. +.IP "\fB-h " +Re-define the pre-defined macro __STDC_HOSTED__ as . +.IP \fB-lang-c89 +Same as -S1. +.IP \fB-lang-c++ +Same as -+. +.IP "\fB-pedantic, -pedantic-errors" +Same as -W7. +.IP "\fB-S " +Redefine __STDC__ to , undefine old style macros. +.IP \fB-std= +Specify the standard to which the code should conform. + may be one of: c90, c99, iso9899:1990, iso14882, etc. +.br +iso9899:, iso14882: : Same as -V (long in decimals). +.IP "\fB-V " +Redefine __STDC_VERSION__ or __cplusplus to . +.br +C with -V199901L specifies C99 mode. +.br +C++ with -V199901L specifies C99 compatible mode. +.IP "\fB-x c++" +Same as -+. +.PP +Options available with only -@std (default) option: +.IP \fB-@compat +Expand recursive macro more than Standard. +.IP \fB-3 +Enable trigraphs. +.IP \fB-trigraphs +Enable trigraphs. +.IP \fB-K +Embed macro annotations into comments. +.PP +Options available with -@std (default), -@kr or -@oldprep options: +.IP \fB-lang-asm +Same as -x assembler-with-cpp. +.IP "\fB-x assembler-with-cpp" +Process "assembler" source. +.PP +Option available on Mac OS X / Apple-GCC: +.IP "\fB-arch " +Change the target to (one of i386, x86_64, ppc and ppc64). +.PP +Option available on CygWIN: +.IP \fB-mno-cygwin +Change include directory and predefined macros for msvcrt.dll rather than cygwin1.dll. +.SH PRAGMA +\fBmcpp\fR has the following #pragma directives. +.IP "#pragma once" +Read the header file only once even if multiply #included. +.IP "#pragma __setlocale( ""encoding"")" +Specify the multibyte character encoding to "encoding". +See -e option for the encodings. +.IP "#pragma MCPP put_defines" +Putout all the macro definitions currently valid. +.IP "#pragma MCPP debug " +Start to putout debugging informations. + should be one or more of: + token expand macro_call path if expression memory getc +.IP "#pragma MCPP end_debug " +Stop to putout debugging informations. + are the same with 'debug'. + No argument specifies all arguments. +.IP "#pragma MCPP push_macro( ""MACRO"")" +Save the macro definition to the stack. +.IP "#pragma MCPP pop_macro( ""MACRO"")" +Retrieve the macro definition from the stack. +.IP "#pragma MCPP preprocess" +"Pre-preprocess" the following header files for \fBmcpp\fR. +.IP "#pragma MCPP warning any message" +Putout warning "any message". +.SH "VERSION" +MCPP V.2.7 (2008/03) for GCC +.SH "SEE ALSO" +The full documentation for \fBmcpp\fR are maintained as html files. +Please see mcpp-manual.html. diff --git a/libraries/mcpp/mcpp.1 b/libraries/mcpp/mcpp.1 new file mode 100644 index 000000000..d63e2a128 --- /dev/null +++ b/libraries/mcpp/mcpp.1 @@ -0,0 +1,120 @@ +.TH MCPP "1" "Mar 2008" "alternative CPP" "User Commands" +.SH NAME +mcpp \- Matsui CPP, an alternative C preprocessor +.SH SYNOPSIS +mcpp [\fIoptions\fP] [\fI\fP [\fI\fP]] +.SH DESCRIPTION +\fBmcpp\fR is a C/C++ preprocessor with the highest conformance which implements C90, C99 and C++98. +\fBmcpp\fR has plentiful diagnostics and many #pragmas. +It is useful to check portability of your program, and also useful to debug complicated macro. +This is a man-page for \fBmcpp\fR of compiler-independent-build. +.SH OPTIONS +\fBmcpp\fR expects two file names as arguments, \fI\fR and +\&\fI\fR. If not specified, \fI\fR defaults to standard input +and \fI\fR defaults to standard output. +.PP +It takes the following options. +.PP +Commonly used options: +.IP \fB-@MODE +Specify preprocessing mode. MODE should be one of these 4: +.IP " \fB-@std" +Standard conforming mode. (default) +.IP " \fB-@poststd, -@post" +special 'post-Standard' mode. +.IP " \fB-@kr" +K&R 1st mode. +.IP " \fB-@oldprep, -@old" +"old_preprocessor" mode (i.e. "Reiser model" cpp). +.IP \fB-C +Output also comments. +.IP "\fB-D [=]" +Define as (default:1). +.IP "\fB-D [=]" +Define as . +.IP "\fB-e " +Change the default multi-byte character encoding to one of: +euc_jp, gb2312, ksc5601, big5, sjis, iso2022_jp, utf8. +.IP "\fB-I " +Add to the #include search list. +.IP \fB-I- +Unset system or site specific include directories. +.IP \fB-j +Do not output the source line in diagnostics. +.IP "\fB-M, -MM, -MD, -MMD, -MP, -MQ target, -MT target, -MF file" +Output source file dependency line for makefile. +.IP \fB-N +Don't predefine any non-standard macros. +.IP "\fB-o " +Output to . +.IP \fB-P +Don't output #line lines. +.IP \fB-Q +Output diagnostics to "mcpp.err" (default:stderr). +.IP "\fB-U " +Undefine . +.IP \fB-v +Show version of \fBmcpp\fR. +.IP "\fB-W " +Set warning level to (OR of {0,1,2,4,8,16}, default:1). +.IP \fB-z +Don't output the included file, only defining macros. +.PP +Options available with -@std (default) or -@poststd options: +.IP \fB-+ +Process C++ source. +.IP \fB-2 +Enable digraphs. +.IP "\fB-h " +Re-define the pre-defined macro __STDC_HOSTED__ as . +.IP "\fB-S " +Redefine __STDC__ to , undefine old style macros. +.IP "\fB-V " +Redefine __STDC_VERSION__ or __cplusplus to . +.br +C with -V199901L specifies C99 mode. +.br +C++ with -V199901L specifies C99 compatible mode. +.PP +Options available with only -@std (default) option: +.IP \fB-@compat +Expand recursive macro more than Standard. +.IP \fB-3 +Enable trigraphs. +.IP \fB-K +Embed macro annotations into comments. +.PP +Options available with -@std (default), -@kr or -@oldprep options: +.IP \fB-a +Process "assembler" source. +.SH PRAGMA +\fBmcpp\fR has the following #pragma directives. +.IP "#pragma once" +Read the header file only once even if multiply #included. +.IP "#pragma __setlocale( ""encoding"")" +Specify the multibyte character encoding to "encoding". +See -e option for the encodings. +.IP "#pragma MCPP put_defines" +Putout all the macro definitions currently valid. +.IP "#pragma MCPP debug " +Start to putout debugging informations. + should be one or more of: + token expand macro_call path if expression memory getc +.IP "#pragma MCPP end_debug " +Stop to putout debugging informations. + are the same with 'debug'. + No argument specifies all arguments. +.IP "#pragma MCPP push_macro( ""MACRO"")" +Save the macro definition to the stack. +.IP "#pragma MCPP pop_macro( ""MACRO"")" +Retrieve the macro definition from the stack. +.IP "#pragma MCPP preprocess" +"Pre-preprocess" the following header files for \fBmcpp\fR. +.IP "#pragma MCPP warning any message" +Putout warning "any message". +.SH "VERSION" +MCPP V.2.7 (2008/03) compiler-independent-build +.SH "SEE ALSO" +Do 'man mcpp-gcc' for \fBmcpp\fR of GCC-specific-build. +The full documentation for \fBmcpp\fR are maintained as html files. +Please see mcpp-manual.html. diff --git a/libraries/mcpp/noconfig/bc55.dif b/libraries/mcpp/noconfig/bc55.dif new file mode 100644 index 000000000..0b3dcb9c4 --- /dev/null +++ b/libraries/mcpp/noconfig/bc55.dif @@ -0,0 +1,44 @@ +*** noconfig.H 2007-08-26 23:06:23.000000000 +0900 +--- noconfig.H.bc55 2007-08-26 23:29:07.000000000 +0900 +*************** +*** 15,21 **** + */ + + /* Define target operating-system. */ +! #define SYSTEM SYS_FREEBSD + + /* Define target compiler. */ + #ifndef COMPILER +--- 15,21 ---- + */ + + /* Define target operating-system. */ +! #define SYSTEM SYS_WIN32 + + /* Define target compiler. */ + #ifndef COMPILER +*************** +*** 26,36 **** + #define HOST_SYSTEM SYSTEM + + /* Define host compiler. */ +! #define HOST_COMPILER GNUC + + /* Version message. */ + /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */ +! #define VERSION_MSG "GCC 3.4" + #if 0 + "LCC-Win32 2006-03" + "Visual C 2005" +--- 26,36 ---- + #define HOST_SYSTEM SYSTEM + + /* Define host compiler. */ +! #define HOST_COMPILER BORLANDC + + /* Version message. */ + /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */ +! #define VERSION_MSG "BCC V.5.5" + #if 0 + "LCC-Win32 2006-03" + "Visual C 2005" diff --git a/libraries/mcpp/noconfig/bc59.dif b/libraries/mcpp/noconfig/bc59.dif new file mode 100644 index 000000000..3c521d611 --- /dev/null +++ b/libraries/mcpp/noconfig/bc59.dif @@ -0,0 +1,73 @@ +*** noconfig.H 2008-09-25 15:34:56.000000000 +0900 +--- noconfig.H.bc59 2008-09-26 13:26:52.000000000 +0900 +*************** +*** 15,21 **** + */ + + /* Define target operating-system. */ +! #define SYSTEM SYS_FREEBSD + + /* Define target compiler. */ + #ifndef COMPILER +--- 15,21 ---- + */ + + /* Define target operating-system. */ +! #define SYSTEM SYS_WIN32 + + /* Define target compiler. */ + #ifndef COMPILER +*************** +*** 26,36 **** + #define HOST_SYSTEM SYSTEM + + /* Define host compiler. */ +! #define HOST_COMPILER GNUC + + /* Version message. */ + /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */ +! #define VERSION_MSG "GCC 3.4" + #if 0 + "LCC-Win32 2006-03" + "Visual C 2005" +--- 26,36 ---- + #define HOST_SYSTEM SYSTEM + + /* Define host compiler. */ +! #define HOST_COMPILER BORLANDC + + /* Version message. */ + /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */ +! #define VERSION_MSG "BCC V.5.9" + #if 0 + "LCC-Win32 2006-03" + "Visual C 2005" +*************** +*** 234,246 **** + #define ONE_PASS TRUE + #define COMPILER_STD2 "__TURBOC__" + #if __BORLANDC__ /* Borland C */ +! #define COMPILER_STD2_VAL "0x0550" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ + #define COMPILER_EXT "__BORLANDC__" +! #define COMPILER_EXT_VAL "0x0550" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ + #define COMPILER_CPLUS "__BCPLUSPLUS__" +! #define COMPILER_CPLUS_VAL "0x0550" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ + #define EXPAND_PRAGMA TRUE + #define SEARCH_INIT (CURRENT & SOURCE) +--- 234,246 ---- + #define ONE_PASS TRUE + #define COMPILER_STD2 "__TURBOC__" + #if __BORLANDC__ /* Borland C */ +! #define COMPILER_STD2_VAL "0x5930" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ + #define COMPILER_EXT "__BORLANDC__" +! #define COMPILER_EXT_VAL "0x5930" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ + #define COMPILER_CPLUS "__BCPLUSPLUS__" +! #define COMPILER_CPLUS_VAL "0x5930" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ + #define EXPAND_PRAGMA TRUE + #define SEARCH_INIT (CURRENT & SOURCE) diff --git a/libraries/mcpp/noconfig/borlandc.mak b/libraries/mcpp/noconfig/borlandc.mak new file mode 100644 index 000000000..b7f58be33 --- /dev/null +++ b/libraries/mcpp/noconfig/borlandc.mak @@ -0,0 +1,140 @@ +# makefile to compile MCPP version 2.7.1 and later for Borland C / BC make +# 2008/11 kmatsui +# You must first edit BINDIR, INCDIR, LIBDIR and LINKER according to your +# system. +# To make compiler-independent-build of MCPP do: +# make +# make install +# To make Borland-C-specific-build of MCPP do: +# make -DCOMPILER=BORLANDC +# make -DCOMPILER=BORLANDC install +# To re-compile MCPP using Borland-C-specific-build of MCPP do: +# make -DCOMPILER=BORLANDC -DPREPROCESSED +# make -DCOMPILER=BORLANDC -DPREPROCESSED install +# To link kmmalloc V.2.5.1 (malloc() package of kmatsui) or later do: +# make [-DPREPROCESSED] -DKMMALLOC +# make [-DPREPROCESSED] -DKMMALLOC install +# To make mcpp.lib (subroutine-build of mcpp) do: +# make -DMCPP_LIB mcpplib +# make -DMCPP_LIB mcpplib_install +# To make testmain.c (sample to use mcpp.lib) against mcpp.lib do +# (add '-DDLL_IMPORT' to link against the DLL): +# make [-DOUT2MEM] testmain +# make [-DOUT2MEM] testmain_install + +NAME = mcpp + +CC = bcc32 +CFLAGS = $(CFLAGS) -c -a -d -f- -G -5 -DWIN32 + # -DWIN32 is nessecary to compile with bcc32 +LINKFLAGS = -e$(NAME) + +!if $d( COMPILER) +CPPFLAGS = -DCOMPILER=BORLANDC +# BINDIR : Adjust to your system. +# for Borland C V.5.5 +CFLAGS = $(CFLAGS) -Oi +BINDIR = \PUB\COMPILERS\BCC55\BIN +!else +BINDIR = \PUB\BIN +!endif + +!if $d( KMMALLOC) +MEM_MACRO = -DKMMALLOC=1 -D_MEM_DEBUG=1 -DXMALLOC=1 +MEMLIB = kmmalloc_debug32.lib +!else +MEM_MACRO = +MEM_LIB = +!endif + +OBJS = main.obj directive.obj eval.obj expand.obj support.obj system.obj \ + mbchar.obj + +all: $(NAME).exe + +$(NAME).exe : $(OBJS) + $(CC) $(LINKFLAGS) $(OBJS) $(MEMLIB) + +!if $d( PREPROCESSED) +# Make a "pre-preprocessed" header file to recompile MCPP with MCPP. +mcpp.H : system.H noconfig.H internal.H + $(BINDIR)\$(NAME) $(CPPFLAGS) $(MEM_MACRO) preproc.c mcpp.H +$(OBJS) : mcpp.H +!else +main.obj directive.obj eval.obj expand.obj support.obj system.obj mbchar.obj: \ + system.H internal.H noconfig.H +!endif + +!if $d( PREPROCESSED) +.c.obj : + $(BINDIR)\$(NAME) -DPREPROCESSED=1 $(CPPFLAGS) $< $(= ARG_LIM) { + fprintf( stderr, "Too many arguments.\n"); + return 1; + } + status = exec_program( argc, argv); + /* MinGW does not have fork() nor wait(). */ + return status; +} + +int exec_program( int argc, char ** argv) { + char * buf[ ARG_LIM]; + char temp[ FILENAME_MAX]; + char * tp; + int plus = 0; + int n = 1; + int i; + int status; + size_t len; + + if (strstr( argv[ 0], "cc1plus")) + plus = 1; /* C++ */ + tp = strstr( argv[ 0], "cc1"); + len = tp - argv[ 0]; + memcpy( temp, argv[ 0], len); + temp[ len] = '\0'; + tp = temp + len; + for (i = 1; i < argc; i++) + if ((strcmp( argv[ i], "-fpreprocessed") == 0) + || (strncmp( argv[ i], "-traditional", 12) == 0)) + break; /* Invoke cc1 or cc1plus */ + if (i < argc) { + strcpy( tp, plus ? "cc1plus_gnuc.exe" : "cc1_gnuc.exe"); + } else { /* Invoke mcpp */ + strcpy( tp, "mcpp.exe"); + if (plus) + buf[ n++] = "-+"; /* Insert the option */ + } + buf[ 0] = temp; + for (i = 1; i < argc; i++, n++) + buf[ n] = argv[ i]; + buf[ n] = NULL; + + status = spawnv( _P_WAIT, buf[ 0], buf); + return status; +} diff --git a/libraries/mcpp/src/config.h.in b/libraries/mcpp/src/config.h.in new file mode 100644 index 000000000..2bb6c0fee --- /dev/null +++ b/libraries/mcpp/src/config.h.in @@ -0,0 +1,226 @@ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if '0x5c' in BIG5 multi-byte character is safe. */ +#undef BIGFIVE_IS_ESCAPE_FREE + +/* Define the target compiler. */ +#undef COMPILER + +/* Define the type of size_t. */ +#undef COMPILER_SP1_VAL + +/* Define the type of ptrdiff_t. */ +#undef COMPILER_SP2_VAL + +/* Define the type of wchar_t. */ +#undef COMPILER_SP3_VAL + +/* Define the name of COMPILER-specific OLD-style predefined macro. */ +#undef COMPILER_SP_OLD + +/* Define the value of COMPILER-specific OLD-style predefined macro. */ +#undef COMPILER_SP_OLD_VAL + +/* Define the name of COMPILER-specific STD-style predefined macro. */ +#undef COMPILER_SP_STD + +/* Define the value of COMPILER-specific STD-style predefined macro. */ +#undef COMPILER_SP_STD_VAL + +/* Define compiler-specific C++ include directory 1. */ +#undef CPLUS_INCLUDE_DIR1 + +/* Define compiler-specific C++ include directory 2. */ +#undef CPLUS_INCLUDE_DIR2 + +/* Define compiler-specific C++ include directory 3. */ +#undef CPLUS_INCLUDE_DIR3 + +/* Define compiler-specific C++ include directory 4. */ +#undef CPLUS_INCLUDE_DIR4 + +/* Define the cpu-specific-macro. */ +#undef CPU + +/* Define the name of CPU-specific OLD-style predefined macro. */ +#undef CPU_SP_OLD + +/* Define the value of CPU-specific OLD-style predefined macro. */ +#undef CPU_SP_OLD_VAL + +/* Define the name of CPU-specific STD-style predefined macro. */ +#undef CPU_SP_STD + +/* Define the value of CPU-specific STD-style predefined macro. */ +#undef CPU_SP_STD_VAL + +/* Define root directory of CYGWIN. */ +#undef CYGWIN_ROOT_DIRECTORY + +/* Define compiler-specific C include directory 1. */ +#undef C_INCLUDE_DIR1 + +/* Define compiler-specific C include directory 2. */ +#undef C_INCLUDE_DIR2 + +/* Define compiler-specific C include directory 3. */ +#undef C_INCLUDE_DIR3 + +/* Define if the argument of pragma is macro expanded. */ +#undef EXPAND_PRAGMA + +/* Define if the cases of file name are folded. */ +#undef FNAME_FOLD + +/* Define MacOS-specific framework directory 1. */ +#undef FRAMEWORK1 + +/* Define MacOS-specific framework directory 2. */ +#undef FRAMEWORK2 + +/* Define MacOS-specific framework directory 3. */ +#undef FRAMEWORK3 + +/* Define gcc major version. */ +#undef GCC_MAJOR_VERSION + +/* Define gcc minor version. */ +#undef GCC_MINOR_VERSION + +/* Define if digraphs are available. */ +#undef HAVE_DIGRAPHS + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if the system has the type `intmax_t'. */ +#undef HAVE_INTMAX_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if the system has the type `long long'. */ +#undef HAVE_LONG_LONG + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H_ + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H_ + +/* Define the host compiler name. */ +#undef HOST_CMP_NAME + +/* Define the host compiler. */ +#undef HOST_COMPILER + +/* Define the host system. */ +#undef HOST_SYSTEM + +/* Define include directory to install mcpp_g*.h header files. */ +#undef INC_DIR + +/* Define if '0x5c' in ISO2022-JP multi-byte character is safe. */ +#undef ISO2022_JP_IS_ESCAPE_FREE + +/* Define output format of line directive. */ +#undef LINE_PREFIX + +/* Define printf length modifier for the longest integer. */ +#undef LL_FORM + +/* Define if build libmcpp */ +#undef MCPP_LIB + +/* Define /mingw directory. */ +#undef MINGW_DIRECTORY + +/* Define root directory of MSYS. */ +#undef MSYS_ROOT_DIRECTORY + +/* Define the suffix of object file. */ +#undef OBJEXT + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define include preference. */ +#undef SEARCH_INIT + +/* Define if '0x5c' in SJIS multi-byte character is safe. */ +#undef SJIS_IS_ESCAPE_FREE + +/* Define the default value of __STDC__. */ +#undef STDC + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define the default value of __STDC_VERSION__. */ +#undef STDC_VERSION + +/* Define whether output format of line directive is C source style. */ +#undef STD_LINE_PREFIX + +/* Define the target system. */ +#undef SYSTEM + +/* Define the version of FreeBSD. */ +#undef SYSTEM_EXT_VAL + +/* Define the name of SYSTEM-specific OLD-style predefined macro. */ +#undef SYSTEM_SP_OLD + +/* Define the value of SYSTEM-specific OLD-style predefined macro. */ +#undef SYSTEM_SP_OLD_VAL + +/* Define the name of SYSTEM-specific STD-style predefined macro. */ +#undef SYSTEM_SP_STD + +/* Define the value of SYSTEM-specific STD-style predefined macro. */ +#undef SYSTEM_SP_STD_VAL + +/* Version number of package */ +#undef VERSION diff --git a/libraries/mcpp/src/configed.H b/libraries/mcpp/src/configed.H new file mode 100644 index 000000000..b4d1ebf3a --- /dev/null +++ b/libraries/mcpp/src/configed.H @@ -0,0 +1,382 @@ +/* + * configed.H + * Configurations for MCPP using config.h genarated by configure script. + * + * WARNING: These settings assume HOST == TARGET. In case of HOST + * differs from TARGET, you must edit this file here and there. + */ + +#define TRUE 1 +#define FALSE 0 +#define DATE "2008/11" /* Date of mcpp */ + +/* + * 'Target' means the O.S. and the compiler to which cpp is implemented. + * 'Host' means the O.S. and the compiler with which cpp is compiled. + */ + +#include "config.h" + +#ifndef COMPILER /* No target compiler specified */ +#define COMPILER COMPILER_UNKNOWN +#endif +#ifndef HOST_COMPILER /* No host compiler specified */ +#define HOST_COMPILER COMPILER +#endif + +/* + * P A R T 1 Configurations for target-operating-system + * and target-compiler. + */ + +/* + * Names of the SYSTEM (i.e. target operating system). This is needed so that + * cpp can use appropriate filename conventions. + */ +#define SYS_UNKNOWN 0 +#define SYS_UNIX 0x1000 +#define SYS_LINUX 0x1800 /* (SYS_LINUX & 0xF000) == SYS_UNIX */ +#define SYS_FREEBSD 0x1A00 /* (SYS_FREEBSD & 0xF000) == SYS_UNIX */ +#define SYS_CYGWIN 0x1C00 /* (SYS_CYGWIN & 0xF000) == SYS_UNIX */ +#define SYS_MAC 0x1E00 /* (SYS_MAC & 0xF000) == SYS_UNIX */ +#define SYS_WIN 0x7000 +#define SYS_WIN32 0x7400 /* (SYS_WIN32 & 0xF000) == SYS_WIN */ +#define SYS_MINGW 0x7C00 /* (SYS_MINGW & 0xF000) == SYS_WIN */ + +/* COMPILER */ +#define COMPILER_UNKNOWN 0 +#define MSC 0x7400 /* Microsoft C, Visual C++ */ +#define BORLANDC 0x7440 /* Borland C */ +#define WIN_SYMANTECC 0x7470 /* Symantec for Windows */ +#define LCC 0x74C0 /* LCC-Win32 */ +#define GNUC 0x00E0 /* GNU C (GCC) */ +#define INDEPENDENT 0xFFFF /* No target, compiler-independent-build*/ + +#define SYS_FAMILY (SYSTEM & 0xF000) +#define COMPILER_FAMILY (COMPILER & 0xF0) +#define HOST_SYS_FAMILY (HOST_SYSTEM & 0xF000) + +/* Default MBCHAR (multi-byte character) encoding. */ +#define EUC_JP 0x10 /* Extended UNIX code of JIS X 0208 */ +#define GB2312 0x20 /* EUC-like encoding of Chinese GB 2312-80 */ +#define KSC5601 0x30 /* EUC-like encoding of Korean KS C 5601 */ +#define SJIS 0x80 /* Shift-JIS encoding of JIS X 0208 */ +#define BIGFIVE 0x90 /* Encoding of Taiwanese Big Five */ +#define ISO2022_JP 0x100 /* ISO-2022-JP (ISO-2022-JP1) encoding */ +#define UTF8 0x1000 /* UTF-8 encoding */ + +/* + * MBCHAR means multi-byte character encoding. + * MBCHAR means the default encoding, and you can change the encoding by + * #pragma MCPP setlocale, -e option or environment variable + * LC_ALL, LC_CTYPE, LANG. + * MBCHAR == 0 means not to recognize any multi-byte character encoding. + */ + +/* + * In order to predefine target-dependent macros, + * several macros are defined here: + * *_OLD define the macro beginning with an alphabetic letter, + * *_STD, *_STD?, *_EXT, *_EXT2 define the macro beginning with an '_'. + * *_STD1 define the macro beginning with '__' and ending with an alpha- + * numeric letter. + * *_STD2 define the macro beginning with '__' and ending with '__'. + * These may not be defined, if they are not needed. + * They should not be #defined to no token or to "". + * + * SYSTEM_OLD, SYSTEM_STD1, SYSTEM_STD2, SYSTEM_EXT, SYSTEM_EXT2 + * define the target operating system (by name). + * SYSTEM_SP_OLD, SYSTEM_SP_STD define the target-OS specific macro name + * COMPILER_OLD, COMPILER_STD1, COMPILER_STD2, COMPILER_EXT, COMPILER_EXT2 + * , COMPILER_SP_OLD, COMPILER_SP_STD + * define the target compiler (by name). + * COMPILER_CPLUS defines the target C++ compiler. + * COMPILER_SP1, COMPILER_SP2, COMPILER_SP3 + * define the compiler-specific macros. + * + * _VAL specify the value of the . + * If not specified, these values default to "1". + * To define the value of no-token, specify as "" rather than no-token. + * SYSTEM_OLD, SYSTEM_STD?, COMPILER_OLD have the value of "1". + */ + +/* + * target-compiler-dependent definitions: + * + * LINE_PREFIX defines the output line prefix, if not "#line 123". + * This should be defined as "# " to represent "# 123" format + * ("#line " represents "#line 123" format). + * + * ENV_C_INCLUDE_DIR may be defined to the name of environment-variable for + * C include directory. + * ENV_CPLUS_INCLUDE_DIR is name of environment-variable for C++ include + * directory which exists other than ENV_C_INCLUDE_DIR. + * ENV_SEP is the separator (other than space) of include-paths in an + * environment-variable. e.g. the ':' in + * "/usr/abc/include:/usr/xyz/include" + * + * EMFILE should be defined to the macro to represent errno of 'too many + * open files' if the macro is different from EMFILE. + * + * ONE_PASS should be set TRUE, if COMPILER is "one pass compiler". + * + * FNAME_FOLD means that target-system folds upper and lower cases of + * directory and file-name. + * + * SEARCH_INIT specifies the default value of 'search_rule' (in system.c). + * 'search_rule' holds searching rule of #include "header.h" to + * search first before searching user specified or system- + * specific include directories. + * CURRENT means to search the directory relative to "current + * directory" which is current at cpp invocation. + * SOURCE means to search the directory relative to that of the + * source file (i.e. "includer"). + * (CURRENT & SOURCE) means to search current directory first + * source directory next. + * 'search_rule' is initialized to SEARCH_INIT. + */ +#define CURRENT 1 +#define SOURCE 2 + +#if SYS_FAMILY == SYS_UNIX +#define SYSTEM_OLD "unix" +#define SYSTEM_STD1 "__unix" +#define SYSTEM_STD2 "__unix__" +#endif + +#if SYSTEM == SYS_FREEBSD +#define SYSTEM_EXT "__FreeBSD__" +#endif + +#if SYSTEM == SYS_LINUX +#define SYSTEM_EXT "__linux__" +#endif + +#if SYSTEM == SYS_MAC +#define SYSTEM_EXT "__APPLE__" +#endif + +#if SYSTEM == SYS_CYGWIN +#define SYSTEM_EXT "__CYGWIN__" +#if defined (__CYGWIN64__) +#define SYSTEM_EXT2 "__CYGWIN64__" +#else +#define SYSTEM_EXT2 "__CYGWIN32__" +#endif +#ifndef MBCHAR +#define MBCHAR SJIS +#endif +#endif + +#if SYSTEM == SYS_MINGW +#define SYSTEM_EXT "__MINGW__" +#if defined (__MINGW64__) +#define SYSTEM_EXT2 "__MINGW64__" +#else +#define SYSTEM_EXT2 "__MINGW32__" +#endif +#ifndef MBCHAR +#define MBCHAR SJIS +#endif +#endif + +#if SYS_FAMILY == SYS_UNIX +#ifndef MBCHAR +#define MBCHAR EUC_JP /* UTF8 if you like */ +#endif +#endif + +#if COMPILER == GNUC +#define COMPILER_EXT "__GNUC__" +#define COMPILER_EXT_VAL GCC_MAJOR_VERSION +#define COMPILER_EXT2 "__GNUC_MINOR__" +#define COMPILER_EXT2_VAL GCC_MINOR_VERSION +#define COMPILER_CPLUS "__GNUG__" +#define COMPILER_CPLUS_VAL GCC_MAJOR_VERSION +#ifndef ENV_C_INCLUDE_DIR +#define ENV_C_INCLUDE_DIR "C_INCLUDE_PATH" +#define ENV_CPLUS_INCLUDE_DIR "CPLUS_INCLUDE_PATH" +#endif +/* + * __SIZE_TYPE__, __PTRDIFF_TYPE__ and __WCHAR_TYPE__ are the predefines of + * GCC and undocumented in GCC 2. + * On GCC V.3.*, V.4.*, these macros are known by mcpp_g*_predef_*.h files. + */ +#if __GNUC__ == 2 +#define COMPILER_SP1 "__SIZE_TYPE__" +#define COMPILER_SP2 "__PTRDIFF_TYPE__" +#define COMPILER_SP3 "__WCHAR_TYPE__" +#endif + +#define CMP_NAME "GCC" +#endif /* COMPILER == GNUC */ + +#if COMPILER == INDEPENDENT +/* specifications of compiler-independent-build */ +#define LINE_PREFIX "#line " +#define STD_LINE_PREFIX TRUE /* Output #line by C source format */ +#define HAVE_DIGRAPHS TRUE /* Output digraphs as it is */ +#define SEARCH_INIT SOURCE /* Include directory relative to source */ +#define SJIS_IS_ESCAPE_FREE TRUE /* Do not treat SJIS specially */ +#define BIGFIVE_IS_ESCAPE_FREE TRUE /* Do not treat specially */ +#define ISO2022_JP_IS_ESCAPE_FREE TRUE /* Do not treat specially */ +#define TARGET_HAVE_LONG_LONG TRUE /* dummy */ +#define STDC_VERSION 199409L /* Initial value of __STDC_VERSION__ */ +#endif + +/* + * defaults + */ + +#ifdef SYSTEM_EXT +#ifndef SYSTEM_EXT_VAL +#define SYSTEM_EXT_VAL "1" +#endif +#endif +#ifdef SYSTEM_EXT2 +#ifndef SYSTEM_EXT2_VAL +#define SYSTEM_EXT2_VAL "1" +#endif +#endif +#ifdef COMPILER_STD1 +#ifndef COMPILER_STD1_VAL +#define COMPILER_STD1_VAL "1" +#endif +#endif +#ifdef COMPILER_STD2 +#ifndef COMPILER_STD2_VAL +#define COMPILER_STD2_VAL "1" +#endif +#endif +#ifdef COMPILER_EXT +#ifndef COMPILER_EXT_VAL +#define COMPILER_EXT_VAL "1" +#endif +#endif +#ifdef COMPILER_EXT2 +#ifndef COMPILER_EXT2_VAL +#define COMPILER_EXT2_VAL "1" +#endif +#endif +#ifdef COMPILER_CPLUS +#ifndef COMPILER_CPLUS_VAL +#define COMPILER_CPLUS_VAL "1" +#endif +#endif + +#ifndef ENV_C_INCLUDE_DIR +#define ENV_C_INCLUDE_DIR "INCLUDE" +#endif +#ifndef ENV_CPLUS_INCLUDE_DIR +#define ENV_CPLUS_INCLUDE_DIR "CPLUS_INCLUDE" +#endif + +#ifndef ENV_SEP +#if SYS_FAMILY == SYS_WIN +#define ENV_SEP ';' +#else +#define ENV_SEP ':' +#endif +#endif + +#ifndef ONE_PASS +#define ONE_PASS FALSE +#endif + +/* + * CHARBIT, UCHARMAX are respectively CHAR_BIT, UCHAR_MAX of target compiler. + * CHARBIT should be defined to the number of bits per character. + * It is needed only for processing of multi-byte character constants. + * UCHARMAX should be defined to the maximum value of type unsigned char + * or maximum value of unsigned int which is converted from type (signed) + * char. + * + * LONGMAX should be defined to the LONG_MAX in . + * ULONGMAX should be defined to the ULONG_MAX in . + */ + +/* _POSIX_* only to get PATH_MAX */ +#define _POSIX_ 1 +#define _POSIX_SOURCE 1 +#ifndef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 1 +#define _POSIX_C_SOURCE_defined 1 +#endif +#include "limits.h" +#undef _POSIX_ +#undef _POSIX_SOURCE +#ifdef _POSIX_C_SOURCE_defined +#undef _POSIX_C_SOURCE +#undef _POSIX_C_SOURCE_defined +#endif +#define CHARBIT CHAR_BIT +#define UCHARMAX UCHAR_MAX +#define USHRTMAX USHRT_MAX +#define LONGMAX LONG_MAX +#define ULONGMAX ULONG_MAX + +/* + * Define MBCHAR (multi-byte character encoding) to SJIS, EUC_JP or other. + */ +#ifndef MBCHAR +#define MBCHAR 0 +#endif + +/* + * SJIS_IS_ESCAPE_FREE means the compiler does not escape '0x5c' ('\\') in + * shift-JIS encoded multi-byte character. SJIS_IS_ESCAPE_FREE == FALSE + * enables cpp to insert * '\\' before '\\' of the 2nd byte of SJIS code in + * literal. This insertion is for the compiler-proper which can't recognize + * SJIS literal. + * BIGFIVE_IS_ESCAPE_FREE means similar case on BIGFIVE encoding. + * ISO2022_JP_IS_ESCAPE_FREE means similar case on ISO2022_JP encoding. + */ +#ifndef SJIS_IS_ESCAPE_FREE +#define SJIS_IS_ESCAPE_FREE FALSE /* or TRUE following your compiler */ +#endif +#ifndef BIGFIVE_IS_ESCAPE_FREE +#define BIGFIVE_IS_ESCAPE_FREE FALSE /* or TRUE following your compiler */ +#endif +#ifndef ISO2022_JP_IS_ESCAPE_FREE +#define ISO2022_JP_IS_ESCAPE_FREE FALSE /* or TRUE following compiler */ +#endif + +/* + * P A R T 2 Configurations for host-compiler. + * + * WARNING: In case of HOST_COMPILER differs from COMPILER, you must + * edit here and there of this part. + */ + +#define HOST_HAVE_STPCPY HAVE_STPCPY + +/* + * Declaration of standard library functions and macros. + */ + +/* stdin, stdout, stderr, FILE, NULL, fgets(), fputs() and other functions. */ +#include "stdio.h" + +/* PATHMAX is the maximum length of path-list on the host system. */ +#ifdef PATH_MAX +#define PATHMAX PATH_MAX /* Posix macro */ +#else +#define PATHMAX FILENAME_MAX +#endif + +/* islower(), isupper(), toupper(), isdigit(), isxdigit(), iscntrl() */ +#include "ctype.h" + +/* errno */ +#include "errno.h" + +#include "string.h" +#include "stdlib.h" +#include "time.h" +#include "setjmp.h" + +/* For debugging malloc systems by kmatsui */ +#if KMMALLOC && _MEM_DEBUG +#include "xalloc.h" +#endif + diff --git a/libraries/mcpp/src/directive.c b/libraries/mcpp/src/directive.c new file mode 100644 index 000000000..b56a3f3b5 --- /dev/null +++ b/libraries/mcpp/src/directive.c @@ -0,0 +1,1699 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * D I R E C T I V E . C + * P r o c e s s D i r e c t i v e L i n e s + * + * The routines to handle directives other than #include and #pragma + * are placed here. + */ + +#if PREPROCESSED +#include "mcpp.H" +#else +#include "system.H" +#include "internal.H" +#endif + +static int do_if( int hash, const char * directive_name); + /* #if, #elif, #ifdef, #ifndef */ +static void sync_linenum( void); + /* Synchronize number of newlines */ +static long do_line( void); + /* Process #line directive */ +static int get_parm( void); + /* Get parameters of macro, its nargs, names, lengths */ +static int get_repl( const char * macroname); + /* Get replacement text embedding parameter number */ +static char * is_formal( const char * name, int conv); + /* If formal parameter, save the number */ +static char * def_stringization( char * repl_cur); + /* Define stringization */ +static char * mgtoken_save( const char * macroname); + /* Prefix DEF_MAGIC to macro name in repl-text */ +static char * str_parm_scan( char * string_end); + /* Scan the parameter in quote */ +static void do_undef( void); + /* Process #undef directive */ +static void dump_repl( const DEFBUF * dp, FILE * fp, int gcc2_va); + /* Dump replacement text */ + +/* + * Generate (by hand-inspection) a set of unique values for each directive. + * MCPP won't compile if there are hash conflicts. + */ +#define L_if ('i' ^ (EOS << 1)) +#define L_ifdef ('i' ^ ('d' << 1)) +#define L_ifndef ('i' ^ ('n' << 1)) +#define L_elif ('e' ^ ('i' << 1)) +#define L_else ('e' ^ ('s' << 1)) +#define L_endif ('e' ^ ('d' << 1)) +#define L_define ('d' ^ ('f' << 1)) +#define L_undef ('u' ^ ('d' << 1)) +#define L_line ('l' ^ ('n' << 1)) +#define L_include ('i' ^ ('c' << 1)) +#if COMPILER == GNUC +#define L_include_next ('i' ^ ('c' << 1) ^ ('_' << 1)) +#endif +#if SYSTEM == SYS_MAC +#define L_import ('i' ^ ('p' << 1)) +#endif +#define L_error ('e' ^ ('r' << 1)) +#define L_pragma ('p' ^ ('a' << 1)) + +static const char * const not_ident + = "Not an identifier \"%s\""; /* _E_ */ +static const char * const no_arg = "No argument"; /* _E_ */ +static const char * const excess + = "Excessive token sequence \"%s\""; /* _E_ _W1_ */ + +void directive( void) +/* + * Process #directive lines. Each directive have their own subroutines. + */ +{ + const char * const many_nesting = +"More than %.0s%ld nesting of #if (#ifdef) sections%s"; /* _F_ _W4_ _W8_ */ + const char * const not_in_section + = "Not in a #if (#ifdef) section in a source file"; /* _E_ _W1_ */ + const char * const illeg_dir + = "Illegal #directive \"%s%.0ld%s\""; /* _E_ _W1_ _W8_ */ + const char * const in_skipped = " (in skipped block)"; /* _W8_ */ + FILEINFO * file; + int token_type; + int hash; + int c; + char * tp; + + in_directive = TRUE; + if (keep_comments) { + mcpp_fputc( '\n', OUT); /* Possibly flush out comments */ + newlines--; + } + c = skip_ws(); + if (c == '\n') /* 'null' directive */ + goto ret; + token_type = scan_token( c, (workp = work_buf, &workp), work_end); + if (in_asm && (token_type != NAM + || (! str_eq( identifier, "asm") + && ! str_eq( identifier, "endasm")))) + /* In #asm block, ignore #anything other than #asm or #endasm */ + goto skip_line; + if (token_type != NAM) { + if (mcpp_mode == OLD_PREP && token_type == NUM) { /* # 123 [fname]*/ + strcpy( identifier, "line"); + } else { + if (compiling) { + if (option_flags.lang_asm) { + if (warn_level & 1) + cwarn( illeg_dir, work_buf, 0L, NULL); + } else { + cerror( illeg_dir, work_buf, 0L, NULL); + } + } else if (warn_level & 8) { + cwarn( illeg_dir, work_buf, 0L, in_skipped); + } + goto skip_line; + } + } + hash = (identifier[ 1] == EOS) ? identifier[ 0] + : (identifier[ 0] ^ (identifier[ 2] << 1)); + if (strlen( identifier) > 7) + hash ^= (identifier[ 7] << 1); + + /* hash is set to a unique value corresponding to the directive.*/ + switch (hash) { + case L_if: tp = "if"; break; + case L_ifdef: tp = "ifdef"; break; + case L_ifndef: tp = "ifndef"; break; + case L_elif: tp = "elif"; break; + case L_else: tp = "else"; break; + case L_endif: tp = "endif"; break; + case L_define: tp = "define"; break; + case L_undef: tp = "undef"; break; + case L_line: tp = "line"; break; + case L_include: tp = "include"; break; +#if COMPILER == GNUC + case L_include_next: tp = "include_next"; break; +#endif +#if SYSTEM == SYS_MAC + case L_import: tp = "import"; break; +#endif + case L_error: tp = "error"; break; + case L_pragma: tp = "pragma"; break; + default: tp = NULL; break; + } + + if (tp != NULL && ! str_eq( identifier, tp)) { /* Hash conflict*/ + hash = 0; /* Unknown directive, will */ + tp = NULL; /* be handled by do_old() */ + } + + if (! compiling) { /* Not compiling now */ + switch (hash) { + case L_elif : + if (! standard) { + if (warn_level & 8) + do_old(); /* Unknown directive */ + goto skip_line; /* Skip the line */ + } /* Else fall through */ + case L_else : /* Test the #if's nest, if 0, compile */ + case L_endif: /* Un-nest #if */ + break; + case L_if : /* These can't turn */ + case L_ifdef: /* compilation on, but */ + case L_ifndef : /* we must nest #if's.*/ + if (&ifstack[ BLK_NEST] < ++ifptr) + goto if_nest_err; + if (standard && (warn_level & 8) + && &ifstack[ std_limits.blk_nest + 1] == ifptr) + cwarn( many_nesting, NULL, (long) std_limits.blk_nest + , in_skipped); + ifptr->stat = 0; /* !WAS_COMPILING */ + ifptr->ifline = src_line; /* Line at section start*/ + goto skip_line; + default : /* Other directives */ + if (tp == NULL && (warn_level & 8)) + do_old(); /* Unknown directive ? */ + goto skip_line; /* Skip the line */ + } + } + + macro_line = 0; /* Reset error flag */ + file = infile; /* Remember the current file */ + + switch (hash) { + + case L_if: + case L_ifdef: + case L_ifndef: + if (&ifstack[ BLK_NEST] < ++ifptr) + goto if_nest_err; + if (standard && (warn_level & 4) && + &ifstack[ std_limits.blk_nest + 1] == ifptr) + cwarn( many_nesting, NULL , (long) std_limits.blk_nest, NULL); + ifptr->stat = WAS_COMPILING; + ifptr->ifline = src_line; + goto ifdo; + + case L_elif: + if (! standard) { + do_old(); /* Unrecognized directive */ + break; + } + if (ifptr == &ifstack[0]) + goto nest_err; + if (ifptr == infile->initif) { + goto in_file_nest_err; + } + if (ifptr->stat & ELSE_SEEN) + goto else_seen_err; + if ((ifptr->stat & (WAS_COMPILING | TRUE_SEEN)) != WAS_COMPILING) { + compiling = FALSE; /* Done compiling stuff */ + goto skip_line; /* Skip this group */ + } + hash = L_if; +ifdo: + c = do_if( hash, tp); + if (mcpp_debug & IF) { + mcpp_fprintf( DBG + , "#if (#elif, #ifdef, #ifndef) evaluate to %s.\n" + , compiling ? "TRUE" : "FALSE"); + mcpp_fprintf( DBG, "line %ld: %s", src_line, infile->buffer); + } + if (c == FALSE) { /* Error */ + compiling = FALSE; /* Skip this group */ + goto skip_line; /* Prevent an extra error message */ + } + break; + + case L_else: + if (ifptr == &ifstack[0]) + goto nest_err; + if (ifptr == infile->initif) { + if (standard) + goto in_file_nest_err; + else if (warn_level & 1) + cwarn( not_in_section, NULL, 0L, NULL); + } + if (ifptr->stat & ELSE_SEEN) + goto else_seen_err; + ifptr->stat |= ELSE_SEEN; + ifptr->elseline = src_line; + if (ifptr->stat & WAS_COMPILING) { + if (compiling || (ifptr->stat & TRUE_SEEN) != 0) + compiling = FALSE; + else + compiling = TRUE; + } + if ((mcpp_debug & MACRO_CALL) && (ifptr->stat & WAS_COMPILING)) { + sync_linenum(); + mcpp_fprintf( OUT, "/*else %ld:%c*/\n", src_line + , compiling ? 'T' : 'F'); /* Show that #else is seen */ + } + break; + + case L_endif: + if (ifptr == &ifstack[0]) + goto nest_err; + if (ifptr <= infile->initif) { + if (standard) + goto in_file_nest_err; + else if (warn_level & 1) + cwarn( not_in_section, NULL, 0L, NULL); + } + if (! compiling && (ifptr->stat & WAS_COMPILING)) + wrong_line = TRUE; + compiling = (ifptr->stat & WAS_COMPILING); + if ((mcpp_debug & MACRO_CALL) && compiling) { + sync_linenum(); + mcpp_fprintf( OUT, "/*endif %ld*/\n", src_line); + /* Show that #if block has ended */ + } + --ifptr; + break; + + case L_define: + do_define( FALSE, 0); + break; + + case L_undef: + do_undef(); + break; + + case L_line: + if ((c = do_line()) > 0) { + src_line = c; + sharp( NULL, 0); /* Putout the new line number and file name */ + infile->line = --src_line; /* Next line number is 'src_line' */ + newlines = -1; + } else { /* Error already diagnosed by do_line() */ + skip_nl(); + } + break; + + case L_include: + in_include = TRUE; + if (do_include( FALSE) == TRUE && file != infile) + newlines = -1; /* File has been included. Clear blank lines */ + in_include = FALSE; + break; + + case L_error: + if (! standard) { + do_old(); /* Unrecognized directive */ + break; + } + cerror( infile->buffer, NULL, 0L, NULL); /* _E_ */ + break; + + case L_pragma: + if (! standard) { + do_old(); /* Unrecognized directive */ + break; + } + do_pragma(); + newlines = -1; /* Do not putout excessive '\n' */ + break; + + default: /* Non-Standard or unknown directives */ + do_old(); + break; + } + + switch (hash) { + case L_if : + case L_elif : + case L_define : + case L_line : + goto skip_line; /* To prevent duplicate error message */ +#if COMPILER == GNUC + case L_include_next : + if (file != infile) /* File has been included */ + newlines = -1; +#endif +#if SYSTEM == SYS_MAC + case L_import : + if (file != infile) /* File has been included */ + newlines = -1; +#endif + case L_error : + if (standard) + goto skip_line; + /* Else fall through */ + case L_include : + case L_pragma : + if (standard) + break; /* Already read over the line */ + /* Else fall through */ + default : /* L_else, L_endif, L_undef, etc. */ + if (mcpp_mode == OLD_PREP) { + /* + * Ignore the rest of the #directive line so you can write + * #if foo + * #endif foo + */ + ; + } else if (skip_ws() != '\n') { +#if COMPILER == GNUC + if (standard && hash != L_endif) +#else + if (standard) +#endif + cerror( excess, infile->bptr-1, 0L, NULL); + else if (warn_level & 1) + cwarn( excess, infile->bptr-1, 0L, NULL); + } + skip_nl(); + } + goto ret; + +in_file_nest_err: + cerror( not_in_section, NULL, 0L, NULL); + goto skip_line; +nest_err: + cerror( "Not in a #if (#ifdef) section", NULL, 0L, NULL); /* _E_ */ + goto skip_line; +else_seen_err: + cerror( "Already seen #else at line %.0s%ld" /* _E_ */ + , NULL, ifptr->elseline, NULL); +skip_line: + skip_nl(); /* Ignore rest of line */ + goto ret; + +if_nest_err: + cfatal( many_nesting, NULL, (long) BLK_NEST, NULL); + +ret: + in_directive = FALSE; + keep_comments = option_flags.c && compiling && !no_output; + keep_spaces = option_flags.k && compiling; + /* keep_spaces is on for #define line even if no_output is TRUE */ + if (! wrong_line) + newlines++; +} + +static int do_if( int hash, const char * directive_name) +/* + * Process an #if (#elif), #ifdef or #ifndef. The latter two are straight- + * forward, while #if needs a subroutine to evaluate the expression. + * do_if() is called only if compiling is TRUE. If false, compilation is + * always supressed, so we don't need to evaluate anything. This supresses + * unnecessary warnings. + */ +{ + int c; + int found; + DEFBUF * defp; + + if ((c = skip_ws()) == '\n') { + unget_ch(); + cerror( no_arg, NULL, 0L, NULL); + return FALSE; + } + if (mcpp_debug & MACRO_CALL) { + sync_linenum(); + mcpp_fprintf( OUT, "/*%s %ld*/", directive_name, src_line); + } + if (hash == L_if) { /* #if or #elif */ + unget_ch(); + found = (eval_if() != 0L); /* Evaluate expression */ + if (mcpp_debug & MACRO_CALL) + in_if = FALSE; /* 'in_if' is dynamically set in eval_lex() */ + hash = L_ifdef; /* #if is now like #ifdef */ + } else { /* #ifdef or #ifndef */ + if (scan_token( c, (workp = work_buf, &workp), work_end) != NAM) { + cerror( not_ident, work_buf, 0L, NULL); + return FALSE; /* Next token is not an identifier */ + } + found = ((defp = look_id( identifier)) != NULL); /* Look in table*/ + if (mcpp_debug & MACRO_CALL) { + if (found) + mcpp_fprintf( OUT, "/*%s*/", defp->name); + } + } + if (found == (hash == L_ifdef)) { + compiling = TRUE; + ifptr->stat |= TRUE_SEEN; + } else { + compiling = FALSE; + } + if (mcpp_debug & MACRO_CALL) { + mcpp_fprintf( OUT, "/*i %c*/\n", compiling ? 'T' : 'F'); + /* Report wheather the directive is evaluated TRUE or FALSE */ + } + return TRUE; +} + +static void sync_linenum( void) +/* + * Put out newlines or #line line to synchronize line number with the + * annotations about #if, #elif, #ifdef, #ifndef, #else or #endif on -K option. + */ +{ + if (wrong_line || newlines > 10) { + sharp( NULL, 0); + } else { + while (newlines-- > 0) + mcpp_fputc('\n', OUT); + } + newlines = -1; +} + +static long do_line( void) +/* + * Parse the line to update the line number and "filename" field for the next + * input line. + * Values returned are as follows: + * -1: syntax error or out-of-range error (diagnosed by do_line(), + * eval_num()). + * [1,32767]: legal line number for C90, [1,2147483647] for C99. + * Line number [32768,2147483647] in C90 mode is only warned (not an error). + * do_line() always absorbs the line (except the ). + */ +{ + const char * const not_digits + = "Line number \"%s\" isn't a decimal digits sequence"; /* _E_ _W1_ */ + const char * const out_of_range + = "Line number \"%s\" is out of range of [1,%ld]"; /* _E_ _W1_ */ + int token_type; + VAL_SIGN * valp; + char * save; + int c; + + if ((c = skip_ws()) == '\n') { + cerror( no_arg, NULL, 0L, NULL); + unget_ch(); /* Push back */ + return -1L; /* Line number is not changed */ + } + + if (standard) { + token_type = get_unexpandable( c, FALSE); + if (macro_line == MACRO_ERROR) /* Unterminated macro */ + return -1L; /* already diagnosed. */ + if (token_type == NO_TOKEN) /* Macro expanded to 0 token */ + goto no_num; + if (token_type != NUM) + goto illeg_num; + } else if (scan_token( c, (workp = work_buf, &workp), work_end) != NUM) { + goto illeg_num; + } + for (workp = work_buf; *workp != EOS; workp++) { + if (! isdigit( *workp & UCHARMAX)) { + if (standard) { + cerror( not_digits, work_buf, 0L, NULL); + return -1L; + } else if (warn_level & 1) { + cwarn( not_digits, work_buf, 0L, NULL); + } + } + } + valp = eval_num( work_buf); /* Evaluate number */ + if (valp->sign == VAL_ERROR) { /* Error diagnosed by eval_num()*/ + return -1; + } else if (standard + && (std_limits.line_num < valp->val || valp->val <= 0L)) { + if (valp->val < LINE99LIMIT && valp->val > 0L) { + if (warn_level & 1) + cwarn( out_of_range, work_buf, std_limits.line_num, NULL); + } else { + cerror( out_of_range, work_buf, std_limits.line_num, NULL); + return -1L; + } + } + + if (standard) { + token_type = get_unexpandable( skip_ws(), FALSE); + if (macro_line == MACRO_ERROR) + return -1L; + if (token_type != STR) { + if (token_type == NO_TOKEN) { /* Filename is absent */ + return (long) valp->val; + } else { /* Expanded macro should be a quoted string */ + goto not_fname; + } + } + } else { + if ((c = skip_ws()) == '\n') { + unget_ch(); + return (long) valp->val; + } + if (scan_token( c, (workp = work_buf, &workp), work_end) != STR) + goto not_fname; + } +#if COMPILER == GNUC + if (memcmp( workp - 3, "//", 2) == 0) { /* "/cur-dir//" */ + save = infile->filename; /* Do not change the file name */ + } else +#endif + { + *(workp - 1) = EOS; /* Ignore right '"' */ + save = save_string( &work_buf[ 1]); /* Ignore left '"' */ + } + + if (standard) { + if (get_unexpandable( skip_ws(), FALSE) != NO_TOKEN) { + cerror( excess, work_buf, 0L, NULL); + free( save); + return -1L; + } + } else if (mcpp_mode == OLD_PREP) { + skip_nl(); + unget_ch(); + } else if ((c = skip_ws()) == '\n') { + unget_ch(); + } else { + if (warn_level & 1) { + scan_token( c, (workp = work_buf, &workp), work_end); + cwarn( excess, work_buf, 0, NULL); + } + skip_nl(); + unget_ch(); + } + + if (infile->filename) + free( infile->filename); + infile->filename = save; /* New file name */ + /* Note that this does not change infile->real_fname */ + return (long) valp->val; /* New line number */ + +no_num: + cerror( "No line number", NULL, 0L, NULL); /* _E_ */ + return -1L; +illeg_num: + cerror( "Not a line number \"%s\"", work_buf, 0L, NULL); /* _E_ */ + return -1L; +not_fname: + cerror( "Not a file name \"%s\"", work_buf, 0L, NULL); /* _E_ */ + return -1L; +} + +/* + * M a c r o D e f i n i t i o n s + */ + +/* + * look_id() Looks for the name in the defined symbol table. Returns a + * pointer to the definition if found, or NULL if not present. + * install_macro() Installs the definition. Updates the symbol table. + * undefine() Deletes the definition from the symbol table. + */ + +/* + * Global work_buf[] are used to store #define parameter lists and + * parms[].name point to them. + * 'nargs' contains the actual number of parameters stored. + */ +typedef struct { + char * name; /* -> Start of each parameter */ + size_t len; /* Length of parameter name */ +} PARM; +static PARM parms[ NMACPARS]; +static int nargs; /* Number of parameters */ +static char * token_p; /* Pointer to the token scanned */ +static char * repl_base; /* Base of buffer for repl-text */ +static char * repl_end; /* End of buffer for repl-text */ +static const char * const no_ident = "No identifier"; /* _E_ */ +#if COMPILER == GNUC +static int gcc2_va_arg; /* GCC2-spec variadic macro */ +#endif + +DEFBUF * do_define( + int ignore_redef, /* Do not redefine */ + int predefine /* Predefine compiler-specific name */ + /* + * Note: The value of 'predefine' should be one of 0, DEF_NOARGS_PREDEF + * or DEF_NOARGS_PREDEF_OLD, the other values cause errors. + */ +) +/* + * Called from directive() when a #define is scanned or called from + * do_options() when a -D option is scanned. This module parses formal + * parameters by get_parm() and the replacement text by get_repl(). + * + * There is some special case code to distinguish + * #define foo bar -- object-like macro + * from #define foo() bar -- function-like macro with no parameter + * + * Also, we make sure that + * #define foo foo + * expands to "foo" but doesn't put MCPP into an infinite loop. + * + * A warning is printed if you redefine a symbol with a non-identical + * text. I.e, + * #define foo 123 + * #define foo 123 + * is ok, but + * #define foo 123 + * #define foo +123 + * is not. + * + * The following subroutines are called from do_define(): + * get_parm() parsing and remembering parameter names. + * get_repl() parsing and remembering replacement text. + * + * The following subroutines are called from get_repl(): + * is_formal() is called when an identifier is scanned. It checks through + * the array of formal parameters. If a match is found, the + * identifier is replaced by a control byte which will be used + * to locate the parameter when the macro is expanded. + * def_stringization() is called when '#' operator is scanned. It surrounds + * the token to stringize with magic-codes. + * + * modes other than STD ignore difference of parameter names in macro + * redefinition. + */ +{ + const char * const predef = "\"%s\" shouldn't be redefined"; /* _E_ */ + char repl_list[ NMACWORK + IDMAX]; /* Replacement text */ + char macroname[ IDMAX + 1]; /* Name of the macro defining */ + DEFBUF * defp; /* -> Old definition */ + DEFBUF ** prevp; /* -> Pointer to previous def in list */ + int c; + int redefined; /* TRUE if redefined */ + int dnargs = 0; /* defp->nargs */ + int cmp; /* Result of name comparison */ + size_t def_start, def_end; /* Column of macro definition */ + + repl_base = repl_list; + repl_end = & repl_list[ NMACWORK]; + c = skip_ws(); + if ((mcpp_debug & MACRO_CALL) && src_line) /* Start of definition */ + def_start = infile->bptr - infile->buffer - 1; + if (c == '\n') { + cerror( no_ident, NULL, 0L, NULL); + unget_ch(); + return NULL; + } else if (scan_token( c, (workp = work_buf, &workp), work_end) != NAM) { + cerror( not_ident, work_buf, 0L, NULL); + return NULL; + } else { + prevp = look_prev( identifier, &cmp); + /* Find place in the macro list to insert the definition */ + defp = *prevp; + if (standard) { + if (cmp || defp->push) { /* Not known or 'pushed' macro */ + if (str_eq( identifier, "defined") + || ((stdc_val || cplus_val) + && str_eq( identifier, "__VA_ARGS__"))) { + cerror( + "\"%s\" shouldn't be defined", identifier, 0L, NULL); /* _E_ */ + return NULL; + } + redefined = FALSE; /* Quite new definition */ + } else { /* It's known: */ + if (ignore_redef) + return defp; + dnargs = (defp->nargs == DEF_NOARGS_STANDARD + || defp->nargs == DEF_NOARGS_PREDEF + || defp->nargs == DEF_NOARGS_PREDEF_OLD) + ? DEF_NOARGS : defp->nargs; + if (dnargs <= DEF_NOARGS_DYNAMIC /* __FILE__ and such */ + || dnargs == DEF_PRAGMA /* _Pragma() pseudo-macro */ + ) { + cerror( predef, identifier, 0L, NULL); + return NULL; + } else { + redefined = TRUE; /* Remember this fact */ + } + } + } else { + if (cmp) { + redefined = FALSE; /* Quite new definition */ + } else { /* It's known: */ + if (ignore_redef) + return defp; + dnargs = (defp->nargs == DEF_NOARGS_STANDARD + || defp->nargs == DEF_NOARGS_PREDEF + || defp->nargs == DEF_NOARGS_PREDEF_OLD) + ? DEF_NOARGS : defp->nargs; + redefined = TRUE; + } + } + } + strcpy( macroname, identifier); /* Remember the name */ + + in_define = TRUE; /* Recognize '#', '##' */ + if (get_parm() == FALSE) { /* Get parameter list */ + in_define = FALSE; + return NULL; /* Syntax error */ + } + if (get_repl( macroname) == FALSE) { /* Get replacement text */ + in_define = FALSE; + return NULL; /* Syntax error */ + } + if ((mcpp_debug & MACRO_CALL) && src_line) { + /* Remember location on source */ + char * cp; + cp = infile->bptr - 1; /* Before '\n' */ + while (char_type[ *cp & UCHARMAX] & HSP) + cp--; /* Trailing space */ + cp++; /* Just after the last token */ + def_end = cp - infile->buffer; /* End of definition */ + } + + in_define = FALSE; + if (redefined) { + if (dnargs != nargs || ! str_eq( defp->repl, repl_list) + || (mcpp_mode == STD && ! str_eq( defp->parmnames, work_buf)) + ) { /* Warn if differently redefined */ + if (warn_level & 1) { + cwarn( + "The macro is redefined", NULL, 0L, NULL); /* _W1_ */ + if (! option_flags.no_source_line) + dump_a_def( " previously macro", defp, FALSE, TRUE + , fp_err); + } + } else { /* Identical redefinition */ + return defp; + } + } /* Else new or re-definition*/ + defp = install_macro( macroname, nargs, work_buf, repl_list, prevp, cmp + , predefine); + if ((mcpp_debug & MACRO_CALL) && src_line) { + /* Get location on source file */ + LINE_COL s_line_col, e_line_col; + s_line_col.line = src_line; + s_line_col.col = def_start; + get_src_location( & s_line_col); + /* Convert to pre-line-splicing data */ + e_line_col.line = src_line; + e_line_col.col = def_end; + get_src_location( & e_line_col); + /* Putout the macro definition information embedded in comment */ + mcpp_fprintf( OUT, "/*m%s %ld:%d-%ld:%d*/\n", defp->name + , s_line_col.line, s_line_col.col + , e_line_col.line, e_line_col.col); + wrong_line = TRUE; /* Need #line later */ + } + if (mcpp_mode == STD && cplus_val && id_operator( macroname) + && (warn_level & 1)) + /* These are operators, not identifiers, in C++98 */ + cwarn( "\"%s\" is defined as macro", macroname /* _W1_ */ + , 0L, NULL); + return defp; +} + +static int get_parm( void) +/* + * Get parameters i.e. numbers into nargs, name into work_buf[], name-length + * into parms[].len. parms[].name point into work_buf. + * Return TRUE if the parameters are legal, else return FALSE. + * In STD mode preprocessor must remember the parameter names, only for + * checking the validity of macro redefinitions. This is required by the + * Standard (what an overhead !). + */ +{ + const char * const many_parms + = "More than %.0s%ld parameters"; /* _E_ _W4_ */ + const char * const illeg_parm + = "Illegal parameter \"%s\""; /* _E_ */ + const char * const misplaced_ellip + = "\"...\" isn't the last parameter"; /* _E_ */ + int token_type; + int c; + + parms[ 0].name = workp = work_buf; + work_buf[ 0] = EOS; +#if COMPILER == GNUC + gcc2_va_arg = FALSE; +#endif + + /* POST_STD mode */ + insert_sep = NO_SEP; /* Clear the inserted token separator */ + c = get_ch(); + + if (c == '(') { /* With arguments? */ + nargs = 0; /* Init parms counter */ + if (skip_ws() == ')') + return TRUE; /* Macro with 0 parm */ + else + unget_ch(); + + do { /* Collect parameters */ + if (nargs >= NMACPARS) { + cerror( many_parms, NULL, (long) NMACPARS, NULL); + return FALSE; + } + parms[ nargs].name = workp; /* Save its start */ + if ((token_type = scan_token( c = skip_ws(), &workp, work_end)) + != NAM) { + if (c == '\n') { + break; + } else if (c == ',' || c == ')') { + cerror( "Empty parameter", NULL, 0L, NULL); /* _E_ */ + return FALSE; + } else if (standard && (stdc_val || cplus_val) + && token_type == OPE && openum == OP_ELL) { + /* + * Enable variable argument macro which is a feature of + * C99. We enable this even on C90 or C++ for GCC + * compatibility. + */ + if (skip_ws() != ')') { + cerror( misplaced_ellip, NULL, 0L, NULL); + return FALSE; + } + parms[ nargs++].len = 3; + nargs |= VA_ARGS; + goto ret; + } else { + cerror( illeg_parm, parms[ nargs].name, 0L, NULL); + return FALSE; /* Bad parameter syntax */ + } + } + if (standard && (stdc_val || cplus_val) + && str_eq( identifier, "__VA_ARGS__")) { + cerror( illeg_parm, parms[ nargs].name, 0L, NULL); + return FALSE; + /* __VA_ARGS__ should not be used as a parameter */ + } + if (is_formal( parms[ nargs].name, FALSE)) { + cerror( "Duplicate parameter name \"%s\"" /* _E_ */ + , parms[ nargs].name, 0L, NULL); + return FALSE; + } + parms[ nargs].len = (size_t) (workp - parms[ nargs].name); + /* Save length of param */ + *workp++ = ','; + nargs++; + } while ((c = skip_ws()) == ','); /* Get another parameter*/ + + *--workp = EOS; /* Remove excessive ',' */ + if (c != ')') { /* Must end at ) */ +#if COMPILER == GNUC + /* Handle GCC2 variadic params like par... */ + char * tp = workp; + if (mcpp_mode == STD + &&(token_type = scan_token( c, &workp, work_end)) == OPE + && openum == OP_ELL) { + if ((c = skip_ws()) != ')') { + cerror( misplaced_ellip, NULL, 0L, NULL); + return FALSE; + } + *tp = EOS; /* Remove "..." */ + nargs |= VA_ARGS; + gcc2_va_arg = TRUE; + goto ret; + } +#endif + unget_ch(); /* Push back '\n' */ + cerror( + "Missing \",\" or \")\" in parameter list \"(%s\"" /* _E_ */ + , work_buf, 0L, NULL); + return FALSE; + } + } else { + /* + * DEF_NOARGS is needed to distinguish between + * "#define foo" and "#define foo()". + */ + nargs = DEF_NOARGS; /* Object-like macro */ + unget_ch(); + } +ret: +#if NMACPARS > NMACPARS90MIN + if ((warn_level & 4) && (nargs & ~AVA_ARGS) > std_limits.n_mac_pars) + cwarn( many_parms, NULL , (long) std_limits.n_mac_pars, NULL); +#endif + return TRUE; +} + +static int get_repl( + const char * macroname +) +/* + * Get replacement text i.e. names of formal parameters are converted to + * the magic numbers, and operators #, ## is converted to magic characters. + * Return TRUE if replacement list is legal, else return FALSE. + * Any token separator in the text is converted to a single space, no token + * sepatator is inserted by MCPP. Those are required by the Standard for + * stringizing of an argument by # operator. + * In POST_STD mode, inserts a space between any tokens in source (except a + * macro name and the next '(' in macro definition), hence presence or absence + * of token separator makes no difference. + */ +{ + const char * const mixed_ops + = "Macro with mixing of ## and # operators isn't portable"; /* _W4_ */ + const char * const multiple_cats + = "Macro with multiple ## operators isn't portable"; /* _W4_ */ + char * prev_token = NULL; /* Preceding token */ + char * prev_prev_token = NULL; /* Pre-preceding token */ + int multi_cats = FALSE; /* Multiple ## operators*/ + int c; + int token_type; /* Type of token */ + char * temp; + char * repl_cur = repl_base; /* Pointer into repl-text buffer*/ + + *repl_cur = EOS; + token_p = NULL; + if (mcpp_mode == STD) { + c = get_ch(); + unget_ch(); + if (((char_type[ c] & SPA) == 0) && (nargs < 0) && (warn_level & 1)) + cwarn( "No space between macro name \"%s\" and repl-text"/* _W1_ */ + , macroname, 0L, NULL); + } + c = skip_ws(); /* Get to the body */ + + while (c != '\n') { + if (standard) { + prev_prev_token = prev_token; + prev_token = token_p; + } + token_p = repl_cur; /* Remember the pointer */ + token_type = scan_token( c, &repl_cur, repl_end); + + switch (token_type) { + case OPE: /* Operator or punctuator */ + if (! standard) + break; + switch (openum) { + case OP_CAT: /* ## */ + if (prev_token == NULL) { + cerror( "No token before ##" /* _E_ */ + , NULL, 0L, NULL); + return FALSE; + } else if (*prev_token == CAT) { + cerror( "## after ##", NULL, 0L, NULL); /* _E_ */ + return FALSE; + } else if (prev_prev_token && *prev_prev_token == CAT) { + multi_cats = TRUE; + } else if (prev_prev_token && *prev_prev_token == ST_QUOTE + && (warn_level & 4)) { /* # parm ## */ + cwarn( mixed_ops, NULL, 0L, NULL); + } + repl_cur = token_p; + *repl_cur++ = CAT; /* Convert to CAT */ + break; + case OP_STR: /* # */ + if (nargs < 0) /* In object-like macro */ + break; /* '#' is an usual char */ + if (prev_token && *prev_token == CAT + && (warn_level & 4)) /* ## # */ + cwarn( mixed_ops, NULL, 0L, NULL); + repl_cur = token_p; /* Overwrite on # */ + if ((temp = def_stringization( repl_cur)) == NULL) { + return FALSE; /* Error */ + } else { + repl_cur = temp; + } + break; + default: /* Any operator as it is */ + break; + } + break; + case NAM: + /* + * Replace this name if it's a parm. Note that the macro name is a + * possible replacement token. We stuff DEF_MAGIC in front of the + * token which is treated as a LETTER by the token scanner and eaten + * by the macro expanding routine. This prevents the macro expander + * from looping if someone writes "#define foo foo". + */ + temp = is_formal( identifier, TRUE); + if (temp == NULL) { /* Not a parameter name */ + if (! standard) + break; + if ((stdc_val || cplus_val) + && str_eq( identifier, "__VA_ARGS__")) { +#if COMPILER == GNUC + if (gcc2_va_arg) { + cerror( "\"%s\" cannot be used in GCC2-spec variadic macro" /* _E_ */ + , identifier, 0L, NULL); + return FALSE; + } +#endif + cerror( "\"%s\" without corresponding \"...\"" /* _E_ */ + , identifier, 0L, NULL); + return FALSE; + } + if ((temp = mgtoken_save( macroname)) != NULL) + repl_cur = temp; /* Macro name */ + } else { /* Parameter name */ + repl_cur = temp; +#if COMPILER == GNUC + if (mcpp_mode == STD && (nargs & VA_ARGS) + && *(repl_cur - 1) == (nargs & ~AVA_ARGS)) { + if (! str_eq( identifier, "__VA_ARGS__") + && (warn_level & 2)) + cwarn( + "GCC2-spec variadic macro is defined" /* _W2_ */ + , NULL, 0L, NULL); + if (prev_token && *prev_token == CAT + && prev_prev_token && *prev_prev_token == ',') + /* ", ## __VA_ARGS__" is sequence peculiar */ + /* to GCC3-spec variadic macro. */ + /* Or ", ## last_arg" is sequence peculiar */ + /* to GCC2-spec variadic macro. */ + nargs |= GVA_ARGS; + /* Mark as sequence peculiar to GCC */ + /* This will be warned at expansion time */ + } +#endif + } + break; + + case STR: /* String in mac. body */ + case CHR: /* Character constant */ + if (mcpp_mode == OLD_PREP) + repl_cur = str_parm_scan( repl_cur); + break; + case SEP: + if (mcpp_mode == OLD_PREP && c == COM_SEP) + repl_cur--; /* Skip comment now */ + break; + default: /* Any token as it is */ + break; + } + + if ((c = get_ch()) == ' ' || c == '\t') { + *repl_cur++ = ' '; /* Space */ + while ((c = get_ch()) == ' ' || c == '\t') + ; /* Skip excessive spaces */ + } + } + + while (repl_base < repl_cur + && (*(repl_cur - 1) == ' ' || *(repl_cur - 1) == '\t')) + repl_cur--; /* Remove trailing spaces */ + *repl_cur = EOS; /* Terminate work */ + + unget_ch(); /* For syntax check */ + if (standard) { + if (token_p && *token_p == CAT) { + cerror( "No token after ##", NULL, 0L, NULL); /* _E_ */ + return FALSE; + } + if (multi_cats && (warn_level & 4)) + cwarn( multiple_cats, NULL, 0L, NULL); + if ((nargs & VA_ARGS) && stdc_ver < 199901L && (warn_level & 2)) + /* Variable arg macro is the spec of C99, not C90 nor C++98 */ + cwarn( "Variable argument macro is defined", /* _W2_ */ + NULL, 0L, NULL); + } + + return TRUE; +} + +static char * is_formal( + const char * name, + int conv /* Convert to magic number? */ +) +/* + * If the identifier is a formal parameter, save the MAC_PARM and formal + * offset, returning the advanced pointer into the replacement text. + * Else, return NULL. + */ +{ + char * repl_cur; + const char * va_arg = "__VA_ARGS__"; + PARM parm; + size_t len; + int i; + + len = strlen( name); + for (i = 0; i < (nargs & ~AVA_ARGS); i++) { /* For each parameter */ + parm = parms[ i]; + if ((len == parm.len + /* Note: parms[].name are comma separated */ + && memcmp( name, parm.name, parm.len) == 0) + || (standard && (nargs & VA_ARGS) + && i == (nargs & ~AVA_ARGS) - 1 && conv + && str_eq( name, va_arg))) { /* __VA_ARGS__ */ + /* If it's known */ +#if COMPILER == GNUC + if (gcc2_va_arg && str_eq( name, va_arg)) + return NULL; /* GCC2 variadic macro */ +#endif + if (conv) { + repl_cur = token_p; /* Overwrite on the name*/ + *repl_cur++ = MAC_PARM; /* Save the signal */ + *repl_cur++ = i + 1; /* Save the parm number */ + return repl_cur; /* Return "gotcha" */ + } else { + return parm.name; /* Duplicate parm name */ + } + } + } + + return NULL; /* Not a formal param */ +} + +static char * def_stringization( char * repl_cur) +/* + * Define token stringization. + * We store a magic cookie (which becomes surrouding " on expansion) preceding + * the parameter as an operand of # operator. + * Return the current pointer into replacement text if the token following # + * is a parameter name, else return NULL. + */ +{ + int c; + char * temp; + + *repl_cur++ = ST_QUOTE; /* Prefix */ + if (char_type[ c = get_ch()] & HSP) { /* There is a space */ + *repl_cur++ = ' '; + while (char_type[ c = get_ch()] & HSP) /* Skip excessive spaces*/ + ; + } + token_p = repl_cur; /* Remember the pointer */ + if (scan_token( c, &repl_cur, repl_end) == NAM) { + if ((temp = is_formal( identifier, TRUE)) != NULL) { + repl_cur = temp; + return repl_cur; + } + } + cerror( "Not a formal parameter \"%s\"", token_p, 0L, NULL); /* _E_ */ + return NULL; +} + +static char * mgtoken_save( const char * macroname) +/* + * A magic cookie is inserted if the token is identical to the macro name, + * so the expansion doesn't recurse. + * Return the advanced pointer into the replacement text or NULL. + */ +{ + char * repl_cur; + + if (str_eq( macroname, identifier)) { /* Macro name in body */ + repl_cur = token_p; /* Overwrite on token */ + *repl_cur++ = DEF_MAGIC; /* Save magic marker */ + repl_cur = stpcpy( repl_cur, identifier); + /* And save the token */ + return repl_cur; + } else { + return NULL; + } +} + +static char * str_parm_scan( char * string_end) +/* + * String parameter scan. + * This code -- if enabled -- recognizes a formal parameter in a string + * literal or in a character constant. + * #define foo(bar, v) printf("%bar\n", v) + * foo( d, i) + * expands to: + * printf("%d\n", i) + * str_parm_scan() return the advanced pointer into the replacement text. + * This has been superceded by # stringizing and string concatenation. + * This routine is called only in OLD_PREP mode. + */ +{ + int delim; + int c; + char * tp; + char * wp; /* Pointer into the quoted literal */ + + delim = *token_p; + unget_string( ++token_p, NULL); + /* Pseudo-token-parsing in a string literal */ + wp = token_p; + while ((c = get_ch()) != delim) { + token_p = wp; + if (scan_token( c, &wp, string_end) != NAM) + continue; + if ((tp = is_formal( token_p, TRUE)) != NULL) + wp = tp; + } + *wp++ = delim; + return wp; +} + +static void do_undef( void) +/* + * Remove the symbol from the defined list. + * Called from directive(). + */ +{ + DEFBUF * defp; + int c; + + if ((c = skip_ws()) == '\n') { + cerror( no_ident, NULL, 0L, NULL); + unget_ch(); + return; + } + if (scan_token( c, (workp = work_buf, &workp), work_end) != NAM) { + cerror( not_ident, work_buf, 0L, NULL); + skip_nl(); + unget_ch(); + } else { + if ((defp = look_id( identifier)) == NULL) { + if (warn_level & 8) + cwarn( "\"%s\" wasn't defined" /* _W8_ */ + , identifier, 0L, NULL); + } else if (standard && (defp->nargs <= DEF_NOARGS_STANDARD + /* Standard predef */ + || defp->nargs == DEF_PRAGMA)) { + /* _Pragma() pseudo-macro */ + cerror( "\"%s\" shouldn't be undefined" /* _E_ */ + , identifier, 0L, NULL); + } else if (standard) { + c = skip_ws(); + unget_ch(); + if (c != '\n') /* Trailing junk */ + return; + else + undefine( identifier); + } else { + undefine( identifier); + } + } +} + +/* + * C P P S y m b o l T a b l e s + * + * SBSIZE defines the number of hash-table slots for the symbol table. + * It must be a power of 2. + */ + +/* Symbol table queue headers. */ +static DEFBUF * symtab[ SBSIZE]; +static long num_of_macro = 0; + +#if MCPP_LIB +void init_directive( void) +/* Initialize static variables. */ +{ + num_of_macro = 0; +} +#endif + +DEFBUF * look_id( const char * name) +/* + * Look for the identifier in the symbol table. + * If found, return the table pointer; Else return NULL. + */ +{ + DEFBUF ** prevp; + int cmp; + + prevp = look_prev( name, &cmp); + + if (standard) + return ((cmp == 0 && (*prevp)->push == 0) ? *prevp : NULL); + else + return ((cmp == 0) ? *prevp : NULL); +} + +DEFBUF ** look_prev( + const char * name, /* Name of the macro */ + int * cmp /* Result of comparison */ +) +/* + * Look for the place to insert the macro definition. + * Return a pointer to the previous member in the linked list. + */ +{ + const char * np; + DEFBUF ** prevp; + DEFBUF * dp; + size_t s_name; + int hash; + + for (hash = 0, np = name; *np != EOS; ) + hash += *np++; + hash += s_name = (size_t)(np - name); + s_name++; + prevp = & symtab[ hash & SBMASK]; + *cmp = -1; /* Initialize */ + + while ((dp = *prevp) != NULL) { + if ((*cmp = memcmp( dp->name, name, s_name)) >= 0) + break; + prevp = &dp->link; + } + + return prevp; +} + +DEFBUF * look_and_install( + const char * name, /* Name of the macro */ + int numargs, /* The numbers of parms */ + const char * parmnames, /* Names of parameters concatenated */ + const char * repl /* Replacement text */ +) +/* + * Look for the name and (re)define it. + * Returns a pointer to the definition block. + * Returns NULL if the symbol was Standard-predefined. + */ +{ + DEFBUF ** prevp; /* Place to insert definition */ + DEFBUF * defp; /* New definition block */ + int cmp; /* Result of comparison of new name and old */ + + prevp = look_prev( name, &cmp); + defp = install_macro( name, numargs, parmnames, repl, prevp, cmp, 0); + return defp; +} + +DEFBUF * install_macro( + const char * name, /* Name of the macro */ + int numargs, /* The numbers of parms */ + const char * parmnames, /* Names of parameters concatenated */ + const char * repl, /* Replacement text */ + DEFBUF ** prevp, /* The place to insert definition */ + int cmp, /* Result of comparison of new name and old */ + int predefine /* Predefined macro without leading '_' */ +) +/* + * Enter this name in the lookup table. + * Returns a pointer to the definition block. + * Returns NULL if the symbol was Standard-predefined. + * Note that predefinedness can be specified by either of 'numargs' or + * 'predefine'. + */ +{ + DEFBUF * dp; + DEFBUF * defp; + size_t s_name, s_parmnames, s_repl; + + defp = *prevp; /* Old definition, if cmp == 0 */ + if (cmp == 0 && defp->nargs < DEF_NOARGS - 1) + return NULL; /* Standard predefined */ + if (parmnames == NULL || repl == NULL || (predefine && numargs > 0) + || (predefine && predefine != DEF_NOARGS_PREDEF + && predefine != DEF_NOARGS_PREDEF_OLD)) + /* Shouldn't happen */ + cfatal( "Bug: Illegal macro installation of \"%s\"" /* _F_ */ + , name, 0L, NULL); /* Use "" instead of NULL */ + s_name = strlen( name); + if (mcpp_mode == STD) + s_parmnames = strlen( parmnames) + 1; + else + s_parmnames = 0; + s_repl = strlen( repl) + 1; + dp = (DEFBUF *) + xmalloc( sizeof (DEFBUF) + s_name + s_parmnames + s_repl); + if (cmp || (standard && (*prevp)->push)) { /* New definition */ + dp->link = defp; /* Insert to linked list */ + *prevp = dp; + } else { /* Redefinition */ + dp->link = defp->link; /* Replace old def with new */ + *prevp = dp; + free( defp); + } + dp->nargs = predefine ? predefine : numargs; + if (standard) { + dp->push = 0; + dp->parmnames = (char *)dp + sizeof (DEFBUF) + s_name; + dp->repl = dp->parmnames + s_parmnames; + if (mcpp_mode == STD) + memcpy( dp->parmnames, parmnames, s_parmnames); + } else { + dp->repl = (char *)dp + sizeof (DEFBUF) + s_name; + } + memcpy( dp->name, name, s_name + 1); + memcpy( dp->repl, repl, s_repl); + /* Remember where the macro is defined */ + dp->fname = cur_fullname; /* Full-path-list of current file */ + dp->mline = src_line; + if (standard && cmp && ++num_of_macro == std_limits.n_macro + 1 + && std_limits.n_macro && (warn_level & 4)) + /* '&& std_limits.n_macro' to avoid warning before initialization */ + cwarn( "More than %.0s%ld macros defined" /* _W4_ */ + , NULL , std_limits.n_macro, NULL); + return dp; +} + +int undefine( + const char * name /* Name of the macro */ +) +/* + * Delete the macro definition from the symbol table. + * Returns TRUE, if deleted; + * Else returns FALSE (when the macro was not defined or was Standard + * predefined). + */ +{ + DEFBUF ** prevp; /* Preceding definition in list */ + DEFBUF * dp; /* Definition to delete */ + int cmp; /* 0 if defined, else not defined */ + + prevp = look_prev( name, &cmp); + dp = *prevp; /* Definition to delete */ + if (cmp || dp->nargs <= DEF_NOARGS_STANDARD) + return FALSE; /* Not defined or Standard predefined */ + if (standard && dp->push) + return FALSE; /* 'Pushed' macro */ + *prevp = dp->link; /* Link the previous and the next */ + if ((mcpp_debug & MACRO_CALL) && dp->mline) { + /* Notice this directive unless the macro is predefined */ + mcpp_fprintf( OUT, "/*undef %ld*//*%s*/\n", src_line, dp->name); + wrong_line = TRUE; + } + free( dp); /* Delete the definition */ + if (standard) + num_of_macro--; + return TRUE; +} + +static void dump_repl( + const DEFBUF * dp, + FILE * fp, + int gcc2_va +) +/* + * Dump replacement text. + */ +{ + int numargs = dp->nargs; + char * cp1; + size_t i; + int c; + const char * cp; + + for (cp = dp->repl; (c = *cp++ & UCHARMAX) != EOS; ) { + + switch (c) { + case MAC_PARM: /* Parameter */ + c = (*cp++ & UCHARMAX) - 1; + if (standard) { + PARM parm = parms[ c]; + if ((numargs & VA_ARGS) && c == (numargs & ~AVA_ARGS) - 1) { + mcpp_fputs( gcc2_va ? parm.name : "__VA_ARGS__" + , FP2DEST( fp)); + /* gcc2_va is possible only in STD mode */ + } else { + if (mcpp_mode == STD) { + for (i = 0, cp1 = parm.name; i < parm.len; i++) + mcpp_fputc( *cp1++, FP2DEST( fp)); + } else { + mcpp_fputc( 'a' + c % 26, FP2DEST( fp)); + if (c > 26) + mcpp_fputc( '0' + c / 26, FP2DEST( fp)); + } + } + } else { + mcpp_fputc( 'a' + c % 26, FP2DEST( fp)); + if (c > 26) + mcpp_fputc( '0' + c / 26, FP2DEST( fp)); + } + break; + case DEF_MAGIC: + if (! standard) + mcpp_fputc( c, FP2DEST( fp)); + /* Else skip */ + break; + case CAT: + if (standard) + mcpp_fputs( "##", FP2DEST( fp)); + else + mcpp_fputc( c, FP2DEST( fp)); + break; + case ST_QUOTE: + if (standard) + mcpp_fputs( "#", FP2DEST( fp)); + else + mcpp_fputc( c, FP2DEST( fp)); + break; + case COM_SEP: + /* + * Though TOK_SEP coincides to COM_SEP, this cannot appear in + * Standard mode. + */ + if (mcpp_mode == OLD_PREP) + mcpp_fputs( "/**/", FP2DEST( fp)); + break; + default: + mcpp_fputc( c, FP2DEST( fp)); + break; + } + } +} + +/* + * If the compiler is so-called "one-pass" compiler, compiler-predefined + * macros are commented out to avoid redefinition. + */ +#if ONE_PASS +#define CAN_REDEF DEF_NOARGS +#else +#define CAN_REDEF DEF_NOARGS_PREDEF +#endif + +void dump_a_def( + const char * why, + const DEFBUF * dp, + int newdef, /* TRUE if parmnames are currently in parms[] */ + int comment, /* Show location of the definition in comment */ + FILE * fp +) +/* + * Dump a macro definition. + */ +{ + char * cp, * cp1; + int numargs = dp->nargs & ~AVA_ARGS; + int commented; /* To be commented out */ + int gcc2_va = FALSE; /* GCC2-spec variadic */ + int i; + + if (standard && numargs == DEF_PRAGMA) /* _Pragma pseudo-macro */ + return; + if ((numargs < CAN_REDEF) || (standard && dp->push)) + commented = TRUE; + else + commented = FALSE; + if (! comment && commented) /* For -dM option */ + return; + if (why) + mcpp_fprintf( FP2DEST( fp), "%s \"%s\" defined as: ", why, dp->name); + mcpp_fprintf( FP2DEST( fp), "%s#define %s", commented ? "/* " : "", + dp->name); /* Macro name */ + if (numargs >= 0) { /* Parameter list */ + if (mcpp_mode == STD) { + const char * appendix = null; + if (! newdef) { + /* Make parms[] for dump_repl() */ + for (i = 0, cp = dp->parmnames; i < numargs; + i++, cp = cp1 + 1) { + if ((cp1 = strchr( cp, ',')) == NULL) /* The last arg */ + parms[ i].len = strlen( cp); + else + parms[ i].len = (size_t) (cp1 - cp); + parms[ i].name = cp; + } + } +#if COMPILER == GNUC + if ((dp->nargs & VA_ARGS) + && memcmp( parms[ numargs - 1].name, "...", 3) != 0) { + appendix = "..."; /* Append ... so as to become 'args...' */ + gcc2_va = TRUE; + } +#endif + mcpp_fprintf( FP2DEST( fp), "(%s%s)", dp->parmnames, appendix); + } else { + if (newdef) { + mcpp_fprintf( FP2DEST( fp), "(%s)", parms[ 0].name); + } else if (numargs == 0) { + mcpp_fputs( "()", FP2DEST( fp)); + } else { + /* Print parameter list automatically made as: */ + /* a, b, c, ..., a0, b0, c0, ..., a1, b1, c1, ... */ + mcpp_fputc( '(', FP2DEST( fp)); + for (i = 0; i < numargs; i++) { /* Make parameter list */ + mcpp_fputc( 'a' + i % 26, FP2DEST( fp)); + if (i >= 26) + mcpp_fputc( '0' + i / 26, FP2DEST( fp)); + if (i + 1 < numargs) + mcpp_fputc( ',', FP2DEST( fp)); + } + mcpp_fputc( ')', FP2DEST( fp)); + } + } + } + if (*dp->repl) { + mcpp_fputc( ' ', FP2DEST( fp)); + dump_repl( dp, fp, gcc2_va); /* Replacement text */ + } + if (commented) + /* Standard predefined or one-pass-compiler-predefined */ + mcpp_fputs( " */", FP2DEST( fp)); + if (comment) /* Not -dM option */ + mcpp_fprintf( FP2DEST( fp), " \t/* %s:%ld\t*/", dp->fname, dp->mline); + mcpp_fputc( '\n', FP2DEST( fp)); +} + +void dump_def( + int comment, /* Location of definition in comment */ + int K_opt /* -K option is specified */ +) +/* + * Dump all the current macro definitions to output stream. + */ +{ + DEFBUF * dp; + DEFBUF ** symp; + + sharp( NULL, 0); /* Report the current source file & line */ + if (comment) + mcpp_fputs( "/* Currently defined macros. */\n", OUT); + for (symp = symtab; symp < &symtab[ SBSIZE]; symp++) { + if ((dp = *symp) != NULL) { + do { + if (K_opt) + mcpp_fprintf( OUT, "/*m%s*/\n", dp->name); + else + dump_a_def( NULL, dp, FALSE, comment, fp_out); + } while ((dp = dp->link) != NULL); + } + } + wrong_line = TRUE; /* Line number is out of sync */ +} + +#if MCPP_LIB +void clear_symtable( void) +/* + * Free all the macro definitions. + */ +{ + DEFBUF * next; + DEFBUF * dp; + DEFBUF ** symp; + + for (symp = symtab; symp < &symtab[ SBSIZE]; symp++) { + for (next = *symp; next != NULL; ) { + dp = next; + next = dp->link; + free( dp); /* Free the symbol */ + } + *symp = NULL; + } +} +#endif + diff --git a/libraries/mcpp/src/eval.c b/libraries/mcpp/src/eval.c new file mode 100644 index 000000000..a66fa6e1a --- /dev/null +++ b/libraries/mcpp/src/eval.c @@ -0,0 +1,1673 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * E V A L . C + * E x p r e s s i o n E v a l u a t i o n + * + * The routines to evaluate #if expression are placed here. + * Some routines are used also to evaluate the value of numerical tokens. + */ + +#if PREPROCESSED +#include "mcpp.H" +#else +#include "system.H" +#include "internal.H" +#endif + +typedef struct optab { + char op; /* Operator */ + char prec; /* Its precedence */ + char skip; /* Short-circuit: non-0 to skip */ +} OPTAB; + +static int eval_lex( void); + /* Get type and value of token */ +static int chk_ops( void); + /* Check identifier-like ops */ +static VAL_SIGN * eval_char( char * const token); + /* Evaluate character constant */ +static expr_t eval_one( char ** seq_pp, int wide, int mbits, int * ucn8); + /* Evaluate a character */ +static VAL_SIGN * eval_eval( VAL_SIGN * valp, int op); + /* Entry to #if arithmetic */ +static expr_t eval_signed( VAL_SIGN ** valpp, expr_t v1, expr_t v2, int op); + /* Do signed arithmetic of expr.*/ +static expr_t eval_unsigned( VAL_SIGN ** valpp, uexpr_t v1u, uexpr_t v2u + , int op); + /* Do unsigned arithmetic */ +static void overflow( const char * op_name, VAL_SIGN ** valpp + , int ll_overflow); + /* Diagnose overflow of expr. */ +static int do_sizeof( void); + /* Evaluate sizeof (type) */ +static int look_type( int typecode); + /* Look for type of the name */ +static void dump_val( const char * msg, const VAL_SIGN * valp); + /* Print value of an operand */ +static void dump_stack( const OPTAB * opstack, const OPTAB * opp + , const VAL_SIGN * value, const VAL_SIGN * valp); + /* Print stacked operators */ + +/* For debug and error messages. */ +static const char * const opname[ OP_END + 1] = { + "end of expression", "val", "(", + "unary +", "unary -", "~", "!", + "*", "/", "%", + "+", "-", "<<", ">>", + "<", "<=", ">", ">=", "==", "!=", + "&", "^", "|", "&&", "||", + "?", ":", + ")", "(none)" +}; + +/* + * opdope[] has the operator (and operand) precedence: + * Bits + * 7 Unused (so the value is always positive) + * 6-2 Precedence (0000 .. 0174) + * 1-0 Binary op. flags: + * 10 The next binop flag (binop should/not follow). + * 01 The binop flag (should be set/cleared when this op is seen). + * Note: next binop + * value 1 0 Value doesn't follow value. + * Binop, ), END should follow value, value or unop doesn't. + * ( 0 0 ( doesn't follow value. Value follows. + * unary 0 0 Unop doesn't follow value. Value follows. + * binary 0 1 Binary op follows value. Value follows. + * ) 1 1 ) follows value. Binop, ), END follows. + * END 0 1 END follows value, doesn't follow ops. + */ + +static const char opdope[ OP_END + 1] = { + 0001, /* End of expression */ + 0002, 0170, /* VAL (constant), LPA */ +/* Unary op's */ + 0160, 0160, 0160, 0160, /* PLU, NEG, COM, NOT */ +/* Binary op's */ + 0151, 0151, 0151, /* MUL, DIV, MOD, */ + 0141, 0141, 0131, 0131, /* ADD, SUB, SL, SR */ + 0121, 0121, 0121, 0121, 0111, 0111, /* LT, LE, GT, GE, EQ, NE */ + 0101, 0071, 0061, 0051, 0041, /* AND, XOR, OR, ANA, ORO */ + 0031, 0031, /* QUE, COL */ +/* Parens */ + 0013, 0023 /* RPA, END */ +}; +/* + * OP_QUE, OP_RPA and unary operators have alternate precedences: + */ +#define OP_RPA_PREC 0013 +#define OP_QUE_PREC 0024 /* From right to left grouping */ +#define OP_UNOP_PREC 0154 /* ditto */ + +/* + * S_ANDOR and S_QUEST signal "short-circuit" boolean evaluation, so that + * #if FOO != 0 && 10 / FOO ... + * doesn't generate an error message. They are stored in optab.skip. + */ +#define S_ANDOR 2 +#define S_QUEST 1 + +static VAL_SIGN ev; /* Current value and signedness */ +static int skip = 0; /* 3-way signal of skipping expr*/ +static const char * const non_eval + = " (in non-evaluated sub-expression)"; /* _W8_ */ + +#if HAVE_LONG_LONG && COMPILER == INDEPENDENT + static int w_level = 1; /* warn_level at overflow of long */ +#else + static int w_level = 2; +#endif + +/* + * In KR and OLD_PREP modes. + * Define bits for the basic types and their adjectives. + */ +#define T_CHAR 1 +#define T_INT 2 +#define T_FLOAT 4 +#define T_DOUBLE 8 +#define T_LONGDOUBLE 16 +#define T_SHORT 32 +#define T_LONG 64 +#define T_LONGLONG 128 +#define T_SIGNED 256 +#define T_UNSIGNED 512 +#define T_PTR 1024 /* Pointer to data objects */ +#define T_FPTR 2048 /* Pointer to functions */ + +/* + * The SIZES structure is used to store the values for #if sizeof. + */ +typedef struct sizes { + int bits; /* If this bit is set, */ + int size; /* this is the datum size value */ + int psize; /* this is the pointer size */ +} SIZES; + +/* + * S_CHAR, etc. define the sizeof the basic TARGET machine word types. + * By default, sizes are set to the values for the HOST computer. If + * this is inappropriate, see those tables for details on what to change. + * Also, if you have a machine where sizeof (signed int) differs from + * sizeof (unsigned int), you will have to edit those tables and code in + * eval.c. + * Note: sizeof in #if expression is disallowed by Standard. + */ + +#define S_CHAR (sizeof (char)) +#define S_SINT (sizeof (short int)) +#define S_INT (sizeof (int)) +#define S_LINT (sizeof (long int)) +#define S_FLOAT (sizeof (float)) +#define S_DOUBLE (sizeof (double)) +#define S_PCHAR (sizeof (char *)) +#define S_PSINT (sizeof (short int *)) +#define S_PINT (sizeof (int *)) +#define S_PLINT (sizeof (long int *)) +#define S_PFLOAT (sizeof (float *)) +#define S_PDOUBLE (sizeof (double *)) +#define S_PFPTR (sizeof (int (*)())) +#if HAVE_LONG_LONG +#if (HOST_COMPILER == BORLANDC) \ + || (HOST_COMPILER == MSC && defined(_MSC_VER) && (_MSC_VER < 1300)) +#define S_LLINT (sizeof (__int64)) +#define S_PLLINT (sizeof (__int64 *)) +#else +#define S_LLINT (sizeof (long long int)) +#define S_PLLINT (sizeof (long long int *)) +#endif +#endif +#define S_LDOUBLE (sizeof (long double)) +#define S_PLDOUBLE (sizeof (long double *)) + +typedef struct types { + int type; /* This is the bits for types */ + char * token_name; /* this is the token word */ + int excluded; /* but these aren't legal here. */ +} TYPES; + +#define ANYSIGN (T_SIGNED | T_UNSIGNED) +#define ANYFLOAT (T_FLOAT | T_DOUBLE | T_LONGDOUBLE) +#if HAVE_LONG_LONG +#define ANYINT (T_CHAR | T_SHORT | T_INT | T_LONG | T_LONGLONG) +#else +#define ANYINT (T_CHAR | T_SHORT | T_INT | T_LONG) +#endif + +static const TYPES basic_types[] = { + { T_CHAR, "char", ANYFLOAT | ANYINT }, + { T_SHORT, "short", ANYFLOAT | ANYINT }, + { T_INT, "int", ANYFLOAT | T_CHAR | T_INT }, + { T_LONG, "long", ANYFLOAT | ANYINT }, +#if HAVE_LONG_LONG +#if HOST_COMPILER == BORLANDC + { T_LONGLONG, "__int64", ANYFLOAT | ANYINT }, +#else + { T_LONGLONG, "long long", ANYFLOAT | ANYINT }, +#endif +#endif + { T_FLOAT, "float", ANYFLOAT | ANYINT | ANYSIGN }, + { T_DOUBLE, "double", ANYFLOAT | ANYINT | ANYSIGN }, + { T_LONGDOUBLE, "long double", ANYFLOAT | ANYINT | ANYSIGN }, + { T_SIGNED, "signed", ANYFLOAT | ANYINT | ANYSIGN }, + { T_UNSIGNED, "unsigned", ANYFLOAT | ANYINT | ANYSIGN }, + { 0, NULL, 0 } /* Signal end */ +}; + +/* + * In this table, T_FPTR (pointer to function) should be placed last. + */ +static const SIZES size_table[] = { + { T_CHAR, S_CHAR, S_PCHAR }, /* char */ + { T_SHORT, S_SINT, S_PSINT }, /* short int */ + { T_INT, S_INT, S_PINT }, /* int */ + { T_LONG, S_LINT, S_PLINT }, /* long */ +#if HAVE_LONG_LONG + { T_LONGLONG, S_LLINT, S_PLLINT }, /* long long */ +#endif + { T_FLOAT, S_FLOAT, S_PFLOAT }, /* float */ + { T_DOUBLE, S_DOUBLE, S_PDOUBLE }, /* double */ + { T_LONGDOUBLE, S_LDOUBLE, S_PLDOUBLE }, /* long double */ + { T_FPTR, 0, S_PFPTR }, /* int (*()) */ + { 0, 0, 0 } /* End of table */ +}; + +#define is_binary(op) (FIRST_BINOP <= op && op <= LAST_BINOP) +#define is_unary(op) (FIRST_UNOP <= op && op <= LAST_UNOP) + + +#if MCPP_LIB +void init_eval( void) +{ + skip = 0; +} +#endif + +expr_t eval_if( void) +/* + * Evaluate a #if expression. Straight-forward operator precedence. + * This is called from directive() on encountering an #if directive. + * It calls the following routines: + * eval_lex() Lexical analyser -- returns the type and value of + * the next input token. + * eval_eval() Evaluates the current operator, given the values on the + * value stack. Returns a pointer to the (new) value stack. + */ +{ + VAL_SIGN value[ NEXP * 2 + 1]; /* Value stack */ + OPTAB opstack[ NEXP * 3 + 1]; /* Operator stack */ + int parens = 0; /* Nesting levels of (, ) */ + int prec; /* Operator precedence */ + int binop = 0; /* Set if binary op. needed */ + int op1; /* Operator from stack */ + int skip_cur; /* For short-circuit testing */ + VAL_SIGN * valp = value; /* -> Value and signedness */ + OPTAB * opp = opstack; /* -> Operator stack */ + int op; /* Current operator */ + + opp->op = OP_END; /* Mark bottom of stack */ + opp->prec = opdope[ OP_END]; /* And its precedence */ + skip = skip_cur = opp->skip = 0; /* Not skipping now */ + + while (1) { + if (mcpp_debug & EXPRESSION) + mcpp_fprintf( DBG + , "In eval loop skip = %d, binop = %d, line is: %s\n" + , opp->skip, binop, infile->bptr); + skip = opp->skip; + op = eval_lex(); + skip = 0; /* Reset to be ready to return */ + switch (op) { + case OP_SUB : + if (binop == 0) + op = OP_NEG; /* Unary minus */ + break; + case OP_ADD : + if (binop == 0) + op = OP_PLU; /* Unary plus */ + break; + case OP_FAIL: + return 0L; /* Token error */ + } + if (mcpp_debug & EXPRESSION) + mcpp_fprintf( DBG + , "op = %s, opdope = %04o, binop = %d, skip = %d\n" + , opname[ op], opdope[ op], binop, opp->skip); + if (op == VAL) { /* Value? */ + if (binop != 0) { /* Binop is needed */ + cerror( "Misplaced constant \"%s\"" /* _E_ */ + , work_buf, 0L, NULL); + return 0L; + } else if (& value[ NEXP * 2] <= valp) { + cerror( "More than %.0s%ld constants stacked at %s" /* _E_ */ + , NULL, (long) (NEXP * 2 - 1), work_buf); + return 0L; + } else { + if (mcpp_debug & EXPRESSION) { + dump_val( "pushing ", &ev); + mcpp_fprintf( DBG, " onto value stack[%d]\n" + , (int)(valp - value)); + } + valp->val = ev.val; + (valp++)->sign = ev.sign; + binop = 1; /* Binary operator or so should follow */ + } + continue; + } /* Else operators */ + prec = opdope[ op]; + if (binop != (prec & 1)) { + if (op == OP_EOE) + cerror( "Unterminated expression" /* _E_ */ + , NULL, 0L, NULL); + else + cerror( "Operator \"%s\" in incorrect context" /* _E_ */ + , opname[ op], 0L, NULL); + return 0L; + } + binop = (prec & 2) >> 1; /* Binop should follow? */ + + while (1) { + if (mcpp_debug & EXPRESSION) + mcpp_fprintf( DBG + , "op %s, prec %d, stacked op %s, prec %d, skip %d\n" + , opname[ op], prec, opname[ opp->op], opp->prec, opp->skip); + + /* Stack coming sub-expression of higher precedence. */ + if (opp->prec < prec) { + if (op == OP_LPA) { + prec = OP_RPA_PREC; + if (standard && (warn_level & 4) + && ++parens == std_limits.exp_nest + 1) + cwarn( + "More than %.0s%ld nesting of parens" /* _W4_ */ + , NULL, (long) std_limits.exp_nest, NULL); + } else if (op == OP_QUE) { + prec = OP_QUE_PREC; + } else if (is_unary( op)) { + prec = OP_UNOP_PREC; + } + op1 = opp->skip; /* Save skip for test */ + /* + * Push operator onto operator stack. + */ + opp++; + if (& opstack[ NEXP * 3] <= opp) { + cerror( + "More than %.0s%ld operators and parens stacked at %s" /* _E_ */ + , NULL, (long) (NEXP * 3 - 1), opname[ op]); + return 0L; + } + opp->op = op; + opp->prec = prec; + if (&value[0] < valp) + skip_cur = (valp[-1].val != 0L); + /* Short-circuit tester */ + /* + * Do the short-circuit stuff here. Short-circuiting + * stops automagically when operators are evaluated. + */ + if ((op == OP_ANA && ! skip_cur) + || (op == OP_ORO && skip_cur)) { + opp->skip = S_ANDOR; /* And/or skip starts */ + if (skip_cur) /* Evaluate non-zero */ + valp[-1].val = 1L; /* value to 1 */ + } else if (op == OP_QUE) { /* Start of ?: operator */ + opp->skip = (op1 & S_ANDOR) | (!skip_cur ? S_QUEST : 0); + } else if (op == OP_COL) { /* : inverts S_QUEST */ + opp->skip = (op1 & S_ANDOR) + | (((op1 & S_QUEST) != 0) ? 0 : S_QUEST); + } else { /* Other operators leave*/ + opp->skip = op1; /* skipping unchanged. */ + } + if (mcpp_debug & EXPRESSION) { + mcpp_fprintf( DBG, "stacking %s, ", opname[ op]); + if (&value[0] < valp) + dump_val( "valp[-1].val == ", valp - 1); + mcpp_fprintf( DBG, " at %s\n", infile->bptr); + dump_stack( opstack, opp, value, valp); + } + break; + } + + /* + * Coming sub-expression is of lower precedence. + * Evaluate stacked sub-expression. + * Pop operator from operator stack and evaluate it. + * End of stack and '(', ')' are specials. + */ + skip_cur = opp->skip; /* Remember skip value */ + switch ((op1 = opp->op)) { /* Look at stacked op */ + case OP_END: /* Stack end marker */ + if (op == OP_RPA) { /* No corresponding ( */ + cerror( "Excessive \")\"", NULL, 0L, NULL); /* _E_ */ + return 0L; + } + if (op == OP_EOE) + return valp[-1].val; /* Finished ok. */ + break; + case OP_LPA: /* ( on stack */ + if (op != OP_RPA) { /* Matches ) on input? */ + cerror( "Missing \")\"", NULL, 0L, NULL); /* _E_ */ + return 0L; + } + opp--; /* Unstack it */ + parens--; /* Count down nest level*/ + break; + case OP_QUE: /* Evaluate true expr. */ + break; + case OP_COL: /* : on stack */ + opp--; /* Unstack : */ + if (opp->op != OP_QUE) { /* Matches ? on stack? */ + cerror( + "Misplaced \":\", previous operator is \"%s\"" /* _E_ */ + , opname[opp->op], 0L, NULL); + return 0L; + } + /* Evaluate op1. Fall through */ + default: /* Others: */ + opp--; /* Unstack the operator */ + if (mcpp_debug & EXPRESSION) { + mcpp_fprintf( DBG, "Stack before evaluation of %s\n" + , opname[ op1]); + dump_stack( opstack, opp, value, valp); + } + if (op1 == OP_COL) + skip = 0; + else + skip = skip_cur; + valp = eval_eval( valp, op1); + if (valp->sign == VAL_ERROR) + return 0L; /* Out of range or divide by 0 */ + valp++; + skip = 0; + if (mcpp_debug & EXPRESSION) { + mcpp_fprintf( DBG, "Stack after evaluation\n"); + dump_stack( opstack, opp, value, valp); + } + } /* op1 switch end */ + + if (op1 == OP_END || op1 == OP_LPA || op1 == OP_QUE) + break; /* Read another op. */ + } /* Stack unwind loop */ + + } + + return 0L; /* Never reach here */ +} + +static int eval_lex( void) +/* + * Return next operator or constant to evaluate. Called from eval_if(). It + * calls a special-purpose routines for character constants and numeric values: + * eval_char() called to evaluate 'x' + * eval_num() called to evaluate numbers + * C++98 treats 11 identifier-like tokens as operators. + * POST_STD forbids character constants in #if expression. + */ +{ + int c1; + VAL_SIGN * valp; + int warn = ! skip || (warn_level & 8); + int token_type; + int c; + + ev.sign = SIGNED; /* Default signedness */ + ev.val = 0L; /* Default value (on error or 0 value) */ + in_if = ! skip; /* Inform to expand_macro() that the macro is */ + /* in #if line and not skipped expression. */ + c = skip_ws(); + if (c == '\n') { + unget_ch(); + return OP_EOE; /* End of expression */ + } + token_type = get_unexpandable( c, warn); + if (standard && macro_line == MACRO_ERROR) + return OP_FAIL; /* Unterminated macro call */ + if (token_type == NO_TOKEN) + return OP_EOE; /* Only macro(s) expanding to 0-token */ + + switch (token_type) { + case NAM: + if (standard && str_eq( identifier, "defined")) { /* defined name */ + c1 = c = skip_ws(); + if (c == '(') /* Allow defined (name) */ + c = skip_ws(); + if (scan_token( c, (workp = work_buf, &workp), work_end) == NAM) { + DEFBUF * defp = look_id( identifier); + if (warn) { + ev.val = (defp != NULL); + if ((mcpp_debug & MACRO_CALL) && ! skip && defp) + /* Annotate if the macro is in non-skipped expr. */ + mcpp_fprintf( OUT, "/*%s*/", defp->name); + } + if (c1 != '(' || skip_ws() == ')') /* Balanced ? */ + return VAL; /* Parsed ok */ + } + cerror( "Bad defined syntax: %s" /* _E_ */ + , infile->fp ? "" : infile->buffer, 0L, NULL); + break; + } else if (cplus_val) { + if (str_eq( identifier, "true")) { + ev.val = 1L; + return VAL; + } else if (str_eq( identifier, "false")) { + ev.val = 0L; + return VAL; + } else if (mcpp_mode != POST_STD + && (openum = id_operator( identifier)) != 0) { + /* Identifier-like operator in C++98 */ + strcpy( work_buf, identifier); + return chk_ops(); + } + } else if (! standard && str_eq( identifier, "sizeof")) { + /* sizeof hackery */ + return do_sizeof(); /* Gets own routine */ + } + /* + * The ANSI C Standard says that an undefined symbol + * in an #if has the value zero. We are a bit pickier, + * warning except where the programmer was careful to write + * #if defined(foo) ? foo : 0 + */ + if ((! skip && (warn_level & 4)) || (skip && (warn_level & 8))) + cwarn( "Undefined symbol \"%s\"%.0ld%s" /* _W4_ _W8_ */ + , identifier, 0L, skip ? non_eval : ", evaluated to 0"); + return VAL; + case CHR: /* Character constant */ + case WCHR: /* Wide char constant */ + if (mcpp_mode == POST_STD) { + cerror( "Can't use a character constant %s" /* _E_ */ + , work_buf, 0L, NULL); + break; + } + valp = eval_char( work_buf); /* 'valp' points 'ev' */ + if (valp->sign == VAL_ERROR) + break; + if (mcpp_debug & EXPRESSION) { + dump_val( "eval_char returns ", &ev); + mcpp_fputc( '\n', DBG); + } + return VAL; /* Return a value */ + case STR: /* String literal */ + case WSTR: /* Wide string literal */ + cerror( + "Can't use a string literal %s", work_buf, 0L, NULL); /* _E_ */ + break; + case NUM: /* Numbers are harder */ + valp = eval_num( work_buf); /* 'valp' points 'ev' */ + if (valp->sign == VAL_ERROR) + break; + if (mcpp_debug & EXPRESSION) { + dump_val( "eval_num returns ", &ev); + mcpp_fputc( '\n', DBG); + } + return VAL; + case OPE: /* Operator or punctuator */ + return chk_ops(); + + default: /* Total nonsense */ + cerror( "Can't use the character %.0s0x%02lx" /* _E_ */ + , NULL, (long) c, NULL); + break; + } + + return OP_FAIL; /* Any errors */ +} + +static int chk_ops( void) +/* + * Check the operator. + * If it can't be used in #if expression return OP_FAIL + * else return openum. + */ +{ + switch (openum) { + case OP_STR: case OP_CAT: case OP_ELL: + case OP_1: case OP_2: case OP_3: + cerror( "Can't use the operator \"%s\"" /* _E_ */ + , work_buf, 0L, NULL); + return OP_FAIL; + default: + return openum; + } +} + +static int do_sizeof( void) +/* + * Process the sizeof (basic type) operation in an #if string. + * Sets ev.val to the size and returns + * VAL success + * OP_FAIL bad parse or something. + * This routine is never called in STD and POST_STD mode. + */ +{ + const char * const no_type = "sizeof: No type specified"; /* _E_ */ + int warn = ! skip || (warn_level & 8); + int type_end = FALSE; + int typecode = 0; + int token_type = NO_TOKEN; + const SIZES * sizp = NULL; + + if (get_unexpandable( skip_ws(), warn) != OPE || openum != OP_LPA) + goto no_good; /* Not '(' */ + + /* + * Scan off the tokens. + */ + + while (! type_end) { + token_type = get_unexpandable( skip_ws(), warn); + /* Get next token expanding macros */ + switch (token_type) { + case OPE: + if (openum == OP_LPA) { /* thing (*)() func ptr */ + if (get_unexpandable( skip_ws(), warn) == OPE + && openum == OP_MUL + && get_unexpandable( skip_ws(), warn) == OPE + && openum == OP_RPA) { /* (*) */ + if (get_unexpandable( skip_ws(), warn) != OPE + || openum != OP_LPA + || get_unexpandable( skip_ws(), warn) != OPE + || openum != OP_RPA) /* Not () */ + goto no_good; + typecode |= T_FPTR; /* Function pointer */ + } else { /* Junk is an error */ + goto no_good; + } + } else { /* '*' or ')' */ + type_end = TRUE; + } + break; + case NAM: /* Look for type comb. */ + if ((typecode = look_type( typecode)) == 0) + return OP_FAIL; /* Illegal type or comb.*/ + break; + default: goto no_good; /* Illegal token */ + } + } /* End of while */ + + /* + * We are at the end of the type scan. Chew off '*' if necessary. + */ + if (token_type == OPE) { + if (openum == OP_MUL) { /* '*' */ + typecode |= T_PTR; + if (get_unexpandable( skip_ws(), warn) != OPE) + goto no_good; + } + if (openum == OP_RPA) { /* ')' */ + /* + * Last syntax check + * We assume that all function pointers are the same size: + * sizeof (int (*)()) == sizeof (float (*)()) + * We assume that signed and unsigned don't change the size: + * sizeof (signed int) == sizeof (unsigned int) + */ + if ((typecode & T_FPTR) != 0) { /* Function pointer */ + typecode = T_FPTR | T_PTR; + } else { /* Var or var * datum */ + typecode &= ~(T_SIGNED | T_UNSIGNED); +#if HAVE_LONG_LONG + if ((typecode & (T_SHORT | T_LONG | T_LONGLONG)) != 0) +#else + if ((typecode & (T_SHORT | T_LONG)) != 0) +#endif + typecode &= ~T_INT; + } + if ((typecode & ~T_PTR) == 0) { + cerror( no_type, NULL, 0L, NULL); + return OP_FAIL; + } else { + /* + * Exactly one bit (and possibly T_PTR) may be set. + */ + for (sizp = size_table; sizp->bits != 0; sizp++) { + if ((typecode & ~T_PTR) == sizp->bits) { + ev.val = ((typecode & T_PTR) != 0) + ? sizp->psize : sizp->size; + break; + } + } + } + } else { + goto no_good; + } + } else { + goto no_good; + } + + if (mcpp_debug & EXPRESSION) { + if (sizp) + mcpp_fprintf( DBG, + "sizp->bits:0x%x sizp->size:0x%x sizp->psize:0x%x ev.val:0x%lx\n" + , sizp->bits, sizp->size, sizp->psize + , (unsigned long) ev.val); + } + return VAL; + +no_good: + unget_ch(); + cerror( "sizeof: Syntax error", NULL, 0L, NULL); /* _E_ */ + return OP_FAIL; +} + +static int look_type( + int typecode +) +{ + const char * const unknown_type + = "sizeof: Unknown type \"%s\"%.0ld%s"; /* _E_ _W8_ */ + const char * const illeg_comb + = "sizeof: Illegal type combination with \"%s\"%.0ld%s"; /* _E_ _W8_ */ + int token_type; + const TYPES * tp; + + if (str_eq( identifier, "long")) { + if ((token_type + = get_unexpandable( skip_ws(), !skip || (warn_level & 8))) + == NO_TOKEN) + return typecode; + if (token_type == NAM) { +#if HAVE_LONG_LONG + if (str_eq( identifier, "long")) { + strcpy( work_buf, "long long"); + goto basic; + } +#endif + if (str_eq( identifier, "double")) { + strcpy( work_buf, "long double"); + goto basic; + } + } + unget_string( work_buf, NULL); /* Not long long */ + strcpy( work_buf, "long"); /* nor long double */ + } + + /* + * Look for this unexpandable token in basic_types. + */ +basic: + for (tp = basic_types; tp->token_name != NULL; tp++) { + if (str_eq( work_buf, tp->token_name)) + break; + } + + if (tp->token_name == NULL) { + if (! skip) { + cerror( unknown_type, work_buf, 0L, NULL); + return 0; + } else if (warn_level & 8) { + cwarn( unknown_type, work_buf, 0L, non_eval); + } + } + if ((typecode & tp->excluded) != 0) { + if (! skip) { + cerror( illeg_comb, work_buf, 0L, NULL); + return 0; + } else if (warn_level & 8) { + cwarn( illeg_comb, work_buf, 0L, non_eval); + } + } + + if (mcpp_debug & EXPRESSION) { + if (tp->token_name) + mcpp_fprintf( DBG, + "sizeof -- typecode:0x%x tp->token_name:\"%s\" tp->type:0x%x\n" + , typecode, tp->token_name, tp->type); + } + return typecode |= tp->type; /* Or in the type bit */ +} + +VAL_SIGN * eval_num( + const char * nump /* Preprocessing number */ +) +/* + * Evaluate number for #if lexical analysis. Note: eval_num recognizes + * the unsigned suffix, but only returns a signed expr_t value, and stores + * the signedness to ev.sign, which is set UNSIGNED (== unsigned) if the + * value is not in the range of positive (signed) expr_t. + */ +{ + const char * const not_integer = "Not an integer \"%s\""; /* _E_ */ + const char * const out_of_range + = "Constant \"%s\"%.0ld%s is out of range"; /* _E_ _W1_ _W8_ */ + expr_t value; + uexpr_t v, v1; /* unsigned long long or unsigned long */ + int uflag = FALSE; + int lflag = FALSE; + int erange = FALSE; + int base; + int c, c1; + const char * cp = nump; +#if HAVE_LONG_LONG + const char * const out_of_range_long = + "Constant \"%s\"%.0ld%s is out of range " /* _E_ _W1_ _W2_ _W8_ */ + "of (unsigned) long"; + const char * const ll_suffix = +"LL suffix is used in other than C99 mode \"%s\"%.0ld%s"; /* _W1_ _W2_ _W8_ */ +#if COMPILER == MSC || COMPILER == BORLANDC + const char * const i64_suffix = +"I64 suffix is used in other than C99 mode \"%s\"%.0ld%s"; /* _W2_ _W8_ */ +#endif + int llflag = FALSE; + int erange_long = FALSE; +#endif + + ev.sign = SIGNED; /* Default signedness */ + ev.val = 0L; /* Default value */ + if ((char_type[ c = *cp++ & UCHARMAX] & DIG) == 0) /* Dot */ + goto num_err; + if (c != '0') { /* Decimal */ + base = 10; + } else if ((c = *cp++ & UCHARMAX) == 'x' || c == 'X') { + base = 16; /* Hexadecimal */ + c = *cp++ & UCHARMAX; + } else if (c == EOS) { /* 0 */ + return & ev; + } else { /* Octal or illegal */ + base = 8; + } + + v = v1 = 0L; + for (;;) { + c1 = c; + if (isupper( c1)) + c1 = tolower( c1); + if (c1 >= 'a') + c1 -= ('a' - 10); + else + c1 -= '0'; + if (c1 < 0 || base <= c1) + break; + v1 *= base; + v1 += c1; + if (v1 / base < v) { /* Overflow */ + if (! skip) + goto range_err; + else + erange = TRUE; + } +#if HAVE_LONG_LONG + if (! stdc3 && v1 > ULONGMAX) + /* Overflow of long or unsigned long */ + erange_long = TRUE; +#endif + v = v1; + c = *cp++ & UCHARMAX; + } + + value = v; + while (c == 'u' || c == 'U' || c == 'l' || c == 'L') { + if (c == 'u' || c == 'U') { + if (uflag) + goto num_err; + uflag = TRUE; + } else if (c == 'l' || c == 'L') { +#if HAVE_LONG_LONG + if (llflag) { + goto num_err; + } else if (lflag) { + llflag = TRUE; + if (! stdc3 && ((! skip && (warn_level & w_level)) + || (skip && (warn_level & 8)))) + cwarn( ll_suffix, nump, 0L, skip ? non_eval : NULL); + } else { + lflag = TRUE; + } +#else + if (lflag) + goto num_err; + else + lflag = TRUE; +#endif + } + c = *cp++; + } +#if HAVE_LONG_LONG && (COMPILER == MSC || COMPILER == BORLANDC) + if (tolower( c) == 'i') { + c1 = atoi( cp); + if (c1 == 64) { + if (! stdc3 && ((! skip && (warn_level & w_level)) + || (skip && (warn_level & 8)))) + cwarn( i64_suffix, nump, 0L, skip ? non_eval : NULL); + cp += 2; + } else if (c1 == 32 || c1 == 16) { + cp += 2; + } else if (c1 == 8) { + cp++; + } + c = *cp++; + } +#endif + + if (c != EOS) + goto num_err; + + if (standard) { + if (uflag) /* If 'U' suffixed, uexpr_t is treated as unsigned */ + ev.sign = UNSIGNED; + else + ev.sign = (value >= 0L); +#if HAVE_LONG_LONG + } else { + if (value > LONGMAX) + erange_long = TRUE; +#endif + } + + ev.val = value; + if (erange && (warn_level & 8)) + cwarn( out_of_range, nump, 0L, non_eval); +#if HAVE_LONG_LONG + else if (erange_long && ((skip && (warn_level & 8)) + || (! stdc3 && ! skip && (warn_level & w_level)))) + cwarn( out_of_range_long, nump, 0L, skip ? non_eval : NULL); +#endif + return & ev; + +range_err: + cerror( out_of_range, nump, 0L, NULL); + ev.sign = VAL_ERROR; + return & ev; +num_err: + cerror( not_integer, nump, 0L, NULL); + ev.sign = VAL_ERROR; + return & ev; +} + +static VAL_SIGN * eval_char( + char * const token +) +/* + * Evaluate a character constant. + * This routine is never called in POST_STD mode. + */ +{ + const char * const w_out_of_range + = "Wide character constant %s%.0ld%s is out of range"; /* _E_ _W8_ */ + const char * const c_out_of_range + = "Integer character constant %s%.0ld%s is out of range"; /* _E_ _W8_ */ + uexpr_t value; + uexpr_t tmp; + expr_t cl; + int erange = FALSE; + int wide = (*token == 'L'); + int ucn8; + int i; + int bits, mbits, u8bits, bits_save; + char * cp = token + 1; /* Character content */ +#if HAVE_LONG_LONG + const char * const w_out_of_range_long = + "Wide character constant %s%.0ld%s is " /* _E_ _W1_ _W2_ _W8_ */ + "out of range of unsigned long"; + const char * const c_out_of_range_long = + "Integer character constant %s%.0ld%s is " /* _E_ _W1_ _W2_ _W8_ */ + "out of range of unsigned long"; + int erange_long = FALSE; +#endif + + bits = CHARBIT; + u8bits = CHARBIT * 4; + if (mbchar & UTF8) + mbits = CHARBIT * 4; + else + mbits = CHARBIT * 2; + if (mcpp_mode == STD && wide) { /* Wide character constant */ + cp++; /* Skip 'L' */ + bits = mbits; + } + if (char_type[ *cp & UCHARMAX] & mbchk) { + cl = mb_eval( &cp); + bits = mbits; + } else if ((cl = eval_one( &cp, wide, mbits, (ucn8 = FALSE, &ucn8))) + == -1L) { + ev.sign = VAL_ERROR; + return & ev; + } + bits_save = bits; + value = cl; + + for (i = 0; *cp != '\'' && *cp != EOS; i++) { + if (char_type[ *cp & UCHARMAX] & mbchk) { + cl = mb_eval( &cp); + if (cl == 0) + /* Shift-out sequence of multi-byte or wide character */ + continue; + bits = mbits; + } else { + cl = eval_one( &cp, wide, mbits, (ucn8 = FALSE, &ucn8)); + if (cl == -1L) { + ev.sign = VAL_ERROR; + return & ev; + } +#if OK_UCN + if (ucn8 == TRUE) + bits = u8bits; + else + bits = bits_save; +#endif + } + tmp = value; + value = (value << bits) | cl; /* Multi-char or multi-byte char */ + if ((value >> bits) < tmp) { /* Overflow */ + if (! skip) + goto range_err; + else + erange = TRUE; + } +#if HAVE_LONG_LONG + if ((mcpp_mode == STD && (! stdc3 && value > ULONGMAX)) + || (! standard && value > LONGMAX)) + erange_long = TRUE; +#endif + } + + ev.sign = ((expr_t) value >= 0L); + ev.val = value; + + if (erange && skip && (warn_level & 8)) { + if (wide) + cwarn( w_out_of_range, token, 0L, non_eval); + else + cwarn( c_out_of_range, token, 0L, non_eval); +#if HAVE_LONG_LONG + } else if (erange_long && ((skip && (warn_level & 8)) + || (! stdc3 && ! skip && (warn_level & w_level)))) { + if (wide) + cwarn( w_out_of_range_long, token, 0L, skip ? non_eval : NULL); + else + cwarn( c_out_of_range_long, token, 0L, skip ? non_eval : NULL); +#endif + } + + if (i == 0) /* Constant of single (character or wide-character) */ + return & ev; + + if ((! skip && (warn_level & 4)) || (skip && (warn_level & 8))) { + if (mcpp_mode == STD && wide) + cwarn( +"Multi-character wide character constant %s%.0ld%s isn't portable" /* _W4_ _W8_ */ + , token, 0L, skip ? non_eval : NULL); + else + cwarn( +"Multi-character or multi-byte character constant %s%.0ld%s isn't portable" /* _W4_ _W8_ */ + , token, 0L, skip ? non_eval : NULL); + } + return & ev; + +range_err: + if (wide) + cerror( w_out_of_range, token, 0L, NULL); + else + cerror( c_out_of_range, token, 0L, NULL); + ev.sign = VAL_ERROR; + return & ev; +} + +static expr_t eval_one( + char ** seq_pp, /* Address of pointer to sequence */ + /* eval_one() advances the pointer to sequence */ + int wide, /* Flag of wide-character */ + int mbits, /* Number of bits of a wide-char */ + int * ucn8 /* Flag of UCN-32 bits */ +) +/* + * Called from eval_char() above to get a single character, single multi- + * byte character or wide character (with or without \ escapes). + * Returns the value of the character or -1L on error. + */ +{ +#if OK_UCN + const char * const ucn_malval + = "UCN cannot specify the value %.0s\"%08lx\""; /* _E_ _W8_ */ +#endif + const char * const out_of_range + = "%s%ld bits can't represent escape sequence '%s'"; /* _E_ _W8_ */ + uexpr_t value; + int erange = FALSE; + char * seq = *seq_pp; /* Initial seq_pp for diagnostic*/ + const char * cp; + const char * digits; + unsigned uc; + unsigned uc1; + int count; + int bits; + size_t wchar_max; + + uc = *(*seq_pp)++ & UCHARMAX; + + if (uc != '\\') /* Other than escape sequence */ + return (expr_t) uc; + + /* escape sequence */ + uc1 = uc = *(*seq_pp)++ & UCHARMAX; + switch (uc) { + case 'a': + return '\a'; + case 'b': + return '\b'; + case 'f': + return '\f'; + case 'n': + return '\n'; + case 'r': + return '\r'; + case 't': + return '\t'; + case 'v': + return '\v'; +#if OK_UCN + case 'u': case 'U': + if (! stdc2) + goto undefined; + /* Else Universal character name */ + /* Fall through */ +#endif + case 'x': /* '\xFF' */ + if (! standard) + goto undefined; + digits = "0123456789abcdef"; + bits = 4; + uc = *(*seq_pp)++ & UCHARMAX; + break; + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + digits = "01234567"; + bits = 3; + break; + case '\'': case '"': case '?': case '\\': + return (expr_t) uc; + default: + goto undefined; + } + + wchar_max = (UCHARMAX << CHARBIT) | UCHARMAX; + if (mbits == CHARBIT * 4) { + if (mcpp_mode == STD) + wchar_max = (wchar_max << CHARBIT * 2) | wchar_max; + else + wchar_max = LONGMAX; + } + + value = 0L; + for (count = 0; ; ++count) { + if (isupper( uc)) + uc = tolower( uc); + if ((cp = strchr( digits, uc)) == NULL) + break; + if (count >= 3 && bits == 3) + break; /* Octal escape sequence at most 3 digits */ +#if OK_UCN + if ((count >= 4 && uc1 == 'u') || (count >= 8 && uc1 == 'U')) + break; +#endif + value = (value << bits) | (cp - digits); +#if OK_UCN + if (wchar_max < value && uc1 != 'u' && uc1 != 'U') +#else + if (wchar_max < value) +#endif + { + if (! skip) + goto range_err; + else + erange = TRUE; + } + uc = *(*seq_pp)++ & UCHARMAX; + } + (*seq_pp)--; + + if (erange) { + value &= wchar_max; + goto range_err; + } + + if (count == 0 && bits == 4) /* '\xnonsense' */ + goto undefined; +#if OK_UCN + if (uc1 == 'u' || uc1 == 'U') { + if ((count < 4 && uc1 == 'u') || (count < 8 && uc1 == 'U')) + goto undefined; + if ((value >= 0L && value <= 0x9FL + && value != 0x24L && value != 0x40L && value != 0x60L) + || (!stdc3 && value >= 0xD800L && value <= 0xDFFFL)) { + if (!skip) + cerror( ucn_malval, NULL, (long) value, NULL); + else if (warn_level & 8) + cwarn( ucn_malval, NULL, (long) value, NULL); + } + if (count >= 8 && uc1 == 'U') + *ucn8 = TRUE; + return (expr_t) value; + } +#endif /* OK_UCN */ + if (! wide && (UCHARMAX < value)) { + value &= UCHARMAX; + goto range_err; + } + return (expr_t) value; + +undefined: + uc1 = **seq_pp; + **seq_pp = EOS; /* For diagnostic */ + if ((! skip && (warn_level & 1)) || (skip && (warn_level & 8))) + cwarn( + "Undefined escape sequence%s %.0ld'%s'" /* _W1_ _W8_ */ + , skip ? non_eval : NULL, 0L, seq); + **seq_pp = uc1; + *seq_pp = seq + 1; + return (expr_t) '\\'; /* Returns the escape char */ + +range_err: + uc1 = **seq_pp; + **seq_pp = EOS; /* For diagnostic */ + if (wide) { + if (! skip) + cerror( out_of_range, NULL, (long) mbits, seq); + else if (warn_level & 8) + cwarn( out_of_range, non_eval, (long) mbits, seq); + } else { + if (! skip) + cerror( out_of_range, NULL, (long) CHARBIT, seq); + else if (warn_level & 8) + cwarn( out_of_range, non_eval, (long) CHARBIT, seq); + } + + **seq_pp = uc1; + if (! skip) + return -1L; + else + return (expr_t) value; +} + +static VAL_SIGN * eval_eval( + VAL_SIGN * valp, + int op +) +/* + * One or two values are popped from the value stack and do arithmetic. + * The result is pushed onto the value stack. + * eval_eval() returns the new pointer to the top of the value stack. + */ +{ + const char * const zero_div = "%sDivision by zero%.0ld%s"; /* _E_ _W8_ */ +#if HAVE_LONG_LONG + const char * const neg_format = +"Negative value \"%" LL_FORM "d\" is converted to positive \"%" /* _W1_ _W8_*/ + LL_FORM "u\"%%s"; +#else + const char * const neg_format = +"Negative value \"%ld\" is converted to positive \"%lu\"%%s"; /* _W1_ _W8_*/ +#endif + expr_t v1, v2; + int sign1, sign2; + + if (is_binary( op)) { + v2 = (--valp)->val; + sign2 = valp->sign; + } else { + v2 = 0L; /* Dummy */ + sign2 = SIGNED; /* Dummy */ + } + v1 = (--valp)->val; + sign1 = valp->sign; + if (mcpp_debug & EXPRESSION) { + mcpp_fprintf( DBG, "%s op %s", (is_binary( op)) ? "binary" : "unary" + , opname[ op]); + dump_val( ", v1 = ", valp); + if (is_binary( op)) + dump_val( ", v2 = ", valp + 1); + mcpp_fputc( '\n', DBG); + } + + if (standard + && (sign1 == UNSIGNED || sign2 == UNSIGNED) && is_binary( op) + && op != OP_ANA && op != OP_ORO && op != OP_SR && op != OP_SL) { + if (((sign1 == SIGNED && v1 < 0L) || (sign2 == SIGNED && v2 < 0L) + ) && ((! skip && (warn_level & 1)) + || (skip && (warn_level & 8)))) { + char negate[(((sizeof (expr_t) * 8) / 3) + 1) * 2 + 50]; + expr_t v3; + + v3 = (sign1 == SIGNED ? v1 : v2); + sprintf( negate, neg_format, v3, v3); + cwarn( negate, skip ? non_eval : NULL, 0L, NULL); + } + valp->sign = sign1 = sign2 = UNSIGNED; + } + if ((op == OP_SL || op == OP_SR) + && ((! skip && (warn_level & 1)) || (skip && (warn_level & 8)))) { + if (v2 < 0L || v2 >= sizeof (expr_t) * CHARBIT) + cwarn( "Illegal shift count %.0s\"%ld\"%s" /* _W1_ _W8_ */ + , NULL, (long) v2, skip ? non_eval : NULL); +#if HAVE_LONG_LONG + else if (! stdc3 && v2 >= sizeof (long) * CHARBIT + && ((! skip && (warn_level & w_level)) + || (skip && (warn_level & 8)))) + cwarn( +"Shift count %.0s\"%ld\" is larger than bit count of long%s" /* _W1_ _W8_*/ + , NULL, (long) v2, skip ? non_eval : NULL); +#endif + } + if ((op == OP_DIV || op == OP_MOD) && v2 == 0L) { + if (! skip) { + cerror( zero_div, NULL, 0L, NULL); + valp->sign = VAL_ERROR; + return valp; + } else { + if (warn_level & 8) + cwarn( zero_div, NULL, 0L, non_eval); + valp->sign = sign1; + valp->val = (expr_t) EXPR_MAX; + return valp; + } + } + + if (! standard || sign1 == SIGNED) + v1 = eval_signed( & valp, v1, v2, op); + else + v1 = eval_unsigned( & valp, (uexpr_t) v1, (uexpr_t) v2, op); + + if (valp->sign == VAL_ERROR) /* Out of range */ + return valp; + + switch (op) { + case OP_NOT: case OP_EQ: case OP_NE: + case OP_LT: case OP_LE: case OP_GT: case OP_GE: + case OP_ANA: case OP_ORO: + valp->sign = SIGNED; + break; + default: + valp->sign = sign1; + break; + } + valp->val = v1; + return valp; +} + +static expr_t eval_signed( + VAL_SIGN ** valpp, + expr_t v1, + expr_t v2, + int op +) +/* + * Apply the argument operator to the signed data. + * OP_COL is a special case. + */ +{ + const char * const illeg_op + = "Bug: Illegal operator \"%s\" in eval_signed()"; /* _F_ */ + const char * const not_portable + = "\"%s\" of negative number isn't portable%.0ld%s"; /* _W1_ _W8_*/ + const char * op_name = opname[ op]; + VAL_SIGN * valp = *valpp; + expr_t val; + int chk; /* Flag of overflow in long long */ + + switch (op) { + case OP_EOE: + case OP_PLU: break; + case OP_NEG: + chk = v1 && v1 == -v1; + if (chk +#if HAVE_LONG_LONG + || (! stdc3 && v1 && (long) v1 == (long) -v1) +#endif + ) + overflow( op_name, valpp, chk); + v1 = -v1; + break; + case OP_COM: v1 = ~v1; break; + case OP_NOT: v1 = !v1; break; + case OP_MUL: + val = v1 * v2; + chk = v1 && v2 && (val / v1 != v2 || val / v2 != v1); + if (chk +#if HAVE_LONG_LONG + || (! stdc3 && v1 && v2 + && ((long)val / (long)v1 != (long)v2 + || (long)val / (long)v2 != (long)v1)) +#endif + ) + overflow( op_name, valpp, chk); + v1 = val; + break; + case OP_DIV: + case OP_MOD: + /* Division by 0 has been already diagnosed by eval_eval(). */ + chk = -v1 == v1 && v2 == -1; + if (chk /* LONG_MIN / -1 on two's complement */ +#if HAVE_LONG_LONG + || (! stdc3 + && (long)-v1 == (long)v1 && (long)v2 == (long)-1) +#endif + ) + overflow( op_name, valpp, chk); + else if (! stdc3 && (v1 < 0L || v2 < 0L) + && ((! skip && (warn_level & 1)) + || (skip && (warn_level & 8)))) + cwarn( not_portable, op_name, 0L, skip ? non_eval : NULL); + if (op == OP_DIV) + v1 /= v2; + else + v1 %= v2; + break; + case OP_ADD: + val = v1 + v2; + chk = (v2 > 0L && v1 > val) || (v2 < 0L && v1 < val); + if (chk +#if HAVE_LONG_LONG + || (! stdc3 + && (((long)v2 > 0L && (long)v1 > (long)val) + || ((long)v2 < 0L && (long)v1 < (long)val))) +#endif + ) + overflow( op_name, valpp, chk); + v1 = val; + break; + case OP_SUB: + val = v1 - v2; + chk = (v2 > 0L && val > v1) || (v2 < 0L && val < v1); + if (chk +#if HAVE_LONG_LONG + || (! stdc3 + && (((long)v2 > 0L && (long)val > (long)v1) + || ((long)v2 < 0L && (long)val < (long)v1))) +#endif + ) + overflow( op_name, valpp, chk); + v1 = val; + break; + case OP_SL: v1 <<= v2; break; + case OP_SR: + if (v1 < 0L + && ((!skip && (warn_level & 1)) + || (skip && (warn_level & 8)))) + cwarn( not_portable, op_name, 0L, skip ? non_eval : NULL); + v1 >>= v2; + break; + case OP_LT: v1 = (v1 < v2); break; + case OP_LE: v1 = (v1 <= v2); break; + case OP_GT: v1 = (v1 > v2); break; + case OP_GE: v1 = (v1 >= v2); break; + case OP_EQ: v1 = (v1 == v2); break; + case OP_NE: v1 = (v1 != v2); break; + case OP_AND: v1 &= v2; break; + case OP_XOR: v1 ^= v2; break; + case OP_OR: v1 |= v2; break; + case OP_ANA: v1 = (v1 && v2); break; + case OP_ORO: v1 = (v1 || v2); break; + case OP_COL: + /* + * If v1 has the "true" value, v2 has the "false" value. + * The top of the value stack has the test. + */ + v1 = (--*valpp)->val ? v1 : v2; + break; + default: + cfatal( illeg_op, op_name, 0L, NULL); + } + + *valpp = valp; + return v1; +} + +static expr_t eval_unsigned( + VAL_SIGN ** valpp, + uexpr_t v1u, + uexpr_t v2u, + int op +) +/* + * Apply the argument operator to the unsigned data. + * Called from eval_eval() only in Standard mode. + */ +{ + const char * const illeg_op + = "Bug: Illegal operator \"%s\" in eval_unsigned()"; /* _F_ */ + const char * op_name = opname[ op]; + VAL_SIGN * valp = *valpp; + uexpr_t v1 = 0; + int chk; /* Flag of overflow in unsigned long long */ + int minus; /* Big integer converted from signed long */ + + minus = ! stdc3 && (v1u > ULONGMAX || v2u > ULONGMAX); + + switch (op) { + case OP_EOE: + case OP_PLU: v1 = v1u; break; + case OP_NEG: + v1 = -v1u; + if (v1u) + overflow( op_name, valpp, TRUE); + break; + case OP_COM: v1 = ~v1u; break; + case OP_NOT: v1 = !v1u; break; + case OP_MUL: + v1 = v1u * v2u; + chk = v1u && v2u && (v1 / v2u != v1u || v1 / v1u != v2u); + if (chk +#if HAVE_LONG_LONG + || (! stdc3 && ! minus && v1 > ULONGMAX) +#endif + ) + overflow( op_name, valpp, chk); + break; + case OP_DIV: + /* Division by 0 has been already diagnosed by eval_eval(). */ + v1 = v1u / v2u; + break; + case OP_MOD: + v1 = v1u % v2u; + break; + case OP_ADD: + v1 = v1u + v2u; + chk = v1 < v1u; + if (chk +#if HAVE_LONG_LONG + || (! stdc3 && ! minus && v1 > ULONGMAX) +#endif + ) + overflow( op_name, valpp, chk); + break; + case OP_SUB: + v1 = v1u - v2u; + chk = v1 > v1u; + if (chk +#if HAVE_LONG_LONG + || (! stdc3 && ! minus && v1 > ULONGMAX) +#endif + ) + overflow( op_name, valpp, chk); + break; + case OP_SL: v1 = v1u << v2u; break; + case OP_SR: v1 = v1u >> v2u; break; + case OP_LT: v1 = (v1u < v2u); break; + case OP_LE: v1 = (v1u <= v2u); break; + case OP_GT: v1 = (v1u > v2u); break; + case OP_GE: v1 = (v1u >= v2u); break; + case OP_EQ: v1 = (v1u == v2u); break; + case OP_NE: v1 = (v1u != v2u); break; + case OP_AND: v1 = v1u & v2u; break; + case OP_XOR: v1 = v1u ^ v2u; break; + case OP_OR: v1 = v1u | v2u; break; + case OP_ANA: v1 = (v1u && v2u); break; + case OP_ORO: v1 = (v1u || v2u); break; + case OP_COL: valp--; + if (valp->val) + v1 = v1u; + else + v1 = v2u; + break; + default: + cfatal( illeg_op, op_name, 0L, NULL); + } + + *valpp = valp; + return v1; +} + +static void overflow( + const char * op_name, + VAL_SIGN ** valpp, + int ll_overflow /* Flag of overflow in long long */ +) +{ + const char * const out_of_range + = "Result of \"%s\" is out of range%.0ld%s"; /* _E_ _W1_ _W8_ */ + +#if HAVE_LONG_LONG + if (standard && ! ll_overflow) { + /* Overflow of long not in C99 mode */ + if ((! skip && (warn_level & w_level)) || (skip && (warn_level & 8))) + cwarn( out_of_range, op_name, 0L, " of (unsigned) long"); + } else +#endif + if (skip) { + if (warn_level & 8) + cwarn( out_of_range, op_name, 0L, non_eval); + /* Else don't warn */ + } else if (standard && (*valpp)->sign == UNSIGNED) {/* Never overflow */ + if (warn_level & 1) + cwarn( out_of_range, op_name, 0L, NULL); + } else { + cerror( out_of_range, op_name, 0L, NULL); + (*valpp)->sign = VAL_ERROR; + } +} + +static void dump_val( + const char * msg, + const VAL_SIGN * valp +) +/* + * Dump a value by internal representation. + */ +{ +#if HAVE_LONG_LONG + const char * const format + = "%s(%ssigned long long) 0x%016" LL_FORM "x"; +#else + const char * const format = "%s(%ssigned long) 0x%08lx"; +#endif + int sign = valp->sign; + + mcpp_fprintf( DBG, format, msg, sign ? "" : "un", valp->val); +} + +static void dump_stack( + const OPTAB * opstack, /* Operator stack */ + const OPTAB * opp, /* Pointer into operator stack */ + const VAL_SIGN * value, /* Value stack */ + const VAL_SIGN * valp /* -> value vector */ +) +/* + * Dump stacked operators and values. + */ +{ + if (opstack < opp) + mcpp_fprintf( DBG, "Index op prec skip name -- op stack at %s" + , infile->bptr); + + while (opstack < opp) { + mcpp_fprintf( DBG, " [%2d] %2d %04o %d %s\n", (int)(opp - opstack) + , opp->op, opp->prec, opp->skip, opname[ opp->op]); + opp--; + } + + while (value <= --valp) { + mcpp_fprintf( DBG, "value[%d].val = ", (int)(valp - value)); + dump_val( "", valp); + mcpp_fputc( '\n', DBG); + } +} + diff --git a/libraries/mcpp/src/expand.c b/libraries/mcpp/src/expand.c new file mode 100644 index 000000000..08f829a63 --- /dev/null +++ b/libraries/mcpp/src/expand.c @@ -0,0 +1,2980 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * E X P A N D . C + * M a c r o E x p a n s i o n + * + * The macro expansion routines are placed here. + */ + +#if PREPROCESSED +#include "mcpp.H" +#else +#include "system.H" +#include "internal.H" +#endif + +#define ARG_ERROR (-255) +#define CERROR 1 +#define CWARN 2 + +typedef struct location { /* Where macro or arg locate */ + long start_line; /* Beginning at 1 */ + size_t start_col; /* Beginning at 0 */ + long end_line; + size_t end_col; +} LOCATION; +typedef struct magic_seq { /* Data of a sequence inserted between tokens */ + char * magic_start; /* First MAC_INF sequence */ + char * magic_end; /* End of last MAC_INF seq */ + int space; /* Space succeeds or not */ +} MAGIC_SEQ; + +static int compat_mode; +/* Expand recursive macro more than Standard (for compatibility with GNUC) */ +#if COMPILER == GNUC +static int ansi; /* __STRICT_ANSI__ flag */ +#endif + +static char * expand_std( DEFBUF * defp, char * out, char * out_end + , LINE_COL line_col, int * pragma_op); + /* Expand a macro completely (for Standard modes) */ +static char * expand_prestd( DEFBUF * defp, char * out, char * out_end + , LINE_COL line_col, int * pragma_op); + /* Expand a macro completely (for pre-Standard modes) */ +static DEFBUF * is_macro_call( DEFBUF * defp, char ** cp, char ** endf + , MAGIC_SEQ * mgc_seq); /* Is this really a macro call ? */ +static int collect_args( const DEFBUF * defp, char ** arglist, int m_num); + /* Collect arguments of a macro call*/ +static int get_an_arg( int c, char ** argpp, char * arg_end + , char ** seqp, int var_arg, int nargs, LOCATION ** locp, int m_num + , MAGIC_SEQ * mgc_prefix); /* Get an argument */ +static int squeeze_ws( char ** out, char ** endf, MAGIC_SEQ * mgc_seq); + /* Squeeze white spaces to a space */ +static void skip_macro( void); + /* Skip the rest of macro call */ +static void diag_macro( int severity, const char * format + , const char * arg1, long arg2, const char * arg3, const DEFBUF * defp1 + , const DEFBUF * defp2) ; + /* Supplement diagnostic information*/ +static void dump_args( const char * why, int nargs, const char ** arglist); + /* Dump arguments list */ + +static int rescan_level; /* Times of macro rescan */ + +static const char * const macbuf_overflow + = "Buffer overflow expanding macro \"%s\" at %.0ld\"%s\""; /* _E_ */ +static const char * const empty_arg + = "Empty argument in macro call \"%s\""; /* _W2_ */ +static const char * const unterm_macro + = "Unterminated macro call \"%s\""; /* _E_ */ +static const char * const narg_error + = "%s than necessary %ld argument(s) in macro call \"%s\""; /* _E_ _W1_ */ +static const char * const only_name + = "Macro \"%s\" needs arguments"; /* _W8_ */ + +void expand_init( + int compat, /* "Compatible" to GNUC expansion of recursive macro*/ + int strict_ansi /* __STRICT_ANSI__ flag for GNUC */ +) +/* Set expand_macro() function */ +{ + expand_macro = standard ? expand_std : expand_prestd; + compat_mode = compat; +#if COMPILER == GNUC + ansi = strict_ansi; +#endif +} + +DEFBUF * is_macro( + char ** cp +) +/* + * The name is already in 'identifier', the next token is not yet read. + * Return the definition info if the name is a macro call, else return NULL. + */ +{ + DEFBUF * defp; + + if ((defp = look_id( identifier)) != NULL) /* Is a macro name */ + return is_macro_call( defp, cp, NULL, NULL); + else + return NULL; +} + +static DEFBUF * is_macro_call( + DEFBUF * defp, + char ** cp, /* Pointer to output buffer */ + char ** endf, /* Pointer to indicate end of infile buffer */ + MAGIC_SEQ * mgc_seq /* Infs on MAC_INF sequences and space */ +) +/* + * Return DEFBUF if the defp->name is a macro call, else return NULL. + */ +{ + int c; + + if (defp->nargs >= 0 /* Function-like macro */ + || defp->nargs == DEF_PRAGMA) { /* _Pragma() pseudo-macro */ + c = squeeze_ws( cp, endf, mgc_seq); /* See the next char. */ + if (c == CHAR_EOF) /* End of file */ + unget_string( "\n", NULL); /* Restore skipped '\n' */ + else if (! standard || c != RT_END) + /* Still in the file and rescan boundary ? */ + unget_ch(); /* To see it again */ + if (c != '(') { /* Only the name of function-like macro */ + if (! standard && warn_level & 8) + cwarn( only_name, defp->name, 0L, NULL); + return NULL; + } + } + return defp; /* Really a macro call */ +} + +/* + * expand_macro() expands a macro call completely, and writes out the result + * to the specified output buffer and returns the advanced pointer. + */ + + +/* + * T h e S T A N D A R D C o n f o r m i n g M o d e + * o f M a c r o E x p a n s i o n + * + * 1998/08 First released. kmatsui + */ + +/* For debug of -K option: should be turned off on release version. */ +#define DEBUG_MACRO_ANN FALSE + +/* Return value of is_able_repl() */ +#define NO 0 /* "Blue-painted" */ +#define YES 1 /* Not blue-painted */ +#define READ_OVER 2 + /* Still "blue-painted", yet has read over repl-list */ + +/* + * Macros related to macro notification mode. + * The macro notification routines are hacks on the normal processing + * routines, and very complicated and cumbersome. Be sure to keep symmetry + * of starting and closing magic sequences. Enable the routines enclosed + * by #if 0 - #endif for debugging. + * Any byte in the sequences beginning with MAC_INF can coincide with any + * other character. Hence, the data stream should be read from the top, + * not from the tail, in principle. + */ +/* Length of sequence of MAC_INF, MAC_CALL_START, mac_num-1, mac_num-2 */ +#define MAC_S_LEN 4 +/* Length of sequence of MAC_INF, MAC_ARG_START, mac_num1, mac_num2, arg-num*/ +#define ARG_S_LEN 5 +#define MAC_E_LEN 2 /* Length of MAC_INF, MAC_CALL_END sequence */ +#define ARG_E_LEN MAC_E_LEN /* Lenght of MAC_INF, MAC_ARG_END sequence */ +#define MAC_E_LEN_V 4 /* Length of macro closing sequence in verbose mode */ + /* MAC_INF, MAC_CALL_END, mac_num1, mac_num2 */ +#define ARG_E_LEN_V 5 /* Length of argument closing sequence in verbose */ + /* MAC_INF, MAC_ARG_END, mac_num1, mac_num2, arg_num */ +#define IN_SRC_LEN 3 /* Length of sequence of IN_SRC, num-1, num-2 */ +#define INIT_MAC_INF 0x100 /* Initial num of elements in mac_inf[] */ +#define MAX_MAC_INF 0x1000 /* Maximum num of elements in mac_inf[] */ +#define INIT_IN_SRC_NUM 0x100 /* Initial num of elements in in_src[] */ +#define MAX_IN_SRC_NUM 0x1000 /* Maximum num of elements in in_src[] */ + +/* Variables for macro notification mode */ +typedef struct macro_inf { /* Informations of a macro */ + const DEFBUF * defp; /* Definition of the macro */ + char * args; /* Arguments, if any */ + int num_args; /* Number of real arguments */ + int recur; /* Recurrence of this macro */ + LOCATION locs; /* Location of macro call */ + LOCATION * loc_args; /* Location of arguments */ +} MACRO_INF; +static MACRO_INF * mac_inf; +static int max_mac_num; /* Current num of elements in mac_inf[] */ +static int mac_num; /* Index into mac_inf[] */ +static LOCATION * in_src; /* Location of identifiers in macro arguments */ +static int max_in_src_num; /* Current num of elements in in_src[] */ +static int in_src_num; /* Index into in_src[] */ +static int trace_macro; /* Enable to trace macro infs */ + +static struct { + const DEFBUF * def; /* Macro definition */ + int read_over; /* Has read over repl-list */ + /* 'read_over' is never used in POST_STD mode and in compat_mode*/ +} replacing[ RESCAN_LIMIT]; /* Macros currently replacing */ +static int has_pragma = FALSE; /* Flag of _Pragma() operator */ + +static int print_macro_inf( int c, char ** cpp, char ** opp); + /* Embed macro infs into comments */ +static char * print_macro_arg( char *out, MACRO_INF * m_inf, int argn + , int real_arg, int start); + /* Embed macro arg inf into comments*/ +static char * chk_magic_balance( char * buf, char * buf_end, int move + , int diag); /* Check imbalance of magics */ +static char * replace( DEFBUF * defp, char * out, char * out_end + , const DEFBUF * outer, FILEINFO * rt_file, LINE_COL line_col + , int in_src_n); + /* Replace a macro recursively */ +static char * close_macro_inf( char * out_p, int m_num, int in_src_n); + /* Put closing mark for a macro call*/ +static DEFBUF * def_special( DEFBUF * defp); + /* Re-define __LINE__, __FILE__ */ +static int prescan( const DEFBUF * defp, const char ** arglist + , char * out, char * out_end); + /* Process #, ## operator */ +static char * catenate( const DEFBUF * defp, const char ** arglist + , char * out, char * out_end, char ** token_p); + /* Catenate tokens */ +static const char * remove_magics( const char * argp, int from_last); + /* Remove pair of magic characters */ +#if DEBUG_MACRO_ANN +static void chk_symmetry( char * start_id, char * end_id, size_t len); + /* Check if a pair of magics are symmetrical */ +#endif +static char * stringize( const DEFBUF * defp, const char * argp, char * out); + /* Stringize an argument */ +static char * substitute( const DEFBUF * defp, const char ** arglist + , const char * in, char * out, char * out_end); + /* Substitute parms with arguments */ +static char * rescan( const DEFBUF * outer, const char * in, char * out + , char * out_end); + /* Rescan once replaced sequences */ +static int disable_repl( const DEFBUF * defp); + /* Disable the macro once replaced */ +static void enable_repl( const DEFBUF * defp, int done); + /* Enable the macro for later use */ +static int is_able_repl( const DEFBUF * defp); + /* Is the macro allowed to replace? */ +static char * insert_to_bptr( char * ins, size_t len); + /* Insert a sequence into infile->bptr */ + +static char * expand_std( + DEFBUF * defp, /* Macro definition */ + char * out, /* Output buffer */ + char * out_end, /* End of output buffer */ + LINE_COL line_col, /* Location of macro */ + int * pragma_op /* _Pragma() is found ? */ +) +/* + * Expand a macro call completely, write the results to the specified buffer + * and return the advanced output pointer. + */ +{ + char macrobuf[ NMACWORK + IDMAX]; /* Buffer for replace() */ + char * out_p = out; + size_t len; + int c, c1; + char * cp; + + has_pragma = FALSE; /* Have to re-initialize*/ + macro_line = src_line; /* Line number for diag */ + macro_name = defp->name; + rescan_level = 0; + trace_macro = (mcpp_mode == STD) && (mcpp_debug & MACRO_CALL) + && ! in_directive; + if (trace_macro) { + max_mac_num = INIT_MAC_INF; + mac_inf = (MACRO_INF *) xmalloc( sizeof (MACRO_INF) * max_mac_num); + memset( mac_inf, 0, sizeof (MACRO_INF) * max_mac_num); + max_in_src_num = INIT_IN_SRC_NUM; + in_src = (LOCATION *) xmalloc( sizeof (LOCATION) * max_in_src_num); + memset( in_src, 0, sizeof (LOCATION) * max_in_src_num); + mac_num = in_src_num = 0; /* Initialize */ + } + if (replace( defp, macrobuf, macrobuf + NMACWORK, NULL, infile, line_col + , 0) == NULL) { /* Illegal macro call */ + skip_macro(); + macro_line = MACRO_ERROR; + goto exp_end; + } + len = (size_t) (out_end - out); + if (strlen( macrobuf) > len) { + cerror( macbuf_overflow, macro_name, 0, macrobuf); + memcpy( out, macrobuf, len); + out_p = out + len; + macro_line = MACRO_ERROR; + goto exp_end; + } + +#if DEBUG_MACRO_ANN + chk_magic_balance( macrobuf, macrobuf + strlen( macrobuf), FALSE, TRUE); +#endif + cp = macrobuf; + c1 = '\0'; /* The char previous to 'c' */ + while ((c = *cp++) != EOS) { + if (c == DEF_MAGIC) + continue; /* Skip DEF_MAGIC */ + if (mcpp_mode == STD) { + if (c == IN_SRC) { /* Skip IN_SRC */ + if (trace_macro) + cp += 2; /* Skip also the number (coded in 2 bytes) */ + continue; + } else if (c == TOK_SEP) { + /* Remove redundant token separator */ + if ((char_type[ c1 & UCHARMAX] & HSP) + || (char_type[ *cp & UCHARMAX] & HSP) + || in_include || option_flags.lang_asm + || (*cp == MAC_INF && *(cp + 1) == MAC_CALL_END) + || (!option_flags.v && c1 == MAC_CALL_END) + || (option_flags.v + && *(cp - MAC_E_LEN_V - 1) == MAC_INF + && *(cp - MAC_E_LEN_V) == MAC_CALL_END)) + continue; + /* Skip separator just after ' ', '\t' */ + /* and just after MAC_CALL_END. */ + /* Also skip this in lang_asm mode, #include */ + /* Skip just before another TOK_SEP, ' ', '\t' */ + /* Skip just before MAC_INF,MAC_CALL_END seq too*/ + else + c = ' '; /* Else convert to ' ' */ + } else if (trace_macro && (c == MAC_INF)) { + /* Embed macro expansion informations into comments */ + c = *cp++; + c1 = print_macro_inf( c, &cp, &out_p); + if (out_end <= out_p) { + cerror( macbuf_overflow, macro_name, 0, out); + macro_line = MACRO_ERROR; + goto exp_end; + } + continue; + } + } + *out_p++ = c1 = c; + } + + macro_line = 0; +exp_end: + *out_p = EOS; + if (mcpp_debug & EXPAND) + dump_string( "expand_std exit", out); + macro_name = NULL; + clear_exp_mac(); /* Clear the information for diagnostic */ + if (trace_macro) { /* Clear macro informations */ + int num; + for (num = 1; num < mac_num; num++) { /* 'num' start at 1 */ + if (mac_inf[ num].num_args >= 0) { /* Macro with args */ + free( mac_inf[ num].args); /* Saved arguments */ + free( mac_inf[ num].loc_args); /* Location of args */ + } + } + free( mac_inf); + free( in_src); + } + *pragma_op = has_pragma; + + return out_p; +} + +static int print_macro_inf( + int c, + char ** cpp, /* Magic character sequence */ + char ** opp /* Output for macro information */ +) +/* + * Embed macro expansion information into comments. + * Enabled by '#pragma MCPP debug macro_call' or -K option in STD mode. + */ +{ + MACRO_INF * m_inf; + int num; + int num_args; /* Number of actual args (maybe less than expected) */ + int i; + + if (*((*opp) - 1) == '/' && *((*opp) - 2) != '*') + /* Immediately preceding token is '/' (not '*' and '/') */ + *((*opp)++) = ' '; + /* Insert a space to separate with following '/' and '*' */ + if (option_flags.v || c == MAC_CALL_START || c == MAC_ARG_START) { + num = ((*(*cpp)++ & UCHARMAX) - 1) * UCHARMAX; + num += (*(*cpp)++ & UCHARMAX) - 1; + m_inf = & mac_inf[ num]; /* Saved information */ + } + switch (c) { + case MAC_CALL_START : /* Start of a macro expansion */ + *opp += sprintf( *opp, "/*<%s", m_inf->defp->name); /* Macro name */ + if (m_inf->locs.start_line) { + /* Location of the macro call in source file */ + *opp += sprintf( *opp, " %ld:%d-%ld:%d" + , m_inf->locs.start_line, (int) m_inf->locs.start_col + , m_inf->locs.end_line, (int) m_inf->locs.end_col); + } + *opp = stpcpy( *opp, "*/"); + if ((num_args = m_inf->num_args) >= 1) { + /* The macro has arguments. Show the locations. */ + for (i = 0; i < num_args; i++) /* Arg num begins at 0 */ + *opp = print_macro_arg( *opp, m_inf, i, TRUE, TRUE); + } + break; + case MAC_ARG_START : /* Start of an argument */ + i = (*(*cpp)++ & UCHARMAX) - 1; /* Argument number */ + *opp = print_macro_arg( *opp, m_inf, i, FALSE, TRUE); + break; + case MAC_CALL_END : /* End of a macro expansion */ + if (option_flags.v) { /* Verbose mode */ + *opp += sprintf( *opp, "/*%s>*/", m_inf->defp->name); + break; + } + /* Else fall through */ + case MAC_ARG_END : /* End of an argument */ + if (option_flags.v) { + i = (*(*cpp)++ & UCHARMAX) - 1; + /* Output verbose infs symmetrical to start of the arg infs */ + *opp = print_macro_arg( *opp, m_inf, i, FALSE, FALSE); + } else { + *opp = stpcpy( *opp, "/*>*/"); + } + break; + } + + return **cpp & UCHARMAX; +} + +static char * print_macro_arg( + char * out, /* Output buffer */ + MACRO_INF * m_inf, /* &mac_inf[ m_num] */ + int argn, /* Argument number */ + int real_arg, /* Real argument or expanded argument ? */ + int start /* Start of an argument or end ? */ +) +/* + * Embed an argument information into a comment. + * This routine is only called from above print_macro_inf(). + */ +{ + LOCATION * loc = m_inf->loc_args + argn; + + out += sprintf( out, "/*%s%s:%d-%d", real_arg ? "!" : (start ? "<" : "") + , m_inf->defp->name, m_inf->recur, argn); + + if (real_arg && m_inf->loc_args && loc->start_line) { + /* Location of the argument in source file */ + out += sprintf( out, " %ld:%d-%ld:%d", loc->start_line + , (int) loc->start_col, loc->end_line, (int) loc->end_col); + } + if (! start) /* End of an argument in verbose mode */ + out = stpcpy( out, ">"); + out = stpcpy( out, "*/"); + + return out; +} + +static char * chk_magic_balance( + char * buf, /* Sequence to check */ + char * buf_end, /* End of the sequence */ + int move, /* Move a straying magic ? */ + int diag /* Output a diagnostic? */ +) +/* + * Check imbalance of macro information magics and warn it. + * get_an_arg() calls this routine setting 'move' argument on, hence a stray + * magic is moved to an edge if found. + * This routine does not do token parsing. Yet it will do fine practically. + */ +{ +#define MAX_NEST_MAGICS 255 + char mac_id[ MAX_NEST_MAGICS][ MAC_E_LEN_V - 2]; + char arg_id[ MAX_NEST_MAGICS][ ARG_E_LEN_V - 2]; + char * mac_loc[ MAX_NEST_MAGICS]; + char * arg_loc[ MAX_NEST_MAGICS]; + char * mesg = "%s %ld %s-closing-comment(s) in tracing macro"; + int mac, arg; + int mac_s_n, mac_e_n, arg_s_n, arg_e_n; + char * buf_p = buf; /* Save 'buf' for debugging purpose */ + + mac = arg = 0; + + while (buf_p < buf_end) { + if (*buf_p++ != MAC_INF) + continue; + switch (*buf_p++) { + case MAC_CALL_START : + if (option_flags.v) { + mac_loc[ mac] = buf_p - 2; + memcpy( mac_id[ mac], buf_p, MAC_S_LEN - 2); + } + mac++; + buf_p += MAC_S_LEN - 2; + break; + case MAC_ARG_START : + if (option_flags.v) { + arg_loc[ arg] = buf_p - 2; + memcpy( arg_id[ arg], buf_p, ARG_S_LEN - 2); + } + arg++; + buf_p += ARG_S_LEN - 2; + break; + case MAC_ARG_END : + arg--; + if (option_flags.v) { + if (arg < 0) { /* Perhaps moved magic */ + if (diag) + cwarn( mesg, "Redundant", (long) -arg, "argument"); + } else if (memcmp( arg_id[ arg], buf_p, ARG_E_LEN_V - 2) != 0) + { + char * to_be_edge = NULL; + char * cur_edge; + + if (arg >= 1 && memcmp( arg_id[ 0], buf_p, ARG_E_LEN_V - 2) + == 0) { + to_be_edge = arg_loc[ arg]; + /* To be moved to top */ + cur_edge = arg_loc[ 0]; /* Current top */ + } else if (arg == 0) { + char arg_end_magic[ 2] = { MAC_INF, MAC_ARG_END}; + cur_edge = buf_end - ARG_E_LEN_V; + /* Search the last magic */ + /* Sequence from get_an_arg() is always */ + /* surrounded by starting of an arg magic */ + /* and its corresponding closing magic. */ + while (buf_p + (ARG_E_LEN_V - 2) <= cur_edge + && memcmp( cur_edge, arg_end_magic, 2) != 0) + cur_edge--; + if (buf_p + (ARG_E_LEN_V - 2) <= cur_edge + && memcmp( arg_id[ 0], cur_edge + 2 + , ARG_E_LEN_V - 2) == 0) { + to_be_edge = buf_p - 2; /* To be moved to end */ + } + } + if (to_be_edge) { /* Appropriate place found */ + if (diag) { + mac_s_n = ((to_be_edge[ 2] & UCHARMAX) - 1) + * UCHARMAX; + mac_s_n += (to_be_edge[ 3] & UCHARMAX) - 1; + arg_s_n = (to_be_edge[ 4] & UCHARMAX) - 1; + mcpp_fprintf( ERR, + "Stray arg inf of macro: %d:%d at line:%d\n" + , mac_s_n, arg_s_n, src_line); + } + if (move) { + /* Move a stray magic to outside of sequences */ + char magic[ ARG_E_LEN_V]; + size_t len = ARG_E_LEN_V; + memcpy( magic, cur_edge, len); + /* Save current edge */ + if (to_be_edge == arg_loc[ arg]) + /* Shift followings to cur_edge */ + memmove( cur_edge, cur_edge + len + , to_be_edge - cur_edge); + else /* Shift precedents to cur_edge */ + memmove( to_be_edge + len, to_be_edge + , cur_edge - to_be_edge); + memcpy( to_be_edge, magic, len); + /* Restore old 'cur_edge' into old 'to_be_edge' */ + } + } else { /* Serious imbalance, just warn */ + char * arg_p = arg_id[ arg]; + arg_s_n = ((arg_p[ 0] & UCHARMAX) - 1) * UCHARMAX; + arg_s_n += (arg_p[ 1] & UCHARMAX) - 1; + arg_e_n = ((buf_p[ 0] & UCHARMAX) - 1) * UCHARMAX; + arg_e_n += (buf_p[ 1] & UCHARMAX) - 1; + mcpp_fprintf( ERR, + "Asymmetry of arg inf found: start %d, end %d at line:%d\n" + , arg_s_n, arg_e_n, src_line); + } + } + buf_p += ARG_E_LEN_V - 2; + } + break; + case MAC_CALL_END : + mac--; + if (option_flags.v) { + if (mac < 0) { + if (diag) + cwarn( mesg, "Redundant", (long) -mac, "macro"); + } else if (memcmp( mac_id[ mac], buf_p, MAC_E_LEN_V - 2) != 0) + { + char * mac_p = mac_id[ mac]; + mac_s_n = ((mac_p[ 0] & UCHARMAX) - 1) * UCHARMAX; + mac_s_n += (mac_p[ 1] & UCHARMAX) - 1; + mac_e_n = ((buf_p[ 0] & UCHARMAX) - 1) * UCHARMAX; + mac_e_n += (buf_p[ 1] & UCHARMAX) - 1; + mcpp_fprintf( ERR, + "Asymmetry of macro inf found: start %d, end %d at line:%d\n" + , mac_s_n, mac_e_n, src_line); + } + buf_p += MAC_E_LEN_V - 2; + } + break; + default : /* Not a MAC_INF sequence */ + break; /* Continue */ + } + } + + if (diag && (warn_level & 1)) { + if (mac > 0) + cwarn( mesg, "Lacking", (long) mac, "macro"); + if (arg > 0) + cwarn( mesg, "Lacking", (long) arg, "argument"); + if ((mac || arg) && (mcpp_debug & EXPAND)) + mcpp_fputs( +"Imbalance of magics occurred (perhaps a moved magic), see and diagnostics.\n" + , DBG); + } + + return buf; +} + +static char * replace( + DEFBUF * defp, /* Macro to be replaced */ + char * out, /* Output Buffer */ + char * out_end, /* End of output buffer */ + const DEFBUF * outer, /* Outer macro replacing*/ + FILEINFO * rt_file, /* Repl-text "file" */ + LINE_COL line_col, /* Location of macro */ + int in_src_n /* Index into in_src[] */ +) +/* + * Replace a possibly nested macro recursively. + * replace() and rescan() call each other recursively. + * Return the advanced output pointer or NULL on error. + */ +{ + char ** arglist = NULL; /* Pointers to arguments*/ + int nargs; /* Number of arguments expected */ + char * catbuf; /* Buffer for prescan() */ + char * expbuf; /* Buffer for substitute() */ + char * out_p; /* Output pointer */ + char * cur_out = out; /* One more output pointer */ + int num_args; + /* Number of actual arguments (maybe less than expected) */ + int enable_trace_macro; /* To exclude _Pragma() pseudo macro */ + int m_num = 0; /* 'mac_num' of current macro */ + MACRO_INF * m_inf; /* Pointer into mac_inf[] */ + + if (mcpp_debug & EXPAND) { + dump_a_def( "replace entry", defp, FALSE, TRUE, fp_debug); + dump_unget( "replace entry"); + } + if ((mcpp_debug & MACRO_CALL) && in_if) + mcpp_fprintf( OUT, "/*%s*/", defp->name); + + enable_trace_macro = trace_macro && defp->nargs != DEF_PRAGMA; + if (enable_trace_macro) { + int num; + int recurs; + + if (mac_num >= MAX_MAC_INF - 1) { + cerror( "Too many nested macros in tracing %s" /* _E_ */ + , defp->name, 0L, NULL); + return NULL; + } else if (mac_num >= max_mac_num - 1) { + size_t len = sizeof (MACRO_INF) * max_mac_num; + /* Enlarge the array */ + mac_inf = (MACRO_INF *) xrealloc( (char *) mac_inf, len * 2); + memset( mac_inf + max_mac_num, 0, len); + /* Clear the latter half */ + max_mac_num *= 2; + } + m_num = ++mac_num; /* Remember this number */ + /* Note 'mac_num' starts at 1 */ + *cur_out++ = MAC_INF; /* Embed a magic char */ + *cur_out++ = MAC_CALL_START; /* A macro call */ + /* Its index number, can be greater than UCHARMAX */ + /* We represent the number by 2 bytes where each byte is not '\0' */ + *cur_out++ = (m_num / UCHARMAX) + 1; + *cur_out++ = (m_num % UCHARMAX) + 1; + *cur_out = EOS; + m_inf = & mac_inf[ m_num]; + m_inf->defp = defp; /* The macro definition */ + m_inf->num_args = 0; /* Default num of args */ + if (line_col.line) { + get_src_location( & line_col); + m_inf->locs.start_line = line_col.line; + m_inf->locs.start_col = line_col.col; + } else { + m_inf->locs.start_col = m_inf->locs.start_line = 0L; + } + m_inf->args = m_inf->loc_args = NULL; /* Default args */ + for (num = 1, recurs = 0; num < m_num; num++) + if (mac_inf[ num].defp == defp) + recurs++; /* Recursively nested macro */ + m_inf->recur = recurs; + } + + nargs = (defp->nargs == DEF_PRAGMA) ? 1 : (defp->nargs & ~AVA_ARGS); + + if (nargs < DEF_NOARGS_DYNAMIC) { /* __FILE__, __LINE__ */ + defp = def_special( defp); /* These are redefined dynamically */ + if (mcpp_mode == STD) { + /* Wrap repl-text with token separators to prevent token merging */ + *cur_out++ = TOK_SEP; + cur_out = stpcpy( cur_out, defp->repl); + *cur_out++ = TOK_SEP; + *cur_out = EOS; + } else { + cur_out = stpcpy( cur_out, defp->repl); + } + if (enable_trace_macro) { + m_inf->defp = defp; /* Redefined dynamically*/ + cur_out = close_macro_inf( cur_out, m_num, in_src_n); + } + return cur_out; + } else if (nargs == DEF_NOARGS_PREDEF_OLD && standard + && (warn_level & 1)) { /* Some macros on GCC */ + cwarn( "Old style predefined macro \"%s\" is used", /* _W2_ */ + defp->name, 0L, NULL); + } else if (nargs >= 0) { /* Function-like macro */ + squeeze_ws( NULL, NULL, NULL); /* Skip to '(' */ + /* Magic sequences are already read over by is_macro_call() */ + arglist = (char **) xmalloc( (nargs + 1) * sizeof (char *)); + arglist[ 0] = xmalloc( (size_t) (NMACWORK + IDMAX * 2)); + /* Note: arglist[ n] may be reallocated */ + /* and re-written by collect_args() */ + if ((num_args = collect_args( defp, arglist, m_num)) == ARG_ERROR) { + free( arglist[ 0]); /* Syntax error */ + free( arglist); + return NULL; + } + if (enable_trace_macro) { + /* Save the arglist for later informations */ + m_inf->args = arglist[ 0]; + m_inf->num_args = num_args; /* Number of actual args*/ + } + if (mcpp_mode == STD && outer && rt_file != infile) { + /* Has read over replacement-text */ + if (compat_mode) { + enable_repl( outer, FALSE); /* Enable re-expansion */ + if (mcpp_debug & EXPAND) + dump_string( "enabled re-expansion" + , outer ? outer->name : ""); + } else { + replacing[ rescan_level-1].read_over = READ_OVER; + } + } + } + + catbuf = xmalloc( (size_t) (NMACWORK + IDMAX)); + if (mcpp_debug & EXPAND) { + mcpp_fprintf( DBG, "(%s)", defp->name); + dump_string( "prescan entry", defp->repl); + } + if (prescan( defp, (const char **) arglist, catbuf, catbuf + NMACWORK) + == FALSE) { /* Process #, ## operators */ + diag_macro( CERROR, macbuf_overflow, defp->name, 0L, catbuf, defp + , NULL); + if (nargs >= 0) { + if (! enable_trace_macro) + /* arglist[0] is needed for macro infs */ + free( arglist[ 0]); + free( arglist); + } + free( catbuf); + return NULL; + } + catbuf = xrealloc( catbuf, strlen( catbuf) + 1); + /* Use memory sparingly */ + if (mcpp_debug & EXPAND) { + mcpp_fprintf( DBG, "(%s)", defp->name); + dump_string( "prescan exit", catbuf); + } + + if (nargs > 0) { /* Function-like macro with any argument */ + expbuf = xmalloc( (size_t) (NMACWORK + IDMAX)); + if (mcpp_debug & EXPAND) { + mcpp_fprintf( DBG, "(%s)", defp->name); + dump_string( "substitute entry", catbuf); + } + out_p = substitute( defp, (const char **) arglist, catbuf, expbuf + , expbuf + NMACWORK); /* Expand each arguments */ + if (! enable_trace_macro) + free( arglist[ 0]); + free( arglist); + free( catbuf); + expbuf = xrealloc( expbuf, strlen( expbuf) + 1); + /* Use memory sparingly */ + if (mcpp_debug & EXPAND) { + mcpp_fprintf( DBG, "(%s)", defp->name); + dump_string( "substitute exit", expbuf); + } + } else { /* Object-like macro or */ + if (nargs == 0 && ! enable_trace_macro) + /* Function-like macro with no argument */ + free( arglist[ 0]); + free( arglist); + out_p = expbuf = catbuf; + } + + if (out_p) + out_p = rescan( defp, expbuf, cur_out, out_end); + if (out_p && defp->nargs == DEF_PRAGMA) + has_pragma = TRUE; + /* Inform mcpp_main() that _Pragma() was found */ + free( expbuf); + if (enable_trace_macro && out_p) + out_p = close_macro_inf( out_p, m_num, in_src_n); + if (mcpp_debug & EXPAND) + dump_string( "replace exit", out); + + if (trace_macro && defp->nargs == DEF_PRAGMA) { + /* Remove intervening magics if the macro is _Pragma pseudo-macro */ + /* These magics have been inserted by macros in _Pragma()'s args */ + int c; + cur_out = out_p = out; + while ((c = *cur_out++) != EOS) { + if (c == MAC_INF) { + if (! option_flags.v) { + switch (*cur_out) { + case MAC_ARG_START : + cur_out++; + /* Fall through */ + case MAC_CALL_START : + cur_out++; + cur_out++; + /* Fall through */ + default: + cur_out++; + break; + } + } else { + switch (*cur_out) { + case MAC_ARG_START : + case MAC_ARG_END : + cur_out++; + /* Fall through */ + default: + cur_out += 3; + break; + } + } + } else { + *out_p++ = c; + } + } + *out_p = EOS; + } + + return out_p; +} + +static char * close_macro_inf( + char * out_p, /* Current output pointer */ + int m_num, /* 'mac_num' of this macro */ + int in_src_n /* Location of macro in arg */ +) +/* + * Mark up closing of a macro expansion. + * Note that 'm_num' argument is necessary rather than 'm_inf' from replace(), + * because mac_inf[] may have been reallocated while rescanning. + */ +{ + MACRO_INF * m_inf; + LINE_COL e_line_col; + + m_inf = & mac_inf[ m_num]; + *out_p++ = MAC_INF; /* Magic for end of macro expansion */ + *out_p++ = MAC_CALL_END; + if (option_flags.v) { + *out_p++ = (m_num / UCHARMAX) + 1; + *out_p++ = (m_num % UCHARMAX) + 1; + } + *out_p = EOS; + get_ch(); /* Clear the garbage */ + unget_ch(); + if (infile->fp || in_src_n) { + if (infile->fp) { /* Macro call on source file */ + e_line_col.line = src_line; + e_line_col.col = infile->bptr - infile->buffer; + } else { /* Macro in argument of parent macro and from source */ + e_line_col.line = in_src[ in_src_n].end_line; + e_line_col.col = in_src[ in_src_n].end_col; + } + /* Get the location before line splicing by */ + /* or by a line-crossing comment */ + get_src_location( & e_line_col); + m_inf->locs.end_line = e_line_col.line; + m_inf->locs.end_col = e_line_col.col; + } else { + m_inf->locs.end_col = m_inf->locs.end_line = 0L; + } + + return out_p; +} + +static DEFBUF * def_special( + DEFBUF * defp /* Macro definition */ +) +/* + * Re-define __LINE__, __FILE__. + * Return the new definition. + */ +{ + const FILEINFO * file; + DEFBUF ** prevp; + int cmp; + + switch (defp->nargs) { + case DEF_NOARGS_DYNAMIC - 1: /* __LINE__ */ + if ((src_line > std_limits.line_num || src_line <= 0) + && (warn_level & 1)) + diag_macro( CWARN + , "Line number %.0s\"%ld\" is out of range" /* _W1_ */ + , NULL, src_line, NULL, defp, NULL); + sprintf( defp->repl, "%ld", src_line); /* Re-define */ + break; + case DEF_NOARGS_DYNAMIC - 2: /* __FILE__ */ + for (file = infile; file != NULL; file = file->parent) { + if (file->fp != NULL) { + sprintf( work_buf, "\"%s\"", file->filename); + if (str_eq( work_buf, defp->repl)) + break; /* No change */ + defp->nargs = DEF_NOARGS; /* Enable to redefine */ + prevp = look_prev( defp->name, &cmp); + defp = install_macro( "__FILE__", DEF_NOARGS_DYNAMIC - 2, "" + , work_buf, prevp, cmp, 0); /* Re-define */ + break; + } + } + break; + } + return defp; +} + +static int prescan( + const DEFBUF * defp, /* Definition of the macro */ + const char ** arglist, /* Pointers to actual arguments */ + char * out, /* Output buffer */ + char * out_end /* End of output buffer */ +) +/* + * Concatenate the tokens surounding ## by catenate(), and stringize the + * argument following # by stringize(). + */ +{ + FILEINFO * file; + char * prev_token = NULL; /* Preceding token */ + char * horiz_space = NULL; /* Horizontal white space */ + int c; /* Value of a character */ + /* + * The replacement lists are -- + * stuff1stuff2 + * or stuff1stuff2stuff3... + * where is CAT, maybe with preceding space and following space, + * stuff might be + * ordinary-token + * MAC_PARM + * or MAC_PARM + * where is ST_QUO, possibly with following space. + * + * DEF_MAGIC may has been inserted sometimes. + * In other than POST_STD modes, TOK_SEP and IN_SRC may have been + * inserted, and TOK_SEPs are inserted also in this routine. + * In trace_macro mode, many magic character sequences may have been + * inserted here and there. + */ + + if (mcpp_mode == POST_STD) { + file = unget_string( defp->repl, defp->name); + } else { + *out++ = TOK_SEP; /* Wrap replacement */ + workp = work_buf; /* text with token */ + workp = stpcpy( workp, defp->repl); /* separators to */ + *workp++ = TOK_SEP; /* prevent unintended*/ + *workp = EOS; /* token merging. */ + file = unget_string( work_buf, defp->name); + } + + while (c = get_ch(), file == infile) { /* To the end of repl */ + + switch (c) { + case ST_QUOTE: + skip_ws(); /* Skip spaces and the returned MAC_PARM*/ + c = get_ch() - 1; /* Parameter number */ + prev_token = out; /* Remember the token */ + out = stringize( defp, arglist[ c], out); + /* Stringize without expansion */ + horiz_space = NULL; + break; + case CAT: + if (*prev_token == DEF_MAGIC || *prev_token == IN_SRC) { + /* Rare case yet possible after catenate() */ + size_t len = 1; + /* Remove trailing white space prior to removing DEF_MAGIC */ + if (horiz_space == out - 1) { + *--out = EOS; + horiz_space = NULL; + } + if (*prev_token == IN_SRC && trace_macro) + len = IN_SRC_LEN; + memmove( prev_token, prev_token + len + , strlen( prev_token + len)); + out -= len; + *out = EOS; /* Remove DEF_MAGIC, IN_SRC */ + } +#if COMPILER == GNUC + if (*prev_token == ',') + break; /* ', ##' sequence (peculiar to GCC) */ +#endif + if (horiz_space == out - 1) { + *--out = EOS; /* Remove trailing white space */ + horiz_space = NULL; + } + out = catenate( defp, arglist, out, out_end, &prev_token); + if (char_type[ *(out - 1) & UCHARMAX] & HSP) + horiz_space = out - 1; /* TOK_SEP has been appended */ + break; + case MAC_PARM: + prev_token = out; + *out++ = MAC_PARM; + *out++ = get_ch(); /* Parameter number */ + break; + case TOK_SEP: + case ' ': + case '\t' : + if (out - 1 == horiz_space) + continue; /* Squeeze white spaces */ + horiz_space = out; + *out++ = c; + break; + default: + prev_token = out; + scan_token( c, &out, out_end); /* Ordinary token */ + break; + } + + *out = EOS; /* Ensure termination */ + if (out_end <= out) /* Buffer overflow */ + return FALSE; + } + + *out = EOS; /* Ensure terminatation in case of no token */ + unget_ch(); + return TRUE; +} + +static char * catenate( + const DEFBUF * defp, /* The macro definition */ + const char ** arglist, /* Pointers to actual arguments */ + char * out, /* Output buffer */ + char * out_end, /* End of output buffer */ + char ** token_p /* Address of preceding token pointer */ +) +/* + * Concatenate the previous and the following tokens. + * Note: The parameter codes may coincide with white spaces or any + * other characters. + */ +{ + FILEINFO * file; + char * prev_prev_token = NULL; + const char * invalid_token + = "Not a valid preprocessing token \"%s\""; /* _E_ _W2_ */ + const char * argp; /* Pointer to an actual argument*/ + char * prev_token = *token_p; /* Preceding token */ + int in_arg = FALSE; + int c; /* Value of a character */ + + /* Get the previous token */ + if (*prev_token == MAC_PARM) { /* Formal parameter */ + c = (*(prev_token + 1) & UCHARMAX) - 1; /* Parm number */ + argp = arglist[ c]; /* Actual argument */ + out = prev_token; /* To overwrite */ + if (trace_macro) + argp = remove_magics( argp, TRUE); /* Remove pair of magics */ + if ((mcpp_mode == POST_STD && *argp == EOS) + || (mcpp_mode == STD && *argp == RT_END)) { + *out = EOS; /* An empty argument */ + } else { + if (mcpp_mode == POST_STD) { + file = unget_string( argp, NULL); + while (c = get_ch(), file == infile) { + prev_token = out; /* Remember the last token */ + scan_token( c, &out, out_end); + } /* Copy actual argument without expansion */ + unget_ch(); + } else { + unget_string( argp, NULL); + if (trace_macro) + free( (char *) argp); + /* malloc()ed in remove_magics() */ + while ((c = get_ch()) != RT_END) { + prev_prev_token = prev_token; + prev_token = out; /* Remember the last token */ + scan_token( c, &out, out_end); + } /* Copy actual argument without expansion */ + if (*prev_token == TOK_SEP) { + out = prev_token; + prev_token = prev_prev_token; /* Skip separator */ + } + } + if (*prev_token == DEF_MAGIC + || (mcpp_mode == STD && *prev_token == IN_SRC)) { + size_t len = 1; + if (trace_macro && *prev_token == IN_SRC) + len = IN_SRC_LEN; + memmove( prev_token, prev_token + len + , (size_t) ((out -= len) - prev_token)); + /* Remove DEF_MAGIC enabling the name to replace later */ + } + } + } /* Else the previous token is an ordinary token, not an argument */ + + c = skip_ws(); + + /* Catenate */ + switch (c) { + case ST_QUOTE: /* First stringize and then catenate */ + skip_ws(); /* Skip MAC_PARM, ST_QUOTE */ + c = get_ch() - 1; + out = stringize( defp, arglist[ c], out); + break; + case MAC_PARM: + c = get_ch() - 1; /* Parameter number */ + argp = arglist[ c]; /* Actual argument */ + if (trace_macro) + argp = remove_magics( argp, FALSE); /* Remove pair of magics */ + if ((mcpp_mode == POST_STD && *argp == EOS) + || (mcpp_mode == STD && *argp == RT_END)) { + *out = EOS; /* An empty argument */ + } else { + unget_string( argp, NULL); + if (trace_macro) + free( (char *) argp); + if ((c = get_ch()) == DEF_MAGIC) { /* Remove DEF_MAGIC */ + c = get_ch(); /* enabling to replace */ + } else if (c == IN_SRC) { /* Remove IN_SRC */ + if (trace_macro) { + get_ch(); /* Also its number */ + get_ch(); + } + c = get_ch(); + } + scan_token( c, &out, out_end); /* The first token */ + if (*infile->bptr) /* There are more tokens*/ + in_arg = TRUE; + } + break; + case IN_SRC: + if (trace_macro) { + get_ch(); + get_ch(); + } + /* Fall through */ + case DEF_MAGIC: + c = get_ch(); /* Skip DEF_MAGIC, IN_SRC */ + /* Fall through */ + default: + scan_token( c, &out, out_end); /* Copy the token */ + break; + } + + /* The generated sequence is a valid preprocessing-token ? */ + if (*prev_token) { /* There is any token */ + unget_string( prev_token, NULL); /* Scan once more */ + c = get_ch(); /* This line should be before the next line. */ + infile->fp = (FILE *)-1; /* To check token length*/ + if (mcpp_debug & EXPAND) + dump_string( "checking generated token", infile->buffer); + scan_token( c, (workp = work_buf, &workp), work_end); + infile->fp = NULL; + if (*infile->bptr != EOS) { /* More than a token */ + if (option_flags.lang_asm) { /* Assembler source */ + if (warn_level & 2) + diag_macro( CWARN, invalid_token, prev_token, 0L, NULL + , defp, NULL); + } else { + diag_macro( CERROR, invalid_token, prev_token, 0L, NULL, defp + , NULL); + } + infile->bptr += strlen( infile->bptr); + } + get_ch(); /* To the parent "file" */ + unget_ch(); + } + + if (mcpp_mode == STD && ! option_flags.lang_asm) { + *out++ = TOK_SEP; /* Prevent token merging*/ + *out = EOS; + } + if (in_arg) { /* There are more tokens after the generated one */ + if (mcpp_mode == POST_STD) { + file = infile; + while (c = get_ch(), file == infile) { + prev_token = out; /* Remember the last token */ + scan_token( c, &out, out_end); + } /* Copy rest of argument without expansion */ + unget_ch(); + } else { + while ((c = get_ch()) != RT_END) { + if (c == TOK_SEP) + continue; /* Skip separator */ + prev_token = out; /* Remember the last token */ + scan_token( c, &out, out_end); + } /* Copy rest of argument without expansion */ + } + } + *token_p = prev_token; /* Report back the last token */ + + return out; +} + +static const char * remove_magics( + const char * argp, /* The argument list */ + int from_last /* token is the last or first? */ +) +/* + * Remove pair of magic character sequences in an argument in order to catenate + * the last or first token to another. + * Or remove pair of magic character sequences surrounding an argument in order + * to keep symmetry of magics. + */ +{ +#define INIT_MAGICS 128 + + char (* mac_id)[ MAC_S_LEN]; + char (* arg_id)[ ARG_S_LEN]; + char ** mac_loc; + char ** arg_loc; + char * mgc_index; + size_t max_magics; + int mac_n, arg_n, ind, n; + char * first = NULL; + char * last = NULL; + char * token; + char * arg_p; + char * ap; + char * ep; + char * tp; + char * space = NULL; + int with_rtend; + int c; + FILEINFO * file; + + mac_id = (char (*)[ MAC_S_LEN]) xmalloc( MAC_S_LEN * INIT_MAGICS); + arg_id = (char (*)[ ARG_S_LEN]) xmalloc( ARG_S_LEN * INIT_MAGICS * 2); + mac_loc = (char **) xmalloc( sizeof (char *) * INIT_MAGICS); + arg_loc = (char **) xmalloc( sizeof (char *) * INIT_MAGICS * 2); + mgc_index = xmalloc( INIT_MAGICS * 3); + max_magics = INIT_MAGICS; + + mac_n = arg_n = ind = 0; + ap = arg_p = xmalloc( strlen( argp) + 1); + strcpy( arg_p, argp); + ep = arg_p + strlen( arg_p); + if (*(ep - 1) == RT_END) { + with_rtend = TRUE; + ep--; /* Point to RT_END */ + } else { + with_rtend = FALSE; + } + file = unget_string( arg_p, NULL); /* Stack to "file" for token parsing*/ + + /* Search all the magics in argument, as well as first and last token */ + /* Read stacked arg_p and write it to arg_p as a dummy buffer */ + while ((*ap++ = c = get_ch()) != RT_END && file == infile) { + if (c == MAC_INF) { + if (mac_n >= max_magics || arg_n >= max_magics * 2) { + max_magics *= 2; + mac_id = (char (*)[ MAC_S_LEN]) xrealloc( (void *) mac_id + , MAC_S_LEN * max_magics); + arg_id = (char (*)[ ARG_S_LEN]) xrealloc( (void *) arg_id + , ARG_S_LEN * max_magics * 2); + mac_loc = (char **) xrealloc( (void *) mac_loc + , sizeof (char *) * max_magics); + arg_loc = (char **) xrealloc( (void *) arg_loc + , sizeof (char *) * max_magics * 2); + mgc_index = xrealloc( mgc_index, max_magics * 3); + } + *ap++ = c = get_ch(); + switch (c) { + case MAC_CALL_START : + *ap++ = get_ch(); + *ap++ = get_ch(); + mac_loc[ mac_n] = ap - MAC_S_LEN; /* Location of the seq */ + memcpy( mac_id[ mac_n], ap - (MAC_S_LEN - 1), MAC_S_LEN - 1); + /* Copy the sequence from its second byte */ + mac_id[ mac_n++][ MAC_S_LEN - 1] = FALSE; + /* Mark of to-be-removed or not */ + break; + case MAC_ARG_START : + *ap++ = get_ch(); + *ap++ = get_ch(); + *ap++ = get_ch(); + arg_loc[ arg_n] = ap - ARG_S_LEN; + memcpy( arg_id[ arg_n], ap - (ARG_S_LEN - 1), ARG_S_LEN - 1); + arg_id[ arg_n++][ ARG_S_LEN - 1] = FALSE; + break; + case MAC_CALL_END : + mac_loc[ mac_n] = ap - MAC_E_LEN; + mac_id[ mac_n][ 0] = c; + mac_id[ mac_n++][ MAC_E_LEN_V - 1] = FALSE; + break; + case MAC_ARG_END : + arg_loc[ arg_n] = ap - ARG_E_LEN; + arg_id[ arg_n][ 0] = c; + arg_id[ arg_n++][ ARG_E_LEN_V - 1] = FALSE; + break; + } + if (option_flags.v) { + switch (c) { + case MAC_CALL_END : + mac_id[ mac_n - 1][ 1] = *ap++ = get_ch(); + mac_id[ mac_n - 1][ 2] = *ap++ = get_ch(); + break; + case MAC_ARG_END : + arg_id[ arg_n - 1][ 1] = *ap++ = get_ch(); + arg_id[ arg_n - 1][ 2] = *ap++ = get_ch(); + arg_id[ arg_n - 1][ 3] = *ap++ = get_ch(); + break; + } + } + mgc_index[ ind++] = c; /* Index to mac_id[] and arg_id[] */ + continue; + } else if (char_type[ c & UCHARMAX] & HSP) { + if (! first) { + ap--; /* Skip white space on top of the argument */ + ep--; + } + continue; + } + last = --ap; + if (! first) + first = ap; + if (char_type[ c & UCHARMAX] & HSP) + space = ap; /* Remember the last white space */ + scan_token( c, &ap, ep); + } + if (file == infile) + get_ch(); /* Clear the "file" */ + unget_ch(); + if (space == ep - 1) + ep--; /* Remove trailing white space */ + if (with_rtend) + *ep++ = RT_END; + *ep = EOS; + if ((from_last && !last) || (!from_last && !first)) + return arg_p; + if (mac_n == 0 && arg_n == 0) /* No magic sequence */ + return arg_p; + token = from_last ? last : first; + + /* Remove pair of magics surrounding the last (or first) token */ + if (mac_n) { + /* Remove pair of macro magics surrounding the token */ + int magic, mac_s, mac_e; + int nest_s, nest_e; + + nest_s = 0; + for (mac_s = 0; mac_loc[ mac_s] < token; mac_s++) { + magic = mac_id[ mac_s][ 0]; + if (magic == MAC_CALL_START) { /* Starting magic */ + nest_e = ++nest_s; + /* Search the corresponding closing magic */ + for (mac_e = mac_s + 1; mac_e < mac_n; mac_e++) { + magic = mac_id[ mac_e][ 0]; + if (magic == MAC_CALL_START) { + nest_e++; + } else { /* MAC_CALL_END: Closing magic */ + nest_e--; + /* Search after the token */ + if (token < mac_loc[ mac_e] && nest_e == nest_s - 1) { +#if DEBUG_MACRO_ANN + if (option_flags.v) + chk_symmetry( mac_id[ mac_s], mac_id[ mac_e] + , MAC_E_LEN - 2); +#endif + mac_id[ mac_e][ MAC_S_LEN - 1] = TRUE; + /* To be removed */ + break; /* Done for this mac_s */ + } + } + } + if (mac_e < mac_n) /* Found corresponding magic */ + mac_id[ mac_s][ MAC_S_LEN - 1] = TRUE; /* To be removed*/ + else /* Not found */ + break; + } else { + nest_s--; /* MAC_CALL_END: Closing magic */ + } + } + } + if (arg_n) { + /* Remove pair of arg magics surrounding the token */ + int magic, arg_s, arg_e; + int nest_s, nest_e; + + nest_s = 0; + for (arg_s = 0; arg_loc[ arg_s] < token; arg_s++) { + magic = arg_id[ arg_s][ 0]; + if (magic == MAC_ARG_START) { + nest_e = ++nest_s; + for (arg_e = arg_s + 1; arg_e < arg_n; arg_e++) { + magic = arg_id[ arg_e][ 0]; + if (magic == MAC_ARG_START) { + nest_e++; + } else { + nest_e--; + if (token < arg_loc[ arg_e] && nest_e == nest_s - 1) { +#if DEBUG_MACRO_ANN + if (option_flags.v) + chk_symmetry( arg_id[ arg_s], arg_id[ arg_e] + , ARG_E_LEN_V - 2); +#endif + arg_id[ arg_e][ ARG_S_LEN - 1] = TRUE; + break; + } + } + } + if (arg_e < arg_n) + arg_id[ arg_s][ ARG_S_LEN - 1] = TRUE; + else + break; + } else { + nest_s--; + } + } + } + + /* Copy the sequences skipping the to-be-removed magic seqs */ + file = unget_string( arg_p, NULL); /* Stack to "file" for token parsing*/ + tp = arg_p; + ep = arg_p + strlen( arg_p); + mac_n = arg_n = n = 0; + + while ((*tp++ = c = get_ch()) != RT_END && file == infile) { + char ** loc_tab; + int num, mark, rm, magic; + size_t len; + + if (c != MAC_INF) { + scan_token( c, (--tp, &tp), ep); + continue; + } + unget_ch(); /* Pushback MAC_INF */ + tp--; + + switch (magic = mgc_index[ n++]) { + case MAC_CALL_START : + len = MAC_S_LEN; + mark = MAC_S_LEN - 1; + break; + case MAC_CALL_END : + len = option_flags.v ? MAC_E_LEN_V : MAC_E_LEN; + mark = MAC_E_LEN_V - 1; + break; + case MAC_ARG_START : + len = ARG_S_LEN; + mark = ARG_S_LEN - 1; + break; + case MAC_ARG_END : + len = option_flags.v ? ARG_E_LEN_V : ARG_E_LEN; + mark = ARG_E_LEN_V - 1; + break; + } + switch (magic) { + case MAC_CALL_START : + case MAC_CALL_END : + loc_tab = mac_loc; + num = mac_n; + rm = mac_id[ mac_n++][ mark]; + break; + case MAC_ARG_START : + case MAC_ARG_END : + loc_tab = arg_loc; + num = arg_n; + rm = arg_id[ arg_n++][ mark]; + break; + } + if (rm == FALSE) { /* Not to be removed */ + memmove( tp, loc_tab[ num], len); + /* Copy it (from arg_p buffer for convenience) */ + tp += len; + } + infile->bptr += len; + } + if (! with_rtend) + tp--; + *tp = EOS; + if (file == infile) + get_ch(); /* Clear the "file" */ + unget_ch(); + + return arg_p; +} + +#if DEBUG_MACRO_ANN +static void chk_symmetry( + char * start_id, /* Sequence of macro (or arg) starting inf */ + char * end_id, /* Sequence of macro (or arg) closing inf */ + size_t len /* Length of the sequence */ +) +/* + * Check whether starting sequence and corresponding closing sequence is the + * same. + */ +{ + int s_id, e_id, arg_s_n, arg_e_n; + + if (memcmp( start_id + 1, end_id + 1, len) == 0) + return; /* The sequences are the same */ + s_id = ((start_id[ 1] & UCHARMAX) - 1) * UCHARMAX; + s_id += (start_id[ 2] & UCHARMAX) - 1; + e_id = ((end_id[ 1] & UCHARMAX) - 1) * UCHARMAX; + e_id += (end_id[ 2] & UCHARMAX) - 1; + if (len >= 3) { + arg_s_n = (start_id[ 3] & UCHARMAX) - 1; + arg_e_n = (end_id[ 3] & UCHARMAX) - 1; + mcpp_fprintf( ERR, +"Asymmetry of arg inf found removing magics: start %d:%d, end: %d:%d at line:%d\n" + , s_id, arg_s_n, e_id, arg_e_n, src_line); + } else { + mcpp_fprintf( ERR, +"Asymmetry of macro inf found removing magics: start %d, end: %d at line:%d\n" + , s_id, e_id, src_line); + } +} +#endif + +static char * stringize( + const DEFBUF * defp, /* The macro definition */ + const char * argp, /* Pointer to argument */ + char * out /* Output buffer */ +) +/* + * Make a string literal from an argument. + */ +{ + char arg_end_inf[ 8][ ARG_E_LEN_V - 1]; + /* Verbose information of macro arguments */ + FILEINFO * file; + int stray_bsl = FALSE; /* '\\' not in literal */ + char * out_p = out; + int token_type; + int num_arg_magic = 0; + size_t len; + size_t arg_e_len = option_flags.v ? ARG_E_LEN_V : ARG_E_LEN; + int c; + + if (trace_macro) { + while ((*argp == MAC_INF && *(argp + 1) == MAC_ARG_START) + /* Argument is prefixed with macro tracing magics */ + || (char_type[ *argp & UCHARMAX] & HSP)) { + if (*argp == MAC_INF) { /* Move magics to outside of string */ + memcpy( out_p, argp, ARG_S_LEN); + out_p += ARG_S_LEN; + argp += ARG_S_LEN; + num_arg_magic++; + } else { /* Skip white spaces */ + argp++; + } + } + } + + file = unget_string( argp, NULL); + len = strlen( infile->buffer); /* Sequence ends with RT_END */ + if (trace_macro) { /* Remove suffixed argument closing magics */ + /* There are 0 or more argument closing magic sequences and */ + /* 0 or more TOK_SEPs and no space at the end of argp. */ + /* This is assured by get_an_arg(). */ + int nmagic = 0; + while (len > arg_e_len + && (((*(infile->buffer + len - arg_e_len - 1) == MAC_INF + && *(infile->buffer + len - arg_e_len) == MAC_ARG_END) + || *(infile->buffer + len - 2) == TOK_SEP))) { + if (*(infile->buffer + len - arg_e_len - 1) == MAC_INF + && *(infile->buffer + len - arg_e_len) == MAC_ARG_END) { + if (option_flags.v) { + memcpy( arg_end_inf[ nmagic] + , infile->buffer + len - arg_e_len + 1 + , arg_e_len - 2); + arg_end_inf[ nmagic][ arg_e_len - 2] = EOS; + } + nmagic++; + len -= arg_e_len; + *(infile->buffer + len - 1) = RT_END; + *(infile->buffer + len) = EOS; + } else if (*(infile->buffer + len - 2) == TOK_SEP) { + len--; + *(infile->buffer + len - 1) = RT_END; + *(infile->buffer + len) = EOS; + } + } + if (nmagic != num_arg_magic) { /* There are some imbalances */ + /* Some surrounding magics correspond to intervening ones. */ + /* So, unmatched surrounding magics should be removed. */ + if (num_arg_magic > nmagic) { + num_arg_magic = nmagic; /* Ignore the surplus */ + out_p = out + ARG_S_LEN * num_arg_magic; + } /* Else simply ignore the surplus nmagic */ + } + } + *out_p++ = '"'; /* Starting quote */ + + while ((c = get_ch()), ((mcpp_mode == POST_STD && file == infile) + || (mcpp_mode == STD && c != RT_END))) { + if (c == ' ' || c == '\t') { + *out_p++ = c; + continue; + } else if (c == TOK_SEP) { + continue; /* Skip inserted separator */ + } else if (c == IN_SRC) { /* Skip magics */ + if (trace_macro) { + get_ch(); + get_ch(); + } + continue; + } else if (c == '\\') { + stray_bsl = TRUE; /* May cause a trouble */ + } else if (c == MAC_INF) { /* Remove intervening magics */ + switch (c = get_ch()) { + case MAC_ARG_START : + get_ch(); + /* Fall through */ + case MAC_CALL_START : + get_ch(); + get_ch(); + break; + } + if (option_flags.v) { + switch (c) { + case MAC_ARG_END : + get_ch(); + /* Fall through */ + case MAC_CALL_END : + get_ch(); + get_ch(); + break; + } + } + continue; + } + token_type = scan_token( c, (workp = work_buf, &workp), work_end); + + switch (token_type) { + case WSTR: + case WCHR: + case STR: + case CHR: + workp = work_buf; + while ((c = *workp++ & UCHARMAX) != EOS) { + if (char_type[ c] & mbchk) { /* Multi-byte character */ + mb_read( c, &workp, (*out_p++ = c, &out_p)); + /* Copy as it is */ + continue; + } else if (c == '"') { + *out_p++ = '\\'; /* Insert '\\' */ + } else if (c == '\\') { +#if OK_UCN + if (mcpp_mode == POST_STD || ! stdc3 + || (*workp != 'u' && *workp != 'U')) + /* Not UCN */ +#endif + *out_p++ = '\\'; + } + *out_p++ = c; + } + *out_p = EOS; + break; + default: + out_p = stpcpy( out_p, work_buf); + break; + } + } + + if (mcpp_mode == POST_STD) + unget_ch(); + *out_p++ = '"'; /* Closing quote */ + if (trace_macro) { + while (num_arg_magic--) { + *out_p++ = MAC_INF; /* Restore removed magic*/ + *out_p++ = MAC_ARG_END; + if (option_flags.v) + out_p = stpcpy( out_p, arg_end_inf[ num_arg_magic]); + } + } + *out_p = EOS; + + if (stray_bsl) { /* '\\' outside of quotation has been found */ + int invalid = FALSE; + unget_string( out, defp->name); + if (mcpp_debug & EXPAND) + dump_string( "checking generated token", infile->buffer); + scan_quote( get_ch(), work_buf, work_end, TRUE); + /* Unterminated or too long string will be diagnosed */ + if (*infile->bptr != EOS) /* More than a token */ + invalid = TRUE; /* Diagnose after clearing the "file" */ + infile->bptr += strlen( infile->bptr); + get_ch(); /* Clear the "file" */ + unget_ch(); + if (invalid) + diag_macro( CERROR + , "Not a valid string literal %s" /* _E_ */ + , out, 0L, NULL, defp, NULL); + } +#if NWORK-2 > SLEN90MIN + else if ((warn_level & 4) && out_p - out > std_limits.str_len) + diag_macro( CWARN + , "String literal longer than %.0s%ld bytes %s" /* _W4_ */ + , NULL , (long) std_limits.str_len, out, defp, NULL); +#endif + return out_p; +} + +static char * substitute( + const DEFBUF * defp, /* The macro getting arguments */ + const char ** arglist, /* Pointers to actual arguments */ + const char * in, /* Replacement text */ + char * out, /* Output buffer */ + char * out_end /* End of output buffer */ +) +/* + * Replace completely each actual arguments of the macro, and substitute for + * the formal parameters in the replacement list. + */ +{ + char * out_start = out; + const char * arg; + int c; + int gvar_arg; /* gvar_arg'th argument is GCC variable argument */ + + gvar_arg = (defp->nargs & GVA_ARGS) ? (defp->nargs & ~AVA_ARGS) : 0; + *out = EOS; /* Ensure to termanate */ + + while ((c = *in++) != EOS) { + if (c == MAC_PARM) { /* Formal parameter */ + c = *in++ & UCHARMAX; /* Parameter number */ + if (mcpp_debug & EXPAND) { + mcpp_fprintf( DBG, " (expanding arg[%d])", c); + dump_string( NULL, arglist[ c - 1]); + } +#if COMPILER == GNUC || COMPILER == MSC + arg = arglist[ c - 1]; + if (trace_macro) { + if (*arg == MAC_INF) { + if (*++arg == MAC_ARG_START) + arg += ARG_S_LEN - 1; /* Next to magic chars */ + } + } +#if COMPILER == GNUC + if (c == gvar_arg && *arg == RT_END && ! ansi) { + /* + * GCC variadic macro and its variable argument is absent. + * Note that in its "strict-ansi" mode GCC does not remove + * ',', nevertheless it ignores '##' (inconsistent + * behavior). Though GCC2 changes behavior depending the + * ',' is preceded by space or not, we only count on the + * "strict-ansi" flag. + */ +#else + if ((defp->nargs & VA_ARGS) && c == (defp->nargs & ~VA_ARGS) + && *arg == RT_END && mcpp_mode == STD) { + /* Visual C 2005 also removes ',' immediately preceding */ + /* absent variable arguments. It does not use '##' though. */ +#endif + char * tmp; + tmp = out - 1; + while (char_type[ *tmp & UCHARMAX] & HSP) + tmp--; + if (*tmp == ',') { + out = tmp; /* Remove the immediately preceding ',' */ + if (warn_level & 1) { + *out = EOS; + diag_macro( CWARN, + "Removed ',' preceding the absent variable argument: %s" /* _W1_ */ + , out_start, 0L, NULL, defp, NULL); + } + } + } else +#endif + if ((out = rescan( NULL, arglist[ c - 1], out, out_end)) + == NULL) { /* Replace completely */ + return NULL; /* Error */ + } + } else { + *out++ = c; /* Copy the character */ + } + } + *out = EOS; + return out; +} + +static char * rescan( + const DEFBUF * outer, /* Outer macro just replacing */ + const char * in, /* Sequences to be rescanned */ + char * out, /* Output buffer */ + char * out_end /* End of output buffer */ +) +/* + * Re-scan the once replaced sequences to replace the remaining macros + * completely. + * rescan() and replace() call each other recursively. + * + * Note: POST_STD mode does not use IN_SRC nor TOK_SEP and seldom uses RT_END. + * Checking of those are unnecessary overhead for POST_STD mode. To integrate + * the code for POST_STD with STD mode, however, we use these checkings + * commonly. + * Also compat_mode does not use IN_SRC unless in trace_macro mode. + * STD mode has macro notification mode (trace_macro mode), too. Its routines + * are complicated and not easy to understand. + */ +{ + char * cur_cp = NULL; + char * tp = NULL; /* Temporary pointer into buffer*/ + char * out_p = out; /* Current output pointer */ + FILEINFO * file; /* Input sequences stacked on a "file" */ + DEFBUF * inner; /* Inner macro to replace */ + int c; /* First character of token */ + int token_type; + char * mac_arg_start = NULL; +#if COMPILER == GNUC + int within_defined = FALSE; + int within_defined_arg_depth = 0; +#endif + + if (mcpp_debug & EXPAND) { + mcpp_fprintf( DBG, "rescan_level--%d (%s) " + , rescan_level + 1, outer ? outer->name : ""); + dump_string( "rescan entry", in); + } + if (! disable_repl( outer)) /* Don't re-replace replacing macro */ + return NULL; /* Too deeply nested macro call */ + if (mcpp_mode == STD) { + get_ch(); /* Clear empty "file"s */ + unget_ch(); /* for diagnostic */ + cur_cp = infile->bptr; /* Remember current location */ + } + file = unget_string( in, outer ? outer->name : NULL); + /* Stack input on a "file" */ + + while ((c = get_ch()), file == infile + /* Rescanning is limited to the "file" */ + && c != RT_END) { + /* + * This is the trick of STD mode. collect_args() via replace() + * may read over to file->parent (provided the "file" is macro) + * unless stopped by RT_END. + */ + size_t len = 0; + + if (char_type[ c] & HSP) { + *out_p++ = c; + continue; + } else if (c == MAC_INF) { /* Only in STD mode */ + *out_p++ = c; + *out_p++ = c = get_ch(); + switch (c) { + case MAC_ARG_START : + mac_arg_start = out_p - 2; /* Remember the position */ + *out_p++ = get_ch(); + /* Fall through */ + case MAC_CALL_START : + *out_p++ = get_ch(); + *out_p++ = get_ch(); + break; + case MAC_ARG_END : + if (! option_flags.v) + break; + else + *out_p++ = get_ch(); + /* Fall through */ + case MAC_CALL_END : + if (option_flags.v) { + *out_p++ = get_ch(); + *out_p++ = get_ch(); + } + break; + } /* Pass these characters as they are */ + continue; + } + token_type = scan_token( c, (tp = out_p, &out_p), out_end); +#if COMPILER == GNUC + if (mcpp_mode == STD) { + /* Pass stuff within defined() as they are, if in_directive */ + if ((within_defined || within_defined_arg_depth)) { + if (c == '(') { + within_defined_arg_depth++; + within_defined = FALSE; + } else if (within_defined_arg_depth && c == ')') { + within_defined_arg_depth--; + } /* Else should be a name (possibly macro) */ + continue; + } else if (token_type == NAM && in_directive + && str_eq(identifier, "defined")) { + within_defined = TRUE; + /* 'defined' token in directive line */ + continue; + } + } +#endif + if (mcpp_mode == STD && c == IN_SRC) + len = trace_macro ? IN_SRC_LEN : 1; + if (token_type == NAM && c != DEF_MAGIC + && (inner = look_id( tp + len)) != NULL) { /* A macro name */ + int is_able; /* Macro is not "blue-painted" */ + char * endf = NULL; /* Output stream at end of infile */ + MAGIC_SEQ mgc_seq; /* Magics between macro name and '(' */ + + if (trace_macro) + memset( &mgc_seq, 0, sizeof (MAGIC_SEQ)); + if (is_macro_call( inner, &out_p, &endf + , trace_macro ? &mgc_seq : NULL) + && ((mcpp_mode == POST_STD && is_able_repl( inner)) + || (mcpp_mode == STD + && (((is_able = is_able_repl( inner)) == YES) + || (is_able == READ_OVER + && (c == IN_SRC || compat_mode)))))) { + /* Really a macro call */ + LINE_COL in_src_line_col = { 0L, 0}; + int in_src_n = 0; + + if (trace_macro) { + if (c == IN_SRC) { /* Macro in argument from source */ + /* Get the location in source */ + in_src_n = ((*(tp + 1) & UCHARMAX) - 1) * UCHARMAX; + in_src_n += (*(tp + 2) & UCHARMAX) - 1; + in_src_line_col.line = in_src[ in_src_n].start_line; + in_src_line_col.col = in_src[ in_src_n].start_col; + } + if (inner->nargs >= 0 && mgc_seq.magic_start) { + /* Magic sequence is found between macro */ + /* name and '('. This is a nuisance. */ + char * mgc_cleared; + size_t seq_len; + size_t arg_elen = option_flags.v ? ARG_E_LEN_V + : ARG_E_LEN; + if ((tp - ARG_S_LEN) == mac_arg_start + && *mgc_seq.magic_start == MAC_INF + && *(mgc_seq.magic_start + 1) == MAC_ARG_END) { + /* Name of function-like macro is surrounded by */ + /* magics, which were inserted by outer macro. */ + /* Remove the starting magic. (The closing magic*/ + /* has already been removed by is_macro_call(). */ + tp -= ARG_S_LEN; + mgc_seq.magic_start += arg_elen; /* Next seq */ + } + /* Restore once skipped magic sequences, */ + /* then remove "pair"s of sequences. */ + seq_len = mgc_seq.magic_end - mgc_seq.magic_start; + if (seq_len) { + insert_to_bptr( mgc_seq.magic_start, seq_len); + mgc_cleared = remove_magics( + (const char *) infile->bptr, FALSE); + /* Remove pair of magics */ + strcpy( infile->bptr, mgc_cleared); + free( mgc_cleared); + } + } + } + if ((out_p = replace( inner, tp, out_end, outer, file + , in_src_line_col, in_src_n)) == NULL) + break; /* Error of macro call */ + } else { + if (endf && strlen( endf)) { + /* Has read over to parent file: another nuisance. */ + /* Restore the read-over sequence into current buffer. */ + /* Don't use unget_string() here. */ + insert_to_bptr( endf, out_p - endf); + out_p = endf; + *out_p = EOS; + } + if ((is_able = is_able_repl( inner)) == NO + || (mcpp_mode == STD && is_able == READ_OVER + && c != IN_SRC && ! compat_mode)) { + if (mcpp_mode == POST_STD || c != IN_SRC) + memmove( tp + 1, tp, (size_t) (out_p++ - tp)); + *tp = DEF_MAGIC; /* Mark not to replace */ + } /* Else not a macro call*/ + } + } + if (out_end <= out_p) { + *out_p = EOS; + diag_macro( CERROR, macbuf_overflow, outer ? outer->name : in, 0L + , out, outer, inner); + out_p = NULL; + break; + } + } + + if (out_p) { + *out_p = EOS; + if (mcpp_mode == STD) { + if (c != RT_END) { + unget_ch(); + if (outer != NULL) { /* outer isn't a macro in argument */ + if (infile && infile->bptr != cur_cp + /* Have overrun replacement list*/ + && !(tp && *tp == DEF_MAGIC) + /* Macro is enabled */ + && ((!compat_mode && (warn_level & 1)) + || (compat_mode && (warn_level & 8)))) { + diag_macro( CWARN, +"Replacement text \"%s\" of macro %.0ld\"%s\" involved subsequent text" /* _W1_ */ + , in, 0L, outer->name, outer, inner); + } + } + } /* Else remove RT_END */ + } else { + unget_ch(); + } + } + enable_repl( outer, TRUE); /* Enable macro for later text */ + if (mcpp_debug & EXPAND) { + mcpp_fprintf( DBG, "rescan_level--%d (%s) " + , rescan_level + 1, outer ? outer->name : ""); + dump_string( "rescan exit", out); + } + return out_p; +} + +static int disable_repl( + const DEFBUF * defp +) +/* + * Register the macro name currently replacing. + */ +{ + if (defp == NULL) + return TRUE; + if (rescan_level >= RESCAN_LIMIT) { + diag_macro( CERROR, + "Rescanning macro \"%s\" more than %ld times at \"%s\"" /* _E_ */ + , macro_name, (long) RESCAN_LIMIT, defp->name, defp, NULL); + return FALSE; + } + replacing[ rescan_level].def = defp; + replacing[ rescan_level++].read_over = NO; + return TRUE; +} + +static void enable_repl( + const DEFBUF * defp, + int done +) +/* + * Un-register the macro name just replaced for later text. + */ +{ + if (defp == NULL) + return; + replacing[ rescan_level - 1].def = NULL; + if (done && rescan_level) + rescan_level--; +} + +static int is_able_repl( + const DEFBUF * defp +) +/* + * The macro is permitted to replace ? + */ +{ + int i; + + if (defp == NULL) + return YES; + for (i = rescan_level-1; i >= 0; i--) { + if (defp == replacing[ i].def) + return replacing[ i].read_over; + } + return YES; +} + +static char * insert_to_bptr( + char * ins, /* Sequence to be inserted */ + size_t len /* Byte to be inserted */ +) +/* + * Insert a sequence into infile->bptr. + * infile->buffer is reallocated to ensure buffer size. + * This routine changes absolute address of infile->bptr, hence rescan() emits + * a "Replacement text ... involved subsequent text" warning. Anyway, + * a macro which needs this routine deserves that warning. + */ +{ + size_t bptr_offset = infile->bptr - infile->buffer; + + if (infile->fp == NULL) { /* Not source file */ + infile->buffer = xrealloc( infile->buffer + , strlen( infile->buffer) + len + 1); + infile->bptr = infile->buffer + bptr_offset; + } + memmove( infile->bptr + len, infile->bptr, strlen( infile->bptr) + 1); + memcpy( infile->bptr, ins, len); + + return infile->buffer; +} + +/* + * M a c r o E x p a n s i o n i n P R E - S T A N D A R D M o d e + */ + +#include "setjmp.h" + +static jmp_buf jump; + +static char * arglist_pre[ NMACPARS]; /* Pointers to args */ + +static int rescan_pre( int c, char * mp, char * mac_end); + /* Replace a macro repeatedly */ +static int replace_pre( DEFBUF * defp); + /* Replace a macro once */ +static void substitute_pre( DEFBUF * defp); + /* Substitute parms with args */ + +static char * expand_prestd( + DEFBUF * defp, /* Macro definition */ + char * out, /* Output buffer */ + char * out_end, /* End of output buffer */ + LINE_COL line_col, /* Location of macro (not used in prestd) */ + int * pragma_op /* Flag of _Pragma (not used in prestd) */ +) +/* + * Expand a macro call completely, write the results to the specified buffer + * and return the advanced pointer. + */ +{ + char macrobuf[ NMACWORK + IDMAX]; /* Buffer for rescan_pre() */ + char * mac_end = ¯obuf[ NMACWORK]; /* End of macrobuf[] */ + char * out_p; /* Pointer into out[] */ + char * mp = macrobuf; /* Pointer into macrobuf*/ + int len; /* Length of a token */ + int token_type; /* Type of token */ + int c; + + macro_line = src_line; /* Line number for diag.*/ + unget_string( identifier, identifier); /* To re-read */ + macro_name = defp->name; + rescan_level = 0; + if (setjmp( jump) == 1) { + skip_macro(); + mp = macrobuf; + *mp = EOS; + macro_line = MACRO_ERROR; + goto err_end; + } + + while ((c = get_ch()) != CHAR_EOF && infile->fp == NULL) { + /* While the input stream is a macro */ + while (c == ' ' || c == '\t') { /* Output the spaces */ + *mp++ = c; + c = get_ch(); + if (infile == NULL || infile->fp != NULL) + goto exp_end; + } + token_type = rescan_pre( c, mp, mac_end); /* Scan token */ + /* and expand. Result of expansion is written at mp. */ + + switch (token_type) { + case STR: /* String literal */ + case CHR: /* Character constant */ + case NUM: /* Number token */ + case OPE: /* Operator or punct. */ + case NAM: /* Identifier */ + len = strlen( mp); + mp += len; + break; + case SEP: /* Special character */ + switch( *mp) { + case COM_SEP: + if (mcpp_mode == OLD_PREP) + break; /* Zero-length comment is removed now */ + /* Else fall through */ + default: /* Who knows ? */ + mp++; /* Copy the character */ + break; + } + break; + case NO_TOKEN: break; /* End of file */ + default: /* Unkown token char. */ + mp++; /* Copy the character */ + break; + } + + if (mac_end <= mp) { + *mp = EOS; + cerror( macbuf_overflow, macro_name, 0L, macrobuf); + longjmp( jump, 1); + } + if (mcpp_debug & GETC) { + *mp = EOS; + dump_string( "macrobuf", macrobuf); + } + } + +exp_end: + unget_ch(); + while (macrobuf < mp && (*(mp - 1) == ' ' || *(mp - 1) == '\t')) + mp--; /* Remove trailing blank */ + macro_line = 0; + *mp = EOS; + if (mp - macrobuf > out_end - out) { + cerror( macbuf_overflow, macro_name, 0L, macrobuf); + macro_line = MACRO_ERROR; + } +err_end: + out_p = stpcpy( out, macrobuf); + if (mcpp_debug & EXPAND) { + dump_string( "expand_prestd exit", out); + } + macro_name = NULL; + clear_exp_mac(); + *pragma_op = FALSE; + return out_p; +} + +static int rescan_pre( + int c, /* First character of token */ + char * mp, /* Output buffer */ + char * mac_end /* End of output buffer */ +) +/* + * If the token is a macro name, replace the macro repeatedly until the first + * token becomes a non-macro and return the type of token after expansion. + */ +{ + int token_type; /* Type of token */ + char * cp = mp; /* Value of mp should not be changed */ + DEFBUF * defp; + FILEINFO * file; + + while ((token_type = scan_token( c, &cp, mac_end)) == NAM + && (defp = look_id( identifier)) != NULL) { /* Macro */ + if (replace_pre( defp) == FALSE) + break; /* Macro name with no argument */ + file = infile; + c = get_ch(); + if (file != infile) { /* Replaced to 0 token */ + unget_ch(); + token_type = NO_TOKEN; + break; + } + cp = mp; /* Overwrite on the macro call */ + } /* The macro call is replaced */ + return token_type; +} + +static int replace_pre( + DEFBUF * defp /* Definition of the macro */ +) +/* + * Replace a macro one level. Called from expand_prestd() (via rescan_pre()) + * when an identifier is found in the macro table. It calls collect_args() + * to parse actual arguments, checking for the correct number. It then + * creates a "file" containing single line containing the replacement text + * with the actual arguments inserted appropriately. This is "pushed back" + * onto the input stream. (When get_ch() routine runs off the end of the macro + * line, it will dismiss the macro itself.) + */ +{ + int arg_len; + int c; + + if (mcpp_debug & EXPAND) { + dump_a_def( "replace_pre entry", defp, FALSE, TRUE, fp_debug); + dump_unget( "replace_pre entry"); + } + if (++rescan_level >= PRESTD_RESCAN_LIMIT) { + diag_macro( CERROR + , "Recursive macro definition of \"%s\"" /* _E_ */ + , defp->name, 0L, NULL, defp, NULL); + longjmp( jump, 1); + } + + /* + * Here's a macro to replace. + */ + switch (defp->nargs) { + case DEF_NOARGS: /* No argument just stuffs */ + case DEF_NOARGS_PREDEF_OLD: /* Compiler-specific predef without '_' */ + case DEF_NOARGS_PREDEF: /* Compiler-specific predef */ + break; + default: /* defp->nargs >= 0 */ + c = squeeze_ws( NULL, NULL, NULL); /* Look for and skip '('*/ + if (c != '(') { /* Macro name without following '(' */ + unget_ch(); + if (warn_level & 8) + diag_macro( CWARN, only_name, defp->name, 0L, NULL, defp, NULL); + return FALSE; + } else { + arglist_pre[ 0] = xmalloc( (size_t) (NMACWORK + IDMAX * 2)); + arg_len = collect_args( defp, arglist_pre, 0); + /* Collect arguments */ + if (arg_len == ARG_ERROR) { /* End of input */ + free( arglist_pre[ 0]); + longjmp( jump, 1); + } + } + break; + } + + if (defp->nargs > 0) + substitute_pre( defp); /* Do actual arguments */ + else + unget_string( defp->repl, defp->name); + + if (mcpp_debug & EXPAND) + dump_unget( "replace_pre exit"); + if (defp->nargs >= 0) + free( arglist_pre[ 0]); + return TRUE; +} + +static void substitute_pre( + DEFBUF * defp /* Current macro being replaced */ +) +/* + * Stuff the macro body, substituting formal parameters with actual arguments. + */ +{ + int c; /* Current character */ + FILEINFO * file; /* Funny #include */ + char * out_end; /* -> output buffer end */ + char * in_p; /* -> replacement text */ + char * out_p; /* -> macro output buff */ + + file = get_file( defp->name, NULL, NULL, (size_t) (NMACWORK + 1), FALSE); + /* file == infile */ + in_p = defp->repl; /* -> macro replacement */ + out_p = file->buffer; /* -> output buffer */ + out_end = file->buffer + NMACWORK; /* -> buffer end */ + + while ((c = *in_p++) != EOS) { + if (c == MAC_PARM) { + c = (*in_p++ & UCHARMAX) - 1; /* Parm number */ + /* + * Substitute formal parameter with actual argument. + */ + if (out_end <= (out_p + strlen( arglist_pre[ c]))) + goto nospace; + out_p = stpcpy( out_p, arglist_pre[ c]); + } else { + *out_p++ = c; + } + if (out_end <= out_p) + goto nospace; + } + + *out_p = EOS; + file->buffer = xrealloc( file->buffer, strlen( file->buffer) + 1); + file->bptr = file->buffer; /* Truncate buffer */ + if (mcpp_debug & EXPAND) + dump_string( "substitute_pre macroline", file->buffer); + return; + +nospace: + *out_p = EOS; + diag_macro( CERROR, macbuf_overflow, defp->name, 0L, file->buffer, defp + , NULL); + longjmp( jump, 1); +} + + +/* + * C O M M O N R O U T I N E S + * f o r S T A N D A R D a n d p r e - S T A N D A R D M o d e s + */ + +static int collect_args( + const DEFBUF * defp, /* Definition of the macro */ + char ** arglist, /* Pointers to actual arguments */ + int m_num /* Index into mac_inf[] */ +) +/* + * Collect the actual arguments for the macro, checking for correct number + * of arguments. + * Variable arguments (on Standard modes) are read as a merged argument. + * Return number of real arguments, or ARG_ERROR on error of unterminated + * macro. + * collect_args() may read over to the next line unless 'in_directive' is + * set to TRUE. + * collect_args() may read over into file->parent to complete a macro call + * unless stopped by RT_END (provided the "file" is macro). This is a key + * trick of STD mode macro expansion. Meanwhile, POST_STD mode limits the + * arguments in the "file" (macro or not). + * Note: arglist[ n] may be reallocated by collect_args(). + */ +{ + const char * name = defp->name; + char * argp = arglist[ 0]; /* Pointer to an argument */ + char * arg_end; /* End of arguments buffer */ + char * valid_argp = NULL; /* End of valid arguments */ + char * sequence; /* Token sequence for diagnostics */ + char * seq; /* Current pointer into 'sequence' */ + char * seq_end; /* Limit of buffer */ + int args; /* Number of arguments expected */ + int nargs = 0; /* Number of collected args */ + int var_arg = defp->nargs & VA_ARGS; /* Variable args */ + int more_to_come = FALSE; /* Next argument is expected*/ + LOCATION * locs; /* Location of args in source file */ + LOCATION * loc; /* Current locs */ + MAGIC_SEQ mgc_prefix; /* MAC_INF seqs and spaces preceding an arg */ + int c; + + if (mcpp_debug & EXPAND) + dump_unget( "collect_args entry"); + args = (defp->nargs == DEF_PRAGMA) ? 1 : (defp->nargs & ~AVA_ARGS); + if (args == 0) /* Need no argument */ + valid_argp = argp; + *argp = EOS; /* Make sure termination */ + arg_end = argp + NMACWORK/2; + seq = sequence = arg_end + IDMAX; /* Use latter half of argp */ + seq_end = seq + NMACWORK/2; + seq = stpcpy( seq, name); + *seq++ = '('; + if (mcpp_mode == STD) { + /* + * in_getarg is set TRUE while getting macro arguments, for the sake + * of diagnostic's convenience. in_getarg is used only in STD mode. + */ + in_getarg = TRUE; + if (trace_macro && m_num) { + /* #pragma MCPP debug macro_call, and the macro is on source */ + mac_inf[ m_num].loc_args = loc = locs + = (LOCATION *) xmalloc( (sizeof (LOCATION)) * UCHARMAX); + memset( loc, 0, (sizeof (LOCATION)) * UCHARMAX); + /* 0-clear for default values, including empty argument */ + } + } + + while (1) { + memset( &mgc_prefix, 0, sizeof (MAGIC_SEQ)); + c = squeeze_ws( &seq, NULL + , (trace_macro && m_num) ? &mgc_prefix : NULL); + /* Skip MAC_INF seqs and white spaces, still remember */ + /* the sequence in buffer, if necessary. */ + if (c == ')' || c == ',') + scan_token( c, &seq, seq_end); /* Ensure token parsing */ + else + *seq = EOS; + + switch (c) { /* First character of token */ + case ')': + if (! more_to_come) { /* Zero argument */ + if (trace_macro && m_num) + loc++; + break; + } /* Else fall through */ + case ',': /* Empty argument */ + if (trace_macro && m_num) + loc++; /* Advance pointer to infs */ + if (warn_level & 2) + diag_macro( CWARN, empty_arg, sequence, 0L, NULL, defp, NULL); + if (standard && var_arg && nargs == args - 1) { + /* Variable arguments begin with an empty argument */ + c = get_an_arg( c, &argp, arg_end, &seq, 1, nargs, &loc + , m_num, (trace_macro && m_num) ? &mgc_prefix : NULL); + } else { + if (mcpp_mode == STD) + *argp++ = RT_END; + *argp++ = EOS; + } + if (++nargs == args) + valid_argp = argp; + if (c == ',') { + more_to_come = TRUE; + continue; + } else { /* ')' */ + break; + } + case '\n': /* Unterminated macro call in directive line*/ + unget_ch(); /* Fall through */ + case RT_END: /* Error of missing ')' */ + diag_macro( CERROR, unterm_macro, sequence, 0L, NULL, defp, NULL); + /* Fall through */ + case CHAR_EOF: /* End of file in macro call*/ + nargs = ARG_ERROR; + goto arg_ret; /* Diagnosed by at_eof() */ + default: /* Nomal argument */ + break; + } + + if (c == ')') /* At end of all args */ + break; + + c = get_an_arg( c, &argp, arg_end, &seq + , (var_arg && nargs == args - 1) ? 1 : 0, nargs, &loc + , m_num, (trace_macro && m_num) ? &mgc_prefix : NULL); + + if (++nargs == args) + valid_argp = argp; /* End of valid arguments */ + if (c == ')') + break; + if (c == 0) { /* End of file */ + nargs = ARG_ERROR; + goto arg_ret; /* Diagnosed by at_eof() */ + } + if (c == -1) { /* Untermanated macro call */ + diag_macro( CERROR, unterm_macro, sequence, 0L, NULL, defp, NULL); + nargs = ARG_ERROR; + goto arg_ret; + } + more_to_come = (c == ','); + } /* Collected all arguments */ + + if (nargs == 0 && args == 1) { /* Only and empty argument */ + if (warn_level & 2) + diag_macro( CWARN, empty_arg, sequence, 0L, NULL, defp, NULL); + } else if (nargs != args) { /* Wrong number of arguments*/ + if (mcpp_mode != OLD_PREP || (warn_level & 1)) { + if ((standard && var_arg && (nargs == args - 1)) + /* Absence of variable arguments */ + || (mcpp_mode == OLD_PREP)) { + if (warn_level & 1) + diag_macro( CWARN, narg_error, nargs < args ? "Less" + : "More", (long) args, sequence, defp, NULL); + } else { + diag_macro( CERROR, narg_error, nargs < args ? "Less" : "More" + , (long) args, sequence, defp, NULL); + } + } + } + if (args < nargs) { + argp = valid_argp; /* Truncate excess arguments*/ + } else { + for (c = nargs; c < args; c++) { + if (mcpp_mode == STD) + *argp++ = RT_END; /* For rescan() */ + *argp++ = EOS; /* Missing arguments */ + } + if (c == 0) + argp++; /* Ensure positive length */ + } + arglist[ 0] = argp + = xrealloc( arglist[ 0], (size_t) (argp - arglist[ 0])); + /* Use memory sparingly */ + for (c = 1; c < args; c++) + arglist[ c] = argp += strlen( argp) + 1; + if (trace_macro && m_num) + mac_inf[ m_num].loc_args /* Truncate excess memory */ + = (LOCATION *) xrealloc( (char *) locs + , (loc - locs) * sizeof (LOCATION)); + + if (mcpp_debug & EXPAND) { + if (nargs > 0) { + if (nargs > args) + nargs = args; + dump_args( "collect_args exit", nargs, (const char **) arglist); + } + dump_unget( "collect_args exit"); + } +arg_ret: + if (mcpp_mode == STD) + in_getarg = FALSE; + /* Return number of found arguments for function-like macro at most */ + /* defp->nargs, or return defp->nargs for object-like macro. */ + return defp->nargs <= DEF_NOARGS ? defp->nargs : nargs; +} + +static int get_an_arg( + int c, + char ** argpp, /* Address of pointer into argument list */ + char * arg_end, /* End of argument list buffer */ + char ** seqp, /* Buffer for diagnostics */ + int var_arg, /* 1 on __VA_ARGS__, 0 on others*/ + int nargs, /* Argument number */ + LOCATION ** locp, /* Where to save location infs */ + int m_num, /* Macro number to trace */ + MAGIC_SEQ * mgc_prefix /* White space and magics leading to argument */ +) +/* + * Get an argument of macro into '*argpp', return the next punctuator. + * Variable arguments are read as a merged argument. + * Note: nargs, locp and m_num are used only in macro trace mode of + * '#pragma MCPP debug macro_call' or -K option. + */ +{ + struct { + int n_par; + int n_in_src; + } n_paren[ 16]; + int num_paren = 0; + int end_an_arg = FALSE; /* End-of-an-arg flag */ + int paren = var_arg; /* For embedded ()'s */ + int token_type; + char * prevp; + char * argp = *argpp; + int trace_arg = 0; /* Enable tracing arg */ + LINE_COL s_line_col, e_line_col; /* Location of macro in an argument */ + MAGIC_SEQ mgc_seq; /* Magic seqs and spaces succeeding an arg */ + size_t len; + + if (trace_macro) { + trace_arg = m_num && infile->fp; + if (m_num) { + if (trace_arg) { /* The macro call is in source */ + s_line_col.line = src_line; + s_line_col.col = infile->bptr - infile->buffer - 1; + /* '-1': bptr is one byte passed beginning of the token */ + get_src_location( & s_line_col); + (*locp)->start_line = s_line_col.line; + (*locp)->start_col = s_line_col.col; + e_line_col = s_line_col; + /* Save the location, */ + /* also for end of arg in case of empty arg*/ + memset( n_paren, 0, sizeof (n_paren)); + } + *argp++ = MAC_INF; + *argp++ = MAC_ARG_START; + *argp++ = (m_num / UCHARMAX) + 1; + *argp++ = (m_num % UCHARMAX) + 1; + *argp++ = nargs + 1; + /* Argument number internally starts at 1 */ + if (mgc_prefix->magic_start) { + /* Copy the preceding magics, if any */ + len = mgc_prefix->magic_end - mgc_prefix->magic_start; + memcpy( argp, mgc_prefix->magic_start, len); + argp += len; + } + } + memset( &mgc_seq, 0, sizeof (MAGIC_SEQ)); + } + + while (1) { + if (c == '\n' /* In control line */ + || c == RT_END) { /* Boundary of rescan (in STD mode) */ + if (c == '\n') + unget_ch(); + break; + } + if (trace_arg) { /* Save the location */ + s_line_col.line = src_line; /* of the token */ + s_line_col.col = infile->bptr - infile->buffer - 1; + } + token_type = scan_token( c, (prevp = argp, &argp), arg_end); + /* Scan the next token */ + switch (c) { + case '(': /* Worry about balance */ + paren++; /* To know about commas */ + break; + case ')': /* Other side too */ + if (paren-- == var_arg) /* At the end? */ + end_an_arg = TRUE; /* Else more to come */ + if (trace_arg) { + if (num_paren && paren == n_paren[ num_paren].n_par) { + /* Maybe corresponding parentheses for the macro in arg */ + int src_n; + src_n = n_paren[ num_paren].n_in_src; + in_src[ src_n].end_line = s_line_col.line; + in_src[ src_n].end_col = s_line_col.col + 1; + num_paren--; + } + } + break; + case ',': + if (paren == 0) /* Comma delimits arg */ + end_an_arg = TRUE; + break; + case MAC_INF : /* Copy magics as they are */ + switch (*argp++ = get_ch()) { + case MAC_ARG_START : + *argp++ = get_ch(); + /* Fall through */ + case MAC_CALL_START : + *argp++ = get_ch(); + *argp++ = get_ch(); + break; + case MAC_ARG_END : + if (! option_flags.v) + break; + else + *argp++ = get_ch(); + /* Fall through */ + case MAC_CALL_END : + if (option_flags.v) { + *argp++ = get_ch(); + *argp++ = get_ch(); + } + break; + } + break; + case CHAR_EOF : /* Unexpected EOF */ + return 0; + default : /* Any token */ + if (mcpp_mode == STD && token_type == NAM + && c != IN_SRC && c != DEF_MAGIC && infile->fp) { + len = trace_arg ? IN_SRC_LEN : 1; + memmove( prevp + len, prevp, (size_t) (argp - prevp)); + argp += len; + *prevp = IN_SRC; + /* Mark that the name is read from source file */ + if (trace_arg) { + DEFBUF * defp; + + defp = look_id( prevp + IN_SRC_LEN); + if (in_src_num >= MAX_IN_SRC_NUM - 1) { + cerror( + "Too many names in arguments tracing %s" /* _E_ */ + , defp ? defp->name : null, 0L, NULL); + return 0; + } else if (++in_src_num > max_in_src_num) { + size_t old_len; + old_len = sizeof (LOCATION) * max_in_src_num; + /* Enlarge the array */ + in_src = (LOCATION *) xrealloc( (char *) in_src + , old_len * 2); + /* Have to initialize the enlarged area */ + memset( in_src + max_in_src_num, 0, old_len); + max_in_src_num *= 2; + } + /* Insert the identifier number in 2-bytes-encoding */ + *(prevp + 1) = (in_src_num / UCHARMAX) + 1; + *(prevp + 2) = (in_src_num % UCHARMAX) + 1; + if (defp) { /* Macro name in arg */ + in_src[ in_src_num].start_line = s_line_col.line; + in_src[ in_src_num].start_col = s_line_col.col; + /* For object-like macro, also for function-like */ + /* macro in case of parens are not found. */ + in_src[ in_src_num].end_line = s_line_col.line; + in_src[ in_src_num].end_col + = infile->bptr - infile->buffer; + if (defp->nargs >= 0) { + /* Function-like macro: search parentheses */ + n_paren[ ++num_paren].n_par = paren; + n_paren[ num_paren].n_in_src = in_src_num; + } + } /* Else in_src[ in_src_num].* are 0L */ + } + } + break; + } /* End of switch */ + + if (end_an_arg) /* End of an argument */ + break; + if (trace_arg) { /* Save the location */ + e_line_col.line = src_line; /* before spaces */ + e_line_col.col = infile->bptr - infile->buffer; + } + memset( &mgc_seq, 0, sizeof (MAGIC_SEQ)); + c = squeeze_ws( &argp, NULL, &mgc_seq); + /* To the next token */ + } /* Collected an argument*/ + + *argp = EOS; + *seqp = stpcpy( *seqp, *argpp); /* Save the sequence */ + if (c == '\n' || c == RT_END) + return -1; /* Unterminated macro */ + argp--; /* Remove the punctuator*/ + if (mgc_seq.space) + --argp; /* Remove trailing space */ + if (mcpp_mode == STD) { + if (trace_macro && m_num) { + if (trace_arg) { /* Location of end of an arg */ + get_src_location( & e_line_col); + (*locp)->end_line = e_line_col.line; + (*locp)->end_col = e_line_col.col; + } + (*locp)++; /* Advance pointer even if !trace_arg */ + *argp++ = MAC_INF; + *argp++ = MAC_ARG_END; + if (option_flags.v) { + *argp++ = (m_num / UCHARMAX) + 1; + *argp++ = (m_num % UCHARMAX) + 1; + *argp++ = nargs + 1; + *argp = EOS; + *argpp = chk_magic_balance( *argpp, argp, TRUE, FALSE); + /* Check a stray magic caused by abnormal macro */ + /* and move it to an edge if found. */ + } + } + *argp++ = RT_END; /* For rescan() */ + } + *argp++ = EOS; /* Terminate an argument*/ + *argpp = argp; + return c; +} + +static int squeeze_ws( + char ** out, /* Pointer to output pointer */ + char ** endf, /* Pointer to end of infile data*/ + MAGIC_SEQ * mgc_seq /* Sequence of MAC_INFs and space */ + /* mgc_seq should be initialized in the calling routine */ +) +/* + * Squeeze white spaces to one space. + * White spaces are ' ' (and possibly '\t', when keep_spaces == TRUE. Note + * that '\r', '\v', '\f' have been already converted to ' ' by get_ch()), + * and '\n' unless in_directive is set. + * COM_SEP is skipped. TOK_SEPs are squeezed to one TOK_SEP. + * Copy MAC_INF and its sequences as they are. + * If white spaces are found and 'out' is not NULL, write a space to *out and + * increment *out. + * Record start and end of MAC_INF sequences and whether space is found or + * not for a convenience of get_an_arg(). + * Return the next character. + */ +{ + int c; + int space = 0; + int tsep = 0; + FILEINFO * file = infile; + FILE * fp = infile->fp; + int end_of_file = (out && endf) ? FALSE : TRUE; + + while (((char_type[ c = get_ch()] & SPA) && (! standard + || (mcpp_mode == POST_STD && file == infile) + || (mcpp_mode == STD + && ((macro_line != 0 && macro_line != MACRO_ERROR) + || file == infile)))) + || c == MAC_INF) { + if (! end_of_file && file != infile) { /* Infile has been read over*/ + *endf = *out; /* Remember the location */ + end_of_file = TRUE; + } + if (c == '\n' && in_directive) /* If scanning control line */ + break; /* do not skip newline. */ + switch (c) { + case '\n': + space++; + wrong_line = TRUE; + break; + case TOK_SEP: + if (mcpp_mode == STD) + tsep++; + continue; /* Skip COM_SEP in OLD_PREP mode */ + case MAC_INF : /* Copy magics as they are, or skip */ + if (mgc_seq && ! mgc_seq->magic_start) + mgc_seq->magic_start = *out; + /* First occurence of magic seq */ + if (out) + *(*out)++ = c; + c = get_ch(); + if (out) + *(*out)++ = c; + switch (c) { + case MAC_ARG_START : + c = get_ch(); + if (out) + *(*out)++ = c; + /* Fall through */ + case MAC_CALL_START : + c = get_ch(); + if (out) + *(*out)++ = c; + c = get_ch(); + if (out) + *(*out)++ = c; + break; + case MAC_ARG_END : + if (! option_flags.v) { + break; + } else { + c = get_ch(); + if (out) + *(*out)++ = c; + /* Fall through */ + } + case MAC_CALL_END : + if (option_flags.v) { + c = get_ch(); + if (out) + *(*out)++ = c; + c = get_ch(); + if (out) + *(*out)++ = c; + } + break; + } + if (mgc_seq) /* Remember end of last magic seq */ + mgc_seq->magic_end = *out; + break; + default: + space++; + break; + } + } + + if (out) { + if (space) { /* Write a space to output pointer */ + *(*out)++ = ' '; /* and increment the pointer. */ + if (mgc_seq) + mgc_seq->space = TRUE; + } + if (tsep && !space) /* Needs to preserve token separator*/ + *(*out)++ = TOK_SEP; + **out = EOS; + } + if (mcpp_mode == POST_STD && file != infile) { + unget_ch(); /* Arguments cannot cross "file"s */ + c = fp ? CHAR_EOF : RT_END; /* EOF is diagnosed by at_eof() */ + } else if (mcpp_mode == STD && macro_line == MACRO_ERROR + && file != infile) { /* EOF */ + unget_ch(); /* diagnosed by at_eof() or only */ + c = CHAR_EOF; /* name of a function-like macro. */ + } /* at_eof() resets macro_line on error */ + return c; /* Return the next character */ +} + +static void skip_macro( void) +/* + * Clear the stacked (i.e. half-expanded) macro, called on macro error. + */ +{ + if (infile == NULL) /* End of input */ + return; + if (infile->fp) /* Source file */ + return; + while (infile->fp == NULL) { /* Stacked stuff */ + infile->bptr += strlen( infile->bptr); + get_ch(); /* To the parent "file" */ + } + unget_ch(); +} + +static void diag_macro( + int severity, /* Error or warning */ + const char * format, + const char * arg1, + long arg2, + const char * arg3, + const DEFBUF * defp1, /* Macro causing the problem 1 */ + const DEFBUF * defp2 /* 2 */ +) +/* + * Supplement macro information for diagnostic. + */ +{ + + if (defp1 && defp1->name != macro_name) + expanding( defp1->name, FALSE); + /* Inform of the problematic macro call */ + if (defp2 && defp2->name != macro_name) + expanding( defp2->name, FALSE); + if (severity == CERROR) + cerror( format, arg1, arg2, arg3); + else + cwarn( format, arg1, arg2, arg3); +} + +static void dump_args( + const char * why, + int nargs, + const char ** arglist +) +/* + * Dump arguments list. + */ +{ + int i; + + mcpp_fprintf( DBG, "dump of %d actual arguments %s\n", nargs, why); + for (i = 0; i < nargs; i++) { + mcpp_fprintf( DBG, "arg[%d]", i + 1); + dump_string( NULL, arglist[ i]); + } +} + diff --git a/libraries/mcpp/src/internal.H b/libraries/mcpp/src/internal.H new file mode 100644 index 000000000..5e1c19fb3 --- /dev/null +++ b/libraries/mcpp/src/internal.H @@ -0,0 +1,562 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * I N T E R N A L . H + * I n t e r n a l D e f i n i t i o n s f o r M C P P + * + * In general, definitions in this file should not be changed by implementor. + */ + +#ifndef SYSTEM_H + #error "system.H" must be included prior to "internal.H" +#endif + +#include "mcpp_out.h" + +#if MCPP_LIB +#include "mcpp_lib.h" /* External interface when used as library */ +#endif + +#define EOS '\0' /* End of string */ +#define CHAR_EOF 0 /* Returned by get_ch() on eof */ + +#define VA_ARGS (UCHARMAX + 1) /* Signal of variable arguments */ +#define GVA_ARGS (VA_ARGS * 2) /* GCC-specific variable args */ +#define AVA_ARGS (VA_ARGS | GVA_ARGS)/* Any variable arguments */ +#define DEF_PRAGMA (-1 - AVA_ARGS) /* _Pragma() pseudo-macro */ +#define DEF_NOARGS (-2 - AVA_ARGS) /* #define foo vs #define foo() */ +#define DEF_NOARGS_PREDEF_OLD (DEF_NOARGS - 1) + /* Compiler-predefined macro without leading '_' */ +#define DEF_NOARGS_PREDEF (DEF_NOARGS - 2)/* Compiler-predefined macro */ +#define DEF_NOARGS_STANDARD (DEF_NOARGS - 3)/* Standard predefined macro */ +#define DEF_NOARGS_DYNAMIC (DEF_NOARGS - 4)/* Standard dynamically defined */ + +/* + * These magic characters must be control characters which can't be used + * in source file. + */ +/* for '#pragma MCPP debug macro_call' and -K option in STD mode. */ +#define MAC_INF 0x18 /* Magic for macro informations */ +/* In STD and POST_STD modes (IN_SRC and TOK_SEP are for STD mode only). */ +#define DEF_MAGIC 0x19 /* Magic to prevent recursive expansion */ +#define IN_SRC 0x1A /* Magic of name from source */ +#define RT_END 0x1C /* Magic of macro rescan boundary */ +#define ST_QUOTE 0x1D /* Magic for stringizing */ +#define CAT 0x1E /* Token concatenation delim. */ +#define TOK_SEP 0x1F /* Magic to wrap expanded macro */ +/* In OLD_PREP mode. */ +#define COM_SEP 0x1F /* Comment of 0-length */ + +#define MAC_PARM 0x7F /* Macro parameter signal */ + +/* Special character types */ +#define LET 1 /* Letter (alphabet and _) */ +#define DIG 2 /* Digit */ +#define DOT 4 /* . might start a number */ +#define PUNC 8 /* Punctuators and operators */ +#define QUO 0x10 /* Both flavors of quotation ",'*/ +#define SPA 0x20 /* White spaces */ +#define HSP 0x40 + /* Horizontal white spaces (' ', '\t', TOK_SEP) */ + +/* + * Codes for operators used in #if expression. + * The value of the scanned operator is stored in 'openum'. + */ +#define INV 0 /* Invalid, must be zero */ +#define OP_EOE INV /* End of expression */ +#define VAL 1 /* Value (operand) */ +#define OP_LPA 2 /* ( */ +/* The following are unary. */ +#define FIRST_UNOP OP_PLU /* First unary operator */ +#define OP_PLU 3 /* + */ +#define OP_NEG 4 /* - */ +#define OP_COM 5 /* ~ */ +#define OP_NOT 6 /* ! */ +#define LAST_UNOP OP_NOT /* Last unary operator */ +/* The following are binary. */ +#define FIRST_BINOP OP_MUL /* First binary operator */ +#define OP_MUL 7 /* * */ +#define OP_DIV 8 /* / */ +#define OP_MOD 9 /* % */ +#define OP_ADD 10 /* + */ +#define OP_SUB 11 /* - */ +#define OP_SL 12 /* << */ +#define OP_SR 13 /* >> */ +#define OP_LT 14 /* < */ +#define OP_LE 15 /* <= */ +#define OP_GT 16 /* > */ +#define OP_GE 17 /* >= */ +#define OP_EQ 18 /* == */ +#define OP_NE 19 /* != */ +#define OP_AND 20 /* & */ +#define OP_XOR 21 /* ^ */ +#define OP_OR 22 /* | */ +#define OP_ANA 23 /* && */ +#define OP_ORO 24 /* || */ +#define OP_QUE 25 /* ? */ +#define OP_COL 26 /* : */ +#define LAST_BINOP OP_COL /* Last binary operator */ +/* Parenthesis */ +#define OP_RPA 27 /* ) */ +#define OP_END 28 /* End of expression marker */ +#define OP_FAIL (OP_END + 1) /* For error returns */ + +/* + * The following are operators used in macro definition only. + */ +/* In STD and POST_STD modes. */ +#define OP_STR 30 /* # */ +#define OP_CAT 31 /* ## */ +#define OP_ELL 32 /* ... */ + +/* + * The following are C source operators or punctuators, + * not preprocessing operators. + * Note: "sizeof", "defined" are read as identifier for convenience. + */ +#define OP_1 33 /* Any other single byte ops or puncs */ + /* =, ., ;, [, ], {, }, ',' */ +#define OP_2 34 /* Any other two bytes operators */ + /* &=, |=, ++, +=, --, -=, ->, %=, *=, /=, ^=, */ +#define OP_3 35 /* Three bytes operators : <<=, >>= */ +/* + * The following are operators spelled in digraphs. + */ +/* In STD and POST_STD modes. */ +#define OP_LBRACE_D 0x40 /* <% i.e. { */ +#define OP_RBRACE_D 0x41 /* %> i.e. } */ +#define OP_LBRCK_D 0x42 /* <: i.e. [ */ +#define OP_RBRCK_D 0x43 /* :> i.e. ] */ +#define OP_SHARP_D 0x44 /* %: i.e. # */ +#define OP_DSHARP_D 0x45 /* %:%: i.e. ## */ +#define OP_DIGRAPH 0x40 /* (OP_*_D & OP_DIGRAPH) == 0x40 */ + +/* + * The following are for lexical scanning only. + */ +/* Token types */ +#define NO_TOKEN 0 +#define NAM 65 /* Identifier (name, keyword) */ +#define NUM 66 /* Preprocessing number */ +#define STR 67 /* Character string literal */ +#define CHR 69 /* Integer character constant */ + +/* In STD and POST_STD modes. */ +#define WSTR 68 /* Wide string literal */ +#define WCHR 70 /* Wide character constant */ + +#define OPE 71 /* Operator or punctuator */ +#define SPE 72 /* Unknown token (@ or others) */ +#define SEP 73 /* Token separator or magics */ + +/* + * The following are values of 'mcpp_debug' variable which is set by the + * arguments of '#pragma MCPP debug' directive. + */ +#define PATH 1 +#define TOKEN 2 +#define EXPAND 4 +#define MACRO_CALL 8 +#define IF 16 +#define EXPRESSION 32 +#define GETC 64 +#define MEMORY 128 + +/* MAC_* represent macro information types for -K option. */ +#define MAC_CALL_START 1 +#define MAC_CALL_END 2 +#define MAC_ARG_START 3 +#define MAC_ARG_END 4 + +/* MB_ERROR signals wrong multi-byte character sequence. */ +#define MB_ERROR 0x8000 + +#if MCPP_LIB && HOST_COMPILER == GNUC \ + && (SYS_FAMILY == SYS_UNIX && SYSTEM != SYS_CYGWIN) + /* For GCC 4.* on UNIXes */ +#pragma GCC visibility push( hidden) /* Hide these names from outside */ +#endif + +/* + * The DEFBUF structure stores information about #defined macros. + * Note that DEFBUF->parmnames is parameter names catenated with commas, + * which is saved for the check of redefinition for STD mode. + * 'parmnames' and 'repl' are allocated to the area succeding to name. + */ +typedef struct defbuf { + struct defbuf * link; /* Pointer to next def in chain */ + short nargs; /* Number of parameters */ + char * parmnames; /* -> Parameter names catenated by ',' */ + char * repl; /* Pointer to replacement text */ + const char * fname; /* Macro is defined in the source file */ + long mline; /* at the line. */ + char push; /* Push level indicator */ + char name[1]; /* Macro name */ +} DEFBUF; + +/* + * The FILEINFO structure stores information about open files and macros + * being expanded. + */ +typedef struct fileinfo { + char * bptr; /* Current pointer into buffer */ + long line; /* Current line number of file */ + FILE * fp; /* Source file if non-null */ + long pos; /* Position next to #include */ + struct fileinfo * parent; /* Link to includer */ + struct ifinfo * initif; /* Initial ifstack (return there on EOF)*/ + int sys_header; /* System header file or not */ + int include_opt; /* Specified by -include option */ + const char ** dirp; /* Include directory the file resides */ + const char * src_dir; /* Directory of source file */ + const char * real_fname; /* Real file name */ + const char * full_fname; /* Real full path list */ + char * filename; /* File/macro name (maybe changed) */ + char * buffer; /* Buffer of current input line */ +#if MCPP_LIB + /* Save output functions during push/pop of #includes */ + int (* last_fputc) ( int c, OUTDEST od); + int (* last_fputs) ( const char * s, OUTDEST od); + int (* last_fprintf)( OUTDEST od, const char * format, ...); +#endif +} FILEINFO; + +/* + * IFINFO stores information of conditional compilation. + */ +typedef struct ifinfo { + int stat; /* State of compilation */ + long ifline; /* Line #if started */ + long elseline; /* Line #else started */ +} IFINFO; + +/* + * These bits are set in IFINFO.stat + */ +#define WAS_COMPILING 1 /* TRUE if compile set at entry */ +#define ELSE_SEEN 2 /* TRUE when #else processed */ +#define TRUE_SEEN 4 /* TRUE when #if TRUE processed */ + +#define compiling ifstack[0].stat + +#define FP2DEST(fp) \ + (fp == fp_out) ? OUT : \ + ((fp == fp_err) ? ERR : \ + ((fp == fp_debug) ? DBG : \ + ((OUTDEST) -1))) + +/* VAL_SIGN structure stores information about evaluated number. */ +typedef struct val_sign { + expr_t val; /* Value */ + int sign; /* Signed, unsigned, error */ +} VAL_SIGN; + +/* Values of VAL_SIGN.sign. */ +#define SIGNED 1 +#define UNSIGNED 0 +#define VAL_ERROR (-1) + +/* LINE_COL stores information of line and column data */ +typedef struct line_col { + long line; + size_t col; +} LINE_COL; + +/* Value of macro_line on macro call error. */ +#define MACRO_ERROR (-1L) + +/* + * Values of insert_sep (flag of insertion of token separator). + * Used only in POST_STD mode. + */ +#define NO_SEP 0 /* No separator is inserted */ +#define INSERT_SEP 1 /* Next get_ch() insert a separator */ +#define INSERTED_SEP 2 /* Last get_ch() Inserted a separator */ + +#define str_eq(s1, s2) (strcmp(s1, s2) == 0) + +#ifndef IO_SUCCESS +#define IO_SUCCESS 0 +#endif +#ifndef IO_ERROR +#define IO_ERROR (errno ? errno : 1) +#endif + +/* + * Externs + */ + +/* The minimum translation limits specified by the Standards. */ +extern struct std_limits_ { + long str_len; /* Least maximum of string len. */ + size_t id_len; /* Least maximum of ident len. */ + int n_mac_pars; /* Least maximum of num of pars.*/ + int exp_nest; /* Least maximum of expr nest */ + int blk_nest; /* Least maximum of block nest */ + int inc_nest; /* Least maximum of include nest*/ + long n_macro; /* Least maximum of num of macro*/ + long line_num; /* Maximum source line number */ +} std_limits; +/* The boolean flags specified by the execution options. */ +extern struct option_flags_ { + int c; /* -C option (keep comments) */ + int k; /* -k option (keep white spaces)*/ + int z; /* -z option (no-output of included file) */ + int p; /* -P option (no #line output) */ + int q; /* -Q option (diag to mcpp.err) */ + int v; /* -v option (verbose) */ + int trig; /* -3 option (toggle trigraphs) */ + int dig; /* -2 option (toggle digraphs) */ + int lang_asm; /* -a option (assembler source) */ + int no_source_line; /* Do not output line in diag. */ + int dollar_in_name; /* Allow $ in identifiers */ +} option_flags; + +extern int mcpp_mode; /* Mode of preprocessing */ +extern int stdc_val; /* Value of __STDC__ */ +extern long stdc_ver; /* Value of __STDC_VERSION__ */ +extern long cplus_val; /* Value of __cplusplus for C++ */ +extern int stdc2; /* cplus_val or (stdc_ver >= 199901L) */ +extern int stdc3; /* (stdc_ver or cplus_val) >= 199901L */ +extern int standard; /* mcpp_mode is STD or POST_STD */ +extern int std_line_prefix; /* #line in C source style */ +extern int warn_level; /* Level of warning */ +extern int errors; /* Error counter */ +extern long src_line; /* Current source line number */ +extern int wrong_line; /* Force #line to compiler */ +extern int newlines; /* Count of blank lines */ +extern int keep_comments; /* Don't remove comments */ +extern int keep_spaces; /* Don't remove white spaces */ +extern int include_nest; /* Nesting level of #include */ +extern const char * null; /* "" string for convenience */ +extern const char ** inc_dirp; /* Directory of #includer */ +extern const char * cur_fname; /* Current source file name */ +extern int no_output; /* Don't output included file */ +extern int in_directive; /* In process of #directive */ +extern int in_define; /* In #define line */ +extern int in_getarg; /* Collecting arguments of macro*/ +extern int in_include; /* In #include line */ +extern int in_if; /* In #if and non-skipped expr. */ +extern long macro_line; /* Line number of macro call */ +extern char * macro_name; /* Currently expanding macro */ +extern int openum; /* Number of operator or punct. */ +extern IFINFO * ifptr; /* -> current ifstack item */ +extern FILEINFO * infile; /* Current input file or macro */ +extern FILE * fp_in; /* Input stream to preprocess */ +extern FILE * fp_out; /* Output stream preprocessed */ +extern FILE * fp_err; /* Diagnostics stream */ +extern FILE * fp_debug; /* Debugging information stream */ +extern int insert_sep; /* Inserted token separator flag*/ +extern int mkdep; /* Output source file dependency*/ +extern int mbchar; /* Encoding of multi-byte char */ +extern int mbchk; /* Possible multi-byte char */ +extern int bsl_in_mbchar; /* 2nd byte of mbchar has '\\' */ +extern int bsl_need_escape;/* '\\' in mbchar should be escaped */ +extern int mcpp_debug; /* Class of debug information */ +extern long in_asm; /* In #asm - #endasm block */ +extern jmp_buf error_exit; /* Exit on fatal error */ +extern char * cur_fullname; /* Full name of current source */ +extern short * char_type; /* Character classifier */ +extern char * workp; /* Free space in work[] */ +extern char * const work_end; /* End of work[] buffer */ +extern char identifier[]; /* Lastly scanned name */ +extern IFINFO ifstack[]; /* Information of #if nesting */ +extern char work_buf[]; + /* Temporary buffer for directive line and macro expansion */ + +/* main.c */ +extern void un_predefine( int clearall); + /* Undefine predefined macros */ + +/* directive.c */ +extern void directive( void); + /* Process #directive line */ +extern DEFBUF * do_define( int ignore_redef, int predefine); + /* Do #define directive */ +extern DEFBUF * look_id( const char * name); + /* Look for a #define'd thing */ +extern DEFBUF ** look_prev( const char * name, int * cmp); + /* Look for place to insert def.*/ +extern DEFBUF * look_and_install( const char * name, int numargs + , const char * parmnames, const char * repl); + /* Look and insert macro def. */ +extern DEFBUF * install_macro( const char * name, int numargs + , const char * parmnames, const char * repl, DEFBUF ** prevp, int cmp + , int predefine); + /* Install a def to symbol table*/ +extern int undefine( const char * name); + /* Delete from symbol table */ +extern void dump_a_def( const char * why, const DEFBUF * dp, int newdef + , int comment, FILE * fp); + /* Dump a specific macro def */ +extern void dump_def( int comment, int K_opt); + /* Dump current macro defs */ + +/* eval.c */ +extern expr_t eval_if( void); + /* Evaluate #if expression */ +extern VAL_SIGN * eval_num( const char * nump); + /* Evaluate preprocessing number*/ + +/* expand.c */ +extern char * (* expand_macro)( DEFBUF * defp, char * out, char * out_end + , LINE_COL line_col, int * pragma_op); + /* Expand a macro completely */ +extern void expand_init( int compat, int strict_ansi); + /* Initialize expand_macro() */ +extern DEFBUF * is_macro( char ** cp); + /* The sequence is a macro call?*/ + +/* mbchar.c */ +extern size_t (* mb_read)( int c1, char ** in_pp, char ** out_pp); + /* Read mbchar sequence */ +extern const char * set_encoding( char * name, char * env, int pragma); + /* Multi-byte char encoding */ +extern void mb_init( void); + /* Initialize mbchar variables */ +extern uexpr_t mb_eval( char ** seq_pp); + /* Evaluate mbchar in #if */ +extern int last_is_mbchar( const char * in, int len); + /* The line ends with MBCHAR ? */ + +/* support.c */ +extern int get_unexpandable( int c, int diag); + /* Get next unexpandable token */ +extern void skip_nl( void); + /* Skip to the end of the line */ +extern int skip_ws( void); + /* Skip over white-spaces */ +extern int scan_token( int c, char ** out_pp, char * out_end); + /* Get the next token */ +extern char * scan_quote( int delim, char * out, char * out_end, int diag); + /* Scan a quoted literal */ +extern int id_operator( const char * name); + /* Check identifier-like ops */ +extern void expanding( const char * name, int to_be_freed); + /* Save macro name expanding */ +extern void clear_exp_mac( void); + /* Clear expanding macro infs */ +extern int get_ch( void); + /* Get the next char from input */ +extern int cnv_trigraph( char * in); + /* Do trigraph replacement */ +extern int cnv_digraph( char * in); + /* Convert digraphs to usual tok*/ +extern void unget_ch( void); + /* Push back the char to input */ +extern FILEINFO * unget_string( const char * text, const char * name); + /* Push back the string to input*/ +extern char * save_string( const char * text); + /* Stuff string in malloc mem. */ +extern FILEINFO * get_file( const char * name, const char * src_dir + , const char * fullname, size_t bufsize, int include_opt); + /* New FILEINFO initialization */ +extern char * (xmalloc)( size_t size); + /* Get memory or die */ +extern char * (xrealloc)( char * ptr, size_t size); + /* Reallocate memory or die */ +extern LINE_COL * get_src_location( LINE_COL * p_line_col); + /* Get location on source file */ +extern void cfatal( const char * format, const char * arg1, long arg2 + , const char * arg3); + /* Print a fatal error and exit */ +extern void cerror( const char * format, const char * arg1, long arg2 + , const char * arg3); + /* Print an error message */ +extern void cwarn( const char * format, const char * arg1, long arg2 + , const char * arg3); + /* Print a warning message */ +extern void dump_string( const char * why, const char * text); + /* Dump text readably */ +extern void dump_unget( const char * why); + /* Dump all ungotten junk */ +/* Support for alternate output mechanisms (e.g. memory buffers) */ +extern int (* mcpp_fputc)( int c, OUTDEST od), + (* mcpp_fputs)( const char * s, OUTDEST od), + (* mcpp_fprintf)( OUTDEST od, const char * format, ...); + +/* system.c */ +extern void do_options( int argc, char ** argv, char ** in_pp + , char ** out_pp); + /* Process command line args */ +extern void init_sys_macro( void); + /* Define system-specific macro */ +extern void at_start( void); + /* Commands prior to main input */ +extern void put_depend( const char * filename); + /* Output source dependency line*/ +extern int do_include( int next); + /* Process #include directive */ +extern void add_file( FILE * fp, const char * src_dir + , const char * filename, const char * fullname, int include_opt); + /* Chain the included file */ +extern void sharp( FILEINFO * sharp_file, int marker); + /* Output # line number */ +extern void do_pragma( void); + /* Process #pragma directive */ +extern void put_asm( void); + /* Putout an asm code line */ +extern void do_old( void); + /* Process older directives */ +extern void at_end( void); + /* Do the final commands */ +extern void print_heap( void); + /* Print blocks of heap memory */ +#if ! HOST_HAVE_STPCPY +extern char * stpcpy( char * dest, const char * src); + /* Non-Standard library function*/ +#endif + +#if MCPP_LIB /* Setting to use mcpp as a subroutine */ +/* directive.c */ +extern void clear_symtable( void); + /* Free all macro definitions */ +/* system.c */ +extern void clear_filelist( void); + /* Free filename and directory list */ +/* The following 5 functions are to Initialize static variables. */ +/* directive.c */ +extern void init_directive( void); +/* eval.c */ +extern void init_eval( void); +/* support.c */ +extern void init_support( void); +/* system.c */ +extern void init_system( void); + +#if HOST_COMPILER == GNUC && (SYS_FAMILY == SYS_UNIX && SYSTEM != SYS_CYGWIN) +#pragma GCC visibility pop +#endif +#endif + +#if HOST_HAVE_STPCPY +extern char * stpcpy( char * dest, const char * src); +#endif diff --git a/libraries/mcpp/src/main.c b/libraries/mcpp/src/main.c new file mode 100644 index 000000000..a43889481 --- /dev/null +++ b/libraries/mcpp/src/main.c @@ -0,0 +1,1129 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * M A I N . C + * M C P P M a i n P r o g r a m + * + * The main routine and it's supplementary routines are placed here. + * The post-preprocessing routines are also placed here. + */ + +#if PREPROCESSED /* Use "pre-preprocessed" header */ +#include "mcpp.H" +#else +#include "system.H" +#include "internal.H" +#endif + + /* Function pointer to expand_macro() functions. */ + char * (*expand_macro)( DEFBUF * defp, char * out, char * out_end + , LINE_COL line_col, int * pragma_op); + + /* The boolean flags specified by the execution options. */ + struct option_flags_ option_flags = { + FALSE, /* c: -C (keep comments) */ + FALSE, /* k: -k (keep horizontal white spaces) */ + FALSE, /* z: -z (no output of included files) */ + FALSE, /* p: -P (no #line output) */ + FALSE, /* q: -Q (output diagnosis to mcpp.err) */ + FALSE, /* v: -v (verbose, affects macro notification) */ + TRIGRAPHS_INIT, /* trig: -3 (toggle trigraphs) */ + DIGRAPHS_INIT, /* dig: -2 (toggle digraphs recognition) */ + /* + * lang_asm allows the following non-standard features. + * 1. #non-directive. + * 2. in a string-literal. + * 3. invalid pp-token generated by ## operator. + * lang_asm is not available in POST_STD mode. + * When COMPILER == GNUC, -x assembler-with-cpp or -lang-asm options + * are used instead of -a. + */ + FALSE, /* lang_asm: -a (assembler source) */ + FALSE /* no_source_line: -j (no source line in diag) */ + }; + + int mcpp_mode = STD; /* Mode of preprocessing */ + + long cplus_val = 0L; /* Value of __cplusplus for C++ */ + long stdc_ver = 0L; /* Value of __STDC_VERSION__ */ + int stdc_val = 0; /* Value of __STDC__ */ + int stdc2; /* cplus_val || stdc_ver >= 199901L */ + int stdc3; /* cplus_val >= 199901L || stdc_ver >= 199901L. + (cplus_val >= 199901L) specifies compatible mode to C99 (extended + feature of this preprocessor) */ + int standard = TRUE; /* TRUE, if mcpp_mode is STD or POST_STD */ + int std_line_prefix = STD_LINE_PREFIX; + /* Output line and file information in C source style */ + +/* + * Commonly used global variables: + * src_line is the current input line number. + * wrong_line is set in many places when the actual output line is out of + * sync with the numbering, e.g, when expanding a macro with an + * embedded newline. + * identifier holds the last identifier scanned (which might be a candidate + * for macro expansion). + * errors is the running mcpp error counter. + * infile is the head of a linked list of input files (extended by + * #include and macros being expanded). 'infile' always points + * to the current file/macro. 'infile->parent' to the includer, + * etc. 'infile->fp' is NULL if this input stream is not a file. + * inc_dirp Directory of #includer with trailing PATH_DELIM. This points + * to one of incdir[] or to the current directory (represented as + * "". This should not be NULL. + */ + long src_line; /* Current line number */ + int wrong_line; /* Force #line to compiler */ + int newlines; /* Count of blank lines */ + int errors = 0; /* Cpp error counter */ + int warn_level = -1; /* Level of warning (have to initialize)*/ + FILEINFO * infile = NULL; /* Current input file */ + int include_nest = 0; /* Nesting level of #include */ + const char * null = ""; /* "" string for convenience */ + const char ** inc_dirp; /* Directory of #includer */ + const char * cur_fname; /* Current source file name */ + /* cur_fname is not rewritten by #line directive */ + char * cur_fullname; + /* Full path of current source file (i.e. infile->full_fname) */ + int no_source_line; /* Do not output line in diag. */ + char identifier[ IDMAX + IDMAX/8]; /* Current identifier */ + int mcpp_debug = 0; /* != 0 if debugging now */ + +/* + * in_directive is set TRUE while a directive line is scanned by directive(). + * It modifies the behavior of squeeze_ws() in expand.c so that newline is + * not skipped even if getting macro arguments. + */ + int in_directive = FALSE; /* TRUE scanning directive line */ + int in_define = FALSE; /* TRUE scanning #define line */ + int in_getarg = FALSE; /* TRUE collecting macro arguments */ + int in_include = FALSE; /* TRUE scanning #include line */ + int in_if = FALSE; /* TRUE scanning #if and in non-skipped expr. */ + long in_asm = 0L; /* Starting line of #asm - #endasm block*/ + +/* + * macro_line is set to the line number of start of a macro call while + * expanding the macro, else set to 0. Line number is remembered for + * diagnostics of unterminated macro call. On unterminated macro call + * macro_line is set to MACRO_ERROR. + */ + long macro_line = 0L; +/* + * macro_name is the currently expanding macro. + */ + char * macro_name; + +/* + * openum is the return value of scan_op() in support.c. + */ + int openum; + +/* + * mkdep means to output source file dependency line, specified by -M* + * option. The OR of the following values is used. + * MD_MKDEP (1) : Output dependency line. + * MD_SYSHEADER(2) : Print also system headers or headers with + * absolute path not only user headers. + * MD_FILE (4) : Output to the file named *.d instead of fp_out. + * Normal output is done to fp_out as usual. + */ + int mkdep = 0; + +/* + * If option_flags.z is TRUE, no_output is incremented when a file is + * #included, and decremented when the file is finished. + * If no_output is larger than 0, processed files are not output, meanwhile + * the macros in the files are defined. + * If mkdep != 0 && (mkdep & MD_FILE) == 0, no_output is set to 1 initially. + */ + int no_output = 0; + +/* + * keep_comments is set TRUE by the -C option. If TRUE, comments are written + * directly to the output stream. option_flags.c contains the permanent state + * of the -C option. keep_comments is always falsified when compilation is + * supressed by a false #if or when no_output is TRUE. + */ + int keep_comments = 0; /* Write out comments flag */ + +/* + * keep_spaces is set to TRUE by the -k option. If TRUE, spaces and tabs in + * an input line are written out to the output line without squeezing to one + * space. option_flags.k contains the permanent state of the -k option. + * keep_spaces is falsified when compilation is suppressed by a false #if. + */ + int keep_spaces = 0; /* Keep white spaces of line*/ + +/* + * ifstack[] holds information about nested #if's. It is always accessed via + * ifptr->stat. The information is as follows: + * WAS_COMPILING state of compiling flag at outer level. + * ELSE_SEEN set TRUE when #else seen to prevent 2nd #else. + * TRUE_SEEN set TRUE when #if or #elif succeeds + * ifstack[0].stat holds the compiling flag. It is WAS_COMPILING if compila- + * tion is currently enabled. Note that this must be initialized to + * WAS_COMPILING. + */ + IFINFO ifstack[ BLK_NEST + 1] = { {WAS_COMPILING, 0L, 0L}, }; + /* Note: '+1' is necessary for the initial state. */ + IFINFO * ifptr = ifstack; /* -> current ifstack[] */ + +/* + * In POST_STD mode, insert_sep is set to INSERT_SEP when : + * 1. the next get_ch() shall insert a token separator. + * 2. unget_ch() has been called when insert_sep == INSERTED_SEP. + * set to INSERTED_SEP when : + * get_ch() has been called when insert_sep == INSERT_SEP. + * set to NO_SEP when : + * get_ch() has been called when insert_sep == INSERTED_SEP. + */ + int insert_sep = NO_SEP; + +/* File pointers for input and output. */ + FILE * fp_in; /* Input stream to preprocess */ + FILE * fp_out; /* Output stream preprocessed */ + FILE * fp_err; /* Diagnostics stream */ + FILE * fp_debug; /* Debugging information stream */ + +/* Variables on multi-byte character encodings. */ + int mbchar = MBCHAR; /* Encoding of multi-byte char */ + int mbchk; /* Character type of possible multi-byte char */ + int bsl_in_mbchar; /* 2nd byte of mbchar possibly has '\\' */ + int bsl_need_escape; /* '\\' in MBCHAR should be escaped */ + /* Function pointer to mb_read_*() functions. */ + size_t (*mb_read)( int c1, char ** in_pp, char ** out_pp); + + jmp_buf error_exit; /* Exit on fatal error */ + +/* + * Translation limits specified by C90, C99 or C++. + */ + struct std_limits_ std_limits = { + /* The following three are temporarily set for do_options() */ + NBUFF, /* Least maximum of string length */ + IDMAX, /* Least maximum of identifier length */ + NMACPARS, /* Least maximum of number of macro params */ + }; + +/* + * work_buf[] and workp are used to store one piece of text as a temporary + * buffer. + * To initialize storage, set workp = work_buf. Note that the work buffer is + * used by several subroutines -- be sure that your data won't be overwritten. + * work_buf[] is used for: + * 1. macro expansion (def_special(), prescan(), catenate(), + * stringize()). + * 2. processing directive line (directive.c, eval.c, get_unexpandable(), + * do_pragma() and its subroutines). + * 3. processing _Pragma() operator (do_pragma_op()). + * 4. miscellaneous (init_gcc_macro(), curfile()). + */ + char work_buf[ NWORK + IDMAX]; /* Work buffer */ + char * workp; /* Pointer into work_buf[] */ + char * const work_end = & work_buf[ NWORK]; + /* End of buffer of work_buf[] */ + +/* + * src_col is the current input column number, but is rarely used. + * It is used to put spaces after #line line in keep_spaces mode + * on some special cases. + */ +static int src_col = 0; /* Column number of source line */ + +#define MBCHAR_IS_ESCAPE_FREE (SJIS_IS_ESCAPE_FREE && \ + BIGFIVE_IS_ESCAPE_FREE && ISO2022_JP_IS_ESCAPE_FREE) + +#if MCPP_LIB +static void init_main( void); + /* Initialize static variables */ +#endif +static void init_defines( void); + /* Predefine macros */ +static void mcpp_main( void); + /* Main loop to process input lines */ +static void do_pragma_op( void); + /* Execute the _Pragma() operator */ +static void put_seq( char * begin, char * seq); + /* Put out the failed sequence */ +static char * de_stringize( char * in, char * out); + /* "De-stringize" for _Pragma() op. */ +static void putout( char * out); + /* May concatenate adjacent string */ +#if COMPILER != GNUC && COMPILER != MSC +static void devide_line( char * out); + /* Devide long line for compiler */ +#endif +static void put_a_line( char * out); + /* Put out the processed line */ +#if ! HAVE_DIGRAPHS || ! MBCHAR_IS_ESCAPE_FREE +static int post_preproc( char * out); + /* Post-preprocess for older comps */ +#if ! HAVE_DIGRAPHS +static char * conv_a_digraph( char * cp); + /* Convert a digraph in place */ +#endif +#if ! MBCHAR_IS_ESCAPE_FREE +static char * esc_mbchar( char * str, char * str_end); + /* Double \ as 2nd byte of SJIS */ +#endif +#endif + + +#if MCPP_LIB +static void init_main( void) +/* Initialize global variables on re-entering. */ +{ + mcpp_mode = STD; + cplus_val = stdc_ver = 0L; + stdc_val = 0; + standard = TRUE; + std_line_prefix = STD_LINE_PREFIX; + errors = src_col = 0; + warn_level = -1; + infile = NULL; + in_directive = in_define = in_getarg = in_include = in_if = FALSE; + src_line = macro_line = in_asm = 0L; + mcpp_debug = mkdep = no_output = keep_comments = keep_spaces = 0; + include_nest = 0; + insert_sep = NO_SEP; + mbchar = MBCHAR; + ifptr = ifstack; + ifstack[0].stat = WAS_COMPILING; + ifstack[0].ifline = ifstack[0].elseline = 0L; + std_limits.str_len = NBUFF; + std_limits.id_len = IDMAX; + std_limits.n_mac_pars = NMACPARS; + option_flags.c = option_flags.k = option_flags.z = option_flags.p + = option_flags.q = option_flags.v = option_flags.lang_asm + = option_flags.no_source_line = option_flags.dollar_in_name + = FALSE; + option_flags.trig = TRIGRAPHS_INIT; + option_flags.dig = DIGRAPHS_INIT; +} + +int mcpp_lib_main +#else +int main +#endif +( + int argc, + char ** argv +) +{ + char * in_file = NULL; + char * out_file = NULL; + char * stdin_name = ""; + + if (setjmp( error_exit) == -1) { + errors++; + goto fatal_error_exit; + } + +#if MCPP_LIB + /* Initialize global and static variables. */ + init_main(); + init_directive(); + init_eval(); + init_support(); + init_system(); +#endif + + fp_in = stdin; + fp_out = stdout; + fp_err = stderr; + fp_debug = stdout; + /* + * Debugging information is output to stdout in order to + * synchronize with preprocessed output. + */ + + inc_dirp = &null; /* Initialize to current (null) directory */ + cur_fname = cur_fullname = "(predefined)"; /* For predefined macros */ + init_defines(); /* Predefine macros */ + mb_init(); /* Should be initialized prior to get options */ + do_options( argc, argv, &in_file, &out_file); /* Command line options */ + + /* Open input file, "-" means stdin. */ + if (in_file != NULL && ! str_eq( in_file, "-")) { + if ((fp_in = fopen( in_file, "r")) == NULL) { + mcpp_fprintf( ERR, "Can't open input file \"%s\".\n", in_file); + errors++; +#if MCPP_LIB + goto fatal_error_exit; +#else + return( IO_ERROR); +#endif + } + } else { + in_file = stdin_name; + } + /* Open output file, "-" means stdout. */ + if (out_file != NULL && ! str_eq( out_file, "-")) { + if ((fp_out = fopen( out_file, "w")) == NULL) { + mcpp_fprintf( ERR, "Can't open output file \"%s\".\n", out_file); + errors++; +#if MCPP_LIB + goto fatal_error_exit; +#else + return( IO_ERROR); +#endif + } + fp_debug = fp_out; + } + if (option_flags.q) { /* Redirect diagnostics */ + if ((fp_err = fopen( "mcpp.err", "a")) == NULL) { + errors++; + mcpp_fprintf( OUT, "Can't open \"mcpp.err\"\n"); +#if MCPP_LIB + goto fatal_error_exit; +#else + return( IO_ERROR); +#endif + } + } + init_sys_macro(); /* Initialize system-specific macros */ + add_file( fp_in, NULL, in_file, in_file, FALSE); + /* "open" main input file */ + infile->dirp = inc_dirp; + infile->sys_header = FALSE; + cur_fullname = in_file; + if (mkdep && str_eq( infile->real_fname, stdin_name) == FALSE) + put_depend( in_file); /* Putout target file name */ + at_start(); /* Do the pre-main commands */ + + mcpp_main(); /* Process main file */ + + if (mkdep) + put_depend( NULL); /* Append '\n' to dependency line */ + at_end(); /* Do the final commands */ + +fatal_error_exit: +#if MCPP_LIB + /* Free malloced memory */ + if (mcpp_debug & MACRO_CALL) { + if (in_file != stdin_name) + free( in_file); + } + clear_filelist(); + clear_symtable(); +#endif + + if (fp_in != stdin) + fclose( fp_in); + if (fp_out != stdout) + fclose( fp_out); + if (fp_err != stderr) + fclose( fp_err); + + if (mcpp_debug & MEMORY) + print_heap(); + if (errors > 0 && option_flags.no_source_line == FALSE) { + mcpp_fprintf( ERR, "%d error%s in preprocessor.\n", + errors, (errors == 1) ? "" : "s"); + return IO_ERROR; + } + return IO_SUCCESS; /* No errors */ +} + +/* + * This is the table used to predefine target machine, operating system and + * compiler designators. It may need hacking for specific circumstances. + * The -N option supresses these definitions. + */ +typedef struct pre_set { + const char * name; + const char * val; +} PRESET; + +static PRESET preset[] = { + +#ifdef SYSTEM_OLD + { SYSTEM_OLD, "1"}, +#endif +#ifdef SYSTEM_SP_OLD + { SYSTEM_SP_OLD, "1"}, +#endif +#ifdef COMPILER_OLD + { COMPILER_OLD, "1"}, +#endif +#ifdef COMPILER_SP_OLD + { COMPILER_SP_OLD, "1"}, +#endif + + { NULL, NULL}, /* End of macros beginning with alphabet */ + +#ifdef SYSTEM_STD + { SYSTEM_STD, "1"}, +#endif +#ifdef SYSTEM_STD1 + { SYSTEM_STD1, "1"}, +#endif +#ifdef SYSTEM_STD2 + { SYSTEM_STD2, "1"}, +#endif + +#ifdef SYSTEM_EXT + { SYSTEM_EXT, SYSTEM_EXT_VAL}, +#endif +#ifdef SYSTEM_EXT2 + { SYSTEM_EXT2, SYSTEM_EXT2_VAL}, +#endif +#ifdef SYSTEM_SP_STD + { SYSTEM_SP_STD, SYSTEM_SP_STD_VAL}, +#endif +#ifdef COMPILER_STD + { COMPILER_STD, COMPILER_STD_VAL}, +#endif +#ifdef COMPILER_STD1 + { COMPILER_STD1, COMPILER_STD1_VAL}, +#endif +#ifdef COMPILER_STD2 + { COMPILER_STD2, COMPILER_STD2_VAL}, +#endif +#ifdef COMPILER_EXT + { COMPILER_EXT, COMPILER_EXT_VAL}, +#endif +#ifdef COMPILER_EXT2 + { COMPILER_EXT2, COMPILER_EXT2_VAL}, +#endif +#ifdef COMPILER_SP_STD + { COMPILER_SP_STD, COMPILER_SP_STD_VAL}, +#endif +#ifdef COMPILER_SP1 + { COMPILER_SP1, COMPILER_SP1_VAL}, +#endif +#ifdef COMPILER_SP2 + { COMPILER_SP2, COMPILER_SP2_VAL}, +#endif +#ifdef COMPILER_SP3 + { COMPILER_SP3, COMPILER_SP3_VAL}, +#endif +#ifdef COMPILER_CPLUS + { COMPILER_CPLUS, COMPILER_CPLUS_VAL}, +#endif + { NULL, NULL}, /* End of macros with value of any integer */ +}; + +static void init_defines( void) +/* + * Initialize the built-in #define's. + * Called only on cpp startup prior to do_options(). + * + * Note: the built-in static definitions are removed by the -N option. + */ +{ + int n = sizeof preset / sizeof (PRESET); + int nargs; + PRESET * pp; + + /* Predefine the built-in symbols. */ + nargs = DEF_NOARGS_PREDEF_OLD; + for (pp = preset; pp < preset + n; pp++) { + if (pp->name && *(pp->name)) + look_and_install( pp->name, nargs, null, pp->val); + else if (! pp->name) + nargs = DEF_NOARGS_PREDEF; + } + + look_and_install( "__MCPP", DEF_NOARGS_PREDEF, null, "2"); + /* MCPP V.2.x */ + /* This macro is predefined and is not undefined by -N option, */ + /* yet can be undefined by -U or #undef. */ +} + +void un_predefine( + int clearall /* TRUE for -N option */ +) +/* + * Remove predefined symbols from the symbol table. + */ +{ + PRESET * pp; + DEFBUF * defp; + int n = sizeof preset / sizeof (PRESET); + + for (pp = preset; pp < preset + n; pp++) { + if (pp->name) { + if (*(pp->name) && (defp = look_id( pp->name)) != NULL + && defp->nargs >= DEF_NOARGS_PREDEF) + undefine( pp->name); + } else if (clearall == FALSE) { /* -S option */ + break; + } + } +} + +/* + * output[] and out_ptr are used for: + * buffer to store preprocessed line (this line is put out or handed to + * post_preproc() via putout() in some cases) + */ +static char output[ NMACWORK]; /* Buffer for preprocessed line */ +static char * const out_end = & output[ NWORK - 2]; + /* Limit of output line for other than GCC and VC */ +static char * const out_wend = & output[ NMACWORK - 2]; + /* Buffer end of output line */ +static char * out_ptr; /* Current pointer into output[]*/ + +static void mcpp_main( void) +/* + * Main process for mcpp -- copies tokens from the current input stream + * (main file or included file) to the output file. + */ +{ + int c; /* Current character */ + char * wp; /* Temporary pointer */ + DEFBUF * defp; /* Macro definition */ + int line_top; /* Is in the line top, possibly spaces */ + LINE_COL line_col; /* Location of macro call in source */ + + keep_comments = option_flags.c && !no_output; + keep_spaces = option_flags.k; /* Will be turned off if !compiling */ + line_col.col = line_col.line = 0L; + + /* + * This loop is started "from the top" at the beginning of each line. + * 'wrong_line' is set TRUE in many places if it is necessary to write + * a #line record. (But we don't write them when expanding macros.) + * + * 'newlines' variable counts the number of blank lines that have been + * skipped over. These are then either output via #line records or + * by outputting explicit blank lines. + * 'newlines' will be cleared on end of an included file by get_ch(). + */ + while (1) { /* For the whole input */ + newlines = 0; /* Count empty lines */ + + while (1) { /* For each line, ... */ + out_ptr = output; /* Top of the line buf */ + c = get_ch(); + if (src_col) + break; /* There is a residual tokens on the line */ + while (char_type[ c] & HSP) { /* ' ' or '\t' */ + if (c != COM_SEP) + *out_ptr++ = c; /* Retain line top white spaces */ + /* Else skip 0-length comment */ + c = get_ch(); + } + if (c == '#') { /* Is 1st non-space '#' */ + directive(); /* Do a #directive */ + } else if (mcpp_mode == STD && option_flags.dig && c == '%') { + /* In POST_STD digraphs are already converted */ + if (get_ch() == ':') { /* '%:' i.e. '#' */ + directive(); /* Do a #directive */ + } else { + unget_ch(); + if (! compiling) { + skip_nl(); + newlines++; + } else { + break; + } + } + } else if (c == CHAR_EOF) { /* End of input */ + break; + } else if (! compiling) { /* #ifdef false? */ + skip_nl(); /* Skip to newline */ + newlines++; /* Count it, too. */ + } else if (in_asm && ! no_output) { /* In #asm block */ + put_asm(); /* Put out as it is */ + } else if (c == '\n') { /* Blank line */ + if (keep_comments) + mcpp_fputc( '\n', OUT); /* May flush comments */ + else + newlines++; /* Wait for a token */ + } else { + break; /* Actual token */ + } + } + + if (c == CHAR_EOF) /* Exit process at */ + break; /* end of input */ + + /* + * If the loop didn't terminate because of end of file, we + * know there is a token to compile. First, clean up after + * absorbing newlines. newlines has the number we skipped. + */ + if (no_output) { + wrong_line = FALSE; + } else { + if (wrong_line || newlines > 10) { + sharp( NULL, 0); /* Output # line number */ + if (keep_spaces && src_col) { + while (src_col--) /* Adjust columns */ + mcpp_fputc( ' ', OUT); + src_col = 0; + } + } else { /* If just a few, stuff */ + while (newlines-- > 0) /* them out ourselves */ + mcpp_fputc('\n', OUT); + } + } + + /* + * Process each token on this line. + */ + line_top = TRUE; + while (c != '\n' && c != CHAR_EOF) { /* For the whole line */ + /* + * has_pragma is set to TRUE so as to execute _Pragma() operator + * when the psuedo macro _Pragma() is found. + */ + int has_pragma; + + if ((mcpp_debug & MACRO_CALL) && ! in_directive) { + line_col.line = src_line; /* Location in source */ + line_col.col = infile->bptr - infile->buffer - 1; + } + if (scan_token( c, (wp = out_ptr, &wp), out_wend) == NAM + && (defp = is_macro( &wp)) != NULL) { /* A macro */ + wp = expand_macro( defp, out_ptr, out_wend, line_col + , & has_pragma); /* Expand it completely */ + if (line_top) { /* The first token is a macro */ + char * tp = out_ptr; + while (char_type[ *tp & UCHARMAX] & HSP) + tp++; /* Remove excessive spaces */ + memmove( out_ptr, tp, strlen( tp) + 1); + wp -= (tp - out_ptr); + } + if (has_pragma) { /* Found _Pramga() */ + do_pragma_op(); /* Do _Pragma() operator*/ + out_ptr = output; /* Do the rest of line */ + wrong_line = TRUE; /* Line-num out of sync */ + } else { + out_ptr = wp; + } + if (keep_spaces && wrong_line && infile + && *(infile->bptr) != '\n' && *(infile->bptr) != EOS) { + src_col = infile->bptr - infile->buffer; + /* Remember the current colums */ + break; /* Do sharp() now */ + } + } else { /* Not a macro call */ + out_ptr = wp; /* Advance the place */ + if (wrong_line) /* is_macro() swallowed */ + break; /* the newline */ + } + while (char_type[ c = get_ch()] & HSP) { /* Horizontal space */ + if (c != COM_SEP) /* Skip 0-length comment*/ + *out_ptr++ = c; + } + line_top = FALSE; /* Read over some token */ + } /* Loop for line */ + + putout( output); /* Output the line */ + } /* Continue until EOF */ +} + +static void do_pragma_op( void) +/* + * Execute the _Pragma() operator contained in an expanded macro. + * Note: _Pragma() operator is also implemented as a special macro. Therefore + * it is always searched as a macro. + * There might be more than one _Pragma() in a expanded macro and those may be + * surrounded by other token sequences. + * Since all the macros have been expanded completely, any name identical to + * macro should not be re-expanded. + * However, a macro in the string argument of _Pragma() may be expanded by + * do_pragma() after de_stringize(), if EXPAND_PRAGMA == TRUE. + */ +{ + FILEINFO * file; + DEFBUF * defp; + int prev = output < out_ptr; /* There is a previous sequence */ + int token_type; + char * cp1, * cp2; + int c; + + file = unget_string( out_ptr, NULL); + while (c = get_ch(), file == infile) { + if (char_type[ c] & HSP) { + *out_ptr++ = c; + continue; + } + if (scan_token( c, (cp1 = out_ptr, &cp1), out_wend) + == NAM && (defp = is_macro( &cp1)) != NULL + && defp->nargs == DEF_PRAGMA) { /* _Pragma() operator */ + if (prev) { + putout( output); /* Putout the previous sequence */ + cp1 = stpcpy( output, "pragma "); /* From top of buffer */ + } + /* is_macro() already read over possible spaces after _Pragma */ + *cp1++ = get_ch(); /* '(' */ + while (char_type[ c = get_ch()] & HSP) + *cp1++ = c; + if (((token_type = scan_token( c, (cp2 = cp1, &cp1), out_wend)) + != STR && token_type != WSTR)) { + /* Not a string literal */ + put_seq( output, cp1); + return; + } + workp = de_stringize( cp2, work_buf); + while (char_type[ c = get_ch()] & HSP) + *cp1++ = c; + if (c != ')') { /* More than a string literal */ + unget_ch(); + put_seq( output, cp1); + return; + } + strcpy( workp, "\n"); /* Terminate with */ + unget_string( work_buf, NULL); + do_pragma(); /* Do the #pragma "line" */ + infile->bptr += strlen( infile->bptr); /* Clear sequence */ + cp1 = out_ptr = output; /* From the top of buffer */ + prev = FALSE; + } else { /* Not pragma sequence */ + out_ptr = cp1; + prev = TRUE; + } + } + unget_ch(); + if (prev) + putout( output); +} + +static void put_seq( + char * begin, /* Sequence already in buffer */ + char * seq /* Sequence to be read */ +) +/* + * Put out the failed sequence as it is. + */ +{ + FILEINFO * file = infile; + int c; + + cerror( "Operand of _Pragma() is not a string literal" /* _E_ */ + , NULL, 0L, NULL); + while (c = get_ch(), file == infile) + *seq++ = c; + unget_ch(); + out_ptr = seq; + putout( begin); +} + +static char * de_stringize( + char * in, /* Null terminated string literal */ + char * out /* Output buffer */ +) +/* + * Make token sequence from a string literal for _Pragma() operator. + */ +{ + char * in_p; + int c1, c; + + in_p = in; + if (*in_p == 'L') + in_p++; /* Skip 'L' prefix */ + while ((c = *++in_p) != EOS) { + if (c == '\\' && ((c1 = *(in_p + 1), c1 == '\\') || c1 == '"')) + c = *++in_p; /* "De-escape" escape sequence */ + *out++ = c; + } + *--out = EOS; /* Remove the closing '"' */ + return out; +} + +static void putout( + char * out /* Output line (line-end is always 'out_ptr') */ +) +/* + * Put out a line with or without "post-preprocessing". + */ +{ + size_t len; + + *out_ptr++ = '\n'; /* Put out a newline */ + *out_ptr = EOS; + +#if ! MBCHAR_IS_ESCAPE_FREE + post_preproc( out); +#elif ! HAVE_DIGRAPHS + if (mcpp_mode == STD && option_flag.dig) + post_preproc( out); +#endif + /* Else no post-preprocess */ +#if COMPILER != GNUC && COMPILER != MSC + /* GCC and Visual C can accept very long line */ + len = strlen( out); + if (len > NWORK - 1) + devide_line( out); /* Devide a too long line */ + else +#endif + put_a_line( out); +} + +#if COMPILER != GNUC && COMPILER != MSC + +static void devide_line( + char * out /* 'out' is 'output' in actual */ +) +/* + * Devide a too long line into output lines shorter than NWORK. + * This routine is called from putout(). + */ +{ + FILEINFO * file; + char * save; + char * wp; + int c; + + file = unget_string( out, NULL); /* To re-read the line */ + wp = out_ptr = out; + + while ((c = get_ch()), file == infile) { + if (char_type[ c] & HSP) { + if (keep_spaces || out == out_ptr + || (char_type[ *(out_ptr - 1) & UCHARMAX] & HSP)) { + *out_ptr++ = c; + wp++; + } + continue; + } + scan_token( c, &wp, out_wend); /* Read a token */ + if (NWORK-2 < wp - out_ptr) { /* Too long a token */ + cfatal( "Too long token %s", out_ptr, 0L, NULL); /* _F_ */ + } else if (out_end <= wp) { /* Too long line */ + if (mcpp_debug & MACRO_CALL) { /* -K option */ + /* Other than GCC or Visual C */ + /* scan_token() scans a comment as sequence of some */ + /* tokens such as '/', '*', ..., '*', '/', since it */ + /* does not expect comment. */ + save = out_ptr; + while ((save = strrchr( save, '/')) != NULL) { + if (*(save - 1) == '*') { /* '*' '/' sequence */ + out_ptr = save + 1; /* Devide at the end*/ + break; /* of a comment*/ + } + } + } + save = save_string( out_ptr); /* Save the token */ + *out_ptr++ = '\n'; /* Append newline */ + *out_ptr = EOS; + put_a_line( out); /* Putout the former tokens */ + wp = out_ptr = stpcpy( out, save); /* Restore the token */ + free( save); + } else { /* Still in size */ + out_ptr = wp; /* Advance the pointer */ + } + } + + unget_ch(); /* Push back the source character */ + put_a_line( out); /* Putout the last tokens */ + sharp( NULL, 0); /* Correct line number */ +} + +#endif + +static void put_a_line( + char * out +) +/* + * Finally put out the preprocessed line. + */ +{ + size_t len; + char * out_p; + char * tp; + + if (no_output) + return; + len = strlen( out); + tp = out_p = out + len - 2; /* Just before '\n' */ + while (char_type[ *out_p & UCHARMAX] & SPA) + out_p--; /* Remove trailing white spaces */ + if (out_p < tp) { + *++out_p = '\n'; + *++out_p = EOS; + } + if (mcpp_fputs( out, OUT) == EOF) + cfatal( "File write error", NULL, 0L, NULL); /* _F_ */ +} + + +/* + * Routines to P O S T - P R E P R O C E S S + * + * 1998/08 created kmatsui (revised 1998/09, 2004/02, 2006/07) + * Supplementary phase for the older compiler-propers. + * 1. Convert digraphs to usual tokens. + * 2. Double '\\' of the second byte of multi-byte characters. + * These conversions are done selectively according to the macros defined + * in system.H. + * 1. Digraphs are converted if ! HAVE_DIGRAPHS and digraph recoginition + * is enabled by DIGRAPHS_INIT and/or -2 option on execution. + * 2. '\\' of the second byte of SJIS (BIGFIVE or ISO2022_JP) is doubled + * if bsl_need_escape == TRUE. + */ + +#if HAVE_DIGRAPHS && MBCHAR_IS_ESCAPE_FREE + /* No post_preproc() */ +#else + +static int post_preproc( + char * out +) +/* + * Convert digraphs and double '\\' of the second byte of SJIS (BIGFIVE or + * ISO2022_JP). + * Note: Output of -K option embeds macro informations into comments. + * scan_token() does not recognize comment and parses it as '/', '*', etc. + */ +{ +#if ! HAVE_DIGRAPHS + int di_count = 0; +#endif + int token_type; + int c; + char * str; + char * cp = out; + + unget_string( out, NULL); + while ((c = get_ch()) != '\n') { /* Not to read over to next line */ + if (char_type[ c] & HSP) { + *cp++ = c; + continue; + } + str = cp; + token_type = scan_token( c, &cp, out_wend); + switch (token_type) { +#if ! MBCHAR_IS_ESCAPE_FREE + case WSTR : + case WCHR : + str++; /* Skip prefix 'L' */ + /* Fall through */ + case STR : + case CHR : + if (bsl_need_escape) + cp = esc_mbchar( str, cp); + break; +#endif /* ! MBCHAR_IS_ESCAPE_FREE */ +#if ! HAVE_DIGRAPHS + case OPE : + if (mcpp_mode == STD && (openum & OP_DIGRAPH)) { + cp = conv_a_digraph( cp); /* Convert a digraph */ + di_count++; + } + break; +#endif + } + } + *cp++ = '\n'; + *cp = EOS; +#if ! HAVE_DIGRAPHS + if (mcpp_mode == STD && di_count && (warn_level & 16)) + cwarn( "%.0s%ld digraph(s) converted" /* _W16_ */ + , NULL, (long) di_count, NULL); +#endif + return 0; +} + +#endif /* ! HAVE_DIGRAPHS || ! MBCHAR_IS_ESCAPE_FREE */ + +#if ! HAVE_DIGRAPHS +static char * conv_a_digraph( + char * cp /* The end of the digraph token */ +) +/* + * Convert a digraph to usual token in place. + * This routine is never called in POST_STD mode. + */ +{ + cp -= 2; + switch (openum) { + case OP_LBRACE_D : + *cp++ = '{'; + break; + case OP_RBRACE_D : + *cp++ = '}'; + break; + case OP_LBRCK_D : + *cp++ = '['; + break; + case OP_RBRCK_D : + *cp++ = ']'; + break; + case OP_SHARP_D : /* Error of source */ + *cp++ = '#'; + break; + case OP_DSHARP_D : /* Error of source */ + cp -= 2; + *cp++ = '#'; + *cp++ = '#'; + break; + } + return cp; +} +#endif /* ! HAVE_DIGRAPHS */ + +#if ! MBCHAR_IS_ESCAPE_FREE +static char * esc_mbchar( + char * str, /* String literal or character constant without 'L' */ + char * str_end /* The end of the token */ +) +/* + * Insert \ before the byte of 0x5c('\\') of the SJIS, BIGFIVE or ISO2022_JP + * multi-byte character code in string literal or character constant. + * Insert \ also before the byte of 0x22('"') and 0x27('\'') of ISO2022_JP. + * esc_mbchar() does in-place insertion. + */ +{ + char * cp; + int delim; + int c; + + if (! bsl_need_escape) + return str_end; + if ((delim = *str++) == 'L') + delim = *str++; /* The quote character */ + while ((c = *str++ & UCHARMAX) != delim) { + if (char_type[ c] & mbchk) { /* MBCHAR */ + cp = str; + mb_read( c, &str, (workp = work_buf, &workp)); + while (cp++ < str) { + c = *(cp - 1); + if (c == '\\' || c == '"' || c == '\'') { + /* Insert \ before 0x5c, 0x22, 0x27 */ + memmove( cp, cp - 1, (size_t) (str_end - cp) + 2); + *(cp++ - 1) = '\\'; + str++; + str_end++; + } + } + } else if (c == '\\' && ! (char_type[ *str & UCHARMAX] & mbchk)) { + str++; /* Escape sequence */ + } + } + return str_end; +} +#endif /* ! MBCHAR_IS_ESCAPE_FREE */ + diff --git a/libraries/mcpp/src/main_libmcpp.c b/libraries/mcpp/src/main_libmcpp.c new file mode 100644 index 000000000..71639259e --- /dev/null +++ b/libraries/mcpp/src/main_libmcpp.c @@ -0,0 +1,9 @@ +/* most simple sample source to use libmcpp */ + +#include "mcpp_lib.h" + +int +main (int argc, char *argv[]) +{ + return mcpp_lib_main (argc, argv); +} diff --git a/libraries/mcpp/src/mbchar.c b/libraries/mcpp/src/mbchar.c new file mode 100644 index 000000000..c0afb850a --- /dev/null +++ b/libraries/mcpp/src/mbchar.c @@ -0,0 +1,869 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * M B C H A R . C + * C h a r a c t e r h a n d l i n g R o u t i n e s + * + * Character handling and multi-byte character handling routines are + * placed here. + */ + +#if PREPROCESSED +#include "mcpp.H" +#else +#include "system.H" +#include "internal.H" +#endif + +/* + * Tables of character types and multi-byte character types. + * + * Some of these character attributes will be overwritten by + * execution time option '-@post' or '-@old'. + * Warning on erroneous sequence will be issued from the caller routines: + * scan_quote(), scan_id() or scan_number(). + */ + +/* Non-ASCII characters are always checked by mb_read(). */ +#define NA 0x4000 /* Non-ASCII characters */ + +/* Horizontal spaces (' ', '\t' and TOK_SEP) */ +#define HSPA (SPA | HSP) + +short * char_type; /* Pointer to one of the following type_*[]. */ + +#define EJ1 0x100 /* 1st byte of EUC_JP */ +#define EJ2 0x200 /* 2nd byte of EUC_JP */ +#define GB1 0x400 /* 1st byte of GB2312 */ +#define GB2 0x800 /* 2nd byte of GB2312 */ +#define KS1 0x1000 /* 1st byte of KSC5601 */ +#define KS2 0x2000 /* 2nd byte of KSC5601 */ + +#define EJ12 (EJ1 | EJ2) /* 1st byte or 2nd byte of EUC_JP */ +#define GB12 (GB1 | GB2) +#define KS12 (KS1 | KS2) +#define EJ1N (NA | EJ1) +#define EU12N (NA | EJ12 | GB12 | KS12) + /* 1st or 2nd byte of EUC_JP, GB2312 or KSC5601, or any other non-ASCII */ + +static short type_euc[ UCHARMAX + 1] = { +/* + * For EUC_JP, GB2312, KSC5601 or other similar multi-byte char encodings. + */ + +/* Character type codes */ +/* 0, 1, 2, 3, 4, 5, 6, 7, */ +/* 8, 9, A, B, C, D, E, F, Hex */ + + 000, 000, 000, 000, 000, 000, 000, 000, /* 00 */ + 000, HSPA, SPA, SPA, SPA, SPA, 000, 000, /* 08 */ + 000, 000, 000, 000, 000, 000, 000, 000, /* 10 */ + /* 0x17-0x1A and 0x1F will be cleared in some modes by chk_opts() */ + 000, LET, LET, 000, 000, 000, 000, HSPA, /* 18 */ + HSPA, PUNC, QUO, PUNC, 000, PUNC, PUNC, QUO, /* 20 !"#$%&' */ + PUNC, PUNC, PUNC, PUNC, PUNC, PUNC, DOT, PUNC, /* 28 ()*+,-./ */ + DIG, DIG, DIG, DIG, DIG, DIG, DIG, DIG, /* 30 01234567 */ + DIG, DIG, PUNC, PUNC, PUNC, PUNC, PUNC, PUNC, /* 38 89:;<=>? */ + + 000, LET, LET, LET, LET, LET, LET, LET, /* 40 @ABCDEFG */ + LET, LET, LET, LET, LET, LET, LET, LET, /* 48 HIJKLMNO */ + LET, LET, LET, LET, LET, LET, LET, LET, /* 50 PQRSTUVW */ + LET, LET, LET, PUNC, 000, PUNC, PUNC, LET, /* 58 XYZ[\]^_ */ + 000, LET, LET, LET, LET, LET, LET, LET, /* 60 `abcdefg */ + LET, LET, LET, LET, LET, LET, LET, LET, /* 68 hijklmno */ + LET, LET, LET, LET, LET, LET, LET, LET, /* 70 pqrstuvw */ + LET, LET, LET, PUNC, PUNC, PUNC, PUNC, 000, /* 78 xyz{|}~ */ + + NA, NA, NA, NA, NA, NA, NA, NA, /* 80 .. 87 */ + NA, NA, NA, NA, NA, NA, EJ1N, NA, /* 88 .. 8F */ + NA, NA, NA, NA, NA, NA, NA, NA, /* 90 .. 97 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* 98 .. 9F */ + NA, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* A0 .. A7 */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* A8 .. AF */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* B0 .. B7 */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* B8 .. BF */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* C0 .. C7 */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* C8 .. CF */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* D0 .. D7 */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* D8 .. DF */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* E0 .. E7 */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* E8 .. EF */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, /* F0 .. F7 */ + EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, EU12N, NA, /* F8 .. FF */ +}; + +static short type_bsl[ UCHARMAX + 1] = { +/* + * For SJIS, BIGFIVE or other similar encodings which may have '\\' value as + * the second byte of multi-byte character. + */ + +#define SJ1 0x100 /* 1st byte of SJIS */ +#define SJ2 0x200 /* 2nd byte of SJIS */ +#define BF1 0x400 /* 1st byte of BIGFIVE */ +#define BF2 0x800 /* 2nd byte of BIGFIVE */ + +#define SB2 (SJ2 | BF2) +#define SJ2N (NA | SJ2) +#define SB2N (NA | SJ2 | BF2) +#define SJ12N (NA | SJ1 | SJ2) +#define BF12N (NA | BF1 | BF2) +#define SB12N (NA | SJ1 | SJ2 | BF1 | BF2) +#define S2B12N (NA | SJ2 | BF1 | BF2) + +#define LSB2 (LET | SB2) +#define PSB2 (PUNC| SB2) + +/* Character type codes */ +/* 0, 1, 2, 3, 4, 5, 6, 7, */ +/* 8, 9, A, B, C, D, E, F, Hex */ + + 000, 000, 000, 000, 000, 000, 000, 000, /* 00 */ + 000, HSPA, SPA, SPA, SPA, SPA, 000, 000, /* 08 */ + 000, 000, 000, 000, 000, 000, 000, 000, /* 10 */ + /* 0x17-0x1A and 0x1F will be cleared in some modes by chk_opts() */ + 000, LET, LET, 000, 000, 000, 000, HSPA, /* 18 */ + HSPA, PUNC, QUO, PUNC, 000, PUNC, PUNC, QUO, /* 20 !"#$%&' */ + PUNC, PUNC, PUNC, PUNC, PUNC, PUNC, DOT, PUNC, /* 28 ()*+,-./ */ + DIG, DIG, DIG, DIG, DIG, DIG, DIG, DIG, /* 30 01234567 */ + DIG, DIG, PUNC, PUNC, PUNC, PUNC, PUNC, PUNC, /* 38 89:;<=>? */ + + SB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, /* 40 @ABCDEFG */ + LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, /* 48 HIJKLMNO */ + LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, /* 50 PQRSTUVW */ + LSB2, LSB2, LSB2, PSB2, SB2, PSB2, PSB2, LSB2, /* 58 XYZ[\]^_ */ + SB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, /* 60 `abcdefg */ + LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, /* 68 hijklmno */ + LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, LSB2, /* 70 pqrstuvw */ + LSB2, LSB2, LSB2, PSB2, PSB2, PSB2, PSB2, 000, /* 78 xyz{|}~ */ + + SB2N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, /* 80 .. 87 */ + SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, /* 88 .. 8F */ + SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, /* 90 .. 97 */ + SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, SJ12N, /* 98 .. 9F */ + SJ2N, S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N, /* A0 .. A7 */ + S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N, /* A8 .. AF */ + S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N, /* B0 .. B7 */ + S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N, /* B8 .. BF */ + S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N, /* C0 .. C7 */ + S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N, /* C8 .. CF */ + S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N, /* D0 .. D7 */ + S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N,S2B12N, /* D8 .. DF */ + SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, /* E0 .. E7 */ + SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, /* E8 .. EF */ + SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, SB12N, /* F0 .. F7 */ + SB12N, SB12N, SB12N, SB12N, SB12N, BF12N, BF12N, NA, /* F8 .. FF */ +}; + +/* + * For ISO2022_JP multi-byte character encoding. + */ + +#define IS1 0x100 /* 1st byte of shift-sequence */ +#define IS2 0x200 /* 2nd byte of shift-sequence */ +#define IS3 0x400 /* 3rd byte of shift-sequence */ +#define IS4 0x800 /* 4th byte of shift-sequence */ +#define IJP 0x1000 /* 1st or 2nd byte of ISO-2022-JP (ISO-2022-JP1) */ + +#define PIJP (PUNC | IJP) +#define QIJP (QUO | IJP) +#define DTJP (DOT | IJP) +#define DGJP (DIG | IJP) +#define LIJP (LET | IJP) + +#define JPS2 (IJP | IS2) +#define PJPS23 (PIJP | IS2 | IS3) +#define LJPS3 (LIJP | IS3) +#define LJPS4 (LIJP | IS4) + +static short type_iso2022_jp[ UCHARMAX + 1] = { + +/* Character type codes */ +/* 0, 1, 2, 3, 4, 5, 6, 7, */ +/* 8, 9, A, B, C, D, E, F, Hex */ + + 000, 000, 000, 000, 000, 000, 000, 000, /* 00 */ + 000, HSPA, SPA, SPA, SPA, SPA, 000, 000, /* 08 */ + 000, 000, 000, 000, 000, 000, 000, 000, /* 10 */ + /* 0x17-0x1A and 0x1F will be cleared in some modes by chk_opts() */ + 000, LET, LET, IS1, 000, 000, 000, HSPA, /* 18 */ + HSPA, PIJP, QIJP, PIJP, JPS2, PIJP, PIJP, QIJP, /* 20 !"#$%&' */ + PJPS23,PIJP, PIJP, PIJP, PIJP, PIJP, DTJP, PIJP, /* 28 ()*+,-./ */ + DGJP, DGJP, DGJP, DGJP, DGJP, DGJP, DGJP, DGJP, /* 30 01234567 */ + DGJP, DGJP, PIJP, PIJP, PIJP, PIJP, PIJP, PIJP, /* 38 89:;<=>? */ + + IJP, LIJP, LJPS3, LIJP, LJPS4, LIJP, LIJP, LIJP, /* 40 @ABCDEFG */ + LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, /* 48 HIJKLMNO */ + LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, /* 50 PQRSTUVW */ + LIJP, LIJP, LIJP, PIJP, IJP, PIJP, PIJP, LIJP, /* 58 XYZ[\]^_ */ + IJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, /* 60 `abcdefg */ + LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, /* 68 hijklmno */ + LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, LIJP, /* 70 pqrstuvw */ + LIJP, LIJP, LIJP, PIJP, PIJP, PIJP, PIJP, 000, /* 78 xyz{|}~ */ + + NA, NA, NA, NA, NA, NA, NA, NA, /* 80 .. 87 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* 88 .. 8F */ + NA, NA, NA, NA, NA, NA, NA, NA, /* 90 .. 97 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* 98 .. 9F */ + NA, NA, NA, NA, NA, NA, NA, NA, /* A0 .. A7 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* A8 .. AF */ + NA, NA, NA, NA, NA, NA, NA, NA, /* B0 .. B7 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* B8 .. BF */ + NA, NA, NA, NA, NA, NA, NA, NA, /* C0 .. C7 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* C8 .. CF */ + NA, NA, NA, NA, NA, NA, NA, NA, /* D0 .. D7 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* D8 .. DF */ + NA, NA, NA, NA, NA, NA, NA, NA, /* E0 .. E7 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* E8 .. EF */ + NA, NA, NA, NA, NA, NA, NA, NA, /* F0 .. F7 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* F8 .. FF */ +}; + +/* + * For UTF8 multi-byte character encoding. + */ + +#define U2_1 0x100 /* 1st byte of 2-byte encoding of UTF8 */ +#define U3_1 0x200 /* 1st byte of 3-byte encoding of UTF8 */ +#define U4_1 0x400 /* 1st byte of 4-byte encoding of UTF8 */ +#define UCONT 0x800 /* Continuation of a 2, 3, or 4 byte UTF8 sequence */ +#define U2_1N (NA | U2_1) +#define U3_1N (NA | U3_1) +#define U4_1N (NA | U4_1) +#define UCONTN (NA | UCONT) + +static short type_utf8[ UCHARMAX + 1] = { + +/* Character type codes */ +/* 0, 1, 2, 3, 4, 5, 6, 7, */ +/* 8, 9, A, B, C, D, E, F, Hex */ + + 000, 000, 000, 000, 000, 000, 000, 000, /* 00 */ + 000, HSPA, SPA, SPA, SPA, SPA, 000, 000, /* 08 */ + 000, 000, 000, 000, 000, 000, 000, 000, /* 10 */ + /* 0x17-0x1A and 0x1F will be cleared in some modes by chk_opts() */ + 000, LET, LET, 000, 000, 000, 000, HSPA, /* 18 */ + HSPA, PUNC, QUO, PUNC, 000, PUNC, PUNC, QUO, /* 20 !"#$%&' */ + PUNC, PUNC, PUNC, PUNC, PUNC, PUNC, DOT, PUNC, /* 28 ()*+,-./ */ + DIG, DIG, DIG, DIG, DIG, DIG, DIG, DIG, /* 30 01234567 */ + DIG, DIG, PUNC, PUNC, PUNC, PUNC, PUNC, PUNC, /* 38 89:;<=>? */ + + 000, LET, LET, LET, LET, LET, LET, LET, /* 40 @ABCDEFG */ + LET, LET, LET, LET, LET, LET, LET, LET, /* 48 HIJKLMNO */ + LET, LET, LET, LET, LET, LET, LET, LET, /* 50 PQRSTUVW */ + LET, LET, LET, PUNC, 000, PUNC, PUNC, LET, /* 58 XYZ[\]^_ */ + 000, LET, LET, LET, LET, LET, LET, LET, /* 60 `abcdefg */ + LET, LET, LET, LET, LET, LET, LET, LET, /* 68 hijklmno */ + LET, LET, LET, LET, LET, LET, LET, LET, /* 70 pqrstuvw */ + LET, LET, LET, PUNC, PUNC, PUNC, PUNC, 000, /* 78 xyz{|}~ */ + + UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN, /* 80 .. 87 */ + UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN, /* 88 .. 8F */ + UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN, /* 90 .. 97 */ + UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN, /* 98 .. 9F */ + UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN, /* A0 .. A7 */ + UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN, /* A8 .. AF */ + UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN, /* B0 .. B7 */ + UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN,UCONTN, /* B8 .. BF */ + NA, NA, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, /* C0 .. C7 */ + U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, /* C8 .. CF */ + U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, /* D0 .. D7 */ + U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, U2_1N, /* D8 .. DF */ + U3_1N, U3_1N, U3_1N, U3_1N, U3_1N, U3_1N, U3_1N, U3_1N, /* E0 .. E7 */ + U3_1N, U3_1N, U3_1N, U3_1N, U3_1N, U3_1N, U3_1N, U3_1N, /* E8 .. EF */ + U4_1N, U4_1N, U4_1N, U4_1N, U4_1N, NA, NA, NA, /* F0 .. F7 */ + NA, NA, NA, NA, NA, NA, NA, NA, /* F8 .. FF */ +}; + +#define SETLOCALE 2 /* #pragma setlocale (not __setlocale) */ + +#define NUM_ENCODING 8 +#define NUM_ALIAS 6 + +/* Names of encoding recognized. Table for search_encoding(). */ +static const char * const encoding_name[ NUM_ENCODING][ NUM_ALIAS] = { + /* Visual C full, Visual C short + , 4 miscellaneous */ + { "english", "c" + , "c", "en", "latin", "iso8859"}, + { "", "" + , "eucjp", "euc", "ujis", ""}, + { "chinesesimplified", "chs" + , "gb2312", "cngb", "euccn", ""}, + { "korean", "kor" + , "ksc5601", "ksx1001", "wansung", "euckr"}, + { "japanese", "jpn" + , "sjis", "shiftjis", "mskanji", ""}, + { "chinesetraditional", "cht" + , "bigfive", "big5", "cnbig5", "euctw"}, + { "", "" + , "iso2022jp", "iso2022jp1", "jis", ""}, + { "", "" + , "utf8", "utf", "", ""}, +}; + +static int mbstart; +static int mb2; + +static size_t mb_read_2byte( int c1, char ** in_pp, char ** out_pp); + /* For 2-byte encodings of mbchar */ +static const char * search_encoding( char * norm, int alias); + /* Search encoding_name[][] table */ +static void strip_bar( char * string); + /* Remove '_', '-' or '.' in the string */ +static void conv_case( char * name, char * lim, int upper); + /* Convert to upper/lower case */ +static size_t mb_read_iso2022_jp( int c1, char ** in_pp, char ** out_pp); + /* For ISO2022_JP encoding */ +static size_t mb_read_utf8( int c1, char ** in_pp, char ** out_pp); + /* For UTF8 mbchar encoding */ + +#define NAMLEN 20 +#define UPPER 1 /* To upper */ +#define LOWER 0 /* To lower */ + + +const char * set_encoding( + char * name, /* Name of encoding specified */ + char * env, /* Name of environment variable */ + int pragma + /* 2: #pragma setlocale, 1: #pragma __setlocale, 0: not #pragma */ +) +/* + * Search the encoding specified and re-initialize mbchar settings. + */ +{ + const char * unknown_encoding + = "Unknown encoding: %s%.0ld%.0s"; /* _W1_ */ + const char * too_long + = "Too long encoding name: %s%.0ld%.0s"; /* _E_ */ + const char * loc = ""; + int alias; + char norm[ NAMLEN]; + /* + * Normalized name (removed 'xxxxx.', stripped '_', '-', '.' + * and lowered. + */ + + if (strlen( name) >= NAMLEN) { + if ((env || pragma) && (warn_level & 1)) { + cwarn( too_long, name, 0L, NULL); + } else { + mcpp_fprintf( ERR, too_long, name); + mcpp_fputc( '\n', ERR); + } + } + strcpy( norm, name); + if (norm[ 5] == '.') + memmove( norm, norm + 5, strlen( norm + 5) + 1); + /* Remove initial 'xxxxx.' as 'ja_JP.', 'en_US.' or any other */ + conv_case( norm, norm + strlen( norm), LOWER); + strip_bar( norm); + + if (strlen( name) == 0) { /* "" */ + mbchar = MBCHAR; /* Restore to the default encoding */ + } else if (memcmp( norm, "iso8859", 7) == 0 /* iso8859* */ + || memcmp( norm, "latin", 5) == 0 /* latin* */ + || memcmp( norm, "en", 2) == 0) { /* en* */ + mbchar = 0; /* No multi-byte character */ + } else { + alias = 2; +#if COMPILER == MSC + if (pragma == SETLOCALE) /* #pragma setlocale */ + alias = 0; +#endif + loc = search_encoding( norm, alias); /* Search the name */ + } + if (loc == NULL) { + if ((env || pragma) && (warn_level & 1)) { + cwarn( unknown_encoding, name, 0L, NULL); + } else { /* -m option */ + mcpp_fprintf( ERR, unknown_encoding, name); + mcpp_fputc( '\n', ERR); + } + } else { + mb_init(); /* Re-initialize */ + } + return loc; +} + +static const char * search_encoding( + char * norm, /* The name of encoding specified */ + int alias /* The number of alias to start searching */ +) +{ + const char * loc; + int lo, al; + + for (lo = 0; lo < NUM_ENCODING; lo++) { + for (al = alias ; al < NUM_ALIAS; al++) { + loc = encoding_name[ lo][ al]; + if (str_eq( loc, norm)) { + switch (lo) { + case 0 : mbchar = 0; break; + case 1 : mbchar = EUC_JP; break; + case 2 : mbchar = GB2312; break; + case 3 : mbchar = KSC5601; break; + case 4 : mbchar = SJIS; break; + case 5 : mbchar = BIGFIVE; break; + case 6 : mbchar = ISO2022_JP; break; + case 7 : mbchar = UTF8; break; + } + return loc; + } + } + } + return NULL; +} + +static void strip_bar( + char * string +) +/* + * Strip '_', '-' or '.' in the string. + */ +{ + char * cp = string; + + while (*cp != EOS) { + if (*cp == '_' || *cp == '-' || *cp == '.') + memmove( cp, cp + 1, strlen( cp)); + else + cp++; + } +} + +static void conv_case( + char * name, /* (diretory) Name */ + char * lim, /* End of (directory) name */ + int upper /* TRUE if to upper */ +) +/* Convert a string to upper-case letters or lower-case letters in-place */ +{ + int c; + char * sp; + + for (sp = name; sp < lim; sp++) { + c = *sp & UCHARMAX; +#if MBCHAR + if ((char_type[ c] & mbstart)) { + char tmp[ PATHMAX+1]; + char * tp = tmp; + *tp++ = *sp++; + mb_read( c, &sp, &tp); + } else +#endif + { + if (upper) + *sp = toupper( c); + else + *sp = tolower( c); + } + } +} + +void mb_init( void) +/* + * Initialize multi-byte character settings. + * First called prior to setting the 'mcpp_mode'. + * Will be called again each time the multibyte character encoding is changed. + */ +{ + /* + * Select the character classification table, select the multi-byte + * character reading routine and decide whether multi-byte character + * may contain the byte of value 0x5c. + */ + switch (mbchar) { + case 0 : + case EUC_JP : + case GB2312 : + case KSC5601 : + char_type = type_euc; + bsl_in_mbchar = FALSE; + mb_read = mb_read_2byte; + break; + case SJIS : + case BIGFIVE : + char_type = type_bsl; + bsl_in_mbchar = TRUE; + mb_read = mb_read_2byte; + break; + case ISO2022_JP : + char_type = type_iso2022_jp; + bsl_in_mbchar = TRUE; + mb_read = mb_read_iso2022_jp; + break; + case UTF8 : + char_type = type_utf8; + bsl_in_mbchar = FALSE; + mb_read = mb_read_utf8; + break; + } + + /* Set the bit patterns for character classification. */ + switch (mbchar) { + case 0 : + mbstart = 0; + break; + case EUC_JP : + mbstart = EJ1; + mb2 = EJ2; + break; + case GB2312 : + mbstart = GB1; + mb2 = GB2; + break; + case KSC5601: + mbstart = KS1; + mb2 = KS2; + break; + case SJIS : + mbstart = SJ1; + mb2 = SJ2; + break; + case BIGFIVE: + mbstart = BF1; + mb2 = BF2; + break; + case ISO2022_JP : + mbstart = IS1; + break; + case UTF8 : + mbstart = (U2_1 | U3_1 | U4_1); + break; + } + switch (mbchar) { + case 0 : + mbchk = 0; + break; + case EUC_JP : + case GB2312 : + case KSC5601: + case SJIS : + case BIGFIVE: + case UTF8 : + mbchk = NA; + break; + case ISO2022_JP : + mbchk = (IS1 | NA); + break; + } + + /* + * Set special handling for some encodings to supplement some compiler's + * deficiency. + */ + switch (mbchar) { + case SJIS : +#if ! SJIS_IS_ESCAPE_FREE + bsl_need_escape = TRUE; +#endif + break; + case BIGFIVE: +#if ! BIGFIVE_IS_ESCAPE_FREE + bsl_need_escape = TRUE; +#endif + break; + case ISO2022_JP : +#if ! ISO2022_JP_IS_ESCAPE_FREE + bsl_need_escape = TRUE; +#endif + break; + default : + bsl_need_escape = FALSE; + break; + } + + /* + * Modify magic characters in character type table. + * char_type[] table should be rewritten in accordance with the 'mcpp_mode' + * whenever the encoding is changed. + */ + if (mcpp_mode) { /* If mcpp_mode is already set */ + char_type[ DEF_MAGIC] = standard ? LET : 0; + char_type[ IN_SRC] = (mcpp_mode == STD) ? LET : 0; + char_type[ TOK_SEP] = (mcpp_mode == STD || mcpp_mode == OLD_PREP) + ? HSPA: 0; /* TOK_SEP equals to COM_SEP */ + } +} + +static size_t mb_read_2byte( + int c1, /* The 1st byte of mbchar sequence (already read) */ + char ** in_pp, /* Pointer to input */ + char ** out_pp /* Pointer to output */ +) +/* + * Multi-byte character reading routine for 2-byte encodings. + */ +{ + int error = FALSE; + size_t len = 0; /* Number of multi-byte characters read. */ + char * in_p = *in_pp; + char * out_p = *out_pp; + + if (! (char_type[ c1 & UCHARMAX] & mbstart)) + return MB_ERROR; /* Not a multi-byte character */ + + do { + if (! (char_type[ (*out_p++ = *in_p++) & UCHARMAX] & mb2)) { + error = TRUE; + break; + } + len++; + } while (char_type[ (*out_p++ = *in_p++) & UCHARMAX] & mbstart); + *in_pp = --in_p; + *(--out_p) = EOS; + *out_pp = out_p; + return error ? (len | MB_ERROR) : len; +} + +static size_t mb_read_iso2022_jp( + int c1, /* The 1st byte of the sequence already read (always 0x1b). */ + char ** in_pp, + char ** out_pp +) +/* + * Multi-byte character reading routine for ISO2022_JP. + */ +{ + int error = FALSE; + size_t len = 0; + char * in_p = *in_pp; + char * out_p = *out_pp; + int c2, c3, c4; + + if (! (char_type[ c1 & UCHARMAX] & mbstart)) + return MB_ERROR; + + do { + + *out_p++ = c2 = *in_p++; + if (! (char_type[ c2 & UCHARMAX] & IS2)) { + error = TRUE; + break; + } + *out_p++ = c3 = *in_p++; + if (! (char_type[ c3 & UCHARMAX] & IS3)) { + error = TRUE; + break; + } + + switch (c2) { + case 0x24 : + switch (c3) { + case 0x42 : /* 0x1b 0x24 0x42: JIS X 0208-1983 */ + break; + case 0x28 : + *out_p++ = c4 = *in_p++; + if (! (char_type[ c4 & UCHARMAX] & IS4)) + error = TRUE; + /* else: 0x1b 0x24 0x28 0x44: JIS X 0212 */ + break; + default : + error = TRUE; + } + break; + case 0x28 : + switch (c3) { + case 0x42 : /* 0x1b 0x28 0x42: ASCII */ + c1 = *out_p++ = *in_p++ & UCHARMAX; + continue; + default : + error = TRUE; + } + break; + } + if (error) + break; + + while (char_type[ c1 = *out_p++ = (*in_p++ & UCHARMAX)] & IJP) { + if (! (char_type[ *out_p++ = (*in_p++ & UCHARMAX)] & IJP)) { + error = TRUE; + break; + } + len++; /* String of multi-byte characters */ + } + if (error) + break; + + } while (char_type[ c1] & IS1); /* 0x1b: start of shift-sequence */ + + *in_pp = --in_p; + *(--out_p) = EOS; + *out_pp = out_p; + return error ? (len | MB_ERROR) : len; +} + +static size_t mb_read_utf8( + int c1, + char ** in_pp, + char ** out_pp +) +/* + * Multi-byte character reading routine for UTF8. + */ +{ + int error = FALSE; + size_t len = 0; + char * in_p = *in_pp; + char * out_p = *out_pp; + + if (! (char_type[ c1 & UCHARMAX] & mbstart)) + return MB_ERROR; + + do { + unsigned int codepoint; + int i, bytes; + + if ((char_type[ c1 & UCHARMAX] & U4_1) == U4_1) + bytes = 4; /* 4-byte character */ + else if ((char_type[ c1 & UCHARMAX] & U3_1) == U3_1) + bytes = 3; /* 3-byte character */ + else if ((char_type[ c1 & UCHARMAX] & U2_1) == U2_1) + bytes = 2; /* 2-byte character */ + + /* Must ensure that the sequence is not reserved as a surrogate */ + codepoint = ((2 << (6-bytes)) - 1) & c1; /* mask off top bits */ + + /* All bytes left in the sequence must be in 0x80 - 0xBF */ + for (i = bytes - 1; i && !error; i--) { + codepoint = (codepoint << 6) + ((*in_p) & 0x3fU); + if (! (char_type[ (*out_p++ = *in_p++) & UCHARMAX] & UCONT)) + error = TRUE; + } + + /* Check for overlong/underlong sequences */ + if ((bytes == 2 && (codepoint < 0x80 || codepoint > 0x7FF)) + || (bytes == 3 && (codepoint < 0x800 || codepoint > 0xFFFF)) + || (bytes == 4 && (codepoint < 0x10000 || codepoint > 0x10FFFF))) + error = TRUE; + if ((codepoint >= 0xD800 && codepoint <= 0xDFFF) + /* Check for reserved surrogate codepoints */ + || (codepoint >= 0xFFFE && codepoint <= 0xFFFF)) + /* Illegal */ + error = TRUE; +#if 0 + printf( "codepoint:0x%x\n", codepoint); +#endif + if (error) + break; + len++; + } while (char_type[ (*out_p++ = c1 = *in_p++) & UCHARMAX] & mbstart); + /* Start of the next multi-byte character */ + *in_pp = --in_p; + *(--out_p) = EOS; + *out_pp = out_p; + return error ? (len | MB_ERROR) : len; +} + +uexpr_t mb_eval( + char ** seq_pp +) +/* + * Evaluate the value of a multi-byte character. + * This routine does not check the legality of the sequence. + * This routine is called from eval_char(). + * This routine is never called in POST_STD mode. + */ +{ + char * seq = *seq_pp; + uexpr_t val = 0; + int c, c1; + + if (! (char_type[ c = *seq++ & UCHARMAX] & mbstart)) { + *seq_pp = seq; + return c; /* Not a multi-byte character */ + } + + switch (mbchar) { + case EUC_JP : + case GB2312 : + case KSC5601: + case SJIS : + case BIGFIVE: + val = (c << 8) + (*seq++ & UCHARMAX); + /* Evaluate the 2-byte sequence */ + break; + case ISO2022_JP : + if (char_type[ c & UCHARMAX] & IS1) { /* Skip shift-sequence */ + if (char_type[ c = *seq++ & UCHARMAX] & IS2) { + if (char_type[ c1 = *seq++ & UCHARMAX] & IS3) { + if (c1 == 0x28) + seq++; + if (c == 0x28 && c1 == 0x42) { /* Shift-out sequence */ + val = 0; + break; + } + c = *seq++ & UCHARMAX; + } + } + } + val = (c << 8) + (*seq++ & UCHARMAX); /* Evaluate the 2-bytes */ + break; + case UTF8 : /* Evaluate the sequence of 2, 3 or 4 bytes as it is */ + val = (c << 8) + (*seq++ & UCHARMAX); + if (char_type[ c & UCHARMAX] & U3_1) { + val = (val << 8) + (*seq++ & UCHARMAX); + } else if (char_type[ c & UCHARMAX] & U4_1) { + val = (val << 8) + (*seq++ & UCHARMAX); + val = (val << 8) + (*seq++ & UCHARMAX); + } + break; + } + + *seq_pp = seq; + return val; +} + +int last_is_mbchar( + const char * in, /* Input physical line */ + int len /* Length of the line minus 2 */ +) +/* + * Return 2, if the last char of the line is second byte of SJIS or BIGFIVE, + * else return 0. + */ +{ + const char * cp = in + len; + const char * const endp = in + len; /* -> the char befor '\n' */ + + if ((mbchar & (SJIS | BIGFIVE)) == 0) + return 0; + while (in <= --cp) { /* Search backwardly */ + if ((char_type[ *cp & UCHARMAX] & mbstart) == 0) + break; /* Not the first byte of MBCHAR */ + } + if ((endp - cp) & 1) + return 0; + else + return 2; +} + diff --git a/libraries/mcpp/src/mcpp_lib.def b/libraries/mcpp/src/mcpp_lib.def new file mode 100644 index 000000000..c95f44044 --- /dev/null +++ b/libraries/mcpp/src/mcpp_lib.def @@ -0,0 +1,7 @@ +LIBRARY mcpp0 +EXPORTS + mcpp_lib_main + mcpp_reset_def_out_func + mcpp_set_out_func + mcpp_use_mem_buffers + mcpp_get_mem_buffer diff --git a/libraries/mcpp/src/mcpp_lib.h b/libraries/mcpp/src/mcpp_lib.h new file mode 100644 index 000000000..4827f0aaf --- /dev/null +++ b/libraries/mcpp/src/mcpp_lib.h @@ -0,0 +1,31 @@ +/* mcpp_lib.h: declarations of libmcpp exported (visible) functions */ +#ifndef _MCPP_LIB_H +#define _MCPP_LIB_H + +#ifndef _MCPP_OUT_H +#include "mcpp_out.h" /* declaration of OUTDEST */ +#endif + +#if _WIN32 || _WIN64 || __CYGWIN__ || __CYGWIN64__ || __MINGW32__ \ + || __MINGW64__ +#if DLL_EXPORT || (__CYGWIN__ && PIC) +#define DLL_DECL __declspec( dllexport) +#elif DLL_IMPORT +#define DLL_DECL __declspec( dllimport) +#else +#define DLL_DECL +#endif +#else +#define DLL_DECL +#endif + +extern DLL_DECL int mcpp_lib_main( int argc, char ** argv); +extern DLL_DECL void mcpp_reset_def_out_func( void); +extern DLL_DECL void mcpp_set_out_func( + int (* func_fputc) ( int c, OUTDEST od), + int (* func_fputs) ( const char * s, OUTDEST od), + int (* func_fprintf)( OUTDEST od, const char * format, ...) + ); +extern DLL_DECL void mcpp_use_mem_buffers( int tf); +extern DLL_DECL char * mcpp_get_mem_buffer( OUTDEST od); +#endif /* _MCPP_LIB_H */ diff --git a/libraries/mcpp/src/mcpp_out.h b/libraries/mcpp/src/mcpp_out.h new file mode 100644 index 000000000..02ba2aae1 --- /dev/null +++ b/libraries/mcpp/src/mcpp_out.h @@ -0,0 +1,13 @@ +/* mcpp_out.h: declarations of OUTDEST data types for MCPP */ +#ifndef _MCPP_OUT_H +#define _MCPP_OUT_H + +/* Choices for output destination */ +typedef enum { + OUT, /* ~= fp_out */ + ERR, /* ~= fp_err */ + DBG, /* ~= fp_debug */ + NUM_OUTDEST +} OUTDEST; + +#endif /* _MCPP_OUT_H */ diff --git a/libraries/mcpp/src/noconfig.H b/libraries/mcpp/src/noconfig.H new file mode 100644 index 000000000..6b634fe0b --- /dev/null +++ b/libraries/mcpp/src/noconfig.H @@ -0,0 +1,608 @@ +/* + * noconfig.H + * Configurations for MCPP not using config.h. + * + * WARNING: These are default settings. To configure for your system, you + * must edit this file here and there. + */ + +#define TRUE 1 +#define FALSE 0 + +/* + * 'Target' means the O.S. and the compiler to which cpp is implemented. + * 'Host' means the O.S. and the compiler with which cpp is compiled. + */ + +/* Define target operating-system. */ +#define SYSTEM SYS_FREEBSD + +/* Define target compiler. */ +#ifndef COMPILER +#define COMPILER INDEPENDENT /* compiler-independent-build */ +#endif + +/* Define host operating-system. */ +#define HOST_SYSTEM SYSTEM + +/* Define host compiler. */ +#define HOST_COMPILER GNUC + +/* Version message. */ +/* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */ +#define VERSION_MSG "GCC 3.4" +#if 0 + "LCC-Win32 2006-03" + "Visual C 2005" + "Visual C 2008" + "BCC V.5.5" +#endif + +/* + * P A R T 1 Configurations for target-operating-system + * and target-compiler. + */ + +/* + * Names of the SYSTEM (i.e. target operating system). This is needed so that + * cpp can use appropriate filename conventions. + */ +#define SYS_UNKNOWN 0 +#define SYS_UNIX 0x1000 +#define SYS_LINUX 0x1800 /* (SYS_LINUX & 0xF000) == SYS_UNIX */ +#define SYS_FREEBSD 0x1A00 /* (SYS_FREEBSD & 0xF000) == SYS_UNIX */ +#define SYS_CYGWIN 0x1C00 /* (SYS_CYGWIN & 0xF000) == SYS_UNIX */ +#define SYS_MAC 0x1E00 /* (SYS_MAC & 0xF000) == SYS_UNIX */ +#define SYS_WIN 0x7000 +#define SYS_WIN32 0x7400 /* (SYS_WIN32 & 0xF000) == SYS_WIN */ +#define SYS_WIN64 0x7800 /* (SYS_WIN64 & 0xF000) == SYS_WIN */ +#define SYS_MINGW 0x7C00 /* (SYS_MINGW & 0xF000) == SYS_WIN */ + +/* COMPILER */ +#define COMPILER_UNKNOWN 0 +#define MSC 0x7400 /* Microsoft C, Visual C++ */ +#define BORLANDC 0x7440 /* Borland C */ +#define LCC 0x74C0 /* LCC-Win32 */ +#define GNUC 0x00E0 /* GNU C (GCC) */ +#define INDEPENDENT 0xFFFF /* No target, compiler-independent build*/ + +#define SYS_FAMILY (SYSTEM & 0xF000) +#define COMPILER_FAMILY (COMPILER & 0xF0) +#define HOST_SYS_FAMILY (HOST_SYSTEM & 0xF000) + +/* Default MBCHAR (multi-byte character) encoding. */ +#define EUC_JP 0x10 /* Extended UNIX code of JIS X 0208 */ +#define GB2312 0x20 /* EUC-like encoding of Chinese GB 2312-80 */ +#define KSC5601 0x30 /* EUC-like encoding of Korean KS C 5601 */ +#define SJIS 0x80 /* Shift-JIS encoding of JIS X 0208 */ +#define BIGFIVE 0x90 /* Encoding of Taiwanese Big Five */ +#define ISO2022_JP 0x100 /* ISO-2022-JP (ISO-2022-JP1) encoding */ +#define UTF8 0x1000 /* UTF-8 encoding */ + +/* + * MBCHAR means multi-byte character encoding. + * MBCHAR means the default encoding, and you can change the encoding by + * #pragma MCPP setlocale, -e option or environment variable + * LC_ALL, LC_CTYPE, LANG. + * MBCHAR == 0 means not to recognize any multi-byte character encoding. + */ + +/* + * In order to predefine target-system-dependent macros, + * several macros are defined here: + * *_OLD define the macro beginning with an alphabetic letter, + * *_STD, *_STD?, *_EXT, *_EXT2 define the macro beginning with an '_'. + * *_STD1 define the macro beginning with '__' and ending with an alphanumeric + * letter. + * *_STD2 define the macro beginning with '__' and ending with '__'. + * These may not be defined, if they are not needed. + * They should not be #defined to no token or to "". + * + * SYSTEM_OLD, SYSTEM_STD1, SYSTEM_STD2, SYSTEM_EXT, SYSTEM_EXT2 + * define the target operating system (by name). + * SYSTEM_SP_OLD, SYSTEM_SP_STD define the target-OS specific macro name + * COMPILER_OLD, COMPILER_STD1, COMPILER_STD2, COMPILER_EXT, COMPILER_EXT2 + * , COMPILER_SP_OLD, COMPILER_SP_STD + * define the target compiler (by name). + * COMPILER_CPLUS defines the target C++ compiler. + * COMPILER_SP1, COMPILER_SP2, COMPILER_SP3 + * define the compiler-specific macros. + * + * _VAL specify the value of the . + * If not specified, these values default to "1". + * To define the value of no-token, specify as "" rather than no-token. + * SYSTEM_OLD, SYSTEM_STD?, COMPILER_OLD have the value of "1". + */ + +/* + * target-compiler-dependent definitions: + * + * LINE_PREFIX defines the output line prefix, if not "#line 123". + * This should be defined as "# " to represent "# 123" format + * ("#line " represents "#line 123" format). + * + * C_INCLUDE_DIR1, C_INCLUDE_DIR2 may be defined if you have a compiler- + * specific include directory which is to be searched *before* + * the operating-system specific directories (e.g. /usr/include). + * CPLUS_INCLUDE_DIR1, CPLUS_INCLUDE_DIR2, CPLUS_INCLUDE_DIR3 + * , CPLUS_INCLUDE_DIR4 are for C++ include directory which exist + * other than C include directory. + * ENV_C_INCLUDE_DIR may be defined to the name of environment-variable for + * C include directory. + * ENV_CPLUS_INCLUDE_DIR is name of environment-variable for C++ include + * directory which exists other than ENV_C_INCLUDE_DIR. + * ENV_SEP is the separator (other than space) of include-paths in an + * environment-variable. e.g. the ':' in + * "/usr/abc/include:/usr/xyz/include" + * + * EMFILE should be defined to the macro to represent errno of 'too many + * open files' if the macro is different from EMFILE. + * + * ONE_PASS should be set TRUE, if COMPILER is "one pass compiler". + * + * FNAME_FOLD means that target-system folds upper and lower cases of + * directory and file-name. + * + * SEARCH_INIT specifies the default value of 'search_rule' (in system.c). + * 'search_rule' holds searching rule of #include "header.h" to + * search first before searching user specified or system- + * specific include directories. + * CURRENT means to search the directory relative to "current + * directory" which is current at cpp invocation. + * SOURCE means to search the directory relative to that of the + * source file (i.e. "includer"). + * (CURRENT & SOURCE) means to search current directory first + * source directory next. + * 'search_rule' is initialized to SEARCH_INIT. + */ +#define CURRENT 1 +#define SOURCE 2 + +#if SYS_FAMILY == SYS_UNIX +#define SYSTEM_OLD "unix" +#define SYSTEM_STD1 "__unix" +#define SYSTEM_STD2 "__unix__" + +#if SYSTEM == SYS_FREEBSD +#define SYSTEM_EXT "__FreeBSD__" +#define SYSTEM_EXT_VAL "6" /* V.5.*: 5, V.6.*:6 */ +#endif + +#if SYSTEM == SYS_LINUX +#define SYSTEM_EXT "__linux__" +#endif + +#if SYSTEM == SYS_MAC /* Mac OS X */ +#define SYSTEM_EXT "__APPLE__" +#define FNAME_FOLD TRUE /* Case-insensitive file-system */ +#define FRAMEWORK1 "/System/Library/Frameworks" +#define FRAMEWORK2 "/Library/Frameworks" +#endif /* SYSTEM == SYS_MAC */ + +#if SYSTEM == SYS_CYGWIN +#define SYSTEM_EXT "__CYGWIN__" +#define SYSTEM_EXT2 "__CYGWIN32__" +#define MBCHAR SJIS +#define FNAME_FOLD TRUE +#define CYGWIN_ROOT_DIRECTORY "c:/pub/compilers/cygwin" +#endif /* SYSTEM == SYS_CYGWIN */ + +#ifndef MBCHAR +#define MBCHAR EUC_JP /* UTF8 if you like */ +#endif +#ifndef FNAME_FOLD +#define FNAME_FOLD FALSE +#endif + +#endif /* SYS_FAMILY == SYS_UNIX */ + +#if SYS_FAMILY == SYS_WIN + +#define SYSTEM_SP_STD "__FLAT__" +#define SYSTEM_SP_STD_VAL "1" + +#ifndef MBCHAR +#define MBCHAR SJIS /* Multi-byte char is encoded in SJIS */ +#endif + +#if COMPILER == MSC +#define CMP_NAME "Visual C++" +#if _MSC_VER >= 1200 /* Visual C++ V.6.0 or later */ + /* When HOST == TARGET */ +#define ONE_PASS TRUE +#endif +#define COMPILER_EXT "_MSC_VER" +#define COMPILER_EXT_VAL "1500" /* VC 6.0: "1200" */ + /* VC 2002: "1300", VC 2003: "1310", VC 2005: "1400", VC 2008: "1500" */ +#define COMPILER_EXT2 "_MSC_FULL_VER" +#define COMPILER_EXT2_VAL "150021022" /* VC 6.0: "12008804" */ + /* VC 2002: "13009466", VC 2003: "13103077", VC 2005: "140050320" */ + /* VC 2008: "150021022" */ +#define COMPILER_SP1 "_MSC_EXTENSIONS" +#define COMPILER_SP1_VAL "1" +#define COMPILER_SP2 "_INTEGRAL_MAX_BITS" +#define COMPILER_SP2_VAL "64" /* VC 2003, VC2005, VC2008: 64 */ +#define TARGET_HAVE_LONG_LONG TRUE + /* __int64 instead of long long (VC 2.0 through 8.0) */ +#define EXPAND_PRAGMA TRUE +#define HAVE_DIGRAPHS TRUE +#define BIGFIVE_IS_ESCAPE_FREE TRUE +#define SEARCH_INIT SOURCE + +#elif COMPILER == BORLANDC /* Borland C 5.* and C++Builder */ +#define CMP_NAME "Borland C" +#define ONE_PASS TRUE +#define COMPILER_STD2 "__TURBOC__" +#if __BORLANDC__ /* Borland C */ +#define COMPILER_STD2_VAL "0x0550" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ +#define COMPILER_EXT "__BORLANDC__" +#define COMPILER_EXT_VAL "0x0550" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ +#define COMPILER_CPLUS "__BCPLUSPLUS__" +#define COMPILER_CPLUS_VAL "0x0550" + /* BC 5.5: "0x0550", BC 5.9: "0x5930" */ +#define EXPAND_PRAGMA TRUE +#define SEARCH_INIT (CURRENT & SOURCE) +#define TARGET_HAVE_LONG_LONG TRUE /* __int64 instead of long long */ +#endif /* __BORLANDC__ */ + +#elif COMPILER == LCC +#define CMP_NAME "LCC-Win32" +#define COMPILER_STD2 "__LCC__" +#define COMPILER_SP1 "__LCCDEBUGLEVEL" +#define COMPILER_SP1_VAL "0" +#define COMPILER_SP2 "__LCCOPTIMLEVEL" +#define COMPILER_SP2_VAL "0" +#define ONE_PASS TRUE +#define TARGET_HAVE_LONG_LONG TRUE +#define SJIS_IS_ESCAPE_FREE FALSE + +#endif + +#if SYSTEM == SYS_MINGW +#define SYSTEM_EXT "__MINGW__" +#define SYSTEM_EXT2 "__MINGW32__" +#define MSYS_ROOT_DIRECTORY "c:/pub/compilers/msys/1.0" +#define MINGW_DIRECTORY "c:/pub/compilers/mingw" +#if COMPILER == GNUC +#define SJIS_IS_ESCAPE_FREE FALSE +#define INC_DIR C_INCLUDE_DIR2 +#endif +#endif /* SYSTEM == SYS_MINGW */ + +#ifndef SJIS_IS_ESCAPE_FREE +#define SJIS_IS_ESCAPE_FREE TRUE /* or FALSE following your compiler */ +#endif + +#endif /* SYS_FAMILY == SYS_WIN */ + +#if COMPILER_FAMILY == GNUC +#define CMP_NAME "GCC" +#define COMPILER_EXT "__GNUC__" +#define COMPILER_EXT_VAL "3" /* "3" for V.3.* "4" for V.4.* */ +#define COMPILER_EXT2 "__GNUC_MINOR__" +#define COMPILER_EXT2_VAL "4" /* "4" for V.3.4, "1" for V.4.1 */ +#define COMPILER_CPLUS "__GNUG__" +#define COMPILER_CPLUS_VAL "3" /* "3" for V.3.*, "4" for V.4.* */ +#define GCC_MAJOR_VERSION 3 /* Value of __GNUC__ as a digit */ +#define LINE_PREFIX "# " +#ifndef HAVE_DIGRAPHS +#define HAVE_DIGRAPHS TRUE +#endif +#ifndef TARGET_HAVE_LONG_LONG +#define TARGET_HAVE_LONG_LONG TRUE +#endif +#define STDC_VERSION 0L /* 199409L for V.2.9, 0L for V.3.*,V.4.* */ +#define CPLUS_INCLUDE_DIR1 "/usr/include/c++/3.4" /* "/usr/include/c++/3.3.6" */ /* "/usr/include/c++/4.1.2" */ +#define CPLUS_INCLUDE_DIR2 "/usr/include/c++/3.4/backward" /* "/usr/include/c++/3.3.6/i386-vine-linux" */ /* "/usr/include/c++/4.1.2/i486-linux-gnu" */ +/* #define CPLUS_INCLUDE_DIR3 */ /* "/usr/include/c++/3.3.6/backward" */ /* "/usr/include/c++/4.1.2/backward" */ +/* #define C_INCLUDE_DIR1 */ /* "/usr/lib/gcc-lib/i386-vine-linux/3.3.6/include" */ /* "/usr/lib/gcc/i486-linux-gnu/4.1.2/include" */ +/* #define C_INCLUDE_DIR2 */ +#ifndef INC_DIR +#ifdef C_INCLUDE_DIR1 +#define INC_DIR C_INCLUDE_DIR1 /* GNUC version specific dir */ +#else +#define INC_DIR "/usr/local/include" /* "/usr/include" */ +#endif +#endif +#ifndef ENV_C_INCLUDE_DIR +#define ENV_C_INCLUDE_DIR "C_INCLUDE_PATH" +#define ENV_CPLUS_INCLUDE_DIR "CPLUS_INCLUDE_PATH" +#endif +#define SEARCH_INIT SOURCE /* Include directory relative to source */ +/* + * __SIZE_TYPE__, __PTRDIFF_TYPE__ and __WCHAR_TYPE__ are predefines of GCC. + */ +#if GCC_MAJOR_VERSION < 3 +#define COMPILER_SP1 "__SIZE_TYPE__" +#define COMPILER_SP2 "__PTRDIFF_TYPE__" +#define COMPILER_SP3 "__WCHAR_TYPE__" +#define COMPILER_SP1_VAL "unsigned int" +#define COMPILER_SP2_VAL "int" +#define COMPILER_SP3_VAL "int" + /* SYS_FREEBSD: "int", SYS_CYGWIN, SYS_MINGW: "short unsigned int" + , others: "long int" */ +#endif /* GCC_MAJOR_VERSION < 3 */ +/* On GCC V.3.*, V.4.*, these macros are known by mcpp_g*_predef_*.h files. */ +#endif /* COMPILER_FAMILY == GNUC */ + +#if COMPILER == INDEPENDENT +/* specifications of compiler-independent build */ +#define LINE_PREFIX "#line " +#define STD_LINE_PREFIX TRUE /* Output #line by C source format */ +#define HAVE_DIGRAPHS TRUE /* Output digraphs as it is */ +#define SEARCH_INIT SOURCE /* Include directory relative to source */ +#define SJIS_IS_ESCAPE_FREE TRUE /* Do not treat SJIS specially */ +#define BIGFIVE_IS_ESCAPE_FREE TRUE /* Do not treat specially */ +#define ISO2022_JP_IS_ESCAPE_FREE TRUE /* Do not treat specially */ +#define TARGET_HAVE_LONG_LONG TRUE /* dummy */ +#define STDC_VERSION 199409L /* Initial value of __STDC_VERSION__ */ +#endif + +/* + * Each OS has some different target architectures. The followings define + * the target CPU. + * MCPP defines some predefined macros based on the CPU macro, and possibly + * redefine them on an execution time by some options. + */ +#if defined (__x86_64__) || defined (__amd64__) || defined (_M_AMD64) \ + || defined (_AMD64_) || defined (_X64_) +#define CPU "x86_64" +#elif defined (__ppc64__) || defined (__powerpc64__) +#define CPU "ppc64" +#elif defined (__ppc__) || defined (__powerpc__) +#define CPU "ppc" +#else /* Defaults to i386 */ +#define CPU "i386" +#endif + +/* + * defaults + */ + +#ifdef SYSTEM_EXT +#ifndef SYSTEM_EXT_VAL +#define SYSTEM_EXT_VAL "1" +#endif +#endif +#ifdef SYSTEM_EXT2 +#ifndef SYSTEM_EXT2_VAL +#define SYSTEM_EXT2_VAL "1" +#endif +#endif +#ifdef COMPILER_STD1 +#ifndef COMPILER_STD1_VAL +#define COMPILER_STD1_VAL "1" +#endif +#endif +#ifdef COMPILER_STD2 +#ifndef COMPILER_STD2_VAL +#define COMPILER_STD2_VAL "1" +#endif +#endif +#ifdef COMPILER_EXT +#ifndef COMPILER_EXT_VAL +#define COMPILER_EXT_VAL "1" +#endif +#endif +#ifdef COMPILER_EXT2 +#ifndef COMPILER_EXT2_VAL +#define COMPILER_EXT2_VAL "1" +#endif +#endif +#ifdef COMPILER_CPLUS +#ifndef COMPILER_CPLUS_VAL +#define COMPILER_CPLUS_VAL "1" +#endif +#endif + +#ifndef LINE_PREFIX +#define LINE_PREFIX "#line " +#define STD_LINE_PREFIX TRUE /* C source format */ +#else +#ifndef STD_LINE_PREFIX +#define STD_LINE_PREFIX FALSE /* Compiler-dependent format */ +#endif +#endif + +#ifndef HAVE_DIGRAPHS +#define HAVE_DIGRAPHS FALSE +#endif + +#ifndef ENV_C_INCLUDE_DIR +#define ENV_C_INCLUDE_DIR "INCLUDE" +#endif +#ifndef ENV_CPLUS_INCLUDE_DIR +#define ENV_CPLUS_INCLUDE_DIR "CPLUS_INCLUDE" +#endif + +#ifndef ENV_SEP +#if SYS_FAMILY == SYS_WIN +#define ENV_SEP ';' +#else +#define ENV_SEP ':' +#endif +#endif + +#ifndef ONE_PASS +#define ONE_PASS FALSE +#endif + +#ifndef FNAME_FOLD +#define FNAME_FOLD TRUE +#endif + +#ifndef SEARCH_INIT +#define SEARCH_INIT CURRENT +#endif + +/* + * CHARBIT, UCHARMAX are respectively CHAR_BIT, UCHAR_MAX of target compiler. + * CHARBIT should be defined to the number of bits per character. + * It is needed only for processing of multi-byte character constants. + * UCHARMAX should be defined to the maximum value of type unsigned char + * or maximum value of unsigned int which is converted from type (signed) + * char. + * + * LONGMAX should be defined to the LONG_MAX in . + * ULONGMAX should be defined to the ULONG_MAX in or LONG_MAX + * for the compiler which does not have unsigned long. + */ + +#ifndef CHARBIT +#define CHARBIT 8 +#endif +#ifndef UCHARMAX +#define UCHARMAX 0xFF +#endif +#ifndef LONGMAX +#define LONGMAX 0x7FFFFFFFL +#endif +#ifndef ULONGMAX +#define ULONGMAX 0xFFFFFFFFUL +#endif + +/* + * Define MBCHAR (multi-byte character encoding) to SJIS, EUC_JP or other. + */ +#ifndef MBCHAR +#define MBCHAR 0 +#endif + +/* + * SJIS_IS_ESCAPE_FREE means the compiler does not escape '0x5c' ('\\') in + * shift-JIS encoded multi-byte character. SJIS_IS_ESCAPE_FREE == FALSE + * enables cpp to insert * '\\' before '\\' of the 2nd byte of SJIS code in + * literal. This insertion is for the compiler-proper which can't recognize + * SJIS literal. + * BIGFIVE_IS_ESCAPE_FREE means similar case on BIGFIVE encoding. + * ISO2022_JP_IS_ESCAPE_FREE means similar case on ISO2022_JP encoding. + */ +#ifndef SJIS_IS_ESCAPE_FREE +#define SJIS_IS_ESCAPE_FREE FALSE /* or TRUE following your compiler */ +#endif +#ifndef BIGFIVE_IS_ESCAPE_FREE +#define BIGFIVE_IS_ESCAPE_FREE FALSE /* or TRUE following your compiler */ +#endif +#ifndef ISO2022_JP_IS_ESCAPE_FREE +#define ISO2022_JP_IS_ESCAPE_FREE FALSE /* or TRUE following compiler */ +#endif + +/* + * P A R T 2 Configurations for host-compiler. + * + * WARNING: In case of HOST_COMPILER differs from COMPILER, you must + * edit here and there of this part. + */ +#if HOST_COMPILER == GNUC +#if __GNUC__ >= 3 +#define HAVE_INTMAX_T TRUE +#define HAVE_INTTYPES_H TRUE +#define HAVE_STDINT_H TRUE +#endif +#define HOST_HAVE_LONG_LONG TRUE +#if HOST_SYSTEM == SYS_LINUX +#define HOST_HAVE_STPCPY TRUE +#endif +#if HOST_SYSTEM == SYS_MAC +#define HOST_HAVE_STPCPY TRUE +#endif + +#elif HOST_COMPILER == LCC +#define HOST_HAVE_LONG_LONG TRUE + +#elif HOST_COMPILER == MSC +#define HOST_HAVE_LONG_LONG TRUE + +#elif HOST_COMPILER == BORLANDC +#if __BORLANDC__ >= 0x550 +#define HOST_HAVE_LONG_LONG TRUE +#endif +#define HOST_HAVE_STPCPY TRUE +#if __STDC__ +#define stpcpy( dest, src) __stpcpy__( dest, src) +#endif +#endif + +#ifndef HAVE_INTMAX_T +#define HAVE_INTMAX_T FALSE +#endif + +/* The host compiler has the type long long int ? */ +#ifndef HOST_HAVE_LONG_LONG +#define HOST_HAVE_LONG_LONG FALSE +#endif + +/* + * This definitions should be set TRUE, if *both* of the target + * and the host compilers have long long type. + */ +#if TARGET_HAVE_LONG_LONG && HOST_HAVE_LONG_LONG +#define HAVE_LONG_LONG TRUE +#endif + +/* + * Define the format specifier of intmax_t or long long for + * fprintf( fp_debug,). + * Both of target COMPILER and HOST_COMPILER should have long long. + */ +#if HAVE_LONG_LONG +#if HOST_COMPILER == BORLANDC \ + || (HOST_COMPILER == MSC && _MSC_VER < 1400) \ + || HOST_SYSTEM == SYS_MINGW +#define LL_FORM "I64" /* Format specifier for __int64 */ +#endif +#ifndef LL_FORM +#define LL_FORM "ll" /* C99: for long long, "j" for intmax_t */ +#endif +#endif + +#ifndef HOST_HAVE_STPCPY +#define HOST_HAVE_STPCPY FALSE +#endif + +/* + * Declaration of standard library functions and macros. + */ + +/* stdin, stdout, stderr, FILE, NULL, fgets(), fputs() and other functions. */ +#include "stdio.h" + +/* PATHMAX is the maximum length of path-list on the host system. */ +/* _POSIX_* only to get PATH_MAX */ +#define _POSIX_ 1 +#define _POSIX_SOURCE 1 +#ifndef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 1 +#define _POSIX_C_SOURCE_defined 1 +#endif +#include "limits.h" +#undef _POSIX_ +#undef _POSIX_SOURCE +#ifdef _POSIX_C_SOURCE_defined +#undef _POSIX_C_SOURCE +#undef _POSIX_C_SOURCE_defined +#endif +#ifdef PATH_MAX +#define PATHMAX PATH_MAX /* Posix macro */ +#else +#define PATHMAX FILENAME_MAX +#endif + +/* islower(), isupper(), toupper(), isdigit(), isxdigit(), iscntrl() */ +#include "ctype.h" + +/* errno */ +#include "errno.h" + +#include "string.h" +#include "stdlib.h" +#include "time.h" +#include "setjmp.h" + +/* For debugging malloc systems by kmatsui */ +#if KMMALLOC && _MEM_DEBUG +#include "xalloc.h" +#endif + diff --git a/libraries/mcpp/src/preproc.c b/libraries/mcpp/src/preproc.c new file mode 100644 index 000000000..33d66f5aa --- /dev/null +++ b/libraries/mcpp/src/preproc.c @@ -0,0 +1,9 @@ +/* preproc.c: to "pre-preprocess" header files. */ + +#pragma MCPP preprocess + +#include "system.H" +#include "internal.H" + +#pragma MCPP put_defines + diff --git a/libraries/mcpp/src/set_mcpp.sh b/libraries/mcpp/src/set_mcpp.sh new file mode 100644 index 000000000..ded692337 --- /dev/null +++ b/libraries/mcpp/src/set_mcpp.sh @@ -0,0 +1,291 @@ +#!/bin/sh +# script to set MCPP to be called from gcc +# ./set_mcpp.sh $gcc_path $gcc_maj_ver $gcc_min_ver $cpp_call $CC +# $CXX x$CPPFLAGS x$EXEEXT $LN_S $inc_dir $host_system $cpu $target_cc + +gcc_maj_ver=$2 +gcc_min_ver=$3 +cpp_call=$4 +CC=$5 +CXX=$6 +CPPFLAGS=`echo $7 | sed 's/^x//'` +LN_S=$9 +inc_dir=${10} +host_system=${11} +cpu=${12} +if test $host_system = SYS_MAC; then + target_cc=${13} + target=`echo $target_cc | sed 's/-gcc.*$//'` +fi +cpp_name=`echo $cpp_call | sed 's,.*/,,'` +cpp_path=`echo $cpp_call | sed "s,/$cpp_name,,"` +gcc_path=`echo $1 | sed "s,/${CC}\$,,"` + +# remove ".exe" or such +EXEEXT=`echo $8 | sed 's/^x//'` +if test x$EXEEXT != x; then + cpp_base=`echo $cpp_name | sed "s/${EXEEXT}//"` +else + cpp_base=$cpp_name +fi + +if test $host_system = SYS_MINGW && test ! -f cc1$EXEEXT; then + ## cc1.exe has not yet compiled + echo " first do 'make COMPILER=GNUC mcpp cc1'; then do 'make COMPILER=GNUC install'" + exit 1 +fi +if test x$cpp_base = xcc1; then + # for GCC V.3.3 and later + no_m64=0 +else + no_m64=1 +fi + +gen_headers() { + echo " mkdir -p $hdir" + mkdir -p $hdir + if test ! -f $hdir/gcc$gcc_maj_ver${gcc_min_ver}_predef_std.h; then + echo " generating g*.h header files" + $CC $CPPFLAGS -E -xc $arg -dM /dev/null | sort | \ + grep ' *#define *_' \ + > $hdir/gcc$gcc_maj_ver${gcc_min_ver}_predef_std.h + $CC $CPPFLAGS -E -xc $arg -dM /dev/null | sort | \ + grep -E ' *#define *[A-Za-z]+' \ + > $hdir/gcc$gcc_maj_ver${gcc_min_ver}_predef_old.h + $CXX $CPPFLAGS -E -xc++ $arg -dM /dev/null | sort | \ + grep ' *#define *_' \ + > $hdir/gxx$gcc_maj_ver${gcc_min_ver}_predef_std.h + $CXX $CPPFLAGS -E -xc++ $arg -dM /dev/null | sort | \ + grep -E ' *#define *[A-Za-z]+' \ + > $hdir/gxx$gcc_maj_ver${gcc_min_ver}_predef_old.h + fi +} + +cwd=`pwd` +echo " cd $inc_dir" +cd $inc_dir + +if test $cpu = i386 || test $cpu = x86_64; then + cpu32=i386 + cpu64=x86_64 +else + if test $cpu = ppc || $cpu = ppc64; then + cpu32=ppc + cpu64=ppc64 + fi +fi + +arch_headers() { + for arch in $cpu32 $cpu64 + do ## generate headers for 2 architectures + hdir=${idir}-$arch + if test $host_system = SYS_MAC; then + arg="-arch $arch" + else + if test $arch = $cpu; then + arg="$ar" + else + if test $host_system = SYS_MINGW || test $no_m64; then + continue; + fi + if test $cpu = $cpu64; then + arg="$ar -m32" + else + arg="$ar -m64" + fi + # Test if the architecture is supported. + $CC -E -xc $arg /dev/null > /dev/null + if test $? != 0; then + continue + fi + fi + fi + gen_headers + done +} + +idir=mcpp-gcc +ar= +arch_headers + +if test $host_system = SYS_CYGWIN; then + ## CYGWIN has 'mingw' include directory for '-mno-cygwin' option + idir=mingw/mcpp-gcc + ar="-mno-cygwin" + arch_headers +fi + +# write shell-script so that call of 'cpp0', 'cc1 -E' or so is replaced to +# call of mcpp +echo " cd $cpp_path" +cd $cpp_path + +# other than MinGW +if test $host_system != SYS_MINGW; then + echo '#!/bin/sh' > mcpp.sh + # for GCC V.3.3 and later + if test x$cpp_base = xcc1; then + for cpp in cc1 cc1plus + do + if test $cpp = cc1; then + shname=mcpp + else + shname=mcpp_plus + fi + if test $cpp = cc1plus; then + echo '#!/bin/sh' > mcpp_plus.sh + fi + cat >> $shname.sh <<_EOF +for i in \$@ +do + case \$i in + -fpreprocessed|-traditional*) + $cpp_path/${cpp}_gnuc "\$@" + exit ;; + esac +done +_EOF + done + fi + + # for GCC V.2, V.3 and V.4 + mcpp_name=mcpp + if test $host_system = SYS_MAC && test -f ${target}-mcpp; then + mcpp_name=${target}-mcpp ## long name of Mac OS X cross-compiler + fi + echo $cpp_path/$mcpp_name '"$@"' >> mcpp.sh + chmod a+x mcpp.sh + if test x$cpp_base = xcc1; then + echo $cpp_path/$mcpp_name -+ '"$@"' >> mcpp_plus.sh + chmod a+x mcpp_plus.sh + fi +fi + +# backup GCC / cpp or cc1, cc1plus +mcpp_installed=`$cpp_call -v /dev/null 2>&1 | grep "MCPP"` +if test "x$mcpp_installed" = x; then # mcpp has not installed + sym_link= + if test $host_system = SYS_MINGW; then + if test -f cc1_gnuc$EXEEXT; then + sym_link=l ## cc1.exe already moved to cc1_gnuc.exe + fi + else + if test -h $cpp_name; then + sym_link=l + fi + fi + if test x$sym_link != xl; then + echo " mv $cpp_name ${cpp_base}_gnuc$EXEEXT" + mv -f $cpp_name ${cpp_base}_gnuc$EXEEXT + if test x$cpp_base = xcc1; then + echo " mv cc1plus$EXEEXT cc1plus_gnuc$EXEEXT" + mv -f cc1plus$EXEEXT cc1plus_gnuc$EXEEXT + fi + fi +fi +if test -f $cpp_name; then + rm -f $cpp_name + if test x$cpp_base = xcc1; then + rm -f cc1plus$EXEEXT + fi +fi + +# make symbolic link of mcpp.sh to 'cpp0' or 'cc1', 'cc1plus' +if test $host_system = SYS_MINGW; then + echo " cp $cwd/cc1$EXEEXT" + cp $cwd/cc1$EXEEXT . + strip cc1$EXEEXT +else + echo " $LN_S mcpp.sh $cpp_name" + $LN_S mcpp.sh $cpp_name +fi + +if test x$cpp_base = xcc1; then + if test $host_system = SYS_MINGW; then + echo " cp cc1$EXEEXT cc1plus$EXEEXT" + cp cc1$EXEEXT cc1plus$EXEEXT + else + echo " $LN_S mcpp_plus.sh cc1plus$EXEEXT" + $LN_S mcpp_plus.sh cc1plus$EXEEXT + fi +fi + +if test x$gcc_maj_ver = x2; then + exit 0 +fi + +# for GCC V.3 or V.4 make ${CC}.sh and ${CXX}.sh to add -no-integrated-cpp +# option +echo " cd $gcc_path" +cd $gcc_path + +if test $host_system = SYS_MAC && test x${target_cc} != x; then + # cross-compiler on Mac OS X + CC_=$target_cc + CXX_=`echo $target_cc | sed 's/gcc/g++/'` +else + CC_=$CC + CXX_=$CXX +fi + +for cc in $CC_ $CXX_ +do + entity=$cc$EXEEXT + if test $host_system != SYS_MINGW; then + ref=$cc$EXEEXT + while ref=`readlink $ref` + do + entity=$ref; + done + if test $entity = $cc.sh; then # gcc.sh already installed + exit 0 + fi + fi + ccache=`echo $entity | grep ccache` + if test x$ccache != x; then + ## CC (CXX) is a symbolic link to ccache + ## search the real $cc in $PATH + for path in `echo $PATH | sed 's/:/ /g'` + do + if test -f $path/$cc$EXEEXT && test $gcc_path != $path; then + break; + fi + done + gcc_path=$path + echo " cd $gcc_path" + cd $gcc_path + entity=$cc + ref=$cc + while ref=`readlink $ref` + do + entity=$ref; + done + if test $entity = $cc.sh; then + exit 0 + fi + fi + if test x$EXEEXT != x; then + entity_base=`echo $entity | sed "s/$EXEEXT//"` + else + entity_base=$entity + fi + if test $host_system != SYS_MINGW \ + || test ! -f ${entity_base}_proper$EXEEXT; then + echo " mv $entity ${entity_base}_proper$EXEEXT" + mv -f $entity ${entity_base}_proper$EXEEXT + fi + if test x"`echo $entity | grep '^/'`" = x; then # not absolute path + prefix_dir=$gcc_path/ + else # absolute path + prefix_dir= + fi + echo '#! /bin/sh' > $cc.sh + echo $prefix_dir${entity_base}_proper -no-integrated-cpp '"$@"' >> $cc.sh + chmod a+x $cc.sh + echo " $LN_S $cc.sh $cc" + $LN_S -f $cc.sh $cc + if test $cc != $entity; then + $LN_S -f $cc.sh $entity + fi +done + diff --git a/libraries/mcpp/src/support.c b/libraries/mcpp/src/support.c new file mode 100644 index 000000000..c57eaef8d --- /dev/null +++ b/libraries/mcpp/src/support.c @@ -0,0 +1,2809 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * S U P P O R T . C + * S u p p o r t R o u t i n e s + * + * The common routines used by several source files are placed here. + */ + +/* + * The following are global functions. + * + * get_unexpandable() Gets the next unexpandable token in the line, expanding + * macros. + * Called from #if, #line and #include processing routines. + * skip_nl() Skips over a line. + * skip_ws() Skips over white spaces but not skip over the end of the line. + * skip_ws() skips also COM_SEP and TOK_SEP. + * scan_token() Reads the next token of any type into the specified output + * pointer, advances the pointer, returns the type of token. + * scan_quote() Reads a string literal, character constant or header-name from + * the input stream, writes out to the specified buffer and + * returns the advanced output pointer. + * get_ch() Reads the next byte from the current input stream, handling + * end of (macro/file) input and embedded comments appropriately. + * cnv_trigraph() Maps trigraph sequence to C character. + * cnv_digraph() Maps digraph sequence to C character. + * id_operator() See whether the identifier is an operator in C++. + * unget_ch() Pushs last gotten character back on the input stream. + * unget_string() Pushs sequence on the input stream. + * save_string() Saves a string in malloc() memory. + * get_file() Initializes a new FILEINFO structure, called when #include + * opens a new file, or from unget_string(). + * xmalloc() Gets a specified number of bytes from heap memory. + * If malloc() returns NULL, exits with a message. + * xrealloc() realloc(). If it fails, exits with a message. + * get_src_location() Trace back line-column datum into pre-line-splicing + * phase. A function for -K option. + * cfatal(), cerror(), cwarn() + * These routines format print messages to the user. + * mcpp_fputc(), mcpp_fputs(), mcpp_fprintf() + * Wrap library functions to support alternate output to memory + * buffer. + */ + +#if PREPROCESSED +#include "mcpp.H" +#else +#include "system.H" +#include "internal.H" +#endif + +static void scan_id( int c); + /* Scan an identifier */ +static char * scan_number( int c, char * out, char * out_end); + /* Scan a preprocessing number */ +static char * scan_number_prestd( int c, char * out, char * out_end); + /* scan_number() for pre-Standard mode */ +#if OK_UCN +static char * scan_ucn( int cnt, char * out); + /* Scan an UCN sequence */ +#endif +static char * scan_op( int c, char * out); + /* Scan an operator or a punctuator */ +static char * parse_line( void); + /* Parse a logical line and convert comments */ +static char * read_a_comment( char * sp, size_t * sizp); + /* Read over a comment */ +static char * get_line( int in_comment); + /* Get a logical line from file, handle line-splicing */ +static char * at_eof( int in_comment); + /* Check erroneous end of file */ +static void do_msg( const char * severity, const char * format + , const char * arg1, long arg2, const char * arg3); + /* Putout diagnostic message */ +static char * cat_line( int del_bsl); + /* Splice the line */ +static void put_line( char * out, FILE * fp); + /* Put out a logical line */ +static void dump_token( int token_type, const char * cp); + /* Dump a token and its type */ + +#define EXP_MAC_IND_MAX 16 +/* Information of current expanding macros for diagnostic */ +static struct { + const char * name; /* Name of the macro just expanded */ + int to_be_freed; /* Name should be freed later */ +} expanding_macro[ EXP_MAC_IND_MAX]; +static int exp_mac_ind = 0; /* Index into expanding_macro[] */ + +static int in_token = FALSE; /* For token scanning functions */ +static int in_string = FALSE; /* For get_ch() and parse_line()*/ +static int squeezews = FALSE; + +#define MAX_CAT_LINE 256 +/* Information on line catenated by */ +/* and by line-crossing comment. This is for -K option. */ +typedef struct catenated_line { + long start_line; /* Starting line of catenation */ + long last_line; /* Ending line of catanation */ + size_t len[ MAX_CAT_LINE + 1]; + /* Length of successively catenated lines */ +} CAT_LINE; +static CAT_LINE bsl_cat_line; + /* Datum on the last catenated line by */ +static CAT_LINE com_cat_line; + /* Datum on the last catenated line by a line-crossing comment */ + +#if MCPP_LIB +static int use_mem_buffers = FALSE; + +void init_support( void) +{ + in_token = in_string = squeezews = FALSE; + bsl_cat_line.len[ 0] = com_cat_line.len[ 0] = 0; + clear_exp_mac(); +} + +typedef struct mem_buf { + char * buffer; + char * entry_pt; + size_t size; + size_t bytes_avail; +} MEMBUF; + +static MEMBUF mem_buffers[ NUM_OUTDEST]; + +void mcpp_use_mem_buffers( + int tf +) +{ + int i; + + use_mem_buffers = tf ? TRUE : FALSE; + + for (i = 0; i < NUM_OUTDEST; ++i) { + if (mem_buffers[ i].buffer) + /* Free previously allocated memory buffer */ + free( mem_buffers[ i].buffer); + if (use_mem_buffers) { + /* Output to memory buffers instead of files */ + mem_buffers[ i].buffer = NULL; + mem_buffers[ i].entry_pt = NULL; + mem_buffers[ i].size = 0; + mem_buffers[ i].bytes_avail = 0; + } + } +} + +int using_mem_buffers( void) +{ + return use_mem_buffers; +} + +#define BUF_INCR_SIZE (NWORK * 2) +#define MAX( a, b) (((a) > (b)) ? (a) : (b)) + +static char * append_to_buffer( + MEMBUF * mem_buf_p, + const char * string, + size_t length +) +{ + if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ + size_t size = MAX( BUF_INCR_SIZE, length); + + if (mem_buf_p->buffer == NULL) { /* 1st append */ + mem_buf_p->size = size; + mem_buf_p->bytes_avail = size; + mem_buf_p->buffer = xmalloc( mem_buf_p->size); + mem_buf_p->entry_pt = mem_buf_p->buffer; + } else { + mem_buf_p->size += size; + mem_buf_p->bytes_avail += size; + mem_buf_p->buffer = xrealloc( mem_buf_p->buffer, mem_buf_p->size); + mem_buf_p->entry_pt = mem_buf_p->buffer + mem_buf_p->size + - mem_buf_p->bytes_avail; + } + } + + /* Append the string to the tail of the buffer */ + memcpy( mem_buf_p->entry_pt, string, length); + mem_buf_p->entry_pt += length; + mem_buf_p->entry_pt[ 0] = '\0'; /* Terminate the string buffer */ + mem_buf_p->bytes_avail -= length; + + return mem_buf_p->buffer; +} + +static int mem_putc( + int c, + OUTDEST od +) +{ + char string[ 1]; + + string[ 0] = (char) c; + + if (append_to_buffer( &(mem_buffers[ od]), string, 1) != NULL) + return 0; + else + return !0; +} + +static int mem_puts( + const char * s, + OUTDEST od +) +{ + if (append_to_buffer( &(mem_buffers[od]), s, strlen(s)) != NULL) + return 0; + else + return !0; +} + +char * mcpp_get_mem_buffer( + OUTDEST od +) +{ + return mem_buffers[ od].buffer; +} + +#endif /* MCPP_LIB */ + +#define DEST2FP(od) \ + (od == OUT) ? fp_out : \ + ((od == ERR) ? fp_err : \ + ((od == DBG) ? fp_debug : \ + (NULL))) + +/* + * The following mcpp_*() wrapper functions are intended to centralize + * the output generated by MCPP. They support memory buffer alternates to + * each of the primary output streams: out, err, debug. The memory buffer + * output option would be used in a setup where MCPP has been built as a + * function call - i.e. mcpp_lib_main(). + */ + +int mcpp_lib_fputc( + int c, + OUTDEST od +) +{ +#if MCPP_LIB + if (use_mem_buffers) { + return mem_putc( c, od); + } else { +#endif + FILE * stream = DEST2FP( od); + + return (stream != NULL) ? fputc( c, stream) : EOF; +#if MCPP_LIB + } +#endif +} + +int (* mcpp_fputc)( int c, OUTDEST od) = mcpp_lib_fputc; + +int mcpp_lib_fputs( + const char * s, + OUTDEST od +) +{ +#if MCPP_LIB + if (use_mem_buffers) { + return mem_puts( s, od); + } else { +#endif + FILE * stream = DEST2FP( od); + + return (stream != NULL) ? fputs( s, stream) : EOF; +#if MCPP_LIB + } +#endif +} + +int (* mcpp_fputs)( const char * s, OUTDEST od) = mcpp_lib_fputs; + +#include + +int mcpp_lib_fprintf( + OUTDEST od, + const char * format, + ... +) +{ + va_list ap; + FILE * stream = DEST2FP( od); + + if (stream != NULL) { + int rc; + + va_start( ap, format); +#if MCPP_LIB + if (use_mem_buffers) { + static char mem_buffer[ NWORK]; + + rc = vsprintf( mem_buffer, format, ap); + + if (rc != 0) { + rc = mem_puts( mem_buffer, od); + } + } else { +#endif + rc = vfprintf( stream, format, ap); +#if MCPP_LIB + } +#endif + va_end( ap); + + return rc; + + } else { + return EOF; + } +} + +int (* mcpp_fprintf)( OUTDEST od, const char * format, ...) = mcpp_lib_fprintf; + +#if MCPP_LIB +void mcpp_reset_def_out_func( void) +{ + mcpp_fputc = mcpp_lib_fputc; + mcpp_fputs = mcpp_lib_fputs; + mcpp_fprintf = mcpp_lib_fprintf; +} + +void mcpp_set_out_func( + int (* func_fputc)( int c, OUTDEST od), + int (* func_fputs)( const char * s, OUTDEST od), + int (* func_fprintf)( OUTDEST od, const char * format, ...) +) +{ + mcpp_fputc = func_fputc; + mcpp_fputs = func_fputs; + mcpp_fprintf = func_fprintf; +} +#endif + +int get_unexpandable( + int c, /* First char of token */ + int diag /* Flag of diagnosis */ +) +/* + * Get the next unexpandable token in the line, expanding macros. + * Return the token type. The token is written in work_buf[]. + * The once expanded macro is never expanded again. + * Called only from the routines processing #if (#elif, #assert), #line and + * #include directives in order to diagnose some subtle macro expansions. + */ +{ + DEFBUF * defp = NULL; + FILEINFO * file; + FILE * fp = NULL; + LINE_COL line_col = { 0L, 0}; + int token_type = NO_TOKEN; + int has_pragma; + + while (c != EOS && c != '\n' /* In a line */ + && (fp = infile->fp /* Preserve current state */ + , (token_type + = scan_token( c, (workp = work_buf, &workp), work_end)) + == NAM) /* Identifier */ + && fp != NULL /* In source ! */ + && (defp = is_macro( NULL)) != NULL) { /* Macro */ + expand_macro( defp, work_buf, work_end, line_col, & has_pragma); + /* Expand macro */ + if (has_pragma) + cerror( "_Pragma operator found in directive line" /* _E_ */ + , NULL, 0L, NULL); + file = unget_string( work_buf, defp->name); /* Stack to re-read */ + c = skip_ws(); /* Skip TOK_SEP */ + if (file != infile && macro_line != MACRO_ERROR && (warn_level & 1)) { + /* This diagnostic is issued even if "diag" is FALSE. */ + cwarn( "Macro \"%s\" is expanded to 0 token" /* _W1_ */ + , defp->name, 0L, NULL); + if (! option_flags.no_source_line) + dump_a_def( " macro", defp, FALSE, TRUE, fp_err); + } + } + + if (c == '\n' || c == EOS) { + unget_ch(); + return NO_TOKEN; + } + + if (diag && fp == NULL && defp && (warn_level & 1)) { + char tmp[ NWORK + 16]; + char * tmp_end = tmp + NWORK; + char * tmp_p; + file = unget_string( infile->buffer, defp->name); /* To diagnose */ + c = get_ch(); + while (file == infile) { /* Search the expanded macro */ + if (scan_token( c, (tmp_p = tmp, &tmp_p), tmp_end) != NAM) { + c = get_ch(); + continue; + } + if (standard && str_eq( identifier, "defined")) { + cwarn( "Macro \"%s\" is expanded to \"defined\"" /* _W1_ */ + , defp->name, 0L, NULL); + break; + } + if (! standard && str_eq( identifier, "sizeof")) { + cwarn( "Macro \"%s\" is expanded to \"sizeof\"" /* _W1_ */ + , defp->name, 0L, NULL); + break; + } + c = get_ch(); + } + if (file == infile) { + infile->bptr += strlen( infile->bptr); + get_ch(); + } + unget_ch(); + if (token_type == OPE) { + unget_string( work_buf, NULL); /* Set again 'openum' */ + scan_token( get_ch(), (workp = work_buf, &workp), work_end); + } + } + + return token_type; +} + +void skip_nl( void) +/* + * Skip to the end of the current input line. + */ +{ + insert_sep = NO_SEP; + while (infile && infile->fp == NULL) { /* Stacked text */ + infile->bptr += strlen( infile->bptr); + get_ch(); /* To the parent */ + } + if (infile) + infile->bptr += strlen( infile->bptr); /* Source line */ +} + +int skip_ws( void) +/* + * Skip over horizontal whitespaces. + */ +{ + int c; + + do { + c = get_ch(); + } while (char_type[ c] & HSP); + + return c; +} + +#define MBMASK 0xFF /* Mask to hide multibyte char */ + +int scan_token( + int c, /* The first character of the token */ + char ** out_pp, /* Pointer to pointer to output buf */ + char * out_end /* End of output buffer */ +) +/* + * Scan the next token of any type. + * The token is written out to the specified buffer and the output pointer + * is advanced. Token is terminated by EOS. Return the type of token. + * If the token is an identifier, the token is also in identifier[]. + * If the token is a operator or punctuator, return OPE. + * If 'c' is token separator, then return SEP. + * If 'c' is not the first character of any known token and not a token + * separator, return SPE. + * In POST_STD mode, inserts token separator (a space) between any tokens of + * source. + */ +{ + char * out = *out_pp; /* Output pointer */ + int ch_type; /* Type of character */ + int token_type = 0; /* Type of token */ + int ch; + + if (standard) + in_token = TRUE; /* While a token is scanned */ + c = c & UCHARMAX; + ch_type = char_type[ c] & MBMASK; + + switch (ch_type) { + case LET: /* Probably an identifier */ + switch (c) { + case 'L': + if (! standard) + goto ident; + ch = get_ch(); + if (char_type[ ch] & QUO) { /* char_type[ ch] == QUO */ + if (ch == '"') + token_type = WSTR; /* Wide-char string literal */ + else + token_type = WCHR; /* Wide-char constant */ + c = ch; + *out++ = 'L'; + break; /* Fall down to "case QUO:" */ + } else { + unget_ch(); + } /* Fall through */ + default: /* An identifier */ +ident: + scan_id( c); + out = stpcpy( out, identifier); + token_type = NAM; + break; + } + if (token_type == NAM) + break; + /* Else fall through -- i.e. WSTR, WCHR */ + case QUO: /* String or character constant */ + out = scan_quote( c, out, out_end, FALSE); + if (token_type == 0) { /* Without prefix L */ + if (c == '"') + token_type = STR; + else + token_type = CHR; + } /* Else WSTR or WCHR */ + break; + case DOT: + ch = get_ch(); + unget_ch(); + if ((char_type[ ch] & DIG) == 0) /* Operator '.' or '...' */ + goto operat; + /* Else fall through */ + case DIG: /* Preprocessing number */ + out = (standard ? scan_number( c, out, out_end) + : scan_number_prestd( c, out, out_end)); + token_type = NUM; + break; + case PUNC: +operat: out = scan_op( c, out); /* Operator or punctuator */ + token_type = OPE; /* Number is set in global "openum" */ + break; + default: /* Special tokens or special characters */ +#if OK_UCN + if (mcpp_mode == STD && c == '\\' && stdc2) { + ch = get_ch(); + unget_ch(); + if (ch == 'U' || ch == 'u') + goto ident; /* Universal-Characte-Name */ + } +#endif +#if OK_MBIDENT + if (mcpp_mode == STD && (char_type[ c] & mbchk) && stdc3) { + char * bptr = infile->bptr; + mb_read( c, &infile->bptr, &out); + infile->bptr = bptr; + out = *out_pp; + goto ident; /* An identifier with multi-byte characters */ + /* Mbchar cheking has been done in scan_quote() and others. */ + } +#endif + if ((standard && (c == CAT || c == ST_QUOTE)) || (char_type[ c] & SPA)) + token_type = SEP; /* Token separator or magic char*/ + else + token_type = SPE; + /* Unkown token ($, @, multi-byte character or Latin */ + *out++ = c; + *out = EOS; + break; + } + + if (out_end < out) + cfatal( "Buffer overflow scanning token \"%s\"" /* _F_ */ + , *out_pp, 0L, NULL); + if (mcpp_debug & TOKEN) + dump_token( token_type, *out_pp); + if (mcpp_mode == POST_STD && token_type != SEP && infile->fp != NULL + && (char_type[ *infile->bptr & UCHARMAX] & SPA) == 0) + insert_sep = INSERT_SEP; /* Insert token separator */ + *out_pp = out; + + in_token = FALSE; /* Token scanning has been done */ + return token_type; +} + +static void scan_id( + int c /* First char of id */ +) +/* + * Reads the next identifier and put it into identifier[]. + * The caller has already read the first character of the identifier. + */ +{ + static char * const limit = &identifier[ IDMAX]; + static int dollar_diagnosed = FALSE; /* Flag of diagnosing '$' */ +#if OK_UCN + int uc2 = 0, uc4 = 0; /* Count of UCN16, UCN32 */ +#endif +#if OK_MBIDENT + int mb = 0; /* Count of MBCHAR */ +#endif + size_t len; /* Length of identifier */ + char * bp = identifier; + + if (c == IN_SRC) { /* Magic character */ + *bp++ = c; + if ((mcpp_debug & MACRO_CALL) && ! in_directive) { + *bp++ = get_ch(); /* Its 2-bytes */ + *bp++ = get_ch(); /* argument */ + } + c = get_ch(); + } + + do { + if (bp < limit) + *bp++ = c; +#if OK_UCN + if (mcpp_mode == STD && c == '\\' && stdc2) { + int cnt; + char * tp = bp; + + if ((c = get_ch()) == 'u') { + cnt = 4; + } else if (c == 'U') { + cnt = 8; + } else { + unget_ch(); + bp--; + break; + } + *bp++ = c; + if ((bp = scan_ucn( cnt, bp)) == NULL) /* Error */ + return; + if (cnt == 4) + uc2++; + else if (cnt == 8) + uc4++; + if (limit <= tp) /* Too long identifier */ + bp = tp; /* Back the pointer */ + goto next_c; + } +#endif /* OK_UCN */ +#if OK_MBIDENT + if (mcpp_mode == STD && (char_type[ c] & mbchk) && stdc3) { + len = mb_read( c, &infile->bptr, &bp); + if (len & MB_ERROR) { + if (infile->fp) + cerror( + "Illegal multi-byte character sequence." /* _E_ */ + , NULL, 0L, NULL); + } else { + mb += len; + } + } +#endif /* OK_MBIDENT */ +#if OK_UCN +next_c: +#endif + c = get_ch(); + } while ((char_type[ c] & (LET | DIG)) /* Letter or digit */ +#if OK_UCN + || (mcpp_mode == STD && c == '\\' && stdc2) +#endif +#if OK_MBIDENT + || (mcpp_mode == STD && (char_type[ c] & mbchk) && stdc3) +#endif + ); + + unget_ch(); + *bp = EOS; + + if (bp >= limit && (warn_level & 1)) /* Limit of token */ + cwarn( "Too long identifier truncated to \"%s\"" /* _W1_ */ + , identifier, 0L, NULL); + + len = bp - identifier; +#if IDMAX > IDLEN90MIN + /* UCN16, UCN32, MBCHAR are counted as one character for each. */ +#if OK_UCN + if (mcpp_mode == STD) + len -= (uc2 * 5) - (uc4 * 9); +#endif +#if OK_MBIDENT + if (mcpp_mode == STD) + len -= mb; +#endif + if (standard && infile->fp && len > std_limits.id_len && (warn_level & 4)) + cwarn( "Identifier longer than %.0s%ld characters \"%s\"" /* _W4_ */ + , NULL, (long) std_limits.id_len, identifier); +#endif /* IDMAX > IDLEN90MIN */ + + if (option_flags.dollar_in_name && dollar_diagnosed == FALSE + && (warn_level & 2) && strchr( identifier, '$') != NULL) { + cwarn( "'$' in identifier \"%s\"", identifier, 0L, NULL); /* _W2_ */ + dollar_diagnosed = TRUE; /* Diagnose only once */ + } +} + +char * scan_quote( + int delim, /* ', " or < (header-name) */ + char * out, /* Output buffer */ + char * out_end, /* End of output buffer */ + int diag /* Diagnostic should be output */ +) +/* + * Scan off a string literal or character constant to the output buffer. + * Report diagnosis if the quotation is terminated by newline or character + * constant is empty (provided 'diag' is TRUE). + * Return the next output pointer or NULL (on error). + */ +{ + const char * const skip_line = ", skipped the line"; /* _E_ */ + const char * const unterm_string + = "Unterminated string literal%s"; + const char * const unterm_char + = "Unterminated character constant %s%.0ld%s"; + const char * const empty_const + = "Empty character constant %s%.0ld%s"; + const char * skip; + size_t len; + int c; + char * out_p = out; + + /* Set again in case of called from routines other than scan_token(). */ + if (standard) + in_token = TRUE; + *out_p++ = delim; + if (delim == '<') + delim = '>'; + +scan: + while ((c = get_ch()) != EOS) { + +#if MBCHAR + if (char_type[ c] & mbchk) { + /* First of multi-byte character (or shift-sequence) */ + char * bptr = infile->bptr; + len = mb_read( c, &infile->bptr, (*out_p++ = c, &out_p)); + if (len & MB_ERROR) { + if (infile->fp != NULL && compiling && diag) { + if (warn_level & 1) { + char * buf; + size_t chlen; + buf = xmalloc( chlen = infile->bptr - bptr + 2); + memcpy( buf, bptr, chlen - 1); + buf[ chlen - 1] = EOS; + cwarn( + "Illegal multi-byte character sequence \"%s\" in quotation", /* _W1_ */ + buf, 0L, NULL); + free( buf); + } + } + continue; + } else { /* Valid multi-byte character (or sequence) */ + goto chk_limit; + } + } +#endif + if (c == delim) { + break; + } else if (c == '\\' && delim != '>') { /* In string literal */ +#if OK_UCN + if (mcpp_mode == STD && stdc2) { + int cnt; + char * tp; + + *out_p++ = c; + if ((c = get_ch()) == 'u') { + cnt = 4; + } else if (c == 'U') { + cnt = 8; + } else { + goto escape; + } + *out_p++ = c; + if ((tp = scan_ucn( cnt, out_p)) != NULL) + out_p = tp; + /* Else error */ + continue; /* Error or not, anyway continue */ + } +#endif /* OK_UCN */ + *out_p++ = c; /* Escape sequence */ + c = get_ch(); +escape: +#if MBCHAR + if (char_type[ c] & mbchk) { + /* '\\' followed by multi-byte char */ + unget_ch(); + continue; + } +#endif + if (! standard && c == '\n') { /* */ + out_p--; /* Splice the lines */ + if (cat_line( TRUE) == NULL) /* End of file */ + break; + c = get_ch(); + } + } else if (mcpp_mode == POST_STD && c == ' ' && delim == '>' + && infile->fp == NULL) { + continue; /* Skip space possibly inserted by macro expansion */ + } else if (c == '\n') { + break; + } + if (diag && iscntrl( c) && ((char_type[ c] & SPA) == 0) + && (warn_level & 1)) + cwarn( + "Illegal control character %.0s0lx%02x in quotation" /* _W1_ */ + , NULL, (long) c, NULL); + *out_p++ = c; +chk_limit: + if (out_end < out_p) { + *out_end = EOS; + cfatal( "Too long quotation", NULL, 0L, NULL); /* _F_ */ + } + } + + if (c == '\n' || c == EOS) + unget_ch(); + if (c == delim) + *out_p++ = delim; + *out_p = EOS; + if (diag) { /* At translation phase 3 */ + skip = (infile->fp == NULL) ? NULL : skip_line; + if (c != delim) { + if (mcpp_mode == OLD_PREP /* Implicit closing of quote*/ + && (delim == '"' || delim == '\'')) + goto done; + if (delim == '"') { + if (mcpp_mode != POST_STD && option_flags.lang_asm) { + /* STD, KR */ + /* Concatenate the unterminated string to the next line */ + if (warn_level & 1) + cwarn( unterm_string + , ", catenated to the next line" /* _W1_ */ + , 0L, NULL); + if (cat_line( FALSE) != NULL) + goto scan; /* Splice the lines */ + /* Else end of file */ + } else { + cerror( unterm_string, skip, 0L, NULL); /* _E_ */ + } + } else if (delim == '\'') { + if (mcpp_mode != POST_STD && option_flags.lang_asm) { + /* STD, KR */ + if (warn_level & 1) + cwarn( unterm_char, out, 0L, NULL); /* _W1_ */ + goto done; + } else { + cerror( unterm_char, out, 0L, skip); /* _E_ */ + } + } else { + cerror( "Unterminated header name %s%.0ld%s" /* _E_ */ + , out, 0L, skip); + } + out_p = NULL; + } else if (delim == '\'' && out_p - out <= 2) { + if (mcpp_mode != POST_STD && option_flags.lang_asm) { + /* STD, KR */ + if (warn_level & 1) + cwarn( empty_const, out, 0L, skip); /* _W1_ */ + } else { + cerror( empty_const, out, 0L, skip); /* _E_ */ + out_p = NULL; + goto done; + } + } else if (mcpp_mode == POST_STD && delim == '>' && (warn_level & 2)) { + cwarn( + "Header-name enclosed by <, > is an obsolescent feature %s" /* _W2_ */ + , out, 0L, skip); + } +#if NWORK-2 > SLEN90MIN + if (standard && out_p - out > std_limits.str_len && (warn_level & 4)) + cwarn( "Quotation longer than %.0s%ld bytes" /* _W4_ */ + , NULL, std_limits.str_len, NULL); +#endif + } + +done: + in_token = FALSE; + return out_p; +} + +static char * cat_line( + int del_bsl /* Delete the ? */ +) +/* + * If del_bsl == TRUE: + * Delete sequence in string literal. + * FALSE: Overwrite the with 'n'. + * Return NULL on end of file. Called only from scan_quote(). + * This routine is never called in POST_STD mode. + */ +{ + size_t len; + char * save1, * save2; + + if (del_bsl) { /* Delete the */ + infile->bptr -= 2; + len = infile->bptr - infile->buffer; + } else { /* Overwrite the with 'n' */ + strcpy( infile->bptr, "\\n"); + len = strlen( infile->buffer); + } + save1 = save_string( infile->buffer); + save2 = get_line( FALSE); /* infile->buffer is overwritten */ + if (save2 == NULL) { + free( save1); + return NULL; + } + save2 = save_string( infile->buffer); + memcpy( infile->buffer, save1, len); + strcpy( infile->buffer + len, save2); /* Catenate */ + free( save1); + free( save2); + if (! del_bsl) + len -= 2; + infile->bptr = infile->buffer + len; + return infile->bptr; +} + +static char * scan_number( + int c, /* First char of number */ + char * out, /* Output buffer */ + char * out_end /* Limit of output buffer */ +) +/* + * Read a preprocessing number. + * By scan_token() we know already that the first c is from 0 to 9 or dot, + * and if c is dot then the second character is digit. + * Returns the advanced output pointer. + * Note: preprocessing number permits non-numeric forms such as 3E+xy, + * which are used in stringization or token-concatenation. + */ +{ + char * out_p = out; /* Current output pointer */ + + do { + *out_p++ = c; + if (c == 'E' || c == 'e' /* Sign should follow 'E', 'e', */ + || (stdc3 && (c == 'P' || c == 'p')) + /* 'P' or 'p'. */ + ) { + c = get_ch(); + if (c == '+' || c == '-') { + *out_p++ = c; + c = get_ch(); + } +#if OK_UCN + } else if (mcpp_mode == STD && c == '\\' && stdc3) { + int cnt; + char * tp; + + if ((c = get_ch()) == 'u') { + cnt = 4; + } else if (c == 'U') { + cnt = 8; + } else { + unget_ch(); + out_p--; + break; + } + *out_p++ = c; + if ((tp = scan_ucn( cnt, out_p)) == NULL) /* Error */ + break; + else + out_p = tp; + c = get_ch(); +#endif /* OK_UCN */ +#if OK_MBIDENT + } else if (mcpp_mode == STD && (char_type[ c] & mbchk) && stdc3) { + len = mb_read( c, &infile->bptr, &out_p); + if (len & MB_ERROR) { + if (infile->fp) + cerror( + "Illegal multi-byte character sequence." /* _E_ */ + , NULL, 0L, NULL); + } +#endif /* OK_MBIDENT */ + } else { + c = get_ch(); + } + } while ((char_type[ c] & (DIG | DOT | LET)) /* Digit, dot or letter */ +#if OK_UCN + || (mcpp_mode == STD && c == '\\' && stdc3) +#endif +#if OK_MBIDENT + || (mcpp_mode == STD && (char_type[ c] & mbchk) && stdc3) +#endif + ); + + *out_p = EOS; + if (out_end < out_p) + cfatal( "Too long pp-number token \"%s\"" /* _F_ */ + , out, 0L, NULL); + unget_ch(); + return out_p; +} + +/* Original version of DECUS CPP with slight modifications, */ +/* too exact for Standard preprocessing. */ +static char * scan_number_prestd( + int c, /* First char of number */ + char * out, /* Output buffer */ + char * out_end /* Limit of output buffer */ +) +/* + * Process a number. We know that c is from 0 to 9 or dot. + * Algorithm from Dave Conroy's Decus C. + * Returns the advanced output pointer. + */ +{ + char * const out_s = out; /* For diagnostics */ + int radix; /* 8, 10, or 16 */ + int expseen; /* 'e' seen in floater */ + int octal89; /* For bad octal test */ + int dotflag; /* TRUE if '.' was seen */ + + expseen = FALSE; /* No exponent seen yet */ + octal89 = FALSE; /* No bad octal yet */ + radix = 10; /* Assume decimal */ + if ((dotflag = (c == '.')) != FALSE) { /* . something? */ + *out++ = '.'; /* Always out the dot */ + if ((char_type[(c = get_ch())] & DIG) == 0) { + /* If not a float numb, */ + goto nomore; /* All done for now */ + } + } /* End of float test */ + else if (c == '0') { /* Octal or hex? */ + *out++ = c; /* Stuff initial zero */ + radix = 8; /* Assume it's octal */ + c = get_ch(); /* Look for an 'x' */ + if (c == 'x' || c == 'X') { /* Did we get one? */ + radix = 16; /* Remember new radix */ + *out++ = c; /* Stuff the 'x' */ + c = get_ch(); /* Get next character */ + } + } + while (1) { /* Process curr. char. */ + /* + * Note that this algorithm accepts "012e4" and "03.4" + * as legitimate floating-point numbers. + */ + if (radix != 16 && (c == 'e' || c == 'E')) { + if (expseen) /* Already saw 'E'? */ + break; /* Exit loop, bad nbr. */ + expseen = TRUE; /* Set exponent seen */ + radix = 10; /* Decimal exponent */ + *out++ = c; /* Output the 'e' */ + if ((c = get_ch()) != '+' && c != '-') + continue; + } + else if (radix != 16 && c == '.') { + if (dotflag) /* Saw dot already? */ + break; /* Exit loop, two dots */ + dotflag = TRUE; /* Remember the dot */ + radix = 10; /* Decimal fraction */ + } + else { /* Check the digit */ + switch (c) { + case '8': case '9': /* Sometimes wrong */ + octal89 = TRUE; /* Do check later */ + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + break; /* Always ok */ + + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + if (radix == 16) /* Alpha's are ok only */ + break; /* if reading hex. */ + default: /* At number end */ + goto done; /* Break from for loop */ + } /* End of switch */ + } /* End general case */ + *out++ = c; /* Accept the character */ + c = get_ch(); /* Read another char */ + } /* End of scan loop */ + + if (out_end < out) /* Buffer overflow */ + goto nomore; + /* + * When we break out of the scan loop, c contains the first + * character (maybe) not in the number. If the number is an + * integer, allow a trailing 'L' for long. If not those, push + * the trailing character back on the input stream. + * Floating point numbers accept a trailing 'L' for "long double". + */ +done: + if (! (dotflag || expseen)) { /* Not floating point */ + /* + * We know that dotflag and expseen are both zero, now: + * dotflag signals "saw 'L'". + */ + for (;;) { + switch (c) { + case 'l': + case 'L': + if (dotflag) + goto nomore; + dotflag = TRUE; + break; + default: + goto nomore; + } + *out++ = c; /* Got 'L' . */ + c = get_ch(); /* Look at next, too. */ + } + } + +nomore: *out = EOS; + if (out_end < out) + goto overflow; + unget_ch(); /* Not part of a number */ + if (octal89 && radix == 8 && (warn_level & 1)) + cwarn( "Illegal digit in octal number \"%s\"" /* _W1_ */ + , out_s, 0L, NULL); + return out; + +overflow: + cfatal( "Too long number token \"%s\"", out_s, 0L, NULL); /* _F_ */ + return out; +} + +#if OK_UCN +static char * scan_ucn( + int cnt, /* Bytes of sequence */ + char * out /* Output buffer */ +) +/* + * Scan an UCN sequence and put the sequence to 'out'. + * Return the advanced pointer or NULL on failure. + * This routine is never called in POST_STD mode. + */ +{ + uexpr_t value; /* Value of UCN */ + int i, c; + + value = 0L; + for (i = 0; i < cnt; i++) { + c = get_ch(); + if (! isxdigit( c)) { + if (infile->fp) + cerror( "Illegal UCN sequence" /* _E_ */ + , NULL, 0L, NULL); + *out = EOS; + unget_ch(); + return NULL; + } + c = tolower( c); + *out++ = c; + c = (isdigit( c) ? (c - '0') : (c - 'a' + 10)); + value = (value << 4) | c; + } + if (infile->fp /* In source */ + && ((value >= 0L && value <= 0x9FL + && value != 0x24L && value != 0x40L && value != 0x60L) + /* Basic source character */ + || (stdc3 && (value >= 0xD800L && value <= 0xDFFFL)))) + /* Reserved for special chars */ + cerror( "UCN cannot specify the value %.0s\"%08lx\"" /* _E_ */ + , NULL, (long) value, NULL); + return out; +} +#endif /* OK_UCN */ + +static char * scan_op( + int c, /* First char of the token */ + char * out /* Output buffer */ +) +/* + * Scan C operator or punctuator into the specified buffer. + * Return the advanced output pointer. + * The code-number of the operator is stored to global variable 'openum'. + * Note: '#' is not an operator nor a punctuator in other than directive line, + * nevertheless is handled as a punctuator in this cpp for convenience. + */ +{ + int c2, c3, c4; + + *out++ = c; + + switch (c) { + case '~': openum = OP_COM; break; + case '(': openum = OP_LPA; break; + case ')': openum = OP_RPA; break; + case '?': openum = OP_QUE; break; + case ';': case '[': case ']': case '{': + case '}': case ',': + openum = OP_1; + break; + default: + openum = OP_2; /* Tentative guess */ + } + + if (openum != OP_2) { /* Single byte operators */ + *out = EOS; + return out; + } + + c2 = get_ch(); /* Possibly two bytes ops */ + *out++ = c2; + + switch (c) { + case '=': + openum = ((c2 == '=') ? OP_EQ : OP_1); /* ==, = */ + break; + case '!': + openum = ((c2 == '=') ? OP_NE : OP_NOT); /* !=, ! */ + break; + case '&': + switch (c2) { + case '&': openum = OP_ANA; break; /* && */ + case '=': /* openum = OP_2; */ break; /* &= */ + default : openum = OP_AND; break; /* & */ + } + break; + case '|': + switch (c2) { + case '|': openum = OP_ORO; break; /* || */ + case '=': /* openum = OP_2; */ break; /* |= */ + default : openum = OP_OR; break; /* | */ + } + break; + case '<': + switch (c2) { + case '<': c3 = get_ch(); + if (c3 == '=') { + openum = OP_3; /* <<= */ + *out++ = c3; + } else { + openum = OP_SL; /* << */ + unget_ch(); + } + break; + case '=': openum = OP_LE; break; /* <= */ + case ':': /* <: i.e. [ */ + if (mcpp_mode == STD && option_flags.dig) + openum = OP_LBRCK_D; + else + openum = OP_LT; + break; + case '%': /* <% i.e. { */ + if (mcpp_mode == STD && option_flags.dig) + openum = OP_LBRACE_D; + else + openum = OP_LT; + break; + default : openum = OP_LT; break; /* < */ + } + break; + case '>': + switch (c2) { + case '>': c3 = get_ch(); + if (c3 == '=') { + openum = OP_3; /* >>= */ + *out++ = c3; + } else { + openum = OP_SR; /* >> */ + unget_ch(); + } + break; + case '=': openum = OP_GE; break; /* >= */ + default : openum = OP_GT; break; /* > */ + } + break; + case '#': + if (standard && (in_define || macro_line)) /* in #define or macro */ + openum = ((c2 == '#') ? OP_CAT : OP_STR); /* ##, # */ + else + openum = OP_1; /* # */ + break; + case '+': + switch (c2) { + case '+': /* ++ */ + case '=': /* openum = OP_2; */ break; /* += */ + default : openum = OP_ADD; break; /* + */ + } + break; + case '-': + switch (c2) { + case '-': /* -- */ + case '=': /* -= */ + /* openum = OP_2; */ + break; + case '>': + if (cplus_val) { + if ((c3 = get_ch()) == '*') { /* ->* */ + openum = OP_3; + *out++ = c3; + } else { + /* openum = OP_2; */ + unget_ch(); + } + } /* else openum = OP_2; */ /* -> */ + /* else openum = OP_2; */ + break; + default : openum = OP_SUB; break; /* - */ + } + break; + case '%': + switch (c2) { + case '=': break; /* %= */ + case '>': /* %> i.e. } */ + if (mcpp_mode == STD && option_flags.dig) + openum = OP_RBRACE_D; + else + openum = OP_MOD; + break; + case ':': + if (mcpp_mode == STD && option_flags.dig) { + if ((c3 = get_ch()) == '%') { + if ((c4 = get_ch()) == ':') { /* %:%: i.e. ## */ + openum = OP_DSHARP_D; + *out++ = c3; + *out++ = c4; + } else { + unget_ch(); + unget_ch(); + openum = OP_SHARP_D; /* %: i.e. # */ + } + } else { + unget_ch(); + openum = OP_SHARP_D; /* %: i.e. # */ + } + if (in_define) { /* in #define */ + if (openum == OP_DSHARP_D) + openum = OP_CAT; + else + openum = OP_STR; + } + } else { + openum = OP_MOD; + } + break; + default : openum = OP_MOD; break; /* % */ + } + break; + case '*': + if (c2 != '=') /* * */ + openum = OP_MUL; + /* else openum = OP_2; */ /* *= */ + break; + case '/': + if (c2 != '=') /* / */ + openum = OP_DIV; + /* else openum = OP_2; */ /* /= */ + break; + case '^': + if (c2 != '=') /* ^ */ + openum = OP_XOR; + /* else openum = OP_2; */ /* ^= */ + break; + case '.': + if (standard) { + if (c2 == '.') { + c3 = get_ch(); + if (c3 == '.') { + openum = OP_ELL; /* ... */ + *out++ = c3; + break; + } else { + unget_ch(); + openum = OP_1; + } + } else if (cplus_val && c2 == '*') { /* .* */ + /* openum = OP_2 */ ; + } else { /* . */ + openum = OP_1; + } + } else { + openum = OP_1; + } + break; + case ':': + if (cplus_val && c2 == ':') /* :: */ + /* openum = OP_2 */ ; + else if (mcpp_mode == STD && c2 == '>' && option_flags.dig) + openum = OP_RBRCK_D; /* :> i.e. ] */ + else /* : */ + openum = OP_COL; + break; + default: /* Never reach here */ + cfatal( "Bug: Punctuator is mis-implemented %.0s0lx%x" /* _F_ */ + , NULL, (long) c, NULL); + openum = OP_1; + break; + } + + switch (openum) { + case OP_STR: + if (mcpp_mode == STD && c == '%') break; /* %: */ + case OP_1: + case OP_NOT: case OP_AND: case OP_OR: case OP_LT: + case OP_GT: case OP_ADD: case OP_SUB: case OP_MOD: + case OP_MUL: case OP_DIV: case OP_XOR: case OP_COM: + case OP_COL: /* Any single byte operator or punctuator */ + unget_ch(); + out--; + break; + default: /* Two or more bytes operators or punctuators */ + break; + } + + *out = EOS; + return out; +} + +int id_operator( + const char * name +) +/* + * Check whether the name is identifier-like operator in C++. + * Return the operator number if matched, return 0 if not matched. + * Note: these identifiers are defined as macros in in C95. + * This routine is never called in POST_STD mode. + */ +{ + typedef struct id_op { + const char * name; + int op_num; + } ID_OP; + + ID_OP id_ops[] = { + { "and", OP_ANA}, + { "and_eq", OP_2}, + { "bitand", OP_AND}, + { "bitor", OP_OR}, + { "compl", OP_COM}, + { "not", OP_NOT}, + { "not_eq", OP_NE}, + { "or", OP_ORO}, + { "or_eq", OP_2}, + { "xor", OP_XOR}, + { "xor_eq", OP_2}, + { NULL, 0}, + }; + + ID_OP * id_p = id_ops; + + while (id_p->name != NULL) { + if (str_eq( name, id_p->name)) + return id_p->op_num; + id_p++; + } + return 0; +} + +void expanding( + const char * name, /* The name of (nested) macro just expanded. */ + int to_be_freed /* The name should be freed later. */ +) +/* + * Remember used macro name for diagnostic. + */ +{ + if (exp_mac_ind < EXP_MAC_IND_MAX - 1) { + exp_mac_ind++; + } else { + clear_exp_mac(); + exp_mac_ind++; + } + expanding_macro[ exp_mac_ind].name = name; + expanding_macro[ exp_mac_ind].to_be_freed = to_be_freed; +} + +void clear_exp_mac( void) +/* + * Initialize expanding_macro[] freeing names registered in + * name_to_be_freed[]. + */ +{ + int i; + + for (i = 1; i < EXP_MAC_IND_MAX; i++) { + if (expanding_macro[ i].to_be_freed) { + free( (void *) expanding_macro[ i].name); + expanding_macro[ i].to_be_freed = FALSE; + } + } + exp_mac_ind = 0; +} + +int get_ch( void) +/* + * Return the next character from a macro or the current file. + * Always return the value representable by unsigned char. + */ +{ + int len; + int c; + FILEINFO * file; + + /* + * 'in_token' is set to TRUE while scan_token() is executed (and + * scan_id(), scan_quote(), scan_number(), scan_ucn() and scan_op() + * via scan_token()) in Standard mode to simplify tokenization. + * Any token cannot cross "file"s. + */ + if (in_token) + return (*infile->bptr++ & UCHARMAX); + + if ((file = infile) == NULL) + return CHAR_EOF; /* End of all input */ + + if (mcpp_mode == POST_STD && file->fp) { /* In a source file */ + switch (insert_sep) { + case NO_SEP: + break; + case INSERT_SEP: /* Insert a token separator */ + insert_sep = INSERTED_SEP; /* Remember this fact */ + return ' '; /* for unget_ch(). */ + case INSERTED_SEP: /* Has just inserted */ + insert_sep = NO_SEP; /* Clear the flag */ + break; + } + } + if (! standard && squeezews) { + if (*file->bptr == ' ') + file->bptr++; /* Squeeze white spaces */ + squeezews = FALSE; + } + + if (mcpp_debug & GETC) { + mcpp_fprintf( DBG, "get_ch(%s) '%c' line %ld, bptr = %d, buffer" + , file->fp ? cur_fullname : file->real_fname ? file->real_fname + : file->filename ? file->filename : "NULL" + , *file->bptr & UCHARMAX + , src_line, (int) (file->bptr - file->buffer)); + dump_string( NULL, file->buffer); + dump_unget( "get entrance"); + } + + /* + * Read a character from the current input logical line or macro. + * At EOS, either finish the current macro (freeing temporary storage) + * or get another logical line by parse_line(). + * At EOF, exit the current file (#included) or, at EOF from the MCPP input + * file, return CHAR_EOF to finish processing. + * The character is converted to int with no sign-extension. + */ + if ((c = (*file->bptr++ & UCHARMAX)) != EOS) { + if (standard) + return c; /* Just a character */ + if (! in_string && c == '\\' && *file->bptr == '\n' + && in_define /* '\\''\n' is deleted in #define line, */ + /* provided the '\\' is not the 2nd byte of mbchar. */ + && ! last_is_mbchar( file->buffer, strlen( file->buffer) - 2 + && ! keep_spaces) + ) { + if (*(file->bptr - 2) == ' ') + squeezews = TRUE; + } else { + return c; + } + } + + /* + * Nothing in current line or macro. Get next line (if input from a + * file), or do end of file/macro processing, and reenter get_ch() to + * restart from the top. + */ + if (file->fp && /* In source file */ + parse_line() != NULL) /* Get line from file */ + return get_ch(); + /* + * Free up space used by the (finished) file or macro and restart + * input from the parent file/macro, if any. + */ + infile = file->parent; /* Unwind file chain */ + free( file->buffer); /* Free buffer */ + if (infile == NULL) { /* If at end of input */ + free( file->filename); + free( file->src_dir); + free( file); /* full_fname is the same with filename for main file*/ + return CHAR_EOF; /* Return end of file */ + } + if (file->fp) { /* Source file included */ + free( file->filename); /* Free filename */ + free( file->src_dir); /* Free src_dir */ + fclose( file->fp); /* Close finished file */ + /* Do not free file->real_fname and file->full_fname */ + cur_fullname = infile->full_fname; + cur_fname = infile->real_fname; /* Restore current fname*/ + if (infile->pos != 0L) { /* Includer was closed */ + infile->fp = fopen( cur_fullname, "r"); + fseek( infile->fp, infile->pos, SEEK_SET); + } /* Re-open the includer and restore the file-position */ + len = (int) (infile->bptr - infile->buffer); + infile->buffer = xrealloc( infile->buffer, NBUFF); + /* Restore full size buffer to get the next line */ + infile->bptr = infile->buffer + len; + src_line = infile->line; /* Reset line number */ + inc_dirp = infile->dirp; /* Includer's directory */ +#if MCPP_LIB + mcpp_set_out_func( infile->last_fputc, infile->last_fputs, + infile->last_fprintf); +#endif + include_nest--; + src_line++; /* Next line to #include*/ + sharp( NULL, infile->include_opt ? 1 : (file->include_opt ? 0 : 2)); + /* Need a #line now. Marker depends on include_opt. */ + /* The file of include_opt should be marked as 1. */ + /* Else if returned from include_opt file, it is the */ + /* main input file, and should not be marked. */ + /* Else, it is normal includer file, and marked as 2. */ + src_line--; + newlines = 0; /* Clear the blank lines*/ + if (mcpp_debug & MACRO_CALL) /* Should be re-initialized */ + com_cat_line.last_line = bsl_cat_line.last_line = 0L; + } else if (file->filename) { /* Expanding macro */ + if (macro_name) /* file->filename should be freed later */ + expanding( file->filename, TRUE); + else + free( file->filename); + } + free( file); /* Free file space */ + return get_ch(); /* Get from the parent */ +} + +static char * parse_line( void) +/* + * ANSI (ISO) C: translation phase 3. + * Parse a logical line. + * Check illegal control characters. + * Check unterminated string literal, character constant or comment. + * Convert each comment to one space (or spaces of the comment length on + * 'keep_spaces' mode).. + * Squeeze succeding white spaces other than (including comments) to + * one space (unless keep_spaces == TRUE). + * The lines might be spliced by comments which cross the lines. + */ +{ + char * temp; /* Temporary buffer */ + char * limit; /* Buffer end */ + char * tp; /* Current pointer into temporary buffer */ + char * sp; /* Pointer into input buffer */ + size_t com_size; + int c; + + if ((sp = get_line( FALSE)) == NULL) /* Next logical line */ + return NULL; /* End of a file */ + if (in_asm) { /* In #asm block */ + while (char_type[ *sp++ & UCHARMAX] & SPA) + ; + if (*--sp == '#') /* Directive line */ + infile->bptr = sp; + return infile->bptr; /* Don't tokenize */ + } + tp = temp = xmalloc( (size_t) NBUFF); + limit = temp + NBUFF - 2; + + while (char_type[ c = *sp++ & UCHARMAX] & HSP) { + if (mcpp_mode != POST_STD) + /* Preserve line top horizontal white spaces */ + /* as they are for human-readability */ + *tp++ = c; + /* Else skip the line top spaces */ + } + sp--; + + while ((c = *sp++ & UCHARMAX) != '\n') { + + switch (c) { + case '/': + switch (*sp++) { + case '*': /* Start of a comment */ +com_start: + if ((sp = read_a_comment( sp, &com_size)) == NULL) { + free( temp); /* End of file with un- */ + return NULL; /* terminated comment */ + } + if (keep_spaces && mcpp_mode != OLD_PREP) { + if (tp + com_size >= limit - 1) /* Too long comment */ + com_size = limit - tp - 1; /* Truncate */ + while (com_size--) + *tp++ = ' '; /* Spaces of the comment length */ + break; + } + switch (mcpp_mode) { + case POST_STD: + if (temp < tp && *(tp - 1) != ' ') + *tp++ = ' '; /* Squeeze white spaces */ + break; + case OLD_PREP: + if (temp == tp + || ! (char_type[ *(tp - 1) & UCHARMAX] & HSP)) + *tp++ = COM_SEP; /* Convert to magic character */ + break; + default: + if (temp == tp || + ! (char_type[ *(tp - 1) & UCHARMAX] & HSP)) + *tp++ = ' '; /* Squeeze white spaces */ + break; + } + break; + case '/': /* // */ + if (! standard) + goto not_comment; + /* Comment when C++ or __STDC_VERSION__ >= 199901L */ + /* Need not to convert to a space because '\n' follows */ + if (! stdc2 && (warn_level & 2)) + cwarn( "Parsed \"//\" as comment" /* _W2_ */ + , NULL, 0L, NULL); + if (keep_comments) { + sp -= 2; + while (*sp != '\n') /* Until end of line */ + mcpp_fputc( *sp++, OUT); + } + goto end_line; + default: /* Not a comment */ +not_comment: + *tp++ = '/'; + sp--; /* To re-read */ + break; + } + break; + case '\r': /* Vertical white spaces*/ + /* Note that [CR+LF] is already converted to [LF]. */ + case '\f': + case '\v': + if (warn_level & 4) + cwarn( "Converted %.0s0x%02lx to a space" /* _W4_ */ + , NULL, (long) c, NULL); + case '\t': /* Horizontal space */ + case ' ': + if (keep_spaces) { + if (c == '\t') + *tp++ = '\t'; + else + *tp++ = ' '; /* Convert to ' ' */ + } else if (! (char_type[ *(tp - 1) & UCHARMAX] & HSP)) { + *tp++ = ' '; /* Squeeze white spaces */ + } else if (mcpp_mode == OLD_PREP && *(tp - 1) == COM_SEP) { + *(tp - 1) = ' '; /* Replace COM_SEP with ' ' */ + } + break; + case '"': /* String literal */ + case '\'': /* Character constant */ + infile->bptr = sp; + if (standard) { + tp = scan_quote( c, tp, limit, TRUE); + } else { + in_string = TRUE; /* Enable line splicing by scan_quote() */ + tp = scan_quote( c, tp, limit, TRUE); /* (not by get_ch())*/ + in_string = FALSE; + } + if (tp == NULL) { + free( temp); /* Unbalanced quotation */ + return parse_line(); /* Skip the line */ + } + sp = infile->bptr; + break; + default: + if (iscntrl( c)) { + cerror( /* Skip the control character */ + "Illegal control character %.0s0x%lx, skipped the character" /* _E_ */ + , NULL, (long) c, NULL); + } else { /* Any valid character */ + *tp++ = c; + } + break; + } + + if (limit < tp) { + *tp = EOS; + cfatal( "Too long line spliced by comments" /* _F_ */ + , NULL, 0L, NULL); + } + } + +end_line: + if (temp < tp && (char_type[ *(tp - 1) & UCHARMAX] & HSP)) + tp--; /* Remove trailing white space */ + *tp++ = '\n'; + *tp = EOS; + infile->bptr = strcpy( infile->buffer, temp); /* Write back to buffer */ + free( temp); + if (macro_line != 0 && macro_line != MACRO_ERROR) { /* Expanding macro */ + temp = infile->buffer; + while (char_type[ *temp & UCHARMAX] & HSP) + temp++; + if (*temp == '#' /* This line starts with # token */ + || (mcpp_mode == STD && *temp == '%' && *(temp + 1) == ':')) + if (warn_level & 1) + cwarn( + "Macro started at line %.0s%ld swallowed directive-like line" /* _W1_ */ + , NULL, macro_line, NULL); + } + return infile->buffer; +} + +static char * read_a_comment( + char * sp, /* Source */ + size_t * sizp /* Size of the comment */ +) +/* + * Read over a comment (which may cross the lines). + */ +{ + int c; + char * saved_sp; + int cat_line = 0; /* Number of catenated lines */ + + if (keep_spaces) { + saved_sp = sp - 2; /* '-2' for beginning / and * */ + *sizp = 0; + } + if (keep_comments) /* If writing comments */ + mcpp_fputs( "/*", OUT); /* Write the initializer*/ + c = *sp++; + + while (1) { /* Eat a comment */ + if (keep_comments) + mcpp_fputc( c, OUT); + + switch (c) { + case '/': + if ((c = *sp++) != '*') /* Don't let comments */ + continue; /* nest. */ + if (warn_level & 1) + cwarn( "\"/*\" within comment", NULL, 0L, NULL); /* _W1_ */ + if (keep_comments) + mcpp_fputc( c, OUT); + /* Fall into * stuff */ + case '*': + if ((c = *sp++) != '/') /* If comment doesn't */ + continue; /* end, look at next. */ + if (keep_comments) { /* Put out comment */ + mcpp_fputc( c, OUT); /* terminator, too. */ + mcpp_fputc( '\n', OUT); /* Append '\n' to avoid */ + /* trouble on some other tools such as rpcgen. */ + wrong_line = TRUE; + } + if (keep_spaces) /* Save the length */ + *sizp = *sizp + (sp - saved_sp); + if ((mcpp_debug & MACRO_CALL) && compiling) { + if (cat_line) { + cat_line++; + com_cat_line.len[ cat_line] /* Catenated length */ + = com_cat_line.len[ cat_line - 1] + + strlen( infile->buffer) - 1; + /* '-1' for '\n' */ + com_cat_line.last_line = src_line; + } + } + return sp; /* End of comment */ + case '\n': /* Line-crossing comment*/ + if (keep_spaces) /* Save the length */ + *sizp = *sizp + (sp - saved_sp) - 1; /* '-1' for '\n' */ + if ((mcpp_debug & MACRO_CALL) && compiling) { + /* Save location informations */ + if (cat_line == 0) /* First line of catenation */ + com_cat_line.start_line = src_line; + if (cat_line >= MAX_CAT_LINE - 1) { + *sizp = 0; /* Discard the too long comment */ + cat_line = 0; + if (warn_level & 4) + cwarn( + "Too long comment, discarded up to here" /* _W4_ */ + , NULL, 0L, NULL); + } + cat_line++; + com_cat_line.len[ cat_line] + = com_cat_line.len[ cat_line - 1] + + strlen( infile->buffer) - 1; + } + if ((saved_sp = sp = get_line( TRUE)) == NULL) + return NULL; /* End of file within comment */ + /* Never happen, because at_eof() supplement closing*/ + wrong_line = TRUE; /* We'll need a #line later */ + break; + default: /* Anything else is */ + break; /* just a character */ + } /* End switch */ + + c = *sp++; + } /* End comment loop */ + + return sp; /* Never reach here */ +} + +static char * mcpp_fgets( + char * s, + int size, + FILE * stream +) +{ + return fgets( s, size, stream); +} + +static char * get_line( + int in_comment +) +/* + * ANSI (ISO) C: translation phase 1, 2. + * Get the next logical line from source file. + * Convert [CR+LF] to [LF]. + */ +{ +#if COMPILER == INDEPENDENT +#define cr_warn_level 1 +#else +#define cr_warn_level 2 +#endif + static int cr_converted; + int converted = FALSE; + int len; /* Line length - alpha */ + char * ptr; + int cat_line = 0; /* Number of catenated lines */ + + if (infile == NULL) /* End of a source file */ + return NULL; + ptr = infile->bptr = infile->buffer; + if ((mcpp_debug & MACRO_CALL) && src_line == 0) /* Initialize */ + com_cat_line.last_line = bsl_cat_line.last_line = 0L; + + while (mcpp_fgets( ptr, (int) (infile->buffer + NBUFF - ptr), infile->fp) + != NULL) { + /* Translation phase 1 */ + src_line++; /* Gotten next physical line */ + if (standard && src_line == std_limits.line_num + 1 + && (warn_level & 1)) + cwarn( "Line number %.0s\"%ld\" got beyond range" /* _W1_ */ + , NULL, src_line, NULL); + if (mcpp_debug & (TOKEN | GETC)) { /* Dump it to DBG */ + mcpp_fprintf( DBG, "\n#line %ld (%s)", src_line, cur_fullname); + dump_string( NULL, ptr); + } + len = strlen( ptr); + if (NBUFF - 1 <= ptr - infile->buffer + len + && *(ptr + len - 1) != '\n') { + /* The line does not yet end, though the buffer is full. */ + if (NBUFF - 1 <= len) + cfatal( "Too long source line" /* _F_ */ + , NULL, 0L, NULL); + else + cfatal( "Too long logical line" /* _F_ */ + , NULL, 0L, NULL); + } + if (*(ptr + len - 1) != '\n') /* Unterminated source line */ + break; + if (len >= 2 && *(ptr + len - 2) == '\r') { /* [CR+LF] */ + *(ptr + len - 2) = '\n'; + *(ptr + --len) = EOS; + if (! cr_converted && (warn_level & cr_warn_level)) { + cwarn( "Converted [CR+LF] to [LF]" /* _W1_ _W2_ */ + , NULL, 0L, NULL); + cr_converted = TRUE; + } + } + if (standard) { + if (option_flags.trig) + converted = cnv_trigraph( ptr); + if (mcpp_mode == POST_STD && option_flags.dig) + converted += cnv_digraph( ptr); + if (converted) + len = strlen( ptr); + /* Translation phase 2 */ + len -= 2; + if (len >= 0) { + if ((*(ptr + len) == '\\') && ! last_is_mbchar( ptr, len)) { + /* (not MBCHAR) */ + ptr = infile->bptr += len; /* Splice the lines */ + wrong_line = TRUE; + if ((mcpp_debug & MACRO_CALL) && compiling) { + /* Save location informations */ + if (cat_line == 0) /* First line of catenation */ + bsl_cat_line.start_line = src_line; + if (cat_line < MAX_CAT_LINE) + /* Record the catenated length */ + bsl_cat_line.len[ ++cat_line] + = strlen( infile->buffer) - 2; + /* Else ignore */ + } + continue; + } + } +#if NBUFF-2 > SLEN90MIN + if (ptr - infile->buffer + len + 2 > std_limits.str_len + 1 + && (warn_level & 4)) /* +1 for '\n' */ + cwarn( "Logical source line longer than %.0s%ld bytes" /* _W4_ */ + , NULL, std_limits.str_len, NULL); +#endif + } + if ((mcpp_debug & MACRO_CALL) && compiling) { + if (cat_line && cat_line < MAX_CAT_LINE) { + bsl_cat_line.len[ ++cat_line] = strlen( infile->buffer) - 1; + /* Catenated length: '-1' for '\n' */ + bsl_cat_line.last_line = src_line; + } + } + return infile->bptr = infile->buffer; /* Logical line */ + } + + /* End of a (possibly included) source file */ + if (ferror( infile->fp)) + cfatal( "File read error", NULL, 0L, NULL); /* _F_ */ + if ((ptr = at_eof( in_comment)) != NULL) /* Check at end of file */ + return ptr; /* Partial line supplemented */ + if (option_flags.z) { + no_output--; /* End of included file */ + keep_comments = option_flags.c && compiling && !no_output; + } + return NULL; +} + +#define TRIOFFSET 10 + +int cnv_trigraph( + char * in +) +/* + * Perform in-place trigraph replacement on a physical line. This was added + * to the C90. In an input text line, the sequence ??[something] is + * transformed to a character (which might not appear on the input keyboard). + */ +{ + const char * const tritext = "=(/)'-\0#[\\]^{|}~"; + /* ^ ^ + * +----------+ + * this becomes this + */ + int count = 0; + const char * tp; + + while ((in = strchr( in, '?')) != NULL) { + if (*++in != '?') + continue; + while (*++in == '?') + ; + if ((tp = strchr( tritext, *in)) == NULL) + continue; + *(in - 2) = *(tp + TRIOFFSET); + in--; + memmove( in, in + 2, strlen( in + 1)); + count++; + } + + if (count && (warn_level & 16)) + cwarn( "%.0s%ld trigraph(s) converted" /* _W16_ */ + , NULL, (long) count, NULL); + return count; +} + +int cnv_digraph( + char * in +) +/* + * Perform in-place digraph replacement on a physical line. + * Called only in POST_STD mode. + */ +{ + int count = 0; + int i; + int c1, c2; + + while ((i = strcspn( in, "%:<")), (c1 = *(in + i)) != '\0') { + in += i + 1; + c2 = *in; + switch (c1) { + case '%' : + switch (c2) { + case ':' : *(in - 1) = '#'; break; + case '>' : *(in - 1) = '}'; break; + default : continue; + } + break; + case ':' : + switch (c2) { + case '>' : *(in - 1) = ']'; break; + default : continue; + } + break; + case '<' : + switch (c2) { + case '%' : *(in - 1) = '{'; break; + case ':' : *(in - 1) = '['; break; + default : continue; + } + break; + } + memmove( in, in + 1, strlen( in)); + count++; + } + + if (count && (warn_level & 16)) + cwarn( "%.0s%ld digraph(s) converted" /* _W16_ */ + , NULL, (long) count, NULL); + return count; +} + +static char * at_eof( + int in_comment +) +/* + * Check the partial line, unterminated comment, unbalanced #if block, + * uncompleted macro call at end of a file or at end of input. + * Supplement the line terminator, if possible. + * Return the supplemented line or NULL on unrecoverable error. + */ +{ + const char * const format + = "End of %s with %.0ld%s"; /* _E_ _W1_ */ + const char * const unterm_if_format += "End of %s within #if (#ifdef) section started at line %ld"; /* _E_ _W1_ */ + const char * const unterm_macro_format + = "End of %s within macro call started at line %ld";/* _E_ _W1_ */ + const char * const input + = infile->parent ? "file" : "input"; /* _E_ _W1_ */ + const char * const no_newline + = "no newline, supplemented newline"; /* _W1_ */ + const char * const unterm_com + = "unterminated comment, terminated the comment"; /* _W1_ */ + const char * const backsl = "\\, deleted the \\"; /* _W1_ */ + const char * const unterm_asm_format += "End of %s with unterminated #asm block started at line %ld"; /* _E_ _W1_ */ + size_t len; + char * cp; + + cp = infile->buffer; + len = strlen( cp); + if (len && *(cp += (len - 1)) != '\n') { + *++cp = '\n'; /* Supplement */ + *++cp = EOS; + if (mcpp_mode != OLD_PREP && (warn_level & 1)) + cwarn( format, input, 0L, no_newline); + return infile->bptr = infile->buffer; + } + if (standard && infile->buffer < infile->bptr) { + /* No line after */ + cp = infile->bptr; + *cp++ = '\n'; /* Delete the \\ */ + *cp = EOS; + if (warn_level & 1) + cwarn( format, input, 0L, backsl); + return infile->bptr = infile->buffer; + } + if (in_comment) { /* End of file within a comment */ + if (mcpp_mode != OLD_PREP && (warn_level & 1)) + cwarn( format, input, 0L, unterm_com); + /* The partial comment line has been already read by */ + /* read_a_comment(), so supplement the next line. */ + strcpy( infile->buffer, "*/\n"); + return infile->bptr = infile->buffer; + } + + if (infile->initif < ifptr) { + IFINFO * ifp = infile->initif + 1; + if (standard) { + cerror( unterm_if_format, input, ifp->ifline, NULL); + ifptr = infile->initif; /* Clear information of */ + compiling = ifptr->stat; /* erroneous grouping */ + } else if (mcpp_mode == KR && (warn_level & 1)) { + cwarn( unterm_if_format, input, ifp->ifline, NULL); + } + } + + if (macro_line != 0 && macro_line != MACRO_ERROR + && ((mcpp_mode == STD && in_getarg) || ! standard)) { + if (standard) { + cerror( unterm_macro_format, input, macro_line, NULL); + macro_line = MACRO_ERROR; + } else if (warn_level & 1) { + cwarn( unterm_macro_format, input, macro_line, NULL); + } + } + + if (in_asm && mcpp_mode == KR && (warn_level & 1)) + cwarn( unterm_asm_format, input, in_asm, NULL); + + return NULL; +} + +void unget_ch( void) +/* + * Back the pointer to reread the last character. Fatal error (code bug) + * if we back too far. unget_ch() may be called, without problems, at end of + * file. Only one character may be ungotten. If you need to unget more, + * call unget_string(). + */ +{ + if (in_token) { + infile->bptr--; + return; + } + + if (infile != NULL) { + if (mcpp_mode == POST_STD && infile->fp) { + switch (insert_sep) { + case INSERTED_SEP: /* Have just read an inserted separator */ + insert_sep = INSERT_SEP; + return; + case INSERT_SEP: + cfatal( "Bug: unget_ch() just after scan_token()" /* _F_ */ + , NULL, 0L, NULL); + break; + default: + break; + } + } + --infile->bptr; + if (infile->bptr < infile->buffer) /* Shouldn't happen */ + cfatal( "Bug: Too much pushback", NULL, 0L, NULL); /* _F_ */ + } + + if (mcpp_debug & GETC) + dump_unget( "after unget"); +} + +FILEINFO * unget_string( + const char * text, /* Text to unget */ + const char * name /* Name of the macro, if any*/ +) +/* + * Push a string back on the input stream. This is done by treating + * the text as if it were a macro or a file. + */ +{ + FILEINFO * file; + size_t size; + + if (text) + size = strlen( text) + 1; + else + size = 1; + file = get_file( name, NULL, NULL, size, FALSE); + if (text) + memcpy( file->buffer, text, size); + else + *file->buffer = EOS; + return file; +} + +char * save_string( + const char * text +) +/* + * Store a string into free memory. + */ +{ + char * result; + size_t size; + + size = strlen( text) + 1; + result = xmalloc( size); + memcpy( result, text, size); + return result; +} + +FILEINFO * get_file( + const char * name, /* File or macro name */ + const char * src_dir, /* Source file directory*/ + const char * fullname, /* Full path list */ + size_t bufsize, /* Line buffer size */ + int include_opt /* Specified by -include opt (for GCC) */ +) +/* + * Common FILEINFO buffer initialization for a new file or macro. + */ +{ + FILEINFO * file; + + file = (FILEINFO *) xmalloc( sizeof (FILEINFO)); + file->buffer = xmalloc( bufsize); + file->bptr = file->buffer; /* Initialize line ptr */ + file->buffer[ 0] = EOS; /* Force first read */ + file->line = 0L; /* (Not used just yet) */ + file->fp = NULL; /* No file yet */ + file->pos = 0L; /* No pos to remember */ + file->parent = infile; /* Chain files together */ + file->initif = ifptr; /* Initial ifstack */ + file->include_opt = include_opt; /* Specified by -include*/ + file->dirp = NULL; /* No include dir yet */ + file->real_fname = name; /* Save file/macro name */ + file->full_fname = fullname; /* Full path list */ + if (name) { + file->filename = xmalloc( strlen( name) + 1); + strcpy( file->filename, name); /* Copy for #line */ + } else { + file->filename = NULL; + } + if (src_dir) { + file->src_dir = xmalloc( strlen( src_dir) + 1); + strcpy( file->src_dir, src_dir); + } else { + file->src_dir = NULL; + } +#if MCPP_LIB + file->last_fputc = mcpp_lib_fputc; + file->last_fputs = mcpp_lib_fputs; + file->last_fprintf = mcpp_lib_fprintf; +#endif + if (infile != NULL) { /* If #include file */ + infile->line = src_line; /* Save current line */ +#if MCPP_LIB + infile->last_fputc = mcpp_fputc; + infile->last_fputs = mcpp_fputs; + infile->last_fprintf = mcpp_fprintf; +#endif + } + infile = file; /* New current file */ + + return file; /* All done. */ +} + +static const char * const out_of_memory + = "Out of memory (required size is %.0s0x%lx bytes)"; /* _F_ */ + +char * +(xmalloc)( + size_t size +) +/* + * Get a block of free memory. + */ +{ + char * result; + + if ((result = (char *) malloc( size)) == NULL) { + if (mcpp_debug & MEMORY) + print_heap(); + cfatal( out_of_memory, NULL, (long) size, NULL); + } + return result; +} + +char * (xrealloc)( + char * ptr, + size_t size +) +/* + * Reallocate malloc()ed memory. + */ +{ + char * result; + + if ((result = (char *) realloc( ptr, size)) == NULL && size != 0) { + /* 'size != 0' is necessary to cope with some */ + /* implementation of realloc( ptr, 0) which returns NULL. */ + if (mcpp_debug & MEMORY) + print_heap(); + cfatal( out_of_memory, NULL, (long) size, NULL); + } + return result; +} + +LINE_COL * get_src_location( + LINE_COL * p_line_col /* Line and column on phase 4 */ +) +/* + * Convert line-column datum of just after translation phase 3 into that of + * phase 2, tracing back line splicing by a comment and . + * Note: This conversion does not give correct datum on a line catenated by + * both of and line-crossing-comment at the same time. + * + * com_cat_line and bsl_cat_line have data only on last catenated line. + * com_cat_line.len[] and bsl_cat_line.len[] have the length of catenated + * line, and len[ 0] is always 0, followed by len[ 1], len[ 2], ..., as + * accumulated length of successively catenated lines. + */ +{ + long line; + size_t col; + size_t * cols; + CAT_LINE * l_col_p; + int i; + + line = p_line_col->line; + col = p_line_col->col; + + for (i = 0; i <= 1; i++) { + l_col_p = i ? & bsl_cat_line : & com_cat_line; + if (l_col_p->last_line != line) + continue; + /* Else just catenated line */ + cols = l_col_p->len + 1; + while (*cols < col) + cols++; + if (col <= *cols) { + cols--; + col -= *cols; + } + line = l_col_p->start_line + (cols - l_col_p->len); + } + + p_line_col->line = line; + p_line_col->col = col + 1; + /* col internally start at 0, output start at 1 */ + + return p_line_col; +} + +static void put_line( + char * out, + FILE * fp +) +/* + * Put out a logical source line. + * This routine is called only in OLD_PREP mode. + */ +{ + int c; + + while ((c = *out++) != EOS) { + if (c != COM_SEP) /* Skip 0-length comment */ + mcpp_fputc( c, FP2DEST( fp)); + } +} + +static void do_msg( + const char * severity, /* "fatal", "error", "warning" */ + const char * format, /* Format for the error message */ + const char * arg1, /* String arg. for the message */ + long arg2, /* Integer argument */ + const char * arg3 /* Second string argument */ +) +/* + * Print filenames, macro names, line numbers and error messages. + * Also print macro definitions on macro expansion problems. + */ +{ + FILEINFO * file; + DEFBUF * defp; + int i; + size_t slen; + const char * arg_s[ 2]; + char * arg_t[ 2]; + char * tp; + const char * sp; + int c; + int ind; + + fflush( fp_out); /* Synchronize output and diagnostics */ + arg_s[ 0] = arg1; arg_s[ 1] = arg3; + + for (i = 0; i < 2; i++) { /* Convert special characters to visible */ + sp = arg_s[ i]; + if (sp != NULL) + slen = strlen( sp) + 1; + else + slen = 1; + tp = arg_t[ i] = (char *) malloc( slen); + /* Don't use xmalloc() so as not to cause infinite recursion */ + if (sp == NULL || *sp == EOS) { + *tp = EOS; + continue; + } + + while ((c = *sp++) != EOS) { + switch (c) { + case TOK_SEP: + if (mcpp_mode == OLD_PREP) /* COM_SEP */ + break; /* Skip magic characters */ + /* Else fall through */ + case RT_END: + case CAT: + case ST_QUOTE: + case DEF_MAGIC: + if (! standard) + *tp++ = ' '; + break; /* Skip the magic characters*/ + case IN_SRC: + if (! standard) + *tp++ = ' '; + if ((mcpp_debug & MACRO_CALL) && ! in_directive) + sp += 2; /* Skip two more bytes */ + break; + case MAC_INF: + if (mcpp_mode != STD) { + *tp++ = ' '; + /* Illegal control character, convert to a space*/ + } else { + switch (*sp++) { /* Skip the magic characters*/ + case MAC_ARG_START : + sp++; + /* Fall through */ + case MAC_CALL_START : + sp += 2; + break; + case MAC_ARG_END : + if (! option_flags.v) + break; + else + sp++; + /* Fall through */ + case MAC_CALL_END : + if (option_flags.v) + sp += 2; + break; + } + } + break; + case '\n': + *tp++ = ' '; /* Convert '\n' to a space */ + break; + default: + *tp++ = c; + break; + } + } + + if (*(sp - 2) == '\n') + tp--; + *tp = EOS; + } + + /* Print source location and diagnostic */ + file = infile; + while (file != NULL && (file->fp == NULL || file->fp == (FILE *)-1)) + file = file->parent; /* Skip macro */ + if (file != NULL) { + file->line = src_line; + mcpp_fprintf( ERR, "%s:%ld: %s: ", cur_fullname, src_line, severity); + } + mcpp_fprintf( ERR, format, arg_t[ 0], arg2, arg_t[ 1]); + mcpp_fputc( '\n', ERR); + if (option_flags.no_source_line) + goto free_arg; + + /* Print source line, includers and expanding macros */ + file = infile; + if (file != NULL && file->fp != NULL) { + if (mcpp_mode == OLD_PREP) { + mcpp_fputs( " ", ERR); + put_line( file->buffer, fp_err); + } else { + mcpp_fprintf( ERR, " %s", file->buffer); + /* Current source line */ + } + file = file->parent; + } + while (file != NULL) { /* Print #includes, too */ + if (file->fp == NULL) { /* Macro */ + if (file->filename) { + defp = look_id( file->filename); + if ((defp->nargs > DEF_NOARGS_STANDARD) + && ! (file->parent && file->parent->filename + && str_eq( file->filename, file->parent->filename))) + /* If the name is not duplicate of parent */ + dump_a_def( " macro", defp, FALSE, TRUE, fp_err); + } + } else { /* Source file */ + if (file->buffer[ 0] == '\0') + strcpy( file->buffer, "\n"); + if (mcpp_mode != OLD_PREP) { + mcpp_fprintf( ERR, " from %s: %ld: %s", + file->line ? file->full_fname /* Full-path-list */ + : "", /* Included by -include */ + file->line, /* Current line number */ + file->buffer); /* The source line */ + } else { + mcpp_fprintf( ERR, " from %s: %ld: ", file->full_fname + , file->line); + put_line( file->buffer, fp_err); + } + } + file = file->parent; + } + + if (! macro_name) + goto free_arg; + /* Additional information of macro definitions */ + expanding_macro[ 0].name = macro_name; + for (ind = 0; ind <= exp_mac_ind; ind++) { + int ind_done; + + for (ind_done = 0; ind_done < ind; ind_done++) + if (str_eq( expanding_macro[ ind].name + , expanding_macro[ ind_done].name)) + break; /* Already reported */ + if (ind_done < ind) + continue; + for (file = infile; file; file = file->parent) + if (file->fp == NULL && file->filename + && str_eq( expanding_macro[ ind].name, file->filename)) + break; /* Already reported */ + if (file) + continue; + if ((defp = look_id( expanding_macro[ ind].name)) != NULL) { + if (defp->nargs <= DEF_NOARGS_STANDARD) + continue; /* Standard predefined */ + dump_a_def( " macro", defp, FALSE, TRUE, fp_err); + /* Macro already read over */ + } + } + +free_arg: + for (i = 0; i < 2; i++) + free( arg_t[ i]); +} + +void cfatal( + const char * format, + const char * arg1, + long arg2, + const char * arg3 +) +/* + * A real disaster. + */ +{ + do_msg( "fatal error", format, arg1, arg2, arg3); + longjmp( error_exit, -1); +} + +void cerror( + const char * format, + const char * arg1, + long arg2, + const char * arg3 +) +/* + * Print a error message. + */ +{ + do_msg( "error", format, arg1, arg2, arg3); + errors++; +} + +void cwarn( + const char * format, + const char * arg1, + long arg2, + const char * arg3 +) +/* + * Maybe an error. + */ +{ + do_msg( "warning", format, arg1, arg2, arg3); +} + +void dump_string( + const char * why, + const char * text +) +/* + * Dump text readably. + * Bug: macro argument number may be putout as a control character or any + * other character, just after MAC_PARM has been read away. + */ +{ + const char * cp; + const char * chr; + int c, c1, c2; + + if (why != NULL) + mcpp_fprintf( DBG, " (%s)", why); + mcpp_fputs( " => ", DBG); + + if (text == NULL) { + mcpp_fputs( "NULL", DBG); + return; + } + + for (cp = text; (c = *cp++ & UCHARMAX) != EOS; ) { + chr = NULL; + + switch (c) { + case MAC_PARM: + c = *cp++ & UCHARMAX; /* Macro parameter number */ + mcpp_fprintf( DBG, "<%d>", c); + break; + case MAC_INF: + if (! (mcpp_mode == STD && (mcpp_debug & MACRO_CALL))) + goto no_magic; + /* Macro informations inserted by -K option */ + c2 = *cp++ & UCHARMAX; + if (option_flags.v || c2 == MAC_CALL_START + || c2 == MAC_ARG_START) { + c = ((*cp++ & UCHARMAX) - 1) * UCHARMAX; + c += (*cp++ & UCHARMAX) - 1; + } + switch (c2) { + case MAC_CALL_START: + mcpp_fprintf( DBG, "", c); + break; + case MAC_CALL_END: + if (option_flags.v) + mcpp_fprintf( DBG, "", c); + else + chr = ""; + break; + case MAC_ARG_START: + c1 = *cp++ & UCHARMAX; + mcpp_fprintf( DBG, "", c, c1 - 1); + break; + case MAC_ARG_END: + if (option_flags.v) { + c1 = *cp++ & UCHARMAX; + mcpp_fprintf( DBG, "", c, c1 - 1); + } else { + chr = ""; + } + break; + } + break; + case DEF_MAGIC: + if (standard) { + chr = ""; + break; + } /* Else fall through */ + case CAT: + if (standard) { + chr = "##"; + break; + } /* Else fall through */ + case ST_QUOTE: + if (standard) { + chr = "#"; + break; + } /* Else fall through */ + case RT_END: + if (standard) { + chr = ""; + break; + } /* Else fall through */ + case IN_SRC: + if (standard) { + if ((mcpp_debug & MACRO_CALL) && ! in_directive) { + int num; + num = ((*cp++ & UCHARMAX) - 1) * UCHARMAX; + num += (*cp++ & UCHARMAX) - 1; + mcpp_fprintf( DBG, "", num); + } else { + chr = ""; + } + } else { /* Control character */ + mcpp_fprintf( DBG, "<^%c>", c + '@'); + } + break; + case TOK_SEP: + if (mcpp_mode == STD) { + chr = ""; + break; + } else if (mcpp_mode == OLD_PREP) { /* COM_SEP */ + chr = ""; + break; + } /* Else fall through */ + default: +no_magic: + if (c < ' ') + mcpp_fprintf( DBG, "<^%c>", c + '@'); + else + mcpp_fputc( c, DBG); + break; + } + + if (chr) + mcpp_fputs( chr, DBG); + } + + mcpp_fputc( '\n', DBG); +} + +void dump_unget( + const char * why +) +/* + * Dump all ungotten junk (pending macros and current input lines). + */ +{ + const FILEINFO * file; + + mcpp_fputs( "dump of pending input text", DBG); + if (why != NULL) { + mcpp_fputs( "-- ", DBG); + mcpp_fputs( why, DBG); + } + mcpp_fputc( '\n', DBG); + + for (file = infile; file != NULL; file = file->parent) + dump_string( file->real_fname ? file->real_fname + : file->filename ? file->filename : "NULL", file->bptr); +} + +static void dump_token( + int token_type, + const char * cp /* Token */ +) +/* + * Dump a token. + */ +{ + static const char * const t_type[] + = { "NAM", "NUM", "STR", "WSTR", "CHR", "WCHR", "OPE", "SPE" + , "SEP", }; + + mcpp_fputs( "token", DBG); + dump_string( t_type[ token_type - NAM], cp); +} + diff --git a/libraries/mcpp/src/system.H b/libraries/mcpp/src/system.H new file mode 100644 index 000000000..bd55770a0 --- /dev/null +++ b/libraries/mcpp/src/system.H @@ -0,0 +1,396 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * S Y S T E M . H + * S y s t e m D e p e n d e n t + * D e f i n i t i o n s f o r M C P P + * + * Definitions in this file may be edited to configure MCPP for particular + * operating systems and compiler configurations. + * + * Note: MCPP assumes the system implement the Ascii character set. + * If this is not the case, you will have to do some editing here and there. + */ + +#define SYSTEM_H + +#if HAVE_CONFIG_H +#include "configed.H" +#else +#include "noconfig.H" +#endif + +/* Some system has a wrong definition of UCHAR_MAX. See cpp-test.html#5.1.3 */ +#if UCHARMAX < -255 +/* The definition of UCHARMAX (possibly UCHAR_MAX too) is wrong. */ +/* Define it as a signed int value, not as an unsigned value. */ +#undef UCHARMAX +#define UCHARMAX ((1 << CHAR_BIT) - 1) +#endif + +/* + * PART 1 and PART 2 are defined in the above header files. + */ + +/* + * P A R T 1 Configurations for target-operating-system + * and target-compiler. + */ + +/* + * P A R T 2 Configurations for host-compiler. + */ + +/* + * P A R T 3 Configurations for default settings, typedefs and + * translation limits. + */ + +/* + * The variable 'mcpp_mode' specifies the mode of preprocessing as one of + * OLD_PREP, KR, STD, or POST_STD. + * Those modes have many differences each other -- + * i.e. handling of translation phases; handling of some + * preprocessing tokens; availability of some directives; way of + * macro expansion; + * -- as follows. + * + * KR Actual arguments of a macro are expanded (after substitution) + * with rest of the replacement text and the subsequent source text. + * ## in macro definition has no significance to cpp. The surrounding + * tokens are macro-expanded separately. Also, # has no significance + * to cpp. The following token is expanded. + * Directly or intermediately recursive macro call causes an error. + * sequence is deleted only in string literals + * and in #define directive lines. + * sizeof (type) can be used in #if line. + * KR corresponds to the "K&R 1st." + * + * OLD_PREP In addition to the KR specifications, this mode has the + * following characteristics (and some others). + * Converts comment to 0 space instead of 1 space. + * Expands the parameter like spelling in string literal as a macro. + * Does not check unmatched pair of '"' or '\''. + * OLD_PREP corresponts to "Reiser model" cpp. + * + * STD Standard conforming mode. + * sequence is always deleted after trigraph + * conversion and before tokenization. + * Digraph sequences are recognized as tokens. + * Actual arguments of a macro are expanded separately prior to + * re-scanning of the replacement text. + * The name in the replacement text once expanded is not re-expanded, + * thus preventing recursive death. + * ## in macro definition concatenates tokens. The tokens are not + * expanded. The concatenated token is expanded by rescanning. + * # in macro definition stringizes the following argument. The argument + * is not expanded. \ is inserted before " and \ in or surrounding + * the string literal or character constant. + * An expanded macro is surrounded by spaces to prevent unintended + * token merging. + * + * POST_STD This mode simplifies the behavior of STD mode as follows. + * 1. Digraph sequences are converted in translation phase 1, as + * alternate characters rather than as tokens. + * 2. A space is inserted as a token separator between any tokens in + * a source (except a macro name and the next '(' in macro + * definition): thus simplifying tokenization, test of macro + * redefinition and macro expansion, especially "stringization". + * 3. Test of macro redefinition ignores difference of parameter names, + * test of which has little utility and not a little overhead. + * 4. #if expression forbids character constants, which have little + * portability, little utility and not a little overhead. + * 5. Rescanning of a macro expansion is limited in the replacement + * text, rest of the source file is not scanned, thus making the + * syntax of "function-like" macro call more similar to that of + * function call. + * 6. Argument of #include directive in form is an obsolescent + * feature. + * 7. '$' or so are not treated specially in #define directive. + * 8. Trigraphs, UCN (universal-character name) are not recognized. + * 9. Multi-byte characters in an identifier are not recognized. + * + * The following specifications are available when mode is STD or POST_STD. + * preprocessing number token, digraphs, + * #pragma (#pragma MCPP put_defines, #pragma MCPP warning + * , #pragma MCPP debug) directive, + * #error directive, + * #if defined operator, #elif directive, + * predefined macros __FILE__, __LINE__, __DATE__, __TIME__ + * , __STDC__, __STDC_VERSION__, __STDC_HOSTED__, + * wide character constant, wide character string literal, + * _Pragma() operator, variable-arguments macro, + * macro as an argument of #include, #line directives, + * escape sequences \x[hex-digits], \a, \v, + * '+' option (C++ preprocessing), + * 'S' option (re-defines __STDC__ as , unpredefine some macros), + * 'V' option (re-defines __STDC_VERSION__ or __cplusplus as ), + * 'h' option (re-defines __STDC_HOSTED__ as ). + * The following specifications are available only in STD mode. + * Trigraphs and UCN, + * Multi-byte characters in an identifier. + * The following specifications are available only in KR and OLD_PREP modes. + * #assert, #asm, #endasm, #put_defines, #debug and some other older + * directives, + * argument of #line directive other than decimal-digits. + */ + +/* The values of 'mcpp_mode'. */ +#define OLD_PREP 1 /* "Reiser" cpp mode */ +#define KR 2 /* K&R 1st mode */ +#define STD 3 /* Standard moce */ +#define POST_STD 9 /* Special mode of MCPP */ + +/* + * TRIGRAPHS_INIT Initial value for the -3 option. If TRUE -3 + * disables trigraphs, if FALSE -3 enables them. + * DIGRAPHS_INIT Initial value for the -2 option. If TRUE -2 + * disables digraphs, if FALSE -2 enables them. + * OK_UCN Enable recognition of Universal-Character-Name sequence + * by -V199901L option. + * OK_MBIDENT Enable multi-byte characters in identifier by -V199901L + * option. + * EXPAND_PRAGMA Enable macro expansion of #pragma line (even in modes + * other than C99). + * expr_t, uexpr_t Type of maximum integer: + * long long (unsigned long long) or longer. + * EXPR_MAX should be defined to the maximum value of uexpr_t. + */ +#define TRIGRAPHS_INIT FALSE +#define DIGRAPHS_INIT FALSE +#ifndef EXPAND_PRAGMA +#define EXPAND_PRAGMA FALSE +#endif +#define OK_UCN TRUE +#define OK_MBIDENT FALSE + +#if HAVE_INTMAX_T +#if HAVE_STDINT_H +#include "stdint.h" +#elif HAVE_INTTYPES_H +#include "inttypes.h" +#endif +typedef intmax_t expr_t; +typedef uintmax_t uexpr_t; +#else +#if HAVE_LONG_LONG +#if (HOST_COMPILER == MSC && _MSC_VER < 1500) || HOST_COMPILER == BORLANDC +typedef __int64 expr_t; +typedef unsigned __int64 uexpr_t; +#else +typedef long long expr_t; +typedef unsigned long long uexpr_t; +#endif +#else /* !HAVE_LONG_LONG */ +typedef unsigned long uexpr_t; +typedef long expr_t; +#endif /* HAVE_LONG_LONG */ +#endif /* HAVE_INTMAX_T */ + +#if HAVE_INTMAX_T +#define EXPR_MAX UINTMAX_MAX +#elif HAVE_LONG_LONG +#if (HOST_COMPILER == MSC && _MSC_VER < 1400) || HOST_COMPILER == BORLANDC +#define EXPR_MAX 0xFFFFFFFFFFFFFFFFui64 +#else +#define EXPR_MAX 0xFFFFFFFFFFFFFFFFULL +#endif +#else +#define EXPR_MAX 4294967295UL +#endif + +/* + * Translation limits. + * The following definitions are used to allocate memory for work buffers. + * + * NWORK Output buffer size. Set this size according to your compiler- + * proper. Length of string literal should be less than NWORK + * - 1. + * Nevertheless, when COMPILER == GNUC || COMPILER == MSC, mcpp + * uses NMACWORK as output buffer size because GNUC and Visual C + * can accept very long line. + * NBUFF Input buffer size after line concatenation by + * . + * NMACWORK Internal work buffer size for macro definition and expansion. + * IDMAX The longest identifier length. + * NMACPARS The maximum number of #define parameters. + * NOTE: Must be NMACPARS <= UCHARMAX. + * NEXP The maximum nesting depth of #if expressions. + * BLK_NEST The number of nested #if's permitted. + * INCLUDE_NEST The maximum nesting depth of #include. This is needed to + * prevent infinite recursive inclusion. + * RESCAN_LIMIT The maximum rescan times of macro expansion in STD or POST_STD + * modes. + * PRESTD_RESCAN_LIMIT The maximum rescan times of macro expansion in KR or + * OLD_PREP modes.. + * + * NBUFF should not be smaller than NWORK. + * NMACWORK should not be smaller than NWORK * 2. + * + * SBSIZE defines the number of hash-table slots for the macro symbol table. + * It must be a power of 2. + * + * MKDEP_INIT The initial maximum number of filenames in a dependency line + * of output of -M* option. The maximum number is dynamically + * enlarged in execution. + */ + +#ifndef IDMAX +#define IDMAX 0x400 +#endif +#ifndef NMACPARS +#define NMACPARS 0xFF +#endif +#ifndef NEXP +#define NEXP 0x100 +#endif +#ifndef BLK_NEST +#define BLK_NEST 0x100 +#endif +#ifndef INCLUDE_NEST +#define INCLUDE_NEST 0x100 +#endif +#ifndef RESCAN_LIMIT +#define RESCAN_LIMIT 0x40 +#endif +#ifndef PRESTD_RESCAN_LIMIT +#define PRESTD_RESCAN_LIMIT 0x100 +#endif +#ifndef NBUFF +#define NBUFF 0x10000 /* Must be NWORK <= NBUFF */ +#endif +#ifndef NWORK +#define NWORK NBUFF /* 0x1000, 0x4000, 0x10000, .. */ +#endif +#ifndef NMACWORK +#define NMACWORK (NWORK * 4) /* Must be NWORK * 2 <= NMACWORK */ +#endif +#ifndef SBSIZE +#define SBSIZE 0x400 +#endif +#ifndef MKDEP_INIT +#define MKDEP_INIT 0x100 +#endif + +#if UCHARMAX < NMACPARS + #error "NMACPARS should not be greater than UCHARMAX" +#endif + +#if NBUFF < NWORK + #error "NBUFF must be same or greater than NWORK" +#endif +#if NMACWORK < NWORK * 2 + #error "NMACWORK must be same or greater than NWORK * 2" +#endif + +#define SBMASK (SBSIZE - 1) +#if (SBSIZE ^ SBMASK) != ((SBSIZE * 2) - 1) + #error "SBSIZE must be a power of 2 !" +#endif + +/* + * Translation limits required by the Standard. + * + * *90MIN limits specified by C90. + * *99MIN limits specified by C99. + * *_CPLUS_MIN limits recommended by C++ (ISO 1998/07 Standard). + * + * SLEN*MIN Characters in a logical source line + * and characters in a string literal or wide string literal + * (after concatenation). + * IDLEN*MIN Significant initial characters in an internal identifier + * or a macro name. + * NMACPARS*MIN Parameters in one macro definition. + * Arguments in one macro invocation. + * EXP_NEST*MIN Nesting levels of parenthesized expressions in a full + * expression. + * BLK_NEST*MIN Nesting levels of conditional inclusion. + * INCLUDE_NEST*MIN Nesting levels for #include files. + * NMACRO*MIN Macro identifiers simultaneously defined in one translation + * unit. + */ +#define SLEN90MIN 0x1FD +#define IDLEN90MIN 0x1F +#define NMACPARS90MIN 0x1F +#define EXP_NEST90MIN 0x20 +#define BLK_NEST90MIN 8 +#define INCLUDE_NEST90MIN 8 +#define NMACRO90MIN 0x400 + +#define SLEN99MIN 0xFFF +#define IDLEN99MIN 0x3F +#define NMACPARS99MIN 0x7F +#define EXP_NEST99MIN 0x3F +#define BLK_NEST99MIN 0x3F +#define INCLUDE_NEST99MIN 0xF +#define NMACRO99MIN 0xFFF + +#define SLEN_CPLUS_MIN 0x10000 +#define IDLEN_CPLUS_MIN 0x400 +#define NMACPARS_CPLUS_MIN 0x100 +#define EXP_NEST_CPLUS_MIN 0x100 +#define BLK_NEST_CPLUS_MIN 0x100 +#define INCLUDE_NEST_CPLUS_MIN 0x100 +#define NMACRO_CPLUS_MIN 0x10000 + +/* LINE99LIMIT means the line number limit of C99 */ +#define LINE99LIMIT 0x7FFFFFFF + +/* + * STDC This macro is used for the predefined __STDC__. + * STDC_VERSION is used for the value of __STDC_VERSION__. + * STDC_HOSTED is used for the value of __STDC_HOSTED__. + */ +#if IDMAX < IDLEN90MIN || NBUFF < SLEN90MIN + 3 + || NWORK < SLEN90MIN + 2 || NMACPARS < NMACPARS90MIN + || NEXP < EXP_NEST90MIN || BLK_NEST < BLK_NEST90MIN +#define STDC 0 +#endif +#ifndef STDC +#define STDC 1 /* 1 : for ISO 9899:1990 or later */ +#endif + +#ifndef STDC_VERSION +#define STDC_VERSION 0L /* 199409L : For conforming + implementation to ISO 9899:1990 / Amendment 1:1995 + 199901L : For C99 */ +#endif +#ifndef STDC_HOSTED +#define STDC_HOSTED 1 /* 1 : for hosted implementation, + 0 : for free-standing implementation (C99 specification) */ +#endif + +/* + * CPLUS specifies the default value of the pre-defined macro __cplusplus + * for C++ processing. + * The value can be changed by -V option. + */ +#define CPLUS 1 /* 199711L for C++ Standard */ + diff --git a/libraries/mcpp/src/system.c b/libraries/mcpp/src/system.c new file mode 100644 index 000000000..475946900 --- /dev/null +++ b/libraries/mcpp/src/system.c @@ -0,0 +1,4913 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * Some parts of this code are derived from the public domain software + * DECUS cpp (1984,1985) written by Martin Minow. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * S Y S T E M . C + * S y s t e m D e p e n d e n t R o u t i n e s + * + * Routines dependent on O.S., compiler or compiler-driver. + * To port MCPP for the systems not yet ported, you must + * 1. specify the constants in "configed.H" or "noconfig.H", + * 2. append the system-dependent routines in this file. + */ +#if PREPROCESSED +#include "mcpp.H" +#else +#include "system.H" +#include "internal.H" +#endif + +#if HOST_SYS_FAMILY == SYS_UNIX +#include "unistd.h" /* For getcwd(), readlink() */ +#elif HOST_COMPILER == MSC || HOST_COMPILER == LCC +#include "direct.h" +#define getcwd( buf, size) _getcwd( buf, size) +#elif HOST_COMPILER == BORLANDC +#include "dir.h" +#endif + +#include "sys/types.h" +#include "sys/stat.h" /* For stat() */ +#if ! defined( S_ISREG) +#define S_ISREG( mode) (mode & S_IFREG) +#define S_ISDIR( mode) (mode & S_IFDIR) +#endif +#if HOST_COMPILER == MSC +#define S_IFREG _S_IFREG +#define S_IFDIR _S_IFDIR +#define stat( path, stbuf) _stat( path, stbuf) +#endif + +/* Function to compare path-list */ +#if FNAME_FOLD +#if HOST_COMPILER == GNUC /* CYGWIN, MINGW, MAC */ +#include /* POSIX 1, 2001 */ +#define str_case_eq( str1, str2) (strcasecmp( str1, str2) == 0) +#else /* MSC, BORLANDC, LCC */ +#if HOST_COMPILER == MSC +#define stricmp( str1, str2) _stricmp( str1, str2) +#endif +#define str_case_eq( str1, str2) (stricmp( str1, str2) == 0) +#endif +#else /* ! FNAME_FOLD */ +#define str_case_eq( str1, str2) (strcmp( str1, str2) == 0) +#endif + +/* + * PATH_DELIM is defined for the O.S. which has single byte path-delimiter. + * Note: '\\' or any other character identical to second byte of MBCHAR should + * not be used for PATH_DELIM for convenience of path-list parsing. + */ +#if SYS_FAMILY == SYS_UNIX || SYS_FAMILY == SYS_WIN || SYSTEM == SYS_UNKNOWN +#define PATH_DELIM '/' +#define SPECIAL_PATH_DELIM FALSE +#else /* Any other path-delimiter, define PATH_DELIM by yourself */ +#define SPECIAL_PATH_DELIM TRUE /* Any path-delimiter other than '/' */ +#endif + +/* + * OBJEXT is the suffix to denote "object" file. + */ +#ifndef OBJEXT +#if SYS_FAMILY == SYS_UNIX || HOST_COMPILER == GNUC +#define OBJEXT "o" +#elif SYS_FAMILY == SYS_WIN +#define OBJEXT "obj" +#elif 1 +/* Add here appropriate definitions for other systems. */ +#endif +#endif + +static void version( void); + /* Print version message */ +static void usage( int opt); + /* Putout usage of MCPP */ +static void set_opt_list( char * optlist); + /* Set list of legal option chars */ +static int parse_warn_level( const char * mcpp_optarg, int opt); + /* Parse warning level option */ +static void def_a_macro( int opt, char * def); + /* Do a -D option */ +static void chk_opts( int sflag, int trad); + /* Check consistency of options */ +#if COMPILER != GNUC +static void init_cpu_macro( int gval, int sse); + /* Predefine CPU-dependent macros */ +#endif +static void init_predefines( void); + /* Set and unset predefined macros */ +static void init_std_defines( void); + /* Predefine Standard macros */ +static void set_limit( void); + /* Set minimum translation limits */ +static void set_pragma_op( void); + /* Set the _Pragma() operator */ +static void put_info( FILEINFO * sharp_file); + /* Print compiler-specific-inf */ +static char * set_files( int argc, char ** argv, char ** in_pp + , char ** out_pp); + /* Set input, output, diagnostic */ +static void set_sys_dirs( int set_cplus_dir); + /* Set system-specific include dirs */ +static void set_env_dirs( void); + /* Set user-defined include dirs */ +static void parse_env( const char * env); + /* Parse environment variables */ +static void set_a_dir( const char * dirname); + /* Append an include directory */ +static char * norm_dir( const char * dirname, int framework); + /* Normalize include directory path */ +static char * norm_path( const char * dir, const char * fname, int inf + , int hmap); /* Normalize pathname to compare */ +#if SYS_FAMILY == SYS_UNIX +static void deref_syml( char * slbuf1, char * slbuf2, char * chk_start); + /* Dereference symbolic linked directory and file */ +#endif +#if COMPILER == GNUC +static void init_gcc_macro( void); + /* Predefine GCC-specific macros */ +static void chk_env( void); + /* Check the environment variables */ +#elif COMPILER == MSC +static void init_msc_macro( void); + /* Predefine Visual C-specific macros */ +#endif +static void def_macros( void); + /* Define macros specified by -D */ +static void undef_macros( void); + /* Undefine macros specified by -U */ +static char * md_init( const char * filename, char * output); + /* Initialize makefile dependency */ +static char * md_quote( char * output); + /* 'Quote' special characters */ +static int open_include( char * filename, int searchlocal, int next); + /* Open the file to include */ +static int has_directory( const char * source, char * directory); + /* Get directory part of fname */ +static int is_full_path( const char * path); + /* The path is absolute path list ? */ +static int search_dir( char * filename, int searchlocal, int next); + /* Search the include directories */ +static int open_file( const char ** dirp, const char * src_dir + , const char * filename, int local, int include_opt, int sys_frame); + /* Open a source file */ +static const char * set_fname( const char * filename); + /* Remember the source filename */ +#if SYSTEM == SYS_MAC +#if COMPILER == GNUC +static char * search_header_map( const char * hmap_file + , const char * filename, char * pathlist); + /* Search header map file for a header */ +static unsigned hmap_hash( const char * fname); + /* Get hash value for the fname */ +#endif +static void init_framework( void); + /* Initialize framework[] */ +static int search_framework( char * filename); + /* Search "Framework" directories */ +static int search_subdir( char * fullname, char * cp, char * frame + , char * fname, int sys_frame); + /* Search "Headers" and other dirs */ +#endif /* SYSTEM == SYS_MAC */ +#if 0 /* This function is only for debugging use */ +static int chk_dirp( const char ** dirp); + /* Check validity of dirp arg for open_file() */ +#endif +static void cur_file( FILEINFO * file, FILEINFO * sharp_file, int marker); + /* Output current source file name */ +#if SYS_FAMILY == SYS_WIN +static char * bsl2sl( char * filename); + /* Convert \ to / in path-list */ +#endif +static int is_junk( void); + /* The directive has trailing junk? */ +static void do_once( const char * fullname); + /* Process #pragma once */ +static int included( const char * fullname); + /* The file has been once included? */ +static void push_or_pop( int direction); + /* Push or pop a macro definition */ +static int do_prestd_directive( void); + /* Process pre-Standard directives */ +static void do_preprocessed( void); + /* Process preprocessed file */ +static int do_debug( int set); + /* #pragma MCPP debug, #debug */ +static void dump_path( void); + /* Print include search path */ +static void do_asm( int asm_start); + /* Process #asm, #endasm */ +static int mcpp_getopt( int argc, char * const * argv, const char * opts); + /* getopt() to prevent linking of glibc getopt */ + +/* for mcpp_getopt() */ +static int mcpp_optind = 1; +static int mcpp_opterr = 1; +static int mcpp_optopt; +static char * mcpp_optarg; + +static int mb_changed = FALSE; /* Flag of -e option */ +static char cur_work_dir[ PATHMAX + 1]; /* Current working directory*/ + +/* + * incdir[] stores the -I directories (and the system-specific #include <...> + * directories). This is set by set_a_dir(). A trailing PATH_DELIM is + * appended if absent. + */ +static const char ** incdir; /* Include directories */ +static const char ** incend; /* -> active end of incdir */ +static int max_inc; /* Number of incdir[] */ + +typedef struct inc_list { /* List of directories or files */ + char * name; /* Filename or directory-name */ + size_t len; /* Length of 'name' */ +} INC_LIST; + +/* + * fnamelist[] stores the souce file names opened by #include directive for + * debugging information. + */ +static INC_LIST * fnamelist; /* Source file names */ +static INC_LIST * fname_end; /* -> active end of fnamelist */ +static int max_fnamelist; /* Number of fnamelist[] */ + +/* once_list[] stores the #pragma once file names. */ +static INC_LIST * once_list; /* Once opened file */ +static INC_LIST * once_end; /* -> active end of once_list */ +static int max_once; /* Number of once_list[] */ + +#define INIT_NUM_INCLUDE 32 /* Initial number of incdir[] */ +#define INIT_NUM_FNAMELIST 256 /* Initial number of fnamelist[] */ +#define INIT_NUM_ONCE 64 /* Initial number of once_list[] */ + +/* + * 'search_rule' holds searching rule of #include "header.h" to search first + * before searching user specified or system-specific include directories. + * 'search_rule' is initialized to SEARCH_INIT. It can be changed by -I1, -I2 + * or -I3 option. -I1 specifies CURRENT, -I2 SOURCE and -I3 both. + */ + +static int search_rule = SEARCH_INIT; /* Rule to search include file */ + +static int nflag = FALSE; /* Flag of -N (-undef) option */ +static long std_val = -1L; /* Value of __STDC_VERSION__ or __cplusplus */ + +#define MAX_DEF 256 +#define MAX_UNDEF (MAX_DEF/4) +static char * def_list[ MAX_DEF]; /* Macros to be defined */ +static char * undef_list[ MAX_UNDEF]; /* Macros to be undefined */ +static int def_cnt; /* Count of def_list */ +static int undef_cnt; /* Count of undef_list */ + +/* Values of mkdep. */ +#define MD_MKDEP 1 /* Output source file dependency line */ +#define MD_SYSHEADER 2 /* Print also system-header names */ +#define MD_FILE 4 /* Output to the file named *.d */ +#define MD_PHONY 8 /* Print also phony targets for each header */ +#define MD_QUOTE 16 /* 'Quote' $ and space in target name */ + +static FILE * mkdep_fp; /* For -Mx option */ +static char * mkdep_target; + /* For -MT TARGET option and for GCC's queer environment variables. */ +static char * mkdep_mf; /* Argument of -MF option */ +static char * mkdep_md; /* Argument of -MD option */ +static char * mkdep_mq; /* Argument of -MQ option */ +static char * mkdep_mt; /* Argument of -MT option */ + +/* sharp_filename is filename for #line line, used only in cur_file() */ +static char * sharp_filename = NULL; +static char * argv0; /* argv[ 0] for usage() and version() */ +static int ansi; /* __STRICT_ANSI__ flag for GNUC */ +static int compat_mode; + /* "Compatible" mode of recursive macro expansion */ +#define MAX_ARCH_LEN 16 +static char arch[ MAX_ARCH_LEN]; /* -arch or -m64, -m32 options */ + +#if COMPILER == GNUC +#define N_QUOTE_DIR 8 +/* quote_dir[]: Include directories for "header" specified by -iquote */ +/* quote_dir_end: Active end of quote_dir */ +static const char * quote_dir[ N_QUOTE_DIR]; +static const char ** quote_dir_end = quote_dir; +/* sys_dirp indicates the first directory to search for system headers. */ +static const char ** sys_dirp = NULL; /* System header directory */ +static const char * sysroot = NULL; /* Logical root directory of header */ +static int i_split = FALSE; /* For -I- option */ +static int gcc_work_dir = FALSE; /* For -fworking-directory */ +static int gcc_maj_ver; /* __GNUC__ */ +static int gcc_min_ver; /* __GNUC_MINOR__ */ +static int dDflag = FALSE; /* Flag of -dD option */ +static int dMflag = FALSE; /* Flag of -dM option */ +#endif + +#if COMPILER == GNUC || COMPILER == MSC +/* + * preinclude points to the file specified by -include (-Fl for MSC) option, + * which is included prior to the main input file. + */ +#define NPREINCLUDE 8 +static char * preinclude[ NPREINCLUDE]; /* File to pre-include */ +static char ** preinc_end = preinclude; /* -> active end of preinclude */ +#endif + +#if COMPILER == MSC +static int wchar_t_modified = FALSE; /* -Zc:wchar_t flag */ +#endif + +#if COMPILER == LCC +static const char * optim_name = "__LCCOPTIMLEVEL"; +#endif + +#if SYSTEM == SYS_CYGWIN +static int no_cygwin = FALSE; /* -mno-cygwin */ + +#elif SYSTEM == SYS_MAC +#define MAX_FRAMEWORK 8 +static char * framework[ MAX_FRAMEWORK]; /* Framework directories*/ +static int num_framework; /* Current number of framework[] */ +static int sys_framework; /* System framework dir */ +static const char ** to_search_framework; + /* Search framework[] next to the directory */ +static int in_import; /* #import rather than #include */ +#endif + +#define NO_DIR FALSE +#if NO_DIR +/* Unofficial feature to strip directory part of include file */ +static int no_dir; +#endif + +#if MCPP_LIB +void init_system( void) +/* Initialize static variables */ +{ + if (sharp_filename) + free( sharp_filename); + sharp_filename = NULL; + incend = incdir = NULL; + fnamelist = once_list = NULL; + search_rule = SEARCH_INIT; + mb_changed = nflag = ansi = compat_mode = FALSE; + mkdep_fp = NULL; + mkdep_target = mkdep_mf = mkdep_md = mkdep_mq = mkdep_mt = NULL; + std_val = -1L; + def_cnt = undef_cnt = 0; + mcpp_optind = mcpp_opterr = 1; +#if COMPILER == GNUC + sys_dirp = NULL; + sysroot = NULL; + gcc_work_dir = i_split = FALSE; + quote_dir_end = quote_dir; + dDflag = dMflag = FALSE; +#endif +#if COMPILER == MSC + wchar_t_modified = FALSE; +#endif +#if COMPILER == GNUC || COMPILER == MSC + preinc_end = preinclude; +#endif +#if SYSTEM == SYS_CYGWIN + no_cygwin = FALSE; +#elif SYSTEM == SYS_MAC + num_framework = sys_framework = 0; + to_search_framework = NULL; +#endif +#if NO_DIR + no_dir = FALSE; +#endif +} + +#endif + +#define OPTLISTLEN 80 + +void do_options( + int argc, + char ** argv, + char ** in_pp, /* Input file name */ + char ** out_pp /* Output file name */ +) +/* + * Process command line arguments, called only at MCPP startup. + */ +{ + char optlist[ OPTLISTLEN]; /* List of option letter*/ + const char * warning = "warning: -%c%s option is ignored\n"; + int opt; + int unset_sys_dirs; + /* Unset system-specific and site-specific include directories ? */ + int set_cplus_dir; /* Set C++ include directory ? (for GCC)*/ + int show_path; /* Show include directory list */ + DEFBUF * defp; + VAL_SIGN * valp; + int sflag; /* -S option or similar */ + int trad; /* -traditional */ + int old_mode; /* backup of 'mcpp_mode'*/ + int gval, sse; + char * cp; + int i; +#if COMPILER == GNUC +#define NSYSDIR 8 + /* System include directory specified by -isystem */ + char * sysdir[ NSYSDIR] = { NULL, }; + char ** sysdir_end = sysdir; + int integrated_cpp; /* Flag of cc1 which integrates cpp in it */ +#elif COMPILER == LCC + const char * debug_name = "__LCCDEBUGLEVEL"; +#endif + + argv0 = argv[ 0]; + nflag = unset_sys_dirs = show_path = sflag = trad = FALSE; + arch[ 0] = 0; + gval = sse = 0; + set_cplus_dir = TRUE; + + /* Get current directory for -I option and #pragma once */ + getcwd( cur_work_dir, PATHMAX); +#if SYS_FAMILY == SYS_WIN + bsl2sl( cur_work_dir); +#endif + sprintf( cur_work_dir + strlen( cur_work_dir), "%c%c", PATH_DELIM, EOS); + /* Append trailing path-delimiter */ + +#if COMPILER == GNUC + defp = look_id( "__GNUC__"); /* Already defined by init_defines() */ + gcc_maj_ver = atoi( defp->repl); + defp = look_id( "__GNUC_MINOR__"); + gcc_min_ver = atoi( defp->repl); + integrated_cpp = ((gcc_maj_ver == 3 && gcc_min_ver >= 3) + || gcc_maj_ver == 4); +#endif +#if COMPILER == GNUC || COMPILER == MSC + option_flags.dollar_in_name = TRUE; + /* GCC and Visual C allows '$' in name by default */ +#endif + + set_opt_list( optlist); + +opt_search: ; + while (mcpp_optind < argc + && (opt = mcpp_getopt( argc, argv, optlist)) != EOF) { + + switch (opt) { /* Command line option character */ + +#if COMPILER == GNUC + case '$': /* Forbid '$' in identifier */ + option_flags.dollar_in_name = FALSE; + break; +#endif + + case '+': +#if COMPILER == GNUC +plus: +#endif + if (cplus_val || sflag) { + mcpp_fputs( "warning: -+ option is ignored\n", ERR); + break; + } + cplus_val = CPLUS; + break; +#if COMPILER == GNUC + case '-': + if (memcmp( mcpp_optarg, "sysroot", 7) == 0) { + if (mcpp_optarg[ 7] == '=') /* --sysroot=DIR */ + sysroot = mcpp_optarg + 8; + else if (mcpp_optarg[ 7] == EOS) /* --sysroot DIR */ + sysroot = argv[ mcpp_optind++]; + else + usage( opt); + break; + } else { + usage( opt); + } +#endif + case '2': /* Reverse digraphs recognition */ + option_flags.dig = ! option_flags.dig; + break; + case '3': /* Reverse trigraph recogniion */ + option_flags.trig = ! option_flags.trig; + break; + + case '@': /* Special preprocessing mode */ + old_mode = mcpp_mode; + if (str_eq( mcpp_optarg, "post") + || str_eq( mcpp_optarg, "poststd")) + mcpp_mode = POST_STD; /* 'post-Standard' mode */ + else if (str_eq( mcpp_optarg, "old") + || str_eq( mcpp_optarg, "oldprep")) + mcpp_mode = OLD_PREP; /* 'old-Preprocessor' mode */ + else if (str_eq( mcpp_optarg, "kr")) + mcpp_mode = KR; /* 'K&R 1st' mode */ + else if (str_eq( mcpp_optarg, "std")) + mcpp_mode = STD; /* 'Standard' mode (default)*/ + else if (str_eq( mcpp_optarg, "compat")) { + compat_mode = TRUE; /* 'compatible' mode */ + mcpp_mode = STD; + } + else + usage( opt); + standard = (mcpp_mode == STD || mcpp_mode == POST_STD); + if (old_mode != STD && old_mode != mcpp_mode) + mcpp_fprintf( ERR, "Mode is redefined to: %s\n", mcpp_optarg); + break; + +#if COMPILER == GNUC + case 'A': /* Ignore -A system(gnu), -A cpu(vax) or so */ + break; + case 'a': + if (str_eq( mcpp_optarg, "nsi")) { /* -ansi */ + look_and_install( "__STRICT_ANSI__", DEF_NOARGS_PREDEF, null + , "1"); + ansi = TRUE; + break; + } else if (memcmp( mcpp_optarg, "uxbase", 6) == 0) { + mcpp_optind++; + break; /* Ignore '-auxbase some' or such nonsence */ +#if SYSTEM == SYS_MAC + } else if (str_eq( mcpp_optarg, "rch")) { /* -arch */ + strcpy( arch, argv[ mcpp_optind++]); + if (str_eq( arch, "ppc") || str_eq( arch, "ppc7400") + || str_eq( arch, "ppc64") + || str_eq( arch, "i386") || str_eq( arch, "i686") + || str_eq( arch, "x86_64") || str_eq( arch, "amd64")) { + if (str_eq( arch, "i686")) + strcpy( arch, "i386"); + else if (str_eq( arch, "amd64")) + strcpy( arch, "x86_64"); + else if (str_eq( arch, "ppc7400")) + strcpy( arch, "ppc"); + break; + } /* Else usage() */ +#endif + } + usage( opt); +#elif COMPILER == MSC + case 'a': + if (memcmp( mcpp_optarg, "rch", 3) == 0) { + if (str_eq( mcpp_optarg + 3, ":SSE") /* -arch:SSE */ + || str_eq( mcpp_optarg + 3, ":sse")) + sse = 1; + else if (str_eq( mcpp_optarg + 3, ":SSE2") /* -arch:SSE2 */ + || str_eq( mcpp_optarg + 3, ":sse2")) + sse = 2; + /* Else ignore */ + } else { + usage( opt); + } + break; + + case 'A': + option_flags.lang_asm = TRUE; /* "assembler" source */ + break; +#else + case 'a': + option_flags.lang_asm = TRUE; /* "assembler" source */ + break; +#endif + +#if ! STD_LINE_PREFIX + case 'b': + std_line_prefix = TRUE; /* Putout line and file infor- */ + break; /* mation in C source style. */ +#endif + + case 'C': /* Keep comments */ + option_flags.c = TRUE; + break; + +#if COMPILER == GNUC + case 'c': + if (! integrated_cpp) + usage( opt); + break; /* Else ignore this option */ + case 'd': + if (str_eq( mcpp_optarg, "M")) { /* -dM */ + dMflag = TRUE; + no_output++; + } else if (str_eq( mcpp_optarg, "D")) { /* -dD */ + dDflag = TRUE; + } else if (str_eq( mcpp_optarg, "igraphs")) { /* -digraphs */ + option_flags.dig = TRUE; + } else if (str_eq( mcpp_optarg, "umpbase")) { /* -dumpbase */ + ; /* Ignore */ + } else { + usage( opt); + } + break; +#endif /* COMPILER == GNUC */ + + case 'D': /* Define symbol */ + if (def_cnt >= MAX_DEF) { + mcpp_fputs( "Too many -D options.\n", ERR); + longjmp( error_exit, -1); + } + def_list[ def_cnt++] = mcpp_optarg; + break; + + case 'e': + /* Change the default MBCHAR encoding */ + if (set_encoding( mcpp_optarg, FALSE, 0) == NULL) + usage( opt); + mb_changed = TRUE; + break; + +#if COMPILER == GNUC + case 'E': + if (! integrated_cpp) + usage( opt); + break; /* Ignore this option */ + case 'f': + if (memcmp( mcpp_optarg, "input-charset=", 14) == 0) { + /* Treat -finput-charset= as the same option as -e */ + if (set_encoding( mcpp_optarg + 14, FALSE, 0) == NULL) + usage( opt); + mb_changed = TRUE; + } else if (str_eq( mcpp_optarg, "working-directory")) { + gcc_work_dir = TRUE; + } else if (str_eq( mcpp_optarg, "no-working-directory")) { + gcc_work_dir = FALSE; + } else if (str_eq( mcpp_optarg, "stack-protector")) { + look_and_install( "__SSP__", DEF_NOARGS_PREDEF, null, "1"); + } else if (str_eq( mcpp_optarg, "stack-protector-all")) { + look_and_install( "__SSP_ALL__", DEF_NOARGS_PREDEF, null, "2"); + } else if (str_eq( mcpp_optarg, "exceptions")) { + look_and_install( "__EXCEPTIONS", DEF_NOARGS_PREDEF, null + , "1"); + } else if (str_eq( mcpp_optarg, "no-exceptions")) { + undef_list[ undef_cnt++] = "__EXCEPTIONS"; + } else if (str_eq( mcpp_optarg, "PIC") + || str_eq( mcpp_optarg, "pic") + || str_eq( mcpp_optarg, "PIE") + || str_eq( mcpp_optarg, "pie")) { + look_and_install( "__PIC__", DEF_NOARGS_PREDEF, null, "1"); + look_and_install( "__pic__", DEF_NOARGS_PREDEF, null, "1"); + } else if (str_eq( mcpp_optarg, "no-dollars-in-identifiers")) { + option_flags.dollar_in_name = FALSE; + } else if (str_eq( mcpp_optarg, "no-show-column")) { + ; /* Ignore this option */ + } else if (! integrated_cpp) { + usage( opt); + } + break; + + case 'g': + if (!isdigit( *mcpp_optarg) + && str_eq( argv[ mcpp_optind - 2], "-g")) + /* Neither '-g 0' nor '-ggdb' -- No argument */ + mcpp_optind--; + break; /* Ignore the option */ +#elif COMPILER == LCC + case 'g': /* Define __LCCDEBUGLEVEL as */ + if (*(mcpp_optarg + 1) == EOS && isdigit( *mcpp_optarg)) { + defp = look_id( debug_name); + strcpy( defp->repl, mcpp_optarg); + } else { + usage( opt); + } + break; +#elif COMPILER == MSC + case 'G': + if (*(mcpp_optarg + 1) == EOS) { /* -Gx */ + switch (*mcpp_optarg) { + case '3': case '4': case '5': case '6': + gval = *mcpp_optarg; + break; + case 'B': /* -GB */ + gval = '6'; + break; + case 'R': + look_and_install( "_CPPRTTI", DEF_NOARGS_PREDEF, null + , "1"); + break; + case 'X': + look_and_install( "_CPPUNWIND", DEF_NOARGS_PREDEF, null + , "1"); + break; + case 'Z': + look_and_install( "__MSVC_RUNTIME_CHECKS" + , DEF_NOARGS_PREDEF, null, "1"); + break; + default : + mcpp_fprintf( ERR, warning, opt, mcpp_optarg); + } + } else { + usage( opt); + } + break; +#endif + +#if SYSTEM == SYS_MAC + case 'F': + framework[ num_framework++] = mcpp_optarg; + break; +#endif + + case 'h': + if (*(mcpp_optarg + 1) == EOS && isdigit( *mcpp_optarg)) + /* a digit */ + look_and_install( "__STDC_HOSTED__", DEF_NOARGS_PREDEF, null + , mcpp_optarg); + else + usage( opt); + break; + +#if COMPILER == MSC + case 'X': + unset_sys_dirs = TRUE; + break; +#endif + case 'I': /* Include directory */ + if (str_eq( mcpp_optarg, "-")) { /* -I- */ +#if COMPILER == GNUC + sys_dirp = incend; /* Split include directories */ + i_split = TRUE; +#else + unset_sys_dirs = TRUE; + /* Unset pre-specified include directories */ +#endif + } else if (*(mcpp_optarg + 1) == EOS && isdigit( *mcpp_optarg) + && (i = *mcpp_optarg - '0') != 0 + && (i & ~(CURRENT | SOURCE)) == 0) { + search_rule = i; /* -I1, -I2 or -I3 */ + } else { /* Not '-' nor a digit */ + set_a_dir( mcpp_optarg); /* User-defined dir */ + } + break; + +#if COMPILER == MSC + case 'F': + if (str_eq( mcpp_optarg, "l")) { /* -Fl */ + if (preinc_end >= &preinclude[ NPREINCLUDE]) { + mcpp_fputs( "Too many -Fl options.\n", ERR); + longjmp( error_exit, -1); + } + *preinc_end++ = argv[ mcpp_optind++]; + } else { + usage( opt); + } + break; +#endif + +#if COMPILER == GNUC + case 'i': + if (str_eq( mcpp_optarg, "nclude")) { /* -include */ + if (preinc_end >= &preinclude[ NPREINCLUDE]) { + mcpp_fputs( "Too many -include options.\n", ERR); + longjmp( error_exit, -1); + } + *preinc_end++ = argv[ mcpp_optind++]; + } else if (str_eq( mcpp_optarg, "system")) { /* -isystem */ + if (sysdir_end >= &sysdir[ NSYSDIR]) { + mcpp_fputs( "Too many -isystem options.\n", ERR); + longjmp( error_exit, -1); + } + *sysdir_end++ = argv[ mcpp_optind++]; + /* Add the directory before system include directory*/ + } else if (str_eq( mcpp_optarg, "quote")) { /* -iquote */ + if (quote_dir_end >= "e_dir[ N_QUOTE_DIR]) { + mcpp_fputs( "Too many -iquote options.\n", ERR); + longjmp( error_exit, -1); + } + *quote_dir_end++ = argv[ mcpp_optind++]; + /* Add the directory for #include "header" */ + } else if (memcmp( mcpp_optarg, "sysroot", 7) == 0) { + if (mcpp_optarg[ 7] == '=') /* -isysroot=DIR */ + sysroot = mcpp_optarg + 8; + else if (mcpp_optarg[ 7] == EOS) /* -isysroot DIR */ + sysroot = argv[ mcpp_optind++]; + else + usage( opt); + } else if (str_eq( mcpp_optarg, "prefix") /* -iprefix */ + || str_eq( mcpp_optarg, "withprefix") /* -iwithprefix */ + || str_eq( mcpp_optarg, "withprefixbefore") + /* -iwithprefixbefore */ + || str_eq( mcpp_optarg, "dirafter") /* -idirafter */ + || str_eq( mcpp_optarg, "multilib")) { /* -imultilib */ + mcpp_optind++; /* Skip the argument */ + /* Ignore these options */ + } else { + usage( opt); + } + break; +#endif + + case 'j': + option_flags.no_source_line = TRUE; + break; /* Do not output the source line in diagnostics */ + +#if COMPILER == MSC + case 'J': + look_and_install( "_CHAR_UNSIGNED", DEF_NOARGS_PREDEF, null, "1"); + break; +#endif + + case 'K': + mcpp_debug |= MACRO_CALL; + /* + * Putout macro expansion informations embedded in comments. + * Same with '#pragma MCPP debug macro_call'. + */ + /* Enable white spaces preservation, too */ + /* Fall through */ + case 'k': + option_flags.k = TRUE; + /* Keep white spaces of input lines as they are */ + break; + +#if COMPILER == GNUC + case 'l': + if (memcmp( mcpp_optarg, "ang-", 4) != 0) { + usage( opt); + } else if (str_eq( mcpp_optarg + 4, "c")) { /* -lang-c */ + ; /* Ignore this option */ + } else if (str_eq( mcpp_optarg + 4, "c99") /* -lang-c99*/ + || str_eq( mcpp_optarg + 4, "c9x")) { /* -lang-c9x*/ + if (! sflag) { + stdc_val = 1; /* Define __STDC__ to 1 */ + std_val = 199901L; + sflag = TRUE; + } + } else if (str_eq( mcpp_optarg + 4, "c89")) { /* -lang-c89*/ + if (! sflag) { + stdc_val = 1; /* Define __STDC__ to 1 */ + sflag = TRUE; + } + } else if (str_eq( mcpp_optarg + 4, "c++")) { /* -lang-c++*/ + goto plus; + } else if (str_eq( mcpp_optarg + 4, "asm")) { /* -lang-asm*/ + option_flags.lang_asm = TRUE; + } else { + usage( opt); + } + break; +#endif /* COMPILER == GNUC */ + + case 'M': /* Output source file dependency line */ + if (str_eq( mcpp_optarg, "M")) { /* -MM */ + ; + } else if (str_eq( mcpp_optarg, "D")) { /* -MD */ + mkdep |= (MD_SYSHEADER | MD_FILE); + } else if (str_eq( mcpp_optarg, "MD")) { /* -MMD */ + mkdep |= MD_FILE; + } else if (str_eq( mcpp_optarg, "P")) { /* -MP */ + mkdep |= MD_PHONY; + } else if (str_eq( mcpp_optarg, "Q")) { /* -MQ target */ + mkdep |= MD_QUOTE; + mkdep_mq = argv[ mcpp_optind++]; + } else if (str_eq( mcpp_optarg, "T")) { /* -MT target */ + mkdep_mt = argv[ mcpp_optind++]; + } else if (str_eq( mcpp_optarg, "F")) { /* -MF file */ + mkdep_mf = argv[ mcpp_optind++]; + } else if (argv[ mcpp_optind - 1] == mcpp_optarg) { /* -M */ + mkdep |= MD_SYSHEADER; + mcpp_optind--; + } else { + usage( opt); + } + if (str_eq( mcpp_optarg, "D") || str_eq( mcpp_optarg, "MD")) { + cp = argv[ mcpp_optind]; + if (cp && *cp != '-') /* -MD (-MMD) file */ + mkdep_md = argv[ mcpp_optind++]; + } + mkdep |= MD_MKDEP; + break; + +#if SYS_FAMILY == SYS_UNIX + case 'm': + if (str_eq( mcpp_optarg, "64")) { /* -m64 */ + if (str_eq( CPU, "i386")) + strcpy( arch, "x86_64"); + else if (str_eq( CPU, "ppc")) + strcpy( arch, "ppc64"); + /* Else ignore */ + break; + } else if (str_eq( mcpp_optarg, "32")) { /* -m32 */ + if (str_eq( CPU, "x86_64")) + strcpy( arch, "i386"); + else if (str_eq( CPU, "ppc64")) + strcpy( arch, "ppc"); + /* Else ignore */ + break; + } else if (str_eq( mcpp_optarg, "mmx")) { /* -mmmx */ + look_and_install( "__MMX__", DEF_NOARGS_PREDEF, null, "1"); + break; + } else if (str_eq( mcpp_optarg, "no-mmx")) { /* -mno-mmx */ + undef_list[ undef_cnt++] = "__MMX__"; + break; + } +#endif /* SYS_FAMILY == UNIX */ +#if COMPILER == GNUC +#if SYSTEM == SYS_CYGWIN + if (str_eq( mcpp_optarg, "no-cygwin")) { /* -mno-cygwin */ + no_cygwin = TRUE; + break; + } +#endif + if (! integrated_cpp) + usage( opt); + break; + + case 'u': + if (! str_eq( mcpp_optarg, "ndef")) /* -undef */ + usage( opt); /* Else fall through */ +#endif /* COMPILER == GNUC */ + +#if COMPILER == MSC + case 'u': +#endif + case 'N': + /* No predefines: remove "unix", "__unix__" and friends. */ + nflag = TRUE; + break; + +#if COMPILER == GNUC || NO_DIR + case 'n': +#if NO_DIR + if (str_eq( mcpp_optarg, "odir")) { /* -nodir */ + no_dir = TRUE; + } +#endif +#if COMPILER == GNUC + if (str_eq( mcpp_optarg, "ostdinc")) { /* -nostdinc */ + unset_sys_dirs = TRUE; /* Unset pre-specified directories */ + } else if (str_eq( mcpp_optarg, "ostdinc++")) { /* -nostdinc++ */ + set_cplus_dir = FALSE; /* Unset C++-specific directories */ + } else if (str_eq( mcpp_optarg, "oprecomp")) { /* -noprecomp */ + mcpp_fprintf( ERR, warning, opt, mcpp_optarg); + break; + } +#endif + else { + usage( opt); + } + break; +#endif + +#if COMPILER == GNUC + case 'O': + if (integrated_cpp) { + if (*mcpp_optarg == '-') /* No argument */ + mcpp_optind--; + else if ((isdigit( *mcpp_optarg) && *mcpp_optarg != '0') + || *mcpp_optarg == 's' || *mcpp_optarg == 'z') + /* -O1, -O2 -Os, -Oz */ + look_and_install( "__OPTIMIZE__", DEF_NOARGS_PREDEF, null + , "1"); + else if (! isdigit( *mcpp_optarg)) + usage( opt); + /* Else -O0: ignore */ + } else { + usage( opt); + } + break; /* Else ignore -Ox option */ +#elif COMPILER == LCC + case 'O': /* Define __LCCOPTIMLEVEL as 1 */ + defp = look_id( optim_name); + strcpy( defp->repl, "1"); + break; +#endif + + case 'o': + *out_pp = mcpp_optarg; /* Output file name */ + break; + + case 'P': /* No #line output */ + option_flags.p = TRUE; + break; + +#if COMPILER == GNUC + case 'p': + if (str_eq( mcpp_optarg, "edantic") /* -pedantic */ + || str_eq( mcpp_optarg, "edantic-errors")) { + /* -pedantic-errors */ + /* This option does not imply -ansi */ + if (warn_level == -1) + warn_level = 0; + warn_level |= (1 | 2 | 4); + if (! sflag && ! cplus_val) { + stdc_val = 1; + sflag = TRUE; + } + } else { + usage( opt); + } + break; + case 'q': + if (str_eq( mcpp_optarg, "uiet")) + /* -quiet: GCC's undocumented, yet frequently specified opt */ + break; /* Ignore the option */ + else + usage( opt); + break; +#endif /* COMPILER == GNUC */ + + case 'Q': + option_flags.q = TRUE; + break; + +#if COMPILER == MSC + case 'R': /* -RTC1, -RTCc, -RTCs, -RTCu, etc. */ + if (memcmp( mcpp_optarg, "TC", 2) == 0 + && *(mcpp_optarg + 2) != EOS) + look_and_install( "__MSVC_RUNTIME_CHECKS", DEF_NOARGS_PREDEF + , null, "1"); + else + usage( opt); + break; +#endif + + case 'S': + if (cplus_val || sflag) { /* C++ or the second time */ + mcpp_fprintf( ERR, warning, opt, mcpp_optarg); + break; + } + i = *mcpp_optarg; + if (! isdigit( i) || *(mcpp_optarg + 1) != EOS) + usage( opt); + stdc_val = i - '0'; + sflag = TRUE; + break; + +#if COMPILER == GNUC + case 'r': + if (str_eq( mcpp_optarg, "emap")) + mcpp_fprintf( ERR, warning, opt, mcpp_optarg); + /* Ignore -remap option */ + else + usage( opt); + break; + + case 's': + if (memcmp( mcpp_optarg, "td=", 3) == 0 + && strlen( mcpp_optarg) > 3) { /* -std=STANDARD*/ + cp = mcpp_optarg + 3; + if (str_eq( cp, "c89") /* std=c89 */ + || str_eq( cp, "c90") /* std=c90 */ + || str_eq( cp, "gnu89") /* std=gnu89 */ + || str_eq( cp, "iso9899:1990")) { + std_val = 0L; /* C90 + extensions */ + } else if (str_eq( cp, "c99") /* std=c99 */ + || str_eq( cp, "c9x") /* std=c9x */ + || str_eq( cp, "gnu99") /* std=gnu99 */ + || str_eq( cp, "gnu9x") /* std=gnu9x */ + || str_eq( cp, "iso9899:1999") + || str_eq( cp, "iso9899:199x")) { + std_val = 199901L; + } else if (str_eq( cp, "c++98")) { /* std=c++98 */ + cplus_val = std_val = 199711L; + } else if (memcmp( cp, "iso9899:", 8) == 0 + && strlen( cp) >= 14) { /* std=iso9899:199409, etc. */ + mcpp_optarg = cp + 8; + look_and_install( "__STRICT_ANSI__", DEF_NOARGS_PREDEF + , null, "1"); + ansi = TRUE; + goto Version; + } else if (memcmp( cp, "iso14882", 8) == 0) { + cp += 8; + ansi = TRUE; + if (cp && *cp == ':' && strlen( cp) >= 7) { + /* std=iso14882:199711, etc. */ + cplus_val = CPLUS; + mcpp_optarg = cp + 1; + goto Version; + } else { + goto plus; + } + } else { + usage( opt); + } + if (! cplus_val && memcmp( cp, "gnu", 3) != 0) { + /* 'std=gnu*' does not imply -ansi */ + look_and_install( "__STRICT_ANSI__", DEF_NOARGS_PREDEF + , null, "1"); + ansi = TRUE; + } + stdc_val = 1; + sflag = TRUE; + } else { + usage( opt); + } + break; + + case 't': + if (str_eq( mcpp_optarg, "raditional") + || str_eq( mcpp_optarg, "raditional-cpp")) { + /* -traditional, -traditional-cpp */ + trad = TRUE; + mcpp_mode = OLD_PREP; + } else if (str_eq( mcpp_optarg, "rigraphs")) { + option_flags.trig = TRUE; /* -trigraphs */ + } else { + usage( opt); + } + break; +#endif /* COMPILER == GNUC */ + +#if COMPILER == MSC + case 'T': + if (strlen( mcpp_optarg) > 1) + usage( opt); + i = tolower( *mcpp_optarg); /* Fold case */ + if (i == 'c') { + ; /* Ignore this option */ + } else if (i == 'p') { + cplus_val = CPLUS; + } else { + usage( opt); + } + break; +#endif + + case 'U': /* Undefine macro */ + if (undef_cnt >= MAX_UNDEF) { + mcpp_fputs( "Too many -U options.\n", ERR); + longjmp( error_exit, -1); + } + undef_list[ undef_cnt++] = mcpp_optarg; + break; + + case 'V': +#if COMPILER == GNUC +Version: +#endif + valp = eval_num( mcpp_optarg); + if (valp->sign == VAL_ERROR) + usage( opt); + std_val = (long) valp->val; + break; + + case 'v': + option_flags.v = TRUE; + show_path = TRUE; + break; + + case 'W': /* warning level */ + if (warn_level == -1) /* Have to initialize */ + warn_level = 0; +#if COMPILER == GNUC + if (argv[ mcpp_optind - 1] == mcpp_optarg) { /* No argument */ + /* + * Note: -W without argument is not officially supported. + * It may cause an error. + */ + warn_level |= (1 | 2 | 4 | 16); + mcpp_optind--; + } else if (str_eq( mcpp_optarg, "comment") + || str_eq( mcpp_optarg, "comments") + || str_eq( mcpp_optarg, "sign-compare")) { + warn_level |= 1; + } else if (str_eq( mcpp_optarg, "undef")) { + warn_level |= 4; + } else if (str_eq( mcpp_optarg, "all")) { + warn_level |= (1 | 16); /* Convert -Wall to -W17*/ + } else if (str_eq( mcpp_optarg, "trigraphs")) { + warn_level |= 16; + } +#endif /* COMPILER == GNUC */ +#if COMPILER == MSC + if (str_eq( mcpp_optarg, "all")) { + warn_level |= (1 | 16); /* Convert -Wall to -W17*/ + } else if (str_eq( mcpp_optarg, "L")) { + option_flags.no_source_line = TRUE; + /* Single-line diagnostic */ + } +#endif + if (isdigit( *mcpp_optarg)) { + warn_level |= parse_warn_level( mcpp_optarg, opt); + if (warn_level > 31 || warn_level < 0) + usage( opt); + } + if (warn_level == 0) + warn_level = 0xFF; /* Remember this option */ + /* Else ignore the option */ + break; + +#if COMPILER == GNUC || COMPILER == MSC + case 'w': /* Same as -W0 */ + warn_level = 0xFF; /* Remenber this option */ + break; +#endif + +#if COMPILER == GNUC + case 'x': + if (str_eq( mcpp_optarg, "c")) { + break; /* -x c -- ignore this */ + } else if (str_eq( mcpp_optarg, "c++")) { + goto plus; + } else if (str_eq( mcpp_optarg, "assembler-with-cpp")) { + option_flags.lang_asm = TRUE; + break; + } else { + usage( opt); + } + break; +#endif + +#if COMPILER == MSC + case 'Z': + if (str_eq( mcpp_optarg, "c:wchar_t")) { /* -Zc:wchar_t */ + look_and_install( "_NATIVE_WCHAR_T_DEFINED", DEF_NOARGS_PREDEF + , null, "1"); + look_and_install( "_WCHAR_T_DEFINED", DEF_NOARGS_PREDEF, null + , "1"); + wchar_t_modified = TRUE; + } else if (str_eq( mcpp_optarg, "c:wchar_t-")) {/* -Zc:wchar_t- */ + wchar_t_modified = TRUE; /* Do not define the macros */ + } else if (str_eq( mcpp_optarg, "l")) { + look_and_install( "_VC_NODEFAULTLIB", DEF_NOARGS_PREDEF, null + , "1"); + } else if (str_eq( mcpp_optarg, "a")) { /* -Za */ + undefine( "_MSC_EXTENSIONS"); + option_flags.dollar_in_name = FALSE; + } else if (str_eq( mcpp_optarg, "e")) { + /* Ignore -Ze silently */ + break; + } else if (*(mcpp_optarg + 1) == EOS) { + /* -Z followed by one char */ + mcpp_fprintf( ERR, warning, opt, mcpp_optarg); + /* Ignore the option with warning */ + } else { + usage( opt); + } + break; +#endif + + case 'z': + option_flags.z = TRUE; /* No output of included file */ + break; + + default: /* What is this one? */ + usage( opt); + break; + } /* Switch on all options */ + + } /* For all arguments */ + + if (mcpp_optind < argc && set_files( argc, argv, in_pp, out_pp) != NULL) + goto opt_search; /* More options after the filename */ + + /* Check consistency of specified options, set some variables */ + chk_opts( sflag, trad); + + if (warn_level == -1) /* No -W option */ + warn_level = 1; /* Default warning level */ + else if (warn_level == 0xFF) + warn_level = 0; /* -W0 has high precedence */ + +#if SYSTEM == SYS_MAC + set_a_dir( NULL); /* Initialize incdir[] */ + to_search_framework = incend; + /* Search framework[] next to the directory */ +#endif + +#if COMPILER == GNUC && SYSTEM == SYS_MAC + if (arch[ 0]) { /* -arch option has been specified */ + if (((str_eq( CPU, "i386") || str_eq( CPU, "x86_64")) + && (! str_eq( arch, "i386") && ! str_eq( arch, "x86_64"))) + || ((str_eq( CPU, "ppc") || str_eq( CPU, "ppc64")) + && (! str_eq( arch, "ppc") && ! str_eq( arch, "ppc64")))) { + mcpp_fprintf( ERR, "Wrong argument of -arch option: %s\n", arch); + longjmp( error_exit, -1); + } + } +#endif + if (! arch[ 0]) { + /* None of -arch, -m32 or -m64 options has been specified. */ + /* The CPU-specific-macros will be defined in init_cpu_macro(). */ + strcpy( arch, CPU); + } +#if COMPILER != GNUC + init_cpu_macro( gval, sse); +#endif + +#if COMPILER == GNUC + if (sysdir < sysdir_end) { + char ** dp = sysdir; + if (! sys_dirp || sys_dirp == incdir) + sys_dirp = dp; + while (dp < sysdir_end) + set_a_dir( *dp++); + } + if (*in_pp && str_eq( (*in_pp) + strlen( *in_pp) - 2, ".S")) + option_flags.lang_asm = TRUE; /* Input file name is *.S */ + if (option_flags.lang_asm) { + look_and_install( "__ASSEMBLER__", DEF_NOARGS_PREDEF, null, "1"); + option_flags.dollar_in_name = FALSE; /* Disable '$' in name */ + } + if (! sys_dirp || sys_dirp == incdir) + sys_dirp = incend; +#endif +#if SYSTEM == SYS_MAC + init_framework(); /* After setting sys_dirp */ +#endif + set_env_dirs(); + if (! unset_sys_dirs) + set_sys_dirs( set_cplus_dir); + + if (mkdep_mf) { /* -MF overrides -MD */ + mkdep_fp = fopen( mkdep_mf, "w"); + } else if (mkdep_md) { + mkdep_fp = fopen( mkdep_md, "w"); + } + if (mkdep_mq) /* -MQ overrides -MT */ + mkdep_target = mkdep_mq; + else if (mkdep_mt) + mkdep_target = mkdep_mt; + + /* Normalize the path-list */ + if (*in_pp && ! str_eq( *in_pp, "-")) { + char * tmp = norm_path( null, *in_pp, FALSE, FALSE); + if (tmp) /* The file exists */ + *in_pp = tmp; + /* Else mcpp_main() will diagnose *in_pp and exit */ + } + if (! (mcpp_debug & MACRO_CALL)) { + /* -K option alters behavior of -v option */ + if (option_flags.v) + version(); + if (show_path) { + fp_debug = stderr; + dump_path(); + fp_debug = stdout; + } + } +} + +static void version( void) +/* + * Print version message. + */ +{ + const char * mes[] = { + +#if MCPP_LIB +/* Write messages here, for example, "MySomeTool with ". */ +#endif + +#ifdef VERSION_MSG + "MCPP V.2.7.2 (2008/11) " +#else + "MCPP V.", VERSION, " (", DATE, ") " +#endif +#if COMPILER == INDEPENDENT + , "compiler-independent-build " +#else +#ifdef CMP_NAME + , "for ", CMP_NAME, " " +#endif +#endif + , "compiled by " +#ifdef VERSION_MSG + , VERSION_MSG +#else +#ifdef HOST_CMP_NAME + , HOST_CMP_NAME +#if HOST_COMPILER == GNUC + , " V.", GCC_MAJOR_VERSION, ".", GCC_MINOR_VERSION +#endif +#endif +#endif + , "\n", + NULL + }; + + const char ** mpp = mes; + while (*mpp) + mcpp_fputs( *mpp++, ERR); +} + +static void usage( + int opt +) +/* + * Print usage. + */ +{ + const char * mes[] = { + +"Usage: ", +"mcpp", +" [- [-]] [ [-] [] [-]]\n", +" defaults to stdin and defaults to stdout.\n", + +"\nCommonly used options:\n", + +"-@MODE Specify preprocessing mode. MODE should be one of these 4:\n", +" -@std Standard conforming mode. (default)\n", +" -@poststd, -@post special 'post-Standard' mode.\n", +" -@kr K&R 1st mode.\n", +" -@oldprep, -@old 'old_preprocessor' mode (i.e. 'Reiser model' cpp).\n", + +#if COMPILER == MSC +"-arch:SSE, -arch:SSE2 Define the macro _M_IX86_FP as 1, 2 respectively.\n", +#endif +#if SYSTEM == SYS_MAC && COMPILER == GNUC +"-arch Change the target to (i386, x86_64, ppc, ppc64).\n", +#endif + +#if ! STD_LINE_PREFIX +"-b Output #line lines in C source style.\n", +#endif + +"-C Output also comments.\n", +"-D [=] Define as (default:1).\n", +"-D [=] Define as .\n", +"-e Change the default multi-byte character encoding to one of:\n", +" euc_jp, gb2312, ksc5601, big5, sjis, iso2022_jp, utf8.\n", + +#if SYSTEM == SYS_MAC +"-F Add to top of framework directory list.\n", +#endif +#if COMPILER == GNUC +"-finput-charset= Same as -e .\n", +" (Don't insert spaces around '=').\n", +#endif +#if COMPILER == MSC +"-Fl Include the prior to the main input file.\n", +"-G Define the macro _M_IX86 according to .\n", +#endif +#if COMPILER == LCC +"-g Define the macro __LCCDEBUGLEVEL as .\n", +#endif + +"-I Add to the #include search list.\n", + +#if COMPILER == GNUC +"-isysroot Change root of system header directory to .\n", +"-include Include the prior to the main input file.\n", +#else +"-I- Unset system or site specific include directories.\n", +#endif +#if COMPILER == MSC +"-J Define the macro _CHAR_UNSIGNED as 1.\n", +#endif + +"-j Don't output the source line in diagnostics.\n", +"-M, -MM, -MD, -MMD, -MP, -MQ target, -MT target, -MF file\n", +" Output source file dependency line for makefile.\n", +#if SYS_FAMILY == SYS_UNIX +"-m32 Change target CPU from x86_64, ppc64 to i386, ppc, respectively.\n", +"-m64 Change target CPU from i386, ppc to x86_64, ppc64, respectively.\n", +#endif +"-N Don't predefine any non-standard macros.\n", + +#if COMPILER == GNUC +"-nostdinc Unset system or site specific include directories.\n", +#endif +#if COMPILER == LCC +"-O Define the macro __LCCOPTIMLEVEL as 1.\n", +#endif + +"-o Output to .\n", +"-P Don't output #line lines.\n", +"-Q Output diagnostics to \"mcpp.err\" (default:stderr).\n", +#if COMPILER == MSC +"-RTC* Define the macro __MSVC_RUNTIME_CHECKS as 1.\n", +#endif +#if COMPILER == GNUC +"-traditional, -traditional-cpp Same as -@oldprep.\n", +#endif +"-U Undefine .\n", + +#if COMPILER == GNUC +"-undef Same as -N.\n", +#endif +#if COMPILER == MSC +"-u Same as -N.\n", +#endif + +"-v Show version and include directories of mcpp.\n", +"-W Set warning level to (OR of {0,1,2,4,8,16}, default:1).\n", + +#if COMPILER == MSC +"-WL Same as -j.\n", +#endif +#if COMPILER == MSC || COMPILER == GNUC +"-w Same as -W0.\n", +#endif +#if COMPILER == MSC +"-X Same as -I-.\n", +"-Zc:wchar_t Define _NATIVE_WCHAR_T_DEFINED and _WCHAR_T_DEFINED as 1.\n", +"-Zl Define the macro _VC_NODEFAULTLIB as 1.\n", +#endif + +"-z Don't output the included file, only defining macros.\n", + +"\nOptions available with -@std (default) or -@poststd options:\n", + +"-+ Process C++ source.\n", + +#if DIGRAPHS_INIT +"-2 Disable digraphs.\n", +#else +"-2 Enable digraphs.\n", +#endif +#if COMPILER == GNUC +"-digraphs Enable digraphs.\n", +#endif + +"-h Re-define the pre-defined macro __STDC_HOSTED__ as .\n", + +#if COMPILER == GNUC +"-lang-c89 Same as -S1.\n", +"-lang-c++ Same as -+.\n", +"-pedantic, -pedantic-errors Same as -W7.\n", +"-S Redefine __STDC__ to .\n", +#else +"-S Redefine __STDC__ to , undefine old style macros.\n", +#endif + +#if COMPILER == GNUC +"-std= Specify the standard to which the code should conform.\n", +" may be one of: c90, c99, iso9899:1990, iso14882, etc.\n", +" iso9899:, iso14882: : Same as -V (long in decimals).\n", +#endif +#if COMPILER == MSC +"-Tp Same as -+.\n", +#endif + +"-V Redefine __STDC_VERSION__ or __cplusplus to .\n", +" C with -V199901L specifies C99 specs.\n", +" C++ with -V199901L specifies C99 compatible specs.\n", + +#if COMPILER == GNUC +"-x c++ Same as -+.\n", +#endif + +"\nOptions available with only -@std (default) option:\n", + +"-@compat Expand recursive macro more than Standard.\n", +#if TRIGRAPHS_INIT +"-3 Disable trigraphs.\n", +#else +"-3 Enable trigraphs.\n", +#endif +"-K Output macro annotations embedding in comments.\n", +#if COMPILER == GNUC +"-trigraphs Enable trigraphs.\n", +#endif + +"\nOptions available with -@std (default), -@kr or -@oldprep options:\n", + +#if COMPILER == GNUC +"-lang-asm Same as -x assembler-with-cpp.\n", +"-x assembler-with-cpp Process \"assembler\" source.\n", +#elif COMPILER == MSC +"-A Process \"assembler\" source.\n", +#else +"-a Process \"assembler\" source.\n", +#endif + +"-k Keep white spaces of input lines as they are.\n", + +"\nFor further details see mcpp-manual.html.\n", + NULL, + }; + + const char * illegopt = "Incorrect option -%c%s\n"; + const char * const * mpp = mes; + + if (opt != '?') + mcpp_fprintf( ERR, illegopt, opt, mcpp_optarg ? mcpp_optarg : null); + version(); +#if MCPP_LIB + mes[ 1] = argv0; +#endif + while (*mpp) + mcpp_fputs( *mpp++, ERR); + longjmp( error_exit, -1); +} + +static void set_opt_list( + char * optlist +) +/* + * Set list of legal option characters. + */ +{ + const char * list[] = { + +#if ! STD_LINE_PREFIX + "b", +#endif + +#if SYS_FAMILY == SYS_UNIX + "m:", +#endif + +#if COMPILER == GNUC + "$A:a:cd:Ef:g:i:l:r:s:t:u:O:p:q:wx:", +#elif COMPILER == MSC + "Aa:F:G:JR:T:XZ:uw", +#elif COMPILER == LCC + "g:O", +#endif + +#if COMPILER != GNUC && COMPILER != MSC + "a", +#endif +#if SYSTEM == SYS_MAC + "F:-:", +#endif + + NULL + }; + + const char * const * lp = & list[ 0]; + + strcpy( optlist, "23+@:e:h:jkn:o:vzCD:I:KM:NPQS:U:V:W:"); + /* Default options */ + while (*lp) + strcat( optlist, *lp++); + if (strlen( optlist) >= OPTLISTLEN) + cfatal( "Bug: Too long option list", NULL, 0L, NULL); /* _F_ */ +} + +static int parse_warn_level( + const char * mcpp_optarg, + int opt +) +/* + * Parse warn level option. + * Warning level option is specified as '19' or '1|2|16' or even '3|16'. + * Even spaces are allowed as ' 1 | 2|16 '. + */ +{ + const char * cp = mcpp_optarg; + int w, i; + + w = i = 0; + while( *cp != EOS) { + while( *cp == ' ') + cp++; /* Skip spaces */ + if (! isdigit( *cp)) + break; /* Error */ + while (isdigit( *cp)) { + i *= 10; + i += (*cp++ - '0'); + } + while (*cp == ' ') + cp++; + if (*cp == '|') { /* Only digits or '|' are allowed */ + w |= i; /* Take OR of the args */ + i = 0; + cp++; + } + } + if (*cp != EOS) { /* Not ending with digit */ + mcpp_fprintf( ERR, "Illegal warning level option \"%s\"\n" + , mcpp_optarg); + usage( opt); + } + w |= i; /* Take the last arg */ + return w; +} + +static void def_a_macro( + int opt, /* 'D' */ + char * def /* Argument of -D option */ +) +/* + * Define a macro specified by -D option. + * The macro maybe either object-like or function-like (with parameter). + */ +{ + DEFBUF * defp; + char * definition; /* Argument of -D option */ + char * cp; + int i; + + /* Convert trigraphs for the environment which need trigraphs */ + if (mcpp_mode == STD && option_flags.trig) + cnv_trigraph( def); + if (mcpp_mode == POST_STD && option_flags.dig) + cnv_digraph( def); /* Convert prior to installing macro */ + definition = xmalloc( strlen( def) + 4); + strcpy( definition, def); + if ((cp = strchr( definition, '=')) != NULL) { + *cp = ' '; /* Remove the '=' */ + cp = "\n"; /* Append */ + } else { + cp = " 1\n"; /* With definition "1" */ + } + strcat( definition, cp); + cp = definition; + while ((char_type[ *cp & UCHARMAX] & SPA) == 0) + cp++; + i = *cp; + *cp = EOS; + if ((defp = look_id( definition)) != NULL) /* Pre-defined */ + undefine( definition); + *cp = i; + /* Now, save the definition. */ + unget_string( definition, NULL); + if (do_define( FALSE, 0) == NULL) /* Define a macro */ + usage( opt); + *cp = EOS; + if (str_eq( definition, "__STDC__")) { + defp = look_id( definition); + defp->nargs = DEF_NOARGS_STANDARD; + /* Restore Standard-predefinedness */ + } + free( definition); + skip_nl(); /* Clear the appended */ +} + +static void chk_opts( + int sflag, /* Flag of Standard or post-Standard mode */ + int trad /* -traditional (GCC only) */ +) +/* + * Check consistency between the specified options. + * Set default value of some variables for each 'mcpp_mode'. + */ +{ + int incompat = FALSE; + + switch (mcpp_mode) { + case STD : + case POST_STD : + if (trad) + incompat = TRUE; + if (! stdc_val) + stdc_val = STDC; + break; + case KR : + case OLD_PREP : +#if COMPILER == GNUC + if (sflag || cplus_val || ansi || std_val != -1L) +#else + if (sflag || cplus_val || std_val != -1L) +#endif + incompat = TRUE; + if (option_flags.dig) { + if (option_flags.dig != DIGRAPHS_INIT) + incompat = TRUE; + else + option_flags.dig = 0; + } + break; + } + + if (mcpp_mode == POST_STD + && (option_flags.lang_asm || compat_mode || option_flags.k)) + incompat = TRUE; + if (mcpp_mode != STD && option_flags.trig) { + if (option_flags.trig != TRIGRAPHS_INIT) + incompat = TRUE; + else + option_flags.trig = FALSE; + } + if (mcpp_mode != STD && (mcpp_debug & MACRO_CALL)) + incompat = TRUE; + if ((mcpp_debug & MACRO_CALL) + && (option_flags.lang_asm || option_flags.c)) { + mcpp_fputs( "Disabled -K option.\n", ERR); + mcpp_debug &= ~MACRO_CALL; + /* -a and -C options do not co-exist with -K */ + } + if (incompat) { + mcpp_fputs( "Incompatible options are specified.\n", ERR); + usage( '?'); + } + + standard = (mcpp_mode == STD || mcpp_mode == POST_STD); + /* Modify magic characters in character type table. */ + if (! standard) + char_type[ DEF_MAGIC] = 0; + if (mcpp_mode != STD) + char_type[ IN_SRC] = 0; + if (mcpp_mode == POST_STD || mcpp_mode == KR) + char_type[ TOK_SEP] = 0; /* TOK_SEP equals to COM_SEP */ + if (mcpp_mode != STD) + char_type[ MAC_INF] = 0; + + expand_init( compat_mode, ansi); + /* Set function pointer to macro expansion routine */ +} + +#if COMPILER != GNUC + +static void init_cpu_macro ( + int gval, /* Argument of -G option for MSC */ + int sse /* Argument of -sse: option for MSC */ +) +/* + * Set predefined macros for CPU. + * This routine is called from do_options() only once. + * GCC-specific-build defines these macro by init_gcc_macro(). + */ +{ + const char * cpu_macro[][ 7] = { +#if SYS_FAMILY == SYS_UNIX + { "__i386__" +#if SYSTEM == SYS_CYGWIN + , "_X86_" +#endif + , NULL,}, + { "__x86_64__", "__amd64__", NULL,}, + { "__ppc__", "__powerpc__", NULL,}, + { "__ppc64__", "__powerpc64__", NULL,} +#elif SYS_FAMILY == SYS_WIN + { "_WIN32", "__WIN32__", "_X86_" +#if SYSTEM == SYS_MINGW + , "__i386__" +#endif + , NULL,}, + { "_WIN32", "_WIN64", "__WIN64__", "_M_AMD64", "_AMD64_", "_X64_" + , NULL,}, /* "_WIN32" is defined even on Windows 64 */ + { NULL,}, /* Not supported */ + { NULL,} /* Not supported */ +#endif + }; + const char ** macro; + int index; + + if (str_eq( arch, "i386")) + index = 0; + else if (str_eq( arch, "x86_64")) + index = 1; + else if (str_eq( arch, "ppc")) + index = 2; + else if (str_eq( arch, "ppc64")) + index = 3; + else + index = 9; + + if (index == 9) { /* Unknown CPU */ + look_and_install( "__" CPU "__", DEF_NOARGS_PREDEF, null, "1"); + return; + } + macro = cpu_macro[ index]; + while (*macro) + look_and_install( *macro++, DEF_NOARGS_PREDEF, null, "1"); +#if SYS_FAMILY == SYS_WIN + if (index == 0) { + char val[] = "600"; + if (gval) + val[ 0] = gval; + look_and_install( "_M_IX86", DEF_NOARGS_PREDEF, null, val); + val[ 0] = '0' + sse; + val[ 1] = '\0'; + look_and_install( "_M_IX86_FP", DEF_NOARGS_PREDEF, null, val); + } +#endif +} +#endif /* COMPILER != GNUC */ + +static void init_predefines( void) +/* + * Set or unset predefined macros. + */ +{ + char tmp[ 16]; + + if (std_val != -1L) { /* Version is specified */ + if (cplus_val) + cplus_val = std_val; /* Value of __cplusplus */ + else + stdc_ver = std_val; /* Value of __STDC_VERSION__ */ + } else { + if (! cplus_val) + stdc_ver = stdc_val ? STDC_VERSION : 0L; + } + + if (nflag) { + un_predefine( TRUE); + } else if (stdc_val || cplus_val) { +#if COMPILER != GNUC + un_predefine( FALSE); /* Undefine "unix" or so */ +#endif + } + sprintf( tmp, "%ldL", cplus_val ? cplus_val : stdc_ver); + if (cplus_val) { + look_and_install( "__cplusplus", DEF_NOARGS_STANDARD, null, tmp); + } else { + if (stdc_ver) + look_and_install( "__STDC_VERSION__", DEF_NOARGS_STANDARD, null + , tmp); +#ifdef COMPILER_CPLUS + if (! nflag) /* Undefine pre-defined macro for C++ */ + undefine( COMPILER_CPLUS); +#endif + } + set_limit(); + stdc2 = cplus_val || stdc_ver >= 199901L; + stdc3 = (cplus_val >= 199901L) || (stdc_ver >= 199901L); + /* (cplus_val >= 199901L) makes C++ C99-compatible specs */ + if (standard) + init_std_defines(); + if (stdc3) + set_pragma_op(); +} + +static void init_std_defines( void) +/* + * For STD and POST_STD modes. + * The magic pre-defines are initialized with magic argument counts. + * expand_macro() notices this and calls the appropriate routine. + * DEF_NOARGS is one greater than the first "magic" definition. + * 'DEF_NOARGS - n' are reserved for pre-defined macros. + * __STDC_VERSION__ and __cplusplus are defined by chk_opts() and set_cplus(). + */ +{ + char tmp[ 16]; + char timestr[ 14]; + time_t tvec; + char * tstring; + + look_and_install( "__LINE__", DEF_NOARGS_DYNAMIC - 1, null, "-1234567890"); + /* Room for 11 chars (10 for long and 1 for '-' in case of wrap round. */ + look_and_install( "__FILE__", DEF_NOARGS_DYNAMIC - 2, null, null); + /* Should be stuffed */ + + /* Define __DATE__, __TIME__ as present date and time. */ + time( &tvec); + tstring = ctime( &tvec); + sprintf( timestr, "\"%.3s %c%c %.4s\"", + tstring + 4, + *(tstring + 8) == '0' ? ' ' : *(tstring + 8), + *(tstring + 9), + tstring + 20); + look_and_install( "__DATE__", DEF_NOARGS_DYNAMIC, null, timestr); + sprintf( timestr, "\"%.8s\"", tstring + 11); + look_and_install( "__TIME__", DEF_NOARGS_DYNAMIC, null, timestr); + + if (! look_id( "__STDC_HOSTED__")) { + /* + * Some compilers, e.g. GCC older than 3.3, define this macro by + * -D option. + */ + sprintf( tmp, "%d", STDC_HOSTED); + look_and_install( "__STDC_HOSTED__", DEF_NOARGS_PREDEF, null, tmp); + } +#if COMPILER != GNUC /* GCC do not undefine __STDC__ on C++ */ + if (cplus_val) + return; +#endif + /* Define __STDC__ as 1 or such for Standard conforming compiler. */ + if (! look_id( "__STDC__")) { + sprintf( tmp, "%d", stdc_val); + look_and_install( "__STDC__", DEF_NOARGS_STANDARD, null, tmp); + } +} + +#define LINE90LIMIT 32767 +#define LINE_CPLUS_LIMIT 32767 + +static void set_limit( void) +/* + * Set the minimum translation limits specified by the Standards. + */ +{ + if (cplus_val) { /* Specified by C++ 1998 Standard */ + std_limits.str_len = SLEN_CPLUS_MIN; + std_limits.id_len = IDLEN_CPLUS_MIN; + std_limits.n_mac_pars = NMACPARS_CPLUS_MIN; + std_limits.exp_nest = EXP_NEST_CPLUS_MIN; + std_limits.blk_nest = BLK_NEST_CPLUS_MIN; + std_limits.inc_nest = INCLUDE_NEST_CPLUS_MIN; + std_limits.n_macro = NMACRO_CPLUS_MIN; + std_limits.line_num = LINE_CPLUS_LIMIT; + } else if (stdc_ver >= 199901L) { /* Specified by C 1999 Standard */ + std_limits.str_len = SLEN99MIN; + std_limits.id_len = IDLEN99MIN; + std_limits.n_mac_pars = NMACPARS99MIN; + std_limits.exp_nest = EXP_NEST99MIN; + std_limits.blk_nest = BLK_NEST99MIN; + std_limits.inc_nest = INCLUDE_NEST99MIN; + std_limits.n_macro = NMACRO99MIN; + std_limits.line_num = LINE99LIMIT; + } else if (standard) { /* Specified by C 1990 Standard */ + std_limits.str_len = SLEN90MIN; + std_limits.id_len = IDLEN90MIN; + std_limits.n_mac_pars = NMACPARS90MIN; + std_limits.exp_nest = EXP_NEST90MIN; + std_limits.blk_nest = BLK_NEST90MIN; + std_limits.inc_nest = INCLUDE_NEST90MIN; + std_limits.n_macro = NMACRO90MIN; + std_limits.line_num = LINE90LIMIT; + } + /* Else pre-Standard mode */ +} + +static void set_pragma_op( void) +/* + * #define _Pragma(a) _Pragma ( a ) + * Define _Pragma() operator as a special macro so as to be searched + * easily. The unusual 'DEF_PRAGMA' is a marker of this psuedo + * macro. + */ +{ + char * name = "_Pragma"; + char tmp[ 16]; + + sprintf( tmp, "%c%s ( %c%c )", DEF_MAGIC, name, MAC_PARM, 1); + /* Replacement text */ + look_and_install( name, DEF_PRAGMA, "a", tmp); +} + +void init_sys_macro( void) +/* + * Define system-specific macros and some Standard required macros + * and undefine macros specified by -U options. + */ +{ + /* This order is important. */ + def_macros(); /* Define macros specified by -D */ +#if COMPILER == GNUC + chk_env(); +#endif + init_predefines(); /* Define predefined macros */ +#if COMPILER == GNUC + init_gcc_macro(); +#elif COMPILER == MSC + init_msc_macro(); +#endif + undef_macros(); /* Undefine macros specified by -U */ + if (mcpp_debug & MACRO_CALL) + dump_def( FALSE, TRUE); /* Finally putout current macro names */ +} + +void at_start( void) +/* + * Do the commands prior to processing main source file after do_options(). + */ +{ + char * env; + FILEINFO * file_saved = infile; + + /* + * Set multi-byte character encoding according to environment variables + * LC_ALL, LC_CTYPE and LANG -- with preference in this order. + */ + if (! mb_changed) { /* -m option precedes */ + if ((env = getenv( "LC_ALL")) != NULL) + set_encoding( env, "LC_ALL", 0); + else if ((env = getenv( "LC_CTYPE")) != NULL) + set_encoding( env, "LC_CTYPE", 0); + else if ((env = getenv( "LANG")) != NULL) + set_encoding( env, "LANG", 0); + } + +#if COMPILER == GNUC || COMPILER == MSC + if (option_flags.dollar_in_name) + char_type[ 0x24] |= LET; /* Enable '$' in identifiers */ + /* + * Do the -include (-Fl for MSC) options in the specified order. + * Note: This functionality is implemented as nested #includes + * which results the same effect as sequential #includes. + */ + { + char ** preinc; + /* + * Note: Here, 'infile' is the main input file, which is pseudo- + * parent file of the files to pre-include. So, we must + * temporarily set the infile's directory to the current directory + * in order to preinclude the files relative to it. + */ + preinc = preinc_end; + while (preinclude <= --preinc && *preinc != NULL) + open_file( &null, NULL, *preinc, TRUE, TRUE, FALSE); + } +#endif + + put_info( file_saved); +} + +static void put_info( + FILEINFO * sharp_file +) +/* + * Putout compiler-specific information. + */ +{ + if (no_output || option_flags.p) + return; + sharp_file->line++; + sharp( sharp_file, 0); + sharp_file->line--; +#if COMPILER == GNUC + if (gcc_work_dir) + mcpp_fprintf( OUT, "%s%ld \"%s%c\"\n" + , std_line_prefix ? "#line " : LINE_PREFIX + , 1, cur_work_dir, '/'); + /* Putout the current directory as a #line line as: */ + /* '# 1 "/abs-path/cur_dir//"'. */ + mcpp_fprintf( OUT, "%s%ld \"\"\n" + , std_line_prefix ? "#line " : LINE_PREFIX , 1); + mcpp_fprintf( OUT, "%s%ld \"\"\n" + , std_line_prefix ? "#line " : LINE_PREFIX , 1); + mcpp_fprintf( OUT, "%s%ld \"%s\"%s\n" + , std_line_prefix ? "#line " : LINE_PREFIX, 1, cur_fullname + , ! str_eq( cur_fullname, sharp_file->full_fname) ? " 1" : null); + /* Suffix " 1" for the file specified by -include */ +#endif +} + +static char * set_files( + int argc, + char ** argv, + char ** in_pp, + char ** out_pp +) +/* + * Set input and/or output files. + */ +{ + char * cp; + + if (*in_pp == NULL) { /* Input file */ + cp = argv[ mcpp_optind++]; +#if SYS_FAMILY == SYS_WIN + cp = bsl2sl( cp); +#endif + *in_pp = cp; + } + if (mcpp_optind < argc && argv[ mcpp_optind][ 0] != '-' + && *out_pp == NULL) { + cp = argv[ mcpp_optind++]; +#if SYS_FAMILY == SYS_WIN + cp = bsl2sl( cp); +#endif + *out_pp = cp; /* Output file */ + } + if (mcpp_optind >= argc) + return NULL; /* Exhausted command line arguments */ + if (argv[ mcpp_optind][ 0] == '-') + return argv[ mcpp_optind]; /* More options */ + cfatal( "Excessive file argument \"%s\"", argv[ mcpp_optind], 0L , NULL); + return NULL; +} + +static void set_env_dirs( void) +/* + * Add to include path those specified by environment variables. + */ +{ + const char * env; + + if (cplus_val) { + if ((env = getenv( ENV_CPLUS_INCLUDE_DIR)) != NULL) + parse_env( env); + } + if ((env = getenv( ENV_C_INCLUDE_DIR)) != NULL) + parse_env( env); +} + +static void parse_env( + const char * env +) +/* + * Parse environmental variable and append the path to include-dir-list. + */ +{ + char * save; + char * save_start; + char * p; + int sep; + + save = save_start = save_string( env); + while (*save) { + p = save; + while (*p && *p != ENV_SEP) + p++; + if (p != save) { /* Variable separator */ + sep = *p; + *p = EOS; + set_a_dir( save); + if (sep == EOS) + break; + save = ++p; + } + while (*save == ENV_SEP) + ++save; + } + free( save_start); +} + +static void set_sys_dirs( + int set_cplus_dir /* Set C++ include-directory too */ +) +/* + * Set site-specific and system-specific directories to the include directory + * list. + */ +{ + if (cplus_val && set_cplus_dir) { +#ifdef CPLUS_INCLUDE_DIR1 + set_a_dir( CPLUS_INCLUDE_DIR1); +#endif +#ifdef CPLUS_INCLUDE_DIR2 + set_a_dir( CPLUS_INCLUDE_DIR2); +#endif +#ifdef CPLUS_INCLUDE_DIR3 + set_a_dir( CPLUS_INCLUDE_DIR3); +#endif +#ifdef CPLUS_INCLUDE_DIR4 + set_a_dir( CPLUS_INCLUDE_DIR4); +#endif + } + +#if SYS_FAMILY == SYS_UNIX + set_a_dir( "/usr/local/include"); +#endif + +#ifdef C_INCLUDE_DIR1 + set_a_dir( C_INCLUDE_DIR1); +#endif +#ifdef C_INCLUDE_DIR2 + set_a_dir( C_INCLUDE_DIR2); +#endif + +#if SYS_FAMILY == SYS_UNIX +#if SYSTEM == SYS_CYGWIN + if (no_cygwin) /* -mno-cygwin */ + set_a_dir( "/usr/include/mingw"); + else + set_a_dir( "/usr/include"); +#else + set_a_dir( "/usr/include"); /* Should be placed after C_INCLUDE_DIR? */ +#endif +#endif +} + +static void set_a_dir( + const char * dirname /* The path-name */ +) +/* + * Append an include directory. + * This routine is called from the following routines (in this order). + * 1. do_options() by -I option. + * 2. do_options() by -isystem option (for GNUC). + * 3. set_env_dirs() by environment variables. + * 4. set_sys_dirs() by CPLUS_INCLUDE_DIR?, C_INCLUDE_DIR? and system- + * specifics (unless -I- or -nostdinc option is specified). + * Ignore non-existent directory. + * Note that this routine should be called only in initializing steps, + * because increase of include dirs causes reallocation of incdir[]. + * Note: a trailing PATH-DELIM is appended by norm_path(). + */ +{ + char * norm_name; + const char ** ip; + + if (incdir == NULL) { /* Should be initialized */ + max_inc = INIT_NUM_INCLUDE; + incdir = (const char **) xmalloc( sizeof (char *) * max_inc); + incend = &incdir[ 0]; + } else if (incend - incdir >= max_inc) { /* Buffer full */ +#if SYSTEM == SYS_MAC + size_t framework_pos = to_search_framework - incdir; +#endif +#if COMPILER == GNUC + size_t sys_pos = 0; + if (sys_dirp) + sys_pos = sys_dirp - incdir; +#endif + incdir = (const char **) xrealloc( (void *) incdir + , sizeof (char *) * max_inc * 2); + incend = &incdir[ max_inc]; +#if COMPILER == GNUC + if (sys_pos) + sys_dirp = &incdir[ sys_pos]; +#endif +#if SYSTEM == SYS_MAC + to_search_framework = &incdir[ framework_pos]; +#endif + max_inc *= 2; + } + + if (dirname == NULL) + return; /* Only to initialize incdir[] */ + norm_name = norm_dir( dirname, FALSE); + if (! norm_name) /* Non-existent */ + return; + for (ip = incdir; ip < incend; ip++) { + if (str_case_eq( *ip, norm_name)) { + if (option_flags.v && ! (mcpp_debug & MACRO_CALL)) + mcpp_fprintf( ERR, "Duplicate directory \"%s\" is ignored\n" + , norm_name); + free( norm_name); /* Already registered */ + return; + } + } + /* Register new directory */ + *incend++ = norm_name; +} + +#if SYSTEM == SYS_MAC && COMPILER == GNUC +/* Definitions for "header map" file of Xcode / Apple-GCC. */ +/* These definitions were taken from cpplib.h of Apple-GCC-4.0.1 */ + +#define HMAP_SAME_ENDIANNESS_MAGIC \ + (((((('h' << 8) | 'm') << 8) | 'a') << 8) | 'p') + +typedef unsigned short uint16; +typedef unsigned int uint32; + +struct hmap_bucket +{ + uint32 key; /* Offset (into strings) of key */ + struct { + uint32 prefix; /* Offset (into strings) of value prefix */ + uint32 suffix; /* Offset (into strings) of value suffix */ + } value; /* Value (prefix- and suffix-strings) */ +}; + +struct hmap_header_map +{ + uint32 magic; /* Magic word, also indicates byte order */ + uint16 version; /* Version number -- currently 1 */ + uint16 _reserved; /* Reserved for future use -- zero for now */ + uint32 strings_offset; /* Offset to start of string pool */ + uint32 count; /* Number of entries in the string table */ + uint32 capacity; /* Number of buckets (always a power of 2) */ + uint32 max_value_length; + /* Length of longest result path (excl. '\0') */ + struct hmap_bucket buckets[1]; + /* Inline array of 'capacity' maptable buckets */ + /* Strings follow the buckets, at strings_offset. */ +}; +#endif + +static char * norm_dir( + const char * dirname, /* Directory path to normalize */ + int framework /* Setting a framework directory*/ +) +/* + * Normalize include directory path. + * Handle -isysroot option for GCC, including framework directory for SYS_MAC. + */ +{ + char * norm_name; + +#if COMPILER == GNUC + if (sysroot && sys_dirp) { + /* Logical system root specified and dirname is system header dir */ + char delim[ 2] = { EOS, EOS}; + char * dir; +#if SYSTEM == SYS_MAC + if (! framework && memcmp( dirname, "/usr/", 5) != 0) + return NULL; /* /Developer/usr/lib/gcc/ */ +#endif + if (dirname[ 0] != PATH_DELIM) + delim[ 0] = PATH_DELIM; + dir = xmalloc( strlen( sysroot) + strlen( dirname) + 2); + sprintf( dir, "%s%s%s", sysroot, delim, dirname); + dirname = dir; + } +#endif +#if SYSTEM == SYS_MAC && COMPILER == GNUC + if (strlen( dirname) > 5 + && str_case_eq( dirname + strlen( dirname) - 5, ".hmap")) { + /* "header map" file (not an include directory) */ + norm_name = norm_path( null, dirname, FALSE, TRUE); + if (! norm_name && option_flags.v) + mcpp_fprintf( ERR, "Invalid header map file \"%s\" is ignored\n" + , dirname); + } else +#endif + { + norm_name = norm_path( dirname, NULL, FALSE, FALSE); + /* Normalize the pathname to compare */ + if (! norm_name && option_flags.v && ! (mcpp_debug & MACRO_CALL)) + mcpp_fprintf( ERR, "Non-existent directory \"%s\" is ignored\n" + , dirname); + } +#if COMPILER == GNUC + if (sysroot && sys_dirp) + free( dirname); +#endif + + return norm_name; +} + +static char * norm_path( + const char * dir, /* Include directory (maybe "", never NULL) */ + const char * fname, + /* Filename (possibly has directory part, or maybe NULL) */ + int inf, /* If TRUE, output some infs when (mcpp_debug & PATH) */ + int hmap /* "header map" file of Apple-GCC */ +) +/* + * Normalize the pathname removing redundant components such as + * "foo/../", "./" and trailing "/.". + * Append trailing "/" if 'fname' is NULL. + * Change relative path to absolute path. + * Dereference a symbolic linked file (or directory) to a real directory/file. + * Return a malloc'ed buffer, if the directory/file exists. + * Return NULL, if the specified directory/file does not exist or 'dir' is + * not a directory or 'fname' is not a regular file. + * This routine is called from set_a_dir(), init_gcc_macro(), do_once() and + * open_file(). + */ +{ + char * norm_name; /* The path-list converted */ + char * start; + char * cp1; + char * cp2; + char * abs_path; + int len; /* Should not be size_t */ + size_t start_pos = 0; + char slbuf1[ PATHMAX+1]; /* Working buffer */ +#if SYS_FAMILY == SYS_UNIX + char slbuf2[ PATHMAX+1]; /* Working buffer for dereferencing */ +#endif +#if SYSTEM == SYS_CYGWIN || SYSTEM == SYS_MINGW + static char * root_dir; + /* System's root directory in Windows file system */ + static size_t root_dir_len; +#if SYSTEM == SYS_CYGWIN + static char * cygdrive = "/cygdrive/"; /* Prefix for drive letter */ +#else + static char * mingw_dir; /* "/mingw" dir in Windows */ + static size_t mingw_dir_len; +#endif +#endif +#if HOST_COMPILER == MSC + struct _stat st_buf; +#else + struct stat st_buf; +#endif + + if (! dir || (*dir && is_full_path( fname))) + cfatal( "Bug: Wrong argument to norm_path()" /* _F_ */ + , NULL, 0L, NULL); + inf = inf && (mcpp_debug & PATH); /* Output information */ + + strcpy( slbuf1, dir); /* Include directory */ + len = strlen( slbuf1); + if (fname && len && slbuf1[ len - 1] != PATH_DELIM) { + slbuf1[ len] = PATH_DELIM; /* Append PATH_DELIM */ + slbuf1[ ++len] = EOS; + } else if (! fname && len && slbuf1[ len - 1] == PATH_DELIM) { + /* stat() of some systems do not like trailing '/' */ + slbuf1[ --len] = EOS; + } + if (fname) + strcat( slbuf1, fname); + if (stat( slbuf1, & st_buf) != 0 /* Non-existent */ + || (! fname && ! S_ISDIR( st_buf.st_mode)) + /* Not a directory though 'fname' is not specified */ + || (fname && ! S_ISREG( st_buf.st_mode))) + /* Not a regular file though 'fname' is specified */ + return NULL; +#if SYSTEM == SYS_MAC && COMPILER == GNUC + if (hmap) { /* Dirty "header map" file */ + struct hmap_header_map hmap; + size_t cnt; + FILE * fp; + fp = fopen( fname, "r"); + cnt = fread( & hmap, sizeof (struct hmap_header_map), 1, fp); + fclose( fp); + if (cnt == 0 || hmap.magic != HMAP_SAME_ENDIANNESS_MAGIC) + return NULL; + } +#endif + if (! fname) { + slbuf1[ len] = PATH_DELIM; /* Append PATH_DELIM */ + slbuf1[ ++len] = EOS; + } +#if SYS_FAMILY == SYS_UNIX + /* Dereference symbolic linked directory or file, if any */ + slbuf1[ len] = EOS; /* Truncate PATH_DELIM and 'fname' part, if any */ + slbuf2[ 0] = EOS; + if (*dir && ! fname) { /* Registering include directory */ + /* Symbolic link check of directories are required */ + deref_syml( slbuf1, slbuf2, slbuf1); + } else if (fname) { /* Regular file */ + len = strlen( slbuf1); + strcat( slbuf1, fname); + deref_syml( slbuf1, slbuf2, slbuf1 + len); + /* Symbolic link check of directory */ + if ((len = readlink( slbuf1, slbuf2, PATHMAX)) > 0) { + /* Dereference symbolic linked file (not directory) */ + *(slbuf2 + len) = EOS; + cp1 = slbuf1; + if (slbuf2[ 0] != PATH_DELIM) { /* Relative path */ + cp2 = strrchr( slbuf1, PATH_DELIM); + if (cp2) /* Append to the source directory */ + cp1 = cp2 + 1; + } + strcpy( cp1, slbuf2); + } + } + if (inf) { + if (slbuf2[ 0]) + mcpp_fprintf( DBG, "Dereferenced \"%s%s\" to \"%s\"\n" + , dir, fname ? fname : null, slbuf1); + } +#endif + len = strlen( slbuf1); + start = norm_name = xmalloc( len + 1); /* Need a new buffer */ + strcpy( norm_name, slbuf1); +#if SYS_FAMILY == SYS_WIN + bsl2sl( norm_name); +#endif +#if SPECIAL_PATH_DELIM /* ':' ? */ + for (cp1 = norm_name; *cp1 != EOS; cp1++) { + if (*cp1 == PATH_DELIM) + *cp1 = '/'; + } +#endif + cp1 = norm_name; + +#if SYSTEM == SYS_CYGWIN + /* Convert to "/cygdirve/x/dir" style of absolute path-list */ + if (len >= 8 && (memcmp( cp1, "/usr/bin", 8) == 0 + || memcmp( cp1, "/usr/lib", 8) == 0)) { + memmove( cp1, cp1 + 4, len - 4 + 1); /* Remove "/usr" */ + len -= 4; + } + if (*cp1 == '/' && (len < 10 || memcmp( cp1, cygdrive, 10) != 0)) { + /* /dir, not /cygdrive/ */ + if (! root_dir_len) { /* Should be initialized */ + /* Convert "X:\DIR-list" to "/cygdrive/x/dir-list" */ + root_dir = xmalloc( strlen( CYGWIN_ROOT_DIRECTORY) + 1); + strcpy( root_dir, CYGWIN_ROOT_DIRECTORY); + *(root_dir + 1) = *root_dir; /* "x:/" to " x/" */ + cp1 = xmalloc( strlen( cygdrive) + strlen( root_dir)); + strcpy( cp1, cygdrive); + strcat( cp1, root_dir + 1); + free( root_dir); + root_dir = cp1; + root_dir_len = strlen( root_dir); + } + cp1 = xmalloc( root_dir_len + len + 1); + strcpy( cp1, root_dir); + strcat( cp1, norm_name); /* Convert to absolute path */ + free( norm_name); + norm_name = start = cp1; + len += root_dir_len; + } +#endif + +#if SYSTEM == SYS_MINGW + /* Handle the mess of MinGW's path-list */ + /* Convert to "x:/dir" style of absolute path-list */ + if (*cp1 == PATH_DELIM && isalpha( *(cp1 + 1)) + && *(cp1 + 2) == PATH_DELIM) { /* /c/, /d/, etc*/ + *cp1 = *(cp1 + 1); + *(cp1 + 1) = ':'; /* Convert to c:/, d:/, etc */ + } else if (memcmp( cp1, "/mingw", 6) == 0) { + if (! mingw_dir_len) { /* Should be initialized */ + mingw_dir_len = strlen( MINGW_DIRECTORY); + mingw_dir = xmalloc( mingw_dir_len + 1); + strcpy( mingw_dir, MINGW_DIRECTORY); + } + cp1 = xmalloc( mingw_dir_len + len + 1); + strcpy( cp1, mingw_dir); + strcat( cp1, norm_name + 6); /* Convert to absolute path */ + free( norm_name); + norm_name = start = cp1; + len += mingw_dir_len; + } else if (memcmp( cp1, "/usr", 4) == 0) { + memmove( cp1, cp1 + 4, len - 4 + 1); /* Remove "/usr" */ + len -= 4; + } + if (*cp1 == '/') { /* /dir or / */ + if (! root_dir_len) { /* Should be initialized */ + root_dir_len = strlen( MSYS_ROOT_DIRECTORY); + root_dir = xmalloc( root_dir_len + 1); + strcpy( root_dir, MSYS_ROOT_DIRECTORY); + } + cp1 = xmalloc( root_dir_len + len + 1); + strcpy( cp1, root_dir); + strcat( cp1, norm_name); /* Convert to absolute path */ + free( norm_name); + norm_name = start = cp1; + len += root_dir_len; + } +#endif + +#if SYS_FAMILY == SYS_WIN + if (*(cp1 + 1) == ':') + start = cp1 += 2; /* Next to the drive letter */ + start_pos = 2; +#endif + if (len == 1 && *norm_name == '/') /* Only "/" */ + return norm_name; + + if (strncmp( cp1, "./", 2) == 0) /* Remove beginning "./" */ + memmove( cp1, cp1 + 2, strlen( cp1 + 2) + 1); /* +1 for EOS */ + if (*start != '/') { /* Relative path to current directory */ + /* Make absolute path */ + abs_path = xmalloc( len + strlen( cur_work_dir) + 1); + cp1 = stpcpy( abs_path, cur_work_dir); + strcpy( cp1, start); + free( norm_name); + norm_name = abs_path; + start = cp1 = norm_name + start_pos; + } + + while ((cp1 = strstr( cp1, "/./")) != NULL) + memmove( cp1, cp1 + 2, strlen( cp1 + 2) + 1); + /* Remove "/." of "/./" */ + cp1 = start; + /* Remove redundant "foo/../" */ + while ((cp1 = strstr( cp1, "/../")) != NULL) { + *cp1 = EOS; + if ((cp2 = strrchr( start, '/')) != NULL) { + if (*(cp1 - 1) != '.') { + memmove( cp2 + 1, cp1 + 4, strlen( cp1 + 4) + 1); + /* Remove "foo/../" */ + cp1 = cp2; + } else { /* Impossible */ + break; + } + } else { /* Impossible */ + break; + } + } + +#if SPECIAL_PATH_DELIM + for (cp1 = start; *cp1 != EOS; cp1++) { + if (*cp1 == '/') + *cp1 = PATH_DELIM; + } +#endif + if (inf) { + char debug_buf[ PATHMAX+1]; + strcpy( debug_buf, dir); + strcat( debug_buf, fname ? fname : null); +#if SYS_FAMILY == SYS_WIN + bsl2sl( debug_buf); +#endif + if (! str_eq( debug_buf, norm_name)) + mcpp_fprintf( DBG, "Normalized the path \"%s\" to \"%s\"\n" + , debug_buf, norm_name); + } + + return norm_name; +} + +#if SYS_FAMILY == SYS_UNIX + +static void deref_syml( + char * slbuf1, /* Original path-list */ + char * slbuf2, /* Working buffer */ + char * chk_start /* Pointer into slbuf1 */ +) +/* Dereference symbolic linked directory */ +{ + char * cp2; + int len; /* Should be int, not size_t */ + + while ((chk_start = strchr( chk_start, PATH_DELIM)) != NULL) { + *chk_start = EOS; + if ((len = readlink( slbuf1, slbuf2, PATHMAX)) > 0) { + /* Dereference symbolic linked directory */ + cp2 = strrchr( slbuf1, PATH_DELIM); /* Previous delimiter */ + *chk_start = PATH_DELIM; + strcpy( slbuf2 + len, chk_start); + if (slbuf2[ 0] == PATH_DELIM) { /* Absolute path */ + strcpy( slbuf1, slbuf2); + chk_start = slbuf1 + len + 1; + } else { + if (cp2) + chk_start = cp2 + 1; + else + chk_start = slbuf1; + strcpy( chk_start, slbuf2); /* Rewrite the path */ + chk_start += len; + } + } else { + *chk_start++ = PATH_DELIM; + } + } +} +#endif + +#if COMPILER == GNUC + +static void init_gcc_macro( void) +/* + * Predefine GCC macros. + * This routine should be called after opening output file in order to putout + * macro informations by -K option into the file. + * Also this routine should be called before undef_macros() in order to + * permit undefining a macro by -U option. + */ +{ + char fname[ BUFSIZ]; + char lbuf[ BUFSIZ]; + char * include_dir; /* The version-specific include directory */ + char * tmp; + FILE * fp; + DEFBUF * defp; + const char * cp; + char * tp; + int i; + + if (nflag) /* -undef option */ + goto undef_special; + + tmp = xmalloc( strlen( INC_DIR) + strlen( "/mingw/mcpp-gcc-") + + strlen( arch) + 1); +#if SYSTEM == SYS_CYGWIN + if (no_cygwin) { + sprintf( tmp, "%s/mingw/mcpp-gcc-%s", INC_DIR, arch); + } else { + sprintf( tmp, "%s/mcpp-gcc-%s", INC_DIR, arch); + } +#else + sprintf( tmp, "%s/mcpp-gcc-%s", INC_DIR, arch); +#endif + include_dir = norm_path( tmp, NULL, TRUE, FALSE); + free( tmp); + + for (i = 0; i <= 1; i++) { + int nargs; + + if ((mcpp_mode == POST_STD || ansi) && i == 0) + continue; /* POST_STD or __STRICT_ANSI__ does not */ + /* predefine non-conforming macros */ + /* The predefined macro file */ + cp = i ? "std" : "old"; + sprintf( fname, "%sg%s%d%d_predef_%s.h" + , include_dir, cplus_val ? "xx" : "cc" + , gcc_maj_ver, gcc_min_ver, cp); + /* Note that norm_path() append a PATH_DELIM. */ + if ((fp = fopen( fname, "r")) == NULL) { + mcpp_fprintf( ERR, "The mode for %s has not been installed.\n" + , arch); + longjmp( error_exit, -1); + } + nargs = i ? 0 : DEF_NOARGS_PREDEF_OLD; + /* g*_predef_std.h has DEF_NOARGS_PREDEF or non-negative args */ + /* while g*_predef_old.h has only DEF_NOARGS_PREDEF_OLD args */ + while (fgets( lbuf, BUFSIZ, fp) != NULL) { + unget_string( lbuf, "gcc_predefine"); + if (skip_ws() == '#' + && scan_token( skip_ws(), (tp = work_buf, &tp), work_end) + == NAM + && str_eq( work_buf, "define")) { + defp = do_define( TRUE, nargs); /* Ignore re-definition */ + } + skip_nl(); + } + } + free( include_dir); + +undef_special: + if (look_id( "__OPTIMIZE__")) /* -O option is specified */ + undefine( "__NO_INLINE__"); +} + +static void chk_env( void) +/* + * Check the environment variables to specify output of dependency lines. + */ +{ + char * env; + char * cp; + + /* Output of dependency lines */ + if ((env = getenv( "DEPENDENCIES_OUTPUT")) == NULL) { + if ((env = getenv( "SUNPRO_DEPENDENCIES")) == NULL) + return; + else + mkdep |= MD_SYSHEADER; + } + mkdep |= MD_MKDEP; + if ((cp = strchr( env, ' ')) != NULL) { + *cp++ = EOS; + while (*cp == ' ') + cp++; + } + if (! mkdep_fp) /* Command line option precedes */ + mkdep_fp = fopen( env, "a"); + if (! mkdep_target) + mkdep_target = cp; +} + +#elif COMPILER == MSC + +static void init_msc_macro( void) +/* + * Define a few MSC-specific predefined macros. + */ +{ + DEFBUF * defp; + int i; + + defp = look_id( "_MSC_VER"); + i = atoi( defp->repl); + if (i >= 1400) { /* _MSC_VER >= 1400 */ + look_and_install( "_MT", DEF_NOARGS_PREDEF, null, "1"); + if (cplus_val && ! wchar_t_modified) { + /* -Zc:wchar_t- was not specified */ + look_and_install( "_NATIVE_WCHAR_T_DEFINED", DEF_NOARGS_PREDEF + , null, "1"); + look_and_install( "_WCHAR_T_DEFINED", DEF_NOARGS_PREDEF, null + , "1"); + } + } +} + +#endif + +static void def_macros( void) +/* + * Define macros specified by -D option. + * This routine should be called before undef_macros(). + */ +{ + int i; + + for (i = 0; i < def_cnt; i++) + def_a_macro( 'D', def_list[ i]); +} + +static void undef_macros( void) +/* + * Undefine macros specified by -U option. + * This routine should be called after init_predefine(). + */ +{ + char * name; + int i; + + for (i = 0; i < undef_cnt; i++) { + name = undef_list[ i]; + if (look_id( name) != NULL) + undefine( name); + else if (warn_level & 8) + mcpp_fprintf( ERR, "\"%s\" wasn't defined\n", name); + } +} + +void put_depend( + const char * filename +) +/* + * Append a header name to the source file dependency line. + */ +{ +#define MAX_OUT_LEN 76 /* Maximum length of output line */ +#define MKDEP_INITLEN (MKDEP_INIT * 0x100) +#define MKDEP_MAX (MKDEP_INIT * 0x10) +#define MKDEP_MAXLEN (MKDEP_INITLEN * 0x10) + + static char * output = NULL; /* File names */ + static size_t * pos = NULL; /* Offset to filenames */ + static int pos_num; /* Index of pos[] */ + static char * out_p; /* Pointer to output[] */ + static size_t mkdep_len; /* Size of output[] */ + static size_t pos_max; /* Size of pos[] */ + static FILE * fp; /* Path to output dependency line */ + static size_t llen; /* Length of current physical output line */ + size_t * pos_p; /* Index into pos[] */ + size_t fnamlen; /* Length of filename */ + + if (fp == NULL) { /* Main source file. Have to initialize. */ +#if MCPP_LIB + if (output != NULL) { + free( output); + free( pos); + } +#endif + output = xmalloc( mkdep_len = MKDEP_INITLEN); + pos = (size_t *) xmalloc( (pos_max = MKDEP_INIT) * sizeof (size_t)); + out_p = md_init( filename, output); + fp = mkdep_fp; + llen = strlen( output); + pos_num = 0; /* Initialize for MCPP_LIB build */ + } else if (filename == NULL) { /* End of input */ + out_p = stpcpy( out_p, "\n\n"); + if (mkdep & MD_PHONY) { + /* Output the phony target line for each recorded header files. */ + char * cp; + int c; + + if (strlen( output) * 2 + (pos_num * 2) >= MKDEP_MAXLEN) { + cerror( "Too long dependency line" /* _E_ */ + , NULL, 0L, NULL); + if (fp == fp_out) + mcpp_fputs( output, OUT); + else + fputs( output, fp); + return; + } else if (strlen( output) * 2 + (pos_num * 2) >= mkdep_len) { + /* Enlarge the buffer */ + size_t len = out_p - output; + output = xrealloc( output, mkdep_len *= 2); + out_p = output + len; + } + pos_num--; + for (pos_p = &pos[ 0]; pos_p <= &pos[ pos_num]; pos_p++) { + if (pos_p == &pos[ pos_num]) { /* End of output */ + for (cp = output + *pos_p; *cp != '\n'; cp++) + ; + c = '\n'; /* Append newline */ + } else { + cp = output + *(pos_p + 1) - 1; + while( *cp == ' ' || *cp == '\\' || *cp == '\n') + cp--; /* Remove trailing spaces */ + c = *(++cp); + } + *cp = EOS; + out_p = stpcpy( out_p, output + *pos_p); + out_p = stpcpy( out_p, ":\n\n"); + *cp = c; + } + } + if (fp == fp_out) { /* To the same path with normal preprocessing */ + mcpp_fputs( output, OUT); + } else { /* To the file specified by -MF, -MD, -MMD options */ + fputs( output, fp); + fclose( fp); + } + fp = NULL; /* Clear for the next call in MCPP_LIB build */ + return; + } + + fnamlen = strlen( filename); + /* Check the recorded filename */ + for (pos_p = pos; pos_p < &pos[ pos_num]; pos_p++) { + if (memcmp( output + *pos_p, filename, fnamlen) == 0) + return; /* Already recorded filename */ + } + /* Any new header. Append its name to output. */ + if (llen + fnamlen > MAX_OUT_LEN) { /* Line is long */ + out_p = stpcpy( out_p, " \\\n "); /* Fold it */ + llen = 1; + } + llen += fnamlen + 1; + if (pos_num >= MKDEP_MAX + || out_p + fnamlen + 1 >= output + MKDEP_MAXLEN) + cfatal( "Too long dependency line: %s", output, 0L, NULL); + /* Need to enlarge the buffer */ + if (pos_num >= pos_max) { + pos = (size_t *) xrealloc( (char *) pos + , (pos_max *= 2) * sizeof (size_t *)); + } + if (output + mkdep_len <= out_p + fnamlen + 1) { + size_t len = out_p - output; + output = xrealloc( output, mkdep_len *= 2); + out_p = output + len; + } + *out_p++ = ' '; + pos[ pos_num++] = out_p - output; /* Remember the offset */ + /* Don't use pointer, since 'output' may be reallocated later. */ + out_p = stpcpy( out_p, filename); +} + +static char * md_init( + const char * filename, /* The source file name */ + char * output /* Output to dependency file */ +) +/* + * Initialize output file and target. + */ +{ + char prefix[ PATHMAX]; + char * cp = NULL; + size_t len; + char * out_p; + const char * target = filename; + const char * cp0; + + if (! mkdep_target || ! mkdep_fp) { /* Make target name */ +#ifdef PATH_DELIM + if ((cp0 = strrchr( target, PATH_DELIM)) != NULL) + target = cp0 + 1; +#endif + if ((cp0 = strrchr( target, '.')) == NULL) + len = strlen( target); + else + len = (size_t) (cp0 - target); + memcpy( prefix, target, len); + cp = prefix + len; + *cp++ = '.'; + } + + if (! mkdep_fp) { /* Unless already opened by -MF, -MD, -MMD options */ + if (mkdep & MD_FILE) { + strcpy( cp, "d"); + mkdep_fp = fopen( prefix, "w"); + } else { + mkdep_fp = fp_out; /* Output dependency line to normal output */ + no_output++; /* Without normal output */ + } + } + + if (mkdep_target) { /* -MT or -MQ option is specified */ + if (mkdep & MD_QUOTE) { /* 'Quote' $, \t and space */ + out_p = md_quote( output); + } else { + out_p = stpcpy( output, mkdep_target); + } + } else { + strcpy( cp, OBJEXT); + out_p = stpcpy( output, prefix); + } + + *out_p++ = ':'; + *out_p = EOS; + return out_p; +} + +static char * md_quote( + char * output +) +/* + * 'Quote' $, tab and space. + * This function was written referring to GCC V.3.2 source. + */ +{ + char * p; + char * q; + + for (p = mkdep_target; *p; p++, output++) { + switch (*p) { + case ' ': + case '\t': + /* GNU-make treats backslash-space sequence peculiarly */ + for (q = p - 1; mkdep_target <= q && *q == '\\'; q--) + *output++ = '\\'; + *output++ = '\\'; + break; + case '$': + *output++ = '$'; + break; + default: + break; + } + *output = *p; + } + *output = EOS; + return output; +} + +static const char * toolong_fname = + "Too long header name \"%s%.0ld%s\""; /* _F_ */ +static const char * excess_token = + "Excessive token sequence \"%s\""; /* _E_, _W1_ */ + +int do_include( + int next /* TRUE if the directive is #include_next */ +) +/* + * Process the #include line. + * There are three variations: + * #include "file" search somewhere relative to the + * current (or source) directory, if not + * found, treat as #include . + * #include Search in an implementation-dependent + * list of places. + * #include macro-call Expand the macro call, it must be one of + * "file" or , process as such. + * On success : return TRUE; + * On failure of syntax : return FALSE; + * On failure of file opening : return FALSE. + * do_include() always absorbs the line (including the ). + */ +{ + const char * const no_name = "No header name"; /* _E_ */ + char header[ PATHMAX + 16]; + int token_type; + char * fname; + char * filename; + int delim; /* " or <, > */ + + if ((delim = skip_ws()) == '\n') { /* No argument */ + cerror( no_name, NULL, 0L, NULL); + return FALSE; + } + fname = infile->bptr - 1; /* Current token for diagnosis */ + + if (standard && (char_type[ delim] & LET)) { /* Maybe macro */ + int c; + char *hp; + + hp = header; + *hp = EOS; + c = delim; + while (get_unexpandable( c, FALSE) != NO_TOKEN) { + /* Expand any macros in the line */ + if (header + PATHMAX < hp + (int) (workp - work_buf)) + cfatal( toolong_fname, header, 0L, work_buf); + hp = stpcpy( hp, work_buf); + while (char_type[ c = get_ch()] & HSP) + *hp++ = c; + } + *hp = EOS; /* Ensure to terminate */ + if (macro_line == MACRO_ERROR) /* Unterminated macro */ + return FALSE; /* already diagnosed. */ + unget_string( header, NULL); /* To re-read */ + delim = skip_ws(); + if (delim == '\n') { + cerror( no_name, NULL, 0L, NULL); /* Expanded to */ + return FALSE; /* 0 token. */ + } + } + + token_type = scan_token( delim, (workp = work_buf, &workp) + , work_buf + PATHMAX); + if (token_type == STR) /* String literal form */ + goto found_name; + else if (token_type == OPE && openum == OP_LT) /* '<' */ + workp = scan_quote( delim, work_buf, work_buf + PATHMAX, TRUE); + /* Re-construct or diagnose */ + else /* Any other token in- */ + goto not_header; /* cluding <=, <<, <% */ + + if (workp == NULL) /* Missing closing '>' */ + goto syntax_error; + +found_name: + *--workp = EOS; /* Remove the closing and */ + fname = save_string( &work_buf[ 1]); /* the starting delimiter. */ + + if (skip_ws() != '\n') { + if (standard) { + cerror( excess_token, infile->bptr-1, 0L, NULL); + skip_nl(); + goto error; + } else if (mcpp_mode == OLD_PREP) { + skip_nl(); + } else { + if (warn_level & 1) + cwarn( excess_token, infile->bptr-1, 0L, NULL); + skip_nl(); + } + } + +#if SYS_FAMILY == SYS_WIN + bsl2sl( fname); +#endif + filename = fname; +#if NO_DIR /* Unofficial feature */ + if (no_dir) { /* Strip directory components */ + char src_dir[ PATHMAX] = { EOS, }; + if (has_directory( fname, src_dir)) + filename = fname + strlen( src_dir); + delim = '"'; /* Even a system header is handled as a local one */ + } +#endif + if (open_include( filename, (delim == '"'), next)) { + /* 'fname' should not be free()ed, it is used as file-> */ + /* real_fname and has been registered into fnamelist[] */ + return TRUE; + } + + cerror( "Can't open include file \"%s\"", filename, 0L, NULL); /* _E_ */ +error: + free( fname); + return FALSE; + +not_header: + cerror( "Not a header name \"%s\"", fname, 0L, NULL); /* _E_ */ +syntax_error: + skip_nl(); + return FALSE; +} + +static int open_include( + char * filename, /* File name to include */ + int searchlocal, /* TRUE if #include "file" */ + int next /* TRUE if #include_next */ +) +/* + * Open an include file. This routine is only called from do_include() above. + * It searches the list of directories via search_dir() and opens the file + * via open_file(), linking it into the list of active files. + * Returns TRUE if the file was opened, FALSE if it fails. + */ +{ + char src_dir[ PATHMAX] = { EOS, }; /* Directory part of includer */ + int full_path; /* Filename is full-path-list */ + int has_dir = FALSE; /* Includer has directory part */ + int has_dir_src = FALSE; + int has_dir_fname = FALSE; + + full_path = is_full_path( filename); + + if (!full_path && searchlocal && (search_rule & SOURCE)) { + has_dir_src = has_directory( infile->src_dir, src_dir); + has_dir_fname = has_directory( infile->real_fname + , src_dir + strlen( src_dir)); + /* Get directory part of the parent file of the file to include.*/ + /* Note that infile->dirp of main input file is set to "" and */ + /* remains the same even if -include options are processed. */ + has_dir = has_dir_src || has_dir_fname + || (**(infile->dirp) != EOS); + } + if (mcpp_debug & PATH) + mcpp_fprintf( DBG, "filename: %s\n", filename); + +#if COMPILER == GNUC + if (! full_path) { + if (i_split /* -I- option is specified */ + || next) /* or #include_next */ + goto search_dirs; + } +#endif + + if ((searchlocal && ((search_rule & CURRENT) || !has_dir)) || full_path) { + /* + * Look in local directory first. + * Try to open filename relative to the "current directory". + */ + if (open_file( &null, NULL, filename, searchlocal && !full_path + , FALSE, FALSE)) + return TRUE; + if (full_path) + return FALSE; + } + + if (searchlocal && (search_rule & SOURCE) && has_dir) { + /* + * Look in local directory of source file. + * Try to open filename relative to the "source directory". + */ + if (open_file( infile->dirp, src_dir, filename, TRUE, FALSE, FALSE)) + return TRUE; + } + +#if COMPILER == MSC + if (searchlocal) { + /* Visual C searches ancestor source's directory, too. */ + FILEINFO * file = infile; + while ((file = file->parent) != NULL) { + /* Search each parent includer's directory */ + if (open_file( file->dirp, src_dir, filename, TRUE, FALSE, FALSE)) + return TRUE; + } + } +#endif +#if COMPILER == GNUC +search_dirs: + if (searchlocal) { + /* Search the directories specified by -iquote option, if any. */ + const char ** qdir; + for (qdir = quote_dir; qdir < quote_dir_end; qdir++) { + if (open_file( qdir, NULL, filename, FALSE, FALSE, FALSE)) + return TRUE; + } + } +#endif + /* Search the include directories */ + if (search_dir( filename, searchlocal, next)) + return TRUE; + + return FALSE; +} + +static int has_directory( + const char * source, /* Filename to examine */ + char * directory /* Put directory stuff here */ +) +/* + * If a directory is found in the 'source' filename string (i.e. "includer"), + * the directory part of the string is copied to 'directory' and + * has_directory() returns TRUE. + * Else, nothing is copied and it returns FALSE. + */ +{ + const char * sp; + size_t len; + + if (! source) + return FALSE; + if ((sp = strrchr( source, PATH_DELIM)) == NULL) { + return FALSE; + } else { + len = (size_t)(sp - source) + 1; /* With path-delimiter */ + memcpy( directory, source, len); + directory[ len] = EOS; + return TRUE; + } +} + +static int is_full_path( + const char * path +) +/* + * Check whether the path is a full (absolute) path list or not. + */ +{ + if (! path) + return FALSE; +#if SYS_FAMILY == SYS_UNIX + if (path[0] == PATH_DELIM) +#elif SYS_FAMILY == SYS_WIN + if ((path[1] == ':' && path[2] == PATH_DELIM) /* "C:/path" */ + || path[0] == PATH_DELIM) /* Root dir of current drive */ +#elif 1 +/* For other systems you should write code here. */ + if (path[0] == PATH_DELIM) +#endif + return TRUE; + else + return FALSE; +} + +static int search_dir( + char * filename, /* File name to include */ + int searchlocal, /* #include "header.h" */ + int next /* TRUE if #include_next */ +) +/* + * Look in any directories specified by -I command line arguments, + * specified by environment variable, then in the builtin search list. + */ +{ + const char ** incptr; /* -> inlcude directory */ + + incptr = incdir; +#if COMPILER == GNUC + if (next && **inc_dirp != EOS) + incptr = inc_dirp + 1; + /* In case of include_next search after the includer's directory */ +#endif + + for ( ; incptr < incend; incptr++) { + if (strlen( *incptr) + strlen( filename) >= PATHMAX) + cfatal( toolong_fname, *incptr, 0L, filename); /* _F_ */ +#if SYSTEM == SYS_MAC + if (incptr == to_search_framework && ! searchlocal) { + /* Now search the framework dirs */ + if (search_framework( filename)) { /* Found */ + if (in_import) /* "#import"ed file is once only */ + do_once( infile->full_fname); + return TRUE; + } + /* Else continue to search incptr */ + } +#endif + if (open_file( incptr, NULL, filename, FALSE, FALSE, FALSE)) + /* Now infile has been renewed */ + return TRUE; + } + + return FALSE; +} + +static int open_file( + const char ** dirp, /* Pointer to include directory */ + const char * src_dir, /* Source directory of includer */ + const char * filename, /* Filename (possibly has directory) */ + int local, /* #include "file" */ + int include_opt, /* Specified by -include option */ + int sys_frame /* System framework header (for SYS_MAC)*/ +) +/* + * Open a file, add it to the linked list of open files, close the includer + * if nessesary and truncate the includer's buffer. + * This is called from open_include() and at_start(). + */ +{ + char dir_fname[ PATHMAX] = { EOS, }; +#if HOST_COMPILER == BORLANDC + /* Borland's fopen() does not set errno. */ + static int max_open = FOPEN_MAX - 5; +#else + static int max_open; +#endif + int len; + FILEINFO * file = infile; + FILE * fp; + char * fullname; + const char * fname; + + errno = 0; /* Clear errno possibly set by path searching */ +#if SYSTEM == SYS_MAC && COMPILER == GNUC + if (strlen( *dirp) > 5 + && str_case_eq( *dirp + strlen( *dirp) - 5, ".hmap")) { + /* Search header map file for a header */ + if (! search_header_map( *dirp, filename, dir_fname)) + return NULL; + fname = dir_fname; /* Found a path-list */ + dirp = &null; + goto search; + } else +#endif + { + if (mcpp_debug & PATH) + mcpp_fprintf( DBG, "Searching %s%s%s\n", *dirp + , src_dir ? src_dir : null, filename); + } + /* src_dir is usually NULL. This is specified to */ + /* search the source directory of the includer. */ + if (src_dir && *src_dir != EOS) { + strcpy( dir_fname, src_dir); + strcat( dir_fname, filename); + fname = dir_fname; + } else { + fname = filename; + } +search: + fullname = norm_path( *dirp, fname, TRUE, FALSE); + /* Convert to absolute path */ + if (! fullname) /* Non-existent or directory */ + return FALSE; + if (standard && included( fullname)) /* Once included */ + goto true; + + if ((max_open != 0 && max_open <= include_nest) + /* Exceed the known limit of open files */ + || ((fp = fopen( fullname, "r")) == NULL && errno == EMFILE)) { + /* Reached the limit for the first time */ + if (mcpp_debug & PATH) { +#if HOST_COMPILER == BORLANDC + if (include_nest == FOPEN_MAX - 5) +#else + if (max_open == 0) +#endif + mcpp_fprintf( DBG, + "#include nest reached at the maximum of system: %d, returned errno: %d\n" + , include_nest, errno); + } + /* + * Table of open files is full. + * Remember the file position and close the includer. + * The state will be restored by get_line() on end of the included. + */ + file->pos = ftell( file->fp); + fclose( file->fp); + /* In case of failure, re-open the includer */ + if ((fp = fopen( fullname, "r")) == NULL) { + file->fp = fopen( cur_fullname, "r"); + fseek( file->fp, file->pos, SEEK_SET); + goto false; + } + if (max_open == 0) /* Remember the limit of the system */ + max_open = include_nest; + } else if (fp == NULL) /* No read permission */ + goto false; + /* Truncate buffer of the includer to save memory */ + len = (int) (file->bptr - file->buffer); + if (len) { + file->buffer = xrealloc( file->buffer, len + 1); + file->bptr = file->buffer + len; + } + + if (! include_opt) + sharp( NULL, 0); /* Print includer's line num and fname */ + add_file( fp, src_dir, filename, fullname, include_opt); + /* Add file-info to the linked list. 'infile' has been just renewed */ + /* + * Remember the directory for #include_next. + * Note: inc_dirp is restored to the parent includer's directory + * by get_ch() when the current includer is finished. + */ + infile->dirp = inc_dirp = dirp; +#if 0 /* This part is only for debugging */ + chk_dirp( dirp); +#endif +#if COMPILER == GNUC + if ((**dirp != EOS && sys_dirp <= dirp && dirp <= incend) +#if SYSTEM == SYS_MAC + || sys_frame +#endif + ) + infile->sys_header = TRUE; /* Found in a system header dir */ + else + infile->sys_header = FALSE; +#endif + cur_fullname = fullname; + + if (option_flags.z) { + no_output++; /* Don't output the included file */ + if (include_nest == 2) + mcpp_fprintf( OUT, "#include \"%s\"\n", fullname); + /* Output #include line instead, if it is in main source file */ + } else if (! include_opt) { /* Do not sharp() on -include */ + src_line = 1; /* Working on line 1 now */ + sharp( NULL, 1); /* Print out the included file name */ + } + src_line = 0; /* To read the first line */ + + if (mkdep && ((mkdep & MD_SYSHEADER) || ! infile->sys_header)) + put_depend( fullname); /* Output dependency line */ + +true: + return TRUE; +false: + free( fullname); + return FALSE; +} + +void add_file( + FILE * fp, /* Open file pointer */ + const char * src_dir, /* Directory of source */ + const char * filename, /* Name of the file */ + const char * fullname, /* Full path list */ + int include_opt /* File specified by -include option */ +) +/* + * Initialize tables for this open file. This is called from open_file() + * (for #include files), and from the entry to MCPP to open the main input + * file. It calls a common routine get_file() to build the FILEINFO + * structure which is used to read characters. + */ +{ + FILEINFO * file; + const char * too_many_include_nest = + "More than %.0s%ld nesting of #include"; /* _F_ _W4_ */ + + filename = set_fname( filename); /* Search or append to fnamelist[] */ + fullname = set_fname( fullname); /* Search or append to fnamelist[] */ + file = get_file( filename, src_dir, fullname, (size_t) NBUFF, include_opt); + /* file == infile */ + file->fp = fp; /* Better remember FILE * */ + cur_fname = filename; + + if (include_nest >= INCLUDE_NEST) /* Probably recursive #include */ + cfatal( too_many_include_nest, NULL, (long) INCLUDE_NEST, NULL); + if (standard && (warn_level & 4) + && include_nest == std_limits.inc_nest + 1) + cwarn( too_many_include_nest, NULL, (long) std_limits.inc_nest, NULL); + include_nest++; +} + +static const char * set_fname( + const char * filename +) +/* + * Register the source filename to fnamelist[]. + * Search fnamelist[] for filename or append filename to fnamelist[]. + * Returns the pointer. + * file->real_fname and file->full_fname points into fnamelist[]. + */ +{ + INC_LIST * fnamep; + size_t fnamelen; + + if (fnamelist == NULL) { /* Should be initialized */ + max_fnamelist = INIT_NUM_FNAMELIST; + fnamelist = (INC_LIST *) xmalloc( sizeof (INC_LIST) * max_fnamelist); + fname_end = &fnamelist[ 0]; + } else if (fname_end - fnamelist >= max_fnamelist) { + /* Buffer full: double the elements */ + fnamelist = (INC_LIST *) xrealloc( (void *) fnamelist + , sizeof (INC_LIST) * max_fnamelist * 2); + fname_end = &fnamelist[ max_fnamelist]; + max_fnamelist *= 2; + } + + /* Register the filename in fnamelist[] */ + fnamelen = strlen( filename); + for (fnamep = fnamelist; fnamep < fname_end; fnamep++) { + if (fnamep->len == fnamelen && str_case_eq( fnamep->name, filename)) + return filename; /* Already registered */ + } + fname_end->name = xmalloc( fnamelen + 1); + filename = strcpy( fname_end->name, filename); + /* Global pointer for get_file() */ + fname_end->len = fnamelen; + fname_end++; + + return filename; +} + +#if SYSTEM == SYS_MAC +#if COMPILER == GNUC + +/* Routines to search "header map" file of Xcode / Apple-GCC. */ +/* search_header_map() and hmap_hash() were written referring to */ +/* c-incpath.c of Apple-GCC-4.0.1. */ + +static char * search_header_map( + const char * hmap_file, /* Header map file */ + const char * filename, /* Filename to search */ + char * pathlist /* Buffer for a found pathlist */ +) +/* + * Search a table in "header map" file for a header. + */ +{ + struct stat stat_buf; + FILE * fp; + size_t fsize; + const char * contents; + struct hmap_header_map * hmap; + struct hmap_bucket * buckets; + const char * strings; + uint32 mask; + uint32 key_offs; + uint32 i; + + stat( hmap_file, &stat_buf); /* Get size of the file */ + fsize = stat_buf.st_size; + contents = xmalloc( fsize + 1); + fp = fopen( hmap_file, "r"); + fread( contents, fsize, 1, fp); /* Read whole of the file at once */ + hmap = (struct hmap_header_map *) contents; + + strings = ((const char *) hmap) + hmap->strings_offset; + buckets = hmap->buckets; + mask = hmap->capacity - 1; + i = hmap_hash( filename) & mask; + while ((key_offs = buckets[ i].key) != 0) { + if (str_case_eq( filename, strings + key_offs)) { + /* The names match. Make path-list. */ + char * cp = stpcpy( pathlist, strings + buckets[ i].value.prefix); + strcpy( cp, strings + buckets[ i].value.suffix); + break; + } + i = ++i & mask; + } + free( contents); + return key_offs ? pathlist : NULL; +} + +static unsigned hmap_hash( + const char * fname /* header name */ +) +/* + * Get hash value for the fname. + */ +{ + const char * sp; + unsigned hash_code = 0; + + for (sp = fname; *sp; sp++) + hash_code += tolower( *sp & 0xFF) * 13; + return hash_code; +} +#endif /* COMPILER == GNUC */ + +static void init_framework( void) +/* + * Initialize framework[]. + */ +{ + char * framework_dir; + /* Some frameworks may have been already specified by -F option. */ + sys_framework = num_framework; /* These are system frameworks */ +#ifdef FRAMEWORK1 + framework_dir = norm_dir( FRAMEWORK1, TRUE); + if (framework_dir) + framework[ num_framework++] = framework_dir; +#endif +#ifdef FRAMEWORK2 + framework_dir = norm_dir( FRAMEWORK2, TRUE); + if (framework_dir) + framework[ num_framework++] = framework_dir; +#endif +#ifdef FRAMEWORK3 + framework_dir = norm_dir( FRAMEWORK3, TRUE); + if (framework_dir) + framework[ num_framework++] = framework_dir; +#endif + if (num_framework >= MAX_FRAMEWORK) { + mcpp_fputs( "Too many Framework directories.", ERR); + longjmp( error_exit, -1); + } +} + +static const char * dot_frame = ".framework"; + +static int search_framework( + char * filename +) +/* + * Search "Framework" directories. + * 'frame/header.h' is converted to + * '/System/Library/Frameworks/frame.framework/Headers/header.h', + * '/System/Library/Frameworks/frame.framework/PrivateHeaders/header.h', + * and so on. + */ +{ + char fullname[ PATHMAX + 1]; + FILEINFO * file; + char * frame, * fname, * cp1, * cp2; + int sys_frame = FALSE; + int i; + + cp1 = cp2 = strchr( filename, PATH_DELIM); + /* + * 'filename' should be format or sometimes + * . + * e.g.: , + * or . + */ + if (! cp1) + return FALSE; + *cp1 = EOS; + frame = filename; + fname = cp1 + 1; + + /* Search framework[] directories */ + for (i = 0; i < num_framework; i++) { + cp1 = stpcpy( fullname, framework[ i]); + /* 'fullname' e.g.: /System/Library/Frameworks/ */ + if (search_subdir( fullname, cp1, frame, fname, sys_framework <= i)) + return TRUE; + } + + /* + * Search subframework dirs searching its possible parent framework + * starting from current file's directory to its ancestors. + * Header file in subframework directories should be included only + * by its parent or sibling framework headers. + */ + for (i = sys_framework; i < num_framework; i++) { + size_t frame_len, fname_len; + frame_len = strlen( framework[ i]); + fname_len = strlen( infile->real_fname); + if (fname_len <= frame_len) + continue; + if (memcmp( framework[ i], infile->real_fname, frame_len) == 0) { + sys_frame = TRUE; + break; + } + } + for (file = infile; file; file = file->parent) { + const char * dot; + size_t len; + + if (! file->fp) + continue; + dot = strstr( file->real_fname, dot_frame); + if (! dot) + continue; + len = dot - file->real_fname + strlen( dot_frame) + 1; + memcpy( fullname, file->real_fname, len); + cp1 = fullname + len; + cp1 = stpcpy( cp1, "Frameworks/"); + /* 'fullname' e.g.: */ + /* /System/Library/Frameworks/Foundation.framework/Frameworks/ */ + if (search_subdir( fullname, cp1, frame, fname, sys_frame)) + return TRUE; + } + + *cp2 = PATH_DELIM; /* Restore original include file format */ + + return FALSE; +} + +static int search_subdir( + char * fullname, /* Buffer for path-list to open */ + char * cp, /* Latter half of 'fullname' */ + char * frame, /* 'frame' of */ + char * fname, /* 'header' of */ + /* or sometimes 'dir/header' of */ + int sys_frame /* System framework header ? */ +) +/* + * Make path-list and try to open. + */ +{ + static const char * subdir[] = { "Headers", "PrivateHeaders", NULL}; + int j, n; + + cp += sprintf( cp, "%s%s%c", frame, dot_frame, PATH_DELIM); + for (j = 0; subdir[ j] != NULL; j++) { + n = sprintf( cp, "%s%c%s", subdir[ j], PATH_DELIM, fname); + /* + * 'fullname' is for example: + * /System/Library/Frameworks/Foundation.framework/Headers/ + * Foundation.h, + * /System/Library/Frameworks/Foundation.framework/Frameworks/ + * CarbonCore.framework/Headers/OSUtils.h, + * or /System/Library/Frameworks/IOKit.framework/Headers/ + * pwr_mgt/IOPMLib.h. + * Pass this as one filename argument to open_file() rather than + * deviding to directory part and file part. The first argument to + * open_file() which is a pointer to the directory part is remembered + * by FILEINFO struct. But, 'fullname' is over-written each time, + * and the former path-list is lost soon. Therefore, it cannot be + * passed as the first argument. In addition, though the first + * argument to open_file() is needed for #include_next, this directive + * has no meaning in framework. + */ + if ((cp - fullname) + n > PATHMAX) + cfatal( "Too long framework path", NULL, 0L, NULL); /* _F_ */ + if (open_file( &null, NULL, fullname, FALSE, FALSE, sys_frame)) + return TRUE; + } + return FALSE; +} + +#endif /* SYSTEM == SYS_MAC */ + +#if 0 /* This part is only for debugging */ +static int chk_dirp( + const char ** dirp +) +/* + * Check the validity of include directory specified for open_file(). + * Called only from open_file(). + */ +{ + const char ** ip; + + if (dirp == &null) + return TRUE; + + for (ip = incdir; ip < incend; ip++) + if (dirp == ip) + break; + if (ip == incend) { +#if COMPILER == MSC + FILEINFO * pfile = infile->parent; + if (pfile) { + while ((pfile = pfile->parent) != NULL) { + /* Search each parent includer's directory */ + if (dirp == pfile->dirp) + break; + } + } + if (! pfile) +#endif +#if COMPILER == GNUC + const char ** qdir; + for (qdir = quote_dir; qdir < quote_dir_end; qdir++) { + if (dirp == qdir) + break; + } + if (qdir == quote_dir_end) +#endif + { + cfatal( "Bug: *dirp:%s is invalid", *dirp, 0L, NULL); + return FALSE; + } + } + return TRUE; +} +#endif + +void sharp( + FILEINFO * sharp_file, + int flag /* Flag to append to the line for GCC */ +) +/* + * Output a line number line. + * 'file' is 'sharp_file' if specified, + * else (i.e. 'sharp_file' is NULL) 'infile'. + */ +{ + static FILEINFO * sh_file; + static int sh_line; + FILEINFO * file; + int line; + + file = sharp_file ? sharp_file : infile; + if (! file) + return; + while (! file->fp) + file = file->parent; + line = sharp_file ? sharp_file->line : src_line; + if (no_output || option_flags.p || file == NULL + || (file == sh_file && line == sh_line)) + goto sharp_exit; + sh_file = file; + sh_line = line; + if (keep_comments) + mcpp_fputc( '\n', OUT); /* Ensure to be on line top */ + if (std_line_prefix) + mcpp_fprintf( OUT, "#line %ld", line); + else + mcpp_fprintf( OUT, "%s%ld", LINE_PREFIX, line); + cur_file( file, sharp_file, flag); + mcpp_fputc( '\n', OUT); +sharp_exit: + wrong_line = FALSE; +} + +static void cur_file( + FILEINFO * file, /* infile or sharp_file */ + FILEINFO * sharp_file, /* The 'file' or NULL */ + int flag /* Flag to append for GCC */ +) +/* + * Output current source file name and line number. + * Called only from sharp() above. + */ +{ + const char * name; + + if (mcpp_debug & MACRO_CALL) { /* In macro notification mode */ + if (sharp_file) /* Main input file */ + name = file->filename; + else /* Output full-path-list, normalized */ + name = cur_fullname; + } else { /* Usually, the path not "normalized" */ + if (sharp_file) { /* Main input file */ + name = file->filename; + } else if (str_eq( file->filename, file->real_fname)) { + sprintf( work_buf, "%s%s", *(file->dirp), cur_fname); + name = work_buf; + } else { /* Changed by '#line fname' directive */ + name = file->filename; + } + } + if (sharp_filename == NULL || ! str_eq( name, sharp_filename)) { + if (sharp_filename != NULL) + free( sharp_filename); + sharp_filename = save_string( name); + } + mcpp_fprintf( OUT, " \"%s\"", name); +#if COMPILER == GNUC + if (! std_line_prefix) { + if (flag) { + mcpp_fputc( ' ', OUT); + mcpp_fputc( '0' + flag, OUT); + } + if (file->sys_header) + mcpp_fputs( " 3", OUT); + } +#endif +} + +#if SYS_FAMILY == SYS_WIN + +static char * bsl2sl( + char * filename +) +/* + * Convert '\\' in the path-list to '/'. + */ +{ + static int diagnosed = FALSE; + char * cp; + + cp = filename; + + while (*cp) { + if (bsl_in_mbchar) { + int c; + c = *cp & UCHARMAX; + if (char_type[ c] & mbchk) { /* First byte of MBCHAR */ + char tmp[ PATHMAX]; + char * tp = tmp; + *tp++ = *cp++; + mb_read( c, &cp, &tp); + /* Read over the multi-byte characters */ + continue; + } + } + if (*cp == '\\') { + *cp++ = PATH_DELIM; + if (!diagnosed && (warn_level & 2) && (warn_level != -1)) { + /* Backslash in source program */ + cwarn( "Converted \\ to %s", "/", 0L, NULL); /* _W2_ */ + diagnosed = TRUE; /* Diagnose only once */ + } + } else { + cp++; + } + } + + return filename; +} + +#endif /* SYS_FAMILY == SYS_WIN */ + +static const char * const unknown_arg = + "Unknown argument \"%s\""; /*_W1_*/ +static const char * const not_ident = + "Not an identifier \"%s\""; /*_W1_*/ + +static int is_junk( void) +/* + * Check the trailing junk in a directive line. + * This routine is never called in OLD_PREP mode. + */ +{ + int c; + + c = skip_ws(); + unget_ch(); + if (c != '\n') { /* Trailing junk */ + if (warn_level & 1) + cwarn( unknown_arg, infile->bptr, 0L, NULL); + return TRUE; + } else { + return FALSE; + } +} + +#define PUSH 1 +#define POP -1 + +#define __SETLOCALE 1 /* #pragma __setlocale( "encoding") */ +#define SETLOCALE 2 /* #pragma setlocale( "encoding") */ + +void do_pragma( void) +/* + * Process the #pragma lines. + * 1. Process the sub-directive for MCPP. + * 2. Pass the line to the compiler-proper. + * #pragma MCPP put_defines, #pragma MCPP preprocess, + * #pragma MCPP preprocessed and #pragma once are, however, not put + * out so as not to duplicate output when re-preprocessed. + * When EXPAND_PRAGMA == TRUE and (__STDC_VERSION__ >= 199901L or + * __cplusplus >= 199901L), the line is subject to macro expansion unless + * the next to 'pragma' token is one of 'STDC', 'GCC' or 'MCPP'. + */ +{ + int c; + int warn = FALSE; /* Necessity of warning */ + int token_type; + char * bp; /* Pointer to argument */ + char * tp; + FILEINFO * file; + + wrong_line = TRUE; /* In case of error */ + c = skip_ws(); + bp = infile->bptr - 1; /* Remember token to pass to compiler */ + if (c == '\n') { + if (warn_level & 1) + cwarn( "No sub-directive", NULL, 0L, NULL); /* _W1_ */ + unget_ch(); + return; + } + token_type = scan_token( c, (tp = work_buf, &tp), work_end); +#if EXPAND_PRAGMA +#if COMPILER == MSC + if (token_type == NAM + && !str_eq( identifier, "STDC") && !str_eq( identifier, "MCPP")) { +#else + if (stdc3 && token_type == NAM + && !str_eq( identifier, "STDC") && !str_eq( identifier, "MCPP")) { +#endif + DEFBUF * defp; + char * mp; + char * mp_end; + LINE_COL line_col = { 0L, 0}; + + bp = mp = xmalloc( (size_t)(NMACWORK + IDMAX)); + /* Buffer for macro expansion */ + mp_end = mp + NMACWORK; + tp = stpcpy( mp, identifier); + do { /* Expand all the macros in the line */ + int has_pragma; + if (token_type == NAM && (defp = is_macro( &tp)) != NULL) { + tp = expand_macro( defp, bp, mp_end, line_col, & has_pragma); + if (has_pragma) + cerror( "_Pragma operator found in #pragma line" /* _E_ */ + , NULL, 0L, NULL); + if (! stdc3 && (warn_level & 2)) + cwarn( + "\"%s\" is macro expanded in other than C99 mode" /* _W2_ */ + , identifier, 0L, NULL); + } + token_type = scan_token( c = get_ch(), (bp = tp, &tp), mp_end); + } while (c != '\n'); + unget_string( mp, NULL); /* To re-read */ + free( mp); + c = skip_ws(); + bp = infile->bptr - 1; + token_type = scan_token( c, (tp = work_buf, &tp), work_end); + } +#endif + if (token_type != NAM) { + if (warn_level & 1) + cwarn( not_ident, work_buf, 0L, NULL); + goto skip_nl; + } else if (str_eq( identifier, "once")) { /* #pragma once */ + if (! is_junk()) { + file = infile; + while (file->fp == NULL) + file = file->parent; + do_once( file->full_fname); + goto skip_nl; + } + } else if (str_eq( identifier, "MCPP")) { + if (scan_token( skip_ws(), (tp = work_buf, &tp), work_end) != NAM) { + if (warn_level & 1) + cwarn( not_ident, work_buf, 0L, NULL); + } + if (str_eq( identifier, "put_defines")) { + if (! is_junk()) + dump_def( TRUE, FALSE); /* #pragma MCPP put_defines */ + } else if (str_eq( identifier, "preprocess")) { + if (! is_junk()) /* #pragma MCPP preprocess */ + mcpp_fputs( "#pragma MCPP preprocessed\n", OUT); + /* Just putout the directive */ + } else if (str_eq( identifier, "preprocessed")) { + if (! is_junk()) { /* #pragma MCPP preprocessed*/ + skip_nl(); + do_preprocessed(); + return; + } + } else if (str_eq( identifier, "warning")) { + /* #pragma MCPP warning */ + cwarn( infile->buffer, NULL, 0L, NULL); + } else if (str_eq( identifier, "push_macro")) { + push_or_pop( PUSH); /* #pragma MCPP push_macro */ + } else if (str_eq( identifier, "pop_macro")) { + push_or_pop( POP); /* #pragma MCPP pop_macro */ + } else if (str_eq( identifier, "debug")) { + do_debug( TRUE); /* #pragma MCPP debug */ + } else if (str_eq( identifier, "end_debug")) { + do_debug( FALSE); /* #pragma MCPP end_debug */ + } else { + warn = TRUE; + } + if (warn && (warn_level & 1)) + cwarn( unknown_arg, identifier, 0L, NULL); + goto skip_nl; /* Do not putout the line */ +#if COMPILER == GNUC + /* The #pragma lines for GCC is skipped not to confuse cc1. */ + } else if (str_eq( identifier, "GCC")) { /* #pragma GCC * */ + if (scan_token( skip_ws(), (tp = work_buf, &tp), work_end) == NAM) { + if (str_eq( identifier, "poison") + || str_eq( identifier, "dependency")) { + if (warn_level & 2) + cwarn( "Skipped the #pragma line" /*_W2_ */ + , NULL, 0L, NULL); + goto skip_nl; + } else if (str_eq( identifier, "system_header")) { + infile->sys_header = TRUE; /* Mark as a system header */ + goto skip_nl; + } + } +#endif + +#if COMPILER == MSC + } else if (str_eq( identifier, "setlocale")) { + if (skip_ws() == '(' + && scan_token( skip_ws(), (tp = work_buf, &tp), work_end) + == STR + && skip_ws() == ')') { + if (! is_junk()) { + work_buf[ 0] = *(tp - 1) = '\0'; + set_encoding( work_buf + 1, NULL, SETLOCALE); + work_buf[ 0] = *(tp - 1) = '"'; + } /* else warned by is_junk() */ + } else { + warn = TRUE; + } +#else /* COMPILER != MSC */ + } else if (str_eq( identifier, "__setlocale")) { + if (skip_ws() == '(' + && scan_token( skip_ws(), (tp = work_buf, &tp), work_end) + == STR + && skip_ws() == ')') { + if (! is_junk()) { /* #pragma __setlocale */ + work_buf[ 0] = *(tp - 1) = '\0'; + set_encoding( work_buf + 1, NULL, __SETLOCALE); + work_buf[ 0] = *(tp - 1) = '"'; + } /* else warned by is_junk() */ + } else { + warn = TRUE; + } +#endif + +#if COMPILER == MSC + } else if (str_eq( identifier, "push_macro")) { + push_or_pop( PUSH); + goto skip_nl; + } else if (str_eq( identifier, "pop_macro")) { + push_or_pop( POP); + goto skip_nl; +#endif + +#if COMPILER == LCC + } else if (str_eq( identifier, "optimize") + && (skip_ws() == '(') + && (char_type[ (c = skip_ws()) & UCHARMAX] == DIG) + && (skip_ws() == ')')) { + char tmp[ 2]; + + tmp[ 0] = c; + tmp[ 1] = EOS; + look_and_install( optim_name, DEF_NOARGS_PREDEF, null, tmp); +#endif + +#if COMPILER == COMPILER_UNKNOWN + /* + * Write here any compiler-specific #pragma sub-directive which should + * be processed by preprocessor. + */ +#endif + } + + if (warn) { + if (warn_level & 1) + cwarn( unknown_arg, identifier, 0L, NULL); + goto skip_nl; /* Do not putout the line */ + } + + sharp( NULL, 0); /* Synchronize line number before output */ + if (! no_output) { + mcpp_fputs( "#pragma ", OUT); + mcpp_fputs( bp, OUT); /* Line is put out */ + } +skip_nl: /* Don't use skip_nl() which skips to the newline in source file */ + while (get_ch() != '\n') + ; +} + +static void do_once( + const char * fullname /* Full-path-list of the header */ +) +/* + * Process #pragma once so as not to re-include the file later. + * This directive has been imported from GCC V.1.* / cpp as an extension. + */ +{ + if (once_list == NULL) { /* Should initialize */ + max_once = INIT_NUM_ONCE; + once_list = (INC_LIST *) xmalloc( sizeof (INC_LIST) * max_once); + once_end = &once_list[ 0]; + } else if (once_end - once_list >= max_once) { + /* Double the elements */ + once_list = (INC_LIST *) xrealloc( (void *) once_list + , sizeof (INC_LIST) * max_once * 2); + once_end = &once_list[ max_once]; + max_once *= 2; + } + once_end->name = fullname; + once_end->len = strlen( fullname); + once_end++; +} + +static int included( + const char * fullname +) +/* + * Has the file been once included ? + * This routine is only called from open_file(). + */ +{ + INC_LIST * inc; + size_t fnamelen; + + if (once_list == NULL) /* No once file registered */ + return FALSE; + fnamelen = strlen( fullname); + for (inc = once_list; inc < once_end; inc++) { + if (inc->len == fnamelen && str_case_eq( inc->name, fullname)) { + /* Already included */ + if (mcpp_debug & PATH) + mcpp_fprintf( DBG, "Once included \"%s\"\n", fullname); + return TRUE; + } + } + return FALSE; /* Not yet included */ +} + +static void push_or_pop( + int direction +) +/* Process #pragma MCPP push_macro( "MACRO"), + * #pragma MCPP pop_macro( "MACRO") for other compilers than Visual C, + * and #pragma push_macro( "MACRO"), #pragma pop_macro( "MACRO") for Visual C. + * Note:1. "push" count is set in defp->push. + * 2. pushed definitions are inserted immediatly after the current + * definition of the same name. + * 3. the definitions of a same name macro can be pushed multiple times. + */ +{ + char * tp; + DEFBUF ** prevp; + DEFBUF * defp; + DEFBUF * dp; + int cmp; + size_t s_name, s_def; + + if (skip_ws() == '(' + && scan_token( skip_ws(), (tp = work_buf, &tp), work_end) == STR + && skip_ws() == ')') { /* Correct syntax */ + + if (is_junk()) + return; + s_name = strlen( work_buf) - 2; + *(work_buf + s_name + 1) = '\0'; + memcpy( identifier, work_buf + 1, s_name + 1); + /* Remove enclosing '"' */ + prevp = look_prev( identifier, &cmp); + if (cmp == 0) { /* Current definition or pushed definition exists */ + defp = *prevp; + if (direction == PUSH) {/* #pragma push_macro( "MACRO") */ + if (defp->push) { /* No current definition*/ + if (warn_level & 1) + cwarn( "\"%s\" is already pushed" /* _W1_ */ + , identifier, 0L, NULL); + return; + } + /* Else the current definition exists. Push it */ + s_def = sizeof (DEFBUF) + 3 + s_name + + strlen( defp->repl) + strlen( defp->fname); + if (mcpp_mode == STD) + s_def += strlen( defp->parmnames); + dp = (DEFBUF *) xmalloc( s_def); + memcpy( dp, defp, s_def); /* Copy the definition */ + dp->link = *prevp; /* Insert to linked-list*/ + *prevp = dp; /* the pushed def */ + prevp = &dp->link; /* Next link to search */ + } else { /* #pragma pop_macro( "MACRO") */ + if (defp->push == 0) { /* Current definition */ + if (defp->link == NULL + || ! str_eq( identifier, defp->link->name)) { + if (warn_level & 1) + cwarn( "\"%s\" has not been pushed" /* _W1_ */ + , identifier, 0L, NULL); + return; + } else { + *prevp = defp->link; + /* Link the previous and the next */ + free( defp); + /* Delete the definition to enable popped def */ + } + } /* Else no current definition exists */ + } + while ((defp = *prevp) != NULL) { + /* Increment or decrement "push" count of all pushed defs */ + if ((cmp = memcmp( defp->name, identifier, s_name)) > 0) + break; + defp->push += direction; /* Increment or decrement */ + prevp = &defp->link; + } + } else { /* No current definition nor pushed definition */ + if (warn_level & 1) + cwarn( "\"%s\" has not been defined" /* _W1_ */ + , identifier, 0L, NULL); + } + } else { /* Wrong syntax */ + if (warn_level & 1) + cwarn( "Bad %s syntax", direction == PUSH /* _W1_ */ + ? "push_macro" : "pop_macro", 0L, NULL); + } +} + +static void do_asm( + int asm_start /* #asm ? */ +) +/* + * #asm, #endasm + * Originally written for OS-9/09 Microware C. + */ +{ + if (! compiling) + return; + if (asm_start == (in_asm != 0L)) { + if (in_asm) + cerror( "In #asm block started at line %.0s%ld" /* _E_ */ + , NULL, in_asm, NULL); + else + cerror( "Without #asm", NULL, 0L, NULL); /* _E_ */ + skip_nl(); + unget_ch(); + return; + } + in_asm = asm_start ? src_line : 0L; +} + +void do_old( void) +/* + * Process the out-of-standard directives. + * GCC permits #include_next and #warning even in STANDARD mode. + */ +{ + static const char * const unknown + = "Unknown #directive \"%s\"%.0ld%s"; /* _E_ _W8_ */ + static const char * const ext + = "%s is not allowed by Standard%.0ld%s"; /* _W2_ _W8_*/ + +#if COMPILER == GNUC + if (str_eq( identifier, "include_next")) { + if ((compiling && (warn_level & 2)) + || (! compiling && (warn_level & 8))) + cwarn( ext, "#include_next", 0L + , compiling ? NULL : " (in skipped block)"); + if (! compiling) + return; + in_include = TRUE; + do_include( TRUE); + in_include = FALSE; + return; + } else if (str_eq( identifier, "warning")) { + if ((compiling && (warn_level & 2)) + || (! compiling && (warn_level & 8))) + cwarn( ext, "#warning", 0L + , compiling ? NULL : " (in skipped block)"); + if (! compiling) + return; + cwarn( infile->buffer, NULL, 0L, NULL); + /* Always output the warning */ + skip_nl(); + unget_ch(); + return; + } else if (str_eq( identifier, "ident") || str_eq( identifier, "sccs")) { + if ((compiling && (warn_level & 1)) + || (! compiling && (warn_level & 8))) { + if (str_eq( identifier, "ident")) + cwarn( + compiling ? "Ignored #ident" : "#ident (in skipped block)" /* _W1_ _W8_*/ + , NULL, 0L, NULL); + else + cwarn( + compiling ? "Ignored #sccs" : "#sccs (in skipped block)" /* _W1_ _W8_*/ + , NULL, 0L, NULL); + } + if (! compiling) + return; + skip_nl(); + unget_ch(); + return; + } +#endif /* COMPILER == GNUC */ + +#if COMPILER == MSC + if (str_eq( identifier, "using") || str_eq( identifier, "import")) { + /* #using or #import */ + if (! compiling) + return; + mcpp_fputs( infile->buffer, OUT); /* Putout the line as is*/ + skip_nl(); + unget_ch(); + return; + } +#endif + +#if SYSTEM == SYS_MAC + if (str_eq( identifier, "import")) { + if ((compiling && (warn_level & 2)) + || (! compiling && (warn_level & 8))) + cwarn( ext, "#import", 0L + , compiling ? NULL : " (in skipped block)"); + if (! compiling) + return; + in_import = in_include = TRUE; + do_include( FALSE); + in_import = in_include = FALSE; + return; + } +#endif + + if (! standard && do_prestd_directive()) + return; + + if (compiling) { + if (option_flags.lang_asm) { /* "Assembler" source */ + if (warn_level & 1) + cwarn( unknown, identifier, 0L, NULL); + mcpp_fputs( infile->buffer, OUT); /* Putout the line */ + } else { + cerror( unknown, identifier, 0L, NULL); + } + } else if (warn_level & 8) { + cwarn( unknown, identifier, 0L, " (in skipped block)"); + } + skip_nl(); + unget_ch(); + return; +} + +static int do_prestd_directive( void) +/* + * Process directives for pre-Standard mode. + */ +{ +#if COMPILER != GNUC + if (str_eq( identifier, "assert")) { /* #assert */ + if (! compiling) /* Only validity check */ + return TRUE; + if (eval_if() == 0L) { /* Assert expression */ + cerror( "Preprocessing assertion failed" /* _E_ */ + , NULL, 0L, NULL); + skip_nl(); + unget_ch(); + } + return TRUE; + } else +#endif + if (str_eq( identifier, "put_defines")) { + if (! compiling) /* Only validity check */ + return TRUE; + if (mcpp_mode != OLD_PREP && ! is_junk()) + dump_def( TRUE, FALSE); /* #put_defines */ + skip_nl(); + unget_ch(); + return TRUE; + } else if (str_eq( identifier, "preprocess")) { + if (! compiling) /* Only validity check */ + return TRUE; + if (mcpp_mode != OLD_PREP && ! is_junk()) + /* Just putout the directive for the succeding preprocessor */ + mcpp_fputs( "#preprocessed\n", OUT); + skip_nl(); + unget_ch(); + return TRUE; + } else if (str_eq( identifier, "preprocessed")) { + if (! compiling) /* Only validity check */ + return TRUE; + if (mcpp_mode != OLD_PREP && ! is_junk()) { + skip_nl(); + do_preprocessed(); /* #preprocessed */ + return TRUE; + } + skip_nl(); + unget_ch(); + return TRUE; + } + + if (str_eq( identifier, "debug")) { /* #debug */ + if (! compiling) /* Only validity check */ + return TRUE; + do_debug( TRUE); + return TRUE; + } else if (str_eq( identifier, "end_debug")) { + if (! compiling) + return TRUE; + do_debug( FALSE); /* #end_debug */ + return TRUE; + } + + if (str_eq( identifier, "asm")) { /* #asm */ + do_asm( TRUE); + return TRUE; + } + if (str_eq( identifier, "endasm")) { /* #endasm */ + do_asm( FALSE); + skip_nl(); /* Skip comments, etc. */ + unget_ch(); + return TRUE; + } + + return FALSE; /* Unknown directive */ +} + +static void do_preprocessed( void) +/* + * The source file has been already preprocessed. + * Copy the lines to output. + * Install macros according the #define directives. + */ +{ + const char * corrupted = + "This preprocessed file is corrupted"; /* _F_ */ + FILEINFO * file; + char * lbuf; + char * cp; + const char ** incptr; + char * comment = NULL; + char * colon = NULL; + const char * dir; +#if STD_LINE_PREFIX == FALSE + char conv[ NBUFF]; + char * arg; + + /* + * Compiler cannot accept C source style #line. + * Convert it to the compiler-specific format. + */ + strcpy( conv, LINE_PREFIX); + arg = conv + strlen( conv); +#endif + file = infile; + lbuf = file->bptr = file->buffer; /* Reset file->bptr */ + + /* Copy the input to output until a comment line appears. */ + while (fgets( lbuf, NBUFF, file->fp) != NULL + && memcmp( lbuf, "/*", 2) != 0) { +#if STD_LINE_PREFIX == FALSE + if (memcmp( lbuf, "#line ", 6) == 0) { + strcpy( arg, lbuf + 6); + mcpp_fputs( conv, OUT); + } else +#endif + { + mcpp_fputs( lbuf, OUT); + } + } + if (! str_eq( lbuf, "/* Currently defined macros. */\n")) + cfatal( "This is not a preprocessed source" /* _F_ */ + , NULL, 0L, NULL); + + /* Define macros according to the #define lines. */ + while (fgets( lbuf, NWORK, file->fp) != NULL) { + if (memcmp( lbuf, "/*", 2) == 0) { + /* Standard predefined macro */ + continue; + } + if (memcmp( lbuf, "#define ", 8) != 0) { + if (memcmp( lbuf, "#line", 5) == 0) + continue; + else + cfatal( corrupted, NULL, 0L, NULL); + } + /* Filename and line-number information in comment as: */ + /* dir/fname:1234\t*/ + cp = lbuf + strlen( lbuf); + if ((memcmp( cp - 4, "\t*/\n", 4) != 0) + || (*(cp - 4) = EOS + , (comment = strrchr( lbuf, '*')) == NULL) + || (memcmp( --comment, "/* ", 3) != 0) + || ((colon = strrchr( comment, ':')) == NULL)) + cfatal( corrupted, NULL, 0L, NULL); + src_line = atol( colon + 1); /* Pseudo line number */ + *colon = EOS; + dir = comment + 3; + inc_dirp = &null; + /* Search the include directory list */ + for (incptr = incdir ; incptr < incend; incptr++) { + if (memcmp( *incptr, dir, strlen( *incptr)) == 0) { + inc_dirp = incptr; + break; + } + } + /* Register the filename to fnamelist[] */ + /* inc_dirp may be NULL, and cur_fname may be "(predefined)" */ + cur_fname = set_fname( dir + strlen( *inc_dirp)); + strcpy( comment - 2, "\n"); /* Remove the comment */ + unget_string( lbuf + 8, NULL); + do_define( FALSE, 0); + get_ch(); /* '\n' */ + get_ch(); /* Clear the "file" */ + unget_ch(); /* infile == file */ + } + file->bptr = file->buffer + strlen( file->buffer); +} + +static int do_debug( + int set /* TRUE to set debugging */ +) +/* + * #pragma MCPP debug, #pragma MCPP end_debug, #debug, #end_debug + * Return TRUE when diagnostic is issued else return FALSE. + */ +{ + struct Debug_arg { + const char * arg_name; /* Name of option */ + int arg_num; /* Value of 'debug' */ + }; + static struct Debug_arg debug_args[] = { + { "path", PATH }, + { "token", TOKEN }, + { "expand", EXPAND }, + { "macro_call", MACRO_CALL }, /* Implemented only in STD mode */ + { "if", IF }, + { "expression", EXPRESSION }, + { "getc", GETC }, + { "memory", MEMORY }, + { NULL, 0 }, + }; + struct Debug_arg *argp; + int num; + int c; + + c = skip_ws(); + if (c == '\n') { + unget_ch(); + if (set) { + if (warn_level & 1) + cwarn( "No argument", NULL, 0L, NULL); /* _W1_ */ + return TRUE; + } else { + mcpp_debug = 0; /* Clear all the flags */ + return FALSE; + } + } + while (scan_token( c, (workp = work_buf, &workp), work_end) == NAM) { + argp = debug_args; + while (argp->arg_name) { + if (str_eq( argp->arg_name, work_buf)) + break; + argp++; + } + if (argp->arg_name == NULL) { + if (warn_level & 1) + cwarn( unknown_arg, work_buf, 0L, NULL); + goto diagnosed; + } else { + num = argp->arg_num; + if (set) { + mcpp_debug |= num; + if (num == PATH) + dump_path(); + else if (num == MEMORY) + print_heap(); + else if (num == MACRO_CALL) + option_flags.k = TRUE; /* This pragma needs this mode */ + } else { + mcpp_debug &= ~num; + } + } + c = skip_ws(); + } + if ((mcpp_mode != STD && (mcpp_debug & MACRO_CALL)) || c != '\n') { + if (warn_level & 1) { + if (c != '\n') { + cwarn( not_ident, work_buf, 0L, NULL); + } else { + cwarn( unknown_arg, work_buf, 0L, NULL); + mcpp_debug &= ~num; /* Disable */ + } + } + skip_nl(); + unget_ch(); + goto diagnosed; + } + unget_ch(); + return FALSE; +diagnosed: + return TRUE; +} + +void put_asm( void) +/* + * Put out source line as it is. + */ +{ +#if 0 + mcpp_fputs( "#2\n", OUT); + mcpp_fputs( infile->buffer, OUT); + skip_nl(); +#endif +} + +static void dump_path( void) +/* + * Show the include directories. + */ +{ + const char ** incptr; + const char * inc_dir; + const char * dir = "./"; + int i; + + mcpp_fputs( "Include paths are as follows --\n", DBG); + for (incptr = incdir; incptr < incend; incptr++) { + inc_dir = *incptr; + if (*inc_dir == '\0') + inc_dir = dir; + mcpp_fprintf( DBG, " %s\n", inc_dir); + } + mcpp_fputs( "End of include path list.\n", DBG); +#if SYSTEM == SYS_MAC + mcpp_fputs( "Framework paths are as follows --\n", DBG); + for (i = 0; i < num_framework; i++ ) + mcpp_fprintf( DBG, " %s\n", framework[ i]); + mcpp_fputs( "End of framework path list.\n", DBG); +#endif +} + +/* + * Note: The getopt() of glibc should not be used since the specification + * differs from the standard one. + * Use this mcpp_getopt() for mcpp. + */ + +/* Based on the public-domain-software released by AT&T in 1985. */ + +#define OPTERR( s, c) if (mcpp_opterr) { \ + mcpp_fputs( argv[0], ERR); \ + mcpp_fputs( s, ERR); \ + mcpp_fputc( c, ERR); \ + mcpp_fputc( '\n', ERR); \ + } + +static int mcpp_getopt( + int argc, + char * const * argv, + const char * opts +) +/* + * Get the next option (and it's argument) from the command line. + */ +{ + const char * const error1 = ": option requires an argument --"; + const char * const error2 = ": illegal option --"; + static int sp = 1; + int c; + const char * cp; + + if (sp == 1) { + if (argc <= mcpp_optind || + argv[ mcpp_optind][ 0] != '-' + || argv[ mcpp_optind][ 1] == '\0') { + return EOF; + } else if (strcmp( argv[ mcpp_optind], "--") == 0) { + mcpp_optind++; + return EOF; + } + } +/* mcpp_optopt = c = (unsigned char) argv[ mcpp_optind][ sp]; */ + mcpp_optopt = c = argv[ mcpp_optind][ sp] & UCHARMAX; + if (c == ':' || (cp = strchr( opts, c)) == NULL) { + OPTERR( error2, c) + if (argv[ mcpp_optind][ ++sp] == '\0') { + mcpp_optind++; + sp = 1; + } + return '?'; + } + if (*++cp == ':') { + if (argv[ mcpp_optind][ sp+1] != '\0') { + mcpp_optarg = &argv[ mcpp_optind++][ sp+1]; + } else if (argc <= ++mcpp_optind) { + OPTERR( error1, c) + sp = 1; + return '?'; + } else { + mcpp_optarg = argv[ mcpp_optind++]; + } + sp = 1; + } else { + if (argv[ mcpp_optind][ ++sp] == '\0') { + sp = 1; + mcpp_optind++; + } + mcpp_optarg = NULL; + } + return c; +} + +#if ! HOST_HAVE_STPCPY +char * stpcpy( + char * dest, + const char * src +) +/* + * Copy the string and return the advanced pointer. + */ +{ + const char * s; + char * d; + + for (s = src, d = dest; (*d++ = *s++) != '\0'; ) + ; + return d - 1; +} +#endif + +/* + * list_heap() is a function to print out information of heap-memory. + * See "kmmalloc-2.5.3.zip" by kmatsui. + */ +#if KMMALLOC + int list_heap( int); +#elif BSD_MALLOC + int list_heap( char *); +#elif DB_MALLOC || DMALLOC + int list_heap( FILE *); +#endif + +void print_heap( void) +{ +#if KMMALLOC + list_heap( 1); +#elif BSD_MALLOC + list_heap( ":cpp"); +#elif DB_MALLOC || DMALLOC || PHK_MALLOC || DLMALLOC + list_heap( fp_debug); +#endif +} + +void at_end( void) +/* + * Handle the commands to be executed at the end of processing. + */ +{ +#if COMPILER == GNUC + if (dMflag || dDflag) + dump_def( FALSE, FALSE); +#endif +} + +#if MCPP_LIB +void clear_filelist( void) +/* + * Free malloced memory for filename-list and directory-list. + */ +{ + const char ** incp; + INC_LIST * namep; + + for (incp = incdir; incp < incend; incp++) + free( (void *) *incp); + free( (void *) incdir); + for (namep = fnamelist; namep < fname_end; namep++) + free( (void *) namep->name); + free( (void *) fnamelist); + if (standard) + free( (void *) once_list); +} +#endif + diff --git a/libraries/mcpp/src/testmain.c b/libraries/mcpp/src/testmain.c new file mode 100644 index 000000000..33e47b393 --- /dev/null +++ b/libraries/mcpp/src/testmain.c @@ -0,0 +1,83 @@ +/* + * testmain.c: A sample source to show how to use mcpp as a subroutine. + * 2006/11 Contributed by Juergen Mueller. + * Refer to mcpp-porting.html section 3.12 for compiling mcpp as a subroutine. + * + * 2007/03 Updated to enable testing of memory buffer output. + * 2008/04 The macro MCPP_LIB is no longer necessary. + */ + +#include +#include +#include + +#include "mcpp_lib.h" + +int main(int argc, char *argv[]) +{ + int i, j; + char ** tmp_argv; + + tmp_argv = (char **) malloc(sizeof(char *) * (argc + 1)); + + if (tmp_argv == NULL) { + return(0); + } + + /* + * assume strict order: and + * each option and its argument are specified without intervening spaces + * such as '-I/dir' or '-otmp.i' (not '-I /dir' nor '-o tmp.i'). + */ + for (i = 0; i < argc; ++i) { + tmp_argv[i] = argv[i]; /* copy options */ + + if ( (*argv[i] != '-') + && (*argv[i] != '/') + && (i > 0)) { + break; + } + } + + /* this works only if called function does not manipulate pointer array! */ + /* + * Note that mcpp no longer uses freopen() since 2008/04/20, so you can + * output multiple input to different files, though this sample output + * to stdout, which may be redirected. + */ + for (j = i; i < argc; ++i) { + int retval; + char * result; + clock_t start, finish; + + tmp_argv[j] = argv[i]; /* process each file */ + fprintf(stderr, "\n%s\n", argv[i]); + + start = clock(); /* get start time */ +#if OUT2MEM /* Use memory buffer */ + mcpp_use_mem_buffers( 1); /* enable memory output */ + retval = mcpp_lib_main(j + 1, tmp_argv); /* call MCPP */ + result = mcpp_get_mem_buffer( OUT); /* get the output */ + if (result) + fputs( result, stdout); + result = mcpp_get_mem_buffer( ERR); /* get the diagnostics */ + if (result) + fputs( result, stderr); +#if 0 /* debug output is the same with normal output by default */ + result = mcpp_get_mem_buffer( DBG); /* get the debug output */ + if (result) + fputs( result, stdout); /* appended to output */ +#endif +#else /* Normal output to file */ + retval = mcpp_lib_main(j + 1, tmp_argv); +#endif + finish = clock(); /* get finish time */ + + fprintf(stderr, "\nReturned status:%d, Elapsed time: %.3f seconds.\n", + retval, (double)(finish - start) / (double)CLOCKS_PER_SEC); + } + + free(tmp_argv); + + return(0); +} diff --git a/libraries/mcpp/src/unset_mcpp.sh b/libraries/mcpp/src/unset_mcpp.sh new file mode 100644 index 000000000..20ecb355f --- /dev/null +++ b/libraries/mcpp/src/unset_mcpp.sh @@ -0,0 +1,95 @@ +#!/bin/sh +# script to set GNU CPP or CC1, CC1PLUS to be called from gcc +# ./unset_mcpp.sh $gcc_path $gcc_maj_ver $gcc_min_ver $cpp_call $CC $CXX +# x$EXEEXT $LN_S $inc_dir $host_system $target_cc + +gcc_maj_ver=$2 +gcc_min_ver=$3 +cpp_call=$4 +CC=$5 +CXX=$6 +LN_S=$8 +inc_dir=$9 +host_system=${10} +target_cc=${11} +cpp_name=`echo $cpp_call | sed 's,.*/,,'` +cpp_path=`echo $cpp_call | sed "s,/$cpp_name,,"` +gcc_path=`echo $1 | sed "s,/${CC}\$,,"` +EXEEXT=`echo $7 | sed 's/^x//'` +if test x$EXEEXT != x; then + cpp_base=`echo $cpp_name | sed "s/$EXEEXT//"` +else + cpp_base=$cpp_name +fi + +echo " rm -fr $inc_dir/mcpp-gcc*" +rm -fr $inc_dir/mcpp-gcc* +if test $host_system = SYS_CYGWIN; then + echo " rm -fr $inc_dir/mingw" + rm -fr $inc_dir/mingw +fi + +echo " cd $cpp_path" +cd $cpp_path + +if (test -h $cpp_name || test $host_system = SYS_MINGW) \ + && test -f ${cpp_base}_gnuc$EXEEXT; then + rm -f $cpp_name mcpp.sh + echo " mv ${cpp_base}_gnuc$EXEEXT $cpp_name" + mv -f ${cpp_base}_gnuc$EXEEXT $cpp_name + if test x$cpp_base = xcc1; then + rm -f cc1plus$EXEEXT mcpp_plus.sh + echo " mv cc1plus_gnuc$EXEEXT cc1plus$EXEEXT" + mv -f cc1plus_gnuc$EXEEXT cc1plus$EXEEXT + fi +fi + +if test x$gcc_maj_ver = x2; then + exit 0 +fi + +echo " cd $gcc_path" +cd $gcc_path + +if test $host_system = SYS_MAC && test x${target_cc} != x; then + CC_=$target_cc + CXX_=`echo $target_cc | sed 's/gcc/g++/'` +else + CC_=$CC + CXX_=$CXX +fi + +for cc in $CC_ $CXX_ +do + if test $host_system != SYS_MINGW; then + ref=`readlink $cc` + fi + if test x$ref = x; then + ref=$cc + fi + ccache=`grep ccache $ref` + if test x$ccache != x; then + ## search the real $cc in $PATH + for path in `echo $PATH | sed 's/:/ /g'` + do + if test -f $path/$cc$EXEEXT && test $gcc_path != $path; then + break; + fi + done + gcc_path=$path + echo " cd $gcc_path" + cd $gcc_path + ref=`readlink $cc` + fi + if test x$ref = x$cc.sh || test $host_system = SYS_MINGW; then + entity=`grep $gcc_path $cc.sh | sed "s,$gcc_path/,," | sed "s/_proper.*$//"` + rm -f $entity + echo " mv ${entity}_proper$EXEEXT $entity$EXEEXT" + mv -f ${entity}_proper$EXEEXT $entity$EXEEXT + if test $entity != $cc; then + echo " $LN_S $entity $cc" + $LN_S -f $entity $cc + fi + rm -f $cc.sh + fi +done diff --git a/libraries/mcpp/test-c/LICENSE b/libraries/mcpp/test-c/LICENSE new file mode 100644 index 000000000..5b617d281 --- /dev/null +++ b/libraries/mcpp/test-c/LICENSE @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * This software including the files in this directory is provided under + * the following license. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/libraries/mcpp/test-c/defs.h b/libraries/mcpp/test-c/defs.h new file mode 100644 index 000000000..0ca53fec9 --- /dev/null +++ b/libraries/mcpp/test-c/defs.h @@ -0,0 +1,21 @@ +/* defs.h */ + +#include + +/* assert(): Enable one of these three. */ +/* Note: This source doesn't use #elif directive to test preprocessor which + can't recognize the directive. */ +#if 1 /* For the translator which can process properly. */ +#include +#else +#if 0 /* Not to abort on error. */ +#define assert( exp) (exp) ? (void)0 : (void) fprintf( stderr, \ + "Assertion failed: %s, from line %d of file %s\n", \ + # exp, __LINE__, __FILE__) +#endif +#endif + +extern int strcmp( const char *, const char *); +extern size_t strlen( const char *); +extern void exit( int); + diff --git a/libraries/mcpp/test-c/e_12_8.c b/libraries/mcpp/test-c/e_12_8.c new file mode 100644 index 000000000..736f096e7 --- /dev/null +++ b/libraries/mcpp/test-c/e_12_8.c @@ -0,0 +1,11 @@ +/* e_12_8.c: Out of range of integer pp-token in #if expression. */ + +/* 12.8: Preprocessing number perhaps out of range of unsigned long. */ +#if 123456789012345678901 +#endif + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_14.c b/libraries/mcpp/test-c/e_14.c new file mode 100644 index 000000000..7015c40c2 --- /dev/null +++ b/libraries/mcpp/test-c/e_14.c @@ -0,0 +1,43 @@ +/* e_14.c: Illegal #if expressions. */ + +#define A 1 +#define B 1 + +/* 14.1: String literal is not allowed in #if expression. */ +#if "string" +#endif /* The second error ? */ + +/* 14.2: Operators =, +=, ++, etc. are not allowed in #if expression. */ +#if A = B +#endif +#if A++ B +#endif +#if A --B +#endif +#if A.B +#endif + +/* 14.3: Unterminated #if expression. */ +#if 0 < +#endif +#if ( (A == B) +#endif + +/* 14.4: Unbalanced parenthesis in #if defined operator. */ +#if defined ( MACRO +#endif + +/* 14.5: No argument. */ +#if +#endif + +/* 14.6: Macro expanding to 0 token in #if expression. */ +#define ZERO_TOKEN +#if ZERO_TOKEN +#endif + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_14_10.c b/libraries/mcpp/test-c/e_14_10.c new file mode 100644 index 000000000..59b66c96b --- /dev/null +++ b/libraries/mcpp/test-c/e_14_10.c @@ -0,0 +1,19 @@ +/* e_14_10.c: Overflow of constant expression in #if directive. */ + +/* 14.10: */ +#include + +#if LONG_MAX - LONG_MIN +#endif +#if LONG_MAX + 1 +#endif +#if LONG_MIN - 1 +#endif +#if LONG_MAX * 2 +#endif + +int main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_14_7.c b/libraries/mcpp/test-c/e_14_7.c new file mode 100644 index 000000000..366889dbf --- /dev/null +++ b/libraries/mcpp/test-c/e_14_7.c @@ -0,0 +1,19 @@ +/* e_14_7.c: There is no keyword in #if expression. */ + +/* 14.7: sizeof operator is disallowed. */ +/* Evaluated as: 0 (0) + Constant expression syntax error. */ +#if sizeof (int) +#endif + +/* 14.8: type cast is disallowed. */ +/* Evaluated as: (0)0x8000 + Also a constant expression error. */ +#if (int)0x8000 < 0 +#endif + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_14_9.c b/libraries/mcpp/test-c/e_14_9.c new file mode 100644 index 000000000..3f57daa7b --- /dev/null +++ b/libraries/mcpp/test-c/e_14_9.c @@ -0,0 +1,11 @@ +/* e_14_9.c: Out of range in #if expression (division by 0). */ + +/* 14.9: Divided by 0. */ +#if 1 / 0 +#endif + +int main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_15_3.c b/libraries/mcpp/test-c/e_15_3.c new file mode 100644 index 000000000..b1fa1691a --- /dev/null +++ b/libraries/mcpp/test-c/e_15_3.c @@ -0,0 +1,21 @@ +/* e_15_3.c: #ifdef, #ifndef syntax errors. */ + +/* 15.3: Not an identifier. */ +#ifdef "string" +#endif +#ifdef 123 +#endif + +/* 15.4: Excessive token sequence. */ +#ifdef MACRO Junk +#endif + +/* 15.5: No argument. */ +#ifndef +#endif + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_16.c b/libraries/mcpp/test-c/e_16.c new file mode 100644 index 000000000..3bc963194 --- /dev/null +++ b/libraries/mcpp/test-c/e_16.c @@ -0,0 +1,15 @@ +/* e_16.c: Trailing junk of #else, #endif. */ + +/* 16.1: Trailing junk of #else. */ +#define MACRO_0 0 +#if MACRO_0 +#else MACRO_0 + +/* 16.2: Trailing junk of #endif. */ +#endif MACRO_0 + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_17.c b/libraries/mcpp/test-c/e_17.c new file mode 100644 index 000000000..7b6faf7a0 --- /dev/null +++ b/libraries/mcpp/test-c/e_17.c @@ -0,0 +1,34 @@ +/* e_17.c: Ill-formed group in a source file. */ + +#define MACRO_1 1 + +/* 17.1: Error of #endif without #if. */ +#endif + +/* 17.2: Error of #else without #if. */ +#else + +/* 17.3: Error of #else after #else. */ +#if MACRO_1 +#else +#else +#endif + +/* 17.4: Error of #elif after #else. */ +#if MACRO_1 == 1 +#else +#elif MACRO_1 == 0 +#endif + +/* 17.5: Error of #endif without #if in an included file. */ +#if 1 +#include "unbal1.h" + +/* 17.6: Error of unterminated #if section in an included file. */ +#include "unbal2.h" +#endif + +/* 17.7: Error of unterminated #if section. */ +#if MACRO_1 == 0 +#else + diff --git a/libraries/mcpp/test-c/e_18_4.c b/libraries/mcpp/test-c/e_18_4.c new file mode 100644 index 000000000..7722ca627 --- /dev/null +++ b/libraries/mcpp/test-c/e_18_4.c @@ -0,0 +1,36 @@ +/* e_18_4.c: #define syntax errors. */ + +/* 18.4: Not an identifier. */ +#define "string" +#define 123 + +/* 18.5: No argument. */ +#define + +/* 18.6: Empty parameter list. */ +#define math( op, a, ) op( (a), (b)) + +/* 18.7: Duplicate parameter names. */ +#define math( op, a, a) op( (a), (b)) + +/* 18.8: Argument is not an identifier. */ +#define NUMARGS( 1, +, 2) (1 + 2) + +/* 18.9: No space between macro name and replacement text. */ +/* + C90 (Corrigendum 1) forbids this if and only the replacement text begins + with a non-basic-character. + C99 forbids this even when the replacement text begins with basic- + character. +*/ +/* From ISO 9899:1990 / Corrigendum 1. */ +#define THIS$AND$THAT(a, b) ((a) + (b)) +/* Note: the following definition is legal (object-like macro). +#define THIS $AND$THAT(a, b) ((a) + (b)) +*/ + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_19_3.c b/libraries/mcpp/test-c/e_19_3.c new file mode 100644 index 000000000..2d3843448 --- /dev/null +++ b/libraries/mcpp/test-c/e_19_3.c @@ -0,0 +1,37 @@ +/* e_19_3.c: Redefinitions of macros. */ + +#include "defs.h" +#define str( s) # s +#define xstr( s) str( s) + +/* Excerpts from ISO C 6.8.3 "Examples". */ + +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* The following redefinitions should be diagnosed. */ + +/* 19.3: */ +#define OBJ_LIKE (0) /* different token sequence */ + +/* 19.4: */ +#undef OBJ_LIKE +#define OBJ_LIKE (1-1) +#define OBJ_LIKE (1 - 1) /* different white space */ + +/* 19.5: */ +#define FTN_LIKE(b) ( a ) /* different parameter usage */ + +/* 19.6: */ +#undef FTN_LIKE +#define FTN_LIKE(a) ( a ) +#define FTN_LIKE(b) ( b ) /* different parameter spelling */ + +/* 19.7: Not in ISO C "Examples" */ +#define FTN_LIKE OBJ_LIKE + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_23_3.c b/libraries/mcpp/test-c/e_23_3.c new file mode 100644 index 000000000..fede933af --- /dev/null +++ b/libraries/mcpp/test-c/e_23_3.c @@ -0,0 +1,16 @@ +/* e_23_3.c: ## operator shall not occur at the beginning or at the end of + replacement list for either form of macro definition. */ + +/* 23.3: In object-like macro. */ +#define con ## name +#define cat 12 ## + +/* 23.4: In function-like macro. */ +#define CON( a, b) ## a ## b +#define CAT( b, c) b ## c ## + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_24_6.c b/libraries/mcpp/test-c/e_24_6.c new file mode 100644 index 000000000..fb446112e --- /dev/null +++ b/libraries/mcpp/test-c/e_24_6.c @@ -0,0 +1,11 @@ +/* e_24_6.c: Operand of # operator in function-like macro definition should + be a parameter. */ + +/* 24.6: */ +#define FUNC( a) # b + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_25_6.c b/libraries/mcpp/test-c/e_25_6.c new file mode 100644 index 000000000..10c5fc95a --- /dev/null +++ b/libraries/mcpp/test-c/e_25_6.c @@ -0,0 +1,18 @@ +/* e_25_6.c: Macro arguments are pre-expanded separately. */ + +/* 25.6: */ +#define sub( x, y) (x - y) +#define head sub( +#define body(x,y) x,y +#define tail ) +#define head_body_tail( a, b, c) a b c +/* "head" is once expanded to "sub(", then rescanning of "sub(" causes an + uncompleted macro call. Expansion of an argument should complete + within the argument. */ + head_body_tail( head, body(a,b), tail); + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_27_7.c b/libraries/mcpp/test-c/e_27_7.c new file mode 100644 index 000000000..04550b7cb --- /dev/null +++ b/libraries/mcpp/test-c/e_27_7.c @@ -0,0 +1,16 @@ +/* e_27_7.c: Error of rescanning. */ + +#define sub( x, y) (x - y) + +/* 27.7: */ +#define TWO_TOKENS a,b +#define SUB( x, y) sub( x, y) +/* Too many arguments error while rescanning after once replaced to: + sub( a,b, 1); */ + SUB( TWO_TOKENS, 1); + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_29_3.c b/libraries/mcpp/test-c/e_29_3.c new file mode 100644 index 000000000..291dc109b --- /dev/null +++ b/libraries/mcpp/test-c/e_29_3.c @@ -0,0 +1,17 @@ +/* e_29_3.c: #undef errors. */ + +/* 29.3: Not an identifier. */ +#undef "string" +#undef 123 + +/* 29.4: Excessive token sequence. */ +#undef MACRO_0 Junk + +/* 29.5: No argument. */ +#undef + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_31.c b/libraries/mcpp/test-c/e_31.c new file mode 100644 index 000000000..63c2b7811 --- /dev/null +++ b/libraries/mcpp/test-c/e_31.c @@ -0,0 +1,15 @@ +/* e_31.c: Illegal macro calls. */ + +#define sub( x, y) (x - y) + +/* 31.1: Too many arguments error. */ + sub( x, y, z); + +/* 31.2: Too few arguments error. */ + sub( x); + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_31_3.c b/libraries/mcpp/test-c/e_31_3.c new file mode 100644 index 000000000..d7727b3ee --- /dev/null +++ b/libraries/mcpp/test-c/e_31_3.c @@ -0,0 +1,15 @@ +/* e_31_3.c: Macro call in control line should complete in the line. */ + +#define glue( a, b) a ## b +#define str( s) # s +#define xstr( s) str( s) + +/* 31.3: Unterminated macro call. */ +#include xstr( glue( header, + .h)) + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_32_5.c b/libraries/mcpp/test-c/e_32_5.c new file mode 100644 index 000000000..ce6d96d52 --- /dev/null +++ b/libraries/mcpp/test-c/e_32_5.c @@ -0,0 +1,12 @@ +/* e_32_5.c: Range error of character constant. */ + +/* 32.5: Value of a numerical escape sequence in character constant should + be in the range of char. */ +#if '\x123' == 0x123 /* Out of range. */ +#endif + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_33_2.c b/libraries/mcpp/test-c/e_33_2.c new file mode 100644 index 000000000..5e2bc937f --- /dev/null +++ b/libraries/mcpp/test-c/e_33_2.c @@ -0,0 +1,12 @@ +/* e_33_2.c: Out of range of numerical escape sequence in wide-char. */ + +/* 33.2: Value of a numerical escape sequence in wide-character constant + should be in the range of wchar_t. */ +#if L'\xabcdef012' == 0xbcdef012 /* Perhaps out of range. */ +#endif + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_35_2.c b/libraries/mcpp/test-c/e_35_2.c new file mode 100644 index 000000000..d4911279c --- /dev/null +++ b/libraries/mcpp/test-c/e_35_2.c @@ -0,0 +1,13 @@ +/* e_35_2.c: Out of range of character constant. */ + +/* In ASCII character set. */ +/* 35.2: */ +#if 'abcdefghi' == '\x61\x62\x63\x64\x65\x66\x67\x68\x69' + /* Perhaps out of range. */ +#endif + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_4_3.c b/libraries/mcpp/test-c/e_4_3.c new file mode 100644 index 000000000..9b91a632a --- /dev/null +++ b/libraries/mcpp/test-c/e_4_3.c @@ -0,0 +1,11 @@ +/* e_4_3.c: Illegal pp-token. */ + +/* 4.3: Empty character constant is an error. */ +#if '' == 0 /* This line is invalid, maybe skipped. */ +#endif /* This line maybe the second error. */ + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_7_4.c b/libraries/mcpp/test-c/e_7_4.c new file mode 100644 index 000000000..1dc352017 --- /dev/null +++ b/libraries/mcpp/test-c/e_7_4.c @@ -0,0 +1,12 @@ +/* e_7_4.c: #line error. */ + +/* 7.4: string literal in #line directive shall be a character string + literal. */ + +#line 123 L"wide" + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/e_std.c b/libraries/mcpp/test-c/e_std.c new file mode 100644 index 000000000..1cbe8b269 --- /dev/null +++ b/libraries/mcpp/test-c/e_std.c @@ -0,0 +1,376 @@ +/* + * e_std.c + * + * 1998/08 made public kmatsui + * 2002/08 revised not to conflict with C99 Standard kmatsui + * 2003/11 added a few samples kmatsui + * + * Samples to test Standard C preprocessing. + * Preprocessor must diagnose all of these samples appropriately. + */ + + +void e_19_3( void); +void e_25_6( void); +void e_27_6( void); +void e_31( void); + +main( void) +{ + e_19_3(); + e_25_6(); + e_27_6(); + e_31(); + + return 0; +} + + +/* Illegal pp-token. */ + +/* 4.3: Empty character constant is an error. */ +#if '' == 0 /* This line is invalid, maybe skipped. */ +#endif /* This line maybe the second error. */ + + +/* #line error. */ + +/* 7.4: string literal in #line directive shall be a character string + literal. */ + +#line 123 L"wide" + + +/* Out of range of integer pp-token in #if expression. */ +/* Note: Tests of character constant overflow are in 32.5, 33.2, 35.2. */ + +/* 12.8: Preprocessing number perhaps out of range of unsigned long. */ +#if 123456789012345678901 +#endif + + +/* Illegal #if expressions. */ + +#define A 1 +#define B 1 + +/* 14.1: String literal is not allowed in #if expression. */ +#if "string" +#endif /* The second error ? */ + +/* 14.2: Operators =, +=, ++, etc. are not allowed in #if expression. */ +#if A = B +#endif +#if A++ B +#endif +#if A --B +#endif +#if A.B +#endif + +/* 14.3: Unterminated #if expression. */ +#if 0 < +#endif +#if ( (A == B) +#endif + +/* 14.4: Unbalanced parenthesis in #if defined operator. */ +#if defined ( MACRO +#endif + +/* 14.5: No argument. */ +#if +#endif + +/* 14.6: Macro expanding to 0 token in #if expression. */ +#define ZERO_TOKEN +#if ZERO_TOKEN +#endif + + +/* There is no keyword in #if expression. */ + +/* 14.7: sizeof operator is disallowed. */ +/* Evaluated as: 0 (0) + Constant expression syntax error. */ +#if sizeof (int) +#endif + +/* 14.8: type cast is disallowed. */ +/* Evaluated as: (0)0x8000 + Also a constant expression error. */ +#if (int)0x8000 < 0 +#endif + + +/* Out of range in #if expression (division by 0). */ + +/* 14.9: Divided by 0. */ +#if 1 / 0 +#endif + + +/* Overflow of constant expression in #if directive. */ + +/* 14.10: */ +#include + +#if LONG_MAX - LONG_MIN +#endif +#if LONG_MAX + 1 +#endif +#if LONG_MIN - 1 +#endif +#if LONG_MAX * 2 +#endif + + +/* #ifdef, #ifndef syntax errors. */ + +/* 15.3: Not an identifier. */ +#ifdef "string" +#endif +#ifdef 123 +#endif + +/* 15.4: Excessive token sequence. */ +#ifdef A Junk +#endif + +/* 15.5: No argument. */ +#ifndef +#endif + + +/* Trailing junk of #else, #endif. */ + +/* 16.1: Trailing junk of #else. */ +#define MACRO_0 0 +#if MACRO_0 +#else MACRO_0 + +/* 16.2: Trailing junk of #endif. */ +#endif MACRO_0 + + +/* Ill-formed group in a source file. */ + +#define MACRO_1 1 + +/* 17.1: Error of #endif without #if. */ +#endif + +/* 17.2: Error of #else without #if. */ +#else + +/* 17.3: Error of #else after #else. */ +#if MACRO_1 +#else /* line 168 */ +#if 1 +#else +#endif +#else +#endif + +/* 17.4: Error of #elif after #else. */ +#if MACRO_1 == 1 +#else /* line 177 */ +#elif MACRO_1 == 0 +#endif + +/* 17.5: Error of #endif without #if in an included file. */ +#if 1 +#include "unbal1.h" + +/* 17.6: Error of unterminated #if section in an included file. */ +#include "unbal2.h" +#endif + +/* 17.7: Error of unterminated #if section. */ +/* An error would be reported at end of file. */ +#if MACRO_1 == 0 /* line 191 */ +#else + + +/* #define syntax errors. */ + +/* 18.4: Not an identifier. */ +#define "string" +#define 123 + +/* 18.5: No argument. */ +#define + +/* 18.6: Empty parameter list. */ +#define math( op, a, ) op( (a), (b)) + +/* 18.7: Duplicate parameter names. */ +#define math( op, a, a) op( (a), (b)) + +/* 18.8: Parameter is not an identifier. */ +#define NUMARGS( 1, +, 2) (1 + 2) + +/* 18.9: No space between macro name and replacement text. */ +/* + C90 (Corrigendum 1) forbids this if and only the replacement text begins + with a non-basic-character. + C99 forbids this even when the replacement text begins with basic- + character. +*/ +/* From ISO 9899:1990 / Corrigendum 1. */ +#define THIS$AND$THAT(a, b) ((a) + (b)) +/* Note: the following definition is legal (object-like macro). +#define THIS $AND$THAT(a, b) ((a) + (b)) +*/ + + +/* Redefinitions of macros. */ + +#define str( s) # s +#define xstr( s) str( s) + +/* Excerpts from ISO C 6.8.3 "Examples". */ + +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +void e_19_3( void) +{ +/* The following redefinitions should be diagnosed. */ + +/* 19.3: */ +#define OBJ_LIKE (0) /* different token sequence */ + +/* 19.4: */ +#undef OBJ_LIKE +#define OBJ_LIKE (1-1) +#define OBJ_LIKE (1 - 1) /* different white space */ + +/* 19.5: */ +#define FTN_LIKE(b) ( a ) /* different parameter usage */ + +/* 19.6: */ +#undef FTN_LIKE +#define FTN_LIKE(a) ( a ) +#define FTN_LIKE(b) ( b ) /* different parameter spelling */ + +/* 19.7: Not in ISO C "Examples" */ +#define FTN_LIKE OBJ_LIKE +} + + +/* ## operator shall not occur at the beginning or at the end of + replacement list for either form of macro definition. */ + +/* 23.3: In object-like macro. */ +#define con ## name +#define cat 12 ## + +/* 23.4: In function-like macro. */ +#define CON( a, b) ## a ## b +#define CAT( b, c) b ## c ## + + +/* Operand of # operator in function-like macro definition shall + be a parameter name. */ + +/* 24.6: */ +#define FUNC( a) # b + + +/* Macro arguments are pre-expanded separately. */ + +/* 25.6: */ +#define sub( x, y) (x - y) +#define head sub( +#define body(x,y) x,y +#define tail ) +#define head_body_tail( a, b, c) a b c + +void e_25_6( void) +{ +/* "head" is once replaced to "sub(", then rescanning of "sub(" causes an + uncompleted macro call. Expansion of an argument should complete + within the argument. */ + head_body_tail( head, body(a,b), tail); +} + + +/* Error of rescanning. */ + +/* 27.7: */ +#define TWO_ARGS a,b +#define SUB( x, y) sub( x, y) + +void e_27_7( void) +{ +/* Too many arguments error while rescanning after once replaced to: + sub( a,b, 1); */ + SUB( TWO_ARGS, 1); +} + + +/* #undef errors. */ + +/* 29.3: Not an identifier. */ +#undef "string" +#undef 123 + +/* 29.4: Excessive token sequence. */ +#undef MACRO_0 Junk + +/* 29.5: No argument. */ +#undef + + +/* Illegal macro calls. */ + +void e_31( void) +{ + int x = 1, y = 2; + +/* 31.1: Too many arguments error. */ + sub( x, y, z); + +/* 31.2: Too few arguments error. */ + sub( x); +} + + +/* Macro call in control line should complete in the line. */ + +#define glue( a, b) a ## b + +/* 31.3: Unterminated macro call. */ +#include xstr( glue( header, + .h)) + + +/* Range error of character constant. */ + +/* 32.5: Value of a numerical escape sequence in character constant should + be in the range of char. */ +#if '\x123' == 0x123 /* Out of range. */ +#endif + + +/* Out of range of numerical escape sequence in wide-char. */ + +/* 33.2: Value of a numerical escape sequence in wide-character constant + should be in the range of wchar_t. */ +#if L'\xabcdef012' == 0xbcde012 /* Perhaps out of range. */ +#endif + + +/* Out of range of character constant. */ + +/* In ASCII character set. */ +/* 35.2: */ +#if 'abcdefghi' == '\x61\x62\x63\x64\x65\x66\x67\x68\x69' + /* Perhaps out of range. */ +#endif + + +/* Error of "unterminated #if section started at line 191" will be reported + at end of file. */ + diff --git a/libraries/mcpp/test-c/header.h b/libraries/mcpp/test-c/header.h new file mode 100644 index 000000000..341de7bf5 --- /dev/null +++ b/libraries/mcpp/test-c/header.h @@ -0,0 +1,3 @@ +/* header.h */ + +#define MACRO_abc abc diff --git a/libraries/mcpp/test-c/i_32_3.c b/libraries/mcpp/test-c/i_32_3.c new file mode 100644 index 000000000..1d28f9b9d --- /dev/null +++ b/libraries/mcpp/test-c/i_32_3.c @@ -0,0 +1,26 @@ +/* i_32_3.c: Character constant in #if expression. */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* 32.3: */ +#if 'a' != 0x61 + fputs( "Not ASCII character set, or bad evaluation of character constant." + , stderr); + exit( 1); +#endif + +/* 32.4: '\a' and '\v' */ +#if '\a' != 7 || '\v' != 11 + fputs( "Not ASCII character set, or bad evaluation of escape sequences." + , stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/i_35.c b/libraries/mcpp/test-c/i_35.c new file mode 100644 index 000000000..1b974e429 --- /dev/null +++ b/libraries/mcpp/test-c/i_35.c @@ -0,0 +1,19 @@ +/* i_35.c: Multi-character character constant. */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* In ASCII character set. */ +/* 35.1: */ +#if ('ab' != '\x61\x62') || ('\aa' != '\7\x61') + fputs( "Bad handling of multi-character character constant.\n", stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/i_35_3.c b/libraries/mcpp/test-c/i_35_3.c new file mode 100644 index 000000000..cd97c93a3 --- /dev/null +++ b/libraries/mcpp/test-c/i_35_3.c @@ -0,0 +1,19 @@ +/* i_35_3.c: Multi-character wide character constant. */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* In ASCII character set. */ +/* 35.3: */ +#if (L'ab' != L'\x61\x62') || (L'ab' == 'ab') + fputs( "Bad handling of multi-character wide character constant.\n", + stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} diff --git a/libraries/mcpp/test-c/ifdef15.h b/libraries/mcpp/test-c/ifdef15.h new file mode 100644 index 000000000..cb16f397f --- /dev/null +++ b/libraries/mcpp/test-c/ifdef15.h @@ -0,0 +1,48 @@ +/* ifdef15.h */ + +#ifdef X01 +#else +#ifdef X02 +#else +#ifdef X03 +#else +#ifdef X04 +#else +#ifdef X05 +#else +#ifdef X06 +#else +#ifdef X07 +#else +#ifdef X08 +#else +#ifdef X09 +#else +#ifdef X0A +#else +#ifdef X0B +#else +#ifdef X0C +#else +#ifdef X0D +#else +#ifdef X0E +#else +#ifdef X0F + nest = 0x0f; +#endif /* X0F */ +#endif /* X0E */ +#endif /* X0D */ +#endif /* X0C */ +#endif /* X0B */ +#endif /* X0A */ +#endif /* X09 */ +#endif /* X08 */ +#endif /* X07 */ +#endif /* X06 */ +#endif /* X05 */ +#endif /* X04 */ +#endif /* X03 */ +#endif /* X02 */ +#endif /* X01 */ + diff --git a/libraries/mcpp/test-c/line.h b/libraries/mcpp/test-c/line.h new file mode 100644 index 000000000..a704089a5 --- /dev/null +++ b/libraries/mcpp/test-c/line.h @@ -0,0 +1,7 @@ +/* line.h */ + +{ + char * file = __FILE__; + file += strlen( file) - 6; + assert( __LINE__ == 6 && strcmp( file, "line.h") == 0); +} diff --git a/libraries/mcpp/test-c/m1024.h b/libraries/mcpp/test-c/m1024.h new file mode 100644 index 000000000..0d6798be3 --- /dev/null +++ b/libraries/mcpp/test-c/m1024.h @@ -0,0 +1,1026 @@ +/* m1024.h */ + +#define AA +#define AB +#define AC +#define AD +#define AE +#define AF +#define AG +#define AH +#define AI +#define AJ +#define AK +#define AL +#define AM +#define AN +#define AO +#define AP +#define AQ +#define AR +#define AS +#define AT +#define AU +#define AV +#define AW +#define AX +#define AY +#define AZ +#define Aa +#define Ab +#define Ac +#define Ad +#define Ae +#define Af +#define Ag +#define Ah +#define Ai +#define Aj +#define Ak +#define Al +#define Am +#define An +#define BA +#define BB +#define BC +#define BD +#define BE +#define BF +#define BG +#define BH +#define BI +#define BJ +#define BK +#define BL +#define BM +#define BN +#define BO +#define BP +#define BQ +#define BR +#define BS +#define BT +#define BU +#define BV +#define BW +#define BX +#define BY +#define BZ +#define Ba +#define Bb +#define Bc +#define Bd +#define Be +#define Bf +#define Bg +#define Bh +#define Bi +#define Bj +#define Bk +#define Bl +#define Bm +#define Bn +#define CA +#define CB +#define CC +#define CD +#define CE +#define CF +#define CG +#define CH +#define CI +#define CJ +#define CK +#define CL +#define CM +#define CN +#define CO +#define CP +#define CQ +#define CR +#define CS +#define CT +#define CU +#define CV +#define CW +#define CX +#define CY +#define CZ +#define Ca +#define Cb +#define Cc +#define Cd +#define Ce +#define Cf +#define Cg +#define Ch +#define Ci +#define Cj +#define Ck +#define Cl +#define Cm +#define Cn +#define DA +#define DB +#define DC +#define DD +#define DE +#define DF +#define DG +#define DH +#define DI +#define DJ +#define DK +#define DL +#define DM +#define DN +#define DO +#define DP +#define DQ +#define DR +#define DS +#define DT +#define DU +#define DV +#define DW +#define DX +#define DY +#define DZ +#define Da +#define Db +#define Dc +#define Dd +#define De +#define Df +#define Dg +#define Dh +#define Di +#define Dj +#define Dk +#define Dl +#define Dm +#define Dn +#define EA +#define EB +#define EC +#define ED +#define EE +#define EF +#define EG +#define EH +#define EI +#define EJ +#define EK +#define EL +#define EM +#define EN +#define EO +#define EP +#define EQ +#define ER +#define ES +#define ET +#define EU +#define EV +#define EW +#define EX +#define EY +#define EZ +#define Ea +#define Eb +#define Ec +#define Ed +#define Ee +#define Ef +#define Eg +#define Eh +#define Ei +#define Ej +#define Ek +#define El +#define Em +#define En +#define FA +#define FB +#define FC +#define FD +#define FE +#define FF +#define FG +#define FH +#define FI +#define FJ +#define FK +#define FL +#define FM +#define FN +#define FO +#define FP +#define FQ +#define FR +#define FS +#define FT +#define FU +#define FV +#define FW +#define FX +#define FY +#define FZ +#define Fa +#define Fb +#define Fc +#define Fd +#define Fe +#define Ff +#define Fg +#define Fh +#define Fi +#define Fj +#define Fk +#define Fl +#define Fm +#define Fn +#define GA +#define GB +#define GC +#define GD +#define GE +#define GF +#define GG +#define GH +#define GI +#define GJ +#define GK +#define GL +#define GM +#define GN +#define GO +#define GP +#define GQ +#define GR +#define GS +#define GT +#define GU +#define GV +#define GW +#define GX +#define GY +#define GZ +#define Ga +#define Gb +#define Gc +#define Gd +#define Ge +#define Gf +#define Gg +#define Gh +#define Gi +#define Gj +#define Gk +#define Gl +#define Gm +#define Gn +#define HA +#define HB +#define HC +#define HD +#define HE +#define HF +#define HG +#define HH +#define HI +#define HJ +#define HK +#define HL +#define HM +#define HN +#define HO +#define HP +#define HQ +#define HR +#define HS +#define HT +#define HU +#define HV +#define HW +#define HX +#define HY +#define HZ +#define Ha +#define Hb +#define Hc +#define Hd +#define He +#define Hf +#define Hg +#define Hh +#define Hi +#define Hj +#define Hk +#define Hl +#define Hm +#define Hn +#define IA +#define IB +#define IC +#define ID +#define IE +#define IF +#define IG +#define IH +#define II +#define IJ +#define IK +#define IL +#define IM +#define IN +#define IO +#define IP +#define IQ +#define IR +#define IS +#define IT +#define IU +#define IV +#define IW +#define IX +#define IY +#define IZ +#define Ia +#define Ib +#define Ic +#define Id +#define Ie +#define If +#define Ig +#define Ih +#define Ii +#define Ij +#define Ik +#define Il +#define Im +#define In +#define JA +#define JB +#define JC +#define JD +#define JE +#define JF +#define JG +#define JH +#define JI +#define JJ +#define JK +#define JL +#define JM +#define JN +#define JO +#define JP +#define JQ +#define JR +#define JS +#define JT +#define JU +#define JV +#define JW +#define JX +#define JY +#define JZ +#define Ja +#define Jb +#define Jc +#define Jd +#define Je +#define Jf +#define Jg +#define Jh +#define Ji +#define Jj +#define Jk +#define Jl +#define Jm +#define Jn +#define KA +#define KB +#define KC +#define KD +#define KE +#define KF +#define KG +#define KH +#define KI +#define KJ +#define KK +#define KL +#define KM +#define KN +#define KO +#define KP +#define KQ +#define KR +#define KS +#define KT +#define KU +#define KV +#define KW +#define KX +#define KY +#define KZ +#define Ka +#define Kb +#define Kc +#define Kd +#define Ke +#define Kf +#define Kg +#define Kh +#define Ki +#define Kj +#define Kk +#define Kl +#define Km +#define Kn +#define LA +#define LB +#define LC +#define LD +#define LE +#define LF +#define LG +#define LH +#define LI +#define LJ +#define LK +#define LL +#define LM +#define LN +#define LO +#define LP +#define LQ +#define LR +#define LS +#define LT +#define LU +#define LV +#define LW +#define LX +#define LY +#define LZ +#define La +#define Lb +#define Lc +#define Ld +#define Le +#define Lf +#define Lg +#define Lh +#define Li +#define Lj +#define Lk +#define Ll +#define Lm +#define Ln +#define MA +#define MB +#define MC +#define MD +#define ME +#define MF +#define MG +#define MH +#define MI +#define MJ +#define MK +#define ML +#define MM +#define MN +#define MO +#define MP +#define MQ +#define MR +#define MS +#define MT +#define MU +#define MV +#define MW +#define MX +#define MY +#define MZ +#define Ma +#define Mb +#define Mc +#define Md +#define Me +#define Mf +#define Mg +#define Mh +#define Mi +#define Mj +#define Mk +#define Ml +#define Mm +#define Mn +#define NA +#define NB +#define NC +#define ND +#define NE +#define NF +#define NG +#define NH +#define NI +#define NJ +#define NK +#define NL +#define NM +#define NN +#define NO +#define NP +#define NQ +#define NR +#define NS +#define NT +#define NU +#define NV +#define NW +#define NX +#define NY +#define NZ +#define Na +#define Nb +#define Nc +#define Nd +#define Ne +#define Nf +#define Ng +#define Nh +#define Ni +#define Nj +#define Nk +#define Nl +#define Nm +#define Nn +#define OA +#define OB +#define OC +#define OD +#define OE +#define OF +#define OG +#define OH +#define OI +#define OJ +#define OK +#define OL +#define OM +#define ON +#define OO +#define OP +#define OQ +#define OR +#define OS +#define OT +#define OU +#define OV +#define OW +#define OX +#define OY +#define OZ +#define Oa +#define Ob +#define Oc +#define Od +#define Oe +#define Of +#define Og +#define Oh +#define Oi +#define Oj +#define Ok +#define Ol +#define Om +#define On +#define PA +#define PB +#define PC +#define PD +#define PE +#define PF +#define PG +#define PH +#define PI +#define PJ +#define PK +#define PL +#define PM +#define PN +#define PO +#define PP +#define PQ +#define PR +#define PS +#define PT +#define PU +#define PV +#define PW +#define PX +#define PY +#define PZ +#define Pa +#define Pb +#define Pc +#define Pd +#define Pe +#define Pf +#define Pg +#define Ph +#define Pi +#define Pj +#define Pk +#define Pl +#define Pm +#define Pn +#define QA +#define QB +#define QC +#define QD +#define QE +#define QF +#define QG +#define QH +#define QI +#define QJ +#define QK +#define QL +#define QM +#define QN +#define QO +#define QP +#define QQ +#define QR +#define QS +#define QT +#define QU +#define QV +#define QW +#define QX +#define QY +#define QZ +#define Qa +#define Qb +#define Qc +#define Qd +#define Qe +#define Qf +#define Qg +#define Qh +#define Qi +#define Qj +#define Qk +#define Ql +#define Qm +#define Qn +#define RA +#define RB +#define RC +#define RD +#define RE +#define RF +#define RG +#define RH +#define RI +#define RJ +#define RK +#define RL +#define RM +#define RN +#define RO +#define RP +#define RQ +#define RR +#define RS +#define RT +#define RU +#define RV +#define RW +#define RX +#define RY +#define RZ +#define Ra +#define Rb +#define Rc +#define Rd +#define Re +#define Rf +#define Rg +#define Rh +#define Ri +#define Rj +#define Rk +#define Rl +#define Rm +#define Rn +#define SA +#define SB +#define SC +#define SD +#define SE +#define SF +#define SG +#define SH +#define SI +#define SJ +#define SK +#define SL +#define SM +#define SN +#define SO +#define SP +#define SQ +#define SR +#define SS +#define ST +#define SU +#define SV +#define SW +#define SX +#define SY +#define SZ +#define Sa +#define Sb +#define Sc +#define Sd +#define Se +#define Sf +#define Sg +#define Sh +#define Si +#define Sj +#define Sk +#define Sl +#define Sm +#define Sn +#define TA +#define TB +#define TC +#define TD +#define TE +#define TF +#define TG +#define TH +#define TI +#define TJ +#define TK +#define TL +#define TM +#define TN +#define TO +#define TP +#define TQ +#define TR +#define TS +#define TT +#define TU +#define TV +#define TW +#define TX +#define TY +#define TZ +#define Ta +#define Tb +#define Tc +#define Td +#define Te +#define Tf +#define Tg +#define Th +#define Ti +#define Tj +#define Tk +#define Tl +#define Tm +#define Tn +#define UA +#define UB +#define UC +#define UD +#define UE +#define UF +#define UG +#define UH +#define UI +#define UJ +#define UK +#define UL +#define UM +#define UN +#define UO +#define UP +#define UQ +#define UR +#define US +#define UT +#define UU +#define UV +#define UW +#define UX +#define UY +#define UZ +#define Ua +#define Ub +#define Uc +#define Ud +#define Ue +#define Uf +#define Ug +#define Uh +#define Ui +#define Uj +#define Uk +#define Ul +#define Um +#define Un +#define VA +#define VB +#define VC +#define VD +#define VE +#define VF +#define VG +#define VH +#define VI +#define VJ +#define VK +#define VL +#define VM +#define VN +#define VO +#define VP +#define VQ +#define VR +#define VS +#define VT +#define VU +#define VV +#define VW +#define VX +#define VY +#define VZ +#define Va +#define Vb +#define Vc +#define Vd +#define Ve +#define Vf +#define Vg +#define Vh +#define Vi +#define Vj +#define Vk +#define Vl +#define Vm +#define Vn +#define WA +#define WB +#define WC +#define WD +#define WE +#define WF +#define WG +#define WH +#define WI +#define WJ +#define WK +#define WL +#define WM +#define WN +#define WO +#define WP +#define WQ +#define WR +#define WS +#define WT +#define WU +#define WV +#define WW +#define WX +#define WY +#define WZ +#define Wa +#define Wb +#define Wc +#define Wd +#define We +#define Wf +#define Wg +#define Wh +#define Wi +#define Wj +#define Wk +#define Wl +#define Wm +#define Wn +#define XA +#define XB +#define XC +#define XD +#define XE +#define XF +#define XG +#define XH +#define XI +#define XJ +#define XK +#define XL +#define XM +#define XN +#define XO +#define XP +#define XQ +#define XR +#define XS +#define XT +#define XU +#define XV +#define XW +#define XX +#define XY +#define XZ +#define Xa +#define Xb +#define Xc +#define Xd +#define Xe +#define Xf +#define Xg +#define Xh +#define Xi +#define Xj +#define Xk +#define Xl +#define Xm +#define Xn +#define YA +#define YB +#define YC +#define YD +#define YE +#define YF +#define YG +#define YH +#define YI +#define YJ +#define YK +#define YL +#define YM +#define YN +#define YO +#define YP +#define YQ +#define YR +#define YS +#define YT +#define YU +#define YV +#define YW +#define YX +#define YY +#define YZ +#define Ya +#define Yb +#define Yc +#define Yd +#define Ye +#define Yf +#define Yg +#define Yh +#define Yi +#define Yj +#define Yk +#define Yl +#define Ym +#define Yn +#define ZA +#define ZB +#define ZC +#define ZD +#define ZE +#define ZF +#define ZG +#define ZH +#define ZI +#define ZJ +#define ZK +#define ZL +#define ZM +#define ZN +#define ZO +#define ZP +#define ZQ +#define ZR +#define ZS +#define ZT +#define ZU +#define ZV +#define ZW +#define ZX 1 diff --git a/libraries/mcpp/test-c/m_33_big5.c b/libraries/mcpp/test-c/m_33_big5.c new file mode 100644 index 000000000..7622c7ac5 --- /dev/null +++ b/libraries/mcpp/test-c/m_33_big5.c @@ -0,0 +1,31 @@ +/* m_33_big5.c: Wide character constant encoded in Big-Five. */ + +#include "defs.h" +#include +#define BYTES_VAL (1 << CHAR_BIT) + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "big5") /* For MCPP */ +#pragma setlocale( "chinese-traditional") /* For Visual C */ + +#if L'r' == '\xa6' * BYTES_VAL + '\x72' + ptr = "Wide character is encoded in Big-Five."; +#elif L'r' == '\x72' * BYTES_VAL + '\xa6' + ptr = "Wide character is encoded in Big-Five." + "Inverted order of evaluation."; +#else + ptr = "I cannot understand Big-Five."; +#endif + + assert( strcmp( ptr, "I cannot understand Big-Five.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_33_eucjp.c b/libraries/mcpp/test-c/m_33_eucjp.c new file mode 100644 index 000000000..295c2459b --- /dev/null +++ b/libraries/mcpp/test-c/m_33_eucjp.c @@ -0,0 +1,31 @@ +/* m_33_eucjp.c: Wide character constant encoded in EUC-JP. */ + +#include "defs.h" +#include +#define BYTES_VAL (1 << CHAR_BIT) + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "eucjp") /* For MCPP */ +#pragma setlocale( "eucjp") /* For MCPP on VC */ + +#if L'' == '\xbb' * BYTES_VAL + '\xfa' + ptr = "Wide character is encoded in EUC-JP."; +#elif L'' == '\xfa' * BYTES_VAL + '\xbb' + ptr = "Wide character is encoded in EUC-JP." + "Inverted order of evaluation."; +#else + ptr = "I cannot understand EUC-JP."; +#endif + + assert( strcmp( ptr, "I cannot understand EUC-JP.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_33_gb.c b/libraries/mcpp/test-c/m_33_gb.c new file mode 100644 index 000000000..8741c4189 --- /dev/null +++ b/libraries/mcpp/test-c/m_33_gb.c @@ -0,0 +1,31 @@ +/* m_33_gb.c: Wide character constant encoded in GB-2312. */ + +#include "defs.h" +#include +#define BYTES_VAL (1 << CHAR_BIT) + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "gb2312") /* For MCPP */ +#pragma setlocale( "chinese-simplified") /* For Visual C */ + +#if L'' == '\xd7' * BYTES_VAL + '\xd6' + ptr = "Wide character is encoded in GB 2312."; +#elif L'' == '\xd6' * BYTES_VAL + '\xd7' + ptr = "Wide character is encoded in GB 2312." + "Inverted order of evaluation."; +#else + ptr = "I cannot understand GB-2312."; +#endif + + assert( strcmp( ptr, "I cannot understand GB-2312.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_33_jis.c b/libraries/mcpp/test-c/m_33_jis.c new file mode 100644 index 000000000..c2e6ff603 --- /dev/null +++ b/libraries/mcpp/test-c/m_33_jis.c @@ -0,0 +1,33 @@ +/* m_33_jis.c: Wide character constant encoded in ISO-2022-JP. */ + +#include "defs.h" +#include +#define BYTES_VAL (1 << CHAR_BIT) + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "jis") /* For MCPP */ +#pragma setlocale( "jis") /* For MCPP on VC */ + +#if L'$B;z(B' == 0x3b * BYTES_VAL + 0x7a + /* This line doesn't work unless "shift states" are processed. */ + ptr = "Wide character is encoded in ISO-2022-JP."; +#elif L'$B;z(B' == 0x7a * BYTES_VAL + 0x3b + /* This line doesn't work unless "shift states" are processed. */ + ptr = "Wide character is encoded in ISO-2022-JP." + "Inverted order of evaluation."; +#else + ptr = "I cannot understand ISO-2022-JP."; +#endif + + assert( strcmp( ptr, "I cannot understand ISO-2022-JP.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_33_ksc.c b/libraries/mcpp/test-c/m_33_ksc.c new file mode 100644 index 000000000..d1bc12d14 --- /dev/null +++ b/libraries/mcpp/test-c/m_33_ksc.c @@ -0,0 +1,31 @@ +/* m_33_ksc.c: Wide character constant encoded in KSC-5601. */ + +#include "defs.h" +#include +#define BYTES_VAL (1 << CHAR_BIT) + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "ksc5601") /* For MCPP */ +#pragma setlocale( "korean") /* For Visual C */ + +#if L'' == '\xed' * BYTES_VAL + '\xae' + ptr = "Wide character is encoded in KSC-5601."; +#elif L'' == '\xae' * BYTES_VAL + '\xed' + ptr = "Wide character is encoded in KSC-5601." + "Inverted order of evaluation."; +#else + ptr = "I cannot understand KSC-5601."; +#endif + + assert( strcmp( ptr, "I cannot understand KSC-5601.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_33_sjis.c b/libraries/mcpp/test-c/m_33_sjis.c new file mode 100644 index 000000000..4f3e8d09b --- /dev/null +++ b/libraries/mcpp/test-c/m_33_sjis.c @@ -0,0 +1,31 @@ +/* m_33_sjis.c: Wide character constant encoded in shift-JIS. */ + +#include "defs.h" +#include +#define BYTES_VAL (1 << CHAR_BIT) + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "sjis") /* For MCPP */ +#pragma setlocale( "japanese") /* For Visual C */ + +#if L'' == '\x8e' * BYTES_VAL + '\x9a' + ptr = "Wide character is encoded in shift-JIS."; +#elif L'' == '\x9a' * BYTES_VAL + '\x8e' + ptr = "Wide character is encoded in shift-JIS." + "Inverted order of evaluation."; +#else + ptr = "I cannot understand shift-JIS."; +#endif + + assert( strcmp( ptr, "I cannot understand shift-JIS.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_33_utf8.c b/libraries/mcpp/test-c/m_33_utf8.c new file mode 100644 index 000000000..0ce3fd3c6 --- /dev/null +++ b/libraries/mcpp/test-c/m_33_utf8.c @@ -0,0 +1,31 @@ +/* m_33_utf8.c: Wide character constant encoded in UTF-8. */ + +#include "defs.h" +#include +#define BYTES_VAL (1 << CHAR_BIT) + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "utf8") /* For MCPP */ +#pragma setlocale( "utf8") /* For MCPP on VC */ + +#if L'字' == '\xe5' * BYTES_VAL * BYTES_VAL + '\xad' * BYTES_VAL + '\x97' + ptr = "Wide character is encoded in UTF-8."; +#elif L'字' == '\x97' * BYTES_VAL * BYTES_VAL + '\xad' * BYTES_VAL + '\xe5' + ptr = "Wide character is encoded in UTF-8." + "Inverted order of evaluation."; +#else + ptr = "I cannot understand UTF-8."; +#endif + + assert( strcmp( ptr, "I cannot understand UTF-8.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_34_big5.c b/libraries/mcpp/test-c/m_34_big5.c new file mode 100644 index 000000000..becee8bc1 --- /dev/null +++ b/libraries/mcpp/test-c/m_34_big5.c @@ -0,0 +1,26 @@ +/* m_34_big5.t: Multi-byte character constant encoded in Big-Five. */ + +#include "defs.h" + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 34.1: */ + +#pragma __setlocale( "big5") /* For MCPP */ +#pragma setlocale( "chinese-traditional") /* For Visual C */ + +#if 'r' == '\xa6\x72' + ptr = "Multi-byte character is encoded in Big-Five."; +#else + ptr = "I cannot understand Big-Five."; +#endif + + assert( strcmp( ptr, "I cannot understand Big-Five.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_34_eucjp.c b/libraries/mcpp/test-c/m_34_eucjp.c new file mode 100644 index 000000000..fb60de901 --- /dev/null +++ b/libraries/mcpp/test-c/m_34_eucjp.c @@ -0,0 +1,26 @@ +/* m_34_eucjp.c: Multi-byte character constant encoded in EUC-JP. */ + +#include "defs.h" + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 34.1: */ + +#pragma __setlocale( "eucjp") /* For MCPP */ +#pragma setlocale( "eucjp") /* For MCPP on VC */ + +#if '' == '\xbb\xfa' + ptr = "Multi-byte character is encoded in EUC-JP."; +#else + ptr = "I cannot understand EUC-JP."; +#endif + + assert( strcmp( ptr, "I cannot understand EUC-JP.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_34_gb.c b/libraries/mcpp/test-c/m_34_gb.c new file mode 100644 index 000000000..ba32f5c50 --- /dev/null +++ b/libraries/mcpp/test-c/m_34_gb.c @@ -0,0 +1,26 @@ +/* m_34_gb.c: Multi-byte character constant encoded in GB-2312. */ + +#include "defs.h" + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 34.1: */ + +#pragma __setlocale( "gb2312") /* For MCPP */ +#pragma setlocale( "chinese-simplified") /* For Visual C */ + +#if '' == '\xd7\xd6' + ptr = "Multi-byte character is encoded in GB-2312."; +#else + ptr = "I cannot understand GB-2312."; +#endif + + assert( strcmp( ptr, "I cannot understand GB-2312.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_34_jis.c b/libraries/mcpp/test-c/m_34_jis.c new file mode 100644 index 000000000..44499522d --- /dev/null +++ b/libraries/mcpp/test-c/m_34_jis.c @@ -0,0 +1,27 @@ +/* m_34_jis.c: Multi-byte character constant encoded in ISO-2022-JP. */ + +#include "defs.h" + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 34.1: */ + +#pragma __setlocale( "jis") /* For MCPP */ +#pragma setlocale( "jis") /* For MCPP on VC */ + +#if '$B;z(B' == '\x3b\x7a' + /* This line doesn't work unless "shift states" are processed. */ + ptr = "Multi-byte character is encoded in ISO-2022-JP."; +#else + ptr = "I cannot understand ISO-2022-JP."; +#endif + + assert( strcmp( ptr, "I cannot understand ISO-2022-JP.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_34_ksc.c b/libraries/mcpp/test-c/m_34_ksc.c new file mode 100644 index 000000000..67ac9b00c --- /dev/null +++ b/libraries/mcpp/test-c/m_34_ksc.c @@ -0,0 +1,26 @@ +/* m_34_ksc.c: Multi-byte character constant encoded in KSC-5601. */ + +#include "defs.h" + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 34.1: */ + +#pragma __setlocale( "ksc5601") /* For MCPP */ +#pragma setlocale( "korean") /* For Visual C */ + +#if '' == '\xed\xae' + ptr = "Multi-byte character is encoded in KSC-5601."; +#else + ptr = "I cannot understand KSC-5601."; +#endif + + assert( strcmp( ptr, "I cannot understand KSC-5601.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_34_sjis.c b/libraries/mcpp/test-c/m_34_sjis.c new file mode 100644 index 000000000..44a99ea6b --- /dev/null +++ b/libraries/mcpp/test-c/m_34_sjis.c @@ -0,0 +1,26 @@ +/* m_34_sjis.c: Multi-byte character constant encoded in shift-JIS. */ + +#include "defs.h" + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 34.1: */ + +#pragma __setlocale( "sjis") /* For MCPP */ +#pragma setlocale( "japanese") /* For Visual C */ + +#if '' == '\x8e\x9a' + ptr = "Multi-byte character is encoded in shift-JIS."; +#else + ptr = "I cannot understand shift-JIS."; +#endif + + assert( strcmp( ptr, "I cannot understand shift-JIS.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_34_utf8.c b/libraries/mcpp/test-c/m_34_utf8.c new file mode 100644 index 000000000..57f96fa4b --- /dev/null +++ b/libraries/mcpp/test-c/m_34_utf8.c @@ -0,0 +1,26 @@ +/* m_34_utf8.c: Multi-byte character constant encoded in UTF-8. */ + +#include "defs.h" + +main( void) +{ + char * ptr; + + fputs( "started\n", stderr); + +/* 34.1: */ + +#pragma __setlocale( "utf8") /* For MCPP */ +#pragma setlocale( "utf8") /* For MCPP on VC */ + +#if '字' == '\xe5\xad\x97' + ptr = "Multi-byte character is encoded in UTF-8."; +#else + ptr = "I cannot understand UTF-8."; +#endif + + assert( strcmp( ptr, "I cannot understand UTF-8.") != 0); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_36_big5.c b/libraries/mcpp/test-c/m_36_big5.c new file mode 100644 index 000000000..bfb85b0c9 --- /dev/null +++ b/libraries/mcpp/test-c/m_36_big5.c @@ -0,0 +1,29 @@ +/* m_36_big5.c: Handling of '\\' in BigFive multi-byte character. */ + +#include "defs.h" + +#define str( a) # a + +main( void) +{ + fputs( "started\n", stdout); + +/* 36.1: 0x5c in multi-byte character is not an escape character */ + +#pragma __setlocale( "big5") /* For MCPP */ +#pragma setlocale( "chinese-traditional") /* For Visual C */ + +#if 'r' == '\xa6\x72' && '\' != '\xa5\x5c' + fputs( "Bad handling of '\\' in multi-byte character", stdout); + exit( 1); +#endif + +/* 36.2: # operater should not insert '\\' before 0x5c in multi-byte + character */ + assert( strcmp( str( "\Z"), "\"\Z\"") == 0); + fputs( "\Z" "\"\Z\"\n", stdout); + + fputs( "success\n", stdout); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_36_jis.c b/libraries/mcpp/test-c/m_36_jis.c new file mode 100644 index 000000000..8a941690d --- /dev/null +++ b/libraries/mcpp/test-c/m_36_jis.c @@ -0,0 +1,33 @@ +/* m_36_jis.c: Handling of '\\' in ISO-2022-JP multi--byte character. */ + +#include "defs.h" + +#define str( a) # a + +main( void) +{ + fputs( "started\n", stdout); + +/* 36.1: 0x5c in multi-byte character is not an escape character */ + +#pragma __setlocale( "jis") /* For MCPP */ +#pragma setlocale( "jis") /* For MCPP on VC */ + +#if '$B;z(B' == '\x3b\x7a' && '$B0\(B' != '\x30\x5c' + fputs( "Bad handling of '\\' in multi-byte character", stdout); + exit( 1); +#endif + +/* 36.2: # operater should not insert '\\' before 0x5c, 0x22 or 0x27 + in multi-byte character */ + assert( strcmp( str( "$B0\F0(B"), "\"$B0\F0(B\"") == 0); + assert( strcmp( str( "$B1"M[(B"), "\"$B1"M[(B\"") == 0); + assert( strcmp( str( "$B1'Ch(B"), "\"$B1'Ch(B\"") == 0); + + fputs( "$B0\F0(B" "\"$B0\F0(B\"\n", stdout); + fputs( "$B1"M[(B" "\"$B1"M[(B\"\n", stdout); + fputs( "$B1'Ch(B" "\"$B1'Ch(B\"\n", stdout); + fputs( "success\n", stdout); + return 0; +} + diff --git a/libraries/mcpp/test-c/m_36_sjis.c b/libraries/mcpp/test-c/m_36_sjis.c new file mode 100644 index 000000000..4f67a3336 --- /dev/null +++ b/libraries/mcpp/test-c/m_36_sjis.c @@ -0,0 +1,29 @@ +/* m_36_sjis.c: Handling of '\\' in shift-JIS multi-byte character. */ + +#include "defs.h" + +#define str( a) # a + +main( void) +{ + fputs( "started\n", stdout); + +/* 36.1: 0x5c in multi-byte character is not an escape character */ + +#pragma __setlocale( "sjis") /* For MCPP */ +#pragma setlocale( "japanese") /* For Visual C */ + +#if '' == '\x8e\x9a' && '\' != '\x95\x5c' + fputs( "Bad handling of '\\' in multi-byte character", stdout); + exit( 1); +#endif + +/* 36.2: # operater should not insert '\\' before 0x5c in multi-byte + character */ + assert( strcmp( str( "\"), "\"\\"") == 0); + fputs( "\" "\"\\"\n", stdout); + + fputs( "success\n", stdout); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_1.c b/libraries/mcpp/test-c/n_1.c new file mode 100644 index 000000000..009fea45e --- /dev/null +++ b/libraries/mcpp/test-c/n_1.c @@ -0,0 +1,28 @@ +/* n_1.c: Conversion of trigraph sequences. */ + +#include "defs.h" + +char quasi_trigraph[] = { '?', '?', ' ', '?', '?', '?', ' ', '?', '?', '%', + ' ', '?', '?', '^', ' ', '?', '#', '\0' }; + +main( void) +{ + int ab = 1, cd = 2; + + fputs( "started\n", stderr); + +/* 1.1: The following 9 sequences are valid trigraph sequences. */ + assert( strcmp( "??( ??) ??/??/ ??' ??< ??> ??! ??- ??=" + ,"[ ] \\ ^ { } | ~ #") == 0); + +/* 1.2: In directive line. */ +??= define OR( a, b) a ??! b + assert( OR( ab, cd) == 3); + +/* 1.3: Any sequence other than above 9 is not a trigraph sequence. */ + assert( strcmp( "?? ??? ??% ??^ ???=", quasi_trigraph) == 0); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_10.c b/libraries/mcpp/test-c/n_10.c new file mode 100644 index 000000000..e0025aeea --- /dev/null +++ b/libraries/mcpp/test-c/n_10.c @@ -0,0 +1,36 @@ +/* n_10.c: #if, #elif, #else and #endif pp-directive. */ + +#include "defs.h" + +#define MACRO_0 0 +#define MACRO_1 1 + +main( void) +{ + fputs( "started\n", stderr); + +/* 10.1: */ +/* Note: an undefined identifier in #if expression is replaced to 0. */ +#if a + assert( a); +#elif MACRO_0 + assert( MACRO_0); +#elif MACRO_1 /* Valid block */ + assert( MACRO_1); +#else + assert( 0); +#endif + +/* 10.2: Comments must be processed even if in skipped #if block. */ +/* At least tokenization of string literal and character constant is necessary + to process comments, e.g. /* is not a comment mark in string literal. + */ +#ifdef UNDEFINED + /* Comment */ + "in literal /* is not a comment" +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_11.c b/libraries/mcpp/test-c/n_11.c new file mode 100644 index 000000000..640d08243 --- /dev/null +++ b/libraries/mcpp/test-c/n_11.c @@ -0,0 +1,40 @@ +/* n_11.c: Operator "defined" in #if or #elif directive. */ + +#include "defs.h" + +#define MACRO_abc abc +#define MACRO_0 0 +#define ZERO_TOKEN + +main( void) +{ + int abc = 1, a = 0; + + fputs( "started\n", stderr); + +/* 11.1: */ +#if defined a + assert( a); +#else + assert( MACRO_abc); +#endif +#if defined (MACRO_abc) + assert( MACRO_abc); +#else + assert( a); +#endif + +/* 11.2: "defined" is an unary operator whose result is 1 or 0. */ +#if defined MACRO_0 * 3 != 3 + fputs( "Bad handling of defined operator.\n", stderr); + exit( 1); +#endif +#if (!defined ZERO_TOKEN != 0) || (-defined ZERO_TOKEN != -1) + fputs( "Bad grouping of defined, -, ! in #if expression.\n", stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_12.c b/libraries/mcpp/test-c/n_12.c new file mode 100644 index 000000000..c89331a42 --- /dev/null +++ b/libraries/mcpp/test-c/n_12.c @@ -0,0 +1,59 @@ +/* n_12.c: Integer preprocessing number token and type of #if expression. */ + +#include "defs.h" +#include + +main( void) +{ + fputs( "started\n", stderr); + +/* 12.1: */ +#if LONG_MAX <= LONG_MIN + fputs( "Bad evaluation of long.\n", stderr); + exit( 1); +#endif +#if LONG_MAX <= 1073741823 /* 0x3FFFFFFF */ + fputs( "Bad evaluation of long.\n", stderr); + exit( 1); +#endif + +/* 12.2: */ +#if ULONG_MAX / 2 < LONG_MAX + fputs( "Bad evaluation of unsigned long.\n", stderr); + exit( 1); +#endif + +/* 12.3: Octal number. */ +#if 0177777 != 65535 + fputs( "Bad evaluation of octal number.\n", stderr); + exit( 1); +#endif + +/* 12.4: Hexadecimal number. */ +#if 0Xffff != 65535 || 0xFfFf != 65535 + fputs( "Bad evaluation of hexadecimal number.\n", stderr); + exit( 1); +#endif + +/* 12.5: Suffix 'L' or 'l'. */ +#if 0L != 0 || 0l != 0 + fputs( "Bad evaluation of 'L' suffix.\n", stderr); + exit( 1); +#endif + +/* 12.6: Suffix 'U' or 'u'. */ +#if 1U != 1 || 1u != 1 + fputs( "Bad evaluation of 'U' suffix.\n", stderr); + exit( 1); +#endif + +/* 12.7: Negative integer. */ +#if 0 <= -1 + fputs( "Bad evaluation of negative number.\n", stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_13.c b/libraries/mcpp/test-c/n_13.c new file mode 100644 index 000000000..79c793a55 --- /dev/null +++ b/libraries/mcpp/test-c/n_13.c @@ -0,0 +1,51 @@ +/* n_13.c: Valid operators in #if expression. */ + +/* Valid operators are (precedence in this order) : + defined, (unary)+, (unary)-, ~, !, + *, /, %, + +, -, + <<, >>, + <, >, <=, >=, + ==, !=, + &, + ^, + |, + &&, + ||, + ? : + */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* 13.1: Bit shift. */ +#if 1 << 2 != 4 || 8 >> 1 != 4 + fputs( "Bad arithmetic of <<, >> operators.\n", stderr); + exit( 1); +#endif + +/* 13.2: Bitwise operators. */ +#if (3 ^ 5) != 6 || (3 | 5) != 7 || (3 & 5) != 1 + fputs( "Bad arithmetic of ^, |, & operators.\n", stderr); + exit( 1); +#endif + +/* 13.3: Result of ||, && operators is either of 1 or 0. */ +#if (2 || 3) != 1 || (2 && 3) != 1 || (0 || 4) != 1 || (0 && 5) != 0 + fputs( "Bad arithmetic of ||, && operators.\n", stderr); + exit( 1); +#endif + +/* 13.4: ?, : operator. */ +#if (0 ? 1 : 2) != 2 + fputs( "Bad arithmetic of ?: operator.\n", stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_13_13.c b/libraries/mcpp/test-c/n_13_13.c new file mode 100644 index 000000000..923481091 --- /dev/null +++ b/libraries/mcpp/test-c/n_13_13.c @@ -0,0 +1,39 @@ +/* n_13_13.c: #if expression with macros. */ + +#include "defs.h" +#define ZERO_TOKEN +#define MACRO_0 0 +#define MACRO_1 1 +#define and && +#define or || +#define not_eq != +#define bitor | + +main( void) +{ + fputs( "started\n", stderr); + +/* 13.13: With macros expanding to operators. */ +#if (1 bitor 2) == 3 and 4 not_eq 5 or 0 + /* #if (1 | 2) == 3 && 4 != 5 || 0 */ +#else + fputs( + "Bad evaluation of macros expanding to operators in #if expression.\n" + , stderr); + exit( 1); +#endif + +/* 13.14: With macros expanding to 0 token, nonsence but legal. */ +#if ZERO_TOKEN MACRO_1 ZERO_TOKEN > ZERO_TOKEN MACRO_0 ZERO_TOKEN + /* #if 1 > 0 */ +#else + fputs( + "Bad evaluation of macros expanding to 0 token in #if expression.\n" + , stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_13_5.c b/libraries/mcpp/test-c/n_13_5.c new file mode 100644 index 000000000..2336b69d9 --- /dev/null +++ b/libraries/mcpp/test-c/n_13_5.c @@ -0,0 +1,36 @@ +/* n_13_5.c: Arithmetic conversion in #if expressions. */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* 13.5: The usual arithmetic conversion is not performed on bit shift. */ +#if -1 << 3U > 0 + fputs( "Bad conversion of bit shift operands.\n", stderr); + exit( 1); +#endif + +/* 13.6: Usual arithmetic conversions. */ +#if -1 <= 0U /* -1 is converted to unsigned long. */ + fputs( "Bad arithmetic conversion.\n", stderr); + exit( 1); +#endif + +#if -1 * 1U <= 0 + fputs( "Bad arithmetic conversion.\n", stderr); + exit( 1); +#endif + +/* Second and third operands of conditional operator are converted to the + same type, thus -1 is converted to unsigned long. */ +#if (1 ? -1 : 0U) <= 0 + fputs( "Bad arithmetic conversion.\n", stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_13_7.c b/libraries/mcpp/test-c/n_13_7.c new file mode 100644 index 000000000..7313ad00f --- /dev/null +++ b/libraries/mcpp/test-c/n_13_7.c @@ -0,0 +1,31 @@ +/* n_13_7.c: Short-circuit evaluation of #if expression. */ + +#include "defs.h" +#define MACRO_0 0 + +main( void) +{ + fputs( "started\n", stderr); + +/* 13.7: 10/0 or 10/MACRO_0 are never evaluated, "divide by zero" error + cannot occur. */ +#if 0 && 10 / 0 + exit( 1); +#endif +#if not_defined && 10 / not_defined + exit( 1); +#endif +#if MACRO_0 && 10 / MACRO_0 > 1 + exit( 1); +#endif +#if MACRO_0 ? 10 / MACRO_0 : 0 + exit( 1); +#endif +#if MACRO_0 == 0 || 10 / MACRO_0 > 1 /* Valid block */ + fputs( "success\n", stderr); + return 0; +#else + exit( 1); +#endif +} + diff --git a/libraries/mcpp/test-c/n_13_8.c b/libraries/mcpp/test-c/n_13_8.c new file mode 100644 index 000000000..e25782710 --- /dev/null +++ b/libraries/mcpp/test-c/n_13_8.c @@ -0,0 +1,46 @@ +/* n_13_8.c: Grouping of sub-expressions in #if expression. */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* 13.8: Unary operators are grouped from right to left. */ +#if (- -1 != 1) || (!!9 != 1) || (-!+!9 != -1) || (~~1 != 1) + fputs( "Bad grouping of -, +, !, ~ in #if expression.\n", stderr); + exit( 1); +#endif + +/* 13.9: ?: operators are grouped from right to left. */ +#if (1 ? 2 ? 3 ? 3 : 2 : 1 : 0) != 3 + fputs( "Bad grouping of ? : in #if expression.\n", stderr); + exit( 1); +#endif + +/* 13.10: Other operators are grouped from left to right. */ +#if (15 >> 2 >> 1 != 1) || (3 << 2 << 1 != 24) + fputs( "Bad grouping of >>, << in #if expression.\n", stderr); + exit( 1); +#endif + +/* 13.11: Test of precedence. */ +#if 3*10/2 >> !0*2 >> !+!-9 != 1 + fputs( "Bad grouping of -, +, !, *, /, >> in #if expression.\n", stderr); + exit( 1); +#endif + +/* 13.12: Overall test. Grouped as: + ((((((+1 - -1 - ~~1 - -!0) & 6) | ((8 % 9) ^ (-2 * -2))) >> 1) == 7) + ? 7 : 0) != 7 + evaluated to FALSE. + */ +#if (((+1- -1-~~1- -!0&6|8%9^-2*-2)>>1)==7?7:0)!=7 + fputs( "Bad arithmetic of #if expression.\n", stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_15.c b/libraries/mcpp/test-c/n_15.c new file mode 100644 index 000000000..93aa5d83f --- /dev/null +++ b/libraries/mcpp/test-c/n_15.c @@ -0,0 +1,29 @@ +/* n_15.c: #ifdef, #ifndef directives. */ + +#include "defs.h" + +#define MACRO_0 0 +#define MACRO_1 1 + +main( void) +{ + fputs( "started\n", stderr); + +/* 15.1: #ifdef directive. */ +#ifdef MACRO_1 /* Valid block */ + assert( MACRO_1); +#else + assert( MACRO_0); +#endif + +/* 15.2: #ifndef directive. */ +#ifndef MACRO_1 + assert( MACRO_0); +#else /* Valid block */ + assert( MACRO_1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_18.c b/libraries/mcpp/test-c/n_18.c new file mode 100644 index 000000000..8d5d85012 --- /dev/null +++ b/libraries/mcpp/test-c/n_18.c @@ -0,0 +1,33 @@ +/* n_18.c: #define directive. */ + +#include "defs.h" + +main( void) +{ + int c = 3; + +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + + fputs( "started\n", stderr); + +/* 18.1: Definition of an object-like macro. */ + assert( OBJ_LIKE == 0); +#define ZERO_TOKEN +#ifndef ZERO_TOKEN + fputs( "Can't define macro to 0-token.\n", stderr); + exit( 1); +#endif + +/* 18.2: Definition of a function-like macro. */ + assert( FTN_LIKE( c) == 3); + +/* 18.3: Spelling in string identical to parameter is not a parameter. */ +#define STR( n1, n2) "n1:n2" + assert( strcmp( STR( 1, 2), "n1:n2") == 0); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_19.c b/libraries/mcpp/test-c/n_19.c new file mode 100644 index 000000000..1ac22284c --- /dev/null +++ b/libraries/mcpp/test-c/n_19.c @@ -0,0 +1,27 @@ +/* n_19.c: Valid re-definitions of macros. */ + +#include "defs.h" + +main( void) +{ + int c = 1; + + fputs( "started\n", stderr); + +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* 19.1: */ +#define OBJ_LIKE /* white space */ (1-1) /* other */ + +/* 19.2: */ +#define FTN_LIKE( a )( /* note the white space */ \ + a /* other stuff on this line + */ ) + assert( FTN_LIKE( c) == 1); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_2.c b/libraries/mcpp/test-c/n_2.c new file mode 100644 index 000000000..dc7ea1918 --- /dev/null +++ b/libraries/mcpp/test-c/n_2.c @@ -0,0 +1,41 @@ +/* n_2.c: Line splicing by sequence. */ + +#include "defs.h" + +main( void) +{ + int ab = 1, cd = 2, ef = 3, abcde = 5; + + fputs( "started\n", stderr); + +/* 2.1: In a #define directive line, between the parameter list and the + replacement text. */ +#define FUNC( a, b, c) \ + a + b + c + assert( FUNC( ab, cd, ef) == 6); + +/* 2.2: In a #define directive line, among the parameter list and among the + replacement text. */ +#undef FUNC +#define FUNC( a, b \ + , c) \ + a + b \ + + c + assert (FUNC( ab, cd, ef) == 6); + +/* 2.3: In a string literal. */ + assert (strcmp( "abc\ +de", "abcde") == 0); + +/* 2.4: in midst of an identifier. */ + assert( abc\ +de == 5); + +/* 2.5: by trigraph. */ + assert( abc??/ +de == 5); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_20.c b/libraries/mcpp/test-c/n_20.c new file mode 100644 index 000000000..6a1ae4ba6 --- /dev/null +++ b/libraries/mcpp/test-c/n_20.c @@ -0,0 +1,19 @@ +/* n_20.c: Macro lexically identical to keyword. */ + +#include "defs.h" + +main( void) +{ + +/* 20.1: */ +#define float double + float fl; + + fputs( "started\n", stderr); + + assert( sizeof fl == sizeof (double)); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_21.c b/libraries/mcpp/test-c/n_21.c new file mode 100644 index 000000000..218cb6bf1 --- /dev/null +++ b/libraries/mcpp/test-c/n_21.c @@ -0,0 +1,24 @@ +/* n_21.c: Tokenization (No preprocessing tokens are merged implicitly). */ + +#include "defs.h" + +main( void) +{ + int a = 1, x = 2, y = -3; + + fputs( "started\n", stderr); + +/* 21.1: */ +#define MINUS - + assert( -MINUS-a == -1); + +/* 21.2: */ +#define sub( a, b) a-b /* '(a)-(b)' is better */ +#define Y -y /* '(-y)' is better */ +/* x- -y */ + assert( sub( x, Y) == -1); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_22.c b/libraries/mcpp/test-c/n_22.c new file mode 100644 index 000000000..33f24df15 --- /dev/null +++ b/libraries/mcpp/test-c/n_22.c @@ -0,0 +1,26 @@ +/* n_22.c: Tokenization of preprocessing number. */ + +#include "defs.h" + +#define str( a) # a +#define xstr( a) str( a) +#define EXP 1 + +main( void) +{ + fputs( "started\n", stderr); + +/* 22.1: 12E+EXP is a preprocessing number, EXP is not expanded. */ + assert( strcmp( xstr( 12E+EXP), "12E+EXP") == 0); + +/* 22.2: .2e-EXP is also a preprocessing number. */ + assert( strcmp( xstr( .2e-EXP), ".2e-EXP") == 0); + +/* 22.3: + or - is allowed only following E or e, 12+EXP is not a + preprocessing number. */ + assert( strcmp( xstr( 12+EXP), "12+1") == 0); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_23.c b/libraries/mcpp/test-c/n_23.c new file mode 100644 index 000000000..4f4e8060d --- /dev/null +++ b/libraries/mcpp/test-c/n_23.c @@ -0,0 +1,26 @@ +/* n_23.c: ## operator in macro definition. */ + +#include "defs.h" + +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) +#define MACRO_0 0 +#define MACRO_1 1 + +main( void) +{ + int xy = 1; + + fputs( "started\n", stderr); + +/* 23.1: */ + assert( glue( x, y) == 1); + +/* 23.2: Generate a preprocessing number. */ +#define EXP 2 + assert( xglue( .12e+, EXP) == 12.0); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_24.c b/libraries/mcpp/test-c/n_24.c new file mode 100644 index 000000000..cfc7d630b --- /dev/null +++ b/libraries/mcpp/test-c/n_24.c @@ -0,0 +1,36 @@ +/* n_24.c: # operator in macro definition. */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* 24.1: */ +#define str( a) # a + assert( strcmp( str( a+b), "a+b") == 0); + +/* 24.2: White spaces between tokens of operand are converted to one space. + */ + assert( strcmp( str( ab /* comment */ + + cd ), "ab + cd") == 0); + +/* 24.3: \ is inserted before \ and " in or surrounding literals and no + other character is inserted to anywhere. */ + assert( strcmp( str( '"' + "' \""), "'\"' + \"' \\\"\"") == 0); + +/* 24.4: Line splicing by is done prior to token + parsing. */ + assert( strcmp( str( "ab\ +c"), "\"abc\"") == 0); + +/* 24.5: Token separator inserted by macro expansion should be removed. + (Meanwhile, tokens should not be merged. See 21.2.) */ +#define xstr( a) str( a) +#define f(a) a + assert( strcmp( xstr( x-f(y)), "x-y") == 0); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_25.c b/libraries/mcpp/test-c/n_25.c new file mode 100644 index 000000000..449d9dbd1 --- /dev/null +++ b/libraries/mcpp/test-c/n_25.c @@ -0,0 +1,42 @@ +/* n_25.c: Macro arguments are pre-expanded (unless the argument is an + operand of # or ## operator) separately, that is, are macro-replaced + completely prior to rescanning. */ + +#include "defs.h" + +#define ZERO_TOKEN +#define MACRO_0 0 +#define MACRO_1 1 +#define TWO_ARGS a,b +#define sub( x, y) (x - y) +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) +#define str( a) # a + +main( void) +{ + int a = 1, b = 2, abc = 3, MACRO_0MACRO_1 = 2; + + fputs( "started\n", stderr); + +/* 25.1: "TWO_ARGS" is read as one argument to "sub", then expanded to + "a,b", then "x" is substituted by "a,b". */ + assert( sub( TWO_ARGS, 1) == 1); + +/* 25.2: An argument pre-expanded to 0-token. */ +/* ( - 1); */ + assert( sub( ZERO_TOKEN, a) == -1); + +/* 25.3: "glue( a, b)" is pre-expanded. */ + assert( xglue( glue( a, b), c) == 3); + +/* 25.4: Operands of ## operator are not pre-expanded. */ + assert( glue( MACRO_0, MACRO_1) == 2); + +/* 25.5: Operand of # operator is not pre-expanded. */ + assert( strcmp( str( ZERO_TOKEN), "ZERO_TOKEN") == 0); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_26.c b/libraries/mcpp/test-c/n_26.c new file mode 100644 index 000000000..6d7d16564 --- /dev/null +++ b/libraries/mcpp/test-c/n_26.c @@ -0,0 +1,56 @@ +/* n_26.c: The name once replaced is not furthur replaced. */ + +#include "defs.h" + +int f( a) + int a; +{ + return a; +} + +int g( a) + int a; +{ + return a * 2; +} + +main( void) +{ + int x = 1; + int AB = 1; + int Z[1]; + + fputs( "started\n", stderr); + + Z[0] = 1; + +/* 26.1: Directly recursive object-like macro definition. */ +/* Z[0]; */ +#define Z Z[0] + assert( Z == 1); + +/* 26.2: Intermediately recursive object-like macro definition. */ +/* AB; */ +#define AB BA +#define BA AB + assert( AB == 1); + +/* 26.3: Directly recursive function-like macro definition. */ +/* x + f(x); */ +#define f(a) a + f(a) + assert( f( x) == 2); + +/* 26.4: Intermediately recursive function-like macro definition. */ +/* x + x + g( x); */ +#define g(a) a + h( a) +#define h(a) a + g( a) + assert( g( x) == 4); + +/* 26.5: Rescanning encounters the non-replaced macro name. */ +/* Z[0] + f( Z[0]); */ + assert( f( Z) == 2); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_27.c b/libraries/mcpp/test-c/n_27.c new file mode 100644 index 000000000..bc5dc7d6f --- /dev/null +++ b/libraries/mcpp/test-c/n_27.c @@ -0,0 +1,61 @@ +/* n_27.c: Rescanning of a macro replace any macro call in the replacement + text after substitution of parameters by pre-expanded-arguments. This + re-examination may involve the succeding sequences from the source + file (what a queer thing!). */ + +#include "defs.h" + +main( void) +{ + int a = 1, b = 2, c, m = 1, n = 2; + + fputs( "started\n", stderr); + +/* 27.1: Cascaded use of object-like macros. */ +/* 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8; */ +#define NEST8 NEST7 + 8 +#define NEST7 NEST6 + 7 +#define NEST6 NEST5 + 6 +#define NEST5 NEST4 + 5 +#define NEST4 NEST3 + 4 +#define NEST3 NEST2 + 3 +#define NEST2 NEST1 + 2 +#define NEST1 1 + assert( NEST8 == 36); + +/* 27.2: Cascaded use of function-like macros. */ +/* (1) + (1 + 2) + 1 + 2 + 1 + 2 + 3 + 1 + 2 + 3 + 4; */ +#define FUNC4( a, b) FUNC3( a, b) + NEST4 +#define FUNC3( a, b) FUNC2( a, b) + NEST3 +#define FUNC2( a, b) FUNC1( a, b) + NEST2 +#define FUNC1( a, b) (a) + (b) + assert( FUNC4( NEST1, NEST2) == 23); + +/* 27.3: An identifier generated by ## operator is subject to expansion. */ +#define glue( a, b) a ## b +#define MACRO_1 1 + assert( glue( MACRO_, 1) == 1); + +#define sub( x, y) (x - y) +#define head sub( +#define math( op, a, b) op( (a), (b)) + +/* 27.4: 'sub' as an argument of math() is not pre-expanded, since '(' is + missing. */ + assert( math( sub, a, b) == -1); + +/* 27.5: Queer thing. */ + c = head a,b ); + assert( c == -1); + +/* 27.6: Recursive macro (the 2nd 'm' is expanded to 'n' since it is in + source file). */ +#define m n +#define n( a) a + c = m( m); + assert( c == 2); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_28.c b/libraries/mcpp/test-c/n_28.c new file mode 100644 index 000000000..43cf20509 --- /dev/null +++ b/libraries/mcpp/test-c/n_28.c @@ -0,0 +1,40 @@ +/* n_28.c: __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ and + __STDC_VERSION__ are predefined. */ + +#include "defs.h" + +main( void) +{ + char * date = __DATE__; + char * fname = __FILE__; + + fputs( "started\n", stderr); + +/* 28.1: */ +/* Remove directory part (if any). */ + fname += strlen( fname) - 6; + assert( strcmp( fname, "n_28.c") == 0); + +/* 28.2: */ + assert( __LINE__ == 19); + +/* 28.3: */ + assert( strlen( __DATE__) == 11); + assert( date[ 4] != '0'); + +/* 28.4: */ + assert( strlen( __TIME__) == 8); + +/* 28.5: */ + assert( __STDC__); + +/* 28.6: */ + assert( __STDC_VERSION__); + +/* 28.7: */ +#include "line.h" + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_29.c b/libraries/mcpp/test-c/n_29.c new file mode 100644 index 000000000..bceca1899 --- /dev/null +++ b/libraries/mcpp/test-c/n_29.c @@ -0,0 +1,22 @@ +/* n_29.c: #undef directive. */ + +#include "defs.h" + +main( void) +{ + int DEFINED = 1; + + fputs( "started\n", stderr); + +/* 29.1: Undefined macro is not a macro. */ +#define DEFINED +#undef DEFINED + assert( DEFINED == 1); + +/* 29.2: Undefining undefined name is not an error. */ +#undef UNDEFINED + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_3.c b/libraries/mcpp/test-c/n_3.c new file mode 100644 index 000000000..dc650ea00 --- /dev/null +++ b/libraries/mcpp/test-c/n_3.c @@ -0,0 +1,35 @@ +/* n_3.c: Handling of comment. */ + +#include "defs.h" + +#define str( a) # a + +main( void) +{ + int abcd = 4; + + fputs( "started\n", stderr); + +/* 3.1: A comment is converted to one space. */ + assert( strcmp( str( abc/* comment */de), "abc de") == 0); + +/* 3.2: // is not a comment of C. */ +/* assert( strcmp( str( //), "//") == 0); */ + +/* 3.3: Comment is parsed prior to the parsing of preprocessing directive. */ +#if 0 + "nonsence"; /* +#else + still in + comment */ +#else +#define MACRO_abcd /* + in comment + */ abcd +#endif + assert( MACRO_abcd == 4); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_30.c b/libraries/mcpp/test-c/n_30.c new file mode 100644 index 000000000..9e5558157 --- /dev/null +++ b/libraries/mcpp/test-c/n_30.c @@ -0,0 +1,33 @@ +/* n_30.c: Macro calls. */ +/* Note: Comma separate the arguments of function-like macro call, + but comma between matching inner parenthesis doesn't. This feature + is tested on so many places in this suite especially on *.c samples + which use assert() macro, that no separete item to test this feature + is provided. */ + +#include "defs.h" + +#define FUNC( a, b, c) a + b + c + +main( void) +{ + int a = 1, b = 2, c = 3; + + fputs( "started\n", stderr); + +/* 30.1: A macro call crossing lines. */ + assert + ( + FUNC + ( + a, + b, + c + ) + == 6 + ); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_32.c b/libraries/mcpp/test-c/n_32.c new file mode 100644 index 000000000..94af9855a --- /dev/null +++ b/libraries/mcpp/test-c/n_32.c @@ -0,0 +1,24 @@ +/* n_32.c: Escape sequence in character constant in #if expression. */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* 32.1: Character octal escape sequence. */ +#if '\123' != 83 + fputs( "Bad evaluation of octal escape sequence.\n", stderr); + exit( 1); +#endif + +/* 32.2: Character hexadecimal escape sequence. */ +#if '\x1b' != '\033' + fputs( "Bad evaluation of hexadecimal escape sequence.\n", stderr); + exit( 1); +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_37.c b/libraries/mcpp/test-c/n_37.c new file mode 100644 index 000000000..454c58816 --- /dev/null +++ b/libraries/mcpp/test-c/n_37.c @@ -0,0 +1,108 @@ +/* n_37.c: Translation limits. */ + +#include "defs.h" + +/* 37.1: Number of parameters in macro: at least 31. */ +#define glue31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E) \ + a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p##q##r##s##t##u##v##w##x##y##z##A##B##C##D##E + +main( void) +{ + int ABCDEFGHIJKLMNOPQRSTUVWXYZabcde = 31; + int ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_ = 30; + int nest = 0; + + fputs( "started\n", stderr); + +/* 37.2: Number of arguments in macro call: at least 31. */ + assert( + glue31( A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R + , S, T, U, V, W, X, Y, Z, a, b, c, d, e) + == 31); + +/* 37.3: Significant initial characters in an internal identifier or a + macro name: at least 31. */ + assert( ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_ == 30); + +/* 37.4: Nested conditional inclusion: at least 8 levels. */ + nest = 0; +#ifdef A +#else +# ifdef B +# else +# ifdef C +# else +# ifdef D +# else +# ifdef E +# else +# ifdef F +# else +# ifdef G +# else +# ifdef H +# else + nest = 8; +# endif +# endif +# endif +# endif +# endif +# endif +# endif +#endif + assert( nest == 8); + +/* 37.5: Nested source file inclusion: at least 8 levels. */ + nest = 0; +#include "nest1.h" + assert( nest == 8); + +/* 37.6: Parenthesized expression: at least 32 levels. */ +#if 0 + (1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + (9 - (10 + (11 - (12 + \ + (13 - (14 + (15 - (16 + (17 - (18 + (19 - (20 + (21 - (22 + (23 - \ + (24 + (25 - (26 + (27 - (28 + (29 - (30 + (31 - (32 + 0)))))))))) \ + )))))))))))))))))))))) == 0 + nest = 32; +#endif + assert( nest == 32); + +/* 37.7: Characters in a string (after concatenation): at least 509. */ + { + char * extremely_long_string1 = +"123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +012345678901234567" + ; + assert( strlen( extremely_long_string1) == 507); + } + +/* 37.8: Characters in a logical source line: at least 509. */ + { + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int A123456789012345678901234567890 = 123456; \ + int B123456789012345678901234567890 = 123457; \ + int C123456789012345678901234567890 = 123458; \ + int D1234567890123456789012 = 123459; + assert( a123456789012345678901234567890 == 123450 + && D1234567890123456789012 == 123459); + } + +/* 37.9: Macro definitions: at least 1024. */ +#include "m1024.h" + assert( ZX); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_3_4.c b/libraries/mcpp/test-c/n_3_4.c new file mode 100644 index 000000000..37577605d --- /dev/null +++ b/libraries/mcpp/test-c/n_3_4.c @@ -0,0 +1,8 @@ +/* n_3_4.c: Handling of comment and . */ + +/* 3.4: Comment and in #error line. */ +#error Message of first physical line. \ + Message of second physical and first logical line. /* + this comment splices the lines + */ Message of forth physical and third logical line. + diff --git a/libraries/mcpp/test-c/n_4.c b/libraries/mcpp/test-c/n_4.c new file mode 100644 index 000000000..8b57677f4 --- /dev/null +++ b/libraries/mcpp/test-c/n_4.c @@ -0,0 +1,20 @@ +/* n_4.c: Special tokens. */ + +#include "defs.h" + +main( void) +{ +/* 4.1: Digraph spellings in directive line. */ +%: define stringize( a) %: a + + fputs( "started\n", stderr); + + assert( strcmp( stringize( abc), "abc") == 0); + +/* 4.2: Digraph spellings are retained in stringization. */ + assert( strcmp( stringize( <:), "<" ":") == 0); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_5.c b/libraries/mcpp/test-c/n_5.c new file mode 100644 index 000000000..e4409cec9 --- /dev/null +++ b/libraries/mcpp/test-c/n_5.c @@ -0,0 +1,20 @@ +/* n_5.c: Spaces or tabs are allowed at any place in pp-directive line, + including between the top of a pp-directive line and '#', and between + the '#' and the directive. */ + +#include "defs.h" + +main( void) +{ + int abcde = 5; +/* |**|[TAB]# |**|[TAB]define |**| MACRO_abcde[TAB]|**| abcde |**| */ +/**/ # /**/ define /**/ MACRO_abcde /**/ abcde /**/ + + fputs( "started\n", stderr); + + assert( MACRO_abcde == 5); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_6.c b/libraries/mcpp/test-c/n_6.c new file mode 100644 index 000000000..ab4bfa010 --- /dev/null +++ b/libraries/mcpp/test-c/n_6.c @@ -0,0 +1,32 @@ +/* n_6.c: #include directive. */ + +#include "defs.h" +/* 6.1: Header-name quoted by " and " as well as by < and > can include + standard headers. */ +/* Note: Standard headers can be included any times. */ +#include "ctype.h" +#include + +main( void) +{ + int abc = 3; + + fputs( "started\n", stderr); + + assert( isalpha( 'a')); + +/* 6.2: Macro is allowed in #include line. */ +#define HEADER "header.h" +#include HEADER + assert( MACRO_abc == 3); + +/* 6.3: With macro nonsence but legal. */ +#undef MACRO_abc +#define ZERO_TOKEN +#include ZERO_TOKEN HEADER ZERO_TOKEN + assert( MACRO_abc == 3); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_7.c b/libraries/mcpp/test-c/n_7.c new file mode 100644 index 000000000..45eff035f --- /dev/null +++ b/libraries/mcpp/test-c/n_7.c @@ -0,0 +1,28 @@ +/* n_7.c: #line directive. */ + +#include "defs.h" + +main( void) +{ + fputs( "started\n", stderr); + +/* 7.1: Line number and filename. */ +#line 1234 "cpp" + assert( __LINE__ == 1234); + assert( strcmp( __FILE__, "cpp") == 0); + +/* 7.2: Filename argument is optional. */ +#line 2345 + assert( __LINE__ == 2345); + assert( strcmp( __FILE__, "cpp") == 0); + +/* 7.3: Argument with macro. */ +#define LINE_AND_FILENAME 1234 "n_7.c" +#line LINE_AND_FILENAME + assert( __LINE__ == 1234); + assert( strcmp( __FILE__, "n_7.c") == 0); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_8.c b/libraries/mcpp/test-c/n_8.c new file mode 100644 index 000000000..8bfb1d8df --- /dev/null +++ b/libraries/mcpp/test-c/n_8.c @@ -0,0 +1,12 @@ +/* n_8.c: #error directive. */ + +/* 8.1: Argument of #error directive is not a subject of macro expansion. + Output to stderr as an example: + Preprocessing error directive: MACRO is not a positive number. + from line 10 of file "n_8.c" + */ +#define MACRO 0 +#if MACRO <= 0 +#error MACRO is not a positive number. +#endif + diff --git a/libraries/mcpp/test-c/n_8_2.c b/libraries/mcpp/test-c/n_8_2.c new file mode 100644 index 000000000..863f10e0e --- /dev/null +++ b/libraries/mcpp/test-c/n_8_2.c @@ -0,0 +1,5 @@ +/* n_8_2.c: Argument of #error is optional. */ + +/* 8.2: #error should be executed. */ +#error + diff --git a/libraries/mcpp/test-c/n_9.c b/libraries/mcpp/test-c/n_9.c new file mode 100644 index 000000000..59265a085 --- /dev/null +++ b/libraries/mcpp/test-c/n_9.c @@ -0,0 +1,16 @@ +/* n_9.c: #pragma directive. */ + +#include "stdio.h" + +/* 9.1: Any #pragma directive should be processed or ignored, should not + be diagnosed as an error. */ +#pragma once +#pragma who knows ? + +main( void) +{ + fputs( "started\n", stderr); + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-c/n_i_.lst b/libraries/mcpp/test-c/n_i_.lst new file mode 100644 index 000000000..cefb8fb37 --- /dev/null +++ b/libraries/mcpp/test-c/n_i_.lst @@ -0,0 +1,35 @@ +n_1 +n_2 +n_3 +n_4 +n_5 +n_6 +n_7 +n_9 +n_10 +n_11 +n_12 +n_13 +n_13_5 +n_13_7 +n_13_8 +n_13_13 +n_15 +n_18 +n_19 +n_20 +n_21 +n_22 +n_23 +n_24 +n_25 +n_26 +n_27 +n_28 +n_29 +n_30 +n_32 +n_37 +i_32_3 +i_35 +i_35_3 diff --git a/libraries/mcpp/test-c/n_std.c b/libraries/mcpp/test-c/n_std.c new file mode 100644 index 000000000..65a00fc0c --- /dev/null +++ b/libraries/mcpp/test-c/n_std.c @@ -0,0 +1,957 @@ +/* + * n_std.c + * + * 1998/08 made public kmatsui + * 2002/08 revised not to conflict with C99 Standard kmatsui + * 2004/10 added a few testcases for macro expansion kmatsui + * + * Samples to test Standard C preprocessing. + * This is a strictly-comforming program. + * Any Standard-comforming translator must translate successfully this + * program. The generated execution program must be executed with the message + * on stdout and no other messages on stderr. + * A translator must process also #error directive properly, which is not + * included here because the directive might cause translator to terminate. + */ + + +#include "defs.h" + +#define ZERO_TOKEN +#define TWO_ARGS a,b +#define MACRO_0 0 +#define MACRO_1 1 +#define sub( x, y) (x - y) +#define str( a) # a +#define xstr( a) str( a) +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) + +void n_1( void); +void n_2( void); +void n_3( void); +void n_4( void); +void n_5( void); +void n_6( void); +void n_7( void); +void n_9( void); +void n_10( void); +void n_11( void); +void n_12( void); +void n_13( void); +void n_13_5( void); +void n_13_7( void); +void n_13_8( void); +void n_13_13( void); +void n_15( void); +void n_18( void); +void n_19( void); +void n_20( void); +void n_21( void); +void n_22( void); +void n_23( void); +void n_24( void); +void n_25( void); +void n_26( void); +void n_27( void); +void n_28( void); +void n_29( void); +void n_30( void); +void n_32( void); +void n_37( void); + +int main( void) +{ + n_1(); + n_2(); + n_3(); + n_4(); + n_5(); + n_6(); + n_7(); + n_9(); + n_10(); + n_11(); + n_12(); + n_13(); + n_13_5(); + n_13_7(); + n_13_8(); + n_13_13(); + n_15(); + n_18(); + n_19(); + n_20(); + n_21(); + n_22(); + n_23(); + n_24(); + n_25(); + n_26(); + n_27(); + n_28(); + n_29(); + n_30(); + n_32(); + n_37(); + puts( ""); + return 0; +} + +char quasi_trigraph[] = { '?', '?', ' ', '?', '?', '?', ' ' + , '?', '?', '%', ' ', '?', '?', '^', ' ', '?', '#', '\0' }; + +void n_1( void) +/* Conversion of trigraph sequences. */ +{ + int ab = 1, cd = 2; + +/* 1.1: The following 9 sequences are valid trigraph sequences. */ + assert( strcmp( "??( ??) ??/??/ ??' ??< ??> ??! ??- ??=" + ,"[ ] \\ ^ { } | ~ #") == 0); + +/* 1.2: In directive line. */ +??= define OR( a, b) a ??! b + assert( OR( ab, cd) == 3); + +/* 1.3: Any sequence other than above 9 is not a trigraph sequence. */ + assert( strcmp( "?? ??? ??% ??^ ???=", quasi_trigraph) == 0); +} + +void n_2( void) +/* Line splicing by sequence. */ +{ + int ab = 1, cd = 2, ef = 3, abcde = 5; + +/* 2.1: In a #define directive line, between the parameter list and the + replacement text. */ +#define FUNC( a, b, c) \ + a + b + c + assert( FUNC( ab, cd, ef) == 6); + +/* 2.2: In a #define directive line, among the parameter list and among the + replacement text. */ +#undef FUNC +#define FUNC( a, b \ + , c) \ + a + b \ + + c + assert (FUNC( ab, cd, ef) == 6); + +/* 2.3: In a string literal. */ + assert (strcmp( "abc\ +de", "abcde") == 0); + +/* 2.4: in midst of an identifier. */ + assert( abc\ +de == 5); + +/* 2.5: by trigraph. */ + assert( abc??/ +de == 5); +} + +void n_3( void) +/* Handling of comment. */ +{ + int abcd = 4; + +/* 3.1: A comment is converted to one space. */ + assert( strcmp( str( abc/* comment */de), "abc de") == 0); + +/* 3.2: // is not a comment of C. */ +/* assert( strcmp( str( //), "//") == 0); */ + +/* 3.3: Comment is parsed prior to the parsing of preprocessing directive. */ +#if 0 + "nonsence"; /* +#else + still in + comment */ +#else +#define MACRO_abcd /* + in comment + */ abcd +#endif + assert( MACRO_abcd == 4); +} + +void n_4( void) +/* Special tokens. */ +{ +/* 4.1: Digraph spellings in directive line. */ +%: define stringize( a) %: a + + assert( strcmp( stringize( abc), "abc") == 0); + +/* 4.2: Digraph spellings are retained in stringization. */ + assert( strcmp( stringize( <:), "<" ":") == 0); +} + +void n_5( void) +/* Spaces or tabs are allowed at any place in pp-directive line, + including between the top of a pp-directive line and '#', and between + the '#' and the directive. */ +{ + int abcde = 5; +/* |**|[TAB]# |**|[TAB]define |**| MACRO_abcde[TAB]|**| abcde |**| */ +/**/ # /**/ define /**/ MACRO_abcde /**/ abcde /**/ + assert( MACRO_abcde == 5); +} + +/* 6.1: Header-name quoted by " and " as well as by < and > can include + standard headers. */ +/* Note: Standard headers can be included any times. */ +#include "ctype.h" +#include + +void n_6( void) +/* #include directive. */ +{ + int abc = 3; + + assert( isalpha( 'a')); + +/* 6.2: Macro is allowed in #include line. */ +#define HEADER "header.h" +#include HEADER + assert( MACRO_abc == 3); + +/* 6.3: With macro nonsence but legal. */ +#undef MACRO_abc +#include ZERO_TOKEN HEADER ZERO_TOKEN + assert( MACRO_abc == 3); +} + +void n_7( void) +/* #line directive. */ +{ +/* 7.1: Line number and filename. */ +#line 1234 "cpp" + assert( __LINE__ == 1234); + assert( strcmp( __FILE__, "cpp") == 0); + +/* 7.2: Filename argument is optional. */ +#line 2345 + assert( __LINE__ == 2345); + assert( strcmp( __FILE__, "cpp") == 0); + +/* 7.3: Argument with macro. */ +#define LINE_AND_FILENAME 1234 "n_7.c" +#line LINE_AND_FILENAME + assert( __LINE__ == 1234); + assert( strcmp( __FILE__, "n_7.c") == 0); +} + +/* Restore to correct line number and filename. */ +#line 248 "n_std.c" + +void n_9( void) +/* #pragma directive. */ +{ +/* 9.1: Any #pragma directive should be processed or ignored, should not + be diagnosed as an error. */ +#pragma once +#pragma who knows ? +} + +void n_10( void) +/* #if, #elif, #else and #endif pp-directive. */ +{ +/* 10.1: */ +/* Note: an undefined identifier in #if expression is replaced to 0. */ +#if a + assert( a); +#elif MACRO_0 + assert( MACRO_0); +#elif MACRO_1 /* Valid block */ + assert( MACRO_1); +#else + assert( 0); +#endif + +/* 10.2: Comments must be processed even if in skipped #if block. */ +/* At least tokenization of string literal and character constant is necessary + to process comments, e.g. /* is not a comment mark in string literal. + */ +#ifdef UNDEFINED + /* Comment */ + "in literal /* is not a comment" +#endif +} + +void n_11( void) +/* Operator "defined" in #if or #elif directive. */ +{ + int abc = 1, a = 0; + +/* 11.1: */ +#undef MACRO_abc +#define MACRO_abc abc +#if defined a + assert( a); +#else + assert( MACRO_abc); +#endif +#if defined (MACRO_abc) + assert( MACRO_abc); +#else + assert( a); +#endif + +/* 11.2: "defined" is an unary operator whose result is 1 or 0. */ +#if defined MACRO_0 * 3 != 3 + fputs( "Bad handling of defined operator.\n", stderr); +#endif +#if (!defined ZERO_TOKEN != 0) || (-defined ZERO_TOKEN != -1) + fputs( "Bad grouping of defined, -, ! in #if expression.\n", stderr); +#endif +} + +#include + +void n_12( void) +/* Integer preprocessing number token and type of #if expression. */ +{ +/* 12.1: */ +#if LONG_MAX <= LONG_MIN + fputs( "Bad evaluation of long.\n", stderr); +#endif +#if LONG_MAX <= 1073741823 /* 0x3FFFFFFF */ + fputs( "Bad evaluation of long.\n", stderr); +#endif + +/* 12.2: */ +#if ULONG_MAX / 2 < LONG_MAX + fputs( "Bad evaluation of unsigned long.\n", stderr); +#endif + +/* 12.3: Octal number. */ +#if 0177777 != 65535 + fputs( "Bad evaluation of octal number.\n", stderr); +#endif + +/* 12.4: Hexadecimal number. */ +#if 0Xffff != 65535 || 0XFfFf != 65535 + fputs( "Bad evaluation of hexadecimal number.\n", stderr); +#endif + +/* 12.5: Suffix 'L' or 'l'. */ +#if 0L != 0 || 0l != 0 + fputs( "Bad evaluation of 'L' suffix.\n", stderr); +#endif + +/* 12.6: Suffix 'U' or 'u'. */ +#if 1U != 1 || 1u != 1 + fputs( "Bad evaluation of 'U' suffix.\n", stderr); +#endif + +/* 12.7: Negative integer. */ +#if 0 <= -1 + fputs( "Bad evaluation of negative number.\n", stderr); +#endif +} + +void n_13( void) +/* evaluation of #if expressions. */ +/* Valid operators are (precedence in this order) : + defined, (unary)+, (unary)-, ~, !, + *, /, %, + +, -, + <<, >>, + <, >, <=, >=, + ==, !=, + &, + ^, + |, + &&, + ||, + ? : + */ +{ +/* 13.1: Bit shift. */ +#if 1 << 2 != 4 || 8 >> 1 != 4 + fputs( "Bad arithmetic of <<, >> operators.\n", stderr); +#endif + +/* 13.2: Bitwise operators. */ +#if (3 ^ 5) != 6 || (3 | 5) != 7 || (3 & 5) != 1 + fputs( "Bad arithmetic of ^, |, & operators.\n", stderr); +#endif + +/* 13.3: Result of ||, && operators is either of 1 or 0. */ +#if (2 || 3) != 1 || (2 && 3) != 1 || (0 || 4) != 1 || (0 && 5) != 0 + fputs( "Bad arithmetic of ||, && operators.\n", stderr); +#endif + +/* 13.4: ?, : operator. */ +#if (0 ? 1 : 2) != 2 + fputs( "Bad arithmetic of ?: operator.\n", stderr); +#endif +} + +void n_13_5( void) +/* Arithmetic conversion in #if expressions. */ +{ +/* 13.5: The usual arithmetic conversion is not performed on bit shift. */ +#if -1 << 3U > 0 + fputs( "Bad conversion of bit shift operands.\n", stderr); +#endif + +/* 13.6: Usual arithmetic conversions. */ +#if -1 <= 0U /* -1 is converted to unsigned long. */ + fputs( "Bad arithmetic conversion.\n", stderr); +#endif + +#if -1 * 1U <= 0 + fputs( "Bad arithmetic conversion.\n", stderr); +#endif + +/* Second and third operands of conditional operator are converted to the + same type, thus -1 is converted to unsigned long. */ +#if (1 ? -1 : 0U) <= 0 + fputs( "Bad arithmetic conversion.\n", stderr); +#endif +} + +void n_13_7( void) +/* Short-circuit evaluation of #if expression. */ +{ +/* 13.7: 10/0 or 10/MACRO_0 are never evaluated, "divide by zero" error + cannot occur. */ + +#if 0 && 10 / 0 +#endif +#if not_defined && 10 / not_defined +#endif +#if MACRO_0 && 10 / MACRO_0 > 1 +#endif +#if MACRO_0 ? 10 / MACRO_0 : 0 +#endif +#if MACRO_0 == 0 || 10 / MACRO_0 > 1 /* Valid block */ +#else +#endif +} + +void n_13_8( void) +/* Grouping of sub-expressions in #if expression. */ +{ +/* 13.8: Unary operators are grouped from right to left. */ +#if (- -1 != 1) || (!!9 != 1) || (-!+!9 != -1) || (~~1 != 1) + fputs( "Bad grouping of -, +, !, ~ in #if expression.\n", stderr); +#endif + +/* 13.9: ?: operators are grouped from right to left. */ +#if (1 ? 2 ? 3 ? 3 : 2 : 1 : 0) != 3 + fputs( "Bad grouping of ? : in #if expression.\n", stderr); +#endif + +/* 13.10: Other operators are grouped from left to right. */ +#if (15 >> 2 >> 1 != 1) || (3 << 2 << 1 != 24) + fputs( "Bad grouping of >>, << in #if expression.\n", stderr); +#endif + +/* 13.11: Test of precedence. */ +#if 3*10/2 >> !0*2 >> !+!-9 != 1 + fputs( "Bad grouping of -, +, !, *, /, >> in #if expression.\n", stderr); +#endif + +/* 13.12: Overall test. Grouped as: + ((((((+1 - -1 - ~~1 - -!0) & 6) | ((8 % 9) ^ (-2 * -2))) >> 1) == 7) + ? 7 : 0) != 7 + evaluated to FALSE. + */ +#if (((+1- -1-~~1- -!0&6|8%9^-2*-2)>>1)==7?7:0)!=7 + fputs( "Bad arithmetic of #if expression.\n", stderr); +#endif +} + +void n_13_13( void) +/* #if expression with macros. */ +{ +#define and && +#define or || +#define not_eq != +#define bitor | + +/* 13.13: With macros expanding to operators. */ +#if (1 bitor 2) == 3 and 4 not_eq 5 or 0 + /* #if (1 | 2) == 3 && 4 != 5 || 0 */ +#else + fputs( + "Bad evaluation of macros expanding to operators in #if expression.\n" + , stderr); +#endif + +/* 13.14: With macros expanding to 0 token, nonsence but legal. */ +#if ZERO_TOKEN MACRO_1 ZERO_TOKEN > ZERO_TOKEN MACRO_0 ZERO_TOKEN + /* #if 1 > 0 */ +#else + fputs( + "Bad evaluation of macros expanding to 0 token in #if expression.\n" + , stderr); +#endif +} + +void n_15( void) +/* #ifdef, #ifndef directives. */ +{ + +/* 15.1: #ifdef directive. */ +#ifdef MACRO_1 /* Valid block */ + assert( MACRO_1); +#else + assert( MACRO_0); +#endif + +/* 15.2: #ifndef directive. */ +#ifndef MACRO_1 + assert( MACRO_0); +#else /* Valid block */ + assert( MACRO_1); +#endif +} + +void n_18( void) +/* #define directive. */ +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) +{ + int c = 3; + +/* 18.1: Definition of an object-like macro. */ + assert( OBJ_LIKE == 0); +#ifndef ZERO_TOKEN + fputs( "Can't define macro to 0-token.\n", stderr); +#endif + +/* 18.2: Definition of a function-like macro. */ + assert( FTN_LIKE( c) == 3); + +/* 18.3: Spelling in string identical to parameter is not a parameter. */ +#define STR( n1, n2) "n1:n2" + assert( strcmp( STR( 1, 2), "n1:n2") == 0); +} + +void n_19( void) +/* Valid re-definitions of macros. */ +{ + int c = 1; + +/* 19.1: */ +#define OBJ_LIKE /* white space */ (1-1) /* other */ + +/* 19.2: */ +#define FTN_LIKE( a )( /* note the white space */ \ + a /* other stuff on this line + */ ) + assert( FTN_LIKE( c) == 1); +} + +void n_20( void) +/* Macro lexically identical to keyword. */ +{ +/* 20.1: */ +#define float double + float fl; + assert( sizeof fl == sizeof (double)); +} + +void n_21( void) +/* Tokenization (No preprocessing tokens are merged implicitly). */ +{ + int a = 1, x = 2, y = -3; + +/* 21.1: */ +#define MINUS - + assert( -MINUS-a == -1); + +/* 21.2: */ +#undef sub +#define sub( a, b) a-b /* '(a)-(b)' is better */ +#define Y -y /* '(-y)' is better */ +/* x- -y */ + assert( sub( x, Y) == -1); +} + +void n_22( void) +/* Tokenization of preprocessing number. */ +{ +#define EXP 1 + +/* 22.1: 12E+EXP is a preprocessing number, EXP is not expanded. */ + assert( strcmp( xstr( 12E+EXP), "12E+EXP") == 0); + +/* 22.2: .2e-EXP is also a preprocessing number. */ + assert( strcmp( xstr( .2e-EXP), ".2e-EXP") == 0); + +/* 22.3: + or - is allowed only following E or e, 12+EXP is not a + preprocessing number. */ + assert( strcmp( xstr( 12+EXP), "12+1") == 0); +} + +void n_23( void) +/* ## operator in macro definition. */ +{ + int xy = 1; + +/* 23.1: */ + assert( glue( x, y) == 1); + +/* 23.2: Generate a preprocessing number. */ +#undef EXP +#define EXP 2 + assert( xglue( .12e+, EXP) == 12.0); +} + +void n_24( void) +/* # operator in macro definition. */ +{ +/* 24.1: */ + assert( strcmp( str( a+b), "a+b") == 0); + +/* 24.2: White spaces between tokens of operand are converted to one space. + */ + assert( strcmp( str( ab /* comment */ + + cd ), "ab + cd") == 0); + +/* 24.3: \ is inserted before \ and " in or surrounding literals and no + other character is inserted to anywhere. */ + assert( strcmp( str( '"' + "' \""), "'\"' + \"' \\\"\"") == 0); + +/* 24.4: Line splicing by is done prior to token + parsing. */ + assert( strcmp( str( "ab\ +c"), "\"abc\"") == 0); + +/* 24.5: Token separator inserted by macro expansion should be removed. + (Meanwhile, tokens should not be merged. See 21.2.) */ +#define f(a) a + assert( strcmp( xstr( x-f(y)), "x-y") == 0); +} + +void n_25( void) +/* Macro arguments are pre-expanded (unless the argument is an + operand of # or ## operator) separately, that is, are macro-replaced + completely prior to rescanning. */ +{ + int a = 1, b = 2, abc = 3, MACRO_0MACRO_1 = 2; + +#undef sub +#define sub( x, y) (x - y) + +/* 25.1: "TWO_ARGS" is read as one argument to "sub", then expanded to + "a,b", then "x" is substituted by "a,b". */ + assert( sub( TWO_ARGS, 1) == 1); + +/* 25.2: An argument pre-expanded to 0-token. */ + assert( sub( ZERO_TOKEN, a) == -1); + +/* 25.3: "glue( a, b)" is pre-expanded. */ + assert( xglue( glue( a, b), c) == 3); + +/* 25.4: Operands of ## operator are not pre-expanded. */ + assert( glue( MACRO_0, MACRO_1) == 2); + +/* 25.5: Operand of # operator is not pre-expanded. */ + assert( strcmp( str( ZERO_TOKEN), "ZERO_TOKEN") == 0); +} + +#undef f + +#ifdef void +int f( a) + int a; +{ + return a; +} + +int g( a) + int a; +{ + return a * 2; +} +#else +int f( int a) +{ + return a; +} + +int g( int a) +{ + return a * 2; +} +#endif + +void n_26( void) +/* The name once replaced is not furthur replaced. */ +{ + int x = 1; + int AB = 1; + int Z[1]; + Z[0] = 1; + +/* 26.1: Directly recursive macro definition. */ +/* Z[0]; */ +#define Z Z[0] + assert( Z == 1); + +/* 26.2: Intermediately recursive macro definition. */ +/* AB; */ +#define AB BA +#define BA AB + assert( AB == 1); + +/* 26.3: Directly recursive function-like macro definition. */ +/* x + f(x); */ +#define f(a) a + f(a) + assert( f( x) == 2); + +/* 26.4: Intermediately recursive function-like macro definition. */ +/* x + x + g( x); */ +#define g(a) a + h( a) +#define h(a) a + g( a) + assert( g( x) == 4); + +/* 26.5: Rescanning encounters the non-replaced macro name. */ +/* Z[0] + f( Z[0]); */ + assert( f( Z) == 2); +} + +void n_27( void) +/* Rescanning of a macro raplace any macro call in the replacement + text after substitution of parameters by pre-expanded-arguments. This + re-examination may involve the succeding sequences from the source + file (what a queer thing!). */ +{ + int a = 1, b = 2, c, m = 1, n = 2; + +/* 27.1: Cascaded use of object-like macros. */ +#define NEST8 NEST7 + 8 +#define NEST7 NEST6 + 7 +#define NEST6 NEST5 + 6 +#define NEST5 NEST4 + 5 +#define NEST4 NEST3 + 4 +#define NEST3 NEST2 + 3 +#define NEST2 NEST1 + 2 +#define NEST1 1 + assert( NEST8 == 36); + +/* 27.2: Cascaded use of function-like macros. */ +#define FUNC4( a, b) FUNC3( a, b) + NEST4 +#define FUNC3( a, b) FUNC2( a, b) + NEST3 +#define FUNC2( a, b) FUNC1( a, b) + NEST2 +#define FUNC1( a, b) (a) + (b) + assert( FUNC4( NEST1, NEST2) == 23); + +/* 27.3: An identifier generated by ## operator is subject to expansion. */ + assert( glue( MACRO_, 1) == 1); + +#define head sub( +#define math( op, a, b) op( (a), (b)) + +/* 27.4: 'sub' as an argument of math() is not pre-expanded, since '(' is + missing. */ + assert( math( sub, a, b) == -1); + +/* 27.5: Queer thing. */ + c = head a,b ); + assert( c == -1); + +/* 27.6: Recursive macro (the 2nd 'm' is expanded to 'n' since it is in + source file). */ +#define m n +#define n( a) a + assert( m( m) == 2); +} + +void n_28( void) +/* __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ and + __STDC_VERSION are predefined. */ +{ + char * date = __DATE__; + +/* 28.1: */ + assert( strcmp( __FILE__, "n_std.c") == 0); + +/* 28.2: */ + assert( __LINE__ == 779); + +/* 28.3: */ + assert( strlen( __DATE__) == 11); + assert( date[ 4] != '0'); + +/* 28.4: */ + assert( strlen( __TIME__) == 8); + +/* 28.5: */ + assert( __STDC__); + +/* 28.6: */ + assert( __STDC_VERSION__ >= 199409L); + +/* 28.7: */ +#include "line.h" +} + +void n_29( void) +/* #undef directive. */ +{ + int DEFINED = 1; + +/* 29.1: Undefined macro is not a macro. */ +#define DEFINED +#undef DEFINED + assert( DEFINED == 1); + +/* 29.2: Undefining undefined name is not an error. */ +#undef UNDEFINED +} + +void n_30( void) +/* Macro calls. */ +/* Note: Comma separate the arguments of function-like macro call, + but comma between matching inner parenthesis doesn't. This feature + is tested on so many places in this suite especially on *.c samples + which use assert() macro, that no separete item to test this feature + is provided. */ +{ +#undef FUNC +#define FUNC( a, b, c) a + b + c + + int a = 1, b = 2, c = 3; + +/* 30.1: A macro may cross lines. */ + assert + ( + FUNC + ( + a, + b, + c + ) + == 6 + ); +} + +void n_32( void) +/* Escape sequence in character constant in #if expression. */ +{ +/* 32.1: Character octal escape sequence. */ +#if '\123' != 83 + fputs( "Bad evaluation of octal escape sequence.\n", stderr); +#endif + +/* 32.2: Character hexadecimal escape sequence. */ +#if '\x1b' != '\033' + fputs( "Bad evaluation of hexadecimal escape sequence.\n", stderr); +#endif +} + +void n_37( void) +/* Translation limits. */ +{ +#define MACRO_8 8 + +/* 37.1: Number of parameters in macro: at least 31. */ +#define glue31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E) \ + a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p##q##r##s##t##u##v##w##x##y##z##A##B##C##D##E + + int ABCDEFGHIJKLMNOPQRSTUVWXYZabcde = 31; + int ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_ = 30; + int nest = 0; + +/* 37.2: Number of arguments in macro call: at least 31. */ + assert( + glue31( A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R + , S, T, U, V, W, X, Y, Z, a, b, c, d, e) + == 31); + +/* 37.3: Significant initial characters in an internal identifier or a + macro name: at least 31. */ + assert( ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_ == 30); + +/* 37.4: Nested conditional inclusion: at least 8 levels. */ + nest = 0; +#ifdef A +#else +# ifdef B +# else +# ifdef C +# else +# ifdef D +# else +# ifdef E +# else +# ifdef F +# else +# ifdef G +# else +# ifdef H +# else + nest = 8; +# endif +# endif +# endif +# endif +# endif +# endif +# endif +#endif + assert( nest == 8); + +/* 37.5: Nested source file inclusion: at least 8 levels. */ + nest = 0; +#include "nest1.h" + assert( nest == 8); + +/* 37.6: Parenthesized expression: at least 32 levels. */ +#if 0 + (1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + (9 - (10 + (11 - (12 + \ + (13 - (14 + (15 - (16 + (17 - (18 + (19 - (20 + (21 - (22 + (23 - \ + (24 + (25 - (26 + (27 - (28 + (29 - (30 + (31 - (32 + 0)))))))))) \ + )))))))))))))))))))))) == 0 + nest = 32; +#endif + assert( nest == 32); + +/* 37.7: Characters in a string (after concatenation): at least 509. */ + { + char * extremely_long_string = +"123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +012345678901234567" + ; + assert( strlen( extremely_long_string) == 507); + } + +/* 37.8: Characters in a logical source line: at least 509. */ + { + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int A123456789012345678901234567890 = 123456; \ + int B123456789012345678901234567890 = 123457; \ + int C123456789012345678901234567890 = 123458; \ + int D1234567890123456789012 = 123459; + assert( a123456789012345678901234567890 == 123450 + && D1234567890123456789012 == 123459); + } + +/* 37.9: Macro definitions: at least 1024. */ +#undef AB +#undef BA +#undef OR + +#include "m1024.h" + assert( ZX); +} + diff --git a/libraries/mcpp/test-c/nest1.h b/libraries/mcpp/test-c/nest1.h new file mode 100644 index 000000000..6db0e2b83 --- /dev/null +++ b/libraries/mcpp/test-c/nest1.h @@ -0,0 +1,5 @@ +/* nest1.h */ + + nest = 1; + +#include "nest2.h" diff --git a/libraries/mcpp/test-c/nest10.h b/libraries/mcpp/test-c/nest10.h new file mode 100644 index 000000000..f97de2ab3 --- /dev/null +++ b/libraries/mcpp/test-c/nest10.h @@ -0,0 +1,2 @@ +/* nest10.h */ +#include "nest11.h" diff --git a/libraries/mcpp/test-c/nest11.h b/libraries/mcpp/test-c/nest11.h new file mode 100644 index 000000000..ca40f3811 --- /dev/null +++ b/libraries/mcpp/test-c/nest11.h @@ -0,0 +1,2 @@ +/* nest11.h */ +#include "nest12.h" diff --git a/libraries/mcpp/test-c/nest12.h b/libraries/mcpp/test-c/nest12.h new file mode 100644 index 000000000..c3dba7244 --- /dev/null +++ b/libraries/mcpp/test-c/nest12.h @@ -0,0 +1,2 @@ +/* nest12.h */ +#include "nest13.h" diff --git a/libraries/mcpp/test-c/nest13.h b/libraries/mcpp/test-c/nest13.h new file mode 100644 index 000000000..4f8355f38 --- /dev/null +++ b/libraries/mcpp/test-c/nest13.h @@ -0,0 +1,2 @@ +/* nest13.h */ +#include "nest14.h" diff --git a/libraries/mcpp/test-c/nest14.h b/libraries/mcpp/test-c/nest14.h new file mode 100644 index 000000000..b3ab47406 --- /dev/null +++ b/libraries/mcpp/test-c/nest14.h @@ -0,0 +1,2 @@ +/* nest14.h */ +#include "nest15.h" diff --git a/libraries/mcpp/test-c/nest15.h b/libraries/mcpp/test-c/nest15.h new file mode 100644 index 000000000..aeab3feb7 --- /dev/null +++ b/libraries/mcpp/test-c/nest15.h @@ -0,0 +1,4 @@ +/* nest15.h */ +#ifdef X0F + nest = 0x0f; +#endif diff --git a/libraries/mcpp/test-c/nest2.h b/libraries/mcpp/test-c/nest2.h new file mode 100644 index 000000000..89056cde6 --- /dev/null +++ b/libraries/mcpp/test-c/nest2.h @@ -0,0 +1,5 @@ +/* nest2.h */ + + nest = 2; + +#include "nest3.h" diff --git a/libraries/mcpp/test-c/nest3.h b/libraries/mcpp/test-c/nest3.h new file mode 100644 index 000000000..724e99069 --- /dev/null +++ b/libraries/mcpp/test-c/nest3.h @@ -0,0 +1,5 @@ +/* nest3.h */ + + nest = 3; + +#include "nest4.h" diff --git a/libraries/mcpp/test-c/nest4.h b/libraries/mcpp/test-c/nest4.h new file mode 100644 index 000000000..5f0cb4865 --- /dev/null +++ b/libraries/mcpp/test-c/nest4.h @@ -0,0 +1,5 @@ +/* nest4.h */ + + nest = 4; + +#include "nest5.h" diff --git a/libraries/mcpp/test-c/nest5.h b/libraries/mcpp/test-c/nest5.h new file mode 100644 index 000000000..56efbcf19 --- /dev/null +++ b/libraries/mcpp/test-c/nest5.h @@ -0,0 +1,5 @@ +/* nest5.h */ + + nest = 5; + +#include "nest6.h" diff --git a/libraries/mcpp/test-c/nest6.h b/libraries/mcpp/test-c/nest6.h new file mode 100644 index 000000000..00040c78a --- /dev/null +++ b/libraries/mcpp/test-c/nest6.h @@ -0,0 +1,5 @@ +/* nest6.h */ + + nest = 6; + +#include "nest7.h" diff --git a/libraries/mcpp/test-c/nest7.h b/libraries/mcpp/test-c/nest7.h new file mode 100644 index 000000000..ba005dc4e --- /dev/null +++ b/libraries/mcpp/test-c/nest7.h @@ -0,0 +1,5 @@ +/* nest7.h */ + + nest = 7; + +#include "nest8.h" diff --git a/libraries/mcpp/test-c/nest8.h b/libraries/mcpp/test-c/nest8.h new file mode 100644 index 000000000..5d0105498 --- /dev/null +++ b/libraries/mcpp/test-c/nest8.h @@ -0,0 +1,8 @@ +/* nest8.h */ + +#ifndef X0F + nest = 8; +#else +#include "nest9.h" +#endif + diff --git a/libraries/mcpp/test-c/nest9.h b/libraries/mcpp/test-c/nest9.h new file mode 100644 index 000000000..5f84e46fe --- /dev/null +++ b/libraries/mcpp/test-c/nest9.h @@ -0,0 +1,2 @@ +/* nest9.h */ +#include "nest10.h" diff --git a/libraries/mcpp/test-c/side_cpp b/libraries/mcpp/test-c/side_cpp new file mode 100644 index 000000000..87cf21c50 --- /dev/null +++ b/libraries/mcpp/test-c/side_cpp @@ -0,0 +1,46 @@ + + + + + + + + + +n_1: Trigraph sequences. +n_2: Line splicing by . +n_3: Handling of comment. +n_4: Tokens spelled by digraphs. +n_5: Spaces or tabs in pp-directive. +n_6: #include directive. +n_7: #line directive. +n_9: #pragma directive. +n_10: #if, #elif pp-directive. +n_11: Operator "defined" in #if. +n_12: Pp-number and type of #if expr. +n_13: Valid operators in #if expr. +n_13.5: Usual arithmetic conversion. +n_13.7: Short-circuit evaluation of #if. +n_13.8: Grouping of #if sub-expressions. +n_13.13: #if expression with macros. +n_15: #ifdef, #ifndef directives. +n_18: #define directive. +n_19: Valid re-definitions of macros. +n_20: Macro name identical to keyword. +n_21: Tokenization (no token merging). +n_22: Tokenization of pp-number. +n_23: ## operator in macro definition. +n_24: # operator in macro definition. +n_25: Pre-expansion of macro args. +n_26: No recursive replacement. +n_27: Rescanning of a macro. +n_28: Standard pre-defined macros. +n_29: #undef directive. +n_30: Macro call crossing lines. +n_32: Escape sequence in char-const. +n_37: Translation limits. +i_32.3: Character constant in #if. +i_35: Multi-character character const. +i_35.3: Multi-character wide character. + +Total number of tests unpassed. diff --git a/libraries/mcpp/test-c/u_1_1.c b/libraries/mcpp/test-c/u_1_1.c new file mode 100644 index 000000000..6f068cfb1 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_1.c @@ -0,0 +1,24 @@ +/* u_1_1.c: Undefined behaviors on unterminated line, comment or macro. */ + +main( void) +{ + +/* u.1.1: End of a source file without . */ +#include "unbal3.h" +int e_1; + +/* u.1.2: End of a source file with . */ +#include "unbal4.h" +; + +/* u.1.3: End of a source file with an unterminated comment. */ +#include "unbal5.h" +*/ + +/* u.1.4: End of a source file with an uncompleted macro call. */ +#include "unbal6.h" + y); + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_11.c b/libraries/mcpp/test-c/u_1_11.c new file mode 100644 index 000000000..bcebb7704 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_11.c @@ -0,0 +1,15 @@ +/* u_1_11.c: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* u.1.11: Header-name containing ', ", \ or "/*". */ +/* Probably illegal filename and fails to open. */ +#include "../*line.h" + +main( void) +{ +/* \ is a legal path-delimiter in MS-DOS or some other OS's. */ +#include "..\test-t\line.h" + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_12.c b/libraries/mcpp/test-c/u_1_12.c new file mode 100644 index 000000000..6ef992ce5 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_12.c @@ -0,0 +1,11 @@ +/* u_1_12.c: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* u.1.12: Argument of #include other than header-name. */ +#include filename + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_13.c b/libraries/mcpp/test-c/u_1_13.c new file mode 100644 index 000000000..381042cc0 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_13.c @@ -0,0 +1,11 @@ +/* u_1_13.c: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* u.1.13: Excessive argument in #include directive. */ +#include Junk + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_14.c b/libraries/mcpp/test-c/u_1_14.c new file mode 100644 index 000000000..fdb709b53 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_14.c @@ -0,0 +1,18 @@ +/* u_1_14.c: Undefined behaviors on undefined #line syntax. */ + +main( void) +{ + +/* u.1.14: #line directive without an argument of line number. */ +#line "filename" + +/* u.1.15: #line directive with the second argument of other than string + literal. */ +#line 1234 filename + +/* u.1.16: Excessive argument in #line directive. */ +#line 2345 "filename" Junk + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_17.c b/libraries/mcpp/test-c/u_1_17.c new file mode 100644 index 000000000..41ebb1cb4 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_17.c @@ -0,0 +1,27 @@ +/* u_1_17.c: Undefined behaviors on out-of-range #line number. */ + +#include + +main( void) +{ + +/* u.1.17: Line number argument of #line directive should be in range of + [1,32767]. */ +#line 32767 /* valid here */ +/* line 32767 */ +/* line 32768 ? : out of range */ + printf( "%d\n", __LINE__); + /* 32769 ? or -32767 ?, maybe warned as an out-of-range */ +#line 0 +#line 32768 + +/* u.1.18: Line number argument of #line directive should be written in + decimal digits. */ +#line 0x1000 + +/* 23, u_1_17.c or other undefined results. */ + printf( "%d, %s\n", __LINE__, __FILE__); + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_19.c b/libraries/mcpp/test-c/u_1_19.c new file mode 100644 index 000000000..739722db4 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_19.c @@ -0,0 +1,45 @@ +/* u_1_19.c: Undefined behaviors on undefined #define and #undef syntax. */ + +#include + +main( void) +{ + +/* u.1.19: A macro expanded to "defined" in #if expression. */ +#define DEFINED defined +#if DEFINED DEFINED +#endif + +#undef __linux__ +#undef __arm__ +#define __linux__ 1 +#define HAVE_MREMAP defined(__linux__) && !defined(__arm__) +/* Wrong macro definition. + * This macro should be defined as follows. + * #if defined(__linux__) && !defined(__arm__) + * #define HAVE_MREMAP 1 + * #endif + */ +#if HAVE_MREMAP + mremap(); +#endif + +/* u.1.20: Undefining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ or + "defined" in #undef directive. */ +#undef __LINE__ +/* 31 or other undefined result. */ + printf( "%d\n", __LINE__); + +/* u.1.21: Defining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ or + "defined" in #define directive. */ +#define __LINE__ 1234 +/* 37 or other undefined result. */ + printf( "%d\n", __LINE__); +#define defined defined +#if defined defined +# error I am not a good preprocessor. +#endif + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_22.c b/libraries/mcpp/test-c/u_1_22.c new file mode 100644 index 000000000..435244acc --- /dev/null +++ b/libraries/mcpp/test-c/u_1_22.c @@ -0,0 +1,25 @@ +/* u_1_22.c: Undefined behaviors on generating invalid pp-token by ## + operator. */ + +#include +#define str( a) # a + +main( void) +{ + +/* u.1.22: Result of ## operator is not a valid pp-token. */ +#define NUM( dig, exp) dig ## E+ ## exp +/* + * "E+" is a sequence of two pp-tokens "E" and "+", not a single pp-token. + * The first ## concatenates the last pp-token of first argument with "E", + * and the second ## concatenates "+" with the first pp-token of the second + * argument. + * While "12E" (one of the sequence generated by the token concatenation) + * is a valid pp-token, "+34" (the another sequence) is not a valid pp-token + * and causes an undefined behavior. + */ + printf( "%e\n", NUM( 12, 34)); + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_23.c b/libraries/mcpp/test-c/u_1_23.c new file mode 100644 index 000000000..5df013e51 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_23.c @@ -0,0 +1,16 @@ +/* u_1_23.c: Undefined behaviors on generating invalid pp-token by # + operator. */ + +#include +#define str( a) # a + +main( void) +{ + +/* "\\"\""; This sequence is parsed to three tokens "\\" \ "", and will be + diagnosed by compiler-proper unless diagnosed by preprocessor. */ + puts( str( \"")); + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_24.c b/libraries/mcpp/test-c/u_1_24.c new file mode 100644 index 000000000..4bcf06f05 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_24.c @@ -0,0 +1,47 @@ +/* u_1_24.c: Undefined behaviors on empty argument of macro call. */ + +/* u.1.24: Empty argument of macro call. */ +/* + * Note: Since no argument and one empty argument cannot be distinguished + * syntactically, additional dummy argument may be necessary for an + * intermediate macro to process one empty argument (if possible). + */ + +#include + +#define ARG( a, dummy) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s, dummy)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +main( void) +{ + int x = 1; + int y = 2; + +/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); + or other undefined behavior. */ + SHOWN( math( sub, , y)); + +/* printf( "%s : %s\n", "EMPTY", ""); + or other undefined behavior. */ + SHOWS( EMPTY); + +/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ + SHOWS( APPEND( CON, 1)); + +/* printf( "%s : %s\n", "APPEND( CON, )", "CON"); + or other undefined behavior. */ + SHOWS( APPEND( CON, )); + +/* printf( "%s : %s\n", "APPEND( , )", ""); + or other undefined behavior. */ + SHOWS( APPEND( , )); + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_25.c b/libraries/mcpp/test-c/u_1_25.c new file mode 100644 index 000000000..00b695e06 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_25.c @@ -0,0 +1,26 @@ +/* u_1_25.c: Undefined behaviors on undefined macro argument. */ + +#include +#define str( a) # a +#define sub( x, y) (x - y) +#define SUB sub + +main( void) +{ + int a = 1, b = 2; + +/* u.1.25: Macro argument otherwise parsed as a directive. */ +/* "#define NAME"; or other undefined behaviour. */ + puts( str( +#define NAME + )); + +#if 0 /* Added by C90: Corrigendum 1 (1994) and deleted by C99 */ +/* u.1.26: Expanded macro replacement list end with name of function-like + macro. */ + SUB( a, b); +#endif + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_27.c b/libraries/mcpp/test-c/u_1_27.c new file mode 100644 index 000000000..7ab1fccf4 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_27.c @@ -0,0 +1,11 @@ +/* u_1_27.c: Pseudo-directive-line. */ + +/* u.1.27: Unknown preprocessing directive (other than #pragma). */ +#ifdefined MACRO +#endif /* The second error. */ + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_28.c b/libraries/mcpp/test-c/u_1_28.c new file mode 100644 index 000000000..b3973b585 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_28.c @@ -0,0 +1,17 @@ +/* u_1_28.c: Macro expanding to name identical to directive. */ + +#define D define +/* u.1.28: There are following two ways of preprocessing. + 1: "D" isn't expanded, because # is the first token of the line. + Preprocessor reports that "D" is an unknown directive. + 2: "D" is expanded, because that is not a directive. + Compiler-phase will diagnose the output of preprocess. + Anyway, preprocessor should not interprete this line as a preprocessing + directive. */ +#D A B + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_5.c b/libraries/mcpp/test-c/u_1_5.c new file mode 100644 index 000000000..bdc66b451 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_5.c @@ -0,0 +1,18 @@ +/* u_1_5.c: Undefined behaviors on illegal characters. */ + +/* u.1.5: Illegal characters (in other than string literal, character + constant, header-name or comment). */ +#if 1 ||2 +/* 0x01e ^ ^ 0x1f */ +#endif /* Maybe the second error. */ + +/* u.1.6: [VT], [FF] in directive line. */ +#if 1 || 2 +/* [VT] ^ ^ [FF] */ +#endif /* Maybe the second error. */ + +main( void) +{ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_7_big5.c b/libraries/mcpp/test-c/u_1_7_big5.c new file mode 100644 index 000000000..9f4caf20a --- /dev/null +++ b/libraries/mcpp/test-c/u_1_7_big5.c @@ -0,0 +1,13 @@ +/* u_1_7_big5.c: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma setlocale( "chinese-traditional") /* For Visual C */ +#pragma __setlocale( "big5") /* For MCPP */ + +main( void) +{ + char * cp = str( ""); /* 0xa181 */ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_7_eucjp.c b/libraries/mcpp/test-c/u_1_7_eucjp.c new file mode 100644 index 000000000..ac04f9bee --- /dev/null +++ b/libraries/mcpp/test-c/u_1_7_eucjp.c @@ -0,0 +1,12 @@ +/* u_1_7_eucjp.c: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma __setlocale( "eucjp") /* For MCPP */ + +main( void) +{ + char * cp = str( ""); /* 0xb1a0 */ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_7_gb.c b/libraries/mcpp/test-c/u_1_7_gb.c new file mode 100644 index 000000000..d28096dfa --- /dev/null +++ b/libraries/mcpp/test-c/u_1_7_gb.c @@ -0,0 +1,13 @@ +/* u_1_7_gb.c: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma setlocale( "chinese-simplified") /* For Visual C */ +#pragma __setlocale( "gb2312") /* For MCPP */ + +main( void) +{ + char * cp = str( ""); /* 0xb1a0 */ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_7_jis.c b/libraries/mcpp/test-c/u_1_7_jis.c new file mode 100644 index 000000000..40a264536 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_7_jis.c @@ -0,0 +1,12 @@ +/* u_1_7_jis.c: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma __setlocale( "jis") /* For MCPP */ + +main( void) +{ + char * cp = str( "$B1 (B"); /* 0x3120 */ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_7_ksc.c b/libraries/mcpp/test-c/u_1_7_ksc.c new file mode 100644 index 000000000..9e9d488d0 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_7_ksc.c @@ -0,0 +1,13 @@ +/* u_1_7_ksc.c: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma setlocale( "korean") /* For Visual C */ +#pragma __setlocale( "ksc5601") /* For MCPP */ + +main( void) +{ + char * cp = str( ""); /* 0xb1a0 */ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_7_sjis.c b/libraries/mcpp/test-c/u_1_7_sjis.c new file mode 100644 index 000000000..e978751c0 --- /dev/null +++ b/libraries/mcpp/test-c/u_1_7_sjis.c @@ -0,0 +1,13 @@ +/* u_1_7_sjis.c: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma setlocale( "japanese") /* For Visual C */ +#pragma __setlocale( "sjis") /* For MCPP */ + +main( void) +{ + char * cp = str( "8"); /* 0x9138 */ + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_7_utf8.c b/libraries/mcpp/test-c/u_1_7_utf8.c new file mode 100644 index 000000000..7621ee0cb --- /dev/null +++ b/libraries/mcpp/test-c/u_1_7_utf8.c @@ -0,0 +1,16 @@ +/* u_1_7_utf8.c: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma __setlocale( "utf8") /* For MCPP */ + +main( void) +{ + char * cp = str( "字"); /* 0xe5ad97 : legal */ + char * ecp1 = str( ""); /* 0xc0af : overlong */ + char * ecp2 = str( ""); /* 0xe09fbf : overlong */ + char * ecp3 = str( ""); /* 0xeda080 : UTF-16 surrogate */ + + return 0; +} + diff --git a/libraries/mcpp/test-c/u_1_8.c b/libraries/mcpp/test-c/u_1_8.c new file mode 100644 index 000000000..e2870343c --- /dev/null +++ b/libraries/mcpp/test-c/u_1_8.c @@ -0,0 +1,21 @@ +/* u_1_8.c: Undefined behaviors on unterminated quotations. */ + +/* u.1.8: Unterminated character constant. */ +/* The following "comment" may not interpreted as a comment but swallowed by + the unterminated character constant. */ +#error I can't understand. /* Token error prior to execution of #error. */ + +main( void) +{ +/* u.1.9: Unterminated string literal. */ + char * string = + "String literal + across the lines. +" +; + return 0; +} + +/* u.1.10: Unterminated header-name. */ +#include + +#define str( a) # a + +main( void) +{ + int a = 1, b = 2; + char * string; + +/* u.1.1: End of a source file without . */ +#include "unbal3.h" +int e_1; + +/* u.1.2: End of a source file with . */ +#include "unbal4.h" +; + +/* u.1.3: End of a source file with an unterminated comment. */ +#include "unbal5.h" +*/ + +/* u.1.4: End of a source file with an uncompleted macro call. */ +#include "unbal6.h" + y); + +/* u.1.5: Illegal characters (in other than string literal, character + constant, header-name or comment). */ +#if 1 ||2 +/* 0x01e ^ ^ 0x1f */ +#endif /* Maybe the second error. */ + +/* u.1.6: [VT], [FF] in directive line. */ +#if 1 || 2 +/* [VT] ^ ^ [FF] */ +#endif /* Maybe the second error. */ + +/* u.1.7: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ +#if '== 0x8e +/* ^ 0x8e */ +#endif /* Maybe the second error. */ + +/* u.1.8: Unterminated character constant. */ +/* The following "comment" may not interpreted as a comment but swallowed by + the unterminated character constant. */ +#error I can't understand. /* Token error prior to execution of #error. */ + +/* u.1.9: Unterminated string literal. */ + string = + "String literal + across the lines. +" +; + +/* u.1.10: Unterminated header-name. */ +#include Junk + +/* u.1.14: #line directive without an argument of line number. */ +#line "filename" + +/* u.1.15: #line directive with the second argument of other than string + literal. */ +#line 1234 filename + +/* u.1.16: Excessive argument in #line directive. */ +#line 2345 "filename" Junk + +/* 90, undefs.c or other undefined results. */ + printf( "%d, %s\n", __LINE__, __FILE__); + +/* u.1.17: Line number argument of #line directive should be in range of + [1,32767]. */ +#line 32767 /* valid here */ +/* line 32767 */ +/* line 32768 ? : out of range */ + printf( "%d\n", __LINE__); + /* 32769 ? or -32767 ?, maybe warned as an out-of-range */ +#line 0 +#line 32768 + +/* u.1.18: Line number argument of #line directive should be written in + decimal digits. */ +#line 0x1000 + +#line 108 /* Restore to correct line number. */ + +/* u.1.19: A macro expanded to "defined" in #if expression. */ +#define DEFINED defined +#if DEFINED DEFINED +#endif + +#undef __linux__ +#undef __arm__ +#define __linux__ 1 +#define HAVE_MREMAP defined(__linux__) && !defined(__arm__) +/* Wrong macro definition. + * This macro should be defined as follows. + * #if defined(__linux__) && !defined(__arm__) + * #define HAVE_MREMAP 1 + * #endif + */ +#if HAVE_MREMAP + mremap(); +#endif + +/* u.1.20: Undefining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, + __STDC_VERSION__ or "defined" in #undef directive. */ +#undef __LINE__ +/* 131 or other undefined result. */ + printf( "%d\n", __LINE__); + +/* u.1.21: Defining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, + __STDC_VERSION__ or "defined" in #define directive. */ +#define __LINE__ 1234 +/* 137 or other undefined result. */ + printf( "%d\n", __LINE__); +#define defined defined +#if defined defined +# error I am not a good preprocessor. +#endif + +/* u.1.22: Result of ## operator is not a valid pp-token. */ +#define NUM( dig, exp) dig ## E+ ## exp +/* + * "E+" is a sequence of two pp-tokens "E" and "+", not a single pp-token. + * The first ## concatenates the last pp-token of first argument with "E", + * and the second ## concatenates "+" with the first pp-token of the second + * argument. + * While "12E" (one of the sequence generated by the token concatenation) + * is a valid pp-token, "+34" (the another sequence) is not a valid pp-token + * and causes an undefined behavior. + */ + printf( "%e\n", NUM( 12, 34)); + +/* u.1.23: Result of # operator is not a valid string literal. */ +/* "\\"\""; This sequence is parsed to three tokens "\\" \ "", and will be + diagnosed by compiler-proper unless diagnosed by preprocessor. */ + puts( str( \"")); + +/* u.1.24: Empty argument of macro call. */ +/* + * Note: Since no argument and one empty argument cannot be distinguished + * syntactically, additional dummy argument may be necessary for an + * intermediate macro to process one empty argument (if possible). + */ + +#define ARG( a, dummy) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s, dummy)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); + or other undefined behavior. */ + SHOWN( math( sub, , y)); + +/* printf( "%s : %s\n", "EMPTY", ""); + or other undefined behavior. */ + SHOWS( EMPTY); + +/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ + SHOWS( APPEND( CON, 1)); + +/* printf( "%s : %s\n", "APPEND( CON, )", "CON"); + or other undefined behavior. */ + SHOWS( APPEND( CON, )); + +/* printf( "%s : %s\n", "APPEND( , )", ""); + or other undefined behavior. */ + SHOWS( APPEND( , )); + +/* u.1.25: Macro argument otherwise parsed as a directive. */ +/* "#define NAME"; or other undefined behaviour. */ + puts( str( +#define NAME + )); + +#define sub( x, y) (x - y) +#define SUB sub + +#if 0 /* Added by C90: Corrigendum 1 (1994) and deleted by C99 */ +/* u.1.26: Expanded macro replacement list end with name of function-like + macro. */ + SUB( a, b); +#endif + +/* u.1.27: Unknown preprocessing directive (other than #pragma). */ +#ifdefined MACRO +#endif /* The second error. */ + +#define D define +/* u.1.28: There are following two ways of preprocessing. + 1: "D" isn't expanded, because # is the first token of the line. + Preprocessor reports that "D" is an unknown directive. + 2: "D" is expanded, because that is not a directive. + Compiler-phase will diagnose the output of preprocess. + Anyway, preprocessor should not interprete this line as a preprocessing + directive. + */ +#D A B + +/* u.2.1: Undefined escape sequence. */ +#if '\x' +#endif + +/* u.2.2: Illegal bit shift count. */ +#if 1 << -1 +#endif +#if 1 << 64 +#endif + + return 0; +} + diff --git a/libraries/mcpp/test-c/unspcs.c b/libraries/mcpp/test-c/unspcs.c new file mode 100644 index 000000000..e9372538f --- /dev/null +++ b/libraries/mcpp/test-c/unspcs.c @@ -0,0 +1,36 @@ +/* + * unspcs.c: + * 1998/08 made public kmatsui + * + * These texts are unportable ones, because the order of the evaluation is + * unspecified. Good preprocessor will warn at these texts even if the + * results are valid. Good preprocessor will also document the order of + * evaluation and the behavior on invalid results. + * Note: Order of evaluation of sub-expressions (other than operands of &&, + * ||, ? :) of #if expression is also unspecified. The order, however, never + * affects the result, because #if expression never cause side effect, so no + * warning is necessary. Precedence and grouping rules of operators are other + * things than order of evaluation, and shall be obeyed by preprocessor. + */ + +#include "defs.h" + +#define str( a) # a +#define xstr( a) str( a) + +main( void) +{ +/* s.1.1: Order of evaluation of #, ## operators. */ +#define MAKWIDESTR( s) L ## # s +/* Either of L"name"; or L# name; ("L#" is not a valid pp-token). */ + assert( MAKWIDESTR( name)[ 0] == L'n'); + +/* s.1.2: Order of evaluation of ## operators. */ +#define glue3( a, b, c) a ## b ## c +/* "1.a" or undefined, since .a is not a valid pp-token, while 1. and 1.a are + valid pp-tokens. */ + puts( xstr( glue3( 1, ., a))); + + return 0; +} + diff --git a/libraries/mcpp/test-c/warns.c b/libraries/mcpp/test-c/warns.c new file mode 100644 index 000000000..53ba88e74 --- /dev/null +++ b/libraries/mcpp/test-c/warns.c @@ -0,0 +1,161 @@ +/* + * warns.c: + * 1998/08 made public kmatsui + * 2002/12 slightly modified kmatsui + * 2003/11 added a few samples kmatsui + */ + +/* + * The following texts are legal but suspicious ones. Good preprocessor + * will warn at these texts. + */ + +#include "defs.h" + +main( void) +{ +/* w.1.1: "/*" in comment. */ +/* comment /* nested comment and no closing */ + +/* w.1.2: Rescanning of replacement text involves succeding text. */ +#define sub( x, y) (x - y) +#define head sub( + int a = 1, b = 2, c; + c = head a,b ); + assert( c == -1); + +#define OBJECT_LIKE FUNCTION_LIKE +#define FUNCTION_LIKE( x, y) (x + y) + c = OBJECT_LIKE( a, b); + assert( c == 3); + +/* w.2.1: Negative number converted to positive in #if expression. */ +#if -1 < 0U +#endif + +/* w.2.2: Out of range of unsigned type (wraps around and never overflow) + in #if expression. */ +#if 0U - 1 +#endif + +/* + * The following texts are legal but non-portable ones, since these requires + * translation limits greater than the minima quaranteed by C90. Good + * preprocessor will warn at these texts (at least when user wants), unless + * it diagnose these as errors. + */ + + { + int nest; + int A0B0C0D0E0F0G0H0O0O1O2O3P0P1P2 = 123; + +/* w.3.1: Number of parameters in macro: more than 31. */ +#define glue63( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + o0 ## o1 ## o2 ## o3 ## p0 ## p1 ## p2 + +/* w.3.2: Number of arguments in macro call: more than 31. */ + assert( + glue63( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3) + == 123); + +/* w.3.3: Initial significant characters in an identifier: more than 31. */ + { + int A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef = 63; + assert( + A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef + == 63); + } + +/* w.3.4: Nested conditional inclusion: more than 8 levels. */ + nest = 0; +#define X0F +#include "ifdef15.h" + assert( nest == 0x0f); + +/* w.3.5: Nested source file inclusion: more than 8 levels. */ + nest = 0; +#define X0F +#include "nest1.h" + assert( nest == 0x0f); + +/* w.3.6: Parenthesized expression: more than 32 levels. */ + nest = 0; +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - 0x3E) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -1 + nest = 63; +#endif + assert( nest == 63); + } + +/* w.3.7: Characters in a string (after concatenation): more than 509. */ + { + char *string1023 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" +; + assert( strlen( string1023) == 1023); + } + +/* w.3.8: Characters in a logical source line: more than 509. */ + { + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int g123456789012345678901234567890 = 123456; \ + int h123456789012345678901234567890 = 123457; \ + int i123456789012345678901234567890 = 123458; \ + int j123456789012345678901234567890 = 123459; \ + int k123456789012345678901234567890 = 123460; \ + int l123456789012345678901234567890 = 123461; \ + int m123456789012345678901234567890 = 123462; \ + int n123456789012345678901234567890 = 123463; \ + int o123456789012345678901234567890 = 123464; \ + int p123456789012345678901234567890 = 123465; \ + int q123456789012345678901234567890 = 123466; \ + int r123456789012345678901234567890 = 123467; \ + int s123456789012345678901234567890 = 123468; \ + int t1234567890123456 = 123469; + } + +/* w.3.9: Macro definitions: more than 1024 (including predefined ones). */ +#include "m1024.h" + assert( ZX == 1); + + return 0; +} + diff --git a/libraries/mcpp/test-l/LICENSE b/libraries/mcpp/test-l/LICENSE new file mode 100644 index 000000000..7ba15534f --- /dev/null +++ b/libraries/mcpp/test-l/LICENSE @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 1998, 2002-2004 Kiyoshi Matsui + * All rights reserved. + * + * This software including the files in this directory is provided under + * the following license. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/libraries/mcpp/test-l/defs.h b/libraries/mcpp/test-l/defs.h new file mode 100644 index 000000000..e41405b06 --- /dev/null +++ b/libraries/mcpp/test-l/defs.h @@ -0,0 +1,38 @@ +/* defs.h */ + +#include + +/* assert(): Enable one of these three. */ +/* Note: This source doesn't use #elif directive to test preprocessor which + can't recognize the directive. */ +#if 1 /* For the translator which can process properly. */ +#include +#else +#if 0 /* Not to abort on error. */ +#define assert( exp) (exp) ? (void)0 : (void) fprintf( stderr, \ + "Assertion failed: %s, from line %d of file %s\n", \ + # exp, __LINE__, __FILE__) +#else +#if 0 /* For the translator which can't process or '#' + operator properly. */ +#define assert( exp) (exp) ? 0 : fputs( "Assertion failed\n", stderr) +#endif +#endif +#endif + +#ifdef void +/* + * For the older compilers which can't handle prototype declarations. + * You must append these lines in stdio.h. + * #undef void + * #define void + */ +extern int strcmp(); +extern size_t strlen(); +extern void exit(); +#else +extern int strcmp( const char *, const char *); +extern size_t strlen( const char *); +extern void exit( int); +#endif + diff --git a/libraries/mcpp/test-l/ifdef127.h b/libraries/mcpp/test-l/ifdef127.h new file mode 100644 index 000000000..c0b0b6bf2 --- /dev/null +++ b/libraries/mcpp/test-l/ifdef127.h @@ -0,0 +1,389 @@ +/* ifdef127.h */ + +#ifdef X01 +#else +#ifdef X02 +#else +#ifdef X03 +#else +#ifdef X04 +#else +#ifdef X05 +#else +#ifdef X06 +#else +#ifdef X07 +#else +#ifdef X08 +#else +#ifdef X09 +#else +#ifdef X0A +#else +#ifdef X0B +#else +#ifdef X0C +#else +#ifdef X0D +#else +#ifdef X0E +#else +#ifdef X0F + nest = 0x0f; +#else +#ifdef X10 +#else +#ifdef X11 +#else +#ifdef X12 +#else +#ifdef X13 +#else +#ifdef X14 +#else +#ifdef X15 +#else +#ifdef X16 +#else +#ifdef X17 +#else +#ifdef X18 +#else +#ifdef X19 +#else +#ifdef X1A +#else +#ifdef X1B +#else +#ifdef X1C +#else +#ifdef X1D +#else +#ifdef X1E +#else +#ifdef X1F + nest = 0x1f; +#else +#ifdef X20 +#else +#ifdef X21 +#else +#ifdef X22 +#else +#ifdef X23 +#else +#ifdef X24 +#else +#ifdef X25 +#else +#ifdef X26 +#else +#ifdef X27 +#else +#ifdef X28 +#else +#ifdef X29 +#else +#ifdef X2A +#else +#ifdef X2B +#else +#ifdef X2C +#else +#ifdef X2D +#else +#ifdef X2E +#else +#ifdef X2F +#else +#ifdef X30 +#else +#ifdef X31 +#else +#ifdef X32 +#else +#ifdef X33 +#else +#ifdef X34 +#else +#ifdef X35 +#else +#ifdef X36 +#else +#ifdef X37 +#else +#ifdef X38 +#else +#ifdef X39 +#else +#ifdef X3A +#else +#ifdef X3B +#else +#ifdef X3C +#else +#ifdef X3D +#else +#ifdef X3E +#else +#ifdef X3F + nest = 0x3f; +#else +#ifdef X40 +#else +#ifdef X41 +#else +#ifdef X42 +#else +#ifdef X43 +#else +#ifdef X44 +#else +#ifdef X45 +#else +#ifdef X46 +#else +#ifdef X47 +#else +#ifdef X48 +#else +#ifdef X49 +#else +#ifdef X4A +#else +#ifdef X4B +#else +#ifdef X4C +#else +#ifdef X4D +#else +#ifdef X4E +#else +#ifdef X4F +#else +#ifdef X50 +#else +#ifdef X51 +#else +#ifdef X52 +#else +#ifdef X53 +#else +#ifdef X54 +#else +#ifdef X55 +#else +#ifdef X56 +#else +#ifdef X57 +#else +#ifdef X58 +#else +#ifdef X59 +#else +#ifdef X5A +#else +#ifdef X5B +#else +#ifdef X5C +#else +#ifdef X5D +#else +#ifdef X5E +#else +#ifdef X5F +#else +#ifdef X60 +#else +#ifdef X61 +#else +#ifdef X62 +#else +#ifdef X63 +#else +#ifdef X64 +#else +#ifdef X65 +#else +#ifdef X66 +#else +#ifdef X67 +#else +#ifdef X68 +#else +#ifdef X69 +#else +#ifdef X6A +#else +#ifdef X6B +#else +#ifdef X6C +#else +#ifdef X6D +#else +#ifdef X6E +#else +#ifdef X6F +#else +#ifdef X70 +#else +#ifdef X71 +#else +#ifdef X72 +#else +#ifdef X73 +#else +#ifdef X74 +#else +#ifdef X75 +#else +#ifdef X76 +#else +#ifdef X77 +#else +#ifdef X78 +#else +#ifdef X79 +#else +#ifdef X7A +#else +#ifdef X7B +#else +#ifdef X7C +#else +#ifdef X7D +#else +#ifdef X7E +#else +#ifdef X7F + nest = 0x7f; +#else +#include "ifdef255.h" +#endif /* X7F */ +#endif /* X7E */ +#endif /* X7D */ +#endif /* X7C */ +#endif /* X7B */ +#endif /* X7A */ +#endif /* X79 */ +#endif /* X78 */ +#endif /* X77 */ +#endif /* X76 */ +#endif /* X75 */ +#endif /* X74 */ +#endif /* X73 */ +#endif /* X72 */ +#endif /* X71 */ +#endif /* X70 */ +#endif /* X6F */ +#endif /* X6E */ +#endif /* X6D */ +#endif /* X6C */ +#endif /* X6B */ +#endif /* X6A */ +#endif /* X69 */ +#endif /* X68 */ +#endif /* X67 */ +#endif /* X66 */ +#endif /* X65 */ +#endif /* X64 */ +#endif /* X63 */ +#endif /* X62 */ +#endif /* X61 */ +#endif /* X60 */ +#endif /* X5F */ +#endif /* X5E */ +#endif /* X5D */ +#endif /* X5C */ +#endif /* X5B */ +#endif /* X5A */ +#endif /* X59 */ +#endif /* X58 */ +#endif /* X57 */ +#endif /* X56 */ +#endif /* X55 */ +#endif /* X54 */ +#endif /* X53 */ +#endif /* X52 */ +#endif /* X51 */ +#endif /* X50 */ +#endif /* X4F */ +#endif /* X4E */ +#endif /* X4D */ +#endif /* X4C */ +#endif /* X4B */ +#endif /* X4A */ +#endif /* X49 */ +#endif /* X48 */ +#endif /* X47 */ +#endif /* X46 */ +#endif /* X45 */ +#endif /* X44 */ +#endif /* X43 */ +#endif /* X42 */ +#endif /* X41 */ +#endif /* X40 */ +#endif /* X3F */ +#endif /* X3E */ +#endif /* X3D */ +#endif /* X3C */ +#endif /* X3B */ +#endif /* X3A */ +#endif /* X39 */ +#endif /* X38 */ +#endif /* X37 */ +#endif /* X36 */ +#endif /* X35 */ +#endif /* X34 */ +#endif /* X33 */ +#endif /* X32 */ +#endif /* X31 */ +#endif /* X30 */ +#endif /* X2F */ +#endif /* X2E */ +#endif /* X2D */ +#endif /* X2C */ +#endif /* X2B */ +#endif /* X2A */ +#endif /* X29 */ +#endif /* X28 */ +#endif /* X27 */ +#endif /* X26 */ +#endif /* X25 */ +#endif /* X24 */ +#endif /* X23 */ +#endif /* X22 */ +#endif /* X21 */ +#endif /* X20 */ +#endif /* X1F */ +#endif /* X1E */ +#endif /* X1D */ +#endif /* X1C */ +#endif /* X1B */ +#endif /* X1A */ +#endif /* X19 */ +#endif /* X18 */ +#endif /* X17 */ +#endif /* X16 */ +#endif /* X15 */ +#endif /* X14 */ +#endif /* X13 */ +#endif /* X12 */ +#endif /* X11 */ +#endif /* X10 */ +#endif /* X0F */ +#endif /* X0E */ +#endif /* X0D */ +#endif /* X0C */ +#endif /* X0B */ +#endif /* X0A */ +#endif /* X09 */ +#endif /* X08 */ +#endif /* X07 */ +#endif /* X06 */ +#endif /* X05 */ +#endif /* X04 */ +#endif /* X03 */ +#endif /* X02 */ +#endif /* X01 */ + diff --git a/libraries/mcpp/test-l/ifdef255.h b/libraries/mcpp/test-l/ifdef255.h new file mode 100644 index 000000000..07c163d43 --- /dev/null +++ b/libraries/mcpp/test-l/ifdef255.h @@ -0,0 +1,388 @@ +/* ifdef255.h */ + +#ifdef X80 +#else +#ifdef X81 +#else +#ifdef X82 +#else +#ifdef X83 +#else +#ifdef X84 +#else +#ifdef X85 +#else +#ifdef X86 +#else +#ifdef X87 +#else +#ifdef X88 +#else +#ifdef X89 +#else +#ifdef X8A +#else +#ifdef X8B +#else +#ifdef X8C +#else +#ifdef X8D +#else +#ifdef X8E +#else +#ifdef X8F +#else +#ifdef X90 +#else +#ifdef X91 +#else +#ifdef X92 +#else +#ifdef X93 +#else +#ifdef X94 +#else +#ifdef X95 +#else +#ifdef X96 +#else +#ifdef X97 +#else +#ifdef X98 +#else +#ifdef X99 +#else +#ifdef X9A +#else +#ifdef X9B +#else +#ifdef X9C +#else +#ifdef X9D +#else +#ifdef X9E +#else +#ifdef X9F +#else +#ifdef XA0 +#else +#ifdef XA1 +#else +#ifdef XA2 +#else +#ifdef XA3 +#else +#ifdef XA4 +#else +#ifdef XA5 +#else +#ifdef XA6 +#else +#ifdef XA7 +#else +#ifdef XA8 +#else +#ifdef XA9 +#else +#ifdef XAA +#else +#ifdef XAB +#else +#ifdef XAC +#else +#ifdef XAD +#else +#ifdef XAE +#else +#ifdef XAF +#else +#ifdef XB0 +#else +#ifdef XB1 +#else +#ifdef XB2 +#else +#ifdef XB3 +#else +#ifdef XB4 +#else +#ifdef XB5 +#else +#ifdef XB6 +#else +#ifdef XB7 +#else +#ifdef XB8 +#else +#ifdef XB9 +#else +#ifdef XBA +#else +#ifdef XBB +#else +#ifdef XBC +#else +#ifdef XBD +#else +#ifdef XBE +#else +#ifdef XBF +#else +#ifdef XC0 +#else +#ifdef XC1 +#else +#ifdef XC2 +#else +#ifdef XC3 +#else +#ifdef XC4 +#else +#ifdef XC5 +#else +#ifdef XC6 +#else +#ifdef XC7 +#else +#ifdef XC8 +#else +#ifdef XC9 +#else +#ifdef XCA +#else +#ifdef XCB +#else +#ifdef XCC +#else +#ifdef XCD +#else +#ifdef XCE +#else +#ifdef XCF +#else +#ifdef XD0 +#else +#ifdef XD1 +#else +#ifdef XD2 +#else +#ifdef XD3 +#else +#ifdef XD4 +#else +#ifdef XD5 +#else +#ifdef XD6 +#else +#ifdef XD7 +#else +#ifdef XD8 +#else +#ifdef XD9 +#else +#ifdef XDA +#else +#ifdef XDB +#else +#ifdef XDC +#else +#ifdef XDD +#else +#ifdef XDE +#else +#ifdef XDF +#else +#ifdef XE0 +#else +#ifdef XE1 +#else +#ifdef XE2 +#else +#ifdef XE3 +#else +#ifdef XE4 +#else +#ifdef XE5 +#else +#ifdef XE6 +#else +#ifdef XE7 +#else +#ifdef XE8 +#else +#ifdef XE9 +#else +#ifdef XEA +#else +#ifdef XEB +#else +#ifdef XEC +#else +#ifdef XED +#else +#ifdef XEE +#else +#ifdef XEF +#else +#ifdef XF0 +#else +#ifdef XF1 +#else +#ifdef XF2 +#else +#ifdef XF3 +#else +#ifdef XF4 +#else +#ifdef XF5 +#else +#ifdef XF6 +#else +#ifdef XF7 +#else +#ifdef XF8 +#else +#ifdef XF9 +#else +#ifdef XFA +#else +#ifdef XFB +#else +#ifdef XFC +#else +#ifdef XFD +#else +#ifdef XFE +#else +#ifdef XFF + nest = 0xff; +#else + nest = 0xff; +#endif /* XFF */ +#endif /* XFE */ +#endif /* XFD */ +#endif /* XFC */ +#endif /* XFB */ +#endif /* XFA */ +#endif /* XF9 */ +#endif /* XF8 */ +#endif /* XF7 */ +#endif /* XF6 */ +#endif /* XF5 */ +#endif /* XF4 */ +#endif /* XF3 */ +#endif /* XF2 */ +#endif /* XF1 */ +#endif /* XF0 */ +#endif /* XEF */ +#endif /* XEE */ +#endif /* XED */ +#endif /* XEC */ +#endif /* XEB */ +#endif /* XEA */ +#endif /* XE9 */ +#endif /* XE8 */ +#endif /* XE7 */ +#endif /* XE6 */ +#endif /* XE5 */ +#endif /* XE4 */ +#endif /* XE3 */ +#endif /* XE2 */ +#endif /* XE1 */ +#endif /* XE0 */ +#endif /* XDF */ +#endif /* XDE */ +#endif /* XDD */ +#endif /* XDC */ +#endif /* XDB */ +#endif /* XDA */ +#endif /* XD9 */ +#endif /* XD8 */ +#endif /* XD7 */ +#endif /* XD6 */ +#endif /* XD5 */ +#endif /* XD4 */ +#endif /* XD3 */ +#endif /* XD2 */ +#endif /* XD1 */ +#endif /* XD0 */ +#endif /* XCF */ +#endif /* XCE */ +#endif /* XCD */ +#endif /* XCC */ +#endif /* XCB */ +#endif /* XCA */ +#endif /* XC9 */ +#endif /* XC8 */ +#endif /* XC7 */ +#endif /* XC6 */ +#endif /* XC5 */ +#endif /* XC4 */ +#endif /* XC3 */ +#endif /* XC2 */ +#endif /* XC1 */ +#endif /* XC0 */ +#endif /* XBF */ +#endif /* XBE */ +#endif /* XBD */ +#endif /* XBC */ +#endif /* XBB */ +#endif /* XBA */ +#endif /* XB9 */ +#endif /* XB8 */ +#endif /* XB7 */ +#endif /* XB6 */ +#endif /* XB5 */ +#endif /* XB4 */ +#endif /* XB3 */ +#endif /* XB2 */ +#endif /* XB1 */ +#endif /* XB0 */ +#endif /* XAF */ +#endif /* XAE */ +#endif /* XAD */ +#endif /* XAC */ +#endif /* XAB */ +#endif /* XAA */ +#endif /* XA9 */ +#endif /* XA8 */ +#endif /* XA7 */ +#endif /* XA6 */ +#endif /* XA5 */ +#endif /* XA4 */ +#endif /* XA3 */ +#endif /* XA2 */ +#endif /* XA1 */ +#endif /* XA0 */ +#endif /* X9F */ +#endif /* X9E */ +#endif /* X9D */ +#endif /* X9C */ +#endif /* X9B */ +#endif /* X9A */ +#endif /* X99 */ +#endif /* X98 */ +#endif /* X97 */ +#endif /* X96 */ +#endif /* X95 */ +#endif /* X94 */ +#endif /* X93 */ +#endif /* X92 */ +#endif /* X91 */ +#endif /* X90 */ +#endif /* X8F */ +#endif /* X8E */ +#endif /* X8D */ +#endif /* X8C */ +#endif /* X8B */ +#endif /* X8A */ +#endif /* X89 */ +#endif /* X88 */ +#endif /* X87 */ +#endif /* X86 */ +#endif /* X85 */ +#endif /* X84 */ +#endif /* X83 */ +#endif /* X82 */ +#endif /* X81 */ +#endif /* X80 */ diff --git a/libraries/mcpp/test-l/l_37_1.t b/libraries/mcpp/test-l/l_37_1.t new file mode 100644 index 000000000..71e0d9185 --- /dev/null +++ b/libraries/mcpp/test-l/l_37_1.t @@ -0,0 +1,24 @@ +/* l_37_1.t: Translation limits larger than Standard / 1. */ + +/* 37.1L: Number of parameters in macro. */ +#define glue255( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, \ + a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4, \ + a5, b5, c5, d5, e5, f5, g5, h5, i5, j5, k5, l5, m5, n5, o5, p5, \ + a6, b6, c6, d6, e6, f6, g6, h6, i6, j6, k6, l6, m6, n6, o6, p6, \ + a7, b7, c7, d7, e7, f7, g7, h7, i7, j7, k7, l7, m7, n7, o7, p7, \ + a8, b8, c8, d8, e8, f8, g8, h8, i8, j8, k8, l8, m8, n8, o8, p8, \ + a9, b9, c9, d9, e9, f9, g9, h9, i9, j9, k9, l9, m9, n9, o9, p9, \ + aa, ba, ca, da, ea, fa, ga, ha, ia, ja, ka, la, ma, na, oa, pa, \ + ab, bb, cb, db, eb, fb, gb, hb, ib, jb, kb, lb, mb, nb, ob, pb, \ + ac, bc, cc, dc, ec, fc, gc, hc, ic, jc, kc, lc, mc, nc, oc, pc, \ + ad, bd, cd, dd, ed, fd, gd, hd, id, jd, kd, ld, md, nd, od, pd, \ + ae, be, ce, de, ee, fe, ge, he, ie, je, ke, le, me, ne, oe, pe, \ + af, bf, cf, df, ef, ff, gf, hf, if, jf, kf, lf, mf, nf, of) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + p0 ## p1 ## p2 ## p3 ## p4 ## p5 ## p6 ## p7 ## \ + p8 ## p9 ## pa ## pb ## pc ## pd ## pe ## of + diff --git a/libraries/mcpp/test-l/l_37_2.t b/libraries/mcpp/test-l/l_37_2.t new file mode 100644 index 000000000..a4184fd70 --- /dev/null +++ b/libraries/mcpp/test-l/l_37_2.t @@ -0,0 +1,24 @@ +/* l_37_2.t: Translation limits larger than Standard / 2. */ + +/* 37.2L: Number of arguments in macro call. */ +#include "l_37_1.t" + +/* A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6P7P8P9PAPBPCPDPEOF; */ + glue255( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3, P3, + A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, L4, M4, N4, O4, P4, + A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, L5, M5, N5, O5, P5, + A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, L6, M6, N6, O6, P6, + A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, L7, M7, N7, O7, P7, + A8, B8, C8, D8, E8, F8, G8, H8, I8, J8, K8, L8, M8, N8, O8, P8, + A9, B9, C9, D9, E9, F9, G9, H9, I9, J9, K9, L9, M9, N9, O9, P9, + AA, BA, CA, DA, EA, FA, GA, HA, IA, JA, KA, LA, MA, NA, OA, PA, + AB, BB, CB, DB, EB, FB, GB, HB, IB, JB, KB, LB, MB, NB, OB, PB, + AC, BC, CC, DC, EC, FC, GC, HC, IC, JC, KC, LC, MC, NC, OC, PC, + AD, BD, CD, DD, ED, FD, GD, HD, ID, JD, KD, LD, MD, ND, OD, PD, + AE, BE, CE, DE, EE, FE, GE, HE, IE, JE, KE, LE, ME, NE, OE, PE, + AF, BF, CF, DF, EF, FF, GF, HF, IF, JF, KF, LF, MF, NF, OF); + diff --git a/libraries/mcpp/test-l/l_37_3.c b/libraries/mcpp/test-l/l_37_3.c new file mode 100644 index 000000000..226e4386e --- /dev/null +++ b/libraries/mcpp/test-l/l_37_3.c @@ -0,0 +1,48 @@ +/* l_37_3.c: Translation limits larger than Standard / 3. */ + +/* 37.3L: Significant initial characters in an internal identifier or a + macro name. */ + +#include "defs.h" + +main( void) +{ +/* Name of 127 bytes long. */ + int +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde = 127; + int +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdE = -127; + +#ifndef X7F +/* Name of 255 bytes long. */ + int +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +D123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde = 255; + int +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +D123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdE = -255; +#endif + + fputs( "started\n", stderr); + assert( +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde + == 127); +#ifndef X7F + assert( +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +D123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde + == 255); +#endif + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-l/l_37_3.t b/libraries/mcpp/test-l/l_37_3.t new file mode 100644 index 000000000..1ec51237c --- /dev/null +++ b/libraries/mcpp/test-l/l_37_3.t @@ -0,0 +1,18 @@ +/* l_37_3.t: Translation limits larger than Standard / 3. */ + +/* 37.3L: Significant initial characters in an internal identifier or a + macro name. */ + +/* Name of 127 bytes long. */ + int +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde = 127; +#ifndef X7F +/* Name of 255 bytes long. */ + int +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +D123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde = 255; +#endif + diff --git a/libraries/mcpp/test-l/l_37_4.t b/libraries/mcpp/test-l/l_37_4.t new file mode 100644 index 000000000..9bb5f8ef9 --- /dev/null +++ b/libraries/mcpp/test-l/l_37_4.t @@ -0,0 +1,6 @@ +/* l_37_4.t: Translation limits larger than Standard / 4. */ + +/* 37.4L: Nested conditional inclusion. */ +/* Define one of the macros X7F, XFF. */ +#include "ifdef127.h" + diff --git a/libraries/mcpp/test-l/l_37_5.t b/libraries/mcpp/test-l/l_37_5.t new file mode 100644 index 000000000..ccfb79bc0 --- /dev/null +++ b/libraries/mcpp/test-l/l_37_5.t @@ -0,0 +1,7 @@ +/* l_37_5.t: Translation limits larger than Standard / 5. */ + +/* 37.5L: Nested source file inclusion. */ +/* Define one of the macros X1F, X3F or it will test 127 levels of + #include */ +#include "nest1.h" + diff --git a/libraries/mcpp/test-l/l_37_6.c b/libraries/mcpp/test-l/l_37_6.c new file mode 100644 index 000000000..c6d76db12 --- /dev/null +++ b/libraries/mcpp/test-l/l_37_6.c @@ -0,0 +1,85 @@ +/* l_37_6.t: Translation limits larger than Standard / 6. */ + +#include "defs.h" + +main( void) +{ + int nest; + + fputs( "started\n", stderr); + +/* 37.6L: Parenthesized expression. */ +#ifndef X3F +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - (0x3E + (0x3F - \ + (0x40 + (0x41 - (0x42 + (0x43 - (0x44 + (0x45 - (0x46 + (0x47 - \ + (0x48 + (0x49 - (0x4A + (0x4B - (0x4C + (0x4D - (0x4E + (0x4F - \ + (0x50 + (0x51 - (0x52 + (0x53 - (0x54 + (0x55 - (0x56 + (0x57 - \ + (0x58 + (0x59 - (0x5A + (0x5B - (0x5C + (0x5D - (0x5E + (0x5F - \ + (0x60 + (0x61 - (0x62 + (0x63 - (0x64 + (0x65 - (0x66 + (0x67 - \ + (0x68 + (0x69 - (0x6A + (0x6B - (0x6C + (0x6D - (0x6E + (0x6F - \ + (0x70 + (0x71 - (0x72 + (0x73 - (0x74 + (0x75 - (0x76 + (0x77 - \ + (0x78 + (0x79 - (0x7A + (0x7B - (0x7C + (0x7D - (0x7E + 0x7F) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -0x80 + nest = 127; +#endif + assert( nest == 127); + +#ifndef X7F +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - (0x3E + (0x3F - \ + (0x40 + (0x41 - (0x42 + (0x43 - (0x44 + (0x45 - (0x46 + (0x47 - \ + (0x48 + (0x49 - (0x4A + (0x4B - (0x4C + (0x4D - (0x4E + (0x4F - \ + (0x50 + (0x51 - (0x52 + (0x53 - (0x54 + (0x55 - (0x56 + (0x57 - \ + (0x58 + (0x59 - (0x5A + (0x5B - (0x5C + (0x5D - (0x5E + (0x5F - \ + (0x60 + (0x61 - (0x62 + (0x63 - (0x64 + (0x65 - (0x66 + (0x67 - \ + (0x68 + (0x69 - (0x6A + (0x6B - (0x6C + (0x6D - (0x6E + (0x6F - \ + (0x70 + (0x71 - (0x72 + (0x73 - (0x74 + (0x75 - (0x76 + (0x77 - \ + (0x78 + (0x79 - (0x7A + (0x7B - (0x7C + (0x7D - (0x7E + (0x7F - \ + (0x80 + (0x81 - (0x82 + (0x83 - (0x84 + (0x85 - (0x86 + (0x87 - \ + (0x88 + (0x89 - (0x8A + (0x8B - (0x8C + (0x8D - (0x8E + (0x8F - \ + (0x90 + (0x91 - (0x92 + (0x93 - (0x94 + (0x95 - (0x96 + (0x97 - \ + (0x98 + (0x99 - (0x9A + (0x9B - (0x9C + (0x9D - (0x9E + (0x9F - \ + (0xA0 + (0xA1 - (0xA2 + (0xA3 - (0xA4 + (0xA5 - (0xA6 + (0xA7 - \ + (0xA8 + (0xA9 - (0xAA + (0xAB - (0xAC + (0xAD - (0xAE + (0xAF - \ + (0xB0 + (0xB1 - (0xB2 + (0xB3 - (0xB4 + (0xB5 - (0xB6 + (0xB7 - \ + (0xB8 + (0xB9 - (0xBA + (0xBB - (0xBC + (0xBD - (0xBE + (0xBF - \ + (0xC0 + (0xC1 - (0xC2 + (0xC3 - (0xC4 + (0xC5 - (0xC6 + (0xC7 - \ + (0xC8 + (0xC9 - (0xCA + (0xCB - (0xCC + (0xCD - (0xCE + (0xCF - \ + (0xD0 + (0xD1 - (0xD2 + (0xD3 - (0xD4 + (0xD5 - (0xD6 + (0xD7 - \ + (0xD8 + (0xD9 - (0xDA + (0xDB - (0xDC + (0xDD - (0xDE + (0xDF - \ + (0xE0 + (0xE1 - (0xE2 + (0xE3 - (0xE4 + (0xE5 - (0xE6 + (0xE7 - \ + (0xE8 + (0xE9 - (0xEA + (0xEB - (0xEC + (0xED - (0xEE + (0xEF - \ + (0xF0 + (0xF1 - (0xF2 + (0xF3 - (0xF4 + (0xF5 - (0xF6 + (0xF7 - \ + (0xF8 + (0xF9 - (0xFA + (0xFB - (0xFC + (0xFD - (0xFE + 0xFF) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -0x100 + nest = 255; +#endif + assert( nest == 255); +#endif +#endif + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-l/l_37_6.t b/libraries/mcpp/test-l/l_37_6.t new file mode 100644 index 000000000..20b958d23 --- /dev/null +++ b/libraries/mcpp/test-l/l_37_6.t @@ -0,0 +1,73 @@ +/* l_37_6.t: Translation limits larger than Standard / 6. */ + +/* 37.6L: Parenthesized expression. */ +#ifndef X3F +/* nest = 127; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - (0x3E + (0x3F - \ + (0x40 + (0x41 - (0x42 + (0x43 - (0x44 + (0x45 - (0x46 + (0x47 - \ + (0x48 + (0x49 - (0x4A + (0x4B - (0x4C + (0x4D - (0x4E + (0x4F - \ + (0x50 + (0x51 - (0x52 + (0x53 - (0x54 + (0x55 - (0x56 + (0x57 - \ + (0x58 + (0x59 - (0x5A + (0x5B - (0x5C + (0x5D - (0x5E + (0x5F - \ + (0x60 + (0x61 - (0x62 + (0x63 - (0x64 + (0x65 - (0x66 + (0x67 - \ + (0x68 + (0x69 - (0x6A + (0x6B - (0x6C + (0x6D - (0x6E + (0x6F - \ + (0x70 + (0x71 - (0x72 + (0x73 - (0x74 + (0x75 - (0x76 + (0x77 - \ + (0x78 + (0x79 - (0x7A + (0x7B - (0x7C + (0x7D - (0x7E + 0x7F) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -0x80 + nest = 127; +#endif + +#ifndef X7F +/* nest = 255; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - (0x3E + (0x3F - \ + (0x40 + (0x41 - (0x42 + (0x43 - (0x44 + (0x45 - (0x46 + (0x47 - \ + (0x48 + (0x49 - (0x4A + (0x4B - (0x4C + (0x4D - (0x4E + (0x4F - \ + (0x50 + (0x51 - (0x52 + (0x53 - (0x54 + (0x55 - (0x56 + (0x57 - \ + (0x58 + (0x59 - (0x5A + (0x5B - (0x5C + (0x5D - (0x5E + (0x5F - \ + (0x60 + (0x61 - (0x62 + (0x63 - (0x64 + (0x65 - (0x66 + (0x67 - \ + (0x68 + (0x69 - (0x6A + (0x6B - (0x6C + (0x6D - (0x6E + (0x6F - \ + (0x70 + (0x71 - (0x72 + (0x73 - (0x74 + (0x75 - (0x76 + (0x77 - \ + (0x78 + (0x79 - (0x7A + (0x7B - (0x7C + (0x7D - (0x7E + (0x7F - \ + (0x80 + (0x81 - (0x82 + (0x83 - (0x84 + (0x85 - (0x86 + (0x87 - \ + (0x88 + (0x89 - (0x8A + (0x8B - (0x8C + (0x8D - (0x8E + (0x8F - \ + (0x90 + (0x91 - (0x92 + (0x93 - (0x94 + (0x95 - (0x96 + (0x97 - \ + (0x98 + (0x99 - (0x9A + (0x9B - (0x9C + (0x9D - (0x9E + (0x9F - \ + (0xA0 + (0xA1 - (0xA2 + (0xA3 - (0xA4 + (0xA5 - (0xA6 + (0xA7 - \ + (0xA8 + (0xA9 - (0xAA + (0xAB - (0xAC + (0xAD - (0xAE + (0xAF - \ + (0xB0 + (0xB1 - (0xB2 + (0xB3 - (0xB4 + (0xB5 - (0xB6 + (0xB7 - \ + (0xB8 + (0xB9 - (0xBA + (0xBB - (0xBC + (0xBD - (0xBE + (0xBF - \ + (0xC0 + (0xC1 - (0xC2 + (0xC3 - (0xC4 + (0xC5 - (0xC6 + (0xC7 - \ + (0xC8 + (0xC9 - (0xCA + (0xCB - (0xCC + (0xCD - (0xCE + (0xCF - \ + (0xD0 + (0xD1 - (0xD2 + (0xD3 - (0xD4 + (0xD5 - (0xD6 + (0xD7 - \ + (0xD8 + (0xD9 - (0xDA + (0xDB - (0xDC + (0xDD - (0xDE + (0xDF - \ + (0xE0 + (0xE1 - (0xE2 + (0xE3 - (0xE4 + (0xE5 - (0xE6 + (0xE7 - \ + (0xE8 + (0xE9 - (0xEA + (0xEB - (0xEC + (0xED - (0xEE + (0xEF - \ + (0xF0 + (0xF1 - (0xF2 + (0xF3 - (0xF4 + (0xF5 - (0xF6 + (0xF7 - \ + (0xF8 + (0xF9 - (0xFA + (0xFB - (0xFC + (0xFD - (0xFE + 0xFF) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\ + )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -0x100 + nest = 255; +#endif +#endif +#endif + diff --git a/libraries/mcpp/test-l/l_37_7.c b/libraries/mcpp/test-l/l_37_7.c new file mode 100644 index 000000000..a0383126e --- /dev/null +++ b/libraries/mcpp/test-l/l_37_7.c @@ -0,0 +1,146 @@ +/* l_37_7.c: Translation limits larger than Standard / 7. */ + +#include "defs.h" + +main( void) +{ +/* 37.7L: Characters in a string (after concatenation). */ +/* 8191 bytes long. */ + char *string8189 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +D123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +E123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +F123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +G123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" +; + + fputs( "started\n", stderr); + assert( strlen( string8189) == 8189); + + fputs( "success\n", stderr); + return 0; +} + diff --git a/libraries/mcpp/test-l/l_37_7.t b/libraries/mcpp/test-l/l_37_7.t new file mode 100644 index 000000000..cf82da855 --- /dev/null +++ b/libraries/mcpp/test-l/l_37_7.t @@ -0,0 +1,135 @@ +/* l_37_7.t: Translation limits larger than Standard / 7. */ + +/* 37.7L: Characters in a string (after concatenation). */ +/* 8191 bytes long. */ + char *string8189 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +D123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +E123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +F123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +G123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" +; + diff --git a/libraries/mcpp/test-l/l_37_8.c b/libraries/mcpp/test-l/l_37_8.c new file mode 100644 index 000000000..73864dded --- /dev/null +++ b/libraries/mcpp/test-l/l_37_8.c @@ -0,0 +1,7 @@ +/* l_37_8.c: Translation limits larger than Standard / 8. */ + +/* 37.8L: Length of logical source line. */ +/* Define one of the macros X03FF, X07FF, X0FFF, X1FFF or it will test + the line of 0x3fff bytes long. */ +#include "longline.c" + diff --git a/libraries/mcpp/test-l/l_37_9.t b/libraries/mcpp/test-l/l_37_9.t new file mode 100644 index 000000000..b79f487f0 --- /dev/null +++ b/libraries/mcpp/test-l/l_37_9.t @@ -0,0 +1,14 @@ +/* l_37_9.t: Translation limits larger than Standard / 9. */ + +/* 37.9L: Number of macro definitions. */ + +#include "m8191.h" + +#ifdef X0FFF +/* 0x0fff; */ + GBM; +#else +/* 0x1fff; */ + MDA; +#endif + diff --git a/libraries/mcpp/test-l/longline.c b/libraries/mcpp/test-l/longline.c new file mode 100644 index 000000000..6e95c287d --- /dev/null +++ b/libraries/mcpp/test-l/longline.c @@ -0,0 +1,1537 @@ +/* longline.c: source of long logical line. */ + +typedef unsigned int size_t; \ +typedef struct __sfpos { \ +char _pos[8]; \ +} fpos_t; \ +struct __sbuf { \ +unsigned char *_base; \ +int _size; \ +}; \ +typedef struct __sFILE { \ +unsigned char *_p; \ +int _r; \ +int _w; \ +short _flags; \ +short _file; \ +struct __sbuf _bf; \ +int _lbfsize; \ + \ + \ +void *_cookie; \ +int (*_close) (void *) ; \ +int (*_read) (void *, char *, int) ; \ +fpos_t (*_seek) (void *, fpos_t, int) ; \ +int (*_write) (void *, const char *, int) ; \ + \ + \ +struct __sbuf _ub; \ +unsigned char *_up; \ +int _ur; \ + \ + \ +unsigned char _ubuf[3]; \ +unsigned char _nbuf[1]; \ + \ + \ +struct __sbuf _lb; \ + \ + \ +int _blksize; \ +fpos_t _offset; \ +} FILE; \ + \ + \ +extern FILE __sF[]; \ + \ + \ +void clearerr (FILE *) ; \ +int fclose (FILE *) ; \ +int feof (FILE *) ; \ +int ferror (FILE *) ; \ +int fflush (FILE *) ; \ +int fgetc (FILE *) ; \ +int fgetpos (FILE *, fpos_t *) ; \ +char *fgets (char *, size_t, FILE *) ; \ +FILE *fopen (const char *, const char *) ; \ +int fprintf (FILE *, const char *, ...) ; \ +int fputc (int, FILE *) ; \ +int fputs (const char *, FILE *) ; \ + \ + +#ifndef X03FF + +size_t fread (void *, size_t, size_t, FILE *) ; \ +FILE *freopen (const char *, const char *, FILE *) ; \ +int fscanf (FILE *, const char *, ...) ; \ +int fseek (FILE *, long, int) ; \ +int fsetpos (FILE *, const fpos_t *) ; \ +long ftell (const FILE *) ; \ +size_t fwrite (const void *, size_t, size_t, FILE *) ; \ +int getc (FILE *) ; \ +int getchar (void) ; \ +char *gets (char *) ; \ + \ +extern int sys_nerr; \ +extern const char * const sys_errlist[]; \ + \ +void perror (const char *) ; \ +int printf (const char *, ...) ; \ +int putc (int, FILE *) ; \ +int putchar (int) ; \ +int puts (const char *) ; \ +int remove (const char *) ; \ +int rename (const char *, const char *) ; \ +void rewind (FILE *) ; \ +int scanf (const char *, ...) ; \ +void setbuf (FILE *, char *) ; \ +int setvbuf (FILE *, char *, int, size_t) ; \ +int sprintf (char *, const char *, ...) ; \ +int sscanf (const char *, const char *, ...) ; \ +FILE *tmpfile (void) ; \ +char *tmpnam (char *) ; \ +int ungetc (int, FILE *) ; \ +int vfprintf (FILE *, const char *, char * ) ; \ +int vprintf (const char *, char * ) ; \ +int vsprintf (char *, const char *, char * ) ; \ + \ + \ +char *ctermid (char *) ; \ +FILE *fdopen (int, const char *) ; \ +int fileno (FILE *) ; \ + \ + \ +char *fgetln (FILE *, size_t *) ; \ +int fpurge (FILE *) ; \ +int getw (FILE *) ; \ +int pclose (FILE *) ; \ +FILE *popen (const char *, const char *) ; \ +int putw (int, FILE *) ; \ +void setbuffer (FILE *, char *, int) ; \ +int setlinebuf (FILE *) ; \ +char *tempnam (const char *, const char *) ; \ +int snprintf (char *, size_t, const char *, ...) ; \ +int vsnprintf (char *, size_t, const char *, char * ) ; \ +int vscanf (const char *, char * ) ; \ +int vsscanf (const char *, const char *, char * ) ; \ +FILE *zopen (const char *, const char *, int) ; \ + \ + \ +FILE *funopen (const void *, int (*)(void *, char *, int), int (*)(void *, const char *, int), fpos_t (*)(void *, fpos_t, int), int (*)(void *)) ; \ + \ + \ +int __srget (FILE *) ; \ +int __svfscanf (FILE *, const char *, char * ) ; \ +int __swbuf (int, FILE *) ; \ + \ +typedef int rune_t; \ + \ + +#ifndef X07FF + +typedef int wchar_t; \ +typedef struct { \ +rune_t min; \ +rune_t max; \ +rune_t map; \ +unsigned long *types; \ +} _RuneEntry; \ + \ +typedef struct { \ +int nranges; \ +_RuneEntry *ranges; \ +} _RuneRange; \ + \ +typedef struct { \ +char magic[8]; \ +char encoding[32]; \ + \ +rune_t (*sgetrune) \ + (const char *, unsigned int, char const **) ; \ +int (*sputrune) \ + (rune_t, char *, unsigned int, char **) ; \ +rune_t invalid_rune; \ + \ +unsigned long runetype[ (1 <<8 ) ]; \ +rune_t maplower[ (1 <<8 ) ]; \ +rune_t mapupper[ (1 <<8 ) ]; \ +_RuneRange runetype_ext; \ +_RuneRange maplower_ext; \ +_RuneRange mapupper_ext; \ + \ +void *variable; \ +int variable_len; \ +} _RuneLocale; \ + \ + \ + \ +extern _RuneLocale _DefaultRuneLocale; \ +extern _RuneLocale *_CurrentRuneLocale; \ + \ +unsigned long ___runetype ( int ) ; \ + int ___tolower ( int ) ; \ + int ___toupper ( int ) ; \ + \ + \ +int __istype ( int , unsigned long) ; \ +int __isctype ( int , unsigned long) ; \ + int toupper ( int ) ; \ + int tolower ( int ) ; \ + \ +extern int errno; \ + \ +void *memchr (const void *, int, size_t) ; \ +int memcmp (const void *, const void *, size_t) ; \ +void *memcpy (void *, const void *, size_t) ; \ +void *memmove (void *, const void *, size_t) ; \ +void *memset (void *, int, size_t) ; \ +char *strcat (char *, const char *) ; \ +char *strchr (const char *, int) ; \ +int strcmp (const char *, const char *) ; \ +int strcoll (const char *, const char *) ; \ +char *strcpy (char *, const char *) ; \ +size_t strcspn (const char *, const char *) ; \ +char *strerror (int) ; \ +size_t strlen (const char *) ; \ +char *strncat (char *, const char *, size_t) ; \ +int strncmp (const char *, const char *, size_t) ; \ +char *strncpy (char *, const char *, size_t) ; \ +char *strpbrk (const char *, const char *) ; \ +char *strrchr (const char *, int) ; \ +size_t strspn (const char *, const char *) ; \ +char *strstr (const char *, const char *) ; \ +char *strtok (char *, const char *) ; \ +size_t strxfrm (char *, const char *, size_t) ; \ + \ + \ + \ +int bcmp (const void *, const void *, size_t) ; \ +void bcopy (const void *, void *, size_t) ; \ +void bzero (void *, size_t) ; \ +int ffs (int) ; \ +char *index (const char *, int) ; \ +void *memccpy (void *, const void *, int, size_t) ; \ +char *rindex (const char *, int) ; \ +int strcasecmp (const char *, const char *) ; \ +char *strdup (const char *) ; \ +void strmode (int, char *) ; \ +int strncasecmp (const char *, const char *, size_t) ; \ +char *strsep (char **, const char *) ; \ +void swab (const void *, void *, size_t) ; \ + \ + \ +typedef struct { \ +int quot; \ +int rem; \ +} div_t; \ + \ +typedef struct { \ +long quot; \ +long rem; \ +} ldiv_t; \ +extern int __mb_cur_max; \ + \ + \ + void \ +abort (void) ; \ + int \ +abs (int) ; \ +int atexit (void (*)(void)) ; \ +double atof (const char *) ; \ +int atoi (const char *) ; \ +long atol (const char *) ; \ +void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +void *calloc (size_t, size_t) ; \ + div_t \ +div (int, int) ; \ + void \ +exit (int) ; \ +void free (void *) ; \ +char *getenv (const char *) ; \ + long \ +labs (long) ; \ + ldiv_t \ +ldiv (long, long) ; \ +void *malloc (size_t) ; \ +void qsort (void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +int rand (void) ; \ +void *realloc (void *, size_t) ; \ +void srand (unsigned) ; \ +double strtod (const char *, char **) ; \ +long strtol (const char *, char **, int) ; \ +unsigned long \ +strtoul (const char *, char **, int) ; \ +int system (const char *) ; \ + \ + \ +int mblen (const char *, size_t) ; \ +size_t mbstowcs (wchar_t *, const char *, size_t) ; \ +int wctomb (char *, wchar_t) ; \ +int mbtowc (wchar_t *, const char *, size_t) ; \ +size_t wcstombs (char *, const wchar_t *, size_t) ; \ + \ + \ +int putenv (const char *) ; \ +int setenv (const char *, const char *, int) ; \ + \ + \ + \ +double drand48 (void) ; \ +double erand48 (unsigned short[3]) ; \ +long lrand48 (void) ; \ +long nrand48 (unsigned short[3]) ; \ +long mrand48 (void) ; \ +long jrand48 (unsigned short[3]) ; \ +void srand48 (long) ; \ +unsigned short *seed48 (unsigned short[3]) ; \ +void lcong48 (unsigned short[7]) ; \ + \ +void *alloca (size_t) ; \ + \ +char *getbsize (int *, long *) ; \ +char *cgetcap (char *, char *, int) ; \ +int cgetclose (void) ; \ + \ + +#ifndef X0FFF + +int cgetent (char **, char **, char *) ; \ +int cgetfirst (char **, char **) ; \ +int cgetmatch (char *, char *) ; \ +int cgetnext (char **, char **) ; \ +int cgetnum (char *, char *, long *) ; \ +int cgetset (char *) ; \ +int cgetstr (char *, char *, char **) ; \ +int cgetustr (char *, char *, char **) ; \ + \ +int daemon (int, int) ; \ +char *devname (int, int) ; \ +int getloadavg (double [], int) ; \ + \ +extern char *optarg; \ +extern int opterr, optind, optopt; \ +int getopt (int, char * const *, const char *) ; \ + \ +extern char *suboptarg; \ +int getsubopt (char **, char * const *, char **) ; \ + \ +char *group_from_gid (unsigned long, int) ; \ +int heapsort (void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +char *initstate (unsigned, char *, int) ; \ +int mergesort (void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +int radixsort (const unsigned char **, int, const unsigned char *, unsigned) ; \ +int sradixsort (const unsigned char **, int, const unsigned char *, unsigned) ; \ +long random (void) ; \ +char *realpath (const char *, char resolved_path[]) ; \ +char *setstate (char *) ; \ +void srandom (unsigned) ; \ +char *user_from_uid (unsigned long, int) ; \ +void unsetenv (const char *) ; \ + \ + \ +typedef int ptrdiff_t; \ +typedef unsigned long clock_t; \ + \ + \ + \ + \ +typedef long time_t; \ +struct tm { \ +int tm_sec; \ +int tm_min; \ +int tm_hour; \ +int tm_mday; \ +int tm_mon; \ +int tm_year; \ +int tm_wday; \ +int tm_yday; \ +int tm_isdst; \ +long tm_gmtoff; \ +char *tm_zone; \ +}; \ + \ +char *asctime (const struct tm *) ; \ +clock_t clock (void) ; \ +char *ctime (const time_t *) ; \ +double difftime (time_t, time_t) ; \ +struct tm *gmtime (const time_t *) ; \ +struct tm *localtime (const time_t *) ; \ +time_t mktime (struct tm *) ; \ +size_t strftime (char *, size_t, const char *, const struct tm *) ; \ +time_t time (time_t *) ; \ + \ + \ +void tzset (void) ; \ + \ + \ + \ +char *timezone (int, int) ; \ +void tzsetwall (void) ; \ + \ + \ +extern int getopt( int argc, char * const * argv, const char * opts); \ +extern char * stpcpy( char * dest, const char * src); \ +typedef struct defbuf { \ +struct defbuf * link; \ +short nargs; \ + \ +char * parmnames; \ + \ +char * repl; \ +char name[1]; \ +} DEFBUF; \ +typedef struct fileinfo { \ +char * bptr; \ +unsigned line; \ +FILE * fp; \ +long pos; \ +struct fileinfo * parent; \ +struct ifinfo * initif; \ +char * filename; \ +char * buffer; \ +} FILEINFO; \ +typedef struct ifinfo { \ +int stat; \ +unsigned ifline; \ +unsigned elseline; \ +} IFINFO; \ +typedef struct val_sign { \ +long val; \ +int sign; \ +} VAL_SIGN; \ +extern int cflag; \ +extern int eflag; \ +extern int iflag; \ +extern int lflag; \ +extern int pflag; \ +extern int qflag; \ + \ +extern int tflag; \ + \ + \ + \ +extern int digraphs; \ + \ +extern int stdc_val; \ +extern long cplus; \ +extern int stdc2; \ +extern int has_pragma; \ + \ +extern int std_line_prefix; \ +extern int warn_level; \ +extern int errors; \ +extern unsigned line; \ +extern int wrongline; \ +extern int keepcomments; \ +extern int no_output; \ +extern int in_directive; \ +extern int in_define; \ +extern unsigned macro_line; \ +extern int openum; \ +extern IFINFO * ifptr; \ +extern FILEINFO * infile; \ +extern int mkdep; \ + \ +extern char * workp; \ +extern char * const work_end; \ +extern char identifier[ 0xFF + 1]; \ +extern const char type[]; \ +extern IFINFO ifstack[]; \ +extern char work[]; \ +extern int debug; \ +extern void curfile( void); \ +extern int openfile( const char * filename, int local); \ +extern void unpredefine( int clearall); \ + \ +extern int control( int newlines); \ +extern DEFBUF * lookid( const char * name); \ +extern DEFBUF * install( const char * name, int nargs, const char * parmnames \ +, const char * repl); \ +extern int undefine( const char * name); \ +extern void dumpadef( const char * why, const DEFBUF * dp, int newdef); \ +extern void dumpdef( void); \ + \ +extern long eval( void); \ +extern VAL_SIGN * evalnum( const char * nump); \ + \ +extern DEFBUF * is_macro( char ** cp); \ +extern char * expand( DEFBUF * defp, char * out, char * out_end); \ + \ +extern int get_unexpandable( int c, int diag); \ +extern void skipnl( void); \ +extern int skipws( void); \ +extern int scantoken( int c, char ** out_pp, char * out_end); \ +extern char * scanquote( int delim, char * out, char * out_end, int diag); \ +extern int get( void); \ + \ +extern int trigraph( char * in); \ +extern void unget( void); \ +extern FILEINFO * ungetstring( const char * text, const char * name); \ +extern char * savestring( const char * text); \ +extern FILEINFO * getfile( const char * name, size_t bufsize); \ +extern char * (xmalloc)( size_t size); \ +extern char * (xrealloc)( char * ptr, size_t size); \ +extern void cfatal( const char * format, const char * arg1, int arg2 \ +, const char * arg3); \ +extern void cerror( const char * format, const char * arg1, int arg2 \ +, const char * arg3); \ +extern void cwarn( const char * format, const char * arg1, int arg2 \ +, const char * arg3); \ + \ +extern void dooptions( int argc, char ** argv, char ** in_pp \ +, char ** out_pp); \ +extern int reopen_stdout( const char * filename); \ +extern void setstdin( char * cp); \ +extern void put_start_file( char * filename); \ +extern void sharp( void); \ +extern void putfname( char * filename); \ +extern int getredirection( int argc, char ** argv); \ + \ +extern void put_depend( const char * filename); \ + \ +extern int doinclude( void); \ + \ +extern void dopragma( void); \ +extern void put_source( const char * src); \ +extern void alloc_mem( void); \ + \ + \ + \ +extern void dumpstring( const char * why, const char * text); \ +extern void dumpunget( const char * why); \ + \ +extern void print_heap( void); \ +static void scanid( int c); \ +static char * scannumber( int c, char * out, char * out_end); \ +static char * scanop( int c, char * out); \ +static char * parse_line( void); \ +static char * read_a_comment( char * sp); \ +static char * getline( int in_comment); \ +static void at_eof( int in_comment); \ +void dumptoken( int token_type, const char * cp); \ +int \ + \ +get_unexpandable( int c, int diag) \ +{ \ +DEFBUF * defp; \ +FILEINFO * file; \ +FILE * fp = 0 ; \ +int token_type = 0 ; \ + \ +while (c != '\0' && c != '\n' \ +&& (fp = infile->fp, \ +(token_type = scantoken( c, (workp = work, &workp), work_end)) == 65 ) \ +&& fp != 0 \ +&& (defp = is_macro( (char **) 0 )) != 0 ) { \ +expand( defp, work, work_end); \ +file = ungetstring( work, defp->name); \ +c = skipws(); \ +if (file != infile && macro_line != 65535U && (warn_level & 1)) \ +cwarn( "Macro \"%s\" is expanded to 0 token" \ +, defp->name, 0, ((char *) 0 ) ); \ +} \ + \ +if (c == '\n' || c == '\0' ) { \ +unget(); \ +return 0 ; \ +} \ + \ +if (diag && fp == 0 && token_type == 65 ) { \ + \ +if ( (strcmp(identifier, "defined") == 0) && (warn_level & 1)) \ +cwarn( "Macro \"%s\" is expanded to \"defined\"" \ +, defp->name, 0, ((char *) 0 ) ); \ +} \ +return token_type; \ +} \ + \ +void \ + \ +skipnl( void) \ +{ \ +while (infile && infile->fp == 0 ) { \ +infile->bptr += strlen( infile->bptr); \ +get(); \ +} \ +if (infile) \ +infile->bptr += strlen( infile->bptr); \ +} \ + \ +int \ + \ +skipws( void) \ +{ \ + int c; \ + \ +do { \ +c = get(); \ +} \ + \ +while (c == ' ' || c == 0x1F ); \ +return c; \ +} \ +int \ + \ +scantoken( int c, char ** out_pp, char * out_end) \ +{ \ + char * out = *out_pp; \ +int ch_type; \ +int token_type = 0; \ +int ch; \ + \ + \ +ch_type = type[ c] & (~ ((char)128) & 255 ); \ +switch (ch_type) { \ +case 1 : \ +switch (c) { \ + \ +case 'L': \ +ch = (*infile->bptr++ & 255 ) ; \ +if (type[ ch] & 16 ) { \ +if (ch == '"') \ +token_type = 68 ; \ +else \ +token_type = 70 ; \ +c = ch; \ +*out++ = 'L'; \ +break; \ +} else { \ + (infile->bptr--) ; \ +} \ + \ +default: \ +scanid( c); \ +out = stpcpy( out, identifier); \ +token_type = 65 ; \ +break; \ +} \ +if (token_type == 65 ) \ +break; \ + \ +case 16 : \ +out = scanquote( c, out, out_end, 0 ); \ +if (token_type == 0) { \ +if (c == '"') \ +token_type = 67 ; \ +else \ +token_type = 69 ; \ +} \ +break; \ +case 4 : \ +ch = (*infile->bptr++ & 255 ) ; \ + (infile->bptr--) ; \ +if (type[ ch] != 2 ) \ +goto operat; \ + \ +case 2 : \ +out = scannumber( c, out, out_end); \ +token_type = 66 ; \ +break; \ +case 8 : \ +operat: out = scanop( c, out); \ +token_type = 71 ; \ +break; \ +default: \ +if \ + \ + \ + \ +((type[ c] & 32 ) || c == 0x1E || c == 0x1D ) \ + \ +token_type = 73 ; \ +else \ +token_type = 72 ; \ +*out++ = c; \ +*out = '\0' ; \ +break; \ +} \ + \ +if (out_end < out) \ +cfatal( "Buffer overflow scanning token \"%s\"" \ +, *out_pp, 0, ((char *) 0 ) ); \ + \ +if (debug & 2 ) \ +dumptoken( token_type, *out_pp); \ +*out_pp = out; \ + \ +return token_type; \ +} \ + \ +static void \ + \ +scanid( int c) \ +{ \ +static char * const limit = &identifier[ 0xFF ]; \ +int long_ident = 0 ; \ + char * bp; \ + \ +bp = identifier; \ + \ +do { \ +*bp++ = c; \ + \ + +#ifndef X1FFF + +c = (*infile->bptr++ & 255 ) ; \ +} while ((type[ c] & ( 1 | 2 )) && bp < limit); \ +if (type[ c] & ( 1 | 2 )) { \ +long_ident = 1 ; \ +do { \ +c = (*infile->bptr++ & 255 ) ; \ +} while (type[ c] & ( 1 | 2 )); \ +} \ + (infile->bptr--) ; \ +*bp = '\0' ; \ + \ +if (long_ident && (warn_level & 1)) \ +cwarn( "Too long identifier truncated to \"%s\"" \ +, identifier, 0, ((char *) 0 ) ); \ + \ +if (infile->fp && bp - identifier > 0x1F && (warn_level & 2)) \ +cwarn( "Identifier longer than %.0s%d bytes \"%s\"" \ +, ((char *) 0 ) , 0x1F , identifier); \ +} \ + \ +char * \ + \ +scanquote( int delim, char * out, char * out_end, int diag) \ +{ \ +const char * const skip_line = ", skipped the line"; \ +const char * skip; \ + int c; \ +int c1; \ +char * out_p = out; \ + \ +*out_p++ = delim; \ + \ +if (delim == '<') \ +delim = '>'; \ + \ + \ +while ((c = (*infile->bptr++ & 255 ) ) != '\0' ) { \ + \ + \ +if (type[ c] & 64 ) { \ +c1 = (*infile->bptr++ & 255 ) ; \ +if (type[ c1] & ((char)128) ) { \ +*out_p++ = c; \ +*out_p++ = c1; \ +goto chk_limit; \ +} else { \ + (infile->bptr--) ; \ +*out_p++ = c; \ +if (infile->fp != 0 && ifstack[0].stat && diag) { \ +*out_p = c1; \ +*(out_p + 1) = '\0' ; \ +if (warn_level & 1) \ +cwarn( \ +"Illegal multi-byte character sequence \"%s\" in quotation", \ +out_p - 1, 0, ((char *) 0 ) ); \ +} \ +continue; \ +} \ +} \ + \ +if (c == delim) { \ +break; \ +} else if (c == '\\' \ + \ +&& delim != '>' \ + \ +) { \ +*out_p++ = c; \ +c = (*infile->bptr++ & 255 ) ; \ + \ +if (type[ c] & 64 ) { \ + (infile->bptr--) ; \ +continue; \ +} \ +} else if (c == ' ' && delim == '>' && infile->fp == 0 ) { \ +continue; \ + \ +} else if (c == '\n') { \ +break; \ +} \ +if (diag && __istype((c), 0x00000200L ) && ((type[ c] & 32 ) == 0) && (warn_level & 1)) \ +cwarn( \ +"Illegal control character %.0s0x%02x in quotation" \ +, ((char *) 0 ) , c, ((char *) 0 ) ); \ +*out_p++ = c; \ +chk_limit: \ +if (out_end < out_p) { \ +*out_end = '\0' ; \ +cfatal( "Too long quotation %s", out, 0, ((char *) 0 ) ); \ +} \ +} \ + \ +if (c == '\n' || c == '\0' ) \ + (infile->bptr--) ; \ +if (c == delim) \ +*out_p++ = delim; \ +*out_p = '\0' ; \ +if (diag) { \ +skip = (infile->fp == 0 ) ? ((char *) 0 ) : skip_line; \ +if (c != delim) { \ +if (delim == '"') \ +cerror( "Unterminated string literal %s%.0d%s" \ +, out, 0, skip); \ +else if (delim == '\'') \ +cerror( "Unterminated character constant %s%.0d%s" \ +, out, 0, skip); \ + \ +else \ +cerror( "Unterminated header name %s%.0d%s" \ +, out, 0, skip); \ + \ +out_p = 0 ; \ +} else if (delim == '\'' && out_p - out <= 2) { \ +cerror( "Empty character constant %s%.0d%s" \ +, out, 0, skip); \ +out_p = 0 ; \ +} \ +if (out_p - out > 0x1FD && (warn_level & 2)) \ +cwarn( "Quotation longer than %.0s%d bytes %s" \ +, ((char *) 0 ) , 0x1FD , out); \ + \ +} \ + \ +return out_p; \ +} \ +static char * \ + \ +scannumber( int c, char * out, char * out_end) \ +{ \ +char * out_p = out; \ + \ +do { \ +*out_p++ = c; \ +if (c == 'E' || c == 'e') { \ +c = (*infile->bptr++ & 255 ) ; \ +if (c == '+' || c == '-') { \ +*out_p++ = c; \ +c = (*infile->bptr++ & 255 ) ; \ +} \ +} else { \ +c = (*infile->bptr++ & 255 ) ; \ +} \ +} while (type[ c] & ( 2 | 4 | 1 )); \ + \ +*out_p = '\0' ; \ +if (out_end < out_p) \ +cfatal( "Too long pp-number token \"%s\"" \ +, out, 0, ((char *) 0 ) ); \ + (infile->bptr--) ; \ +return out_p; \ +} \ +static char * \ + \ +scanop( int c, char * out) \ +{ \ +int c2, c3; \ + \ +int c4; \ + \ + \ +*out++ = c; \ + \ +switch (c) { \ +case '~': openum = 5 ; break; \ +case '(': openum = 2 ; break; \ +case ')': openum = 27 ; break; \ +case '?': openum = 25 ; break; \ +case ';': case '[': case ']': case '{': \ +case '}': case ',': \ +openum = 32 ; \ +break; \ +default: \ +openum = 33 ; \ +} \ + \ +if (openum != 33 ) { \ +*out = '\0' ; \ +return out; \ +} \ + \ +c2 = (*infile->bptr++ & 255 ) ; \ +*out++ = c2; \ + \ +switch (c) { \ +case '=': \ +openum = ((c2 == '=') ? 18 : 32 ); \ +break; \ +case '!': \ +openum = ((c2 == '=') ? 19 : 6 ); \ +break; \ +case '&': \ +switch (c2) { \ +case '&': openum = 23 ; break; \ +case '=': break; \ +default : openum = 20 ; break; \ +} \ +break; \ +case '|': \ +switch (c2) { \ +case '|': openum = 24 ; break; \ +case '=': break; \ +default : openum = 22 ; break; \ +} \ +break; \ +case '<': \ +switch (c2) { \ +case '<': c3 = (*infile->bptr++ & 255 ) ; \ +if (c3 == '=') { \ +openum = 34 ; \ +*out++ = c3; \ +} else { \ +openum = 12 ; \ + (infile->bptr--) ; \ +} \ +break; \ +case '=': openum = 15 ; break; \ + \ +case ':': \ +if (digraphs) \ +openum = 0x42 ; \ +else \ +openum = 14 ; \ +break; \ +case '%': \ +if (digraphs) \ +openum = 0x40 ; \ +else \ +openum = 14 ; \ +break; \ + \ +default : openum = 14 ; break; \ +} \ +break; \ +case '>': \ +switch (c2) { \ +case '>': c3 = (*infile->bptr++ & 255 ) ; \ +if (c3 == '=') { \ +openum = 34 ; \ +*out++ = c3; \ +} else { \ +openum = 13 ; \ + (infile->bptr--) ; \ +} \ +break; \ +case '=': openum = 17 ; break; \ +default : openum = 16 ; break; \ +} \ +break; \ +case '#': \ + \ +if (in_define) \ +openum = ((c2 == '#') ? 31 : 30 ); \ +else \ + \ +openum = 32 ; \ +break; \ +case '+': \ +switch (c2) { \ +case '+': \ +case '=': break; \ +default : openum = 10 ; break; \ +} \ +break; \ +case '-': \ +switch (c2) { \ +case '-': \ +case '=': \ + \ +break; \ +case '>': \ + \ +if (cplus) { \ +if ((c3 = (*infile->bptr++ & 255 ) ) == '*') { \ +openum = 34 ; \ +*out++ = c3; \ +} else { \ + \ + (infile->bptr--) ; \ +} \ +} \ +break; \ +default : openum = 11 ; break; \ +} \ +break; \ +case '%': \ +switch (c2) { \ +case '=': break; \ + \ +case '>': \ +if (digraphs) \ +openum = 0x41 ; \ +else \ +openum = 9 ; \ +break; \ +case ':': \ +if (! digraphs || ! in_define) { \ +openum = 9 ; \ +} else if ((c3 = (*infile->bptr++ & 255 ) ) == '%') { \ +if ((c4 = (*infile->bptr++ & 255 ) ) == ':') { \ +openum = 31 ; \ +*out++ = c3; \ +*out++ = c4; \ +} else { \ + (infile->bptr--) ; \ + (infile->bptr--) ; \ +openum = 30 ; \ +} \ +} else { \ + (infile->bptr--) ; \ +openum = 30 ; \ +} \ +break; \ + \ +default : openum = 9 ; break; \ +} \ +break; \ +case '*': \ +if (c2 != '=') \ +openum = 7 ; \ + \ +break; \ +case '/': \ +if (c2 != '=') \ +openum = 8 ; \ + \ +break; \ +case '^': \ +if (c2 != '=') \ +openum = 21 ; \ + \ +break; \ +case '.': \ + \ +if (c2 == '.') { \ +c3 = (*infile->bptr++ & 255 ) ; \ +if (c3 == '.') { \ +openum = 34 ; \ +*out++ = c3; \ +break; \ +} else { \ + (infile->bptr--) ; \ +openum = 32 ; \ +} \ +} \ + \ +else if (cplus && c2 == '*') \ +; \ + \ +else \ +openum = 32 ; \ +break; \ +case ':': \ + \ +if (stdc2 && c2 == ':') \ +; \ + \ +else if (c2 == '>' && digraphs) \ +openum = 0x43 ; \ + \ +else \ +openum = 26 ; \ +break; \ +default: \ + \ +cfatal( "Bug: Punctuator is mis-implemented %.0s0x%x" \ +, ((char *) 0 ) , c, ((char *) 0 ) ); \ + \ +openum = 32 ; \ +break; \ +} \ + \ +switch (openum) { \ + \ +case 30 : \ + \ +if (c == '%') break; \ + \ + \ +case 32 : \ +case 6 : case 20 : case 22 : case 14 : \ +case 16 : case 10 : case 11 : case 9 : \ +case 7 : case 8 : case 21 : case 5 : \ +case 26 : \ + \ + (infile->bptr--) ; \ +out--; \ +break; \ +default: \ +break; \ +} \ + \ +*out = '\0' ; \ +return out; \ +} \ +int \ + \ +get( void) \ +{ \ +int len; \ + int c; \ + FILEINFO * file; \ + \ +if ((file = infile) == 0 ) \ +return 0 ; \ +if (debug & 32 ) { \ +printf( "get(%s), line %u, bptr = %d, buffer" \ +, file->filename ? file->filename : "NULL" \ +, line, (int) (file->bptr - file->buffer)); \ +dumpstring( ((char *) 0 ) , file->buffer); \ +dumpunget( "get entrance"); \ +} \ +if ((c = (*file->bptr++ & 255 )) != '\0' ) { \ + \ +return c; \ +} \ +if (file->fp && \ +parse_line() != 0 ) \ +return get(); \ +infile = file->parent; \ +if (infile == 0 ) \ +return 0 ; \ +free(( char *)file->buffer); \ +if (file->filename) \ +free( file->filename); \ +if (file->fp) { \ +fclose( file->fp); \ +if (! (strcmp("stdin", infile->filename) == 0) ) { \ +infile->fp = fopen( infile->filename, "r"); \ +fseek( infile->fp, infile->pos, 0 ); \ +} \ +len = (int) (infile->bptr - infile->buffer); \ +infile->buffer = xrealloc( infile->buffer, 0x4000 ); \ + \ +infile->bptr = infile->buffer + len; \ +line = infile->line; \ +wrongline = 1 ; \ +} \ +free(( char *)file); \ +return get(); \ +} \ + \ +static char * \ + \ +parse_line( void) \ +{ \ +char * temp; \ +char * limit; \ +char * tp; \ +char * sp; \ + int c; \ + \ +if ((sp = getline( 0 )) == 0 ) \ +return 0 ; \ +tp = temp = xmalloc( (size_t) 0x4000 ); \ +limit = temp + 0x4000 - 2; \ + \ +while ((c = *sp++ & 255 ) != '\n') { \ + \ +switch (c) { \ +case '/': \ +switch (*sp++) { \ +case '*': \ +if ((sp = read_a_comment( sp)) == 0 ) { \ +free( temp); \ +return 0 ; \ +} \ + \ + \ + \ + \ + \ +if (temp < tp && *(tp - 1) != ' ') \ +*tp++ = ' '; \ +break; \ + \ +case '/': \ +if (stdc2) { \ + \ +if (keepcomments) { \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('/')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('/'), (&__sF[1])) : (*((&__sF[1]))->_p = ('/'), (int)*((&__sF[1]))->_p++)) ; \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('*')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('*'), (&__sF[1])) : (*((&__sF[1]))->_p = ('*'), (int)*((&__sF[1]))->_p++)) ; \ +while ((c = *sp++) != '\n') \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = (c)), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)(c), (&__sF[1])) : (*((&__sF[1]))->_p = (c), (int)*((&__sF[1]))->_p++)) ; \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('*')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('*'), (&__sF[1])) : (*((&__sF[1]))->_p = ('*'), (int)*((&__sF[1]))->_p++)) ; \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('/')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('/'), (&__sF[1])) : (*((&__sF[1]))->_p = ('/'), (int)*((&__sF[1]))->_p++)) ; \ +} \ +goto end_line; \ +} \ + \ +default: \ +*tp++ = '/'; \ +sp--; \ +break; \ +} \ +break; \ +case '\r': \ +case '\f': \ + \ + \ + \ +case '\v': \ + \ +if (warn_level & 1) \ +cwarn( "Converted %.0s0x%02x to a space" \ +, ((char *) 0 ) , c, ((char *) 0 ) ); \ +case '\t': \ +case ' ': \ + \ +if (temp < tp && *(tp - 1) != ' ') \ +*tp++ = ' '; \ +break; \ +case '"': \ +case '\'': \ +infile->bptr = sp; \ + \ +tp = scanquote( c, tp, limit, 1 ); \ +if (tp == 0 ) { \ +free( temp); \ +return parse_line(); \ +} \ +sp = infile->bptr; \ +break; \ +default: \ +if ( __istype((c), 0x00000200L ) ) { \ +cerror( \ +"Illegal control character %.0s0x%x, skipped the character" \ +, ((char *) 0 ) , c, ((char *) 0 ) ); \ +} else { \ +*tp++ = c; \ +} \ +break; \ +} \ + \ +if (limit < tp) { \ +*tp = '\0' ; \ +cfatal( "Too long line spliced by comments :%s" \ +, temp, 0, ((char *) 0 ) ); \ +} \ +} \ + \ + \ +end_line: \ + \ +if (temp < tp && *(tp - 1) == ' ') \ +tp--; \ +*tp++ = '\n'; \ +*tp = '\0' ; \ +infile->bptr = strcpy( infile->buffer, temp); \ +free( temp); \ +if (macro_line != 0 && macro_line != 65535U ) { \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +if (*(infile->buffer) == '#' \ + \ +|| (*(infile->buffer) == '%' && *(infile->buffer + 1) == ':') \ + \ +) \ + \ +if (warn_level & 1) \ +cwarn( \ +"Macro started at line %.0s%u swallowed directive-like line" \ +, ((char *) 0 ) , macro_line, ((char *) 0 ) ); \ +} \ +return infile->buffer; \ +} \ + \ +static char * \ + \ +read_a_comment( char * sp) \ +{ \ + int c; \ + \ +if (keepcomments) { \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('/')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('/'), (&__sF[1])) : (*((&__sF[1]))->_p = ('/'), (int)*((&__sF[1]))->_p++)) ; \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = ('*')), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)('*'), (&__sF[1])) : (*((&__sF[1]))->_p = ('*'), (int)*((&__sF[1]))->_p++)) ; \ +} \ +c = *sp++; \ + \ +while (1) { \ +if (keepcomments) \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = (c)), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)(c), (&__sF[1])) : (*((&__sF[1]))->_p = (c), (int)*((&__sF[1]))->_p++)) ; \ + \ +switch (c) { \ +case '/': \ +if ((c = *sp++) != '*') \ +continue; \ +if (warn_level & 1) \ +cwarn( "\"/*\" in comment", ((char *) 0 ) , 0, ((char *) 0 ) ); \ +if (keepcomments) \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = (c)), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)(c), (&__sF[1])) : (*((&__sF[1]))->_p = (c), (int)*((&__sF[1]))->_p++)) ; \ + \ +case '*': \ +if ((c = *sp++) != '/') \ +continue; \ +if (keepcomments) \ + (--((&__sF[1]))->_w < 0 ? ((&__sF[1]))->_w >= ((&__sF[1]))->_lbfsize ? (*((&__sF[1]))->_p = (c)), *((&__sF[1]))->_p != '\n' ? (int)*((&__sF[1]))->_p++ : __swbuf('\n', (&__sF[1])) : __swbuf((int)(c), (&__sF[1])) : (*((&__sF[1]))->_p = (c), (int)*((&__sF[1]))->_p++)) ; \ +return sp; \ +case '\n': \ +if (! keepcomments) \ +wrongline = 1 ; \ +if ((sp = getline( 1 )) == 0 ) \ +return 0 ; \ +break; \ +default: \ +break; \ +} \ + \ +c = *sp++; \ +} \ + \ +return sp; \ +} \ + \ +static char * \ + \ +getline( int in_comment) \ +{ \ + \ +int converted = 0 ; \ + \ + \ +int esc; \ + \ +int len; \ +char * ptr; \ + \ +if (infile == 0 ) \ +return 0 ; \ +ptr = infile->bptr = infile->buffer; \ + \ +while (fgets( ptr, (int) (infile->buffer + 0x4000 - ptr), infile->fp) \ +!= 0 ) { \ + \ +line++; \ +if (line == 32768U && (warn_level & 1)) \ +cwarn( "Line number %.0s\"%u\" got beyond range" \ +, ((char *) 0 ) , line, ((char *) 0 ) ); \ + \ +if (debug & ( 2 | 32 )) { \ +printf( "\n#line %u (%s)", line \ +, infile->filename ? infile->filename : "NULL"); \ +dumpstring( ((char *) 0 ) , ptr); \ +} \ + \ +len = strlen( ptr); \ +if ( 0x4000 - 1 <= ptr - infile->buffer + len \ +&& *(ptr + len - 1) != '\n') { \ +if ( 0x4000 - 1 <= len) \ +cfatal( "Too long source line" \ +, ((char *) 0 ) , 0, ((char *) 0 ) ); \ +else \ +cfatal( "Too long logical line" \ +, ((char *) 0 ) , 0, ((char *) 0 ) ); \ +} \ +if (*(ptr + len - 1) != '\n') \ +break; \ +if (lflag) \ +put_source( ptr); \ + \ +if (tflag) \ +converted = trigraph( ptr); \ +if (converted) \ +len = strlen( ptr); \ + \ + \ + \ +len -= 2; \ +if (len >= 0) { \ +esc = (*(ptr + len) == '\\'); \ +if (esc) { \ +ptr = infile->bptr += len; \ +wrongline = 1 ; \ +continue; \ +} \ +} \ + \ + \ +if (ptr - infile->buffer + len + 2 > 0x1FD + 1 && (warn_level & 2)) \ + \ +cwarn( "Logical source line longer than %.0s%d bytes" \ +, ((char *) 0 ) , 0x1FD , ((char *) 0 ) ); \ + \ +return infile->bptr = infile->buffer; \ +} \ + \ + \ +if ( (((infile->fp)->_flags & 0x0040 ) != 0) ) \ +cfatal( "File read error", ((char *) 0 ) , 0, ((char *) 0 ) ); \ +at_eof( in_comment); \ +if (iflag) { \ +no_output--; \ +keepcomments = cflag && ifstack[0].stat && !no_output; \ +} \ +return 0 ; \ +} \ + \ + \ + \ + \ + \ +int \ + \ +trigraph( char * in) \ +{ \ +const char * const tritext = "=(/)'-\0#[\\]^{|}~"; \ +int count = 0; \ + const char * tp; \ + \ +while ((in = strchr( in, '?')) != 0 ) { \ +if (*++in != '?') \ +continue; \ +while (*++in == '?') \ +; \ +if ((tp = strchr( tritext, *in)) == 0 ) \ +continue; \ +in[ -2] = tp[ 10 ]; \ +in--; \ +memmove( in, in + 2, strlen( in + 1)); \ +count++; \ +} \ + \ +if (count && (warn_level & 8)) \ +cwarn( "%.0s%d trigraph(s) converted" \ +, ((char *) 0 ) , count, ((char *) 0 ) ); \ +return count; \ +} \ +static void \ + \ +at_eof( int in_comment) \ +{ \ + const char * const format \ += "End of %s with %.0d%s"; \ +const char * const unterm_if_format \ += "End of %s within #if (#ifdef) section started at line %u"; \ +const char * const unterm_macro_format \ += "End of %s within macro call started at line %u"; \ +const char * const input \ += infile->parent ? "file" : "input"; \ +const char * const no_newline \ += "no newline, skipped the line"; \ +const char * const unterm_com \ += "unterminated comment, skipped the line"; \ + \ +const char * const backsl = "\\, skipped the line"; \ +int len; \ +char * cp = infile->buffer; \ +IFINFO * ifp; \ + \ +len = strlen( cp); \ +if (len && *(cp += (len - 1)) != '\n') { \ +line++; \ +*++cp = '\n'; \ +*++cp = '\0' ; \ +cerror( format, input, 0, no_newline); \ +} \ + \ + \ +if (infile->buffer < infile->bptr) \ +cerror( format, input, 0, backsl); \ + \ + \ +if (in_comment) \ +cerror( format, input, 0, unterm_com); \ + \ +if (infile->initif < ifptr) { \ +ifp = infile->initif + 1; \ + \ +cerror( unterm_if_format, input, ifp->ifline, ((char *) 0 ) ); \ +ifptr = infile->initif; \ + ifstack[0].stat = ifptr->stat; \ +} \ + \ +if (macro_line != 0 && macro_line != 65535U ) { \ + \ +cerror( unterm_macro_format, input, macro_line, ((char *) 0 ) ); \ +macro_line = 65535U ; \ +} \ +} \ + \ +void \ + \ +unget( void) \ +{ \ +if (infile != 0 ) { \ +--infile->bptr; \ + \ +if (infile->bptr < infile->buffer) \ +cfatal( "Bug: Too much pushback", ((char *) 0 ) , 0, ((char *) 0 ) ); \ + \ +} \ + \ + \ +if (debug & 32 ) \ +dumpunget( "after unget"); \ + \ +} \ + \ +FILEINFO * \ + \ +ungetstring( const char * text, const char * name) \ +{ \ + FILEINFO * file; \ +size_t size; \ + \ +if (text) \ +size = strlen( text) + 1; \ +else \ +size = 1; \ +file = getfile( name, size); \ +if (text) \ +memcpy( file->buffer, text, size); \ +else \ +*file->buffer = '\0' ; \ +return file; \ +} \ + \ +char * \ + \ +savestring( const char * text) \ +{ \ + char * result; \ +size_t size; \ + \ +size = strlen( text) + 1; \ +result = xmalloc( size); \ +memcpy( result, text, size); \ +return result; \ +} \ + \ +FILEINFO * \ + \ +getfile( const char * name, size_t bufsize) \ +{ \ + FILEINFO * file; \ +size_t s_name; \ + \ +file = (FILEINFO *) xmalloc( sizeof (FILEINFO)); \ +file->buffer = xmalloc( bufsize); \ +if (name) { \ +s_name = strlen( name) + 1; \ +file->filename = (char *) xmalloc( s_name); \ +memcpy( file->filename, name, s_name); \ +} else { \ +file->filename = 0 ; \ +} \ + \ +file->bptr = file->buffer; \ +return file; } \ + +#endif +#endif +#endif +#endif + diff --git a/libraries/mcpp/test-l/m8191.h b/libraries/mcpp/test-l/m8191.h new file mode 100644 index 000000000..f64b156e7 --- /dev/null +++ b/libraries/mcpp/test-l/m8191.h @@ -0,0 +1,8196 @@ +/* m8191.h */ +#define AAA +#define AAB +#define AAC +#define AAD +#define AAE +#define AAF +#define AAG +#define AAH +#define AAI +#define AAJ +#define AAK +#define AAL +#define AAM +#define AAN +#define AAO +#define AAP +#define AAQ +#define AAR +#define AAS +#define AAT +#define AAU +#define AAV +#define AAW +#define AAX +#define AAY +#define AAZ +#define ABA +#define ABB +#define ABC +#define ABD +#define ABE +#define ABF +#define ABG +#define ABH +#define ABI +#define ABJ +#define ABK +#define ABL +#define ABM +#define ABN +#define ABO +#define ABP +#define ABQ +#define ABR +#define ABS +#define ABT +#define ABU +#define ABV +#define ABW +#define ABX +#define ABY +#define ABZ +#define ACA +#define ACB +#define ACC +#define ACD +#define ACE +#define ACF +#define ACG +#define ACH +#define ACI +#define ACJ +#define ACK +#define ACL +#define ACM +#define ACN +#define ACO +#define ACP +#define ACQ +#define ACR +#define ACS +#define ACT +#define ACU +#define ACV +#define ACW +#define ACX +#define ACY +#define ACZ +#define ADA +#define ADB +#define ADC +#define ADD +#define ADE +#define ADF +#define ADG +#define ADH +#define ADI +#define ADJ +#define ADK +#define ADL +#define ADM +#define ADN +#define ADO +#define ADP +#define ADQ +#define ADR +#define ADS +#define ADT +#define ADU +#define ADV +#define ADW +#define ADX +#define ADY +#define ADZ +#define AEA +#define AEB +#define AEC +#define AED +#define AEE +#define AEF +#define AEG +#define AEH +#define AEI +#define AEJ +#define AEK +#define AEL +#define AEM +#define AEN +#define AEO +#define AEP +#define AEQ +#define AER +#define AES +#define AET +#define AEU +#define AEV +#define AEW +#define AEX +#define AEY +#define AEZ +#define AFA +#define AFB +#define AFC +#define AFD +#define AFE +#define AFF +#define AFG +#define AFH +#define AFI +#define AFJ +#define AFK +#define AFL +#define AFM +#define AFN +#define AFO +#define AFP +#define AFQ +#define AFR +#define AFS +#define AFT +#define AFU +#define AFV +#define AFW +#define AFX +#define AFY +#define AFZ +#define AGA +#define AGB +#define AGC +#define AGD +#define AGE +#define AGF +#define AGG +#define AGH +#define AGI +#define AGJ +#define AGK +#define AGL +#define AGM +#define AGN +#define AGO +#define AGP +#define AGQ +#define AGR +#define AGS +#define AGT +#define AGU +#define AGV +#define AGW +#define AGX +#define AGY +#define AGZ +#define AHA +#define AHB +#define AHC +#define AHD +#define AHE +#define AHF +#define AHG +#define AHH +#define AHI +#define AHJ +#define AHK +#define AHL +#define AHM +#define AHN +#define AHO +#define AHP +#define AHQ +#define AHR +#define AHS +#define AHT +#define AHU +#define AHV +#define AHW +#define AHX +#define AHY +#define AHZ +#define AIA +#define AIB +#define AIC +#define AID +#define AIE +#define AIF +#define AIG +#define AIH +#define AII +#define AIJ +#define AIK +#define AIL +#define AIM +#define AIN +#define AIO +#define AIP +#define AIQ +#define AIR +#define AIS +#define AIT +#define AIU +#define AIV +#define AIW +#define AIX +#define AIY +#define AIZ +#define AJA +#define AJB +#define AJC +#define AJD +#define AJE +#define AJF +#define AJG +#define AJH +#define AJI +#define AJJ +#define AJK +#define AJL +#define AJM +#define AJN +#define AJO +#define AJP +#define AJQ +#define AJR +#define AJS +#define AJT +#define AJU +#define AJV +#define AJW +#define AJX +#define AJY +#define AJZ +#define AKA +#define AKB +#define AKC +#define AKD +#define AKE +#define AKF +#define AKG +#define AKH +#define AKI +#define AKJ +#define AKK +#define AKL +#define AKM +#define AKN +#define AKO +#define AKP +#define AKQ +#define AKR +#define AKS +#define AKT +#define AKU +#define AKV +#define AKW +#define AKX +#define AKY +#define AKZ +#define ALA +#define ALB +#define ALC +#define ALD +#define ALE +#define ALF +#define ALG +#define ALH +#define ALI +#define ALJ +#define ALK +#define ALL +#define ALM +#define ALN +#define ALO +#define ALP +#define ALQ +#define ALR +#define ALS +#define ALT +#define ALU +#define ALV +#define ALW +#define ALX +#define ALY +#define ALZ +#define AMA +#define AMB +#define AMC +#define AMD +#define AME +#define AMF +#define AMG +#define AMH +#define AMI +#define AMJ +#define AMK +#define AML +#define AMM +#define AMN +#define AMO +#define AMP +#define AMQ +#define AMR +#define AMS +#define AMT +#define AMU +#define AMV +#define AMW +#define AMX +#define AMY +#define AMZ +#define ANA +#define ANB +#define ANC +#define AND +#define ANE +#define ANF +#define ANG +#define ANH +#define ANI +#define ANJ +#define ANK +#define ANL +#define ANM +#define ANN +#define ANO +#define ANP +#define ANQ +#define ANR +#define ANS +#define ANT +#define ANU +#define ANV +#define ANW +#define ANX +#define ANY +#define ANZ +#define AOA +#define AOB +#define AOC +#define AOD +#define AOE +#define AOF +#define AOG +#define AOH +#define AOI +#define AOJ +#define AOK +#define AOL +#define AOM +#define AON +#define AOO +#define AOP +#define AOQ +#define AOR +#define AOS +#define AOT +#define AOU +#define AOV +#define AOW +#define AOX +#define AOY +#define AOZ +#define APA +#define APB +#define APC +#define APD +#define APE +#define APF +#define APG +#define APH +#define API +#define APJ +#define APK +#define APL +#define APM +#define APN +#define APO +#define APP +#define APQ +#define APR +#define APS +#define APT +#define APU +#define APV +#define APW +#define APX +#define APY +#define APZ +#define AQA +#define AQB +#define AQC +#define AQD +#define AQE +#define AQF +#define AQG +#define AQH +#define AQI +#define AQJ +#define AQK +#define AQL +#define AQM +#define AQN +#define AQO +#define AQP +#define AQQ +#define AQR +#define AQS +#define AQT +#define AQU +#define AQV +#define AQW +#define AQX +#define AQY +#define AQZ +#define ARA +#define ARB +#define ARC +#define ARD +#define ARE +#define ARF +#define ARG +#define ARH +#define ARI +#define ARJ +#define ARK +#define ARL +#define ARM +#define ARN +#define ARO +#define ARP +#define ARQ +#define ARR +#define ARS +#define ART +#define ARU +#define ARV +#define ARW +#define ARX +#define ARY +#define ARZ +#define ASA +#define ASB +#define ASC +#define ASD +#define ASE +#define ASF +#define ASG +#define ASH +#define ASI +#define ASJ +#define ASK +#define ASL +#define ASM +#define ASN +#define ASO +#define ASP +#define ASQ +#define ASR +#define ASS +#define AST +#define ASU +#define ASV +#define ASW +#define ASX +#define ASY +#define ASZ +#define ATA +#define ATB +#define ATC +#define ATD +#define ATE +#define ATF +#define ATG +#define ATH +#define ATI +#define ATJ +#define ATK +#define ATL +#define ATM +#define ATN +#define ATO +#define ATP +#define ATQ +#define ATR +#define ATS +#define ATT +#define ATU +#define ATV +#define ATW +#define ATX +#define ATY +#define ATZ +#define AUA +#define AUB +#define AUC +#define AUD +#define AUE +#define AUF +#define AUG +#define AUH +#define AUI +#define AUJ +#define AUK +#define AUL +#define AUM +#define AUN +#define AUO +#define AUP +#define AUQ +#define AUR +#define AUS +#define AUT +#define AUU +#define AUV +#define AUW +#define AUX +#define AUY +#define AUZ +#define AVA +#define AVB +#define AVC +#define AVD +#define AVE +#define AVF +#define AVG +#define AVH +#define AVI +#define AVJ +#define AVK +#define AVL +#define AVM +#define AVN +#define AVO +#define AVP +#define AVQ +#define AVR +#define AVS +#define AVT +#define AVU +#define AVV +#define AVW +#define AVX +#define AVY +#define AVZ +#define AWA +#define AWB +#define AWC +#define AWD +#define AWE +#define AWF +#define AWG +#define AWH +#define AWI +#define AWJ +#define AWK +#define AWL +#define AWM +#define AWN +#define AWO +#define AWP +#define AWQ +#define AWR +#define AWS +#define AWT +#define AWU +#define AWV +#define AWW +#define AWX +#define AWY +#define AWZ +#define AXA +#define AXB +#define AXC +#define AXD +#define AXE +#define AXF +#define AXG +#define AXH +#define AXI +#define AXJ +#define AXK +#define AXL +#define AXM +#define AXN +#define AXO +#define AXP +#define AXQ +#define AXR +#define AXS +#define AXT +#define AXU +#define AXV +#define AXW +#define AXX +#define AXY +#define AXZ +#define AYA +#define AYB +#define AYC +#define AYD +#define AYE +#define AYF +#define AYG +#define AYH +#define AYI +#define AYJ +#define AYK +#define AYL +#define AYM +#define AYN +#define AYO +#define AYP +#define AYQ +#define AYR +#define AYS +#define AYT +#define AYU +#define AYV +#define AYW +#define AYX +#define AYY +#define AYZ +#define AZA +#define AZB +#define AZC +#define AZD +#define AZE +#define AZF +#define AZG +#define AZH +#define AZI +#define AZJ +#define AZK +#define AZL +#define AZM +#define AZN +#define AZO +#define AZP +#define AZQ +#define AZR +#define AZS +#define AZT +#define AZU +#define AZV +#define AZW +#define AZX +#define AZY +#define AZZ +#define BAA +#define BAB +#define BAC +#define BAD +#define BAE +#define BAF +#define BAG +#define BAH +#define BAI +#define BAJ +#define BAK +#define BAL +#define BAM +#define BAN +#define BAO +#define BAP +#define BAQ +#define BAR +#define BAS +#define BAT +#define BAU +#define BAV +#define BAW +#define BAX +#define BAY +#define BAZ +#define BBA +#define BBB +#define BBC +#define BBD +#define BBE +#define BBF +#define BBG +#define BBH +#define BBI +#define BBJ +#define BBK +#define BBL +#define BBM +#define BBN +#define BBO +#define BBP +#define BBQ +#define BBR +#define BBS +#define BBT +#define BBU +#define BBV +#define BBW +#define BBX +#define BBY +#define BBZ +#define BCA +#define BCB +#define BCC +#define BCD +#define BCE +#define BCF +#define BCG +#define BCH +#define BCI +#define BCJ +#define BCK +#define BCL +#define BCM +#define BCN +#define BCO +#define BCP +#define BCQ +#define BCR +#define BCS +#define BCT +#define BCU +#define BCV +#define BCW +#define BCX +#define BCY +#define BCZ +#define BDA +#define BDB +#define BDC +#define BDD +#define BDE +#define BDF +#define BDG +#define BDH +#define BDI +#define BDJ +#define BDK +#define BDL +#define BDM +#define BDN +#define BDO +#define BDP +#define BDQ +#define BDR +#define BDS +#define BDT +#define BDU +#define BDV +#define BDW +#define BDX +#define BDY +#define BDZ +#define BEA +#define BEB +#define BEC +#define BED +#define BEE +#define BEF +#define BEG +#define BEH +#define BEI +#define BEJ +#define BEK +#define BEL +#define BEM +#define BEN +#define BEO +#define BEP +#define BEQ +#define BER +#define BES +#define BET +#define BEU +#define BEV +#define BEW +#define BEX +#define BEY +#define BEZ +#define BFA +#define BFB +#define BFC +#define BFD +#define BFE +#define BFF +#define BFG +#define BFH +#define BFI +#define BFJ +#define BFK +#define BFL +#define BFM +#define BFN +#define BFO +#define BFP +#define BFQ +#define BFR +#define BFS +#define BFT +#define BFU +#define BFV +#define BFW +#define BFX +#define BFY +#define BFZ +#define BGA +#define BGB +#define BGC +#define BGD +#define BGE +#define BGF +#define BGG +#define BGH +#define BGI +#define BGJ +#define BGK +#define BGL +#define BGM +#define BGN +#define BGO +#define BGP +#define BGQ +#define BGR +#define BGS +#define BGT +#define BGU +#define BGV +#define BGW +#define BGX +#define BGY +#define BGZ +#define BHA +#define BHB +#define BHC +#define BHD +#define BHE +#define BHF +#define BHG +#define BHH +#define BHI +#define BHJ +#define BHK +#define BHL +#define BHM +#define BHN +#define BHO +#define BHP +#define BHQ +#define BHR +#define BHS +#define BHT +#define BHU +#define BHV +#define BHW +#define BHX +#define BHY +#define BHZ +#define BIA +#define BIB +#define BIC +#define BID +#define BIE +#define BIF +#define BIG +#define BIH +#define BII +#define BIJ +#define BIK +#define BIL +#define BIM +#define BIN +#define BIO +#define BIP +#define BIQ +#define BIR +#define BIS +#define BIT +#define BIU +#define BIV +#define BIW +#define BIX +#define BIY +#define BIZ +#define BJA +#define BJB +#define BJC +#define BJD +#define BJE +#define BJF +#define BJG +#define BJH +#define BJI +#define BJJ +#define BJK +#define BJL +#define BJM +#define BJN +#define BJO +#define BJP +#define BJQ +#define BJR +#define BJS +#define BJT +#define BJU +#define BJV +#define BJW +#define BJX +#define BJY +#define BJZ +#define BKA +#define BKB +#define BKC +#define BKD +#define BKE +#define BKF +#define BKG +#define BKH +#define BKI +#define BKJ +#define BKK +#define BKL +#define BKM +#define BKN +#define BKO +#define BKP +#define BKQ +#define BKR +#define BKS +#define BKT +#define BKU +#define BKV +#define BKW +#define BKX +#define BKY +#define BKZ +#define BLA +#define BLB +#define BLC +#define BLD +#define BLE +#define BLF +#define BLG +#define BLH +#define BLI +#define BLJ +#define BLK +#define BLL +#define BLM +#define BLN +#define BLO +#define BLP +#define BLQ +#define BLR +#define BLS +#define BLT +#define BLU +#define BLV +#define BLW +#define BLX +#define BLY +#define BLZ +#define BMA +#define BMB +#define BMC +#define BMD +#define BME +#define BMF +#define BMG +#define BMH +#define BMI +#define BMJ +#define BMK +#define BML +#define BMM +#define BMN +#define BMO +#define BMP +#define BMQ +#define BMR +#define BMS +#define BMT +#define BMU +#define BMV +#define BMW +#define BMX +#define BMY +#define BMZ +#define BNA +#define BNB +#define BNC +#define BND +#define BNE +#define BNF +#define BNG +#define BNH +#define BNI +#define BNJ +#define BNK +#define BNL +#define BNM +#define BNN +#define BNO +#define BNP +#define BNQ +#define BNR +#define BNS +#define BNT +#define BNU +#define BNV +#define BNW +#define BNX +#define BNY +#define BNZ +#define BOA +#define BOB +#define BOC +#define BOD +#define BOE +#define BOF +#define BOG +#define BOH +#define BOI +#define BOJ +#define BOK +#define BOL +#define BOM +#define BON +#define BOO +#define BOP +#define BOQ +#define BOR +#define BOS +#define BOT +#define BOU +#define BOV +#define BOW +#define BOX +#define BOY +#define BOZ +#define BPA +#define BPB +#define BPC +#define BPD +#define BPE +#define BPF +#define BPG +#define BPH +#define BPI +#define BPJ +#define BPK +#define BPL +#define BPM +#define BPN +#define BPO +#define BPP +#define BPQ +#define BPR +#define BPS +#define BPT +#define BPU +#define BPV +#define BPW +#define BPX +#define BPY +#define BPZ +#define BQA +#define BQB +#define BQC +#define BQD +#define BQE +#define BQF +#define BQG +#define BQH +#define BQI +#define BQJ +#define BQK +#define BQL +#define BQM +#define BQN +#define BQO +#define BQP +#define BQQ +#define BQR +#define BQS +#define BQT +#define BQU +#define BQV +#define BQW +#define BQX +#define BQY +#define BQZ +#define BRA +#define BRB +#define BRC +#define BRD +#define BRE +#define BRF +#define BRG +#define BRH +#define BRI +#define BRJ +#define BRK +#define BRL +#define BRM +#define BRN +#define BRO +#define BRP +#define BRQ +#define BRR +#define BRS +#define BRT +#define BRU +#define BRV +#define BRW +#define BRX +#define BRY +#define BRZ +#define BSA +#define BSB +#define BSC +#define BSD +#define BSE +#define BSF +#define BSG +#define BSH +#define BSI +#define BSJ +#define BSK +#define BSL +#define BSM +#define BSN +#define BSO +#define BSP +#define BSQ +#define BSR +#define BSS +#define BST +#define BSU +#define BSV +#define BSW +#define BSX +#define BSY +#define BSZ +#define BTA +#define BTB +#define BTC +#define BTD +#define BTE +#define BTF +#define BTG +#define BTH +#define BTI +#define BTJ +#define BTK +#define BTL +#define BTM +#define BTN +#define BTO +#define BTP +#define BTQ +#define BTR +#define BTS +#define BTT +#define BTU +#define BTV +#define BTW +#define BTX +#define BTY +#define BTZ +#define BUA +#define BUB +#define BUC +#define BUD +#define BUE +#define BUF +#define BUG +#define BUH +#define BUI +#define BUJ +#define BUK +#define BUL +#define BUM +#define BUN +#define BUO +#define BUP +#define BUQ +#define BUR +#define BUS +#define BUT +#define BUU +#define BUV +#define BUW +#define BUX +#define BUY +#define BUZ +#define BVA +#define BVB +#define BVC +#define BVD +#define BVE +#define BVF +#define BVG +#define BVH +#define BVI +#define BVJ +#define BVK +#define BVL +#define BVM +#define BVN +#define BVO +#define BVP +#define BVQ +#define BVR +#define BVS +#define BVT +#define BVU +#define BVV +#define BVW +#define BVX +#define BVY +#define BVZ +#define BWA +#define BWB +#define BWC +#define BWD +#define BWE +#define BWF +#define BWG +#define BWH +#define BWI +#define BWJ +#define BWK +#define BWL +#define BWM +#define BWN +#define BWO +#define BWP +#define BWQ +#define BWR +#define BWS +#define BWT +#define BWU +#define BWV +#define BWW +#define BWX +#define BWY +#define BWZ +#define BXA +#define BXB +#define BXC +#define BXD +#define BXE +#define BXF +#define BXG +#define BXH +#define BXI +#define BXJ +#define BXK +#define BXL +#define BXM +#define BXN +#define BXO +#define BXP +#define BXQ +#define BXR +#define BXS +#define BXT +#define BXU +#define BXV +#define BXW +#define BXX +#define BXY +#define BXZ +#define BYA +#define BYB +#define BYC +#define BYD +#define BYE +#define BYF +#define BYG +#define BYH +#define BYI +#define BYJ +#define BYK +#define BYL +#define BYM +#define BYN +#define BYO +#define BYP +#define BYQ +#define BYR +#define BYS +#define BYT +#define BYU +#define BYV +#define BYW +#define BYX +#define BYY +#define BYZ +#define BZA +#define BZB +#define BZC +#define BZD +#define BZE +#define BZF +#define BZG +#define BZH +#define BZI +#define BZJ +#define BZK +#define BZL +#define BZM +#define BZN +#define BZO +#define BZP +#define BZQ +#define BZR +#define BZS +#define BZT +#define BZU +#define BZV +#define BZW +#define BZX +#define BZY +#define BZZ +#define CAA +#define CAB +#define CAC +#define CAD +#define CAE +#define CAF +#define CAG +#define CAH +#define CAI +#define CAJ +#define CAK +#define CAL +#define CAM +#define CAN +#define CAO +#define CAP +#define CAQ +#define CAR +#define CAS +#define CAT +#define CAU +#define CAV +#define CAW +#define CAX +#define CAY +#define CAZ +#define CBA +#define CBB +#define CBC +#define CBD +#define CBE +#define CBF +#define CBG +#define CBH +#define CBI +#define CBJ +#define CBK +#define CBL +#define CBM +#define CBN +#define CBO +#define CBP +#define CBQ +#define CBR +#define CBS +#define CBT +#define CBU +#define CBV +#define CBW +#define CBX +#define CBY +#define CBZ +#define CCA +#define CCB +#define CCC +#define CCD +#define CCE +#define CCF +#define CCG +#define CCH +#define CCI +#define CCJ +#define CCK +#define CCL +#define CCM +#define CCN +#define CCO +#define CCP +#define CCQ +#define CCR +#define CCS +#define CCT +#define CCU +#define CCV +#define CCW +#define CCX +#define CCY +#define CCZ +#define CDA +#define CDB +#define CDC +#define CDD +#define CDE +#define CDF +#define CDG +#define CDH +#define CDI +#define CDJ +#define CDK +#define CDL +#define CDM +#define CDN +#define CDO +#define CDP +#define CDQ +#define CDR +#define CDS +#define CDT +#define CDU +#define CDV +#define CDW +#define CDX +#define CDY +#define CDZ +#define CEA +#define CEB +#define CEC +#define CED +#define CEE +#define CEF +#define CEG +#define CEH +#define CEI +#define CEJ +#define CEK +#define CEL +#define CEM +#define CEN +#define CEO +#define CEP +#define CEQ +#define CER +#define CES +#define CET +#define CEU +#define CEV +#define CEW +#define CEX +#define CEY +#define CEZ +#define CFA +#define CFB +#define CFC +#define CFD +#define CFE +#define CFF +#define CFG +#define CFH +#define CFI +#define CFJ +#define CFK +#define CFL +#define CFM +#define CFN +#define CFO +#define CFP +#define CFQ +#define CFR +#define CFS +#define CFT +#define CFU +#define CFV +#define CFW +#define CFX +#define CFY +#define CFZ +#define CGA +#define CGB +#define CGC +#define CGD +#define CGE +#define CGF +#define CGG +#define CGH +#define CGI +#define CGJ +#define CGK +#define CGL +#define CGM +#define CGN +#define CGO +#define CGP +#define CGQ +#define CGR +#define CGS +#define CGT +#define CGU +#define CGV +#define CGW +#define CGX +#define CGY +#define CGZ +#define CHA +#define CHB +#define CHC +#define CHD +#define CHE +#define CHF +#define CHG +#define CHH +#define CHI +#define CHJ +#define CHK +#define CHL +#define CHM +#define CHN +#define CHO +#define CHP +#define CHQ +#define CHR +#define CHS +#define CHT +#define CHU +#define CHV +#define CHW +#define CHX +#define CHY +#define CHZ +#define CIA +#define CIB +#define CIC +#define CID +#define CIE +#define CIF +#define CIG +#define CIH +#define CII +#define CIJ +#define CIK +#define CIL +#define CIM +#define CIN +#define CIO +#define CIP +#define CIQ +#define CIR +#define CIS +#define CIT +#define CIU +#define CIV +#define CIW +#define CIX +#define CIY +#define CIZ +#define CJA +#define CJB +#define CJC +#define CJD +#define CJE +#define CJF +#define CJG +#define CJH +#define CJI +#define CJJ +#define CJK +#define CJL +#define CJM +#define CJN +#define CJO +#define CJP +#define CJQ +#define CJR +#define CJS +#define CJT +#define CJU +#define CJV +#define CJW +#define CJX +#define CJY +#define CJZ +#define CKA +#define CKB +#define CKC +#define CKD +#define CKE +#define CKF +#define CKG +#define CKH +#define CKI +#define CKJ +#define CKK +#define CKL +#define CKM +#define CKN +#define CKO +#define CKP +#define CKQ +#define CKR +#define CKS +#define CKT +#define CKU +#define CKV +#define CKW +#define CKX +#define CKY +#define CKZ +#define CLA +#define CLB +#define CLC +#define CLD +#define CLE +#define CLF +#define CLG +#define CLH +#define CLI +#define CLJ +#define CLK +#define CLL +#define CLM +#define CLN +#define CLO +#define CLP +#define CLQ +#define CLR +#define CLS +#define CLT +#define CLU +#define CLV +#define CLW +#define CLX +#define CLY +#define CLZ +#define CMA +#define CMB +#define CMC +#define CMD +#define CME +#define CMF +#define CMG +#define CMH +#define CMI +#define CMJ +#define CMK +#define CML +#define CMM +#define CMN +#define CMO +#define CMP +#define CMQ +#define CMR +#define CMS +#define CMT +#define CMU +#define CMV +#define CMW +#define CMX +#define CMY +#define CMZ +#define CNA +#define CNB +#define CNC +#define CND +#define CNE +#define CNF +#define CNG +#define CNH +#define CNI +#define CNJ +#define CNK +#define CNL +#define CNM +#define CNN +#define CNO +#define CNP +#define CNQ +#define CNR +#define CNS +#define CNT +#define CNU +#define CNV +#define CNW +#define CNX +#define CNY +#define CNZ +#define COA +#define COB +#define COC +#define COD +#define COE +#define COF +#define COG +#define COH +#define COI +#define COJ +#define COK +#define COL +#define COM +#define CON +#define COO +#define COP +#define COQ +#define COR +#define COS +#define COT +#define COU +#define COV +#define COW +#define COX +#define COY +#define COZ +#define CPA +#define CPB +#define CPC +#define CPD +#define CPE +#define CPF +#define CPG +#define CPH +#define CPI +#define CPJ +#define CPK +#define CPL +#define CPM +#define CPN +#define CPO +#define CPP +#define CPQ +#define CPR +#define CPS +#define CPT +#define CPU +#define CPV +#define CPW +#define CPX +#define CPY +#define CPZ +#define CQA +#define CQB +#define CQC +#define CQD +#define CQE +#define CQF +#define CQG +#define CQH +#define CQI +#define CQJ +#define CQK +#define CQL +#define CQM +#define CQN +#define CQO +#define CQP +#define CQQ +#define CQR +#define CQS +#define CQT +#define CQU +#define CQV +#define CQW +#define CQX +#define CQY +#define CQZ +#define CRA +#define CRB +#define CRC +#define CRD +#define CRE +#define CRF +#define CRG +#define CRH +#define CRI +#define CRJ +#define CRK +#define CRL +#define CRM +#define CRN +#define CRO +#define CRP +#define CRQ +#define CRR +#define CRS +#define CRT +#define CRU +#define CRV +#define CRW +#define CRX +#define CRY +#define CRZ +#define CSA +#define CSB +#define CSC +#define CSD +#define CSE +#define CSF +#define CSG +#define CSH +#define CSI +#define CSJ +#define CSK +#define CSL +#define CSM +#define CSN +#define CSO +#define CSP +#define CSQ +#define CSR +#define CSS +#define CST +#define CSU +#define CSV +#define CSW +#define CSX +#define CSY +#define CSZ +#define CTA +#define CTB +#define CTC +#define CTD +#define CTE +#define CTF +#define CTG +#define CTH +#define CTI +#define CTJ +#define CTK +#define CTL +#define CTM +#define CTN +#define CTO +#define CTP +#define CTQ +#define CTR +#define CTS +#define CTT +#define CTU +#define CTV +#define CTW +#define CTX +#define CTY +#define CTZ +#define CUA +#define CUB +#define CUC +#define CUD +#define CUE +#define CUF +#define CUG +#define CUH +#define CUI +#define CUJ +#define CUK +#define CUL +#define CUM +#define CUN +#define CUO +#define CUP +#define CUQ +#define CUR +#define CUS +#define CUT +#define CUU +#define CUV +#define CUW +#define CUX +#define CUY +#define CUZ +#define CVA +#define CVB +#define CVC +#define CVD +#define CVE +#define CVF +#define CVG +#define CVH +#define CVI +#define CVJ +#define CVK +#define CVL +#define CVM +#define CVN +#define CVO +#define CVP +#define CVQ +#define CVR +#define CVS +#define CVT +#define CVU +#define CVV +#define CVW +#define CVX +#define CVY +#define CVZ +#define CWA +#define CWB +#define CWC +#define CWD +#define CWE +#define CWF +#define CWG +#define CWH +#define CWI +#define CWJ +#define CWK +#define CWL +#define CWM +#define CWN +#define CWO +#define CWP +#define CWQ +#define CWR +#define CWS +#define CWT +#define CWU +#define CWV +#define CWW +#define CWX +#define CWY +#define CWZ +#define CXA +#define CXB +#define CXC +#define CXD +#define CXE +#define CXF +#define CXG +#define CXH +#define CXI +#define CXJ +#define CXK +#define CXL +#define CXM +#define CXN +#define CXO +#define CXP +#define CXQ +#define CXR +#define CXS +#define CXT +#define CXU +#define CXV +#define CXW +#define CXX +#define CXY +#define CXZ +#define CYA +#define CYB +#define CYC +#define CYD +#define CYE +#define CYF +#define CYG +#define CYH +#define CYI +#define CYJ +#define CYK +#define CYL +#define CYM +#define CYN +#define CYO +#define CYP +#define CYQ +#define CYR +#define CYS +#define CYT +#define CYU +#define CYV +#define CYW +#define CYX +#define CYY +#define CYZ +#define CZA +#define CZB +#define CZC +#define CZD +#define CZE +#define CZF +#define CZG +#define CZH +#define CZI +#define CZJ +#define CZK +#define CZL +#define CZM +#define CZN +#define CZO +#define CZP +#define CZQ +#define CZR +#define CZS +#define CZT +#define CZU +#define CZV +#define CZW +#define CZX +#define CZY +#define CZZ +#define DAA +#define DAB +#define DAC +#define DAD +#define DAE +#define DAF +#define DAG +#define DAH +#define DAI +#define DAJ +#define DAK +#define DAL +#define DAM +#define DAN +#define DAO +#define DAP +#define DAQ +#define DAR +#define DAS 0x07ff +#ifndef X07FF +#define DAT +#define DAU +#define DAV +#define DAW +#define DAX +#define DAY +#define DAZ +#define DBA +#define DBB +#define DBC +#define DBD +#define DBE +#define DBF +#define DBG +#define DBH +#define DBI +#define DBJ +#define DBK +#define DBL +#define DBM +#define DBN +#define DBO +#define DBP +#define DBQ +#define DBR +#define DBS +#define DBT +#define DBU +#define DBV +#define DBW +#define DBX +#define DBY +#define DBZ +#define DCA +#define DCB +#define DCC +#define DCD +#define DCE +#define DCF +#define DCG +#define DCH +#define DCI +#define DCJ +#define DCK +#define DCL +#define DCM +#define DCN +#define DCO +#define DCP +#define DCQ +#define DCR +#define DCS +#define DCT +#define DCU +#define DCV +#define DCW +#define DCX +#define DCY +#define DCZ +#define DDA +#define DDB +#define DDC +#define DDD +#define DDE +#define DDF +#define DDG +#define DDH +#define DDI +#define DDJ +#define DDK +#define DDL +#define DDM +#define DDN +#define DDO +#define DDP +#define DDQ +#define DDR +#define DDS +#define DDT +#define DDU +#define DDV +#define DDW +#define DDX +#define DDY +#define DDZ +#define DEA +#define DEB +#define DEC +#define DED +#define DEE +#define DEF +#define DEG +#define DEH +#define DEI +#define DEJ +#define DEK +#define DEL +#define DEM +#define DEN +#define DEO +#define DEP +#define DEQ +#define DER +#define DES +#define DET +#define DEU +#define DEV +#define DEW +#define DEX +#define DEY +#define DEZ +#define DFA +#define DFB +#define DFC +#define DFD +#define DFE +#define DFF +#define DFG +#define DFH +#define DFI +#define DFJ +#define DFK +#define DFL +#define DFM +#define DFN +#define DFO +#define DFP +#define DFQ +#define DFR +#define DFS +#define DFT +#define DFU +#define DFV +#define DFW +#define DFX +#define DFY +#define DFZ +#define DGA +#define DGB +#define DGC +#define DGD +#define DGE +#define DGF +#define DGG +#define DGH +#define DGI +#define DGJ +#define DGK +#define DGL +#define DGM +#define DGN +#define DGO +#define DGP +#define DGQ +#define DGR +#define DGS +#define DGT +#define DGU +#define DGV +#define DGW +#define DGX +#define DGY +#define DGZ +#define DHA +#define DHB +#define DHC +#define DHD +#define DHE +#define DHF +#define DHG +#define DHH +#define DHI +#define DHJ +#define DHK +#define DHL +#define DHM +#define DHN +#define DHO +#define DHP +#define DHQ +#define DHR +#define DHS +#define DHT +#define DHU +#define DHV +#define DHW +#define DHX +#define DHY +#define DHZ +#define DIA +#define DIB +#define DIC +#define DID +#define DIE +#define DIF +#define DIG +#define DIH +#define DII +#define DIJ +#define DIK +#define DIL +#define DIM +#define DIN +#define DIO +#define DIP +#define DIQ +#define DIR +#define DIS +#define DIT +#define DIU +#define DIV +#define DIW +#define DIX +#define DIY +#define DIZ +#define DJA +#define DJB +#define DJC +#define DJD +#define DJE +#define DJF +#define DJG +#define DJH +#define DJI +#define DJJ +#define DJK +#define DJL +#define DJM +#define DJN +#define DJO +#define DJP +#define DJQ +#define DJR +#define DJS +#define DJT +#define DJU +#define DJV +#define DJW +#define DJX +#define DJY +#define DJZ +#define DKA +#define DKB +#define DKC +#define DKD +#define DKE +#define DKF +#define DKG +#define DKH +#define DKI +#define DKJ +#define DKK +#define DKL +#define DKM +#define DKN +#define DKO +#define DKP +#define DKQ +#define DKR +#define DKS +#define DKT +#define DKU +#define DKV +#define DKW +#define DKX +#define DKY +#define DKZ +#define DLA +#define DLB +#define DLC +#define DLD +#define DLE +#define DLF +#define DLG +#define DLH +#define DLI +#define DLJ +#define DLK +#define DLL +#define DLM +#define DLN +#define DLO +#define DLP +#define DLQ +#define DLR +#define DLS +#define DLT +#define DLU +#define DLV +#define DLW +#define DLX +#define DLY +#define DLZ +#define DMA +#define DMB +#define DMC +#define DMD +#define DME +#define DMF +#define DMG +#define DMH +#define DMI +#define DMJ +#define DMK +#define DML +#define DMM +#define DMN +#define DMO +#define DMP +#define DMQ +#define DMR +#define DMS +#define DMT +#define DMU +#define DMV +#define DMW +#define DMX +#define DMY +#define DMZ +#define DNA +#define DNB +#define DNC +#define DND +#define DNE +#define DNF +#define DNG +#define DNH +#define DNI +#define DNJ +#define DNK +#define DNL +#define DNM +#define DNN +#define DNO +#define DNP +#define DNQ +#define DNR +#define DNS +#define DNT +#define DNU +#define DNV +#define DNW +#define DNX +#define DNY +#define DNZ +#define DOA +#define DOB +#define DOC +#define DOD +#define DOE +#define DOF +#define DOG +#define DOH +#define DOI +#define DOJ +#define DOK +#define DOL +#define DOM +#define DON +#define DOO +#define DOP +#define DOQ +#define DOR +#define DOS +#define DOT +#define DOU +#define DOV +#define DOW +#define DOX +#define DOY +#define DOZ +#define DPA +#define DPB +#define DPC +#define DPD +#define DPE +#define DPF +#define DPG +#define DPH +#define DPI +#define DPJ +#define DPK +#define DPL +#define DPM +#define DPN +#define DPO +#define DPP +#define DPQ +#define DPR +#define DPS +#define DPT +#define DPU +#define DPV +#define DPW +#define DPX +#define DPY +#define DPZ +#define DQA +#define DQB +#define DQC +#define DQD +#define DQE +#define DQF +#define DQG +#define DQH +#define DQI +#define DQJ +#define DQK +#define DQL +#define DQM +#define DQN +#define DQO +#define DQP +#define DQQ +#define DQR +#define DQS +#define DQT +#define DQU +#define DQV +#define DQW +#define DQX +#define DQY +#define DQZ +#define DRA +#define DRB +#define DRC +#define DRD +#define DRE +#define DRF +#define DRG +#define DRH +#define DRI +#define DRJ +#define DRK +#define DRL +#define DRM +#define DRN +#define DRO +#define DRP +#define DRQ +#define DRR +#define DRS +#define DRT +#define DRU +#define DRV +#define DRW +#define DRX +#define DRY +#define DRZ +#define DSA +#define DSB +#define DSC +#define DSD +#define DSE +#define DSF +#define DSG +#define DSH +#define DSI +#define DSJ +#define DSK +#define DSL +#define DSM +#define DSN +#define DSO +#define DSP +#define DSQ +#define DSR +#define DSS +#define DST +#define DSU +#define DSV +#define DSW +#define DSX +#define DSY +#define DSZ +#define DTA +#define DTB +#define DTC +#define DTD +#define DTE +#define DTF +#define DTG +#define DTH +#define DTI +#define DTJ +#define DTK +#define DTL +#define DTM +#define DTN +#define DTO +#define DTP +#define DTQ +#define DTR +#define DTS +#define DTT +#define DTU +#define DTV +#define DTW +#define DTX +#define DTY +#define DTZ +#define DUA +#define DUB +#define DUC +#define DUD +#define DUE +#define DUF +#define DUG +#define DUH +#define DUI +#define DUJ +#define DUK +#define DUL +#define DUM +#define DUN +#define DUO +#define DUP +#define DUQ +#define DUR +#define DUS +#define DUT +#define DUU +#define DUV +#define DUW +#define DUX +#define DUY +#define DUZ +#define DVA +#define DVB +#define DVC +#define DVD +#define DVE +#define DVF +#define DVG +#define DVH +#define DVI +#define DVJ +#define DVK +#define DVL +#define DVM +#define DVN +#define DVO +#define DVP +#define DVQ +#define DVR +#define DVS +#define DVT +#define DVU +#define DVV +#define DVW +#define DVX +#define DVY +#define DVZ +#define DWA +#define DWB +#define DWC +#define DWD +#define DWE +#define DWF +#define DWG +#define DWH +#define DWI +#define DWJ +#define DWK +#define DWL +#define DWM +#define DWN +#define DWO +#define DWP +#define DWQ +#define DWR +#define DWS +#define DWT +#define DWU +#define DWV +#define DWW +#define DWX +#define DWY +#define DWZ +#define DXA +#define DXB +#define DXC +#define DXD +#define DXE +#define DXF +#define DXG +#define DXH +#define DXI +#define DXJ +#define DXK +#define DXL +#define DXM +#define DXN +#define DXO +#define DXP +#define DXQ +#define DXR +#define DXS +#define DXT +#define DXU +#define DXV +#define DXW +#define DXX +#define DXY +#define DXZ +#define DYA +#define DYB +#define DYC +#define DYD +#define DYE +#define DYF +#define DYG +#define DYH +#define DYI +#define DYJ +#define DYK +#define DYL +#define DYM +#define DYN +#define DYO +#define DYP +#define DYQ +#define DYR +#define DYS +#define DYT +#define DYU +#define DYV +#define DYW +#define DYX +#define DYY +#define DYZ +#define DZA +#define DZB +#define DZC +#define DZD +#define DZE +#define DZF +#define DZG +#define DZH +#define DZI +#define DZJ +#define DZK +#define DZL +#define DZM +#define DZN +#define DZO +#define DZP +#define DZQ +#define DZR +#define DZS +#define DZT +#define DZU +#define DZV +#define DZW +#define DZX +#define DZY +#define DZZ +#define EAA +#define EAB +#define EAC +#define EAD +#define EAE +#define EAF +#define EAG +#define EAH +#define EAI +#define EAJ +#define EAK +#define EAL +#define EAM +#define EAN +#define EAO +#define EAP +#define EAQ +#define EAR +#define EAS +#define EAT +#define EAU +#define EAV +#define EAW +#define EAX +#define EAY +#define EAZ +#define EBA +#define EBB +#define EBC +#define EBD +#define EBE +#define EBF +#define EBG +#define EBH +#define EBI +#define EBJ +#define EBK +#define EBL +#define EBM +#define EBN +#define EBO +#define EBP +#define EBQ +#define EBR +#define EBS +#define EBT +#define EBU +#define EBV +#define EBW +#define EBX +#define EBY +#define EBZ +#define ECA +#define ECB +#define ECC +#define ECD +#define ECE +#define ECF +#define ECG +#define ECH +#define ECI +#define ECJ +#define ECK +#define ECL +#define ECM +#define ECN +#define ECO +#define ECP +#define ECQ +#define ECR +#define ECS +#define ECT +#define ECU +#define ECV +#define ECW +#define ECX +#define ECY +#define ECZ +#define EDA +#define EDB +#define EDC +#define EDD +#define EDE +#define EDF +#define EDG +#define EDH +#define EDI +#define EDJ +#define EDK +#define EDL +#define EDM +#define EDN +#define EDO +#define EDP +#define EDQ +#define EDR +#define EDS +#define EDT +#define EDU +#define EDV +#define EDW +#define EDX +#define EDY +#define EDZ +#define EEA +#define EEB +#define EEC +#define EED +#define EEE +#define EEF +#define EEG +#define EEH +#define EEI +#define EEJ +#define EEK +#define EEL +#define EEM +#define EEN +#define EEO +#define EEP +#define EEQ +#define EER +#define EES +#define EET +#define EEU +#define EEV +#define EEW +#define EEX +#define EEY +#define EEZ +#define EFA +#define EFB +#define EFC +#define EFD +#define EFE +#define EFF +#define EFG +#define EFH +#define EFI +#define EFJ +#define EFK +#define EFL +#define EFM +#define EFN +#define EFO +#define EFP +#define EFQ +#define EFR +#define EFS +#define EFT +#define EFU +#define EFV +#define EFW +#define EFX +#define EFY +#define EFZ +#define EGA +#define EGB +#define EGC +#define EGD +#define EGE +#define EGF +#define EGG +#define EGH +#define EGI +#define EGJ +#define EGK +#define EGL +#define EGM +#define EGN +#define EGO +#define EGP +#define EGQ +#define EGR +#define EGS +#define EGT +#define EGU +#define EGV +#define EGW +#define EGX +#define EGY +#define EGZ +#define EHA +#define EHB +#define EHC +#define EHD +#define EHE +#define EHF +#define EHG +#define EHH +#define EHI +#define EHJ +#define EHK +#define EHL +#define EHM +#define EHN +#define EHO +#define EHP +#define EHQ +#define EHR +#define EHS +#define EHT +#define EHU +#define EHV +#define EHW +#define EHX +#define EHY +#define EHZ +#define EIA +#define EIB +#define EIC +#define EID +#define EIE +#define EIF +#define EIG +#define EIH +#define EII +#define EIJ +#define EIK +#define EIL +#define EIM +#define EIN +#define EIO +#define EIP +#define EIQ +#define EIR +#define EIS +#define EIT +#define EIU +#define EIV +#define EIW +#define EIX +#define EIY +#define EIZ +#define EJA +#define EJB +#define EJC +#define EJD +#define EJE +#define EJF +#define EJG +#define EJH +#define EJI +#define EJJ +#define EJK +#define EJL +#define EJM +#define EJN +#define EJO +#define EJP +#define EJQ +#define EJR +#define EJS +#define EJT +#define EJU +#define EJV +#define EJW +#define EJX +#define EJY +#define EJZ +#define EKA +#define EKB +#define EKC +#define EKD +#define EKE +#define EKF +#define EKG +#define EKH +#define EKI +#define EKJ +#define EKK +#define EKL +#define EKM +#define EKN +#define EKO +#define EKP +#define EKQ +#define EKR +#define EKS +#define EKT +#define EKU +#define EKV +#define EKW +#define EKX +#define EKY +#define EKZ +#define ELA +#define ELB +#define ELC +#define ELD +#define ELE +#define ELF +#define ELG +#define ELH +#define ELI +#define ELJ +#define ELK +#define ELL +#define ELM +#define ELN +#define ELO +#define ELP +#define ELQ +#define ELR +#define ELS +#define ELT +#define ELU +#define ELV +#define ELW +#define ELX +#define ELY +#define ELZ +#define EMA +#define EMB +#define EMC +#define EMD +#define EME +#define EMF +#define EMG +#define EMH +#define EMI +#define EMJ +#define EMK +#define EML +#define EMM +#define EMN +#define EMO +#define EMP +#define EMQ +#define EMR +#define EMS +#define EMT +#define EMU +#define EMV +#define EMW +#define EMX +#define EMY +#define EMZ +#define ENA +#define ENB +#define ENC +#define END +#define ENE +#define ENF +#define ENG +#define ENH +#define ENI +#define ENJ +#define ENK +#define ENL +#define ENM +#define ENN +#define ENO +#define ENP +#define ENQ +#define ENR +#define ENS +#define ENT +#define ENU +#define ENV +#define ENW +#define ENX +#define ENY +#define ENZ +#define EOA +#define EOB +#define EOC +#define EOD +#define EOE +#define EOF +#define EOG +#define EOH +#define EOI +#define EOJ +#define EOK +#define EOL +#define EOM +#define EON +#define EOO +#define EOP +#define EOQ +#define EOR +#define EOS +#define EOT +#define EOU +#define EOV +#define EOW +#define EOX +#define EOY +#define EOZ +#define EPA +#define EPB +#define EPC +#define EPD +#define EPE +#define EPF +#define EPG +#define EPH +#define EPI +#define EPJ +#define EPK +#define EPL +#define EPM +#define EPN +#define EPO +#define EPP +#define EPQ +#define EPR +#define EPS +#define EPT +#define EPU +#define EPV +#define EPW +#define EPX +#define EPY +#define EPZ +#define EQA +#define EQB +#define EQC +#define EQD +#define EQE +#define EQF +#define EQG +#define EQH +#define EQI +#define EQJ +#define EQK +#define EQL +#define EQM +#define EQN +#define EQO +#define EQP +#define EQQ +#define EQR +#define EQS +#define EQT +#define EQU +#define EQV +#define EQW +#define EQX +#define EQY +#define EQZ +#define ERA +#define ERB +#define ERC +#define ERD +#define ERE +#define ERF +#define ERG +#define ERH +#define ERI +#define ERJ +#define ERK +#define ERL +#define ERM +#define ERN +#define ERO +#define ERP +#define ERQ +#define ERR +#define ERS +#define ERT +#define ERU +#define ERV +#define ERW +#define ERX +#define ERY +#define ERZ +#define ESA +#define ESB +#define ESC +#define ESD +#define ESE +#define ESF +#define ESG +#define ESH +#define ESI +#define ESJ +#define ESK +#define ESL +#define ESM +#define ESN +#define ESO +#define ESP +#define ESQ +#define ESR +#define ESS +#define EST +#define ESU +#define ESV +#define ESW +#define ESX +#define ESY +#define ESZ +#define ETA +#define ETB +#define ETC +#define ETD +#define ETE +#define ETF +#define ETG +#define ETH +#define ETI +#define ETJ +#define ETK +#define ETL +#define ETM +#define ETN +#define ETO +#define ETP +#define ETQ +#define ETR +#define ETS +#define ETT +#define ETU +#define ETV +#define ETW +#define ETX +#define ETY +#define ETZ +#define EUA +#define EUB +#define EUC +#define EUD +#define EUE +#define EUF +#define EUG +#define EUH +#define EUI +#define EUJ +#define EUK +#define EUL +#define EUM +#define EUN +#define EUO +#define EUP +#define EUQ +#define EUR +#define EUS +#define EUT +#define EUU +#define EUV +#define EUW +#define EUX +#define EUY +#define EUZ +#define EVA +#define EVB +#define EVC +#define EVD +#define EVE +#define EVF +#define EVG +#define EVH +#define EVI +#define EVJ +#define EVK +#define EVL +#define EVM +#define EVN +#define EVO +#define EVP +#define EVQ +#define EVR +#define EVS +#define EVT +#define EVU +#define EVV +#define EVW +#define EVX +#define EVY +#define EVZ +#define EWA +#define EWB +#define EWC +#define EWD +#define EWE +#define EWF +#define EWG +#define EWH +#define EWI +#define EWJ +#define EWK +#define EWL +#define EWM +#define EWN +#define EWO +#define EWP +#define EWQ +#define EWR +#define EWS +#define EWT +#define EWU +#define EWV +#define EWW +#define EWX +#define EWY +#define EWZ +#define EXA +#define EXB +#define EXC +#define EXD +#define EXE +#define EXF +#define EXG +#define EXH +#define EXI +#define EXJ +#define EXK +#define EXL +#define EXM +#define EXN +#define EXO +#define EXP +#define EXQ +#define EXR +#define EXS +#define EXT +#define EXU +#define EXV +#define EXW +#define EXX +#define EXY +#define EXZ +#define EYA +#define EYB +#define EYC +#define EYD +#define EYE +#define EYF +#define EYG +#define EYH +#define EYI +#define EYJ +#define EYK +#define EYL +#define EYM +#define EYN +#define EYO +#define EYP +#define EYQ +#define EYR +#define EYS +#define EYT +#define EYU +#define EYV +#define EYW +#define EYX +#define EYY +#define EYZ +#define EZA +#define EZB +#define EZC +#define EZD +#define EZE +#define EZF +#define EZG +#define EZH +#define EZI +#define EZJ +#define EZK +#define EZL +#define EZM +#define EZN +#define EZO +#define EZP +#define EZQ +#define EZR +#define EZS +#define EZT +#define EZU +#define EZV +#define EZW +#define EZX +#define EZY +#define EZZ +#define FAA +#define FAB +#define FAC +#define FAD +#define FAE +#define FAF +#define FAG +#define FAH +#define FAI +#define FAJ +#define FAK +#define FAL +#define FAM +#define FAN +#define FAO +#define FAP +#define FAQ +#define FAR +#define FAS +#define FAT +#define FAU +#define FAV +#define FAW +#define FAX +#define FAY +#define FAZ +#define FBA +#define FBB +#define FBC +#define FBD +#define FBE +#define FBF +#define FBG +#define FBH +#define FBI +#define FBJ +#define FBK +#define FBL +#define FBM +#define FBN +#define FBO +#define FBP +#define FBQ +#define FBR +#define FBS +#define FBT +#define FBU +#define FBV +#define FBW +#define FBX +#define FBY +#define FBZ +#define FCA +#define FCB +#define FCC +#define FCD +#define FCE +#define FCF +#define FCG +#define FCH +#define FCI +#define FCJ +#define FCK +#define FCL +#define FCM +#define FCN +#define FCO +#define FCP +#define FCQ +#define FCR +#define FCS +#define FCT +#define FCU +#define FCV +#define FCW +#define FCX +#define FCY +#define FCZ +#define FDA +#define FDB +#define FDC +#define FDD +#define FDE +#define FDF +#define FDG +#define FDH +#define FDI +#define FDJ +#define FDK +#define FDL +#define FDM +#define FDN +#define FDO +#define FDP +#define FDQ +#define FDR +#define FDS +#define FDT +#define FDU +#define FDV +#define FDW +#define FDX +#define FDY +#define FDZ +#define FEA +#define FEB +#define FEC +#define FED +#define FEE +#define FEF +#define FEG +#define FEH +#define FEI +#define FEJ +#define FEK +#define FEL +#define FEM +#define FEN +#define FEO +#define FEP +#define FEQ +#define FER +#define FES +#define FET +#define FEU +#define FEV +#define FEW +#define FEX +#define FEY +#define FEZ +#define FFA +#define FFB +#define FFC +#define FFD +#define FFE +#define FFF +#define FFG +#define FFH +#define FFI +#define FFJ +#define FFK +#define FFL +#define FFM +#define FFN +#define FFO +#define FFP +#define FFQ +#define FFR +#define FFS +#define FFT +#define FFU +#define FFV +#define FFW +#define FFX +#define FFY +#define FFZ +#define FGA +#define FGB +#define FGC +#define FGD +#define FGE +#define FGF +#define FGG +#define FGH +#define FGI +#define FGJ +#define FGK +#define FGL +#define FGM +#define FGN +#define FGO +#define FGP +#define FGQ +#define FGR +#define FGS +#define FGT +#define FGU +#define FGV +#define FGW +#define FGX +#define FGY +#define FGZ +#define FHA +#define FHB +#define FHC +#define FHD +#define FHE +#define FHF +#define FHG +#define FHH +#define FHI +#define FHJ +#define FHK +#define FHL +#define FHM +#define FHN +#define FHO +#define FHP +#define FHQ +#define FHR +#define FHS +#define FHT +#define FHU +#define FHV +#define FHW +#define FHX +#define FHY +#define FHZ +#define FIA +#define FIB +#define FIC +#define FID +#define FIE +#define FIF +#define FIG +#define FIH +#define FII +#define FIJ +#define FIK +#define FIL +#define FIM +#define FIN +#define FIO +#define FIP +#define FIQ +#define FIR +#define FIS +#define FIT +#define FIU +#define FIV +#define FIW +#define FIX +#define FIY +#define FIZ +#define FJA +#define FJB +#define FJC +#define FJD +#define FJE +#define FJF +#define FJG +#define FJH +#define FJI +#define FJJ +#define FJK +#define FJL +#define FJM +#define FJN +#define FJO +#define FJP +#define FJQ +#define FJR +#define FJS +#define FJT +#define FJU +#define FJV +#define FJW +#define FJX +#define FJY +#define FJZ +#define FKA +#define FKB +#define FKC +#define FKD +#define FKE +#define FKF +#define FKG +#define FKH +#define FKI +#define FKJ +#define FKK +#define FKL +#define FKM +#define FKN +#define FKO +#define FKP +#define FKQ +#define FKR +#define FKS +#define FKT +#define FKU +#define FKV +#define FKW +#define FKX +#define FKY +#define FKZ +#define FLA +#define FLB +#define FLC +#define FLD +#define FLE +#define FLF +#define FLG +#define FLH +#define FLI +#define FLJ +#define FLK +#define FLL +#define FLM +#define FLN +#define FLO +#define FLP +#define FLQ +#define FLR +#define FLS +#define FLT +#define FLU +#define FLV +#define FLW +#define FLX +#define FLY +#define FLZ +#define FMA +#define FMB +#define FMC +#define FMD +#define FME +#define FMF +#define FMG +#define FMH +#define FMI +#define FMJ +#define FMK +#define FML +#define FMM +#define FMN +#define FMO +#define FMP +#define FMQ +#define FMR +#define FMS +#define FMT +#define FMU +#define FMV +#define FMW +#define FMX +#define FMY +#define FMZ +#define FNA +#define FNB +#define FNC +#define FND +#define FNE +#define FNF +#define FNG +#define FNH +#define FNI +#define FNJ +#define FNK +#define FNL +#define FNM +#define FNN +#define FNO +#define FNP +#define FNQ +#define FNR +#define FNS +#define FNT +#define FNU +#define FNV +#define FNW +#define FNX +#define FNY +#define FNZ +#define FOA +#define FOB +#define FOC +#define FOD +#define FOE +#define FOF +#define FOG +#define FOH +#define FOI +#define FOJ +#define FOK +#define FOL +#define FOM +#define FON +#define FOO +#define FOP +#define FOQ +#define FOR +#define FOS +#define FOT +#define FOU +#define FOV +#define FOW +#define FOX +#define FOY +#define FOZ +#define FPA +#define FPB +#define FPC +#define FPD +#define FPE +#define FPF +#define FPG +#define FPH +#define FPI +#define FPJ +#define FPK +#define FPL +#define FPM +#define FPN +#define FPO +#define FPP +#define FPQ +#define FPR +#define FPS +#define FPT +#define FPU +#define FPV +#define FPW +#define FPX +#define FPY +#define FPZ +#define FQA +#define FQB +#define FQC +#define FQD +#define FQE +#define FQF +#define FQG +#define FQH +#define FQI +#define FQJ +#define FQK +#define FQL +#define FQM +#define FQN +#define FQO +#define FQP +#define FQQ +#define FQR +#define FQS +#define FQT +#define FQU +#define FQV +#define FQW +#define FQX +#define FQY +#define FQZ +#define FRA +#define FRB +#define FRC +#define FRD +#define FRE +#define FRF +#define FRG +#define FRH +#define FRI +#define FRJ +#define FRK +#define FRL +#define FRM +#define FRN +#define FRO +#define FRP +#define FRQ +#define FRR +#define FRS +#define FRT +#define FRU +#define FRV +#define FRW +#define FRX +#define FRY +#define FRZ +#define FSA +#define FSB +#define FSC +#define FSD +#define FSE +#define FSF +#define FSG +#define FSH +#define FSI +#define FSJ +#define FSK +#define FSL +#define FSM +#define FSN +#define FSO +#define FSP +#define FSQ +#define FSR +#define FSS +#define FST +#define FSU +#define FSV +#define FSW +#define FSX +#define FSY +#define FSZ +#define FTA +#define FTB +#define FTC +#define FTD +#define FTE +#define FTF +#define FTG +#define FTH +#define FTI +#define FTJ +#define FTK +#define FTL +#define FTM +#define FTN +#define FTO +#define FTP +#define FTQ +#define FTR +#define FTS +#define FTT +#define FTU +#define FTV +#define FTW +#define FTX +#define FTY +#define FTZ +#define FUA +#define FUB +#define FUC +#define FUD +#define FUE +#define FUF +#define FUG +#define FUH +#define FUI +#define FUJ +#define FUK +#define FUL +#define FUM +#define FUN +#define FUO +#define FUP +#define FUQ +#define FUR +#define FUS +#define FUT +#define FUU +#define FUV +#define FUW +#define FUX +#define FUY +#define FUZ +#define FVA +#define FVB +#define FVC +#define FVD +#define FVE +#define FVF +#define FVG +#define FVH +#define FVI +#define FVJ +#define FVK +#define FVL +#define FVM +#define FVN +#define FVO +#define FVP +#define FVQ +#define FVR +#define FVS +#define FVT +#define FVU +#define FVV +#define FVW +#define FVX +#define FVY +#define FVZ +#define FWA +#define FWB +#define FWC +#define FWD +#define FWE +#define FWF +#define FWG +#define FWH +#define FWI +#define FWJ +#define FWK +#define FWL +#define FWM +#define FWN +#define FWO +#define FWP +#define FWQ +#define FWR +#define FWS +#define FWT +#define FWU +#define FWV +#define FWW +#define FWX +#define FWY +#define FWZ +#define FXA +#define FXB +#define FXC +#define FXD +#define FXE +#define FXF +#define FXG +#define FXH +#define FXI +#define FXJ +#define FXK +#define FXL +#define FXM +#define FXN +#define FXO +#define FXP +#define FXQ +#define FXR +#define FXS +#define FXT +#define FXU +#define FXV +#define FXW +#define FXX +#define FXY +#define FXZ +#define FYA +#define FYB +#define FYC +#define FYD +#define FYE +#define FYF +#define FYG +#define FYH +#define FYI +#define FYJ +#define FYK +#define FYL +#define FYM +#define FYN +#define FYO +#define FYP +#define FYQ +#define FYR +#define FYS +#define FYT +#define FYU +#define FYV +#define FYW +#define FYX +#define FYY +#define FYZ +#define FZA +#define FZB +#define FZC +#define FZD +#define FZE +#define FZF +#define FZG +#define FZH +#define FZI +#define FZJ +#define FZK +#define FZL +#define FZM +#define FZN +#define FZO +#define FZP +#define FZQ +#define FZR +#define FZS +#define FZT +#define FZU +#define FZV +#define FZW +#define FZX +#define FZY +#define FZZ +#define GAA +#define GAB +#define GAC +#define GAD +#define GAE +#define GAF +#define GAG +#define GAH +#define GAI +#define GAJ +#define GAK +#define GAL +#define GAM +#define GAN +#define GAO +#define GAP +#define GAQ +#define GAR +#define GAS +#define GAT +#define GAU +#define GAV +#define GAW +#define GAX +#define GAY +#define GAZ +#define GBA +#define GBB +#define GBC +#define GBD +#define GBE +#define GBF +#define GBG +#define GBH +#define GBI +#define GBJ +#define GBK +#define GBL +#define GBM 0x0fff +#ifndef X0FFF +#define GBN +#define GBO +#define GBP +#define GBQ +#define GBR +#define GBS +#define GBT +#define GBU +#define GBV +#define GBW +#define GBX +#define GBY +#define GBZ +#define GCA +#define GCB +#define GCC +#define GCD +#define GCE +#define GCF +#define GCG +#define GCH +#define GCI +#define GCJ +#define GCK +#define GCL +#define GCM +#define GCN +#define GCO +#define GCP +#define GCQ +#define GCR +#define GCS +#define GCT +#define GCU +#define GCV +#define GCW +#define GCX +#define GCY +#define GCZ +#define GDA +#define GDB +#define GDC +#define GDD +#define GDE +#define GDF +#define GDG +#define GDH +#define GDI +#define GDJ +#define GDK +#define GDL +#define GDM +#define GDN +#define GDO +#define GDP +#define GDQ +#define GDR +#define GDS +#define GDT +#define GDU +#define GDV +#define GDW +#define GDX +#define GDY +#define GDZ +#define GEA +#define GEB +#define GEC +#define GED +#define GEE +#define GEF +#define GEG +#define GEH +#define GEI +#define GEJ +#define GEK +#define GEL +#define GEM +#define GEN +#define GEO +#define GEP +#define GEQ +#define GER +#define GES +#define GET +#define GEU +#define GEV +#define GEW +#define GEX +#define GEY +#define GEZ +#define GFA +#define GFB +#define GFC +#define GFD +#define GFE +#define GFF +#define GFG +#define GFH +#define GFI +#define GFJ +#define GFK +#define GFL +#define GFM +#define GFN +#define GFO +#define GFP +#define GFQ +#define GFR +#define GFS +#define GFT +#define GFU +#define GFV +#define GFW +#define GFX +#define GFY +#define GFZ +#define GGA +#define GGB +#define GGC +#define GGD +#define GGE +#define GGF +#define GGG +#define GGH +#define GGI +#define GGJ +#define GGK +#define GGL +#define GGM +#define GGN +#define GGO +#define GGP +#define GGQ +#define GGR +#define GGS +#define GGT +#define GGU +#define GGV +#define GGW +#define GGX +#define GGY +#define GGZ +#define GHA +#define GHB +#define GHC +#define GHD +#define GHE +#define GHF +#define GHG +#define GHH +#define GHI +#define GHJ +#define GHK +#define GHL +#define GHM +#define GHN +#define GHO +#define GHP +#define GHQ +#define GHR +#define GHS +#define GHT +#define GHU +#define GHV +#define GHW +#define GHX +#define GHY +#define GHZ +#define GIA +#define GIB +#define GIC +#define GID +#define GIE +#define GIF +#define GIG +#define GIH +#define GII +#define GIJ +#define GIK +#define GIL +#define GIM +#define GIN +#define GIO +#define GIP +#define GIQ +#define GIR +#define GIS +#define GIT +#define GIU +#define GIV +#define GIW +#define GIX +#define GIY +#define GIZ +#define GJA +#define GJB +#define GJC +#define GJD +#define GJE +#define GJF +#define GJG +#define GJH +#define GJI +#define GJJ +#define GJK +#define GJL +#define GJM +#define GJN +#define GJO +#define GJP +#define GJQ +#define GJR +#define GJS +#define GJT +#define GJU +#define GJV +#define GJW +#define GJX +#define GJY +#define GJZ +#define GKA +#define GKB +#define GKC +#define GKD +#define GKE +#define GKF +#define GKG +#define GKH +#define GKI +#define GKJ +#define GKK +#define GKL +#define GKM +#define GKN +#define GKO +#define GKP +#define GKQ +#define GKR +#define GKS +#define GKT +#define GKU +#define GKV +#define GKW +#define GKX +#define GKY +#define GKZ +#define GLA +#define GLB +#define GLC +#define GLD +#define GLE +#define GLF +#define GLG +#define GLH +#define GLI +#define GLJ +#define GLK +#define GLL +#define GLM +#define GLN +#define GLO +#define GLP +#define GLQ +#define GLR +#define GLS +#define GLT +#define GLU +#define GLV +#define GLW +#define GLX +#define GLY +#define GLZ +#define GMA +#define GMB +#define GMC +#define GMD +#define GME +#define GMF +#define GMG +#define GMH +#define GMI +#define GMJ +#define GMK +#define GML +#define GMM +#define GMN +#define GMO +#define GMP +#define GMQ +#define GMR +#define GMS +#define GMT +#define GMU +#define GMV +#define GMW +#define GMX +#define GMY +#define GMZ +#define GNA +#define GNB +#define GNC +#define GND +#define GNE +#define GNF +#define GNG +#define GNH +#define GNI +#define GNJ +#define GNK +#define GNL +#define GNM +#define GNN +#define GNO +#define GNP +#define GNQ +#define GNR +#define GNS +#define GNT +#define GNU +#define GNV +#define GNW +#define GNX +#define GNY +#define GNZ +#define GOA +#define GOB +#define GOC +#define GOD +#define GOE +#define GOF +#define GOG +#define GOH +#define GOI +#define GOJ +#define GOK +#define GOL +#define GOM +#define GON +#define GOO +#define GOP +#define GOQ +#define GOR +#define GOS +#define GOT +#define GOU +#define GOV +#define GOW +#define GOX +#define GOY +#define GOZ +#define GPA +#define GPB +#define GPC +#define GPD +#define GPE +#define GPF +#define GPG +#define GPH +#define GPI +#define GPJ +#define GPK +#define GPL +#define GPM +#define GPN +#define GPO +#define GPP +#define GPQ +#define GPR +#define GPS +#define GPT +#define GPU +#define GPV +#define GPW +#define GPX +#define GPY +#define GPZ +#define GQA +#define GQB +#define GQC +#define GQD +#define GQE +#define GQF +#define GQG +#define GQH +#define GQI +#define GQJ +#define GQK +#define GQL +#define GQM +#define GQN +#define GQO +#define GQP +#define GQQ +#define GQR +#define GQS +#define GQT +#define GQU +#define GQV +#define GQW +#define GQX +#define GQY +#define GQZ +#define GRA +#define GRB +#define GRC +#define GRD +#define GRE +#define GRF +#define GRG +#define GRH +#define GRI +#define GRJ +#define GRK +#define GRL +#define GRM +#define GRN +#define GRO +#define GRP +#define GRQ +#define GRR +#define GRS +#define GRT +#define GRU +#define GRV +#define GRW +#define GRX +#define GRY +#define GRZ +#define GSA +#define GSB +#define GSC +#define GSD +#define GSE +#define GSF +#define GSG +#define GSH +#define GSI +#define GSJ +#define GSK +#define GSL +#define GSM +#define GSN +#define GSO +#define GSP +#define GSQ +#define GSR +#define GSS +#define GST +#define GSU +#define GSV +#define GSW +#define GSX +#define GSY +#define GSZ +#define GTA +#define GTB +#define GTC +#define GTD +#define GTE +#define GTF +#define GTG +#define GTH +#define GTI +#define GTJ +#define GTK +#define GTL +#define GTM +#define GTN +#define GTO +#define GTP +#define GTQ +#define GTR +#define GTS +#define GTT +#define GTU +#define GTV +#define GTW +#define GTX +#define GTY +#define GTZ +#define GUA +#define GUB +#define GUC +#define GUD +#define GUE +#define GUF +#define GUG +#define GUH +#define GUI +#define GUJ +#define GUK +#define GUL +#define GUM +#define GUN +#define GUO +#define GUP +#define GUQ +#define GUR +#define GUS +#define GUT +#define GUU +#define GUV +#define GUW +#define GUX +#define GUY +#define GUZ +#define GVA +#define GVB +#define GVC +#define GVD +#define GVE +#define GVF +#define GVG +#define GVH +#define GVI +#define GVJ +#define GVK +#define GVL +#define GVM +#define GVN +#define GVO +#define GVP +#define GVQ +#define GVR +#define GVS +#define GVT +#define GVU +#define GVV +#define GVW +#define GVX +#define GVY +#define GVZ +#define GWA +#define GWB +#define GWC +#define GWD +#define GWE +#define GWF +#define GWG +#define GWH +#define GWI +#define GWJ +#define GWK +#define GWL +#define GWM +#define GWN +#define GWO +#define GWP +#define GWQ +#define GWR +#define GWS +#define GWT +#define GWU +#define GWV +#define GWW +#define GWX +#define GWY +#define GWZ +#define GXA +#define GXB +#define GXC +#define GXD +#define GXE +#define GXF +#define GXG +#define GXH +#define GXI +#define GXJ +#define GXK +#define GXL +#define GXM +#define GXN +#define GXO +#define GXP +#define GXQ +#define GXR +#define GXS +#define GXT +#define GXU +#define GXV +#define GXW +#define GXX +#define GXY +#define GXZ +#define GYA +#define GYB +#define GYC +#define GYD +#define GYE +#define GYF +#define GYG +#define GYH +#define GYI +#define GYJ +#define GYK +#define GYL +#define GYM +#define GYN +#define GYO +#define GYP +#define GYQ +#define GYR +#define GYS +#define GYT +#define GYU +#define GYV +#define GYW +#define GYX +#define GYY +#define GYZ +#define GZA +#define GZB +#define GZC +#define GZD +#define GZE +#define GZF +#define GZG +#define GZH +#define GZI +#define GZJ +#define GZK +#define GZL +#define GZM +#define GZN +#define GZO +#define GZP +#define GZQ +#define GZR +#define GZS +#define GZT +#define GZU +#define GZV +#define GZW +#define GZX +#define GZY +#define GZZ +#define HAA +#define HAB +#define HAC +#define HAD +#define HAE +#define HAF +#define HAG +#define HAH +#define HAI +#define HAJ +#define HAK +#define HAL +#define HAM +#define HAN +#define HAO +#define HAP +#define HAQ +#define HAR +#define HAS +#define HAT +#define HAU +#define HAV +#define HAW +#define HAX +#define HAY +#define HAZ +#define HBA +#define HBB +#define HBC +#define HBD +#define HBE +#define HBF +#define HBG +#define HBH +#define HBI +#define HBJ +#define HBK +#define HBL +#define HBM +#define HBN +#define HBO +#define HBP +#define HBQ +#define HBR +#define HBS +#define HBT +#define HBU +#define HBV +#define HBW +#define HBX +#define HBY +#define HBZ +#define HCA +#define HCB +#define HCC +#define HCD +#define HCE +#define HCF +#define HCG +#define HCH +#define HCI +#define HCJ +#define HCK +#define HCL +#define HCM +#define HCN +#define HCO +#define HCP +#define HCQ +#define HCR +#define HCS +#define HCT +#define HCU +#define HCV +#define HCW +#define HCX +#define HCY +#define HCZ +#define HDA +#define HDB +#define HDC +#define HDD +#define HDE +#define HDF +#define HDG +#define HDH +#define HDI +#define HDJ +#define HDK +#define HDL +#define HDM +#define HDN +#define HDO +#define HDP +#define HDQ +#define HDR +#define HDS +#define HDT +#define HDU +#define HDV +#define HDW +#define HDX +#define HDY +#define HDZ +#define HEA +#define HEB +#define HEC +#define HED +#define HEE +#define HEF +#define HEG +#define HEH +#define HEI +#define HEJ +#define HEK +#define HEL +#define HEM +#define HEN +#define HEO +#define HEP +#define HEQ +#define HER +#define HES +#define HET +#define HEU +#define HEV +#define HEW +#define HEX +#define HEY +#define HEZ +#define HFA +#define HFB +#define HFC +#define HFD +#define HFE +#define HFF +#define HFG +#define HFH +#define HFI +#define HFJ +#define HFK +#define HFL +#define HFM +#define HFN +#define HFO +#define HFP +#define HFQ +#define HFR +#define HFS +#define HFT +#define HFU +#define HFV +#define HFW +#define HFX +#define HFY +#define HFZ +#define HGA +#define HGB +#define HGC +#define HGD +#define HGE +#define HGF +#define HGG +#define HGH +#define HGI +#define HGJ +#define HGK +#define HGL +#define HGM +#define HGN +#define HGO +#define HGP +#define HGQ +#define HGR +#define HGS +#define HGT +#define HGU +#define HGV +#define HGW +#define HGX +#define HGY +#define HGZ +#define HHA +#define HHB +#define HHC +#define HHD +#define HHE +#define HHF +#define HHG +#define HHH +#define HHI +#define HHJ +#define HHK +#define HHL +#define HHM +#define HHN +#define HHO +#define HHP +#define HHQ +#define HHR +#define HHS +#define HHT +#define HHU +#define HHV +#define HHW +#define HHX +#define HHY +#define HHZ +#define HIA +#define HIB +#define HIC +#define HID +#define HIE +#define HIF +#define HIG +#define HIH +#define HII +#define HIJ +#define HIK +#define HIL +#define HIM +#define HIN +#define HIO +#define HIP +#define HIQ +#define HIR +#define HIS +#define HIT +#define HIU +#define HIV +#define HIW +#define HIX +#define HIY +#define HIZ +#define HJA +#define HJB +#define HJC +#define HJD +#define HJE +#define HJF +#define HJG +#define HJH +#define HJI +#define HJJ +#define HJK +#define HJL +#define HJM +#define HJN +#define HJO +#define HJP +#define HJQ +#define HJR +#define HJS +#define HJT +#define HJU +#define HJV +#define HJW +#define HJX +#define HJY +#define HJZ +#define HKA +#define HKB +#define HKC +#define HKD +#define HKE +#define HKF +#define HKG +#define HKH +#define HKI +#define HKJ +#define HKK +#define HKL +#define HKM +#define HKN +#define HKO +#define HKP +#define HKQ +#define HKR +#define HKS +#define HKT +#define HKU +#define HKV +#define HKW +#define HKX +#define HKY +#define HKZ +#define HLA +#define HLB +#define HLC +#define HLD +#define HLE +#define HLF +#define HLG +#define HLH +#define HLI +#define HLJ +#define HLK +#define HLL +#define HLM +#define HLN +#define HLO +#define HLP +#define HLQ +#define HLR +#define HLS +#define HLT +#define HLU +#define HLV +#define HLW +#define HLX +#define HLY +#define HLZ +#define HMA +#define HMB +#define HMC +#define HMD +#define HME +#define HMF +#define HMG +#define HMH +#define HMI +#define HMJ +#define HMK +#define HML +#define HMM +#define HMN +#define HMO +#define HMP +#define HMQ +#define HMR +#define HMS +#define HMT +#define HMU +#define HMV +#define HMW +#define HMX +#define HMY +#define HMZ +#define HNA +#define HNB +#define HNC +#define HND +#define HNE +#define HNF +#define HNG +#define HNH +#define HNI +#define HNJ +#define HNK +#define HNL +#define HNM +#define HNN +#define HNO +#define HNP +#define HNQ +#define HNR +#define HNS +#define HNT +#define HNU +#define HNV +#define HNW +#define HNX +#define HNY +#define HNZ +#define HOA +#define HOB +#define HOC +#define HOD +#define HOE +#define HOF +#define HOG +#define HOH +#define HOI +#define HOJ +#define HOK +#define HOL +#define HOM +#define HON +#define HOO +#define HOP +#define HOQ +#define HOR +#define HOS +#define HOT +#define HOU +#define HOV +#define HOW +#define HOX +#define HOY +#define HOZ +#define HPA +#define HPB +#define HPC +#define HPD +#define HPE +#define HPF +#define HPG +#define HPH +#define HPI +#define HPJ +#define HPK +#define HPL +#define HPM +#define HPN +#define HPO +#define HPP +#define HPQ +#define HPR +#define HPS +#define HPT +#define HPU +#define HPV +#define HPW +#define HPX +#define HPY +#define HPZ +#define HQA +#define HQB +#define HQC +#define HQD +#define HQE +#define HQF +#define HQG +#define HQH +#define HQI +#define HQJ +#define HQK +#define HQL +#define HQM +#define HQN +#define HQO +#define HQP +#define HQQ +#define HQR +#define HQS +#define HQT +#define HQU +#define HQV +#define HQW +#define HQX +#define HQY +#define HQZ +#define HRA +#define HRB +#define HRC +#define HRD +#define HRE +#define HRF +#define HRG +#define HRH +#define HRI +#define HRJ +#define HRK +#define HRL +#define HRM +#define HRN +#define HRO +#define HRP +#define HRQ +#define HRR +#define HRS +#define HRT +#define HRU +#define HRV +#define HRW +#define HRX +#define HRY +#define HRZ +#define HSA +#define HSB +#define HSC +#define HSD +#define HSE +#define HSF +#define HSG +#define HSH +#define HSI +#define HSJ +#define HSK +#define HSL +#define HSM +#define HSN +#define HSO +#define HSP +#define HSQ +#define HSR +#define HSS +#define HST +#define HSU +#define HSV +#define HSW +#define HSX +#define HSY +#define HSZ +#define HTA +#define HTB +#define HTC +#define HTD +#define HTE +#define HTF +#define HTG +#define HTH +#define HTI +#define HTJ +#define HTK +#define HTL +#define HTM +#define HTN +#define HTO +#define HTP +#define HTQ +#define HTR +#define HTS +#define HTT +#define HTU +#define HTV +#define HTW +#define HTX +#define HTY +#define HTZ +#define HUA +#define HUB +#define HUC +#define HUD +#define HUE +#define HUF +#define HUG +#define HUH +#define HUI +#define HUJ +#define HUK +#define HUL +#define HUM +#define HUN +#define HUO +#define HUP +#define HUQ +#define HUR +#define HUS +#define HUT +#define HUU +#define HUV +#define HUW +#define HUX +#define HUY +#define HUZ +#define HVA +#define HVB +#define HVC +#define HVD +#define HVE +#define HVF +#define HVG +#define HVH +#define HVI +#define HVJ +#define HVK +#define HVL +#define HVM +#define HVN +#define HVO +#define HVP +#define HVQ +#define HVR +#define HVS +#define HVT +#define HVU +#define HVV +#define HVW +#define HVX +#define HVY +#define HVZ +#define HWA +#define HWB +#define HWC +#define HWD +#define HWE +#define HWF +#define HWG +#define HWH +#define HWI +#define HWJ +#define HWK +#define HWL +#define HWM +#define HWN +#define HWO +#define HWP +#define HWQ +#define HWR +#define HWS +#define HWT +#define HWU +#define HWV +#define HWW +#define HWX +#define HWY +#define HWZ +#define HXA +#define HXB +#define HXC +#define HXD +#define HXE +#define HXF +#define HXG +#define HXH +#define HXI +#define HXJ +#define HXK +#define HXL +#define HXM +#define HXN +#define HXO +#define HXP +#define HXQ +#define HXR +#define HXS +#define HXT +#define HXU +#define HXV +#define HXW +#define HXX +#define HXY +#define HXZ +#define HYA +#define HYB +#define HYC +#define HYD +#define HYE +#define HYF +#define HYG +#define HYH +#define HYI +#define HYJ +#define HYK +#define HYL +#define HYM +#define HYN +#define HYO +#define HYP +#define HYQ +#define HYR +#define HYS +#define HYT +#define HYU +#define HYV +#define HYW +#define HYX +#define HYY +#define HYZ +#define HZA +#define HZB +#define HZC +#define HZD +#define HZE +#define HZF +#define HZG +#define HZH +#define HZI +#define HZJ +#define HZK +#define HZL +#define HZM +#define HZN +#define HZO +#define HZP +#define HZQ +#define HZR +#define HZS +#define HZT +#define HZU +#define HZV +#define HZW +#define HZX +#define HZY +#define HZZ +#define IAA +#define IAB +#define IAC +#define IAD +#define IAE +#define IAF +#define IAG +#define IAH +#define IAI +#define IAJ +#define IAK +#define IAL +#define IAM +#define IAN +#define IAO +#define IAP +#define IAQ +#define IAR +#define IAS +#define IAT +#define IAU +#define IAV +#define IAW +#define IAX +#define IAY +#define IAZ +#define IBA +#define IBB +#define IBC +#define IBD +#define IBE +#define IBF +#define IBG +#define IBH +#define IBI +#define IBJ +#define IBK +#define IBL +#define IBM +#define IBN +#define IBO +#define IBP +#define IBQ +#define IBR +#define IBS +#define IBT +#define IBU +#define IBV +#define IBW +#define IBX +#define IBY +#define IBZ +#define ICA +#define ICB +#define ICC +#define ICD +#define ICE +#define ICF +#define ICG +#define ICH +#define ICI +#define ICJ +#define ICK +#define ICL +#define ICM +#define ICN +#define ICO +#define ICP +#define ICQ +#define ICR +#define ICS +#define ICT +#define ICU +#define ICV +#define ICW +#define ICX +#define ICY +#define ICZ +#define IDA +#define IDB +#define IDC +#define IDD +#define IDE +#define IDF +#define IDG +#define IDH +#define IDI +#define IDJ +#define IDK +#define IDL +#define IDM +#define IDN +#define IDO +#define IDP +#define IDQ +#define IDR +#define IDS +#define IDT +#define IDU +#define IDV +#define IDW +#define IDX +#define IDY +#define IDZ +#define IEA +#define IEB +#define IEC +#define IED +#define IEE +#define IEF +#define IEG +#define IEH +#define IEI +#define IEJ +#define IEK +#define IEL +#define IEM +#define IEN +#define IEO +#define IEP +#define IEQ +#define IER +#define IES +#define IET +#define IEU +#define IEV +#define IEW +#define IEX +#define IEY +#define IEZ +#define IFA +#define IFB +#define IFC +#define IFD +#define IFE +#define IFF +#define IFG +#define IFH +#define IFI +#define IFJ +#define IFK +#define IFL +#define IFM +#define IFN +#define IFO +#define IFP +#define IFQ +#define IFR +#define IFS +#define IFT +#define IFU +#define IFV +#define IFW +#define IFX +#define IFY +#define IFZ +#define IGA +#define IGB +#define IGC +#define IGD +#define IGE +#define IGF +#define IGG +#define IGH +#define IGI +#define IGJ +#define IGK +#define IGL +#define IGM +#define IGN +#define IGO +#define IGP +#define IGQ +#define IGR +#define IGS +#define IGT +#define IGU +#define IGV +#define IGW +#define IGX +#define IGY +#define IGZ +#define IHA +#define IHB +#define IHC +#define IHD +#define IHE +#define IHF +#define IHG +#define IHH +#define IHI +#define IHJ +#define IHK +#define IHL +#define IHM +#define IHN +#define IHO +#define IHP +#define IHQ +#define IHR +#define IHS +#define IHT +#define IHU +#define IHV +#define IHW +#define IHX +#define IHY +#define IHZ +#define IIA +#define IIB +#define IIC +#define IID +#define IIE +#define IIF +#define IIG +#define IIH +#define III +#define IIJ +#define IIK +#define IIL +#define IIM +#define IIN +#define IIO +#define IIP +#define IIQ +#define IIR +#define IIS +#define IIT +#define IIU +#define IIV +#define IIW +#define IIX +#define IIY +#define IIZ +#define IJA +#define IJB +#define IJC +#define IJD +#define IJE +#define IJF +#define IJG +#define IJH +#define IJI +#define IJJ +#define IJK +#define IJL +#define IJM +#define IJN +#define IJO +#define IJP +#define IJQ +#define IJR +#define IJS +#define IJT +#define IJU +#define IJV +#define IJW +#define IJX +#define IJY +#define IJZ +#define IKA +#define IKB +#define IKC +#define IKD +#define IKE +#define IKF +#define IKG +#define IKH +#define IKI +#define IKJ +#define IKK +#define IKL +#define IKM +#define IKN +#define IKO +#define IKP +#define IKQ +#define IKR +#define IKS +#define IKT +#define IKU +#define IKV +#define IKW +#define IKX +#define IKY +#define IKZ +#define ILA +#define ILB +#define ILC +#define ILD +#define ILE +#define ILF +#define ILG +#define ILH +#define ILI +#define ILJ +#define ILK +#define ILL +#define ILM +#define ILN +#define ILO +#define ILP +#define ILQ +#define ILR +#define ILS +#define ILT +#define ILU +#define ILV +#define ILW +#define ILX +#define ILY +#define ILZ +#define IMA +#define IMB +#define IMC +#define IMD +#define IME +#define IMF +#define IMG +#define IMH +#define IMI +#define IMJ +#define IMK +#define IML +#define IMM +#define IMN +#define IMO +#define IMP +#define IMQ +#define IMR +#define IMS +#define IMT +#define IMU +#define IMV +#define IMW +#define IMX +#define IMY +#define IMZ +#define INA +#define INB +#define INC +#define IND +#define INE +#define INF +#define ING +#define INH +#define INI +#define INJ +#define INK +#define INL +#define INM +#define INN +#define INO +#define INP +#define INQ +#define INR +#define INS +#define INT +#define INU +#define INV +#define INW +#define INX +#define INY +#define INZ +#define IOA +#define IOB +#define IOC +#define IOD +#define IOE +#define IOF +#define IOG +#define IOH +#define IOI +#define IOJ +#define IOK +#define IOL +#define IOM +#define ION +#define IOO +#define IOP +#define IOQ +#define IOR +#define IOS +#define IOT +#define IOU +#define IOV +#define IOW +#define IOX +#define IOY +#define IOZ +#define IPA +#define IPB +#define IPC +#define IPD +#define IPE +#define IPF +#define IPG +#define IPH +#define IPI +#define IPJ +#define IPK +#define IPL +#define IPM +#define IPN +#define IPO +#define IPP +#define IPQ +#define IPR +#define IPS +#define IPT +#define IPU +#define IPV +#define IPW +#define IPX +#define IPY +#define IPZ +#define IQA +#define IQB +#define IQC +#define IQD +#define IQE +#define IQF +#define IQG +#define IQH +#define IQI +#define IQJ +#define IQK +#define IQL +#define IQM +#define IQN +#define IQO +#define IQP +#define IQQ +#define IQR +#define IQS +#define IQT +#define IQU +#define IQV +#define IQW +#define IQX +#define IQY +#define IQZ +#define IRA +#define IRB +#define IRC +#define IRD +#define IRE +#define IRF +#define IRG +#define IRH +#define IRI +#define IRJ +#define IRK +#define IRL +#define IRM +#define IRN +#define IRO +#define IRP +#define IRQ +#define IRR +#define IRS +#define IRT +#define IRU +#define IRV +#define IRW +#define IRX +#define IRY +#define IRZ +#define ISA +#define ISB +#define ISC +#define ISD +#define ISE +#define ISF +#define ISG +#define ISH +#define ISI +#define ISJ +#define ISK +#define ISL +#define ISM +#define ISN +#define ISO +#define ISP +#define ISQ +#define ISR +#define ISS +#define IST +#define ISU +#define ISV +#define ISW +#define ISX +#define ISY +#define ISZ +#define ITA +#define ITB +#define ITC +#define ITD +#define ITE +#define ITF +#define ITG +#define ITH +#define ITI +#define ITJ +#define ITK +#define ITL +#define ITM +#define ITN +#define ITO +#define ITP +#define ITQ +#define ITR +#define ITS +#define ITT +#define ITU +#define ITV +#define ITW +#define ITX +#define ITY +#define ITZ +#define IUA +#define IUB +#define IUC +#define IUD +#define IUE +#define IUF +#define IUG +#define IUH +#define IUI +#define IUJ +#define IUK +#define IUL +#define IUM +#define IUN +#define IUO +#define IUP +#define IUQ +#define IUR +#define IUS +#define IUT +#define IUU +#define IUV +#define IUW +#define IUX +#define IUY +#define IUZ +#define IVA +#define IVB +#define IVC +#define IVD +#define IVE +#define IVF +#define IVG +#define IVH +#define IVI +#define IVJ +#define IVK +#define IVL +#define IVM +#define IVN +#define IVO +#define IVP +#define IVQ +#define IVR +#define IVS +#define IVT +#define IVU +#define IVV +#define IVW +#define IVX +#define IVY +#define IVZ +#define IWA +#define IWB +#define IWC +#define IWD +#define IWE +#define IWF +#define IWG +#define IWH +#define IWI +#define IWJ +#define IWK +#define IWL +#define IWM +#define IWN +#define IWO +#define IWP +#define IWQ +#define IWR +#define IWS +#define IWT +#define IWU +#define IWV +#define IWW +#define IWX +#define IWY +#define IWZ +#define IXA +#define IXB +#define IXC +#define IXD +#define IXE +#define IXF +#define IXG +#define IXH +#define IXI +#define IXJ +#define IXK +#define IXL +#define IXM +#define IXN +#define IXO +#define IXP +#define IXQ +#define IXR +#define IXS +#define IXT +#define IXU +#define IXV +#define IXW +#define IXX +#define IXY +#define IXZ +#define IYA +#define IYB +#define IYC +#define IYD +#define IYE +#define IYF +#define IYG +#define IYH +#define IYI +#define IYJ +#define IYK +#define IYL +#define IYM +#define IYN +#define IYO +#define IYP +#define IYQ +#define IYR +#define IYS +#define IYT +#define IYU +#define IYV +#define IYW +#define IYX +#define IYY +#define IYZ +#define IZA +#define IZB +#define IZC +#define IZD +#define IZE +#define IZF +#define IZG +#define IZH +#define IZI +#define IZJ +#define IZK +#define IZL +#define IZM +#define IZN +#define IZO +#define IZP +#define IZQ +#define IZR +#define IZS +#define IZT +#define IZU +#define IZV +#define IZW +#define IZX +#define IZY +#define IZZ +#define JAA +#define JAB +#define JAC +#define JAD +#define JAE +#define JAF +#define JAG +#define JAH +#define JAI +#define JAJ +#define JAK +#define JAL +#define JAM +#define JAN +#define JAO +#define JAP +#define JAQ +#define JAR +#define JAS +#define JAT +#define JAU +#define JAV +#define JAW +#define JAX +#define JAY +#define JAZ +#define JBA +#define JBB +#define JBC +#define JBD +#define JBE +#define JBF +#define JBG +#define JBH +#define JBI +#define JBJ +#define JBK +#define JBL +#define JBM +#define JBN +#define JBO +#define JBP +#define JBQ +#define JBR +#define JBS +#define JBT +#define JBU +#define JBV +#define JBW +#define JBX +#define JBY +#define JBZ +#define JCA +#define JCB +#define JCC +#define JCD +#define JCE +#define JCF +#define JCG +#define JCH +#define JCI +#define JCJ +#define JCK +#define JCL +#define JCM +#define JCN +#define JCO +#define JCP +#define JCQ +#define JCR +#define JCS +#define JCT +#define JCU +#define JCV +#define JCW +#define JCX +#define JCY +#define JCZ +#define JDA +#define JDB +#define JDC +#define JDD +#define JDE +#define JDF +#define JDG +#define JDH +#define JDI +#define JDJ +#define JDK +#define JDL +#define JDM +#define JDN +#define JDO +#define JDP +#define JDQ +#define JDR +#define JDS +#define JDT +#define JDU +#define JDV +#define JDW +#define JDX +#define JDY +#define JDZ +#define JEA +#define JEB +#define JEC +#define JED +#define JEE +#define JEF +#define JEG +#define JEH +#define JEI +#define JEJ +#define JEK +#define JEL +#define JEM +#define JEN +#define JEO +#define JEP +#define JEQ +#define JER +#define JES +#define JET +#define JEU +#define JEV +#define JEW +#define JEX +#define JEY +#define JEZ +#define JFA +#define JFB +#define JFC +#define JFD +#define JFE +#define JFF +#define JFG +#define JFH +#define JFI +#define JFJ +#define JFK +#define JFL +#define JFM +#define JFN +#define JFO +#define JFP +#define JFQ +#define JFR +#define JFS +#define JFT +#define JFU +#define JFV +#define JFW +#define JFX +#define JFY +#define JFZ +#define JGA +#define JGB +#define JGC +#define JGD +#define JGE +#define JGF +#define JGG +#define JGH +#define JGI +#define JGJ +#define JGK +#define JGL +#define JGM +#define JGN +#define JGO +#define JGP +#define JGQ +#define JGR +#define JGS +#define JGT +#define JGU +#define JGV +#define JGW +#define JGX +#define JGY +#define JGZ +#define JHA +#define JHB +#define JHC +#define JHD +#define JHE +#define JHF +#define JHG +#define JHH +#define JHI +#define JHJ +#define JHK +#define JHL +#define JHM +#define JHN +#define JHO +#define JHP +#define JHQ +#define JHR +#define JHS +#define JHT +#define JHU +#define JHV +#define JHW +#define JHX +#define JHY +#define JHZ +#define JIA +#define JIB +#define JIC +#define JID +#define JIE +#define JIF +#define JIG +#define JIH +#define JII +#define JIJ +#define JIK +#define JIL +#define JIM +#define JIN +#define JIO +#define JIP +#define JIQ +#define JIR +#define JIS +#define JIT +#define JIU +#define JIV +#define JIW +#define JIX +#define JIY +#define JIZ +#define JJA +#define JJB +#define JJC +#define JJD +#define JJE +#define JJF +#define JJG +#define JJH +#define JJI +#define JJJ +#define JJK +#define JJL +#define JJM +#define JJN +#define JJO +#define JJP +#define JJQ +#define JJR +#define JJS +#define JJT +#define JJU +#define JJV +#define JJW +#define JJX +#define JJY +#define JJZ +#define JKA +#define JKB +#define JKC +#define JKD +#define JKE +#define JKF +#define JKG +#define JKH +#define JKI +#define JKJ +#define JKK +#define JKL +#define JKM +#define JKN +#define JKO +#define JKP +#define JKQ +#define JKR +#define JKS +#define JKT +#define JKU +#define JKV +#define JKW +#define JKX +#define JKY +#define JKZ +#define JLA +#define JLB +#define JLC +#define JLD +#define JLE +#define JLF +#define JLG +#define JLH +#define JLI +#define JLJ +#define JLK +#define JLL +#define JLM +#define JLN +#define JLO +#define JLP +#define JLQ +#define JLR +#define JLS +#define JLT +#define JLU +#define JLV +#define JLW +#define JLX +#define JLY +#define JLZ +#define JMA +#define JMB +#define JMC +#define JMD +#define JME +#define JMF +#define JMG +#define JMH +#define JMI +#define JMJ +#define JMK +#define JML +#define JMM +#define JMN +#define JMO +#define JMP +#define JMQ +#define JMR +#define JMS +#define JMT +#define JMU +#define JMV +#define JMW +#define JMX +#define JMY +#define JMZ +#define JNA +#define JNB +#define JNC +#define JND +#define JNE +#define JNF +#define JNG +#define JNH +#define JNI +#define JNJ +#define JNK +#define JNL +#define JNM +#define JNN +#define JNO +#define JNP +#define JNQ +#define JNR +#define JNS +#define JNT +#define JNU +#define JNV +#define JNW +#define JNX +#define JNY +#define JNZ +#define JOA +#define JOB +#define JOC +#define JOD +#define JOE +#define JOF +#define JOG +#define JOH +#define JOI +#define JOJ +#define JOK +#define JOL +#define JOM +#define JON +#define JOO +#define JOP +#define JOQ +#define JOR +#define JOS +#define JOT +#define JOU +#define JOV +#define JOW +#define JOX +#define JOY +#define JOZ +#define JPA +#define JPB +#define JPC +#define JPD +#define JPE +#define JPF +#define JPG +#define JPH +#define JPI +#define JPJ +#define JPK +#define JPL +#define JPM +#define JPN +#define JPO +#define JPP +#define JPQ +#define JPR +#define JPS +#define JPT +#define JPU +#define JPV +#define JPW +#define JPX +#define JPY +#define JPZ +#define JQA +#define JQB +#define JQC +#define JQD +#define JQE +#define JQF +#define JQG +#define JQH +#define JQI +#define JQJ +#define JQK +#define JQL +#define JQM +#define JQN +#define JQO +#define JQP +#define JQQ +#define JQR +#define JQS +#define JQT +#define JQU +#define JQV +#define JQW +#define JQX +#define JQY +#define JQZ +#define JRA +#define JRB +#define JRC +#define JRD +#define JRE +#define JRF +#define JRG +#define JRH +#define JRI +#define JRJ +#define JRK +#define JRL +#define JRM +#define JRN +#define JRO +#define JRP +#define JRQ +#define JRR +#define JRS +#define JRT +#define JRU +#define JRV +#define JRW +#define JRX +#define JRY +#define JRZ +#define JSA +#define JSB +#define JSC +#define JSD +#define JSE +#define JSF +#define JSG +#define JSH +#define JSI +#define JSJ +#define JSK +#define JSL +#define JSM +#define JSN +#define JSO +#define JSP +#define JSQ +#define JSR +#define JSS +#define JST +#define JSU +#define JSV +#define JSW +#define JSX +#define JSY +#define JSZ +#define JTA +#define JTB +#define JTC +#define JTD +#define JTE +#define JTF +#define JTG +#define JTH +#define JTI +#define JTJ +#define JTK +#define JTL +#define JTM +#define JTN +#define JTO +#define JTP +#define JTQ +#define JTR +#define JTS +#define JTT +#define JTU +#define JTV +#define JTW +#define JTX +#define JTY +#define JTZ +#define JUA +#define JUB +#define JUC +#define JUD +#define JUE +#define JUF +#define JUG +#define JUH +#define JUI +#define JUJ +#define JUK +#define JUL +#define JUM +#define JUN +#define JUO +#define JUP +#define JUQ +#define JUR +#define JUS +#define JUT +#define JUU +#define JUV +#define JUW +#define JUX +#define JUY +#define JUZ +#define JVA +#define JVB +#define JVC +#define JVD +#define JVE +#define JVF +#define JVG +#define JVH +#define JVI +#define JVJ +#define JVK +#define JVL +#define JVM +#define JVN +#define JVO +#define JVP +#define JVQ +#define JVR +#define JVS +#define JVT +#define JVU +#define JVV +#define JVW +#define JVX +#define JVY +#define JVZ +#define JWA +#define JWB +#define JWC +#define JWD +#define JWE +#define JWF +#define JWG +#define JWH +#define JWI +#define JWJ +#define JWK +#define JWL +#define JWM +#define JWN +#define JWO +#define JWP +#define JWQ +#define JWR +#define JWS +#define JWT +#define JWU +#define JWV +#define JWW +#define JWX +#define JWY +#define JWZ +#define JXA +#define JXB +#define JXC +#define JXD +#define JXE +#define JXF +#define JXG +#define JXH +#define JXI +#define JXJ +#define JXK +#define JXL +#define JXM +#define JXN +#define JXO +#define JXP +#define JXQ +#define JXR +#define JXS +#define JXT +#define JXU +#define JXV +#define JXW +#define JXX +#define JXY +#define JXZ +#define JYA +#define JYB +#define JYC +#define JYD +#define JYE +#define JYF +#define JYG +#define JYH +#define JYI +#define JYJ +#define JYK +#define JYL +#define JYM +#define JYN +#define JYO +#define JYP +#define JYQ +#define JYR +#define JYS +#define JYT +#define JYU +#define JYV +#define JYW +#define JYX +#define JYY +#define JYZ +#define JZA +#define JZB +#define JZC +#define JZD +#define JZE +#define JZF +#define JZG +#define JZH +#define JZI +#define JZJ +#define JZK +#define JZL +#define JZM +#define JZN +#define JZO +#define JZP +#define JZQ +#define JZR +#define JZS +#define JZT +#define JZU +#define JZV +#define JZW +#define JZX +#define JZY +#define JZZ +#define KAA +#define KAB +#define KAC +#define KAD +#define KAE +#define KAF +#define KAG +#define KAH +#define KAI +#define KAJ +#define KAK +#define KAL +#define KAM +#define KAN +#define KAO +#define KAP +#define KAQ +#define KAR +#define KAS +#define KAT +#define KAU +#define KAV +#define KAW +#define KAX +#define KAY +#define KAZ +#define KBA +#define KBB +#define KBC +#define KBD +#define KBE +#define KBF +#define KBG +#define KBH +#define KBI +#define KBJ +#define KBK +#define KBL +#define KBM +#define KBN +#define KBO +#define KBP +#define KBQ +#define KBR +#define KBS +#define KBT +#define KBU +#define KBV +#define KBW +#define KBX +#define KBY +#define KBZ +#define KCA +#define KCB +#define KCC +#define KCD +#define KCE +#define KCF +#define KCG +#define KCH +#define KCI +#define KCJ +#define KCK +#define KCL +#define KCM +#define KCN +#define KCO +#define KCP +#define KCQ +#define KCR +#define KCS +#define KCT +#define KCU +#define KCV +#define KCW +#define KCX +#define KCY +#define KCZ +#define KDA +#define KDB +#define KDC +#define KDD +#define KDE +#define KDF +#define KDG +#define KDH +#define KDI +#define KDJ +#define KDK +#define KDL +#define KDM +#define KDN +#define KDO +#define KDP +#define KDQ +#define KDR +#define KDS +#define KDT +#define KDU +#define KDV +#define KDW +#define KDX +#define KDY +#define KDZ +#define KEA +#define KEB +#define KEC +#define KED +#define KEE +#define KEF +#define KEG +#define KEH +#define KEI +#define KEJ +#define KEK +#define KEL +#define KEM +#define KEN +#define KEO +#define KEP +#define KEQ +#define KER +#define KES +#define KET +#define KEU +#define KEV +#define KEW +#define KEX +#define KEY +#define KEZ +#define KFA +#define KFB +#define KFC +#define KFD +#define KFE +#define KFF +#define KFG +#define KFH +#define KFI +#define KFJ +#define KFK +#define KFL +#define KFM +#define KFN +#define KFO +#define KFP +#define KFQ +#define KFR +#define KFS +#define KFT +#define KFU +#define KFV +#define KFW +#define KFX +#define KFY +#define KFZ +#define KGA +#define KGB +#define KGC +#define KGD +#define KGE +#define KGF +#define KGG +#define KGH +#define KGI +#define KGJ +#define KGK +#define KGL +#define KGM +#define KGN +#define KGO +#define KGP +#define KGQ +#define KGR +#define KGS +#define KGT +#define KGU +#define KGV +#define KGW +#define KGX +#define KGY +#define KGZ +#define KHA +#define KHB +#define KHC +#define KHD +#define KHE +#define KHF +#define KHG +#define KHH +#define KHI +#define KHJ +#define KHK +#define KHL +#define KHM +#define KHN +#define KHO +#define KHP +#define KHQ +#define KHR +#define KHS +#define KHT +#define KHU +#define KHV +#define KHW +#define KHX +#define KHY +#define KHZ +#define KIA +#define KIB +#define KIC +#define KID +#define KIE +#define KIF +#define KIG +#define KIH +#define KII +#define KIJ +#define KIK +#define KIL +#define KIM +#define KIN +#define KIO +#define KIP +#define KIQ +#define KIR +#define KIS +#define KIT +#define KIU +#define KIV +#define KIW +#define KIX +#define KIY +#define KIZ +#define KJA +#define KJB +#define KJC +#define KJD +#define KJE +#define KJF +#define KJG +#define KJH +#define KJI +#define KJJ +#define KJK +#define KJL +#define KJM +#define KJN +#define KJO +#define KJP +#define KJQ +#define KJR +#define KJS +#define KJT +#define KJU +#define KJV +#define KJW +#define KJX +#define KJY +#define KJZ +#define KKA +#define KKB +#define KKC +#define KKD +#define KKE +#define KKF +#define KKG +#define KKH +#define KKI +#define KKJ +#define KKK +#define KKL +#define KKM +#define KKN +#define KKO +#define KKP +#define KKQ +#define KKR +#define KKS +#define KKT +#define KKU +#define KKV +#define KKW +#define KKX +#define KKY +#define KKZ +#define KLA +#define KLB +#define KLC +#define KLD +#define KLE +#define KLF +#define KLG +#define KLH +#define KLI +#define KLJ +#define KLK +#define KLL +#define KLM +#define KLN +#define KLO +#define KLP +#define KLQ +#define KLR +#define KLS +#define KLT +#define KLU +#define KLV +#define KLW +#define KLX +#define KLY +#define KLZ +#define KMA +#define KMB +#define KMC +#define KMD +#define KME +#define KMF +#define KMG +#define KMH +#define KMI +#define KMJ +#define KMK +#define KML +#define KMM +#define KMN +#define KMO +#define KMP +#define KMQ +#define KMR +#define KMS +#define KMT +#define KMU +#define KMV +#define KMW +#define KMX +#define KMY +#define KMZ +#define KNA +#define KNB +#define KNC +#define KND +#define KNE +#define KNF +#define KNG +#define KNH +#define KNI +#define KNJ +#define KNK +#define KNL +#define KNM +#define KNN +#define KNO +#define KNP +#define KNQ +#define KNR +#define KNS +#define KNT +#define KNU +#define KNV +#define KNW +#define KNX +#define KNY +#define KNZ +#define KOA +#define KOB +#define KOC +#define KOD +#define KOE +#define KOF +#define KOG +#define KOH +#define KOI +#define KOJ +#define KOK +#define KOL +#define KOM +#define KON +#define KOO +#define KOP +#define KOQ +#define KOR +#define KOS +#define KOT +#define KOU +#define KOV +#define KOW +#define KOX +#define KOY +#define KOZ +#define KPA +#define KPB +#define KPC +#define KPD +#define KPE +#define KPF +#define KPG +#define KPH +#define KPI +#define KPJ +#define KPK +#define KPL +#define KPM +#define KPN +#define KPO +#define KPP +#define KPQ +#define KPR +#define KPS +#define KPT +#define KPU +#define KPV +#define KPW +#define KPX +#define KPY +#define KPZ +#define KQA +#define KQB +#define KQC +#define KQD +#define KQE +#define KQF +#define KQG +#define KQH +#define KQI +#define KQJ +#define KQK +#define KQL +#define KQM +#define KQN +#define KQO +#define KQP +#define KQQ +#define KQR +#define KQS +#define KQT +#define KQU +#define KQV +#define KQW +#define KQX +#define KQY +#define KQZ +#define KRA +#define KRB +#define KRC +#define KRD +#define KRE +#define KRF +#define KRG +#define KRH +#define KRI +#define KRJ +#define KRK +#define KRL +#define KRM +#define KRN +#define KRO +#define KRP +#define KRQ +#define KRR +#define KRS +#define KRT +#define KRU +#define KRV +#define KRW +#define KRX +#define KRY +#define KRZ +#define KSA +#define KSB +#define KSC +#define KSD +#define KSE +#define KSF +#define KSG +#define KSH +#define KSI +#define KSJ +#define KSK +#define KSL +#define KSM +#define KSN +#define KSO +#define KSP +#define KSQ +#define KSR +#define KSS +#define KST +#define KSU +#define KSV +#define KSW +#define KSX +#define KSY +#define KSZ +#define KTA +#define KTB +#define KTC +#define KTD +#define KTE +#define KTF +#define KTG +#define KTH +#define KTI +#define KTJ +#define KTK +#define KTL +#define KTM +#define KTN +#define KTO +#define KTP +#define KTQ +#define KTR +#define KTS +#define KTT +#define KTU +#define KTV +#define KTW +#define KTX +#define KTY +#define KTZ +#define KUA +#define KUB +#define KUC +#define KUD +#define KUE +#define KUF +#define KUG +#define KUH +#define KUI +#define KUJ +#define KUK +#define KUL +#define KUM +#define KUN +#define KUO +#define KUP +#define KUQ +#define KUR +#define KUS +#define KUT +#define KUU +#define KUV +#define KUW +#define KUX +#define KUY +#define KUZ +#define KVA +#define KVB +#define KVC +#define KVD +#define KVE +#define KVF +#define KVG +#define KVH +#define KVI +#define KVJ +#define KVK +#define KVL +#define KVM +#define KVN +#define KVO +#define KVP +#define KVQ +#define KVR +#define KVS +#define KVT +#define KVU +#define KVV +#define KVW +#define KVX +#define KVY +#define KVZ +#define KWA +#define KWB +#define KWC +#define KWD +#define KWE +#define KWF +#define KWG +#define KWH +#define KWI +#define KWJ +#define KWK +#define KWL +#define KWM +#define KWN +#define KWO +#define KWP +#define KWQ +#define KWR +#define KWS +#define KWT +#define KWU +#define KWV +#define KWW +#define KWX +#define KWY +#define KWZ +#define KXA +#define KXB +#define KXC +#define KXD +#define KXE +#define KXF +#define KXG +#define KXH +#define KXI +#define KXJ +#define KXK +#define KXL +#define KXM +#define KXN +#define KXO +#define KXP +#define KXQ +#define KXR +#define KXS +#define KXT +#define KXU +#define KXV +#define KXW +#define KXX +#define KXY +#define KXZ +#define KYA +#define KYB +#define KYC +#define KYD +#define KYE +#define KYF +#define KYG +#define KYH +#define KYI +#define KYJ +#define KYK +#define KYL +#define KYM +#define KYN +#define KYO +#define KYP +#define KYQ +#define KYR +#define KYS +#define KYT +#define KYU +#define KYV +#define KYW +#define KYX +#define KYY +#define KYZ +#define KZA +#define KZB +#define KZC +#define KZD +#define KZE +#define KZF +#define KZG +#define KZH +#define KZI +#define KZJ +#define KZK +#define KZL +#define KZM +#define KZN +#define KZO +#define KZP +#define KZQ +#define KZR +#define KZS +#define KZT +#define KZU +#define KZV +#define KZW +#define KZX +#define KZY +#define KZZ +#define LAA +#define LAB +#define LAC +#define LAD +#define LAE +#define LAF +#define LAG +#define LAH +#define LAI +#define LAJ +#define LAK +#define LAL +#define LAM +#define LAN +#define LAO +#define LAP +#define LAQ +#define LAR +#define LAS +#define LAT +#define LAU +#define LAV +#define LAW +#define LAX +#define LAY +#define LAZ +#define LBA +#define LBB +#define LBC +#define LBD +#define LBE +#define LBF +#define LBG +#define LBH +#define LBI +#define LBJ +#define LBK +#define LBL +#define LBM +#define LBN +#define LBO +#define LBP +#define LBQ +#define LBR +#define LBS +#define LBT +#define LBU +#define LBV +#define LBW +#define LBX +#define LBY +#define LBZ +#define LCA +#define LCB +#define LCC +#define LCD +#define LCE +#define LCF +#define LCG +#define LCH +#define LCI +#define LCJ +#define LCK +#define LCL +#define LCM +#define LCN +#define LCO +#define LCP +#define LCQ +#define LCR +#define LCS +#define LCT +#define LCU +#define LCV +#define LCW +#define LCX +#define LCY +#define LCZ +#define LDA +#define LDB +#define LDC +#define LDD +#define LDE +#define LDF +#define LDG +#define LDH +#define LDI +#define LDJ +#define LDK +#define LDL +#define LDM +#define LDN +#define LDO +#define LDP +#define LDQ +#define LDR +#define LDS +#define LDT +#define LDU +#define LDV +#define LDW +#define LDX +#define LDY +#define LDZ +#define LEA +#define LEB +#define LEC +#define LED +#define LEE +#define LEF +#define LEG +#define LEH +#define LEI +#define LEJ +#define LEK +#define LEL +#define LEM +#define LEN +#define LEO +#define LEP +#define LEQ +#define LER +#define LES +#define LET +#define LEU +#define LEV +#define LEW +#define LEX +#define LEY +#define LEZ +#define LFA +#define LFB +#define LFC +#define LFD +#define LFE +#define LFF +#define LFG +#define LFH +#define LFI +#define LFJ +#define LFK +#define LFL +#define LFM +#define LFN +#define LFO +#define LFP +#define LFQ +#define LFR +#define LFS +#define LFT +#define LFU +#define LFV +#define LFW +#define LFX +#define LFY +#define LFZ +#define LGA +#define LGB +#define LGC +#define LGD +#define LGE +#define LGF +#define LGG +#define LGH +#define LGI +#define LGJ +#define LGK +#define LGL +#define LGM +#define LGN +#define LGO +#define LGP +#define LGQ +#define LGR +#define LGS +#define LGT +#define LGU +#define LGV +#define LGW +#define LGX +#define LGY +#define LGZ +#define LHA +#define LHB +#define LHC +#define LHD +#define LHE +#define LHF +#define LHG +#define LHH +#define LHI +#define LHJ +#define LHK +#define LHL +#define LHM +#define LHN +#define LHO +#define LHP +#define LHQ +#define LHR +#define LHS +#define LHT +#define LHU +#define LHV +#define LHW +#define LHX +#define LHY +#define LHZ +#define LIA +#define LIB +#define LIC +#define LID +#define LIE +#define LIF +#define LIG +#define LIH +#define LII +#define LIJ +#define LIK +#define LIL +#define LIM +#define LIN +#define LIO +#define LIP +#define LIQ +#define LIR +#define LIS +#define LIT +#define LIU +#define LIV +#define LIW +#define LIX +#define LIY +#define LIZ +#define LJA +#define LJB +#define LJC +#define LJD +#define LJE +#define LJF +#define LJG +#define LJH +#define LJI +#define LJJ +#define LJK +#define LJL +#define LJM +#define LJN +#define LJO +#define LJP +#define LJQ +#define LJR +#define LJS +#define LJT +#define LJU +#define LJV +#define LJW +#define LJX +#define LJY +#define LJZ +#define LKA +#define LKB +#define LKC +#define LKD +#define LKE +#define LKF +#define LKG +#define LKH +#define LKI +#define LKJ +#define LKK +#define LKL +#define LKM +#define LKN +#define LKO +#define LKP +#define LKQ +#define LKR +#define LKS +#define LKT +#define LKU +#define LKV +#define LKW +#define LKX +#define LKY +#define LKZ +#define LLA +#define LLB +#define LLC +#define LLD +#define LLE +#define LLF +#define LLG +#define LLH +#define LLI +#define LLJ +#define LLK +#define LLL +#define LLM +#define LLN +#define LLO +#define LLP +#define LLQ +#define LLR +#define LLS +#define LLT +#define LLU +#define LLV +#define LLW +#define LLX +#define LLY +#define LLZ +#define LMA +#define LMB +#define LMC +#define LMD +#define LME +#define LMF +#define LMG +#define LMH +#define LMI +#define LMJ +#define LMK +#define LML +#define LMM +#define LMN +#define LMO +#define LMP +#define LMQ +#define LMR +#define LMS +#define LMT +#define LMU +#define LMV +#define LMW +#define LMX +#define LMY +#define LMZ +#define LNA +#define LNB +#define LNC +#define LND +#define LNE +#define LNF +#define LNG +#define LNH +#define LNI +#define LNJ +#define LNK +#define LNL +#define LNM +#define LNN +#define LNO +#define LNP +#define LNQ +#define LNR +#define LNS +#define LNT +#define LNU +#define LNV +#define LNW +#define LNX +#define LNY +#define LNZ +#define LOA +#define LOB +#define LOC +#define LOD +#define LOE +#define LOF +#define LOG +#define LOH +#define LOI +#define LOJ +#define LOK +#define LOL +#define LOM +#define LON +#define LOO +#define LOP +#define LOQ +#define LOR +#define LOS +#define LOT +#define LOU +#define LOV +#define LOW +#define LOX +#define LOY +#define LOZ +#define LPA +#define LPB +#define LPC +#define LPD +#define LPE +#define LPF +#define LPG +#define LPH +#define LPI +#define LPJ +#define LPK +#define LPL +#define LPM +#define LPN +#define LPO +#define LPP +#define LPQ +#define LPR +#define LPS +#define LPT +#define LPU +#define LPV +#define LPW +#define LPX +#define LPY +#define LPZ +#define LQA +#define LQB +#define LQC +#define LQD +#define LQE +#define LQF +#define LQG +#define LQH +#define LQI +#define LQJ +#define LQK +#define LQL +#define LQM +#define LQN +#define LQO +#define LQP +#define LQQ +#define LQR +#define LQS +#define LQT +#define LQU +#define LQV +#define LQW +#define LQX +#define LQY +#define LQZ +#define LRA +#define LRB +#define LRC +#define LRD +#define LRE +#define LRF +#define LRG +#define LRH +#define LRI +#define LRJ +#define LRK +#define LRL +#define LRM +#define LRN +#define LRO +#define LRP +#define LRQ +#define LRR +#define LRS +#define LRT +#define LRU +#define LRV +#define LRW +#define LRX +#define LRY +#define LRZ +#define LSA +#define LSB +#define LSC +#define LSD +#define LSE +#define LSF +#define LSG +#define LSH +#define LSI +#define LSJ +#define LSK +#define LSL +#define LSM +#define LSN +#define LSO +#define LSP +#define LSQ +#define LSR +#define LSS +#define LST +#define LSU +#define LSV +#define LSW +#define LSX +#define LSY +#define LSZ +#define LTA +#define LTB +#define LTC +#define LTD +#define LTE +#define LTF +#define LTG +#define LTH +#define LTI +#define LTJ +#define LTK +#define LTL +#define LTM +#define LTN +#define LTO +#define LTP +#define LTQ +#define LTR +#define LTS +#define LTT +#define LTU +#define LTV +#define LTW +#define LTX +#define LTY +#define LTZ +#define LUA +#define LUB +#define LUC +#define LUD +#define LUE +#define LUF +#define LUG +#define LUH +#define LUI +#define LUJ +#define LUK +#define LUL +#define LUM +#define LUN +#define LUO +#define LUP +#define LUQ +#define LUR +#define LUS +#define LUT +#define LUU +#define LUV +#define LUW +#define LUX +#define LUY +#define LUZ +#define LVA +#define LVB +#define LVC +#define LVD +#define LVE +#define LVF +#define LVG +#define LVH +#define LVI +#define LVJ +#define LVK +#define LVL +#define LVM +#define LVN +#define LVO +#define LVP +#define LVQ +#define LVR +#define LVS +#define LVT +#define LVU +#define LVV +#define LVW +#define LVX +#define LVY +#define LVZ +#define LWA +#define LWB +#define LWC +#define LWD +#define LWE +#define LWF +#define LWG +#define LWH +#define LWI +#define LWJ +#define LWK +#define LWL +#define LWM +#define LWN +#define LWO +#define LWP +#define LWQ +#define LWR +#define LWS +#define LWT +#define LWU +#define LWV +#define LWW +#define LWX +#define LWY +#define LWZ +#define LXA +#define LXB +#define LXC +#define LXD +#define LXE +#define LXF +#define LXG +#define LXH +#define LXI +#define LXJ +#define LXK +#define LXL +#define LXM +#define LXN +#define LXO +#define LXP +#define LXQ +#define LXR +#define LXS +#define LXT +#define LXU +#define LXV +#define LXW +#define LXX +#define LXY +#define LXZ +#define LYA +#define LYB +#define LYC +#define LYD +#define LYE +#define LYF +#define LYG +#define LYH +#define LYI +#define LYJ +#define LYK +#define LYL +#define LYM +#define LYN +#define LYO +#define LYP +#define LYQ +#define LYR +#define LYS +#define LYT +#define LYU +#define LYV +#define LYW +#define LYX +#define LYY +#define LYZ +#define LZA +#define LZB +#define LZC +#define LZD +#define LZE +#define LZF +#define LZG +#define LZH +#define LZI +#define LZJ +#define LZK +#define LZL +#define LZM +#define LZN +#define LZO +#define LZP +#define LZQ +#define LZR +#define LZS +#define LZT +#define LZU +#define LZV +#define LZW +#define LZX +#define LZY +#define LZZ +#define MAA +#define MAB +#define MAC +#define MAD +#define MAE +#define MAF +#define MAG +#define MAH +#define MAI +#define MAJ +#define MAK +#define MAL +#define MAM +#define MAN +#define MAO +#define MAP +#define MAQ +#define MAR +#define MAS +#define MAT +#define MAU +#define MAV +#define MAW +#define MAX +#define MAY +#define MAZ +#define MBA +#define MBB +#define MBC +#define MBD +#define MBE +#define MBF +#define MBG +#define MBH +#define MBI +#define MBJ +#define MBK +#define MBL +#define MBM +#define MBN +#define MBO +#define MBP +#define MBQ +#define MBR +#define MBS +#define MBT +#define MBU +#define MBV +#define MBW +#define MBX +#define MBY +#define MBZ +#define MCA +#define MCB +#define MCC +#define MCD +#define MCE +#define MCF +#define MCG +#define MCH +#define MCI +#define MCJ +#define MCK +#define MCL +#define MCM +#define MCN +#define MCO +#define MCP +#define MCQ +#define MCR +#define MCS +#define MCT +#define MCU +#define MCV +#define MCW +#define MCX +#define MCY +#define MCZ +#define MDA 0x1fff +#endif +#endif diff --git a/libraries/mcpp/test-l/nest1.h b/libraries/mcpp/test-l/nest1.h new file mode 100644 index 000000000..7a5f0135a --- /dev/null +++ b/libraries/mcpp/test-l/nest1.h @@ -0,0 +1,2 @@ +/* nest1.h */ +#include "nest2.h" diff --git a/libraries/mcpp/test-l/nest10.h b/libraries/mcpp/test-l/nest10.h new file mode 100644 index 000000000..f97de2ab3 --- /dev/null +++ b/libraries/mcpp/test-l/nest10.h @@ -0,0 +1,2 @@ +/* nest10.h */ +#include "nest11.h" diff --git a/libraries/mcpp/test-l/nest100.h b/libraries/mcpp/test-l/nest100.h new file mode 100644 index 000000000..4f06e0ae6 --- /dev/null +++ b/libraries/mcpp/test-l/nest100.h @@ -0,0 +1,2 @@ +/* nest100.h */ +#include "nest101.h" diff --git a/libraries/mcpp/test-l/nest101.h b/libraries/mcpp/test-l/nest101.h new file mode 100644 index 000000000..959a083d8 --- /dev/null +++ b/libraries/mcpp/test-l/nest101.h @@ -0,0 +1,2 @@ +/* nest101.h */ +#include "nest102.h" diff --git a/libraries/mcpp/test-l/nest102.h b/libraries/mcpp/test-l/nest102.h new file mode 100644 index 000000000..25365b21a --- /dev/null +++ b/libraries/mcpp/test-l/nest102.h @@ -0,0 +1,2 @@ +/* nest102.h */ +#include "nest103.h" diff --git a/libraries/mcpp/test-l/nest103.h b/libraries/mcpp/test-l/nest103.h new file mode 100644 index 000000000..d6802b37d --- /dev/null +++ b/libraries/mcpp/test-l/nest103.h @@ -0,0 +1,2 @@ +/* nest103.h */ +#include "nest104.h" diff --git a/libraries/mcpp/test-l/nest104.h b/libraries/mcpp/test-l/nest104.h new file mode 100644 index 000000000..39a674dca --- /dev/null +++ b/libraries/mcpp/test-l/nest104.h @@ -0,0 +1,2 @@ +/* nest104.h */ +#include "nest105.h" diff --git a/libraries/mcpp/test-l/nest105.h b/libraries/mcpp/test-l/nest105.h new file mode 100644 index 000000000..1835bc6c7 --- /dev/null +++ b/libraries/mcpp/test-l/nest105.h @@ -0,0 +1,2 @@ +/* nest105.h */ +#include "nest106.h" diff --git a/libraries/mcpp/test-l/nest106.h b/libraries/mcpp/test-l/nest106.h new file mode 100644 index 000000000..6ca91dc21 --- /dev/null +++ b/libraries/mcpp/test-l/nest106.h @@ -0,0 +1,2 @@ +/* nest106.h */ +#include "nest107.h" diff --git a/libraries/mcpp/test-l/nest107.h b/libraries/mcpp/test-l/nest107.h new file mode 100644 index 000000000..3322c44e9 --- /dev/null +++ b/libraries/mcpp/test-l/nest107.h @@ -0,0 +1,2 @@ +/* nest107.h */ +#include "nest108.h" diff --git a/libraries/mcpp/test-l/nest108.h b/libraries/mcpp/test-l/nest108.h new file mode 100644 index 000000000..626ec4efa --- /dev/null +++ b/libraries/mcpp/test-l/nest108.h @@ -0,0 +1,2 @@ +/* nest108.h */ +#include "nest109.h" diff --git a/libraries/mcpp/test-l/nest109.h b/libraries/mcpp/test-l/nest109.h new file mode 100644 index 000000000..b167467dc --- /dev/null +++ b/libraries/mcpp/test-l/nest109.h @@ -0,0 +1,2 @@ +/* nest109.h */ +#include "nest110.h" diff --git a/libraries/mcpp/test-l/nest11.h b/libraries/mcpp/test-l/nest11.h new file mode 100644 index 000000000..ca40f3811 --- /dev/null +++ b/libraries/mcpp/test-l/nest11.h @@ -0,0 +1,2 @@ +/* nest11.h */ +#include "nest12.h" diff --git a/libraries/mcpp/test-l/nest110.h b/libraries/mcpp/test-l/nest110.h new file mode 100644 index 000000000..a2eaeb3f1 --- /dev/null +++ b/libraries/mcpp/test-l/nest110.h @@ -0,0 +1,2 @@ +/* nest110.h */ +#include "nest111.h" diff --git a/libraries/mcpp/test-l/nest111.h b/libraries/mcpp/test-l/nest111.h new file mode 100644 index 000000000..d233d47ff --- /dev/null +++ b/libraries/mcpp/test-l/nest111.h @@ -0,0 +1,2 @@ +/* nest111.h */ +#include "nest112.h" diff --git a/libraries/mcpp/test-l/nest112.h b/libraries/mcpp/test-l/nest112.h new file mode 100644 index 000000000..8b78ea6f3 --- /dev/null +++ b/libraries/mcpp/test-l/nest112.h @@ -0,0 +1,2 @@ +/* nest112.h */ +#include "nest113.h" diff --git a/libraries/mcpp/test-l/nest113.h b/libraries/mcpp/test-l/nest113.h new file mode 100644 index 000000000..e324c1111 --- /dev/null +++ b/libraries/mcpp/test-l/nest113.h @@ -0,0 +1,2 @@ +/* nest113.h */ +#include "nest114.h" diff --git a/libraries/mcpp/test-l/nest114.h b/libraries/mcpp/test-l/nest114.h new file mode 100644 index 000000000..6ef69e7d8 --- /dev/null +++ b/libraries/mcpp/test-l/nest114.h @@ -0,0 +1,2 @@ +/* nest114.h */ +#include "nest115.h" diff --git a/libraries/mcpp/test-l/nest115.h b/libraries/mcpp/test-l/nest115.h new file mode 100644 index 000000000..4ba0c096f --- /dev/null +++ b/libraries/mcpp/test-l/nest115.h @@ -0,0 +1,2 @@ +/* nest115.h */ +#include "nest116.h" diff --git a/libraries/mcpp/test-l/nest116.h b/libraries/mcpp/test-l/nest116.h new file mode 100644 index 000000000..a152b1e72 --- /dev/null +++ b/libraries/mcpp/test-l/nest116.h @@ -0,0 +1,2 @@ +/* nest116.h */ +#include "nest117.h" diff --git a/libraries/mcpp/test-l/nest117.h b/libraries/mcpp/test-l/nest117.h new file mode 100644 index 000000000..68752f5a6 --- /dev/null +++ b/libraries/mcpp/test-l/nest117.h @@ -0,0 +1,2 @@ +/* nest117.h */ +#include "nest118.h" diff --git a/libraries/mcpp/test-l/nest118.h b/libraries/mcpp/test-l/nest118.h new file mode 100644 index 000000000..2f2e325b6 --- /dev/null +++ b/libraries/mcpp/test-l/nest118.h @@ -0,0 +1,2 @@ +/* nest118.h */ +#include "nest119.h" diff --git a/libraries/mcpp/test-l/nest119.h b/libraries/mcpp/test-l/nest119.h new file mode 100644 index 000000000..a485bf82d --- /dev/null +++ b/libraries/mcpp/test-l/nest119.h @@ -0,0 +1,2 @@ +/* nest119.h */ +#include "nest120.h" diff --git a/libraries/mcpp/test-l/nest12.h b/libraries/mcpp/test-l/nest12.h new file mode 100644 index 000000000..c3dba7244 --- /dev/null +++ b/libraries/mcpp/test-l/nest12.h @@ -0,0 +1,2 @@ +/* nest12.h */ +#include "nest13.h" diff --git a/libraries/mcpp/test-l/nest120.h b/libraries/mcpp/test-l/nest120.h new file mode 100644 index 000000000..b51201360 --- /dev/null +++ b/libraries/mcpp/test-l/nest120.h @@ -0,0 +1,2 @@ +/* nest120.h */ +#include "nest121.h" diff --git a/libraries/mcpp/test-l/nest121.h b/libraries/mcpp/test-l/nest121.h new file mode 100644 index 000000000..68ef48cec --- /dev/null +++ b/libraries/mcpp/test-l/nest121.h @@ -0,0 +1,2 @@ +/* nest121.h */ +#include "nest122.h" diff --git a/libraries/mcpp/test-l/nest122.h b/libraries/mcpp/test-l/nest122.h new file mode 100644 index 000000000..02a882765 --- /dev/null +++ b/libraries/mcpp/test-l/nest122.h @@ -0,0 +1,2 @@ +/* nest122.h */ +#include "nest123.h" diff --git a/libraries/mcpp/test-l/nest123.h b/libraries/mcpp/test-l/nest123.h new file mode 100644 index 000000000..5edc93188 --- /dev/null +++ b/libraries/mcpp/test-l/nest123.h @@ -0,0 +1,2 @@ +/* nest123.h */ +#include "nest124.h" diff --git a/libraries/mcpp/test-l/nest124.h b/libraries/mcpp/test-l/nest124.h new file mode 100644 index 000000000..96d4339e8 --- /dev/null +++ b/libraries/mcpp/test-l/nest124.h @@ -0,0 +1,2 @@ +/* nest124.h */ +#include "nest125.h" diff --git a/libraries/mcpp/test-l/nest125.h b/libraries/mcpp/test-l/nest125.h new file mode 100644 index 000000000..dbd2153f9 --- /dev/null +++ b/libraries/mcpp/test-l/nest125.h @@ -0,0 +1,2 @@ +/* nest125.h */ +#include "nest126.h" diff --git a/libraries/mcpp/test-l/nest126.h b/libraries/mcpp/test-l/nest126.h new file mode 100644 index 000000000..4bf031ee0 --- /dev/null +++ b/libraries/mcpp/test-l/nest126.h @@ -0,0 +1,2 @@ +/* nest126.h */ +#include "nest127.h" diff --git a/libraries/mcpp/test-l/nest127.h b/libraries/mcpp/test-l/nest127.h new file mode 100644 index 000000000..f08bb4433 --- /dev/null +++ b/libraries/mcpp/test-l/nest127.h @@ -0,0 +1,2 @@ +/* nest127.h */ + nest = 0x7f; diff --git a/libraries/mcpp/test-l/nest13.h b/libraries/mcpp/test-l/nest13.h new file mode 100644 index 000000000..4f8355f38 --- /dev/null +++ b/libraries/mcpp/test-l/nest13.h @@ -0,0 +1,2 @@ +/* nest13.h */ +#include "nest14.h" diff --git a/libraries/mcpp/test-l/nest14.h b/libraries/mcpp/test-l/nest14.h new file mode 100644 index 000000000..b3ab47406 --- /dev/null +++ b/libraries/mcpp/test-l/nest14.h @@ -0,0 +1,2 @@ +/* nest14.h */ +#include "nest15.h" diff --git a/libraries/mcpp/test-l/nest15.h b/libraries/mcpp/test-l/nest15.h new file mode 100644 index 000000000..fef741cd6 --- /dev/null +++ b/libraries/mcpp/test-l/nest15.h @@ -0,0 +1,6 @@ +/* nest15.h */ +#ifdef X0F + nest = 0x0f; +#else +#include "nest16.h" +#endif diff --git a/libraries/mcpp/test-l/nest16.h b/libraries/mcpp/test-l/nest16.h new file mode 100644 index 000000000..a8b1427e8 --- /dev/null +++ b/libraries/mcpp/test-l/nest16.h @@ -0,0 +1,2 @@ +/* nest16.h */ +#include "nest17.h" diff --git a/libraries/mcpp/test-l/nest17.h b/libraries/mcpp/test-l/nest17.h new file mode 100644 index 000000000..ad73f0bdc --- /dev/null +++ b/libraries/mcpp/test-l/nest17.h @@ -0,0 +1,2 @@ +/* nest17.h */ +#include "nest18.h" diff --git a/libraries/mcpp/test-l/nest18.h b/libraries/mcpp/test-l/nest18.h new file mode 100644 index 000000000..e0accb9d9 --- /dev/null +++ b/libraries/mcpp/test-l/nest18.h @@ -0,0 +1,2 @@ +/* nest18.h */ +#include "nest19.h" diff --git a/libraries/mcpp/test-l/nest19.h b/libraries/mcpp/test-l/nest19.h new file mode 100644 index 000000000..a46b9d171 --- /dev/null +++ b/libraries/mcpp/test-l/nest19.h @@ -0,0 +1,2 @@ +/* nest19.h */ +#include "nest20.h" diff --git a/libraries/mcpp/test-l/nest2.h b/libraries/mcpp/test-l/nest2.h new file mode 100644 index 000000000..11a92f314 --- /dev/null +++ b/libraries/mcpp/test-l/nest2.h @@ -0,0 +1,2 @@ +/* nest2.h */ +#include "nest3.h" diff --git a/libraries/mcpp/test-l/nest20.h b/libraries/mcpp/test-l/nest20.h new file mode 100644 index 000000000..94df58798 --- /dev/null +++ b/libraries/mcpp/test-l/nest20.h @@ -0,0 +1,2 @@ +/* nest20.h */ +#include "nest21.h" diff --git a/libraries/mcpp/test-l/nest21.h b/libraries/mcpp/test-l/nest21.h new file mode 100644 index 000000000..c60b510dc --- /dev/null +++ b/libraries/mcpp/test-l/nest21.h @@ -0,0 +1,2 @@ +/* nest21.h */ +#include "nest22.h" diff --git a/libraries/mcpp/test-l/nest22.h b/libraries/mcpp/test-l/nest22.h new file mode 100644 index 000000000..8ca7ae5ab --- /dev/null +++ b/libraries/mcpp/test-l/nest22.h @@ -0,0 +1,2 @@ +/* nest22.h */ +#include "nest23.h" diff --git a/libraries/mcpp/test-l/nest23.h b/libraries/mcpp/test-l/nest23.h new file mode 100644 index 000000000..9125a7bf3 --- /dev/null +++ b/libraries/mcpp/test-l/nest23.h @@ -0,0 +1,2 @@ +/* nest23.h */ +#include "nest24.h" diff --git a/libraries/mcpp/test-l/nest24.h b/libraries/mcpp/test-l/nest24.h new file mode 100644 index 000000000..cb6fc840f --- /dev/null +++ b/libraries/mcpp/test-l/nest24.h @@ -0,0 +1,2 @@ +/* nest24.h */ +#include "nest25.h" diff --git a/libraries/mcpp/test-l/nest25.h b/libraries/mcpp/test-l/nest25.h new file mode 100644 index 000000000..e47f7f89b --- /dev/null +++ b/libraries/mcpp/test-l/nest25.h @@ -0,0 +1,2 @@ +/* nest25.h */ +#include "nest26.h" diff --git a/libraries/mcpp/test-l/nest26.h b/libraries/mcpp/test-l/nest26.h new file mode 100644 index 000000000..ed964fbc9 --- /dev/null +++ b/libraries/mcpp/test-l/nest26.h @@ -0,0 +1,2 @@ +/* nest26.h */ +#include "nest27.h" diff --git a/libraries/mcpp/test-l/nest27.h b/libraries/mcpp/test-l/nest27.h new file mode 100644 index 000000000..a1868e145 --- /dev/null +++ b/libraries/mcpp/test-l/nest27.h @@ -0,0 +1,2 @@ +/* nest27.h */ +#include "nest28.h" diff --git a/libraries/mcpp/test-l/nest28.h b/libraries/mcpp/test-l/nest28.h new file mode 100644 index 000000000..46c5822b6 --- /dev/null +++ b/libraries/mcpp/test-l/nest28.h @@ -0,0 +1,2 @@ +/* nest28.h */ +#include "nest29.h" diff --git a/libraries/mcpp/test-l/nest29.h b/libraries/mcpp/test-l/nest29.h new file mode 100644 index 000000000..8516bc408 --- /dev/null +++ b/libraries/mcpp/test-l/nest29.h @@ -0,0 +1,2 @@ +/* nest29.h */ +#include "nest30.h" diff --git a/libraries/mcpp/test-l/nest3.h b/libraries/mcpp/test-l/nest3.h new file mode 100644 index 000000000..7b77090e3 --- /dev/null +++ b/libraries/mcpp/test-l/nest3.h @@ -0,0 +1,2 @@ +/* nest3.h */ +#include "nest4.h" diff --git a/libraries/mcpp/test-l/nest30.h b/libraries/mcpp/test-l/nest30.h new file mode 100644 index 000000000..654abec17 --- /dev/null +++ b/libraries/mcpp/test-l/nest30.h @@ -0,0 +1,2 @@ +/* nest30.h */ +#include "nest31.h" diff --git a/libraries/mcpp/test-l/nest31.h b/libraries/mcpp/test-l/nest31.h new file mode 100644 index 000000000..71e235d4d --- /dev/null +++ b/libraries/mcpp/test-l/nest31.h @@ -0,0 +1,6 @@ +/* nest31.h */ +#ifdef X1F + nest = 0x1f; +#else +#include "nest32.h" +#endif diff --git a/libraries/mcpp/test-l/nest32.h b/libraries/mcpp/test-l/nest32.h new file mode 100644 index 000000000..fec362bf6 --- /dev/null +++ b/libraries/mcpp/test-l/nest32.h @@ -0,0 +1,2 @@ +/* nest32.h */ +#include "nest33.h" diff --git a/libraries/mcpp/test-l/nest33.h b/libraries/mcpp/test-l/nest33.h new file mode 100644 index 000000000..a58741770 --- /dev/null +++ b/libraries/mcpp/test-l/nest33.h @@ -0,0 +1,2 @@ +/* nest33.h */ +#include "nest34.h" diff --git a/libraries/mcpp/test-l/nest34.h b/libraries/mcpp/test-l/nest34.h new file mode 100644 index 000000000..29ac2af66 --- /dev/null +++ b/libraries/mcpp/test-l/nest34.h @@ -0,0 +1,2 @@ +/* nest34.h */ +#include "nest35.h" diff --git a/libraries/mcpp/test-l/nest35.h b/libraries/mcpp/test-l/nest35.h new file mode 100644 index 000000000..989391ccd --- /dev/null +++ b/libraries/mcpp/test-l/nest35.h @@ -0,0 +1,2 @@ +/* nest35.h */ +#include "nest36.h" diff --git a/libraries/mcpp/test-l/nest36.h b/libraries/mcpp/test-l/nest36.h new file mode 100644 index 000000000..02895e7a0 --- /dev/null +++ b/libraries/mcpp/test-l/nest36.h @@ -0,0 +1,2 @@ +/* nest36.h */ +#include "nest37.h" diff --git a/libraries/mcpp/test-l/nest37.h b/libraries/mcpp/test-l/nest37.h new file mode 100644 index 000000000..01d91cc45 --- /dev/null +++ b/libraries/mcpp/test-l/nest37.h @@ -0,0 +1,2 @@ +/* nest37.h */ +#include "nest38.h" diff --git a/libraries/mcpp/test-l/nest38.h b/libraries/mcpp/test-l/nest38.h new file mode 100644 index 000000000..2c99265de --- /dev/null +++ b/libraries/mcpp/test-l/nest38.h @@ -0,0 +1,2 @@ +/* nest38.h */ +#include "nest39.h" diff --git a/libraries/mcpp/test-l/nest39.h b/libraries/mcpp/test-l/nest39.h new file mode 100644 index 000000000..ea9cee011 --- /dev/null +++ b/libraries/mcpp/test-l/nest39.h @@ -0,0 +1,2 @@ +/* nest39.h */ +#include "nest40.h" diff --git a/libraries/mcpp/test-l/nest4.h b/libraries/mcpp/test-l/nest4.h new file mode 100644 index 000000000..8c5241ce2 --- /dev/null +++ b/libraries/mcpp/test-l/nest4.h @@ -0,0 +1,2 @@ +/* nest4.h */ +#include "nest5.h" diff --git a/libraries/mcpp/test-l/nest40.h b/libraries/mcpp/test-l/nest40.h new file mode 100644 index 000000000..ff4cc5f71 --- /dev/null +++ b/libraries/mcpp/test-l/nest40.h @@ -0,0 +1,2 @@ +/* nest40.h */ +#include "nest41.h" diff --git a/libraries/mcpp/test-l/nest41.h b/libraries/mcpp/test-l/nest41.h new file mode 100644 index 000000000..ee37de4f2 --- /dev/null +++ b/libraries/mcpp/test-l/nest41.h @@ -0,0 +1,2 @@ +/* nest41.h */ +#include "nest42.h" diff --git a/libraries/mcpp/test-l/nest42.h b/libraries/mcpp/test-l/nest42.h new file mode 100644 index 000000000..4810b3b90 --- /dev/null +++ b/libraries/mcpp/test-l/nest42.h @@ -0,0 +1,2 @@ +/* nest42.h */ +#include "nest43.h" diff --git a/libraries/mcpp/test-l/nest43.h b/libraries/mcpp/test-l/nest43.h new file mode 100644 index 000000000..a8dd2ff5e --- /dev/null +++ b/libraries/mcpp/test-l/nest43.h @@ -0,0 +1,2 @@ +/* nest43.h */ +#include "nest44.h" diff --git a/libraries/mcpp/test-l/nest44.h b/libraries/mcpp/test-l/nest44.h new file mode 100644 index 000000000..7a86490a3 --- /dev/null +++ b/libraries/mcpp/test-l/nest44.h @@ -0,0 +1,2 @@ +/* nest44.h */ +#include "nest45.h" diff --git a/libraries/mcpp/test-l/nest45.h b/libraries/mcpp/test-l/nest45.h new file mode 100644 index 000000000..ab7dff2aa --- /dev/null +++ b/libraries/mcpp/test-l/nest45.h @@ -0,0 +1,2 @@ +/* nest45.h */ +#include "nest46.h" diff --git a/libraries/mcpp/test-l/nest46.h b/libraries/mcpp/test-l/nest46.h new file mode 100644 index 000000000..c4b1d1a0a --- /dev/null +++ b/libraries/mcpp/test-l/nest46.h @@ -0,0 +1,2 @@ +/* nest46.h */ +#include "nest47.h" diff --git a/libraries/mcpp/test-l/nest47.h b/libraries/mcpp/test-l/nest47.h new file mode 100644 index 000000000..ee820e204 --- /dev/null +++ b/libraries/mcpp/test-l/nest47.h @@ -0,0 +1,2 @@ +/* nest47.h */ +#include "nest48.h" diff --git a/libraries/mcpp/test-l/nest48.h b/libraries/mcpp/test-l/nest48.h new file mode 100644 index 000000000..a3aef7ca6 --- /dev/null +++ b/libraries/mcpp/test-l/nest48.h @@ -0,0 +1,2 @@ +/* nest48.h */ +#include "nest49.h" diff --git a/libraries/mcpp/test-l/nest49.h b/libraries/mcpp/test-l/nest49.h new file mode 100644 index 000000000..f52f16eba --- /dev/null +++ b/libraries/mcpp/test-l/nest49.h @@ -0,0 +1,2 @@ +/* nest49.h */ +#include "nest50.h" diff --git a/libraries/mcpp/test-l/nest5.h b/libraries/mcpp/test-l/nest5.h new file mode 100644 index 000000000..57d8e03bb --- /dev/null +++ b/libraries/mcpp/test-l/nest5.h @@ -0,0 +1,2 @@ +/* nest5.h */ +#include "nest6.h" diff --git a/libraries/mcpp/test-l/nest50.h b/libraries/mcpp/test-l/nest50.h new file mode 100644 index 000000000..6da002177 --- /dev/null +++ b/libraries/mcpp/test-l/nest50.h @@ -0,0 +1,2 @@ +/* nest50.h */ +#include "nest51.h" diff --git a/libraries/mcpp/test-l/nest51.h b/libraries/mcpp/test-l/nest51.h new file mode 100644 index 000000000..0cb0e02ee --- /dev/null +++ b/libraries/mcpp/test-l/nest51.h @@ -0,0 +1,2 @@ +/* nest51.h */ +#include "nest52.h" diff --git a/libraries/mcpp/test-l/nest52.h b/libraries/mcpp/test-l/nest52.h new file mode 100644 index 000000000..e6f087dd7 --- /dev/null +++ b/libraries/mcpp/test-l/nest52.h @@ -0,0 +1,2 @@ +/* nest52.h */ +#include "nest53.h" diff --git a/libraries/mcpp/test-l/nest53.h b/libraries/mcpp/test-l/nest53.h new file mode 100644 index 000000000..07cf5dc22 --- /dev/null +++ b/libraries/mcpp/test-l/nest53.h @@ -0,0 +1,2 @@ +/* nest53.h */ +#include "nest54.h" diff --git a/libraries/mcpp/test-l/nest54.h b/libraries/mcpp/test-l/nest54.h new file mode 100644 index 000000000..d7822bed2 --- /dev/null +++ b/libraries/mcpp/test-l/nest54.h @@ -0,0 +1,2 @@ +/* nest54.h */ +#include "nest55.h" diff --git a/libraries/mcpp/test-l/nest55.h b/libraries/mcpp/test-l/nest55.h new file mode 100644 index 000000000..73970642d --- /dev/null +++ b/libraries/mcpp/test-l/nest55.h @@ -0,0 +1,2 @@ +/* nest55.h */ +#include "nest56.h" diff --git a/libraries/mcpp/test-l/nest56.h b/libraries/mcpp/test-l/nest56.h new file mode 100644 index 000000000..f9c541c2d --- /dev/null +++ b/libraries/mcpp/test-l/nest56.h @@ -0,0 +1,2 @@ +/* nest56.h */ +#include "nest57.h" diff --git a/libraries/mcpp/test-l/nest57.h b/libraries/mcpp/test-l/nest57.h new file mode 100644 index 000000000..2e0224a0b --- /dev/null +++ b/libraries/mcpp/test-l/nest57.h @@ -0,0 +1,2 @@ +/* nest57.h */ +#include "nest58.h" diff --git a/libraries/mcpp/test-l/nest58.h b/libraries/mcpp/test-l/nest58.h new file mode 100644 index 000000000..e0b0d6631 --- /dev/null +++ b/libraries/mcpp/test-l/nest58.h @@ -0,0 +1,2 @@ +/* nest58.h */ +#include "nest59.h" diff --git a/libraries/mcpp/test-l/nest59.h b/libraries/mcpp/test-l/nest59.h new file mode 100644 index 000000000..2e5d640fa --- /dev/null +++ b/libraries/mcpp/test-l/nest59.h @@ -0,0 +1,2 @@ +/* nest59.h */ +#include "nest60.h" diff --git a/libraries/mcpp/test-l/nest6.h b/libraries/mcpp/test-l/nest6.h new file mode 100644 index 000000000..fc31c8e5f --- /dev/null +++ b/libraries/mcpp/test-l/nest6.h @@ -0,0 +1,2 @@ +/* nest6.h */ +#include "nest7.h" diff --git a/libraries/mcpp/test-l/nest60.h b/libraries/mcpp/test-l/nest60.h new file mode 100644 index 000000000..460d89054 --- /dev/null +++ b/libraries/mcpp/test-l/nest60.h @@ -0,0 +1,2 @@ +/* nest60.h */ +#include "nest61.h" diff --git a/libraries/mcpp/test-l/nest61.h b/libraries/mcpp/test-l/nest61.h new file mode 100644 index 000000000..ecdfdfbd3 --- /dev/null +++ b/libraries/mcpp/test-l/nest61.h @@ -0,0 +1,2 @@ +/* nest61.h */ +#include "nest62.h" diff --git a/libraries/mcpp/test-l/nest62.h b/libraries/mcpp/test-l/nest62.h new file mode 100644 index 000000000..ecab0cd36 --- /dev/null +++ b/libraries/mcpp/test-l/nest62.h @@ -0,0 +1,2 @@ +/* nest62.h */ +#include "nest63.h" diff --git a/libraries/mcpp/test-l/nest63.h b/libraries/mcpp/test-l/nest63.h new file mode 100644 index 000000000..c745ed521 --- /dev/null +++ b/libraries/mcpp/test-l/nest63.h @@ -0,0 +1,6 @@ +/* nest63.h */ +#ifdef X3F + nest = 0x3f; +#else +#include "nest64.h" +#endif diff --git a/libraries/mcpp/test-l/nest64.h b/libraries/mcpp/test-l/nest64.h new file mode 100644 index 000000000..3975dec7e --- /dev/null +++ b/libraries/mcpp/test-l/nest64.h @@ -0,0 +1,2 @@ +/* nest64.h */ +#include "nest65.h" diff --git a/libraries/mcpp/test-l/nest65.h b/libraries/mcpp/test-l/nest65.h new file mode 100644 index 000000000..f7caf1fbc --- /dev/null +++ b/libraries/mcpp/test-l/nest65.h @@ -0,0 +1,2 @@ +/* nest65.h */ +#include "nest66.h" diff --git a/libraries/mcpp/test-l/nest66.h b/libraries/mcpp/test-l/nest66.h new file mode 100644 index 000000000..a5340423b --- /dev/null +++ b/libraries/mcpp/test-l/nest66.h @@ -0,0 +1,2 @@ +/* nest66.h */ +#include "nest67.h" diff --git a/libraries/mcpp/test-l/nest67.h b/libraries/mcpp/test-l/nest67.h new file mode 100644 index 000000000..e07332218 --- /dev/null +++ b/libraries/mcpp/test-l/nest67.h @@ -0,0 +1,2 @@ +/* nest67.h */ +#include "nest68.h" diff --git a/libraries/mcpp/test-l/nest68.h b/libraries/mcpp/test-l/nest68.h new file mode 100644 index 000000000..4bf3d753a --- /dev/null +++ b/libraries/mcpp/test-l/nest68.h @@ -0,0 +1,2 @@ +/* nest68.h */ +#include "nest69.h" diff --git a/libraries/mcpp/test-l/nest69.h b/libraries/mcpp/test-l/nest69.h new file mode 100644 index 000000000..5e5b962ae --- /dev/null +++ b/libraries/mcpp/test-l/nest69.h @@ -0,0 +1,2 @@ +/* nest69.h */ +#include "nest70.h" diff --git a/libraries/mcpp/test-l/nest7.h b/libraries/mcpp/test-l/nest7.h new file mode 100644 index 000000000..eb5280baf --- /dev/null +++ b/libraries/mcpp/test-l/nest7.h @@ -0,0 +1,2 @@ +/* nest7.h */ +#include "nest8.h" diff --git a/libraries/mcpp/test-l/nest70.h b/libraries/mcpp/test-l/nest70.h new file mode 100644 index 000000000..650dafbd1 --- /dev/null +++ b/libraries/mcpp/test-l/nest70.h @@ -0,0 +1,2 @@ +/* nest70.h */ +#include "nest71.h" diff --git a/libraries/mcpp/test-l/nest71.h b/libraries/mcpp/test-l/nest71.h new file mode 100644 index 000000000..94531ee8e --- /dev/null +++ b/libraries/mcpp/test-l/nest71.h @@ -0,0 +1,2 @@ +/* nest71.h */ +#include "nest72.h" diff --git a/libraries/mcpp/test-l/nest72.h b/libraries/mcpp/test-l/nest72.h new file mode 100644 index 000000000..3d5d70c49 --- /dev/null +++ b/libraries/mcpp/test-l/nest72.h @@ -0,0 +1,2 @@ +/* nest72.h */ +#include "nest73.h" diff --git a/libraries/mcpp/test-l/nest73.h b/libraries/mcpp/test-l/nest73.h new file mode 100644 index 000000000..58350ed97 --- /dev/null +++ b/libraries/mcpp/test-l/nest73.h @@ -0,0 +1,2 @@ +/* nest73.h */ +#include "nest74.h" diff --git a/libraries/mcpp/test-l/nest74.h b/libraries/mcpp/test-l/nest74.h new file mode 100644 index 000000000..ff01bb385 --- /dev/null +++ b/libraries/mcpp/test-l/nest74.h @@ -0,0 +1,2 @@ +/* nest74.h */ +#include "nest75.h" diff --git a/libraries/mcpp/test-l/nest75.h b/libraries/mcpp/test-l/nest75.h new file mode 100644 index 000000000..5036eef36 --- /dev/null +++ b/libraries/mcpp/test-l/nest75.h @@ -0,0 +1,2 @@ +/* nest75.h */ +#include "nest76.h" diff --git a/libraries/mcpp/test-l/nest76.h b/libraries/mcpp/test-l/nest76.h new file mode 100644 index 000000000..79158b660 --- /dev/null +++ b/libraries/mcpp/test-l/nest76.h @@ -0,0 +1,2 @@ +/* nest76.h */ +#include "nest77.h" diff --git a/libraries/mcpp/test-l/nest77.h b/libraries/mcpp/test-l/nest77.h new file mode 100644 index 000000000..34e67efc1 --- /dev/null +++ b/libraries/mcpp/test-l/nest77.h @@ -0,0 +1,2 @@ +/* nest77.h */ +#include "nest78.h" diff --git a/libraries/mcpp/test-l/nest78.h b/libraries/mcpp/test-l/nest78.h new file mode 100644 index 000000000..be509fc09 --- /dev/null +++ b/libraries/mcpp/test-l/nest78.h @@ -0,0 +1,2 @@ +/* nest78.h */ +#include "nest79.h" diff --git a/libraries/mcpp/test-l/nest79.h b/libraries/mcpp/test-l/nest79.h new file mode 100644 index 000000000..b652fe17e --- /dev/null +++ b/libraries/mcpp/test-l/nest79.h @@ -0,0 +1,2 @@ +/* nest79.h */ +#include "nest80.h" diff --git a/libraries/mcpp/test-l/nest8.h b/libraries/mcpp/test-l/nest8.h new file mode 100644 index 000000000..a8791cb30 --- /dev/null +++ b/libraries/mcpp/test-l/nest8.h @@ -0,0 +1,2 @@ +/* nest8.h */ +#include "nest9.h" diff --git a/libraries/mcpp/test-l/nest80.h b/libraries/mcpp/test-l/nest80.h new file mode 100644 index 000000000..254436893 --- /dev/null +++ b/libraries/mcpp/test-l/nest80.h @@ -0,0 +1,2 @@ +/* nest80.h */ +#include "nest81.h" diff --git a/libraries/mcpp/test-l/nest81.h b/libraries/mcpp/test-l/nest81.h new file mode 100644 index 000000000..f85309acc --- /dev/null +++ b/libraries/mcpp/test-l/nest81.h @@ -0,0 +1,2 @@ +/* nest81.h */ +#include "nest82.h" diff --git a/libraries/mcpp/test-l/nest82.h b/libraries/mcpp/test-l/nest82.h new file mode 100644 index 000000000..4585753bc --- /dev/null +++ b/libraries/mcpp/test-l/nest82.h @@ -0,0 +1,2 @@ +/* nest82.h */ +#include "nest83.h" diff --git a/libraries/mcpp/test-l/nest83.h b/libraries/mcpp/test-l/nest83.h new file mode 100644 index 000000000..9378f6902 --- /dev/null +++ b/libraries/mcpp/test-l/nest83.h @@ -0,0 +1,2 @@ +/* nest83.h */ +#include "nest84.h" diff --git a/libraries/mcpp/test-l/nest84.h b/libraries/mcpp/test-l/nest84.h new file mode 100644 index 000000000..d763d2cbb --- /dev/null +++ b/libraries/mcpp/test-l/nest84.h @@ -0,0 +1,2 @@ +/* nest84.h */ +#include "nest85.h" diff --git a/libraries/mcpp/test-l/nest85.h b/libraries/mcpp/test-l/nest85.h new file mode 100644 index 000000000..e086a8634 --- /dev/null +++ b/libraries/mcpp/test-l/nest85.h @@ -0,0 +1,2 @@ +/* nest85.h */ +#include "nest86.h" diff --git a/libraries/mcpp/test-l/nest86.h b/libraries/mcpp/test-l/nest86.h new file mode 100644 index 000000000..89e897e9b --- /dev/null +++ b/libraries/mcpp/test-l/nest86.h @@ -0,0 +1,2 @@ +/* nest86.h */ +#include "nest87.h" diff --git a/libraries/mcpp/test-l/nest87.h b/libraries/mcpp/test-l/nest87.h new file mode 100644 index 000000000..1b3f5ecdf --- /dev/null +++ b/libraries/mcpp/test-l/nest87.h @@ -0,0 +1,2 @@ +/* nest87.h */ +#include "nest88.h" diff --git a/libraries/mcpp/test-l/nest88.h b/libraries/mcpp/test-l/nest88.h new file mode 100644 index 000000000..1d5ff425a --- /dev/null +++ b/libraries/mcpp/test-l/nest88.h @@ -0,0 +1,2 @@ +/* nest88.h */ +#include "nest89.h" diff --git a/libraries/mcpp/test-l/nest89.h b/libraries/mcpp/test-l/nest89.h new file mode 100644 index 000000000..3cabc5113 --- /dev/null +++ b/libraries/mcpp/test-l/nest89.h @@ -0,0 +1,2 @@ +/* nest89.h */ +#include "nest90.h" diff --git a/libraries/mcpp/test-l/nest9.h b/libraries/mcpp/test-l/nest9.h new file mode 100644 index 000000000..5f84e46fe --- /dev/null +++ b/libraries/mcpp/test-l/nest9.h @@ -0,0 +1,2 @@ +/* nest9.h */ +#include "nest10.h" diff --git a/libraries/mcpp/test-l/nest90.h b/libraries/mcpp/test-l/nest90.h new file mode 100644 index 000000000..77f6a40c3 --- /dev/null +++ b/libraries/mcpp/test-l/nest90.h @@ -0,0 +1,2 @@ +/* nest90.h */ +#include "nest91.h" diff --git a/libraries/mcpp/test-l/nest91.h b/libraries/mcpp/test-l/nest91.h new file mode 100644 index 000000000..287b18991 --- /dev/null +++ b/libraries/mcpp/test-l/nest91.h @@ -0,0 +1,2 @@ +/* nest91.h */ +#include "nest92.h" diff --git a/libraries/mcpp/test-l/nest92.h b/libraries/mcpp/test-l/nest92.h new file mode 100644 index 000000000..c4a82e801 --- /dev/null +++ b/libraries/mcpp/test-l/nest92.h @@ -0,0 +1,2 @@ +/* nest92.h */ +#include "nest93.h" diff --git a/libraries/mcpp/test-l/nest93.h b/libraries/mcpp/test-l/nest93.h new file mode 100644 index 000000000..243547ab7 --- /dev/null +++ b/libraries/mcpp/test-l/nest93.h @@ -0,0 +1,2 @@ +/* nest93.h */ +#include "nest94.h" diff --git a/libraries/mcpp/test-l/nest94.h b/libraries/mcpp/test-l/nest94.h new file mode 100644 index 000000000..828075109 --- /dev/null +++ b/libraries/mcpp/test-l/nest94.h @@ -0,0 +1,2 @@ +/* nest94.h */ +#include "nest95.h" diff --git a/libraries/mcpp/test-l/nest95.h b/libraries/mcpp/test-l/nest95.h new file mode 100644 index 000000000..ecdeea54f --- /dev/null +++ b/libraries/mcpp/test-l/nest95.h @@ -0,0 +1,2 @@ +/* nest95.h */ +#include "nest96.h" diff --git a/libraries/mcpp/test-l/nest96.h b/libraries/mcpp/test-l/nest96.h new file mode 100644 index 000000000..aed069f4d --- /dev/null +++ b/libraries/mcpp/test-l/nest96.h @@ -0,0 +1,2 @@ +/* nest96.h */ +#include "nest97.h" diff --git a/libraries/mcpp/test-l/nest97.h b/libraries/mcpp/test-l/nest97.h new file mode 100644 index 000000000..7ebfa0e42 --- /dev/null +++ b/libraries/mcpp/test-l/nest97.h @@ -0,0 +1,2 @@ +/* nest97.h */ +#include "nest98.h" diff --git a/libraries/mcpp/test-l/nest98.h b/libraries/mcpp/test-l/nest98.h new file mode 100644 index 000000000..cd9c6d0f3 --- /dev/null +++ b/libraries/mcpp/test-l/nest98.h @@ -0,0 +1,2 @@ +/* nest98.h */ +#include "nest99.h" diff --git a/libraries/mcpp/test-l/nest99.h b/libraries/mcpp/test-l/nest99.h new file mode 100644 index 000000000..d928a7409 --- /dev/null +++ b/libraries/mcpp/test-l/nest99.h @@ -0,0 +1,2 @@ +/* nest99.h */ +#include "nest100.h" diff --git a/libraries/mcpp/test-t/LICENSE b/libraries/mcpp/test-t/LICENSE new file mode 100644 index 000000000..5b617d281 --- /dev/null +++ b/libraries/mcpp/test-t/LICENSE @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 1998, 2002-2008 Kiyoshi Matsui + * All rights reserved. + * + * This software including the files in this directory is provided under + * the following license. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/libraries/mcpp/test-t/e_12_8.t b/libraries/mcpp/test-t/e_12_8.t new file mode 100644 index 000000000..468358bf4 --- /dev/null +++ b/libraries/mcpp/test-t/e_12_8.t @@ -0,0 +1,6 @@ +/* e_12_8.t: Out of range of integer pp-token in #if expression. */ + +/* 12.8: Preprocessing number perhaps out of range of unsigned long. */ +#if 123456789012345678901 +#endif + diff --git a/libraries/mcpp/test-t/e_14.t b/libraries/mcpp/test-t/e_14.t new file mode 100644 index 000000000..3b7e589c8 --- /dev/null +++ b/libraries/mcpp/test-t/e_14.t @@ -0,0 +1,38 @@ +/* e_14.t: Illegal #if expressions. */ + +#define A 1 +#define B 1 + +/* 14.1: String literal is not allowed in #if expression. */ +#if "string" +#endif /* The second error ? */ + +/* 14.2: Operators =, +=, ++, etc. are not allowed in #if expression. */ +#if A = B +#endif +#if A++ B +#endif +#if A --B +#endif +#if A.B +#endif + +/* 14.3: Unterminated #if expression. */ +#if 0 < +#endif +#if ( (A == B) +#endif + +/* 14.4: Unbalanced parenthesis in #if defined operator. */ +#if defined ( MACRO +#endif + +/* 14.5: No argument. */ +#if +#endif + +/* 14.6: Macro expanding to 0 token in #if expression. */ +#define ZERO_TOKEN +#if ZERO_TOKEN +#endif + diff --git a/libraries/mcpp/test-t/e_14_10.t b/libraries/mcpp/test-t/e_14_10.t new file mode 100644 index 000000000..e8f32520e --- /dev/null +++ b/libraries/mcpp/test-t/e_14_10.t @@ -0,0 +1,17 @@ +/* e_14_10.t: Overflow of constant expression in #if directive. */ + +/* 14.10: */ +/* In C99, #if expression is evaluated in intmax_t */ +#if __STDC_VERSION__ < 199901L +#include + +#if LONG_MAX - LONG_MIN +#endif +#if LONG_MAX + 1 > SHRT_MAX +#endif +#if LONG_MIN - 1 +#endif +#if LONG_MAX * 2 +#endif +#endif + diff --git a/libraries/mcpp/test-t/e_14_7.t b/libraries/mcpp/test-t/e_14_7.t new file mode 100644 index 000000000..8930305aa --- /dev/null +++ b/libraries/mcpp/test-t/e_14_7.t @@ -0,0 +1,14 @@ +/* e_14_7.t: There is no keyword in #if expression. */ + +/* 14.7: sizeof operator is disallowed. */ +/* Evaluated as: 0 (0) + Constant expression syntax error. */ +#if sizeof (int) +#endif + +/* 14.8: type cast is disallowed. */ +/* Evaluated as: (0)0x8000 + Also a constant expression error. */ +#if (int)0x8000 < 0 +#endif + diff --git a/libraries/mcpp/test-t/e_14_9.t b/libraries/mcpp/test-t/e_14_9.t new file mode 100644 index 000000000..3f666c40f --- /dev/null +++ b/libraries/mcpp/test-t/e_14_9.t @@ -0,0 +1,6 @@ +/* e_14_9.t: Out of range in #if expression (division by 0). */ + +/* 14.9: Divided by 0. */ +#if 1 / 0 +#endif + diff --git a/libraries/mcpp/test-t/e_15_3.t b/libraries/mcpp/test-t/e_15_3.t new file mode 100644 index 000000000..98f6ea70c --- /dev/null +++ b/libraries/mcpp/test-t/e_15_3.t @@ -0,0 +1,16 @@ +/* e_15_3.t: #ifdef, #ifndef syntax errors. */ + +/* 15.3: Not an identifier. */ +#ifdef "string" +#endif +#ifdef 123 +#endif + +/* 15.4: Excessive token sequence. */ +#ifdef MACRO Junk +#endif + +/* 15.5: No argument. */ +#ifndef +#endif + diff --git a/libraries/mcpp/test-t/e_16.t b/libraries/mcpp/test-t/e_16.t new file mode 100644 index 000000000..2185573f5 --- /dev/null +++ b/libraries/mcpp/test-t/e_16.t @@ -0,0 +1,10 @@ +/* e_16.t: Trailing junk of #else, #endif. */ + +/* 16.1: Trailing junk of #else. */ +#define MACRO_0 0 +#if MACRO_0 +#else MACRO_0 + +/* 16.2: Trailing junk of #endif. */ +#endif MACRO_0 + diff --git a/libraries/mcpp/test-t/e_17.t b/libraries/mcpp/test-t/e_17.t new file mode 100644 index 000000000..0280d83cb --- /dev/null +++ b/libraries/mcpp/test-t/e_17.t @@ -0,0 +1,37 @@ +/* e_17.t: Ill-formed group in a source file. */ + +#define MACRO_1 1 + +/* 17.1: Error of #endif without #if. */ +#endif + +/* 17.2: Error of #else without #if. */ +#else + +/* 17.3: Error of #else after #else. */ +#if MACRO_1 +#else /* line 13 */ +#if 1 +#else +#endif +#else +#endif + +/* 17.4: Error of #elif after #else. */ +#if MACRO_1 == 1 +#else /* line 22 */ +#elif MACRO_1 == 0 +#endif + +/* 17.5: Error of #endif without #if in an included file. */ +#if 1 +#include "unbal1.h" + +/* 17.6: Error of unterminated #if section in an included file. */ +#include "unbal2.h" +#endif + +/* 17.7: Error of unterminated #if section. */ +#if MACRO_1 == 0 /* line 35 */ +#else + diff --git a/libraries/mcpp/test-t/e_18_4.t b/libraries/mcpp/test-t/e_18_4.t new file mode 100644 index 000000000..821b23ea8 --- /dev/null +++ b/libraries/mcpp/test-t/e_18_4.t @@ -0,0 +1,31 @@ +/* e_18_4.t: #define syntax errors. */ + +/* 18.4: Not an identifier. */ +#define "string" +#define 123 + +/* 18.5: No argument. */ +#define + +/* 18.6: Empty parameter list. */ +#define math( op, a, ) op( (a), (b)) + +/* 18.7: Duplicate parameter names. */ +#define math( op, a, a) op( (a), (b)) + +/* 18.8: Argument is not an identifier. */ +#define NUMARGS( 1, +, 2) (1 + 2) + +/* 18.9: No space between macro name and replacement text. */ +/* + C90 (Corrigendum 1) forbids this if and only the replacement text begins + with a non-basic-character. + C99 forbids this even when the replacement text begins with basic- + character. +*/ +/* From ISO 9899:1990 / Corrigendum 1. */ +#define THIS$AND$THAT(a, b) ((a) + (b)) +/* Note: the following definition is legal (object-like macro). +#define THIS $AND$THAT(a, b) ((a) + (b)) +*/ + diff --git a/libraries/mcpp/test-t/e_19_3.t b/libraries/mcpp/test-t/e_19_3.t new file mode 100644 index 000000000..18ccd0d91 --- /dev/null +++ b/libraries/mcpp/test-t/e_19_3.t @@ -0,0 +1,34 @@ +/* e_19_3.t: Redefinitions of macros. */ + +/* Excerpts from ISO C 3.8.3 "Examples". */ + +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* The following redefinitions should be diagnosed. */ + +/* 19.3: */ +#define OBJ_LIKE (0) /* different token sequence */ + +/* (1-1); or (0); */ + OBJ_LIKE; + +/* 19.4: */ +#undef OBJ_LIKE +#define OBJ_LIKE (1-1) +#define OBJ_LIKE (1 - 1) /* different white space */ + +/* 19.5: */ +#define FTN_LIKE(b) ( a ) /* different parameter usage */ + +/* ( x ); or ( a); */ + FTN_LIKE(x); + +/* 19.6: */ +#undef FTN_LIKE +#define FTN_LIKE(a) ( a ) +#define FTN_LIKE(b) ( b ) /* different parameter spelling */ + +/* 19.7: Not in ISO C "Examples" */ +#define FTN_LIKE OBJ_LIKE + diff --git a/libraries/mcpp/test-t/e_23_3.t b/libraries/mcpp/test-t/e_23_3.t new file mode 100644 index 000000000..8b45cfb13 --- /dev/null +++ b/libraries/mcpp/test-t/e_23_3.t @@ -0,0 +1,11 @@ +/* e_23_3.t: ## operator shall not occur at the beginning or at the end of + replacement list for either form of macro definition. */ + +/* 23.3: In object-like macro. */ +#define con ## name +#define cat 12 ## + +/* 23.4: In function-like macro. */ +#define CON( a, b) ## a ## b +#define CAT( b, c) b ## c ## + diff --git a/libraries/mcpp/test-t/e_24_6.t b/libraries/mcpp/test-t/e_24_6.t new file mode 100644 index 000000000..912e1898f --- /dev/null +++ b/libraries/mcpp/test-t/e_24_6.t @@ -0,0 +1,6 @@ +/* e_24_6.t: Operand of # operator in function-like macro definition shall + be a parameter name. */ + +/* 24.6: */ +#define FUNC( a) # b + diff --git a/libraries/mcpp/test-t/e_25_6.t b/libraries/mcpp/test-t/e_25_6.t new file mode 100644 index 000000000..0a8ed1885 --- /dev/null +++ b/libraries/mcpp/test-t/e_25_6.t @@ -0,0 +1,14 @@ +/* e_25_6.t: Macro arguments are pre-expanded separately. */ + +#define sub( x, y) (x - y) + +/* 25.6: */ +#define head sub( +#define body(x,y) x,y +#define tail ) +#define head_body_tail( a, b, c) a b c +/* "head" is once replaced to "sub(", then rescanning of "sub(" causes an + uncompleted macro call. Expansion of an argument should complete + within the argument. */ + head_body_tail( head, body(a,b), tail); + diff --git a/libraries/mcpp/test-t/e_27_7.t b/libraries/mcpp/test-t/e_27_7.t new file mode 100644 index 000000000..5593b14b4 --- /dev/null +++ b/libraries/mcpp/test-t/e_27_7.t @@ -0,0 +1,11 @@ +/* e_27_7.t: Error of rescanning. */ + +#define sub( x, y) (x - y) + +/* 27.7: */ +#define TWO_TOKENS a,b +#define SUB( x, y) sub( x, y) +/* Too many arguments error while rescanning after once replaced to: + sub( a,b, 1); */ + SUB( TWO_TOKENS, 1); + diff --git a/libraries/mcpp/test-t/e_29_3.t b/libraries/mcpp/test-t/e_29_3.t new file mode 100644 index 000000000..8ba310eb2 --- /dev/null +++ b/libraries/mcpp/test-t/e_29_3.t @@ -0,0 +1,12 @@ +/* e_29_3.t: #undef errors. */ + +/* 29.3: Not an identifier. */ +#undef "string" +#undef 123 + +/* 29.4: Excessive token sequence. */ +#undef MACRO_0 Junk + +/* 29.5: No argument. */ +#undef + diff --git a/libraries/mcpp/test-t/e_31.t b/libraries/mcpp/test-t/e_31.t new file mode 100644 index 000000000..26d7882d7 --- /dev/null +++ b/libraries/mcpp/test-t/e_31.t @@ -0,0 +1,10 @@ +/* e_31.t: Illegal macro calls. */ + +#define sub( a, b) (a - b) + +/* 31.1: Too many arguments error. */ + sub( x, y, z); + +/* 31.2: Too few arguments error. */ + sub( x); + diff --git a/libraries/mcpp/test-t/e_31_3.t b/libraries/mcpp/test-t/e_31_3.t new file mode 100644 index 000000000..39d3050b5 --- /dev/null +++ b/libraries/mcpp/test-t/e_31_3.t @@ -0,0 +1,10 @@ +/* e_31_3.t: Macro call in control line should complete in the line. */ + +#define glue( a, b) a ## b +#define str( s) # s +#define xstr( s) str( s) + +/* 31.3: Unterminated macro call. */ +#include xstr( glue( header, + .h)) + diff --git a/libraries/mcpp/test-t/e_32_5.t b/libraries/mcpp/test-t/e_32_5.t new file mode 100644 index 000000000..79c4c395b --- /dev/null +++ b/libraries/mcpp/test-t/e_32_5.t @@ -0,0 +1,7 @@ +/* e_32_5.t: Range error of character constant. */ + +/* 32.5: Value of a numerical escape sequence in character constant should + be in the range of char. */ +#if '\x123' == 0x123 /* Out of range */ +#endif + diff --git a/libraries/mcpp/test-t/e_33_2.t b/libraries/mcpp/test-t/e_33_2.t new file mode 100644 index 000000000..483940d6f --- /dev/null +++ b/libraries/mcpp/test-t/e_33_2.t @@ -0,0 +1,7 @@ +/* e_33_2.t: Out of range of numerical escape sequence in wide-char. */ + +/* 33.2: Value of a numerical escape sequence in wide-character constant + should be in the range of wchar_t. */ +#if L'\xabcdef012' == 0xbcdef012 /* Perhaps out of range. */ +#endif + diff --git a/libraries/mcpp/test-t/e_35_2.t b/libraries/mcpp/test-t/e_35_2.t new file mode 100644 index 000000000..8e4933b0f --- /dev/null +++ b/libraries/mcpp/test-t/e_35_2.t @@ -0,0 +1,6 @@ +/* e_35_2.t: Out of range of character constant. */ + +/* 35.2: */ +#if 'abcdefghi' /* Perhaps out of range. */ +#endif + diff --git a/libraries/mcpp/test-t/e_4_3.t b/libraries/mcpp/test-t/e_4_3.t new file mode 100644 index 000000000..0af321827 --- /dev/null +++ b/libraries/mcpp/test-t/e_4_3.t @@ -0,0 +1,6 @@ +/* e_4_3.t: Illegal pp-token. */ + +/* 4.3: Empty character constant is an error. */ +#if '' == 0 /* This line is invalid, maybe skipped. */ +#endif /* This line maybe the second error. */ + diff --git a/libraries/mcpp/test-t/e_7_4.t b/libraries/mcpp/test-t/e_7_4.t new file mode 100644 index 000000000..dbff915ff --- /dev/null +++ b/libraries/mcpp/test-t/e_7_4.t @@ -0,0 +1,9 @@ +/* e_7_4.t: #line error. */ + +/* 7.4: string literal in #line directive shall be a character string + literal. */ + +#line 123 L"wide" +/* 8; "e_7_4.t"; */ + __LINE__; __FILE__; + diff --git a/libraries/mcpp/test-t/e_intmax.t b/libraries/mcpp/test-t/e_intmax.t new file mode 100644 index 000000000..2e2572090 --- /dev/null +++ b/libraries/mcpp/test-t/e_intmax.t @@ -0,0 +1,23 @@ +/* e_intmax.t: Overflow of constant expression in #if directive. */ + +#include +#include + +#if INTMAX_MAX - INTMAX_MIN +#endif +#if INTMAX_MAX + 1 > SHRT_MAX +#endif +#if INTMAX_MIN - 1 +#endif +#if INTMAX_MAX * 2 +#endif + +#if LLONG_MAX - LLONG_MIN +#endif +#if LLONG_MAX + 1 > SHRT_MAX +#endif +#if LLONG_MIN - 1 +#endif +#if LLONG_MAX * 2 +#endif + diff --git a/libraries/mcpp/test-t/e_operat.cc b/libraries/mcpp/test-t/e_operat.cc new file mode 100644 index 000000000..cf334d542 --- /dev/null +++ b/libraries/mcpp/test-t/e_operat.cc @@ -0,0 +1,10 @@ +/* e_operat.t */ +/* + * In C++98 the 11 identifier-like tokens are operators, not identifiers. + * Note: in C95 these are defined as macros by . + */ + +/* Cannot define operator as a macro. */ +#define and && +#define xor_eq ^= + diff --git a/libraries/mcpp/test-t/e_operat.t b/libraries/mcpp/test-t/e_operat.t new file mode 100644 index 000000000..cf334d542 --- /dev/null +++ b/libraries/mcpp/test-t/e_operat.t @@ -0,0 +1,10 @@ +/* e_operat.t */ +/* + * In C++98 the 11 identifier-like tokens are operators, not identifiers. + * Note: in C95 these are defined as macros by . + */ + +/* Cannot define operator as a macro. */ +#define and && +#define xor_eq ^= + diff --git a/libraries/mcpp/test-t/e_post.t b/libraries/mcpp/test-t/e_post.t new file mode 100644 index 000000000..eba2166c0 --- /dev/null +++ b/libraries/mcpp/test-t/e_post.t @@ -0,0 +1,314 @@ +/* + * e_post.t + * + * 1998/08 made public kmatsui + * 2002/08 revised not to conflict with C99 Standard kmatsui + * 2003/11 added a few samples kmatsui + * + * Samples to test "POST_STANDARD" mode of C preprocessing. + * POST_STANDARD cpp must diagnose all of these samples appropriately. + */ + + +/* e_4_3.t: Illegal pp-token. */ + +/* 4.3: Empty character constant is an error. */ +#if '' == 0 /* This line is invalid, maybe skipped. */ +#endif /* This line maybe the second error. */ + + +/* e_7_4.t: #line error. */ + +/* 7.4: string literal in #line directive shall be a character string + literal. */ + +#line 123 L"wide" +/* 27 ; "e_post.t" ; */ + __LINE__; __FILE__; + + +/* e_12_7.t: Out of range of integer pp-token in #if expression. */ + +/* 12.7: Preprocessing number perhaps out of range of unsigned long. */ +#if 123456789012345678901 +#endif + + +/* e_14.t: Illegal #if expressions. */ + +#define A 1 +#define B 1 + +/* 14.1: String literal is not allowed in #if expression. */ +#if "string" +#endif /* The second error ? */ + +/* 14.2: Operators =, +=, ++, etc. are not allowed in #if expression. */ +#if A = B +#endif +#if A++ B +#endif +#if A --B +#endif +#if A.B +#endif + +/* 14.3: Unterminated #if expression. */ +#if ( (A == B) +#endif + +/* 14.4: Unbalanced parenthesis in #if defined operator. */ +#if defined ( MACRO +#endif + +/* 14.5: No argument. */ +#if +#endif + +/* 14.6: Macro expanding to 0 token in #if expression. */ +#define ZERO_TOKEN +#if ZERO_TOKEN +#endif + + +/* e_14_7.t: There is no keyword in #if expression. */ + +/* 14.7: sizeof operator is disallowed. */ +/* Evaluated as: 0 (0) + Constant expression syntax error. */ +#if sizeof (int) +#endif + +/* 14.8: type cast is disallowed. */ +/* Evaluated as: (0)0x8000 + Also a constant expression error. */ +#if (int)0x8000 < 0 +#endif + + +/* e_14_9.t: Out of range in #if expression (division by 0). */ + +/* 14.9: Divided by 0. */ +#if 1 / 0 +#endif + + +/* e_14_10.t: Overflow of constant expression in #if directive. */ + +/* 14.10: */ +/* In C99, #if expression is evaluated in intmax_t */ +#if __STDC_VERSION__ < 199901L +#include + +#if LONG_MAX - LONG_MIN +#endif +#if LONG_MAX + 1 +#endif +#if LONG_MIN - 1 +#endif +#if LONG_MAX * 2 +#endif +#endif + + +/* e_15_3.t: #ifdef, #ifndef syntax errors. */ + +/* 15.3: Not an identifier. */ +#ifdef "string" +#endif +#ifdef 123 +#endif + +/* 15.4: Excessive token sequence. */ +#ifdef ZERO_TOKEN Junk +#endif + +/* 15.5: No argument. */ +#ifndef +#endif + + +/* e_16.t: Trailing junk of #else, #endif. */ + +/* 16.1: Trailing junk of #else. */ +#define MACRO_0 0 +#if MACRO_0 +#else MACRO_0 + +/* 16.2: Trailing junk of #endif. */ +#endif MACRO_0 + + +/* e_17.t: Ill-formed group in a source file. */ + +#define MACRO_1 1 + +/* 17.1: Error of #endif without #if. */ +#endif + +/* 17.2: Error of #else without #if. */ +#else + +/* 17.3: Error of #else after #else. */ +#if MACRO_1 +#else /* line 154 */ +#if 1 +#else +#endif +#else +#endif + +/* 17.4: Error of #elif after #else. */ +#if MACRO_1 == 1 +#else /* line 163 */ +#elif MACRO_1 == 0 +#endif + +/* 17.5: Error of #endif without #if in an included file. */ +#if 1 +#include "unbal1.h" + +/* 17.6: Error of unterminated #if section in an included file. */ +#include "unbal2.h" +#endif + +/* 17.7: Error of unterminated #if section. */ +/* This error would be diagnosed at end of file. */ +#if MACRO_1 == 0 /* line 177 */ +#else + + +/* e_18_4.t: #define syntax errors. */ + +/* 18.4: Not an identifier. */ +#define "string" +#define 123 + +/* 18.5: No argument. */ +#define + +/* 18.6: Empty parameter list. */ +#define math( op, a, ) op( (a), (b)) + +/* 18.7: Duplicate parameter names. */ +#define math( op, a, a) op( (a), (b)) + +/* 18.8: Argument is not an identifier. */ +#define NUMARGS( 1, +, 2) (1 + 2) + + +/* e_19_3.t: Redefinitions of macros. */ + +/* Excerpts from ISO C 6.8.3 "Examples". */ + +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* The following redefinitions should be diagnosed. */ + +/* 19.3: */ +#define OBJ_LIKE (0) /* different token sequence */ + +/* ( 1 - 1 ) ; or ( 0 ) ; */ + OBJ_LIKE; + +/* 19.5: */ +#define FTN_LIKE(b) ( a ) /* different parameter usage */ + +/* ( x ) ; or ( a ) ; */ + FTN_LIKE(x); + +/* 19.7: Not in ISO C "Examples" */ +#define FTN_LIKE OBJ_LIKE + + +/* e_23_3.t: ## operator shall not occur at the beginning or at the end of + replacement list for either form of macro definition. */ + +/* 23.3: In object-like macro. */ +#define con ## name +#define cat 12 ## + +/* 23.4: In function-like macro. */ +#define CON( a, b) ## a ## b +#define CAT( b, c) b ## c ## + + +/* e_24_6.t: Operand of # operator in function-like macro definition shall + be a parameter name. */ + +/* 24.6: */ +#define FUNC( a) # b + + +/* e_25_6.t: Macro arguments are pre-expanded separately. */ + +/* 25.6: */ +#define sub( x, y) (x - y) +#define head sub( +#define body(x,y) x,y +#define tail ) +#define head_body_tail( a, b, c) a b c +/* "head" is once replaced to "sub(", then rescanning of "sub(" causes an + uncompleted macro call. Expansion of an argument should complete + within the argument. */ + head_body_tail( head, body(a,b), tail); + + +/* e_27_7.t: Error of rescanning. */ + +/* 27.7: Rescanning of macro should complete in the macro call. */ +/* 'add(' causes "unterminated macro call" error. */ + head a,b ); + +/* 27.8: */ +#define TWO_TOKENS a,b +#define SUB( x, y) sub( x, y) +/* Too many arguments error while rescanning after once replaced to: + sub( a,b, 1); */ + SUB( TWO_TOKENS, 1); + + +/* e_29_3.t: #undef errors. */ + +/* 29.3: Not an identifier. */ +#undef "string" +#undef 123 + +/* 29.4: Excessive token sequence. */ +#undef MACRO_0 Junk + +/* 29.5: No argument. */ +#undef + + +/* e_31.t: Illegal macro calls. */ + +/* 31.1: Too many arguments error. */ + sub( x, y, z); + +/* 31.2: Too few arguments error. */ + sub( x); + + +/* e_31_3.t: Macro call in control line should complete in the line. */ + +#define glue( a, b) a ## b +#define str( s) # s +#define xstr( s) str( s) + +/* 31.3: Unterminated macro call. */ +#include xstr( glue( header, + .h)) + + +/* e_32_5.t: Character constant is forbidden in #if expression. */ + +/* 32.5: */ +#if '\x12' == 0x12 +#endif + + +/* Error of "unterminated #if section started at line 177" will be reported + at end of file. */ + diff --git a/libraries/mcpp/test-t/e_pragma.t b/libraries/mcpp/test-t/e_pragma.t new file mode 100644 index 000000000..3b3d3dc77 --- /dev/null +++ b/libraries/mcpp/test-t/e_pragma.t @@ -0,0 +1,4 @@ +/* e_pragma.t: Erroneous use of _Pragma() operator */ + /* Operand of _Pragma() should be a string literal */ + _Pragma( This is not a string literal) + diff --git a/libraries/mcpp/test-t/e_std.t b/libraries/mcpp/test-t/e_std.t new file mode 100644 index 000000000..6cc40244e --- /dev/null +++ b/libraries/mcpp/test-t/e_std.t @@ -0,0 +1,354 @@ +/* + * e_std.t + * + * 1998/08 made public kmatsui + * 2002/08 revised not to conflict with C99 Standard kmatsui + * 2003/11 added a few samples kmatsui + * + * Samples to test Standard C preprocessing. + * Preprocessor must diagnose all of these samples appropriately. + */ + + +/* e_4_3.t: Illegal pp-token. */ + +/* 4.3: Empty character constant is an error. */ +#if '' == 0 /* This line is invalid, maybe skipped. */ +#endif /* This line maybe the second error. */ + + +/* e_7_4.t: #line error. */ + +/* 7.4: string literal in #line directive shall be a character string + literal. */ + +#line 123 L"wide" +/* 27; "e_std.t"; */ + __LINE__; __FILE__; + +/* Restore to correct line number. */ +#line 31 + +/* e_12_8.t: Out of range of integer pp-token in #if expression. */ +/* Note: Tests of character constant overflow are in 32.5, 33.2, 35.2. */ + +/* 12.8: Preprocessing number perhaps out of range of unsigned long. */ +#if 123456789012345678901 +#endif + + +/* e_14.t: Illegal #if expressions. */ + +#define A 1 +#define B 1 + +/* 14.1: String literal is not allowed in #if expression. */ +#if "string" +#endif /* The second error ? */ + +/* 14.2: Operators =, +=, ++, etc. are not allowed in #if expression. */ +#if A = B +#endif +#if A++ B +#endif +#if A --B +#endif +#if A.B +#endif + +/* 14.3: Unterminated #if expression. */ +#if 0 < +#endif +#if ( (A == B) +#endif + +/* 14.4: Unbalanced parenthesis in #if defined operator. */ +#if defined ( MACRO +#endif + +/* 14.5: No argument. */ +#if +#endif + +/* 14.6: Macro expanding to 0 token in #if expression. */ +#define ZERO_TOKEN +#if ZERO_TOKEN +#endif + + +/* e_14_7.t: There is no keyword in #if expression. */ + +/* 14.7: sizeof operator is disallowed. */ +/* Evaluated as: 0 (0) + Constant expression syntax error. */ +#if sizeof (int) +#endif + +/* 14.8: type cast is disallowed. */ +/* Evaluated as: (0)0x8000 + Also a constant expression error. */ +#if (int)0x8000 < 0 +#endif + + +/* e_14_9.t: Out of range in #if expression (division by 0). */ + +/* 14.9: Divided by 0. */ +#if 1 / 0 +#endif + + +/* e_14_10.t: Overflow of constant expression in #if directive. */ + +/* 14.10: */ +/* In C99, #if expression is evaluated in intmax_t */ +#if __STDC_VERSION__ < 199901L +#include + +#if LONG_MAX - LONG_MIN +#endif +#if LONG_MAX + 1 +#endif +#if LONG_MIN - 1 +#endif +#if LONG_MAX * 2 +#endif +#endif + + +/* e_15_3.t: #ifdef, #ifndef syntax errors. */ + +/* 15.3: Not an identifier. */ +#ifdef "string" +#endif +#ifdef 123 +#endif + +/* 15.4: Excessive token sequence. */ +#ifdef ZERO_TOKEN Junk +#endif + +/* 15.5: No argument. */ +#ifndef +#endif + + +/* e_16.t: Trailing junk of #else, #endif. */ + +/* 16.1: Trailing junk of #else. */ +#define MACRO_0 0 +#if MACRO_0 +#else MACRO_0 + +/* 16.2: Trailing junk of #endif. */ +#endif MACRO_0 + + +/* e_17.t: Ill-formed group in a source file. */ + +#define MACRO_1 1 + +/* 17.1: Error of #endif without #if. */ +#endif + +/* 17.2: Error of #else without #if. */ +#else + +/* 17.3: Error of #else after #else. */ +#if MACRO_1 +#else /* line 159 */ +#if 1 +#else +#endif +#else +#endif + +/* 17.4: Error of #elif after #else. */ +#if MACRO_1 == 1 +#else /* line 168 */ +#elif MACRO_1 == 0 +#endif + +/* 17.5: Error of #endif without #if in an included file. */ +#if 1 +#include "unbal1.h" + +/* 17.6: Error of unterminated #if section in an included file. */ +#include "unbal2.h" +#endif + +/* 17.7: Error of unterminated #if section. */ +/* This error would be diagnosed at end of file. */ +#if MACRO_1 == 0 /* line 182 */ +#else + + +/* e_18_4.t: #define syntax errors. */ + +/* 18.4: Not an identifier. */ +#define "string" +#define 123 + +/* 18.5: No argument. */ +#define + +/* 18.6: Empty parameter list. */ +#define math( op, a, ) op( (a), (b)) + +/* 18.7: Duplicate parameter names. */ +#define math( op, a, a) op( (a), (b)) + +/* 18.8: Argument is not an identifier. */ +#define NUMARGS( 1, +, 2) (1 + 2) + +/* 18.9: No space between macro name and replacement text. */ +/* + C90 (Corrigendum 1) forbids this if and only the replacement text begins + with a non-basic-character. + C99 forbids this even when the replacement text begins with basic- + character. +*/ +/* From ISO 9899:1990 / Corrigendum 1. */ +#define THIS$AND$THAT(a, b) ((a) + (b)) +/* Note: the following definition is legal (object-like macro). +#define THIS $AND$THAT(a, b) ((a) + (b)) +*/ + + +/* e_19_3.t: Redefinitions of macros. */ + +/* Excerpts from ISO C90 6.8.3 "Examples". */ + +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* The following redefinitions should be diagnosed. */ + +/* 19.3: */ +#define OBJ_LIKE (0) /* different token sequence */ + +/* (1-1); or (0); */ + OBJ_LIKE; + +/* 19.4: */ +#undef OBJ_LIKE +#define OBJ_LIKE (1-1) +#define OBJ_LIKE (1 - 1) /* different white space */ + +/* 19.5: */ +#define FTN_LIKE(b) ( a ) /* different parameter usage */ + +/* ( x ); or ( a); */ + FTN_LIKE(x); + +/* 19.6: */ +#undef FTN_LIKE +#define FTN_LIKE(a) ( a ) +#define FTN_LIKE(b) ( b ) /* different parameter spelling */ + +/* 19.7: Not in ISO C "Examples" */ +#define FTN_LIKE OBJ_LIKE + + +/* e_23_3.t: ## operator shall not occur at the beginning or at the end of + replacement list for either form of macro definition. */ + +/* 23.3: In object-like macro. */ +#define con ## name +#define cat 12 ## + +/* 23.4: In function-like macro. */ +#define CON( a, b) ## a ## b +#define CAT( b, c) b ## c ## + + +/* e_24_6.t: Operand of # operator in function-like macro definition shall + be a parameter name. */ + +/* 24.6: */ +#define FUNC( a) # b + + +/* e_25_6.t: Macro arguments are pre-expanded separately. */ + +/* 25.6: */ +#define sub( x, y) (x - y) +#define head sub( +#define body(x,y) x,y +#define tail ) +#define head_body_tail( a, b, c) a b c +/* "head" is once replaced to "sub(", then rescanning of "sub(" causes an + uncompleted macro call. Expansion of an argument should complete + within the argument. */ + head_body_tail( head, body(a,b), tail); + + +/* e_27_7.t: Error of rescanning. */ + +/* 27.7: */ +#define TWO_ARGS a,b +#define SUB( x, y) sub( x, y) +/* Too many arguments error while rescanning after once replaced to: + sub( a,b, 1); */ + SUB( TWO_ARGS, 1); + + +/* e_29_3.t: #undef errors. */ + +/* 29.3: Not an identifier. */ +#undef "string" +#undef 123 + +/* 29.4: Excessive token sequence. */ +#undef MACRO_0 Junk + +/* 29.5: No argument. */ +#undef + + +/* e_31.t: Illegal macro calls. */ + +/* 31.1: Too many arguments error. */ + sub( x, y, z); + +/* 31.2: Too few arguments error. */ + sub( x); + + +/* e_31_3.t: Macro call in control line should complete in the line. */ + +#define glue( a, b) a ## b +#define str( s) # s +#define xstr( s) str( s) + +/* 31.3: Unterminated macro call. */ +#include xstr( glue( header, + .h)) + + +/* e_32_5.t: Range error of character constant. */ + +/* 32.5: Value of a numerical escape sequence in character constant should + be in the range of char. */ +#if '\x123' == 0x123 /* Out of range */ +#endif + + +/* e_33_2.t: Out of range of numerical escape sequence in wide-char. */ + +/* 33.2: Value of a numerical escape sequence in wide-character constant + should be in the range of wchar_t. */ +#if L'\xabcdef012' == 0xbcdef012 /* Perhaps out of range. */ +#endif + + +/* e_35_2.t: Out of range of character constant. */ + +/* 35.2: */ +#if 'abcdefghi' /* Perhaps out of range. */ +#endif + + +/* Error of "unterminated #if section started at line 182" will be reported + at end of file. */ + diff --git a/libraries/mcpp/test-t/e_std99.t b/libraries/mcpp/test-t/e_std99.t new file mode 100644 index 000000000..51510b9f7 --- /dev/null +++ b/libraries/mcpp/test-t/e_std99.t @@ -0,0 +1,66 @@ +/* + * e_std99.t + * + * 2002/08 made public kmatsui + * 2003/11 added a few samples kmatsui + * + * Samples to test Standard C99 preprocessing. + * C99 preprocessor must diagnose all of these samples appropriately. + */ + + +/* e_ucn.t: Errors of Universal-character-name sequense. */ + +#define macro\U0000001F violation of constraint +#define macro\uD800 violation of constraint (only C, not for C++) +#define macro\u123 too short sequence (violation of syntax rule) +#define macro\U1234567 also too short sequence + + +/* e_intmax.t: Overflow of constant expression in #if directive. */ + +#include + +#if INTMAX_MAX - INTMAX_MIN +#endif +#if INTMAX_MAX + 1 +#endif +#if INTMAX_MIN - 1 +#endif +#if INTMAX_MAX * 2 +#endif + +#include + +#if LLONG_MAX - LLONG_MIN +#endif +#if LLONG_MAX + 1 +#endif +#if LLONG_MIN - 1 +#endif +#if LLONG_MAX * 2 +#endif + + +/* e_pragma.t: Erroneous use of _Pragma() operator */ + /* Operand of _Pragma() should be a string literal */ + _Pragma( This is not a string literal) + + +/* e_vargs1.t: Erroneous usage of __VA_ARGS__ */ + +/* __VA_ARGS__ should not be defined. */ + #define __VA_ARGS__ (x, y, z) + +/* + * __VA_ARGS__ should be the parameter name in replacement list + * corresponding to '...'. + */ + #define wrong_macro( a, b, __VA_ARGS__) (a + b - __VA_ARGS__) + + +/* e_vargs2.t: Erroneous macro invocation of variable arguments */ + #define debug( ...) fprintf( stderr, __VA_ARGS__) + /* No argument to correspond __VA_ARGS__ */ + debug(); + diff --git a/libraries/mcpp/test-t/e_ucn.t b/libraries/mcpp/test-t/e_ucn.t new file mode 100644 index 000000000..3fa84857f --- /dev/null +++ b/libraries/mcpp/test-t/e_ucn.t @@ -0,0 +1,7 @@ +/* e_ucn.t: Errors of Universal-character-name sequense. */ + +#define macro\U0000001F /* violation of constraint */ +#define macro\uD800 /* violation of constraint (only C, not for C++) */ +#define macro\u123 /* too short sequence (violation of syntax rule) */ +#define macro\U1234567 /* also too short sequence */ + diff --git a/libraries/mcpp/test-t/e_vargs.t b/libraries/mcpp/test-t/e_vargs.t new file mode 100644 index 000000000..f2ee04e05 --- /dev/null +++ b/libraries/mcpp/test-t/e_vargs.t @@ -0,0 +1,17 @@ +/* e_vargs1.t: Erroneous usage of __VA_ARGS__ */ + +/* __VA_ARGS__ should not be defined. */ + #define __VA_ARGS__ (x, y, z) + +/* + * __VA_ARGS__ should be the parameter name in replacement list + * corresponding to '...'. + */ + #define wrong_macro( a, b, __VA_ARGS__) (a + b - __VA_ARGS__) + + +/* e_vargs2.t: Erroneous macro invocation of variable arguments */ + #define debug( ...) fprintf( stderr, __VA_ARGS__) + /* No argument to correspond __VA_ARGS__ */ + debug(); + diff --git a/libraries/mcpp/test-t/header.h b/libraries/mcpp/test-t/header.h new file mode 100644 index 000000000..341de7bf5 --- /dev/null +++ b/libraries/mcpp/test-t/header.h @@ -0,0 +1,3 @@ +/* header.h */ + +#define MACRO_abc abc diff --git a/libraries/mcpp/test-t/i_32_3.t b/libraries/mcpp/test-t/i_32_3.t new file mode 100644 index 000000000..6f8a07628 --- /dev/null +++ b/libraries/mcpp/test-t/i_32_3.t @@ -0,0 +1,13 @@ +/* i_32_3.t: Character constant in #if expression. */ + +/* In ASCII character set. */ +/* 32.3: */ +#if 'a' != 0x61 + Not ASCII character set, or bad evaluation of character constant. +#endif + +/* 32.4: '\a' and '\v' */ +#if '\a' != 7 || '\v' != 11 + Not ASCII character set, or bad evaluation of escape sequences. +#endif + diff --git a/libraries/mcpp/test-t/i_35.t b/libraries/mcpp/test-t/i_35.t new file mode 100644 index 000000000..bb525994d --- /dev/null +++ b/libraries/mcpp/test-t/i_35.t @@ -0,0 +1,8 @@ +/* i_35.t: Multi-character character constant. */ + +/* In ASCII character set. */ +/* 35.1: */ +#if ('ab' != '\x61\x62') || ('\aa' != '\7\x61') + Bad handling of multi-character character constant. +#endif + diff --git a/libraries/mcpp/test-t/i_35_3.t b/libraries/mcpp/test-t/i_35_3.t new file mode 100644 index 000000000..90ee3ef7f --- /dev/null +++ b/libraries/mcpp/test-t/i_35_3.t @@ -0,0 +1,8 @@ +/* i_35_3.t: Multi-character wide character constant. */ + +/* In ASCII character set. */ +/* 35.3: */ +#if (L'ab' != L'\x61\x62') || (L'ab' == 'ab') + Bad handling of multi-character wide character constant. +#endif + diff --git a/libraries/mcpp/test-t/i_mbident.t b/libraries/mcpp/test-t/i_mbident.t new file mode 100644 index 000000000..5e0e6df58 --- /dev/null +++ b/libraries/mcpp/test-t/i_mbident.t @@ -0,0 +1,17 @@ +/* i_mbident.t: Multi-byte characters in identifier and pp-number. */ + +/* Multi-byte characters in identifier. */ +#define ޥ +#define ؿͥޥ(1, 2) 1 ## 2 +/* ; */ + ޥ; +/* ̾; */ + ؿͥޥ(, ̾); + +/* Multi-byte character in pp-number. */ +#define mkname( a) a ## 1 +#define mkstr( a) xmkstr( a) +#define xmkstr( a) # a +/* "abc1" */ + char * mkstr( mkname( abc)); + diff --git a/libraries/mcpp/test-t/ifdef15.h b/libraries/mcpp/test-t/ifdef15.h new file mode 100644 index 000000000..9f457bfaa --- /dev/null +++ b/libraries/mcpp/test-t/ifdef15.h @@ -0,0 +1,50 @@ +/* ifdef15.h */ + +#ifdef X01 +#else +#ifdef X02 +#else +#ifdef X03 +#else +#ifdef X04 +#else +#ifdef X05 +#else +#ifdef X06 +#else +#ifdef X07 +#else +#ifdef X08 +#else +#ifdef X09 +#else +#ifdef X0A +#else +#ifdef X0B +#else +#ifdef X0C +#else +#ifdef X0D +#else +#ifdef X0E +#else +#ifdef X0F + ifdef_nest = 0x0f; +#else +#include "ifdef31.h" +#endif /* X0F */ +#endif /* X0E */ +#endif /* X0D */ +#endif /* X0C */ +#endif /* X0B */ +#endif /* X0A */ +#endif /* X09 */ +#endif /* X08 */ +#endif /* X07 */ +#endif /* X06 */ +#endif /* X05 */ +#endif /* X04 */ +#endif /* X03 */ +#endif /* X02 */ +#endif /* X01 */ + diff --git a/libraries/mcpp/test-t/ifdef31.h b/libraries/mcpp/test-t/ifdef31.h new file mode 100644 index 000000000..9923fbbc5 --- /dev/null +++ b/libraries/mcpp/test-t/ifdef31.h @@ -0,0 +1,52 @@ +/* ifdef31.h */ + +#ifdef X10 +#else +#ifdef X11 +#else +#ifdef X12 +#else +#ifdef X13 +#else +#ifdef X14 +#else +#ifdef X15 +#else +#ifdef X16 +#else +#ifdef X17 +#else +#ifdef X18 +#else +#ifdef X19 +#else +#ifdef X1A +#else +#ifdef X1B +#else +#ifdef X1C +#else +#ifdef X1D +#else +#ifdef X1E +#else +#ifdef X1F + ifdef_nest = 0x1f; +#else +#include "ifdef63.h" +#endif /* X1F */ +#endif /* X1E */ +#endif /* X1D */ +#endif /* X1C */ +#endif /* X1B */ +#endif /* X1A */ +#endif /* X19 */ +#endif /* X18 */ +#endif /* X17 */ +#endif /* X16 */ +#endif /* X15 */ +#endif /* X14 */ +#endif /* X13 */ +#endif /* X12 */ +#endif /* X11 */ +#endif /* X10 */ diff --git a/libraries/mcpp/test-t/ifdef63.h b/libraries/mcpp/test-t/ifdef63.h new file mode 100644 index 000000000..85aac0e6b --- /dev/null +++ b/libraries/mcpp/test-t/ifdef63.h @@ -0,0 +1,99 @@ +/* ifdef63.h */ + +#ifdef X20 +#else +#ifdef X21 +#else +#ifdef X22 +#else +#ifdef X23 +#else +#ifdef X24 +#else +#ifdef X25 +#else +#ifdef X26 +#else +#ifdef X27 +#else +#ifdef X28 +#else +#ifdef X29 +#else +#ifdef X2A +#else +#ifdef X2B +#else +#ifdef X2C +#else +#ifdef X2D +#else +#ifdef X2E +#else +#ifdef X2F +#else +#ifdef X30 +#else +#ifdef X31 +#else +#ifdef X32 +#else +#ifdef X33 +#else +#ifdef X34 +#else +#ifdef X35 +#else +#ifdef X36 +#else +#ifdef X37 +#else +#ifdef X38 +#else +#ifdef X39 +#else +#ifdef X3A +#else +#ifdef X3B +#else +#ifdef X3C +#else +#ifdef X3D +#else +#ifdef X3E +#else +#ifdef X3F + ifdef_nest = 0x3f; +#endif /* X3F */ +#endif /* X3E */ +#endif /* X3D */ +#endif /* X3C */ +#endif /* X3B */ +#endif /* X3A */ +#endif /* X39 */ +#endif /* X38 */ +#endif /* X37 */ +#endif /* X36 */ +#endif /* X35 */ +#endif /* X34 */ +#endif /* X33 */ +#endif /* X32 */ +#endif /* X31 */ +#endif /* X30 */ +#endif /* X2F */ +#endif /* X2E */ +#endif /* X2D */ +#endif /* X2C */ +#endif /* X2B */ +#endif /* X2A */ +#endif /* X29 */ +#endif /* X28 */ +#endif /* X27 */ +#endif /* X26 */ +#endif /* X25 */ +#endif /* X24 */ +#endif /* X23 */ +#endif /* X22 */ +#endif /* X21 */ +#endif /* X20 */ + diff --git a/libraries/mcpp/test-t/line.h b/libraries/mcpp/test-t/line.h new file mode 100644 index 000000000..4ebdafd33 --- /dev/null +++ b/libraries/mcpp/test-t/line.h @@ -0,0 +1,3 @@ +/* line.h */ + + __LINE__; __FILE__; diff --git a/libraries/mcpp/test-t/long4095.h b/libraries/mcpp/test-t/long4095.h new file mode 100644 index 000000000..294b304b9 --- /dev/null +++ b/libraries/mcpp/test-t/long4095.h @@ -0,0 +1,166 @@ +/* long4095.c: logical source line of 4095 bytes long. */ + +typedef int wchar_t; \ +typedef struct { \ +rune_t min; \ +rune_t max; \ +rune_t map; \ +unsigned long *types; \ +} _RuneEntry; \ + \ +typedef struct { \ +int nranges; \ +_RuneEntry *ranges; \ +} _RuneRange; \ + \ +typedef struct { \ +char magic[8]; \ +char encoding[32]; \ + \ +rune_t (*sgetrune) \ + (const char *, unsigned int, char const **) ; \ +int (*sputrune) \ + (rune_t, char *, unsigned int, char **) ; \ +rune_t invalid_rune; \ + \ +unsigned long runetype[ (1 <<8 ) ]; \ +rune_t maplower[ (1 <<8 ) ]; \ +rune_t mapupper[ (1 <<8 ) ]; \ +_RuneRange runetype_ext; \ +_RuneRange maplower_ext; \ +_RuneRange mapupper_ext; \ + \ +void *variable; \ +int variable_len; \ +} _RuneLocale; \ + \ + \ + \ +extern _RuneLocale _DefaultRuneLocale; \ +extern _RuneLocale *_CurrentRuneLocale; \ + \ +unsigned long ___runetype ( int ) ; \ + int ___tolower ( int ) ; \ + int ___toupper ( int ) ; \ + \ + \ +int __istype ( int , unsigned long) ; \ +int __isctype ( int , unsigned long) ; \ + int toupper ( int ) ; \ + int tolower ( int ) ; \ + \ +extern int errno; \ + \ +void *memchr (const void *, int, size_t) ; \ +int memcmp (const void *, const void *, size_t) ; \ +void *memcpy (void *, const void *, size_t) ; \ +void *memmove (void *, const void *, size_t) ; \ +void *memset (void *, int, size_t) ; \ +char *strcat (char *, const char *) ; \ +char *strchr (const char *, int) ; \ +int strcmp (const char *, const char *) ; \ +int strcoll (const char *, const char *) ; \ +char *strcpy (char *, const char *) ; \ +size_t strcspn (const char *, const char *) ; \ +char *strerror (int) ; \ +size_t strlen (const char *) ; \ +char *strncat (char *, const char *, size_t) ; \ +int strncmp (const char *, const char *, size_t) ; \ +char *strncpy (char *, const char *, size_t) ; \ +char *strpbrk (const char *, const char *) ; \ +char *strrchr (const char *, int) ; \ +size_t strspn (const char *, const char *) ; \ +char *strstr (const char *, const char *) ; \ +char *strtok (char *, const char *) ; \ +size_t strxfrm (char *, const char *, size_t) ; \ + \ + \ + \ +int bcmp (const void *, const void *, size_t) ; \ +void bcopy (const void *, void *, size_t) ; \ +void bzero (void *, size_t) ; \ +int ffs (int) ; \ +char *index (const char *, int) ; \ +void *memccpy (void *, const void *, int, size_t) ; \ +char *rindex (const char *, int) ; \ +int strcasecmp (const char *, const char *) ; \ +char *strdup (const char *) ; \ +void strmode (int, char *) ; \ +int strncasecmp (const char *, const char *, size_t) ; \ +char *strsep (char **, const char *) ; \ +void swab (const void *, void *, size_t) ; \ + \ + \ +typedef struct { \ +int quot; \ +int rem; \ +} div_t; \ + \ +typedef struct { \ +long quot; \ +long rem; \ +} ldiv_t; \ +extern int __mb_cur_max; \ + \ + \ + void \ +abort (void) ; \ + int \ +abs (int) ; \ +int atexit (void (*)(void)) ; \ +double atof (const char *) ; \ +int atoi (const char *) ; \ +long atol (const char *) ; \ +void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +void *calloc (size_t, size_t) ; \ + div_t \ +div (int, int) ; \ + void \ +exit (int) ; \ +void free (void *) ; \ +char *getenv (const char *) ; \ + long \ +labs (long) ; \ + ldiv_t \ +ldiv (long, long) ; \ +void *malloc (size_t) ; \ +void qsort (void *, size_t, size_t, int (*)(const void *, const void *)) ; \ +int rand (void) ; \ +void *realloc (void *, size_t) ; \ +void srand (unsigned) ; \ +double strtod (const char *, char **) ; \ +long strtol (const char *, char **, int) ; \ +unsigned long \ +strtoul (const char *, char **, int) ; \ +int system (const char *) ; \ + \ + \ +int mblen (const char *, size_t) ; \ +size_t mbstowcs (wchar_t *, const char *, size_t) ; \ +int wctomb (char *, wchar_t) ; \ +int mbtowc (wchar_t *, const char *, size_t) ; \ +size_t wcstombs (char *, const wchar_t *, size_t) ; \ + \ + \ +int putenv (const char *) ; \ +int setenv (const char *, const char *, int) ; \ + \ + \ + \ +double drand48 (void) ; \ +double erand48 (unsigned short[3]) ; \ +long lrand48 (void) ; \ +long nrand48 (unsigned short[3]) ; \ +long mrand48 (void) ; \ +long jrand48 (unsigned short[3]) ; \ +void srand48 (long) ; \ +unsigned short *seed48 (unsigned short[3]) ; \ +void lcong48 (unsigned short[7]) ; \ + \ +void *alloca (size_t) ; \ + \ +char *getbsize (int *, long *) ; \ +char *cgetcap (char *, char *, int) ; \ +int cgetclose (void) ; \ + \ + diff --git a/libraries/mcpp/test-t/m4095.h b/libraries/mcpp/test-t/m4095.h new file mode 100644 index 000000000..4ba3a025e --- /dev/null +++ b/libraries/mcpp/test-t/m4095.h @@ -0,0 +1,4101 @@ +/* m4095.h */ +#define AAA +#define AAB +#define AAC +#define AAD +#define AAE +#define AAF +#define AAG +#define AAH +#define AAI +#define AAJ +#define AAK +#define AAL +#define AAM +#define AAN +#define AAO +#define AAP +#define AAQ +#define AAR +#define AAS +#define AAT +#define AAU +#define AAV +#define AAW +#define AAX +#define AAY +#define AAZ +#define ABA +#define ABB +#define ABC +#define ABD +#define ABE +#define ABF +#define ABG +#define ABH +#define ABI +#define ABJ +#define ABK +#define ABL +#define ABM +#define ABN +#define ABO +#define ABP +#define ABQ +#define ABR +#define ABS +#define ABT +#define ABU +#define ABV +#define ABW +#define ABX +#define ABY +#define ABZ +#define ACA +#define ACB +#define ACC +#define ACD +#define ACE +#define ACF +#define ACG +#define ACH +#define ACI +#define ACJ +#define ACK +#define ACL +#define ACM +#define ACN +#define ACO +#define ACP +#define ACQ +#define ACR +#define ACS +#define ACT +#define ACU +#define ACV +#define ACW +#define ACX +#define ACY +#define ACZ +#define ADA +#define ADB +#define ADC +#define ADD +#define ADE +#define ADF +#define ADG +#define ADH +#define ADI +#define ADJ +#define ADK +#define ADL +#define ADM +#define ADN +#define ADO +#define ADP +#define ADQ +#define ADR +#define ADS +#define ADT +#define ADU +#define ADV +#define ADW +#define ADX +#define ADY +#define ADZ +#define AEA +#define AEB +#define AEC +#define AED +#define AEE +#define AEF +#define AEG +#define AEH +#define AEI +#define AEJ +#define AEK +#define AEL +#define AEM +#define AEN +#define AEO +#define AEP +#define AEQ +#define AER +#define AES +#define AET +#define AEU +#define AEV +#define AEW +#define AEX +#define AEY +#define AEZ +#define AFA +#define AFB +#define AFC +#define AFD +#define AFE +#define AFF +#define AFG +#define AFH +#define AFI +#define AFJ +#define AFK +#define AFL +#define AFM +#define AFN +#define AFO +#define AFP +#define AFQ +#define AFR +#define AFS +#define AFT +#define AFU +#define AFV +#define AFW +#define AFX +#define AFY +#define AFZ +#define AGA +#define AGB +#define AGC +#define AGD +#define AGE +#define AGF +#define AGG +#define AGH +#define AGI +#define AGJ +#define AGK +#define AGL +#define AGM +#define AGN +#define AGO +#define AGP +#define AGQ +#define AGR +#define AGS +#define AGT +#define AGU +#define AGV +#define AGW +#define AGX +#define AGY +#define AGZ +#define AHA +#define AHB +#define AHC +#define AHD +#define AHE +#define AHF +#define AHG +#define AHH +#define AHI +#define AHJ +#define AHK +#define AHL +#define AHM +#define AHN +#define AHO +#define AHP +#define AHQ +#define AHR +#define AHS +#define AHT +#define AHU +#define AHV +#define AHW +#define AHX +#define AHY +#define AHZ +#define AIA +#define AIB +#define AIC +#define AID +#define AIE +#define AIF +#define AIG +#define AIH +#define AII +#define AIJ +#define AIK +#define AIL +#define AIM +#define AIN +#define AIO +#define AIP +#define AIQ +#define AIR +#define AIS +#define AIT +#define AIU +#define AIV +#define AIW +#define AIX +#define AIY +#define AIZ +#define AJA +#define AJB +#define AJC +#define AJD +#define AJE +#define AJF +#define AJG +#define AJH +#define AJI +#define AJJ +#define AJK +#define AJL +#define AJM +#define AJN +#define AJO +#define AJP +#define AJQ +#define AJR +#define AJS +#define AJT +#define AJU +#define AJV +#define AJW +#define AJX +#define AJY +#define AJZ +#define AKA +#define AKB +#define AKC +#define AKD +#define AKE +#define AKF +#define AKG +#define AKH +#define AKI +#define AKJ +#define AKK +#define AKL +#define AKM +#define AKN +#define AKO +#define AKP +#define AKQ +#define AKR +#define AKS +#define AKT +#define AKU +#define AKV +#define AKW +#define AKX +#define AKY +#define AKZ +#define ALA +#define ALB +#define ALC +#define ALD +#define ALE +#define ALF +#define ALG +#define ALH +#define ALI +#define ALJ +#define ALK +#define ALL +#define ALM +#define ALN +#define ALO +#define ALP +#define ALQ +#define ALR +#define ALS +#define ALT +#define ALU +#define ALV +#define ALW +#define ALX +#define ALY +#define ALZ +#define AMA +#define AMB +#define AMC +#define AMD +#define AME +#define AMF +#define AMG +#define AMH +#define AMI +#define AMJ +#define AMK +#define AML +#define AMM +#define AMN +#define AMO +#define AMP +#define AMQ +#define AMR +#define AMS +#define AMT +#define AMU +#define AMV +#define AMW +#define AMX +#define AMY +#define AMZ +#define ANA +#define ANB +#define ANC +#define AND +#define ANE +#define ANF +#define ANG +#define ANH +#define ANI +#define ANJ +#define ANK +#define ANL +#define ANM +#define ANN +#define ANO +#define ANP +#define ANQ +#define ANR +#define ANS +#define ANT +#define ANU +#define ANV +#define ANW +#define ANX +#define ANY +#define ANZ +#define AOA +#define AOB +#define AOC +#define AOD +#define AOE +#define AOF +#define AOG +#define AOH +#define AOI +#define AOJ +#define AOK +#define AOL +#define AOM +#define AON +#define AOO +#define AOP +#define AOQ +#define AOR +#define AOS +#define AOT +#define AOU +#define AOV +#define AOW +#define AOX +#define AOY +#define AOZ +#define APA +#define APB +#define APC +#define APD +#define APE +#define APF +#define APG +#define APH +#define API +#define APJ +#define APK +#define APL +#define APM +#define APN +#define APO +#define APP +#define APQ +#define APR +#define APS +#define APT +#define APU +#define APV +#define APW +#define APX +#define APY +#define APZ +#define AQA +#define AQB +#define AQC +#define AQD +#define AQE +#define AQF +#define AQG +#define AQH +#define AQI +#define AQJ +#define AQK +#define AQL +#define AQM +#define AQN +#define AQO +#define AQP +#define AQQ +#define AQR +#define AQS +#define AQT +#define AQU +#define AQV +#define AQW +#define AQX +#define AQY +#define AQZ +#define ARA +#define ARB +#define ARC +#define ARD +#define ARE +#define ARF +#define ARG +#define ARH +#define ARI +#define ARJ +#define ARK +#define ARL +#define ARM +#define ARN +#define ARO +#define ARP +#define ARQ +#define ARR +#define ARS +#define ART +#define ARU +#define ARV +#define ARW +#define ARX +#define ARY +#define ARZ +#define ASA +#define ASB +#define ASC +#define ASD +#define ASE +#define ASF +#define ASG +#define ASH +#define ASI +#define ASJ +#define ASK +#define ASL +#define ASM +#define ASN +#define ASO +#define ASP +#define ASQ +#define ASR +#define ASS +#define AST +#define ASU +#define ASV +#define ASW +#define ASX +#define ASY +#define ASZ +#define ATA +#define ATB +#define ATC +#define ATD +#define ATE +#define ATF +#define ATG +#define ATH +#define ATI +#define ATJ +#define ATK +#define ATL +#define ATM +#define ATN +#define ATO +#define ATP +#define ATQ +#define ATR +#define ATS +#define ATT +#define ATU +#define ATV +#define ATW +#define ATX +#define ATY +#define ATZ +#define AUA +#define AUB +#define AUC +#define AUD +#define AUE +#define AUF +#define AUG +#define AUH +#define AUI +#define AUJ +#define AUK +#define AUL +#define AUM +#define AUN +#define AUO +#define AUP +#define AUQ +#define AUR +#define AUS +#define AUT +#define AUU +#define AUV +#define AUW +#define AUX +#define AUY +#define AUZ +#define AVA +#define AVB +#define AVC +#define AVD +#define AVE +#define AVF +#define AVG +#define AVH +#define AVI +#define AVJ +#define AVK +#define AVL +#define AVM +#define AVN +#define AVO +#define AVP +#define AVQ +#define AVR +#define AVS +#define AVT +#define AVU +#define AVV +#define AVW +#define AVX +#define AVY +#define AVZ +#define AWA +#define AWB +#define AWC +#define AWD +#define AWE +#define AWF +#define AWG +#define AWH +#define AWI +#define AWJ +#define AWK +#define AWL +#define AWM +#define AWN +#define AWO +#define AWP +#define AWQ +#define AWR +#define AWS +#define AWT +#define AWU +#define AWV +#define AWW +#define AWX +#define AWY +#define AWZ +#define AXA +#define AXB +#define AXC +#define AXD +#define AXE +#define AXF +#define AXG +#define AXH +#define AXI +#define AXJ +#define AXK +#define AXL +#define AXM +#define AXN +#define AXO +#define AXP +#define AXQ +#define AXR +#define AXS +#define AXT +#define AXU +#define AXV +#define AXW +#define AXX +#define AXY +#define AXZ +#define AYA +#define AYB +#define AYC +#define AYD +#define AYE +#define AYF +#define AYG +#define AYH +#define AYI +#define AYJ +#define AYK +#define AYL +#define AYM +#define AYN +#define AYO +#define AYP +#define AYQ +#define AYR +#define AYS +#define AYT +#define AYU +#define AYV +#define AYW +#define AYX +#define AYY +#define AYZ +#define AZA +#define AZB +#define AZC +#define AZD +#define AZE +#define AZF +#define AZG +#define AZH +#define AZI +#define AZJ +#define AZK +#define AZL +#define AZM +#define AZN +#define AZO +#define AZP +#define AZQ +#define AZR +#define AZS +#define AZT +#define AZU +#define AZV +#define AZW +#define AZX +#define AZY +#define AZZ +#define BAA +#define BAB +#define BAC +#define BAD +#define BAE +#define BAF +#define BAG +#define BAH +#define BAI +#define BAJ +#define BAK +#define BAL +#define BAM +#define BAN +#define BAO +#define BAP +#define BAQ +#define BAR +#define BAS +#define BAT +#define BAU +#define BAV +#define BAW +#define BAX +#define BAY +#define BAZ +#define BBA +#define BBB +#define BBC +#define BBD +#define BBE +#define BBF +#define BBG +#define BBH +#define BBI +#define BBJ +#define BBK +#define BBL +#define BBM +#define BBN +#define BBO +#define BBP +#define BBQ +#define BBR +#define BBS +#define BBT +#define BBU +#define BBV +#define BBW +#define BBX +#define BBY +#define BBZ +#define BCA +#define BCB +#define BCC +#define BCD +#define BCE +#define BCF +#define BCG +#define BCH +#define BCI +#define BCJ +#define BCK +#define BCL +#define BCM +#define BCN +#define BCO +#define BCP +#define BCQ +#define BCR +#define BCS +#define BCT +#define BCU +#define BCV +#define BCW +#define BCX +#define BCY +#define BCZ +#define BDA +#define BDB +#define BDC +#define BDD +#define BDE +#define BDF +#define BDG +#define BDH +#define BDI +#define BDJ +#define BDK +#define BDL +#define BDM +#define BDN +#define BDO +#define BDP +#define BDQ +#define BDR +#define BDS +#define BDT +#define BDU +#define BDV +#define BDW +#define BDX +#define BDY +#define BDZ +#define BEA +#define BEB +#define BEC +#define BED +#define BEE +#define BEF +#define BEG +#define BEH +#define BEI +#define BEJ +#define BEK +#define BEL +#define BEM +#define BEN +#define BEO +#define BEP +#define BEQ +#define BER +#define BES +#define BET +#define BEU +#define BEV +#define BEW +#define BEX +#define BEY +#define BEZ +#define BFA +#define BFB +#define BFC +#define BFD +#define BFE +#define BFF +#define BFG +#define BFH +#define BFI +#define BFJ +#define BFK +#define BFL +#define BFM +#define BFN +#define BFO +#define BFP +#define BFQ +#define BFR +#define BFS +#define BFT +#define BFU +#define BFV +#define BFW +#define BFX +#define BFY +#define BFZ +#define BGA +#define BGB +#define BGC +#define BGD +#define BGE +#define BGF +#define BGG +#define BGH +#define BGI +#define BGJ +#define BGK +#define BGL +#define BGM +#define BGN +#define BGO +#define BGP +#define BGQ +#define BGR +#define BGS +#define BGT +#define BGU +#define BGV +#define BGW +#define BGX +#define BGY +#define BGZ +#define BHA +#define BHB +#define BHC +#define BHD +#define BHE +#define BHF +#define BHG +#define BHH +#define BHI +#define BHJ +#define BHK +#define BHL +#define BHM +#define BHN +#define BHO +#define BHP +#define BHQ +#define BHR +#define BHS +#define BHT +#define BHU +#define BHV +#define BHW +#define BHX +#define BHY +#define BHZ +#define BIA +#define BIB +#define BIC +#define BID +#define BIE +#define BIF +#define BIG +#define BIH +#define BII +#define BIJ +#define BIK +#define BIL +#define BIM +#define BIN +#define BIO +#define BIP +#define BIQ +#define BIR +#define BIS +#define BIT +#define BIU +#define BIV +#define BIW +#define BIX +#define BIY +#define BIZ +#define BJA +#define BJB +#define BJC +#define BJD +#define BJE +#define BJF +#define BJG +#define BJH +#define BJI +#define BJJ +#define BJK +#define BJL +#define BJM +#define BJN +#define BJO +#define BJP +#define BJQ +#define BJR +#define BJS +#define BJT +#define BJU +#define BJV +#define BJW +#define BJX +#define BJY +#define BJZ +#define BKA +#define BKB +#define BKC +#define BKD +#define BKE +#define BKF +#define BKG +#define BKH +#define BKI +#define BKJ +#define BKK +#define BKL +#define BKM +#define BKN +#define BKO +#define BKP +#define BKQ +#define BKR +#define BKS +#define BKT +#define BKU +#define BKV +#define BKW +#define BKX +#define BKY +#define BKZ +#define BLA +#define BLB +#define BLC +#define BLD +#define BLE +#define BLF +#define BLG +#define BLH +#define BLI +#define BLJ +#define BLK +#define BLL +#define BLM +#define BLN +#define BLO +#define BLP +#define BLQ +#define BLR +#define BLS +#define BLT +#define BLU +#define BLV +#define BLW +#define BLX +#define BLY +#define BLZ +#define BMA +#define BMB +#define BMC +#define BMD +#define BME +#define BMF +#define BMG +#define BMH +#define BMI +#define BMJ +#define BMK +#define BML +#define BMM +#define BMN +#define BMO +#define BMP +#define BMQ +#define BMR +#define BMS +#define BMT +#define BMU +#define BMV +#define BMW +#define BMX +#define BMY +#define BMZ +#define BNA +#define BNB +#define BNC +#define BND +#define BNE +#define BNF +#define BNG +#define BNH +#define BNI +#define BNJ 0x0400 +#ifndef X0400 +#define BNK +#define BNL +#define BNM +#define BNN +#define BNO +#define BNP +#define BNQ +#define BNR +#define BNS +#define BNT +#define BNU +#define BNV +#define BNW +#define BNX +#define BNY +#define BNZ +#define BOA +#define BOB +#define BOC +#define BOD +#define BOE +#define BOF +#define BOG +#define BOH +#define BOI +#define BOJ +#define BOK +#define BOL +#define BOM +#define BON +#define BOO +#define BOP +#define BOQ +#define BOR +#define BOS +#define BOT +#define BOU +#define BOV +#define BOW +#define BOX +#define BOY +#define BOZ +#define BPA +#define BPB +#define BPC +#define BPD +#define BPE +#define BPF +#define BPG +#define BPH +#define BPI +#define BPJ +#define BPK +#define BPL +#define BPM +#define BPN +#define BPO +#define BPP +#define BPQ +#define BPR +#define BPS +#define BPT +#define BPU +#define BPV +#define BPW +#define BPX +#define BPY +#define BPZ +#define BQA +#define BQB +#define BQC +#define BQD +#define BQE +#define BQF +#define BQG +#define BQH +#define BQI +#define BQJ +#define BQK +#define BQL +#define BQM +#define BQN +#define BQO +#define BQP +#define BQQ +#define BQR +#define BQS +#define BQT +#define BQU +#define BQV +#define BQW +#define BQX +#define BQY +#define BQZ +#define BRA +#define BRB +#define BRC +#define BRD +#define BRE +#define BRF +#define BRG +#define BRH +#define BRI +#define BRJ +#define BRK +#define BRL +#define BRM +#define BRN +#define BRO +#define BRP +#define BRQ +#define BRR +#define BRS +#define BRT +#define BRU +#define BRV +#define BRW +#define BRX +#define BRY +#define BRZ +#define BSA +#define BSB +#define BSC +#define BSD +#define BSE +#define BSF +#define BSG +#define BSH +#define BSI +#define BSJ +#define BSK +#define BSL +#define BSM +#define BSN +#define BSO +#define BSP +#define BSQ +#define BSR +#define BSS +#define BST +#define BSU +#define BSV +#define BSW +#define BSX +#define BSY +#define BSZ +#define BTA +#define BTB +#define BTC +#define BTD +#define BTE +#define BTF +#define BTG +#define BTH +#define BTI +#define BTJ +#define BTK +#define BTL +#define BTM +#define BTN +#define BTO +#define BTP +#define BTQ +#define BTR +#define BTS +#define BTT +#define BTU +#define BTV +#define BTW +#define BTX +#define BTY +#define BTZ +#define BUA +#define BUB +#define BUC +#define BUD +#define BUE +#define BUF +#define BUG +#define BUH +#define BUI +#define BUJ +#define BUK +#define BUL +#define BUM +#define BUN +#define BUO +#define BUP +#define BUQ +#define BUR +#define BUS +#define BUT +#define BUU +#define BUV +#define BUW +#define BUX +#define BUY +#define BUZ +#define BVA +#define BVB +#define BVC +#define BVD +#define BVE +#define BVF +#define BVG +#define BVH +#define BVI +#define BVJ +#define BVK +#define BVL +#define BVM +#define BVN +#define BVO +#define BVP +#define BVQ +#define BVR +#define BVS +#define BVT +#define BVU +#define BVV +#define BVW +#define BVX +#define BVY +#define BVZ +#define BWA +#define BWB +#define BWC +#define BWD +#define BWE +#define BWF +#define BWG +#define BWH +#define BWI +#define BWJ +#define BWK +#define BWL +#define BWM +#define BWN +#define BWO +#define BWP +#define BWQ +#define BWR +#define BWS +#define BWT +#define BWU +#define BWV +#define BWW +#define BWX +#define BWY +#define BWZ +#define BXA +#define BXB +#define BXC +#define BXD +#define BXE +#define BXF +#define BXG +#define BXH +#define BXI +#define BXJ +#define BXK +#define BXL +#define BXM +#define BXN +#define BXO +#define BXP +#define BXQ +#define BXR +#define BXS +#define BXT +#define BXU +#define BXV +#define BXW +#define BXX +#define BXY +#define BXZ +#define BYA +#define BYB +#define BYC +#define BYD +#define BYE +#define BYF +#define BYG +#define BYH +#define BYI +#define BYJ +#define BYK +#define BYL +#define BYM +#define BYN +#define BYO +#define BYP +#define BYQ +#define BYR +#define BYS +#define BYT +#define BYU +#define BYV +#define BYW +#define BYX +#define BYY +#define BYZ +#define BZA +#define BZB +#define BZC +#define BZD +#define BZE +#define BZF +#define BZG +#define BZH +#define BZI +#define BZJ +#define BZK +#define BZL +#define BZM +#define BZN +#define BZO +#define BZP +#define BZQ +#define BZR +#define BZS +#define BZT +#define BZU +#define BZV +#define BZW +#define BZX +#define BZY +#define BZZ +#define CAA +#define CAB +#define CAC +#define CAD +#define CAE +#define CAF +#define CAG +#define CAH +#define CAI +#define CAJ +#define CAK +#define CAL +#define CAM +#define CAN +#define CAO +#define CAP +#define CAQ +#define CAR +#define CAS +#define CAT +#define CAU +#define CAV +#define CAW +#define CAX +#define CAY +#define CAZ +#define CBA +#define CBB +#define CBC +#define CBD +#define CBE +#define CBF +#define CBG +#define CBH +#define CBI +#define CBJ +#define CBK +#define CBL +#define CBM +#define CBN +#define CBO +#define CBP +#define CBQ +#define CBR +#define CBS +#define CBT +#define CBU +#define CBV +#define CBW +#define CBX +#define CBY +#define CBZ +#define CCA +#define CCB +#define CCC +#define CCD +#define CCE +#define CCF +#define CCG +#define CCH +#define CCI +#define CCJ +#define CCK +#define CCL +#define CCM +#define CCN +#define CCO +#define CCP +#define CCQ +#define CCR +#define CCS +#define CCT +#define CCU +#define CCV +#define CCW +#define CCX +#define CCY +#define CCZ +#define CDA +#define CDB +#define CDC +#define CDD +#define CDE +#define CDF +#define CDG +#define CDH +#define CDI +#define CDJ +#define CDK +#define CDL +#define CDM +#define CDN +#define CDO +#define CDP +#define CDQ +#define CDR +#define CDS +#define CDT +#define CDU +#define CDV +#define CDW +#define CDX +#define CDY +#define CDZ +#define CEA +#define CEB +#define CEC +#define CED +#define CEE +#define CEF +#define CEG +#define CEH +#define CEI +#define CEJ +#define CEK +#define CEL +#define CEM +#define CEN +#define CEO +#define CEP +#define CEQ +#define CER +#define CES +#define CET +#define CEU +#define CEV +#define CEW +#define CEX +#define CEY +#define CEZ +#define CFA +#define CFB +#define CFC +#define CFD +#define CFE +#define CFF +#define CFG +#define CFH +#define CFI +#define CFJ +#define CFK +#define CFL +#define CFM +#define CFN +#define CFO +#define CFP +#define CFQ +#define CFR +#define CFS +#define CFT +#define CFU +#define CFV +#define CFW +#define CFX +#define CFY +#define CFZ +#define CGA +#define CGB +#define CGC +#define CGD +#define CGE +#define CGF +#define CGG +#define CGH +#define CGI +#define CGJ +#define CGK +#define CGL +#define CGM +#define CGN +#define CGO +#define CGP +#define CGQ +#define CGR +#define CGS +#define CGT +#define CGU +#define CGV +#define CGW +#define CGX +#define CGY +#define CGZ +#define CHA +#define CHB +#define CHC +#define CHD +#define CHE +#define CHF +#define CHG +#define CHH +#define CHI +#define CHJ +#define CHK +#define CHL +#define CHM +#define CHN +#define CHO +#define CHP +#define CHQ +#define CHR +#define CHS +#define CHT +#define CHU +#define CHV +#define CHW +#define CHX +#define CHY +#define CHZ +#define CIA +#define CIB +#define CIC +#define CID +#define CIE +#define CIF +#define CIG +#define CIH +#define CII +#define CIJ +#define CIK +#define CIL +#define CIM +#define CIN +#define CIO +#define CIP +#define CIQ +#define CIR +#define CIS +#define CIT +#define CIU +#define CIV +#define CIW +#define CIX +#define CIY +#define CIZ +#define CJA +#define CJB +#define CJC +#define CJD +#define CJE +#define CJF +#define CJG +#define CJH +#define CJI +#define CJJ +#define CJK +#define CJL +#define CJM +#define CJN +#define CJO +#define CJP +#define CJQ +#define CJR +#define CJS +#define CJT +#define CJU +#define CJV +#define CJW +#define CJX +#define CJY +#define CJZ +#define CKA +#define CKB +#define CKC +#define CKD +#define CKE +#define CKF +#define CKG +#define CKH +#define CKI +#define CKJ +#define CKK +#define CKL +#define CKM +#define CKN +#define CKO +#define CKP +#define CKQ +#define CKR +#define CKS +#define CKT +#define CKU +#define CKV +#define CKW +#define CKX +#define CKY +#define CKZ +#define CLA +#define CLB +#define CLC +#define CLD +#define CLE +#define CLF +#define CLG +#define CLH +#define CLI +#define CLJ +#define CLK +#define CLL +#define CLM +#define CLN +#define CLO +#define CLP +#define CLQ +#define CLR +#define CLS +#define CLT +#define CLU +#define CLV +#define CLW +#define CLX +#define CLY +#define CLZ +#define CMA +#define CMB +#define CMC +#define CMD +#define CME +#define CMF +#define CMG +#define CMH +#define CMI +#define CMJ +#define CMK +#define CML +#define CMM +#define CMN +#define CMO +#define CMP +#define CMQ +#define CMR +#define CMS +#define CMT +#define CMU +#define CMV +#define CMW +#define CMX +#define CMY +#define CMZ +#define CNA +#define CNB +#define CNC +#define CND +#define CNE +#define CNF +#define CNG +#define CNH +#define CNI +#define CNJ +#define CNK +#define CNL +#define CNM +#define CNN +#define CNO +#define CNP +#define CNQ +#define CNR +#define CNS +#define CNT +#define CNU +#define CNV +#define CNW +#define CNX +#define CNY +#define CNZ +#define COA +#define COB +#define COC +#define COD +#define COE +#define COF +#define COG +#define COH +#define COI +#define COJ +#define COK +#define COL +#define COM +#define CON +#define COO +#define COP +#define COQ +#define COR +#define COS +#define COT +#define COU +#define COV +#define COW +#define COX +#define COY +#define COZ +#define CPA +#define CPB +#define CPC +#define CPD +#define CPE +#define CPF +#define CPG +#define CPH +#define CPI +#define CPJ +#define CPK +#define CPL +#define CPM +#define CPN +#define CPO +#define CPP +#define CPQ +#define CPR +#define CPS +#define CPT +#define CPU +#define CPV +#define CPW +#define CPX +#define CPY +#define CPZ +#define CQA +#define CQB +#define CQC +#define CQD +#define CQE +#define CQF +#define CQG +#define CQH +#define CQI +#define CQJ +#define CQK +#define CQL +#define CQM +#define CQN +#define CQO +#define CQP +#define CQQ +#define CQR +#define CQS +#define CQT +#define CQU +#define CQV +#define CQW +#define CQX +#define CQY +#define CQZ +#define CRA +#define CRB +#define CRC +#define CRD +#define CRE +#define CRF +#define CRG +#define CRH +#define CRI +#define CRJ +#define CRK +#define CRL +#define CRM +#define CRN +#define CRO +#define CRP +#define CRQ +#define CRR +#define CRS +#define CRT +#define CRU +#define CRV +#define CRW +#define CRX +#define CRY +#define CRZ +#define CSA +#define CSB +#define CSC +#define CSD +#define CSE +#define CSF +#define CSG +#define CSH +#define CSI +#define CSJ +#define CSK +#define CSL +#define CSM +#define CSN +#define CSO +#define CSP +#define CSQ +#define CSR +#define CSS +#define CST +#define CSU +#define CSV +#define CSW +#define CSX +#define CSY +#define CSZ +#define CTA +#define CTB +#define CTC +#define CTD +#define CTE +#define CTF +#define CTG +#define CTH +#define CTI +#define CTJ +#define CTK +#define CTL +#define CTM +#define CTN +#define CTO +#define CTP +#define CTQ +#define CTR +#define CTS +#define CTT +#define CTU +#define CTV +#define CTW +#define CTX +#define CTY +#define CTZ +#define CUA +#define CUB +#define CUC +#define CUD +#define CUE +#define CUF +#define CUG +#define CUH +#define CUI +#define CUJ +#define CUK +#define CUL +#define CUM +#define CUN +#define CUO +#define CUP +#define CUQ +#define CUR +#define CUS +#define CUT +#define CUU +#define CUV +#define CUW +#define CUX +#define CUY +#define CUZ +#define CVA +#define CVB +#define CVC +#define CVD +#define CVE +#define CVF +#define CVG +#define CVH +#define CVI +#define CVJ +#define CVK +#define CVL +#define CVM +#define CVN +#define CVO +#define CVP +#define CVQ +#define CVR +#define CVS +#define CVT +#define CVU +#define CVV +#define CVW +#define CVX +#define CVY +#define CVZ +#define CWA +#define CWB +#define CWC +#define CWD +#define CWE +#define CWF +#define CWG +#define CWH +#define CWI +#define CWJ +#define CWK +#define CWL +#define CWM +#define CWN +#define CWO +#define CWP +#define CWQ +#define CWR +#define CWS +#define CWT +#define CWU +#define CWV +#define CWW +#define CWX +#define CWY +#define CWZ +#define CXA +#define CXB +#define CXC +#define CXD +#define CXE +#define CXF +#define CXG +#define CXH +#define CXI +#define CXJ +#define CXK +#define CXL +#define CXM +#define CXN +#define CXO +#define CXP +#define CXQ +#define CXR +#define CXS +#define CXT +#define CXU +#define CXV +#define CXW +#define CXX +#define CXY +#define CXZ +#define CYA +#define CYB +#define CYC +#define CYD +#define CYE +#define CYF +#define CYG +#define CYH +#define CYI +#define CYJ +#define CYK +#define CYL +#define CYM +#define CYN +#define CYO +#define CYP +#define CYQ +#define CYR +#define CYS +#define CYT +#define CYU +#define CYV +#define CYW +#define CYX +#define CYY +#define CYZ +#define CZA +#define CZB +#define CZC +#define CZD +#define CZE +#define CZF +#define CZG +#define CZH +#define CZI +#define CZJ +#define CZK +#define CZL +#define CZM +#define CZN +#define CZO +#define CZP +#define CZQ +#define CZR +#define CZS +#define CZT +#define CZU +#define CZV +#define CZW +#define CZX +#define CZY +#define CZZ +#define DAA +#define DAB +#define DAC +#define DAD +#define DAE +#define DAF +#define DAG +#define DAH +#define DAI +#define DAJ +#define DAK +#define DAL +#define DAM +#define DAN +#define DAO +#define DAP +#define DAQ +#define DAR +#define DAS 0x07ff +#ifndef X07FF +#define DAT +#define DAU +#define DAV +#define DAW +#define DAX +#define DAY +#define DAZ +#define DBA +#define DBB +#define DBC +#define DBD +#define DBE +#define DBF +#define DBG +#define DBH +#define DBI +#define DBJ +#define DBK +#define DBL +#define DBM +#define DBN +#define DBO +#define DBP +#define DBQ +#define DBR +#define DBS +#define DBT +#define DBU +#define DBV +#define DBW +#define DBX +#define DBY +#define DBZ +#define DCA +#define DCB +#define DCC +#define DCD +#define DCE +#define DCF +#define DCG +#define DCH +#define DCI +#define DCJ +#define DCK +#define DCL +#define DCM +#define DCN +#define DCO +#define DCP +#define DCQ +#define DCR +#define DCS +#define DCT +#define DCU +#define DCV +#define DCW +#define DCX +#define DCY +#define DCZ +#define DDA +#define DDB +#define DDC +#define DDD +#define DDE +#define DDF +#define DDG +#define DDH +#define DDI +#define DDJ +#define DDK +#define DDL +#define DDM +#define DDN +#define DDO +#define DDP +#define DDQ +#define DDR +#define DDS +#define DDT +#define DDU +#define DDV +#define DDW +#define DDX +#define DDY +#define DDZ +#define DEA +#define DEB +#define DEC +#define DED +#define DEE +#define DEF +#define DEG +#define DEH +#define DEI +#define DEJ +#define DEK +#define DEL +#define DEM +#define DEN +#define DEO +#define DEP +#define DEQ +#define DER +#define DES +#define DET +#define DEU +#define DEV +#define DEW +#define DEX +#define DEY +#define DEZ +#define DFA +#define DFB +#define DFC +#define DFD +#define DFE +#define DFF +#define DFG +#define DFH +#define DFI +#define DFJ +#define DFK +#define DFL +#define DFM +#define DFN +#define DFO +#define DFP +#define DFQ +#define DFR +#define DFS +#define DFT +#define DFU +#define DFV +#define DFW +#define DFX +#define DFY +#define DFZ +#define DGA +#define DGB +#define DGC +#define DGD +#define DGE +#define DGF +#define DGG +#define DGH +#define DGI +#define DGJ +#define DGK +#define DGL +#define DGM +#define DGN +#define DGO +#define DGP +#define DGQ +#define DGR +#define DGS +#define DGT +#define DGU +#define DGV +#define DGW +#define DGX +#define DGY +#define DGZ +#define DHA +#define DHB +#define DHC +#define DHD +#define DHE +#define DHF +#define DHG +#define DHH +#define DHI +#define DHJ +#define DHK +#define DHL +#define DHM +#define DHN +#define DHO +#define DHP +#define DHQ +#define DHR +#define DHS +#define DHT +#define DHU +#define DHV +#define DHW +#define DHX +#define DHY +#define DHZ +#define DIA +#define DIB +#define DIC +#define DID +#define DIE +#define DIF +#define DIG +#define DIH +#define DII +#define DIJ +#define DIK +#define DIL +#define DIM +#define DIN +#define DIO +#define DIP +#define DIQ +#define DIR +#define DIS +#define DIT +#define DIU +#define DIV +#define DIW +#define DIX +#define DIY +#define DIZ +#define DJA +#define DJB +#define DJC +#define DJD +#define DJE +#define DJF +#define DJG +#define DJH +#define DJI +#define DJJ +#define DJK +#define DJL +#define DJM +#define DJN +#define DJO +#define DJP +#define DJQ +#define DJR +#define DJS +#define DJT +#define DJU +#define DJV +#define DJW +#define DJX +#define DJY +#define DJZ +#define DKA +#define DKB +#define DKC +#define DKD +#define DKE +#define DKF +#define DKG +#define DKH +#define DKI +#define DKJ +#define DKK +#define DKL +#define DKM +#define DKN +#define DKO +#define DKP +#define DKQ +#define DKR +#define DKS +#define DKT +#define DKU +#define DKV +#define DKW +#define DKX +#define DKY +#define DKZ +#define DLA +#define DLB +#define DLC +#define DLD +#define DLE +#define DLF +#define DLG +#define DLH +#define DLI +#define DLJ +#define DLK +#define DLL +#define DLM +#define DLN +#define DLO +#define DLP +#define DLQ +#define DLR +#define DLS +#define DLT +#define DLU +#define DLV +#define DLW +#define DLX +#define DLY +#define DLZ +#define DMA +#define DMB +#define DMC +#define DMD +#define DME +#define DMF +#define DMG +#define DMH +#define DMI +#define DMJ +#define DMK +#define DML +#define DMM +#define DMN +#define DMO +#define DMP +#define DMQ +#define DMR +#define DMS +#define DMT +#define DMU +#define DMV +#define DMW +#define DMX +#define DMY +#define DMZ +#define DNA +#define DNB +#define DNC +#define DND +#define DNE +#define DNF +#define DNG +#define DNH +#define DNI +#define DNJ +#define DNK +#define DNL +#define DNM +#define DNN +#define DNO +#define DNP +#define DNQ +#define DNR +#define DNS +#define DNT +#define DNU +#define DNV +#define DNW +#define DNX +#define DNY +#define DNZ +#define DOA +#define DOB +#define DOC +#define DOD +#define DOE +#define DOF +#define DOG +#define DOH +#define DOI +#define DOJ +#define DOK +#define DOL +#define DOM +#define DON +#define DOO +#define DOP +#define DOQ +#define DOR +#define DOS +#define DOT +#define DOU +#define DOV +#define DOW +#define DOX +#define DOY +#define DOZ +#define DPA +#define DPB +#define DPC +#define DPD +#define DPE +#define DPF +#define DPG +#define DPH +#define DPI +#define DPJ +#define DPK +#define DPL +#define DPM +#define DPN +#define DPO +#define DPP +#define DPQ +#define DPR +#define DPS +#define DPT +#define DPU +#define DPV +#define DPW +#define DPX +#define DPY +#define DPZ +#define DQA +#define DQB +#define DQC +#define DQD +#define DQE +#define DQF +#define DQG +#define DQH +#define DQI +#define DQJ +#define DQK +#define DQL +#define DQM +#define DQN +#define DQO +#define DQP +#define DQQ +#define DQR +#define DQS +#define DQT +#define DQU +#define DQV +#define DQW +#define DQX +#define DQY +#define DQZ +#define DRA +#define DRB +#define DRC +#define DRD +#define DRE +#define DRF +#define DRG +#define DRH +#define DRI +#define DRJ +#define DRK +#define DRL +#define DRM +#define DRN +#define DRO +#define DRP +#define DRQ +#define DRR +#define DRS +#define DRT +#define DRU +#define DRV +#define DRW +#define DRX +#define DRY +#define DRZ +#define DSA +#define DSB +#define DSC +#define DSD +#define DSE +#define DSF +#define DSG +#define DSH +#define DSI +#define DSJ +#define DSK +#define DSL +#define DSM +#define DSN +#define DSO +#define DSP +#define DSQ +#define DSR +#define DSS +#define DST +#define DSU +#define DSV +#define DSW +#define DSX +#define DSY +#define DSZ +#define DTA +#define DTB +#define DTC +#define DTD +#define DTE +#define DTF +#define DTG +#define DTH +#define DTI +#define DTJ +#define DTK +#define DTL +#define DTM +#define DTN +#define DTO +#define DTP +#define DTQ +#define DTR +#define DTS +#define DTT +#define DTU +#define DTV +#define DTW +#define DTX +#define DTY +#define DTZ +#define DUA +#define DUB +#define DUC +#define DUD +#define DUE +#define DUF +#define DUG +#define DUH +#define DUI +#define DUJ +#define DUK +#define DUL +#define DUM +#define DUN +#define DUO +#define DUP +#define DUQ +#define DUR +#define DUS +#define DUT +#define DUU +#define DUV +#define DUW +#define DUX +#define DUY +#define DUZ +#define DVA +#define DVB +#define DVC +#define DVD +#define DVE +#define DVF +#define DVG +#define DVH +#define DVI +#define DVJ +#define DVK +#define DVL +#define DVM +#define DVN +#define DVO +#define DVP +#define DVQ +#define DVR +#define DVS +#define DVT +#define DVU +#define DVV +#define DVW +#define DVX +#define DVY +#define DVZ +#define DWA +#define DWB +#define DWC +#define DWD +#define DWE +#define DWF +#define DWG +#define DWH +#define DWI +#define DWJ +#define DWK +#define DWL +#define DWM +#define DWN +#define DWO +#define DWP +#define DWQ +#define DWR +#define DWS +#define DWT +#define DWU +#define DWV +#define DWW +#define DWX +#define DWY +#define DWZ +#define DXA +#define DXB +#define DXC +#define DXD +#define DXE +#define DXF +#define DXG +#define DXH +#define DXI +#define DXJ +#define DXK +#define DXL +#define DXM +#define DXN +#define DXO +#define DXP +#define DXQ +#define DXR +#define DXS +#define DXT +#define DXU +#define DXV +#define DXW +#define DXX +#define DXY +#define DXZ +#define DYA +#define DYB +#define DYC +#define DYD +#define DYE +#define DYF +#define DYG +#define DYH +#define DYI +#define DYJ +#define DYK +#define DYL +#define DYM +#define DYN +#define DYO +#define DYP +#define DYQ +#define DYR +#define DYS +#define DYT +#define DYU +#define DYV +#define DYW +#define DYX +#define DYY +#define DYZ +#define DZA +#define DZB +#define DZC +#define DZD +#define DZE +#define DZF +#define DZG +#define DZH +#define DZI +#define DZJ +#define DZK +#define DZL +#define DZM +#define DZN +#define DZO +#define DZP +#define DZQ +#define DZR +#define DZS +#define DZT +#define DZU +#define DZV +#define DZW +#define DZX +#define DZY +#define DZZ +#define EAA +#define EAB +#define EAC +#define EAD +#define EAE +#define EAF +#define EAG +#define EAH +#define EAI +#define EAJ +#define EAK +#define EAL +#define EAM +#define EAN +#define EAO +#define EAP +#define EAQ +#define EAR +#define EAS +#define EAT +#define EAU +#define EAV +#define EAW +#define EAX +#define EAY +#define EAZ +#define EBA +#define EBB +#define EBC +#define EBD +#define EBE +#define EBF +#define EBG +#define EBH +#define EBI +#define EBJ +#define EBK +#define EBL +#define EBM +#define EBN +#define EBO +#define EBP +#define EBQ +#define EBR +#define EBS +#define EBT +#define EBU +#define EBV +#define EBW +#define EBX +#define EBY +#define EBZ +#define ECA +#define ECB +#define ECC +#define ECD +#define ECE +#define ECF +#define ECG +#define ECH +#define ECI +#define ECJ +#define ECK +#define ECL +#define ECM +#define ECN +#define ECO +#define ECP +#define ECQ +#define ECR +#define ECS +#define ECT +#define ECU +#define ECV +#define ECW +#define ECX +#define ECY +#define ECZ +#define EDA +#define EDB +#define EDC +#define EDD +#define EDE +#define EDF +#define EDG +#define EDH +#define EDI +#define EDJ +#define EDK +#define EDL +#define EDM +#define EDN +#define EDO +#define EDP +#define EDQ +#define EDR +#define EDS +#define EDT +#define EDU +#define EDV +#define EDW +#define EDX +#define EDY +#define EDZ +#define EEA +#define EEB +#define EEC +#define EED +#define EEE +#define EEF +#define EEG +#define EEH +#define EEI +#define EEJ +#define EEK +#define EEL +#define EEM +#define EEN +#define EEO +#define EEP +#define EEQ +#define EER +#define EES +#define EET +#define EEU +#define EEV +#define EEW +#define EEX +#define EEY +#define EEZ +#define EFA +#define EFB +#define EFC +#define EFD +#define EFE +#define EFF +#define EFG +#define EFH +#define EFI +#define EFJ +#define EFK +#define EFL +#define EFM +#define EFN +#define EFO +#define EFP +#define EFQ +#define EFR +#define EFS +#define EFT +#define EFU +#define EFV +#define EFW +#define EFX +#define EFY +#define EFZ +#define EGA +#define EGB +#define EGC +#define EGD +#define EGE +#define EGF +#define EGG +#define EGH +#define EGI +#define EGJ +#define EGK +#define EGL +#define EGM +#define EGN +#define EGO +#define EGP +#define EGQ +#define EGR +#define EGS +#define EGT +#define EGU +#define EGV +#define EGW +#define EGX +#define EGY +#define EGZ +#define EHA +#define EHB +#define EHC +#define EHD +#define EHE +#define EHF +#define EHG +#define EHH +#define EHI +#define EHJ +#define EHK +#define EHL +#define EHM +#define EHN +#define EHO +#define EHP +#define EHQ +#define EHR +#define EHS +#define EHT +#define EHU +#define EHV +#define EHW +#define EHX +#define EHY +#define EHZ +#define EIA +#define EIB +#define EIC +#define EID +#define EIE +#define EIF +#define EIG +#define EIH +#define EII +#define EIJ +#define EIK +#define EIL +#define EIM +#define EIN +#define EIO +#define EIP +#define EIQ +#define EIR +#define EIS +#define EIT +#define EIU +#define EIV +#define EIW +#define EIX +#define EIY +#define EIZ +#define EJA +#define EJB +#define EJC +#define EJD +#define EJE +#define EJF +#define EJG +#define EJH +#define EJI +#define EJJ +#define EJK +#define EJL +#define EJM +#define EJN +#define EJO +#define EJP +#define EJQ +#define EJR +#define EJS +#define EJT +#define EJU +#define EJV +#define EJW +#define EJX +#define EJY +#define EJZ +#define EKA +#define EKB +#define EKC +#define EKD +#define EKE +#define EKF +#define EKG +#define EKH +#define EKI +#define EKJ +#define EKK +#define EKL +#define EKM +#define EKN +#define EKO +#define EKP +#define EKQ +#define EKR +#define EKS +#define EKT +#define EKU +#define EKV +#define EKW +#define EKX +#define EKY +#define EKZ +#define ELA +#define ELB +#define ELC +#define ELD +#define ELE +#define ELF +#define ELG +#define ELH +#define ELI +#define ELJ +#define ELK +#define ELL +#define ELM +#define ELN +#define ELO +#define ELP +#define ELQ +#define ELR +#define ELS +#define ELT +#define ELU +#define ELV +#define ELW +#define ELX +#define ELY +#define ELZ +#define EMA +#define EMB +#define EMC +#define EMD +#define EME +#define EMF +#define EMG +#define EMH +#define EMI +#define EMJ +#define EMK +#define EML +#define EMM +#define EMN +#define EMO +#define EMP +#define EMQ +#define EMR +#define EMS +#define EMT +#define EMU +#define EMV +#define EMW +#define EMX +#define EMY +#define EMZ +#define ENA +#define ENB +#define ENC +#define END +#define ENE +#define ENF +#define ENG +#define ENH +#define ENI +#define ENJ +#define ENK +#define ENL +#define ENM +#define ENN +#define ENO +#define ENP +#define ENQ +#define ENR +#define ENS +#define ENT +#define ENU +#define ENV +#define ENW +#define ENX +#define ENY +#define ENZ +#define EOA +#define EOB +#define EOC +#define EOD +#define EOE +#define EOF +#define EOG +#define EOH +#define EOI +#define EOJ +#define EOK +#define EOL +#define EOM +#define EON +#define EOO +#define EOP +#define EOQ +#define EOR +#define EOS +#define EOT +#define EOU +#define EOV +#define EOW +#define EOX +#define EOY +#define EOZ +#define EPA +#define EPB +#define EPC +#define EPD +#define EPE +#define EPF +#define EPG +#define EPH +#define EPI +#define EPJ +#define EPK +#define EPL +#define EPM +#define EPN +#define EPO +#define EPP +#define EPQ +#define EPR +#define EPS +#define EPT +#define EPU +#define EPV +#define EPW +#define EPX +#define EPY +#define EPZ +#define EQA +#define EQB +#define EQC +#define EQD +#define EQE +#define EQF +#define EQG +#define EQH +#define EQI +#define EQJ +#define EQK +#define EQL +#define EQM +#define EQN +#define EQO +#define EQP +#define EQQ +#define EQR +#define EQS +#define EQT +#define EQU +#define EQV +#define EQW +#define EQX +#define EQY +#define EQZ +#define ERA +#define ERB +#define ERC +#define ERD +#define ERE +#define ERF +#define ERG +#define ERH +#define ERI +#define ERJ +#define ERK +#define ERL +#define ERM +#define ERN +#define ERO +#define ERP +#define ERQ +#define ERR +#define ERS +#define ERT +#define ERU +#define ERV +#define ERW +#define ERX +#define ERY +#define ERZ +#define ESA +#define ESB +#define ESC +#define ESD +#define ESE +#define ESF +#define ESG +#define ESH +#define ESI +#define ESJ +#define ESK +#define ESL +#define ESM +#define ESN +#define ESO +#define ESP +#define ESQ +#define ESR +#define ESS +#define EST +#define ESU +#define ESV +#define ESW +#define ESX +#define ESY +#define ESZ +#define ETA +#define ETB +#define ETC +#define ETD +#define ETE +#define ETF +#define ETG +#define ETH +#define ETI +#define ETJ +#define ETK +#define ETL +#define ETM +#define ETN +#define ETO +#define ETP +#define ETQ +#define ETR +#define ETS +#define ETT +#define ETU +#define ETV +#define ETW +#define ETX +#define ETY +#define ETZ +#define EUA +#define EUB +#define EUC +#define EUD +#define EUE +#define EUF +#define EUG +#define EUH +#define EUI +#define EUJ +#define EUK +#define EUL +#define EUM +#define EUN +#define EUO +#define EUP +#define EUQ +#define EUR +#define EUS +#define EUT +#define EUU +#define EUV +#define EUW +#define EUX +#define EUY +#define EUZ +#define EVA +#define EVB +#define EVC +#define EVD +#define EVE +#define EVF +#define EVG +#define EVH +#define EVI +#define EVJ +#define EVK +#define EVL +#define EVM +#define EVN +#define EVO +#define EVP +#define EVQ +#define EVR +#define EVS +#define EVT +#define EVU +#define EVV +#define EVW +#define EVX +#define EVY +#define EVZ +#define EWA +#define EWB +#define EWC +#define EWD +#define EWE +#define EWF +#define EWG +#define EWH +#define EWI +#define EWJ +#define EWK +#define EWL +#define EWM +#define EWN +#define EWO +#define EWP +#define EWQ +#define EWR +#define EWS +#define EWT +#define EWU +#define EWV +#define EWW +#define EWX +#define EWY +#define EWZ +#define EXA +#define EXB +#define EXC +#define EXD +#define EXE +#define EXF +#define EXG +#define EXH +#define EXI +#define EXJ +#define EXK +#define EXL +#define EXM +#define EXN +#define EXO +#define EXP +#define EXQ +#define EXR +#define EXS +#define EXT +#define EXU +#define EXV +#define EXW +#define EXX +#define EXY +#define EXZ +#define EYA +#define EYB +#define EYC +#define EYD +#define EYE +#define EYF +#define EYG +#define EYH +#define EYI +#define EYJ +#define EYK +#define EYL +#define EYM +#define EYN +#define EYO +#define EYP +#define EYQ +#define EYR +#define EYS +#define EYT +#define EYU +#define EYV +#define EYW +#define EYX +#define EYY +#define EYZ +#define EZA +#define EZB +#define EZC +#define EZD +#define EZE +#define EZF +#define EZG +#define EZH +#define EZI +#define EZJ +#define EZK +#define EZL +#define EZM +#define EZN +#define EZO +#define EZP +#define EZQ +#define EZR +#define EZS +#define EZT +#define EZU +#define EZV +#define EZW +#define EZX +#define EZY +#define EZZ +#define FAA +#define FAB +#define FAC +#define FAD +#define FAE +#define FAF +#define FAG +#define FAH +#define FAI +#define FAJ +#define FAK +#define FAL +#define FAM +#define FAN +#define FAO +#define FAP +#define FAQ +#define FAR +#define FAS +#define FAT +#define FAU +#define FAV +#define FAW +#define FAX +#define FAY +#define FAZ +#define FBA +#define FBB +#define FBC +#define FBD +#define FBE +#define FBF +#define FBG +#define FBH +#define FBI +#define FBJ +#define FBK +#define FBL +#define FBM +#define FBN +#define FBO +#define FBP +#define FBQ +#define FBR +#define FBS +#define FBT +#define FBU +#define FBV +#define FBW +#define FBX +#define FBY +#define FBZ +#define FCA +#define FCB +#define FCC +#define FCD +#define FCE +#define FCF +#define FCG +#define FCH +#define FCI +#define FCJ +#define FCK +#define FCL +#define FCM +#define FCN +#define FCO +#define FCP +#define FCQ +#define FCR +#define FCS +#define FCT +#define FCU +#define FCV +#define FCW +#define FCX +#define FCY +#define FCZ +#define FDA +#define FDB +#define FDC +#define FDD +#define FDE +#define FDF +#define FDG +#define FDH +#define FDI +#define FDJ +#define FDK +#define FDL +#define FDM +#define FDN +#define FDO +#define FDP +#define FDQ +#define FDR +#define FDS +#define FDT +#define FDU +#define FDV +#define FDW +#define FDX +#define FDY +#define FDZ +#define FEA +#define FEB +#define FEC +#define FED +#define FEE +#define FEF +#define FEG +#define FEH +#define FEI +#define FEJ +#define FEK +#define FEL +#define FEM +#define FEN +#define FEO +#define FEP +#define FEQ +#define FER +#define FES +#define FET +#define FEU +#define FEV +#define FEW +#define FEX +#define FEY +#define FEZ +#define FFA +#define FFB +#define FFC +#define FFD +#define FFE +#define FFF +#define FFG +#define FFH +#define FFI +#define FFJ +#define FFK +#define FFL +#define FFM +#define FFN +#define FFO +#define FFP +#define FFQ +#define FFR +#define FFS +#define FFT +#define FFU +#define FFV +#define FFW +#define FFX +#define FFY +#define FFZ +#define FGA +#define FGB +#define FGC +#define FGD +#define FGE +#define FGF +#define FGG +#define FGH +#define FGI +#define FGJ +#define FGK +#define FGL +#define FGM +#define FGN +#define FGO +#define FGP +#define FGQ +#define FGR +#define FGS +#define FGT +#define FGU +#define FGV +#define FGW +#define FGX +#define FGY +#define FGZ +#define FHA +#define FHB +#define FHC +#define FHD +#define FHE +#define FHF +#define FHG +#define FHH +#define FHI +#define FHJ +#define FHK +#define FHL +#define FHM +#define FHN +#define FHO +#define FHP +#define FHQ +#define FHR +#define FHS +#define FHT +#define FHU +#define FHV +#define FHW +#define FHX +#define FHY +#define FHZ +#define FIA +#define FIB +#define FIC +#define FID +#define FIE +#define FIF +#define FIG +#define FIH +#define FII +#define FIJ +#define FIK +#define FIL +#define FIM +#define FIN +#define FIO +#define FIP +#define FIQ +#define FIR +#define FIS +#define FIT +#define FIU +#define FIV +#define FIW +#define FIX +#define FIY +#define FIZ +#define FJA +#define FJB +#define FJC +#define FJD +#define FJE +#define FJF +#define FJG +#define FJH +#define FJI +#define FJJ +#define FJK +#define FJL +#define FJM +#define FJN +#define FJO +#define FJP +#define FJQ +#define FJR +#define FJS +#define FJT +#define FJU +#define FJV +#define FJW +#define FJX +#define FJY +#define FJZ +#define FKA +#define FKB +#define FKC +#define FKD +#define FKE +#define FKF +#define FKG +#define FKH +#define FKI +#define FKJ +#define FKK +#define FKL +#define FKM +#define FKN +#define FKO +#define FKP +#define FKQ +#define FKR +#define FKS +#define FKT +#define FKU +#define FKV +#define FKW +#define FKX +#define FKY +#define FKZ +#define FLA +#define FLB +#define FLC +#define FLD +#define FLE +#define FLF +#define FLG +#define FLH +#define FLI +#define FLJ +#define FLK +#define FLL +#define FLM +#define FLN +#define FLO +#define FLP +#define FLQ +#define FLR +#define FLS +#define FLT +#define FLU +#define FLV +#define FLW +#define FLX +#define FLY +#define FLZ +#define FMA +#define FMB +#define FMC +#define FMD +#define FME +#define FMF +#define FMG +#define FMH +#define FMI +#define FMJ +#define FMK +#define FML +#define FMM +#define FMN +#define FMO +#define FMP +#define FMQ +#define FMR +#define FMS +#define FMT +#define FMU +#define FMV +#define FMW +#define FMX +#define FMY +#define FMZ +#define FNA +#define FNB +#define FNC +#define FND +#define FNE +#define FNF +#define FNG +#define FNH +#define FNI +#define FNJ +#define FNK +#define FNL +#define FNM +#define FNN +#define FNO +#define FNP +#define FNQ +#define FNR +#define FNS +#define FNT +#define FNU +#define FNV +#define FNW +#define FNX +#define FNY +#define FNZ +#define FOA +#define FOB +#define FOC +#define FOD +#define FOE +#define FOF +#define FOG +#define FOH +#define FOI +#define FOJ +#define FOK +#define FOL +#define FOM +#define FON +#define FOO +#define FOP +#define FOQ +#define FOR +#define FOS +#define FOT +#define FOU +#define FOV +#define FOW +#define FOX +#define FOY +#define FOZ +#define FPA +#define FPB +#define FPC +#define FPD +#define FPE +#define FPF +#define FPG +#define FPH +#define FPI +#define FPJ +#define FPK +#define FPL +#define FPM +#define FPN +#define FPO +#define FPP +#define FPQ +#define FPR +#define FPS +#define FPT +#define FPU +#define FPV +#define FPW +#define FPX +#define FPY +#define FPZ +#define FQA +#define FQB +#define FQC +#define FQD +#define FQE +#define FQF +#define FQG +#define FQH +#define FQI +#define FQJ +#define FQK +#define FQL +#define FQM +#define FQN +#define FQO +#define FQP +#define FQQ +#define FQR +#define FQS +#define FQT +#define FQU +#define FQV +#define FQW +#define FQX +#define FQY +#define FQZ +#define FRA +#define FRB +#define FRC +#define FRD +#define FRE +#define FRF +#define FRG +#define FRH +#define FRI +#define FRJ +#define FRK +#define FRL +#define FRM +#define FRN +#define FRO +#define FRP +#define FRQ +#define FRR +#define FRS +#define FRT +#define FRU +#define FRV +#define FRW +#define FRX +#define FRY +#define FRZ +#define FSA +#define FSB +#define FSC +#define FSD +#define FSE +#define FSF +#define FSG +#define FSH +#define FSI +#define FSJ +#define FSK +#define FSL +#define FSM +#define FSN +#define FSO +#define FSP +#define FSQ +#define FSR +#define FSS +#define FST +#define FSU +#define FSV +#define FSW +#define FSX +#define FSY +#define FSZ +#define FTA +#define FTB +#define FTC +#define FTD +#define FTE +#define FTF +#define FTG +#define FTH +#define FTI +#define FTJ +#define FTK +#define FTL +#define FTM +#define FTN +#define FTO +#define FTP +#define FTQ +#define FTR +#define FTS +#define FTT +#define FTU +#define FTV +#define FTW +#define FTX +#define FTY +#define FTZ +#define FUA +#define FUB +#define FUC +#define FUD +#define FUE +#define FUF +#define FUG +#define FUH +#define FUI +#define FUJ +#define FUK +#define FUL +#define FUM +#define FUN +#define FUO +#define FUP +#define FUQ +#define FUR +#define FUS +#define FUT +#define FUU +#define FUV +#define FUW +#define FUX +#define FUY +#define FUZ +#define FVA +#define FVB +#define FVC +#define FVD +#define FVE +#define FVF +#define FVG +#define FVH +#define FVI +#define FVJ +#define FVK +#define FVL +#define FVM +#define FVN +#define FVO +#define FVP +#define FVQ +#define FVR +#define FVS +#define FVT +#define FVU +#define FVV +#define FVW +#define FVX +#define FVY +#define FVZ +#define FWA +#define FWB +#define FWC +#define FWD +#define FWE +#define FWF +#define FWG +#define FWH +#define FWI +#define FWJ +#define FWK +#define FWL +#define FWM +#define FWN +#define FWO +#define FWP +#define FWQ +#define FWR +#define FWS +#define FWT +#define FWU +#define FWV +#define FWW +#define FWX +#define FWY +#define FWZ +#define FXA +#define FXB +#define FXC +#define FXD +#define FXE +#define FXF +#define FXG +#define FXH +#define FXI +#define FXJ +#define FXK +#define FXL +#define FXM +#define FXN +#define FXO +#define FXP +#define FXQ +#define FXR +#define FXS +#define FXT +#define FXU +#define FXV +#define FXW +#define FXX +#define FXY +#define FXZ +#define FYA +#define FYB +#define FYC +#define FYD +#define FYE +#define FYF +#define FYG +#define FYH +#define FYI +#define FYJ +#define FYK +#define FYL +#define FYM +#define FYN +#define FYO +#define FYP +#define FYQ +#define FYR +#define FYS +#define FYT +#define FYU +#define FYV +#define FYW +#define FYX +#define FYY +#define FYZ +#define FZA +#define FZB +#define FZC +#define FZD +#define FZE +#define FZF +#define FZG +#define FZH +#define FZI +#define FZJ +#define FZK +#define FZL +#define FZM +#define FZN +#define FZO +#define FZP +#define FZQ +#define FZR +#define FZS +#define FZT +#define FZU +#define FZV +#define FZW +#define FZX +#define FZY +#define FZZ +#define GAA +#define GAB +#define GAC +#define GAD +#define GAE +#define GAF +#define GAG +#define GAH +#define GAI +#define GAJ +#define GAK +#define GAL +#define GAM +#define GAN +#define GAO +#define GAP +#define GAQ +#define GAR +#define GAS +#define GAT +#define GAU +#define GAV +#define GAW +#define GAX +#define GAY +#define GAZ +#define GBA +#define GBB +#define GBC +#define GBD +#define GBE +#define GBF +#define GBG +#define GBH +#define GBI +#define GBJ +#define GBK +#define GBL +#define GBM 0x0fff +#endif +#endif + diff --git a/libraries/mcpp/test-t/m_33_big5.t b/libraries/mcpp/test-t/m_33_big5.t new file mode 100644 index 000000000..362cc2295 --- /dev/null +++ b/libraries/mcpp/test-t/m_33_big5.t @@ -0,0 +1,22 @@ +/* m_33_big5.t: Wide character constant encoded in Big-Five. */ + +#include +#define BYTES_VAL (1 << CHAR_BIT) + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "big5") /* For MCPP */ +#pragma setlocale( "chinese-traditional") /* For Visual C */ + +#if L'r' == '\xa6' * BYTES_VAL + '\x72' + Wide character is encoded in Big-Five. +#elif L'r' == '\x72' * BYTES_VAL + '\xa6' + Wide character is encoded in Big-Five. + Inverted order of evaluation. +#else + I cannot understand Big-Five. +#endif +#if L'r' < 0 + Evaluated in negative value. +#endif + diff --git a/libraries/mcpp/test-t/m_33_eucjp.t b/libraries/mcpp/test-t/m_33_eucjp.t new file mode 100644 index 000000000..4606884aa --- /dev/null +++ b/libraries/mcpp/test-t/m_33_eucjp.t @@ -0,0 +1,22 @@ +/* m_33_eucjp.t: Wide character constant encoded in EUC-JP. */ + +#include +#define BYTES_VAL (1 << CHAR_BIT) + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "eucjp") /* For MCPP */ +#pragma setlocale( "eucjp") /* For MCPP on VC */ + +#if L'' == '\xbb' * BYTES_VAL + '\xfa' + Wide character is encoded in EUC-JP. +#elif L'' == '\xfa' * BYTES_VAL + '\xbb' + Wide character is encoded in EUC-JP. + Inverted order of evaluation. +#else + I cannot understand EUC-JP. +#endif +#if L'' < 0 + Evaluated in negative value. +#endif + diff --git a/libraries/mcpp/test-t/m_33_gb.t b/libraries/mcpp/test-t/m_33_gb.t new file mode 100644 index 000000000..2ac8e8dc9 --- /dev/null +++ b/libraries/mcpp/test-t/m_33_gb.t @@ -0,0 +1,22 @@ +/* m_33_gb.t: Wide character constant encoded in GB-2312. */ + +#include +#define BYTES_VAL (1 << CHAR_BIT) + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "gb2312") /* For MCPP */ +#pragma setlocale( "chinese-simplified") /* For Visual C */ + +#if L'' == '\xd7' * BYTES_VAL + '\xd6' + Wide character is encoded in GB 2312. +#elif L'' == '\xd6' * BYTES_VAL + '\xd7' + Wide character is encoded in GB 2312. + Inverted order of evaluation. +#else + I cannot understand GB-2312. +#endif +#if L'' < 0 + Evaluated in negative value. +#endif + diff --git a/libraries/mcpp/test-t/m_33_jis.t b/libraries/mcpp/test-t/m_33_jis.t new file mode 100644 index 000000000..3394b3537 --- /dev/null +++ b/libraries/mcpp/test-t/m_33_jis.t @@ -0,0 +1,24 @@ +/* m_33_jis.t: Wide character constant encoded in ISO-2022-JP. */ + +#include +#define BYTES_VAL (1 << CHAR_BIT) + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "jis") /* For MCPP */ +#pragma setlocale( "jis") /* For MCPP on VC */ + +#if L'$B;z(B' == 0x3b * BYTES_VAL + 0x7a + /* This line doesn't work unless "shift states" are processed. */ + Wide character is encoded in ISO-2022-JP. +#elif L'$B;z(B' == 0x7a * BYTES_VAL + 0x3b + /* This line doesn't work unless "shift states" are processed. */ + Wide character is encoded in ISO-2022-JP. + Inverted order of evaluation. +#else + I cannot understand ISO-2022-JP. +#endif +#if L'$B;z(B' < 0 + Evaluated in negative value. +#endif + diff --git a/libraries/mcpp/test-t/m_33_ksc.t b/libraries/mcpp/test-t/m_33_ksc.t new file mode 100644 index 000000000..37a8114ae --- /dev/null +++ b/libraries/mcpp/test-t/m_33_ksc.t @@ -0,0 +1,22 @@ +/* m_33_ksc.t: Wide character constant encoded in KSC-5601. */ + +#include +#define BYTES_VAL (1 << CHAR_BIT) + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "ksc5601") /* For MCPP */ +#pragma setlocale( "korean") /* For Visual C */ + +#if L'' == '\xed' * BYTES_VAL + '\xae' + Wide character is encoded in KSC-5601. +#elif L'' == '\xae' * BYTES_VAL + '\xed' + Wide character is encoded in KSC-5601. + Inverted order of evaluation. +#else + I cannot understand KSC-5601. +#endif +#if L'' < 0 + Evaluated in negative value. +#endif + diff --git a/libraries/mcpp/test-t/m_33_sjis.t b/libraries/mcpp/test-t/m_33_sjis.t new file mode 100644 index 000000000..5365fae15 --- /dev/null +++ b/libraries/mcpp/test-t/m_33_sjis.t @@ -0,0 +1,22 @@ +/* m_33_sjis.t: Wide character constant encoded in shift-JIS. */ + +#include +#define BYTES_VAL (1 << CHAR_BIT) + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "sjis") /* For MCPP */ +#pragma setlocale( "japanese") /* For Visual C */ + +#if L'' == '\x8e' * BYTES_VAL + '\x9a' + Wide character is encoded in shift-JIS. +#elif L'' == '\x9a' * BYTES_VAL + '\x8e' + Wide character is encoded in shift-JIS. + Inverted order of evaluation. +#else + I cannot understand shift-JIS. +#endif +#if L'' < 0 + Evaluated in negative value. +#endif + diff --git a/libraries/mcpp/test-t/m_33_utf8.t b/libraries/mcpp/test-t/m_33_utf8.t new file mode 100644 index 000000000..d10e99198 --- /dev/null +++ b/libraries/mcpp/test-t/m_33_utf8.t @@ -0,0 +1,22 @@ +/* m_33_utf8.t: Wide character constant encoded in UTF-8. */ + +#include +#define BYTES_VAL (1 << CHAR_BIT) + +/* 33.1: L'ch'. */ + +#pragma __setlocale( "utf8") /* For MCPP */ +#pragma setlocale( "utf8") /* For MCPP on VC */ + +#if L'字' == '\xe5' * BYTES_VAL * BYTES_VAL + '\xad' * BYTES_VAL + '\x97' + Wide character is encoded in UTF-8. +#elif L'字' == '\x97' * BYTES_VAL * BYTES_VAL + '\xad' * BYTES_VAL + '\xe5' + Wide character is encoded in UTF-8. + Inverted order of evaluation. +#else + I cannot understand UTF-8. +#endif +#if L'字' < 0 + Evaluated in negative value. +#endif + diff --git a/libraries/mcpp/test-t/m_34_big5.t b/libraries/mcpp/test-t/m_34_big5.t new file mode 100644 index 000000000..a86757998 --- /dev/null +++ b/libraries/mcpp/test-t/m_34_big5.t @@ -0,0 +1,13 @@ +/* m_34_big5.t: Multi-byte character constant encoded in Big-Five. */ + +/* 34.1: */ + +#pragma __setlocale( "big5") /* For MCPP */ +#pragma setlocale( "chinese-traditional") /* For Visual C */ + +#if 'r' == '\xa6\x72' + Multi-byte character is encoded in Big-Five. +#else + I cannot understand Big-Five. +#endif + diff --git a/libraries/mcpp/test-t/m_34_eucjp.t b/libraries/mcpp/test-t/m_34_eucjp.t new file mode 100644 index 000000000..78f7fd06b --- /dev/null +++ b/libraries/mcpp/test-t/m_34_eucjp.t @@ -0,0 +1,13 @@ +/* m_34_eucjp.t: Multi-byte character constant encoded in EUC-JP. */ + +/* 34.1: */ + +#pragma __setlocale( "eucjp") /* For MCPP */ +#pragma setlocale( "eucjp") /* For MCPP on VC */ + +#if '' == '\xbb\xfa' + Multi-byte character is encoded in EUC-JP. +#else + I cannot understand EUC-JP. +#endif + diff --git a/libraries/mcpp/test-t/m_34_gb.t b/libraries/mcpp/test-t/m_34_gb.t new file mode 100644 index 000000000..3dd0c965e --- /dev/null +++ b/libraries/mcpp/test-t/m_34_gb.t @@ -0,0 +1,13 @@ +/* m_34_gb.t: Multi-byte character constant encoded in GB-2312. */ + +/* 34.1: */ + +#pragma __setlocale( "gb2312") /* For MCPP */ +#pragma setlocale( "chinese-simplified") /* For Visual C */ + +#if '' == '\xd7\xd6' + Multi-byte character is encoded in GB-2312. +#else + I cannot understand GB-2312. +#endif + diff --git a/libraries/mcpp/test-t/m_34_jis.t b/libraries/mcpp/test-t/m_34_jis.t new file mode 100644 index 000000000..340bcb89e --- /dev/null +++ b/libraries/mcpp/test-t/m_34_jis.t @@ -0,0 +1,14 @@ +/* m_34_jis.t: Multi-byte character constant encoded in ISO-2022-JP. */ + +/* 34.1: */ + +#pragma __setlocale( "jis") /* For MCPP */ +#pragma setlocale( "jis") /* For MCPP on VC */ + +#if '$B;z(B' == '\x3b\x7a' + /* This line doesn't work unless "shift states" are processed. */ + Multi-byte character is encoded in ISO-2022-JP. +#else + I cannot understand ISO-2022-JP. +#endif + diff --git a/libraries/mcpp/test-t/m_34_ksc.t b/libraries/mcpp/test-t/m_34_ksc.t new file mode 100644 index 000000000..cc1ebbb8f --- /dev/null +++ b/libraries/mcpp/test-t/m_34_ksc.t @@ -0,0 +1,13 @@ +/* m_34_ksc.t: Multi-byte character constant encoded in KSC-5601. */ + +/* 34.1: */ + +#pragma __setlocale( "ksc5601") /* For MCPP */ +#pragma setlocale( "korean") /* For Visual C */ + +#if '' == '\xed\xae' + Multi-byte character is encoded in KSC-5601. +#else + I cannot understand KSC-5601. +#endif + diff --git a/libraries/mcpp/test-t/m_34_sjis.t b/libraries/mcpp/test-t/m_34_sjis.t new file mode 100644 index 000000000..5c14ccc0b --- /dev/null +++ b/libraries/mcpp/test-t/m_34_sjis.t @@ -0,0 +1,13 @@ +/* m_34_sjis.t: Multi-byte character constant encoded in shift-JIS. */ + +/* 34.1: */ + +#pragma __setlocale( "sjis") /* For MCPP */ +#pragma setlocale( "japanese") /* For Visual C */ + +#if '' == '\x8e\x9a' + Multi-byte character is encoded in shift-JIS. +#else + I cannot understand shift-JIS. +#endif + diff --git a/libraries/mcpp/test-t/m_34_utf8.t b/libraries/mcpp/test-t/m_34_utf8.t new file mode 100644 index 000000000..2d1d40b77 --- /dev/null +++ b/libraries/mcpp/test-t/m_34_utf8.t @@ -0,0 +1,13 @@ +/* m_34_utf8.t: Multi-byte character constant encoded in UTF-8. */ + +/* 34.1: */ + +#pragma __setlocale( "utf8") /* For MCPP */ +#pragma setlocale( "utf8") /* For MCPP on VC */ + +#if '字' == '\xe5\xad\x97' + Multi-byte character is encoded in UTF-8. +#else + I cannot understand UTF-8. +#endif + diff --git a/libraries/mcpp/test-t/m_36_big5.t b/libraries/mcpp/test-t/m_36_big5.t new file mode 100644 index 000000000..cea582a56 --- /dev/null +++ b/libraries/mcpp/test-t/m_36_big5.t @@ -0,0 +1,20 @@ +/* m_36_big5.t: Handling of 0x5c in BigFive multi-byte character. */ + +#define str( a) # a + +/* 36.1: 0x5c in multi-byte character is not an escape character */ + +#pragma __setlocale( "big5") /* For MCPP */ +#pragma setlocale( "chinese-traditional") /* For Visual C */ + +#if 'r' == '\xa6\x72' && '\' != '\xa5\x5c' + Bad handling of '\\' in multi-byte character. +#endif + +/* 36.ext: */ + "\Z"; /* \xa5\x5c\xc1\x5a */ + +/* 36.2: # operater should not insert '\\' before 0x5c in multi-byte + character. */ + str( "\Z"); + diff --git a/libraries/mcpp/test-t/m_36_jis.t b/libraries/mcpp/test-t/m_36_jis.t new file mode 100644 index 000000000..d14bc5e59 --- /dev/null +++ b/libraries/mcpp/test-t/m_36_jis.t @@ -0,0 +1,31 @@ +/* + * m_36_jis.t: Handling of 0x5c ('\\'), 0x22 ('"'), 0x27 ('\'') + * in ISO-2022-JP multi-byte character. + */ + +#define str( a) # a + +/* 36.1: 0x5c in multi-byte character is not an escape character. */ + +#pragma __setlocale( "jis") /* For MCPP */ +#pragma setlocale( "jis") /* For MCPP on VC */ + +#if '$B;z(B' == '\x3b\x7a' && '$B0\(B' != '\x30\x5c' + Bad handling of '\\' in multi-byte character. +#endif + +/* 36.2: # operater should not insert '\\' before 0x5c in multi-byte + character. */ + str( "$B0\F0(B"); + /* \x22\x5c\x22\x30\x5c\x46\x30\x5c\x22\x22 with shift-sequence */ + +/* 36.3: # operater should not insert '\\' before 0x22 in multi-byte + character. */ + str( "$B1"M[(B"); + /* \x22\x5c\x22\x31\x22\x4d\x5b\x5c\x22\x22 with shift-sequence */ + +/* 36.4: # operater should not insert '\\' before 0x27 in multi-byte + character. */ + str( "$B1'Ch(B"); + /* \x22\x5c\x22\x31\x27\x43\x68\x5c\x22\x22 with shift-sequence */ + diff --git a/libraries/mcpp/test-t/m_36_sjis.t b/libraries/mcpp/test-t/m_36_sjis.t new file mode 100644 index 000000000..a83639cdd --- /dev/null +++ b/libraries/mcpp/test-t/m_36_sjis.t @@ -0,0 +1,24 @@ +/* m_36_sjis.t: Handling of 0x5c in shift-JIS multi-byte character. */ + +#define str( a) # a + +/* 36.1: 0x5c in multi-byte character is not an escape character */ + +#pragma __setlocale( "sjis") /* For MCPP */ +#pragma setlocale( "japanese") /* For Visual C */ + +#if '' == '\x8e\x9a' && '\' != '\x95\x5c' + Bad handling of '\\' in multi-byte character. +#endif + +/* 36.ext and 36.2 are expanded to: + "\"; "\"\\""; + or "\\"; "\"\\\""; */ + +/* 36.ext: */ + "\"; + +/* 36.2: # operater should not insert '\\' before 0x5c in multi-byte + character. */ + str( "\"); + diff --git a/libraries/mcpp/test-t/misc.t b/libraries/mcpp/test-t/misc.t new file mode 100644 index 000000000..9395b09cf --- /dev/null +++ b/libraries/mcpp/test-t/misc.t @@ -0,0 +1,401 @@ +/* + * M I S C . T + * 1998/08 Made public. kmatsui + * 2003/11 Slightly revised. kmatsui + * 2004/11 Split samples for "Reiser cpp" as "trad.t". + * Removed duplicate samples with other testcases. + * kmatsui + * + * Miscellaneous texts for test of preprocessor. + * + * PART 1, 2 are excerpts from + * ISO C 6.8.3 "Examples" + * Some other examples are excerpted from : + * P.J.Plauger "The Standard C Library", + * GCC "cpp.info" + */ + +/* + * PART 1 + * Weird tests of macro rescan. + */ + +#define x 3 +#define f(a) f(x * (a)) +#undef x + +#define x 2 +#define g f +#define z z[0] +#define h g(~ +#define m(a) a(w) +#define w 0,1 +#define t(a) a + +rescan() +{ +/* f(y+1) + f(f(z)) % t(t(g)(0) + t)(1); + * + * should expand to: + * + * f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1); + */ + +f(y+1) + f(f(z)) % t(t(g)(0) + t)(1); + +/* g(x+(3,4)-w) | h 5) & m + * (f)^m(m); + * + * should result in: + * + * f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1); + */ + +g(x+(3,4)-w) | h 5) & m + (f)^m(m); +} + +/* + * PART 2 + * Tests of creating string literal and concatenation of tokens. + */ + +#define str(s) # s +#define xstr(s) str(s) +#define debug(s,t) printf("x" # s "= %d, x" # t "= %s", \ + x ## s, x ## t) +#define INCFILE(n) vers ## n /* comment */ +#define glue(a, b) a ## b +#define xglue(a, b) glue(a, b) +#define HIGHLOW "hello" +#define LOW LOW ", world" + +stringize() +{ +/* debug(1, 2); + * + * should result in: + * + * printf("x" "1" "= %d, x" "2" "= %s", x1, x2); + * + * after concatenation of the character string literals: + * + * printf("x1= %d, x2= %s", x1, x2); + */ + +debug(1, 2); + +/* fputs(str(strncmp("abc\0d", "abc", '\4') + * == 0) str(: @\n), s); + * + * should result in: + * + * fputs("strncmp(\"abc\\0d\", \"abc\", '\\4') == 0" ": @\n", s); + * + * after concatenation of the character string literals (exactly, the each + * escape sequences are converted to a corresponding character prior to the + * concatenation): + * + * fputs("strncmp(\"abc\\0d\", \"abc\", '\\4') == 0: @\n", s); + */ + +fputs(str(strncmp("abc\0d", "abc", '\4') /* this goes away */ + == 0) str(: @\n), s); + +/* glue(HIGH, LOW); + * + * should result in: + * + * "hello"; + */ + +glue(HIGH, LOW); + +/* xglue(HIGH, LOW) + * + * should result in: + * + * "hello" ", world" + * + * after concatenation of the character string literals: + * + * "hello, world" + */ + +xglue(HIGH, LOW) +} + +#undef f +#undef g +#undef h +#undef m +#undef t +#undef w +#undef x +#undef z + +/* #include xstr(INCFILE(2).h) + * + * should expand to (after macro replacement, before file access): + * + * #include "vers2.h" + * + * "vers2.h" includes and for the later tests. + */ + +#include xstr(INCFILE(2).h) + +/* + * PART 3 + * More tests of token concatenation, taken from + * Kernighan & Ritchie "The C Programming Language", 2nd. Ed., A12.3. + */ + +concat() +{ +/* This is expanded to: + * abc; + */ + xglue( xglue( a, b), c); + +/* This is also expanded to: + * abc; + */ + xglue( glue( a, b), c); + +/* Results of these macro calls are undefined, once expanded to: + * glue( a, b)c; + * xglue( a, b)c; + * ')c' is not a valid preprocessing token. + */ + glue( glue( a, b), c); + glue( xglue( a, b), c); +} + +/* + * PART 4 + * More samples of token concatenation. + */ + +#define COMMAND( name) { # name, name ## _command } + + struct command commands[] = { +/* { "quit", quit_command }, */ + COMMAND (quit), +/* { "help", help_command }, */ + COMMAND (help), + }; + +#define maxof( type) maxof ## type +#define DefMax( type) \ + type maxof( type)( type a, type b) \ + { \ + return (( a > b) ? a : b); \ + } + +/* int maxofint( int a, int b) { return (( a > b) ? a : b); } */ + DefMax( int) +/* double maxofdouble( double a, double b) + * { return (( a > b) ? a : b); } + */ + DefMax( double) + +/* + * PART 5 + * Test of stringization. + */ + +line() +{ +/* 211; "211"; "__LINE__"; */ + __LINE__; xstr( __LINE__); str( __LINE__); +} + +/* + * PART 6 + * Tests of handling escape sequences. + * Tests of concatenation of string literals. + */ + +escape() +{ +#undef NDEBUG +#include + +/* In ASCII character set */ + + assert( '\a' == 7); + +/* After string concatenation : + * results somehow as this: + * ((strcmp( "132", "132") == 0) ? (void) 0 : + * _assert( "strcmp( \"\\x31\" \"32\", \"132\") == 0", + * "misc.t",270)); + * ((strcmp( "132", "132") == 0) ? (void) 0 : + * _assert( "strcmp( \"\\61\" \"32\", \"132\") == 0", + * "misc.t",271)); + */ + assert( strcmp( "\x31" "32", "132") == 0); + assert( strcmp( "\61" "32", "132") == 0); + +/* + * In the messy encoding of KANJI called shift-JIS, "ɽ" is encoded as + * "\x95\x5C", the latter byte is not a beginning of an escape sequence. + */ + assert( strcmp( "ɽ" "", "ɽ") == 0); +} + +/* + * PART 7 + * Tests of evaluating constant expression in long, unsigned long. + * Tests of , . + */ + +#include + +#if INT_MAX < INT_MIN || UINT_MAX <= INT_MAX +# error bad int properties +#endif +#if LONG_MAX < 2147483647 || -2147483647 < LONG_MIN || LONG_MAX < INT_MAX +# error bad long properties +#endif + +#define NDEBUG +#include +assert_long() +{ +/* This macro is ineffective now that NDEBUG is defined. */ + assert( LONG_MAX >= 2147483647 + && -2147483647 >= LONG_MIN + && LONG_MAX >= INT_MAX); +} + +ulong() +{ +/* For the compiler which has unsigned long data type */ +#if defined ULONG_MAX && (ULONG_MAX < 4294967295 \ + || ULONG_MAX / 2 < LONG_MAX || ULONG_MAX < UINT_MAX) +# error bad unsigned long properties +#endif +} + +internal() +{ +/* The following 2 samlpes overflow on two's complement representation. */ +#if -LONG_MIN == LONG_MAX + This is not a "two's complement" representation. +#endif +#if LONG_MIN * -1 == LONG_MAX + This is not a "two's complement" representation. +#endif + +/* On two's complement representation this expression evaluate to false. */ +#if defined (ULONG_MAX) && ULONG_MAX / 2 > LONG_MIN + This is not "two's complement" representation or mis-implementation. +#endif + +/* Right bit-shift of negative number is implementation-defined. */ +#if -2 >> 1 == -1 + Arithmetic right shift of negative number. +#elif -2 >> 1 == LONG_MAX + Logical shift of negative number of "two's complement" representation. +#else + Maybe logical shift of other than "two's complement" representation. +#endif + +/* Dividing or modulo containing negative operand is not portable. */ +#if -7 / 3 != -2 + Not algebraic dividing of negative number. +#endif +#if -7 % 3 != -1 + What ? +#endif +} + +/* + * PART 8 + * Extended or obsolete facilities. + */ + +non_standard() +{ +#if defined __cplusplus || __STDC_VERSION__ == 199901L + // Comment in C++ style, terminating with '\x95\x5C' encoded in shift-JIS ɽ + "__cplusplus" is defined or "__STDC_VERSION__" equals 199901L. +#endif + +/* sizeof in #if expression is disallowed in Standard C */ +#if sizeof (long) < sizeof (int) +# error bad long properties +#endif +#if sizeof (char *) == 2 && sizeof (int (*)()) == 2 + puts( "This is a small memory model."); +#endif + +#if __MCPP > 1 +/* Trace the process of macro expansion */ +#ifdef __STDC__ +#pragma MCPP debug memory /* list heap memory */ +#pragma MCPP debug token /* trace token */ +#else +#debug memory +#debug token +#endif +/* glue ( a, b)c; */ + glue( glue( a, b), c); +#ifdef __STDC__ +#pragma MCPP end_debug token /* no debug */ +#else +#end_debug token +#endif +#endif /* __MCPP */ + +#define TRUE 1 +#define FALSE 0 +#ifndef __STDC__ +#ifdef __MCPP +#assert TRUE != 0 && FALSE == 0 +#endif +#endif +} + +put_long() +{ + char * line = "line"; +#ifndef __STDC__ +#ifdef __MWC09__ +/* Assemly source for Microware-C/09 */ +/* fputs( line, stdout); */ +#asm + leax _iob+13,y /* stdout */ + pshs x + ldd 2,s /* line */ + pshs d + lbsr fputs + leas 4,s +#endasm +#endif +#endif +} + +/* + * PART 9 + * Ambiguous macros and others. + */ +wide_and_nonwide() +{ +/* Wide-character string literal following string literal and vice versa. */ + "string" L""; + L"" "string"; +} + +ambiguous() +{ +/* Result of "f(2)(9)" is left intentionally ambiguous by Standard (ANSI C + "Rationale", 3.8.3.4). */ +/* 2*f(9); or 2*9*g; */ +#define f(a) a*g +#define g(a) f(a) + f(2)(9); +} + diff --git a/libraries/mcpp/test-t/n_1.t b/libraries/mcpp/test-t/n_1.t new file mode 100644 index 000000000..9c7f84e06 --- /dev/null +++ b/libraries/mcpp/test-t/n_1.t @@ -0,0 +1,15 @@ +/* n_1.t: Conversion of trigraph sequences. */ + +/* 1.1: The following 9 sequences are valid trigraph sequences. */ +/* [ ] \ ^ { } | ~ #; */ + ??( ??) ??/ ??' ??< ??> ??! ??- ??=; + +/* 1.2: In directive line. */ +/* ab | cd; */ +??= define OR( a, b) a ??! b + OR( ab, cd); + +/* 1.3: Any sequence other than above 9 is not a trigraph sequence. */ +/* ?? ??? ??% ??^ ?#; */ + ?? ??? ??% ??^ ???=; + diff --git a/libraries/mcpp/test-t/n_10.t b/libraries/mcpp/test-t/n_10.t new file mode 100644 index 000000000..fab527c6f --- /dev/null +++ b/libraries/mcpp/test-t/n_10.t @@ -0,0 +1,27 @@ +/* n_10.t: #if, #elif, #else and #endif pp-directive. */ + +#define MACRO_0 0 +#define MACRO_1 1 + +/* 10.1: */ +/* Note: an undefined identifier in #if expression is replaced to 0. */ +/* 1; */ +#if a + a; +#elif MACRO_0 + MACRO_0; +#elif MACRO_1 /* Valid block */ + MACRO_1; +#else + 0; +#endif + +/* 10.2: Comments must be processed even if in skipped #if block. */ +/* At least tokenization of string literal and character constant is necessary + to process comments, e.g. /* is not a comment mark in string literal. + */ +#ifdef UNDEFINED + /* Comment */ + "in literal /* is not a comment" +#endif + diff --git a/libraries/mcpp/test-t/n_11.t b/libraries/mcpp/test-t/n_11.t new file mode 100644 index 000000000..92aafb728 --- /dev/null +++ b/libraries/mcpp/test-t/n_11.t @@ -0,0 +1,28 @@ +/* n_11.t: Operator "defined" in #if or #elif directive. */ + +#define MACRO_abc abc +#define MACRO_0 0 +#define ZERO_TOKEN + +/* 11.1: */ +/* abc; */ +/* abc; */ +#if defined a + a; +#else + MACRO_abc; +#endif +#if defined (MACRO_abc) + MACRO_abc; +#else + 0; +#endif + +/* 11.2: "defined" is an unary operator whose result is 1 or 0. */ +#if defined MACRO_0 * 3 != 3 + Bad handling of "defined" operator. +#endif +#if (!defined ZERO_TOKEN != 0) || (-defined ZERO_TOKEN != -1) + Bad grouping of "defined", !, - operator. +#endif + diff --git a/libraries/mcpp/test-t/n_12.t b/libraries/mcpp/test-t/n_12.t new file mode 100644 index 000000000..1ae12d42d --- /dev/null +++ b/libraries/mcpp/test-t/n_12.t @@ -0,0 +1,42 @@ +/* n_12.t: Integer preprocessing number token and type of #if expression. */ + +#include + +/* 12.1: Type long. */ +#if LONG_MAX <= LONG_MIN + Bad evaluation of long. +#endif +#if LONG_MAX <= 1073741823 /* 0x3FFFFFFF */ + Bad evaluation of long. +#endif + +/* 12.2: Type unsigned long. */ +#if ULONG_MAX / 2 < LONG_MAX + Bad evaluation of unsigned long. +#endif + +/* 12.3: Octal number. */ +#if 0177777 != 65535 + Bad evaluation of octal number. +#endif + +/* 12.4: Hexadecimal number. */ +#if 0Xffff != 65535 || 0xFfFf != 65535 + Bad evaluation of hexadecimal number. +#endif + +/* 12.5: Suffix 'L' or 'l'. */ +#if 0L != 0 || 0l != 0 + Bad evaluation of 'L' suffix. +#endif + +/* 12.6: Suffix 'U' or 'u'. */ +#if 1U != 1 || 1u != 1 + Bad evaluation of 'U' suffix. +#endif + +/* 12.7: Negative integer. */ +#if 0 <= -1 + Bad evaluation of negative number. +#endif + diff --git a/libraries/mcpp/test-t/n_13.t b/libraries/mcpp/test-t/n_13.t new file mode 100644 index 000000000..6b8c961e4 --- /dev/null +++ b/libraries/mcpp/test-t/n_13.t @@ -0,0 +1,37 @@ +/* n_13.t: Valid operators in #if expression. */ + +/* Valid operators are (precedence in this order) : + defined, (unary)+, (unary)-, ~, !, + *, /, %, + +, -, + <<, >>, + <, >, <=, >=, + ==, !=, + &, + ^, + |, + &&, + ||, + ? : + */ + +/* 13.1: Bit shift. */ +#if 1 << 2 != 4 || 8 >> 1 != 4 + Bad arithmetic of <<, >> operators. +#endif + +/* 13.2: Bitwise operators. */ +#if (3 ^ 5) != 6 || (3 | 5) != 7 || (3 & 5) != 1 + Bad arithmetic of ^, |, & operators. +#endif + +/* 13.3: Result of ||, && operators is either of 1 or 0. */ +#if (2 || 3) != 1 || (2 && 3) != 1 || (0 || 4) != 1 || (0 && 5) != 0 + Bad arithmetic of ||, && operators. +#endif + +/* 13.4: ?, : operator. */ +#if (0 ? 1 : 2) != 2 + Bad arithmetic of ?: operator. +#endif + diff --git a/libraries/mcpp/test-t/n_13_13.t b/libraries/mcpp/test-t/n_13_13.t new file mode 100644 index 000000000..be4f74054 --- /dev/null +++ b/libraries/mcpp/test-t/n_13_13.t @@ -0,0 +1,30 @@ +/* n_13_13.t: #if expression with macros. */ + +#define ZERO_TOKEN +#define MACRO_0 0 +#define MACRO_1 1 +#if ! __cplusplus +#define and && +#define or || +#define not_eq != +#define bitor | +#endif + +/* 13.13: With macros expanding to operators. */ +/* Valid block */ +#if (1 bitor 2) == 3 and 4 not_eq 5 or 0 + /* #if (1 | 2) == 3 && 4 != 5 || 0 */ + Valid block +#else + Block to be skipped +#endif + +/* 13.14: With macros expanding to 0 token, nonsence but legal expression.*/ +/* Valid block */ +#if ZERO_TOKEN MACRO_1 ZERO_TOKEN > ZERO_TOKEN MACRO_0 ZERO_TOKEN + /* #if 1 > 0 */ + Valid block +#else + Block to be skipped +#endif + diff --git a/libraries/mcpp/test-t/n_13_5.t b/libraries/mcpp/test-t/n_13_5.t new file mode 100644 index 000000000..68b746230 --- /dev/null +++ b/libraries/mcpp/test-t/n_13_5.t @@ -0,0 +1,22 @@ +/* n_13_5.t: Arithmetic conversion in #if expressions. */ + +/* 13.5: The usual arithmetic conversion is not performed on bit shift. */ +#if -1 << 3U > 0 + Bad conversion of bit shift operands. +#endif + +/* 13.6: Usual arithmetic conversions. */ +#if -1 <= 0U /* -1 is converted to unsigned long. */ + Bad arithmetic conversion. +#endif + +#if -1 * 1U <= 0 + Bad arithmetic conversion. +#endif + +/* Second and third operands of conditional operator are converted to the + same type, thus -1 is converted to unsigned long. */ +#if (1 ? -1 : 0U) <= 0 + Bad arithmetic conversion. +#endif + diff --git a/libraries/mcpp/test-t/n_13_7.t b/libraries/mcpp/test-t/n_13_7.t new file mode 100644 index 000000000..db0584f58 --- /dev/null +++ b/libraries/mcpp/test-t/n_13_7.t @@ -0,0 +1,25 @@ +/* n_13_7.t: Short-circuit evaluation of #if expression. */ + +/* 13.7: 10/0 or 10/MACRO_0 are never evaluated, "divide by zero" error + cannot occur. */ +#define MACRO_0 0 + +/* Valid block */ +#if 0 && 10 / 0 + Block to be skipped +#endif +#if not_defined && 10 / not_defined + Block to be skipped +#endif +#if MACRO_0 && 10 / MACRO_0 > 1 + Block to be skipped +#endif +#if MACRO_0 ? 10 / MACRO_0 : 0 + Block to be skipped +#endif +#if MACRO_0 == 0 || 10 / MACRO_0 > 1 + Valid block +#else + Block to be skipped +#endif + diff --git a/libraries/mcpp/test-t/n_13_8.t b/libraries/mcpp/test-t/n_13_8.t new file mode 100644 index 000000000..c079533e0 --- /dev/null +++ b/libraries/mcpp/test-t/n_13_8.t @@ -0,0 +1,31 @@ +/* n_13_8.t: Grouping of sub-expressions in #if expression. */ + +/* 13.8: Unary operators are grouped from right to left. */ +#if (- -1 != 1) || (!!9 != 1) || (-!+!9 != -1) || (~~1 != 1) + Bad grouping of -, +, !, ~ in #if expression. +#endif + +/* 13.9: ?: operators are grouped from right to left. */ +#if (1 ? 2 ? 3 ? 3 : 2 : 1 : 0) != 3 + Bad grouping of ? : in #if expression. +#endif + +/* 13.10: Other operators are grouped from left to right. */ +#if (15 >> 2 >> 1 != 1) || (3 << 2 << 1 != 24) + Bad grouping of >>, << in #if expression. +#endif + +/* 13.11: Test of precedence. */ +#if 3*10/2 >> !0*2 >> !+!-9 != 1 + Bad grouping of -, +, !, *, /, >> in #if expression. +#endif + +/* 13.12: Overall test. Grouped as: + ((((((+1 - -1 - ~~1 - -!0) & 6) | ((8 % 9) ^ (-2 * -2))) >> 1) == 7) + ? 7 : 0) != 7 + evaluated to FALSE. + */ +#if (((+1- -1-~~1- -!0&6|8%9^-2*-2)>>1)==7?7:0)!=7 + Bad arithmetic of #if expression. +#endif + diff --git a/libraries/mcpp/test-t/n_15.t b/libraries/mcpp/test-t/n_15.t new file mode 100644 index 000000000..b8c7d45f2 --- /dev/null +++ b/libraries/mcpp/test-t/n_15.t @@ -0,0 +1,20 @@ +/* n_15.t: #ifdef, #ifndef directives. */ + +#define MACRO_1 1 + +/* 15.1: #ifdef directive. */ +/* Valid block */ +#ifdef MACRO_1 + Valid block +#else + Block to be skipped +#endif + +/* 15.2: #ifndef directive. */ +/* Valid block */ +#ifndef MACRO_1 + Block to be skipped +#else + Valid block +#endif + diff --git a/libraries/mcpp/test-t/n_18.t b/libraries/mcpp/test-t/n_18.t new file mode 100644 index 000000000..56cc7b96d --- /dev/null +++ b/libraries/mcpp/test-t/n_18.t @@ -0,0 +1,24 @@ +/* n_18.t: #define directive. */ + +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +#define ZERO_TOKEN + +/* 18.1: Definition of an object-like macro. */ +/* (1-1); */ + OBJ_LIKE; +/* Macro defined to no token. */ +/* ; */ + ZERO_TOKEN; + +/* 18.2: Definition of a function-like macro. */ +/* ( c ); */ + FTN_LIKE( c); + +/* 18.3: Spelling in string identical to parameter is not a parameter. */ +/* "n1:n2"; */ +#define STR( n1, n2) "n1:n2" + STR( 1, 2); + diff --git a/libraries/mcpp/test-t/n_19.t b/libraries/mcpp/test-t/n_19.t new file mode 100644 index 000000000..7d2e28462 --- /dev/null +++ b/libraries/mcpp/test-t/n_19.t @@ -0,0 +1,16 @@ +/* n_19.t: Valid re-definitions of macros. */ + +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* 19.1: */ +#define OBJ_LIKE /* white space */ (1-1) /* other */ + +/* 19.2: */ +#define FTN_LIKE( a )( /* note the white space */ \ + a /* other stuff on this line + */ ) +/* ( c ); */ + FTN_LIKE( c); + diff --git a/libraries/mcpp/test-t/n_2.t b/libraries/mcpp/test-t/n_2.t new file mode 100644 index 000000000..40fd50e13 --- /dev/null +++ b/libraries/mcpp/test-t/n_2.t @@ -0,0 +1,34 @@ +/* n_2.t: Line splicing by sequence. */ + +/* 2.1: In a #define directive line, between the parameter list and the + replacement text. */ +/* ab + cd + ef; */ +#define FUNC( a, b, c) \ + a + b + c + FUNC( ab, cd, ef); + +/* 2.2: In a #define directive line, among the parameter list and among the + replacement text. */ +/* ab + cd + ef; */ +#undef FUNC +#define FUNC( a, b \ + , c) \ + a + b \ + + c + FUNC( ab, cd, ef); + +/* 2.3: In a string literal. */ +/* "abcde" */ + "abc\ +de" + +/* 2.4: in midst of an identifier. */ +/* abcde */ + abc\ +de + +/* 2.5: by trigraph. */ +/* abcde */ + abc??/ +de + diff --git a/libraries/mcpp/test-t/n_20.t b/libraries/mcpp/test-t/n_20.t new file mode 100644 index 000000000..f839dd13a --- /dev/null +++ b/libraries/mcpp/test-t/n_20.t @@ -0,0 +1,7 @@ +/* n_20.t: Definition of macro lexically identical to keyword. */ + +/* 20.1: */ +/* double fl; */ +#define float double + float fl; + diff --git a/libraries/mcpp/test-t/n_21.t b/libraries/mcpp/test-t/n_21.t new file mode 100644 index 000000000..abdd67a1f --- /dev/null +++ b/libraries/mcpp/test-t/n_21.t @@ -0,0 +1,13 @@ +/* n_21.t: Tokenization (No preprocessing tokens are merged implicitly). */ + +/* 21.1: */ +/* - - -a; */ +#define MINUS - + -MINUS-a; + +/* 21.2: */ +#define sub( a, b) a-b /* '(a)-(b)' is better */ +#define Y -y /* '(-y)' is better */ +/* x- -y; */ + sub( x, Y); + diff --git a/libraries/mcpp/test-t/n_22.t b/libraries/mcpp/test-t/n_22.t new file mode 100644 index 000000000..f4d751274 --- /dev/null +++ b/libraries/mcpp/test-t/n_22.t @@ -0,0 +1,17 @@ +/* n_22.t: Tokenization of preprocessing number. */ + +#define EXP 1 + +/* 22.1: 12E+EXP is a preprocessing number, EXP is not expanded. */ +/* 12E+EXP; */ + 12E+EXP; + +/* 22.2: .2e-EXP is also a preprocessing number. */ +/* .2e-EXP; */ + .2e-EXP; + +/* 22.3: + or - is allowed only following E or e, 12+EXP is not a + preprocessing number. */ +/* Three tokens: 12 + 1; */ + 12+EXP; + diff --git a/libraries/mcpp/test-t/n_23.t b/libraries/mcpp/test-t/n_23.t new file mode 100644 index 000000000..7a2f01ca2 --- /dev/null +++ b/libraries/mcpp/test-t/n_23.t @@ -0,0 +1,14 @@ +/* n_23.t: ## operator in macro definition. */ + +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) + +/* 23.1: */ +/* xy; */ + glue( x, y); + +/* 23.2: Generate a preprocessing number. */ +/* .12e+2; */ +#define EXP 2 + xglue( .12e+, EXP); + diff --git a/libraries/mcpp/test-t/n_24.t b/libraries/mcpp/test-t/n_24.t new file mode 100644 index 000000000..e6779bba3 --- /dev/null +++ b/libraries/mcpp/test-t/n_24.t @@ -0,0 +1,32 @@ +/* n_24.t: # operator in macro definition. */ + +#define str( a) # a + +/* 24.1: White spaces should not be inserted (silly specification). */ +/* "a+b"; */ + str( a+b); + +/* 24.2: White spaces between tokens of operand are converted to one space. + */ +/* "ab + cd"; */ + str( ab /* comment */ + + cd ); + +/* 24.3: \ is inserted before \ and " in or surrounding literals and no + other character is inserted to anywhere. */ +/* "'\"' + \"' \\\"\""; */ + str( '"' + "' \""); + +/* 24.4: Line splicing by is done prior to token + parsing. */ +/* "\"abc\""; */ + str( "ab\ +c"); + +/* 24.5: Token separator inserted by macro expansion should be removed. + (Meanwhile, tokens should not be merged. See 21.2.) */ +#define xstr( a) str( a) +#define f(a) a +/* "x-y"; */ + xstr( x-f(y)); + diff --git a/libraries/mcpp/test-t/n_25.t b/libraries/mcpp/test-t/n_25.t new file mode 100644 index 000000000..0449483fe --- /dev/null +++ b/libraries/mcpp/test-t/n_25.t @@ -0,0 +1,35 @@ +/* n_25.t: Macro arguments are pre-expanded (unless the argument is an + operand of # or ## operator) separately, that is, are macro-replaced + completely prior to rescanning. */ + +#define MACRO_0 0 +#define MACRO_1 1 +#define ZERO_TOKEN +#define TWO_ARGS a,b +#define sub( x, y) (x - y) +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) +#define str( a) # a + +/* 25.1: "TWO_ARGS" is read as one argument to "sub" then expanded to + "a,b", then "x" is substituted by "a,b". */ +/* (a,b - 1); */ + sub( TWO_ARGS, 1); + +/* 25.2: An argument pre-expanded to 0-token. */ +/* ( - 1); */ + sub( ZERO_TOKEN, 1); + +/* 25.3: "glue( a, b)" is pre-expanded. */ +/* abc; */ + xglue( glue( a, b), c); + +/* 25.4: Operands of ## operator are not pre-expanded. */ +/* MACRO_0MACRO_1; */ + glue( MACRO_0, MACRO_1); + +/* 25.5: Operand of # operator is not pre-expanded. */ +/* "ZERO_TOKEN"; */ +#define ZERO_TOKEN + str( ZERO_TOKEN); + diff --git a/libraries/mcpp/test-t/n_26.t b/libraries/mcpp/test-t/n_26.t new file mode 100644 index 000000000..e33cbb417 --- /dev/null +++ b/libraries/mcpp/test-t/n_26.t @@ -0,0 +1,28 @@ +/* n_26.t: The name once replaced is not furthur replaced. */ + +/* 26.1: Directly recursive object-like macro definition. */ +/* Z[0]; */ +#define Z Z[0] + Z; + +/* 26.2: Intermediately recursive object-like macro definition. */ +/* AB; */ +#define AB BA +#define BA AB + AB; + +/* 26.3: Directly recursive function-like macro definition. */ +/* x + f(x); */ +#define f(a) a + f(a) + f( x); + +/* 26.4: Intermediately recursive function-like macro definition. */ +/* x + x + g( x); */ +#define g(a) a + h( a) +#define h(a) a + g( a) + g( x); + +/* 26.5: Rescanning encounters the non-replaced macro name. */ +/* Z[0] + f( Z[0]); */ + f( Z); + diff --git a/libraries/mcpp/test-t/n_27.t b/libraries/mcpp/test-t/n_27.t new file mode 100644 index 000000000..6ff52f6de --- /dev/null +++ b/libraries/mcpp/test-t/n_27.t @@ -0,0 +1,51 @@ +/* n_27.t: Rescanning of a macro replace any macro call in the replacement + text after substitution of parameters by pre-expanded-arguments. This + re-examination may involve the succeding sequences from the source + file (what a queer thing!). */ + +/* 27.1: Cascaded use of object-like macros. */ +/* 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8; */ +#define NEST8 NEST7 + 8 +#define NEST7 NEST6 + 7 +#define NEST6 NEST5 + 6 +#define NEST5 NEST4 + 5 +#define NEST4 NEST3 + 4 +#define NEST3 NEST2 + 3 +#define NEST2 NEST1 + 2 +#define NEST1 1 + NEST8; + +/* 27.2: Cascaded use of function-like macros. */ +/* (1) + (1 + 2) + 1 + 2 + 1 + 2 + 3 + 1 + 2 + 3 + 4; */ +#define FUNC4( a, b) FUNC3( a, b) + NEST4 +#define FUNC3( a, b) FUNC2( a, b) + NEST3 +#define FUNC2( a, b) FUNC1( a, b) + NEST2 +#define FUNC1( a, b) (a) + (b) + FUNC4( NEST1, NEST2); + +/* 27.3: An identifier generated by ## operator is subject to expansion. */ +/* 1; */ +#define glue( a, b) a ## b +#define MACRO_1 1 + glue( MACRO_, 1); + +#define sub( x, y) (x - y) +#define head sub( +#define math( op, a, b) op( (a), (b)) + +/* 27.4: 'sub' as an argument of math() is not pre-expanded, since '(' is + missing. */ +/* ((a) - (b)); */ + math( sub, a, b); + +/* 27.5: Queer thing. */ +/* (a - b); */ + head a,b ); + +/* 27.6: Recursive macro (the 2nd 'm' is expanded to 'n' since it is in + source file). */ +/* n; */ +#define m n +#define n( a) a + m( m); + diff --git a/libraries/mcpp/test-t/n_28.t b/libraries/mcpp/test-t/n_28.t new file mode 100644 index 000000000..0d286007d --- /dev/null +++ b/libraries/mcpp/test-t/n_28.t @@ -0,0 +1,32 @@ +/* n_28.t: __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ and + __STDC_VERSION__ are predefined. */ + +/* 28.1: */ +/* "n_28.t"; */ + __FILE__; + +/* 28.2: */ +/* 10; */ + __LINE__; + +/* 28.3: */ +/* "Aug 1 2001"; */ + __DATE__; + +/* 28.4: */ +/* "21:42:22"; */ + __TIME__; + +/* 28.5: */ +/* 1; */ + __STDC__; + +/* 28.6: */ +/* 199409L; */ +/* In C99, the value of this macro is 199901L */ + __STDC_VERSION__; + +/* 28.7: __LINE__, __FILE__ in an included file. */ +/* 3; "line.h"; */ +#include "line.h" + diff --git a/libraries/mcpp/test-t/n_29.t b/libraries/mcpp/test-t/n_29.t new file mode 100644 index 000000000..a20ee23d3 --- /dev/null +++ b/libraries/mcpp/test-t/n_29.t @@ -0,0 +1,11 @@ +/* n_29.t: #undef directive. */ + +/* 29.1: Undefined macro is not a macro. */ +/* DEFINED; */ +#define DEFINED +#undef DEFINED + DEFINED; + +/* 29.2: Undefining undefined name is not an error. */ +#undef UNDEFINED + diff --git a/libraries/mcpp/test-t/n_3.t b/libraries/mcpp/test-t/n_3.t new file mode 100644 index 000000000..cb513a20f --- /dev/null +++ b/libraries/mcpp/test-t/n_3.t @@ -0,0 +1,26 @@ +/* n_3.t: Handling of comment. */ + +/* 3.1: A comment is converted to one space. */ +/* abc de */ + abc/* comment */de + +/* 3.2: // is not a comment of C. */ +#if 0 /* This feature is obsolete now. */ +/* // is not a comment of C */ + // is not a comment of C +#endif + +/* 3.3: Comment is parsed prior to the parsing of preprocessing directive. */ +/* abcd */ +#if 0 + "nonsence"; /* +#else + still in + comment */ +#else +#define MACRO_abcd /* + in comment + */ abcd +#endif + MACRO_abcd + diff --git a/libraries/mcpp/test-t/n_30.t b/libraries/mcpp/test-t/n_30.t new file mode 100644 index 000000000..d6c7b30b3 --- /dev/null +++ b/libraries/mcpp/test-t/n_30.t @@ -0,0 +1,18 @@ +/* n_30.t: Macro call. */ +/* Note: Comma separate the arguments of function-like macro call, + but comma between matching inner parenthesis doesn't. This feature + is tested on so many places in this suite especially on *.c samples + which use assert() macro, that no separete item to test this feature + is provided. */ + +/* 30.1: A macro call may cross the lines. */ +#define FUNC( a, b, c) a + b + c +/* a + b + c; */ + FUNC + ( + a, + b, + c + ) + ; + diff --git a/libraries/mcpp/test-t/n_32.t b/libraries/mcpp/test-t/n_32.t new file mode 100644 index 000000000..cb36717f2 --- /dev/null +++ b/libraries/mcpp/test-t/n_32.t @@ -0,0 +1,12 @@ +/* n_32.t: Escape sequence in character constant in #if expression. */ + +/* 32.1: Character octal escape sequence. */ +#if '\123' != 83 + Bad evaluation of octal escape sequence. +#endif + +/* 32.2: Character hexadecimal escape sequence. */ +#if '\x1b' != '\033' + Bad evaluation of hexadecimal escape sequence. +#endif + diff --git a/libraries/mcpp/test-t/n_37.t b/libraries/mcpp/test-t/n_37.t new file mode 100644 index 000000000..0c5e129d4 --- /dev/null +++ b/libraries/mcpp/test-t/n_37.t @@ -0,0 +1,88 @@ +/* n_37.t: Translation limits. */ + +/* 37.1: Number of parameters in macro: at least 31. */ +#define glue31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E) \ + a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p##q##r##s##t##u##v##w##x##y##z##A##B##C##D##E + +/* 37.2: Number of arguments of macro call: at least 31. */ +/* ABCDEFGHIJKLMNOPQRSTUVWXYZabcde; */ + glue31( A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R + , S, T, U, V, W, X, Y, Z, a, b, c, d, e); + +/* 37.3: Significant initial characters in an internal identifier or a + macro name: at least 31. */ +/* ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_; */ + ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_; + +/* 37.4: Nested conditional inclusion: at least 8 levels. */ +/* nest = 8; */ +#ifdef A +#else +# ifdef B +# else +# ifdef C +# else +# ifdef D +# else +# ifdef E +# else +# ifdef F +# else +# ifdef G +# else +# ifdef H +# else + nest = 8; +# endif +# endif +# endif +# endif +# endif +# endif +# endif +#endif + +/* 37.5: Nested source file inclusion: at least 8 levels. */ +#define X8 +/* nest = 1; nest = 2; nest = 3; nest = 4; + nest = 5; nest = 6; nest = 7; nest = 8; */ +#include "nest1.h" + +/* 37.6: Parenthesized expression: at least 32 levels. */ +/* nest = 32; */ +#if 0 + (1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + (9 - (10 + (11 - (12 + \ + (13 - (14 + (15 - (16 + (17 - (18 + (19 - (20 + (21 - (22 + (23 - \ + (24 + (25 - (26 + (27 - (28 + (29 - (30 + (31 - (32 + 0)))))))))) \ + )))))))))))))))))))))) == 0 + nest = 32; +#endif + +/* 37.7: Characters in a string (after concatenation): at least 509. */ +"123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +012345678901234567" + ; + +/* 37.8: Characters in a logical source line: at least 509. */ + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int A123456789012345678901234567890 = 123456; \ + int B123456789012345678901234567890 = 123457; \ + int C123456789012345678901234567890 = 123458; \ + int D1234567890123456789012 = 123459; + +/* 37.9: Macro definitions: at least 1024. */ +#define X0400 +#include "m4095.h" +/* 0x0400; */ + BNJ; + diff --git a/libraries/mcpp/test-t/n_3_4.t b/libraries/mcpp/test-t/n_3_4.t new file mode 100644 index 000000000..b0cce1a4a --- /dev/null +++ b/libraries/mcpp/test-t/n_3_4.t @@ -0,0 +1,8 @@ +/* n_3_4.t: Handling of comment and . */ + +/* 3.4: Comment and in #error line. */ +#error Message of first physical line. \ + Message of second physical and first logical line. /* + this comment splices the lines + */ Message of forth physical and third logical line. + diff --git a/libraries/mcpp/test-t/n_4.t b/libraries/mcpp/test-t/n_4.t new file mode 100644 index 000000000..2e2a4bfa5 --- /dev/null +++ b/libraries/mcpp/test-t/n_4.t @@ -0,0 +1,12 @@ +/* n_4.t: Special tokens. */ + +/* 4.1: Digraph spellings in directive line. */ +/* "abc"; */ +%: define stringize( a) %: a + + stringize( abc); + +/* 4.2: Digraph spellings are retained in stringization. */ +/* "<:"; */ + stringize( <:); + diff --git a/libraries/mcpp/test-t/n_5.t b/libraries/mcpp/test-t/n_5.t new file mode 100644 index 000000000..c79bf7995 --- /dev/null +++ b/libraries/mcpp/test-t/n_5.t @@ -0,0 +1,10 @@ +/* n_5.t: Spaces or tabs are allowed at any place in pp-directive line, + including between the top of a pp-directive line and '#', and between + the '#' and the directive. */ + +/* 5.1: */ +/* |**|[TAB]# |**|[TAB]define |**| MACRO_abcde[TAB]|**| abcde |**| */ +/**/ # /**/ define /**/ MACRO_abcde /**/ abcde /**/ +/* abcde */ + MACRO_abcde + diff --git a/libraries/mcpp/test-t/n_6.t b/libraries/mcpp/test-t/n_6.t new file mode 100644 index 000000000..f8ae35493 --- /dev/null +++ b/libraries/mcpp/test-t/n_6.t @@ -0,0 +1,22 @@ +/* n_6.t: #include directive. */ + +/* 6.1: Header-name quoted by " and " as well as by < and > can include + standard headers. */ +/* Note: Standard headers can be included any times. */ +#include "ctype.h" +#include + +/* 6.2: Macro is allowed in #include line. */ +#define HEADER "header.h" +/* Before file inclusion: #include "header.h" */ +#include HEADER +/* abc */ + MACRO_abc + +/* 6.3: With macro nonsence but legal. */ +#undef MACRO_abc +#define ZERO_TOKEN +#include ZERO_TOKEN HEADER ZERO_TOKEN +/* abc */ + MACRO_abc + diff --git a/libraries/mcpp/test-t/n_7.t b/libraries/mcpp/test-t/n_7.t new file mode 100644 index 000000000..8232dba01 --- /dev/null +++ b/libraries/mcpp/test-t/n_7.t @@ -0,0 +1,18 @@ +/* n_7.t: #line directive. */ + +/* 7.1: Line number and filename. */ +/* 1234; "cpp"; */ +#line 1234 "cpp" + __LINE__; __FILE__; + +/* 7.2: Filename argument is optional. */ +/* 2345; "cpp"; */ +#line 2345 + __LINE__; __FILE__; + +/* 7.3: Argument with macro. */ +/* 3456; "n_7.t"; */ +#define LINE_AND_FILENAME 3456 "n_7.t" +#line LINE_AND_FILENAME + __LINE__; __FILE__; + diff --git a/libraries/mcpp/test-t/n_8.t b/libraries/mcpp/test-t/n_8.t new file mode 100644 index 000000000..8d3bc89d8 --- /dev/null +++ b/libraries/mcpp/test-t/n_8.t @@ -0,0 +1,12 @@ +/* n_8.t: #error directive. */ + +/* 8.1: Argument of #error directive is not a subject of macro expansion. + Output to stderr as an example: + Preprocessing error directive: MACRO is not a positive number. + from line 10 of file "n_8.t" + */ +#define MACRO 0 +#if MACRO <= 0 +#error MACRO is not a positive number. +#endif + diff --git a/libraries/mcpp/test-t/n_8_2.t b/libraries/mcpp/test-t/n_8_2.t new file mode 100644 index 000000000..8909a98d2 --- /dev/null +++ b/libraries/mcpp/test-t/n_8_2.t @@ -0,0 +1,5 @@ +/* n_8_2.t: Argument of #error is optional. */ + +/* 8.2: #error should be executed. */ +#error + diff --git a/libraries/mcpp/test-t/n_9.t b/libraries/mcpp/test-t/n_9.t new file mode 100644 index 000000000..acdb64baf --- /dev/null +++ b/libraries/mcpp/test-t/n_9.t @@ -0,0 +1,7 @@ +/* n_9.t: #pragma directive. */ + +/* 9.1: Any #pragma directive should be processed or ignored, should not + be diagnosed as an error. */ +#pragma once +#pragma who knows ? + diff --git a/libraries/mcpp/test-t/n_bool.cc b/libraries/mcpp/test-t/n_bool.cc new file mode 100644 index 000000000..c43e689b4 --- /dev/null +++ b/libraries/mcpp/test-t/n_bool.cc @@ -0,0 +1,23 @@ +/* bool.t */ +/* + * On C++: 'true' and 'false' are evaluated 1 and 0 respectively. + * and logical AND, logical OR are evaluated boolean. + */ + +/* Valid block; */ + +#define MACRO 1 +#define MACRO3 3 + +#if MACRO == true + Valid block; +#else + non-Valid block; +#endif + +#if (MACRO && MACRO3) == true + Valid block; +#else + non-Valid block; +#endif + diff --git a/libraries/mcpp/test-t/n_bool.t b/libraries/mcpp/test-t/n_bool.t new file mode 100644 index 000000000..c43e689b4 --- /dev/null +++ b/libraries/mcpp/test-t/n_bool.t @@ -0,0 +1,23 @@ +/* bool.t */ +/* + * On C++: 'true' and 'false' are evaluated 1 and 0 respectively. + * and logical AND, logical OR are evaluated boolean. + */ + +/* Valid block; */ + +#define MACRO 1 +#define MACRO3 3 + +#if MACRO == true + Valid block; +#else + non-Valid block; +#endif + +#if (MACRO && MACRO3) == true + Valid block; +#else + non-Valid block; +#endif + diff --git a/libraries/mcpp/test-t/n_cnvucn.cc b/libraries/mcpp/test-t/n_cnvucn.cc new file mode 100644 index 000000000..68d41a7d6 --- /dev/null +++ b/libraries/mcpp/test-t/n_cnvucn.cc @@ -0,0 +1,23 @@ +/* n_cnvucn.t: C++ Conversion from multi-byte character to UCN. */ +/* This conversion takes place in the translation phase 1. */ + +#define str( a) # a + + /* "\"\u6F22\u5B57\"" or "\"\\u6F22\\u5B57\"" */ + str( "") + +/* Multi-byte characters in identifier. */ +#define ޥ +#define ؿͥޥ(1, 2) 1 ## 2 +/* ; */ + ޥ; +/* ̾; */ + ؿͥޥ(, ̾); + +/* Multi-byte character in pp-number. */ +#define mkname( a) a ## 1 +#define mkstr( a) xmkstr( a) +#define xmkstr( a) # a +/* "abc1" */ + char * mkstr( mkname( abc)); + diff --git a/libraries/mcpp/test-t/n_cnvucn.t b/libraries/mcpp/test-t/n_cnvucn.t new file mode 100644 index 000000000..68d41a7d6 --- /dev/null +++ b/libraries/mcpp/test-t/n_cnvucn.t @@ -0,0 +1,23 @@ +/* n_cnvucn.t: C++ Conversion from multi-byte character to UCN. */ +/* This conversion takes place in the translation phase 1. */ + +#define str( a) # a + + /* "\"\u6F22\u5B57\"" or "\"\\u6F22\\u5B57\"" */ + str( "") + +/* Multi-byte characters in identifier. */ +#define ޥ +#define ؿͥޥ(1, 2) 1 ## 2 +/* ; */ + ޥ; +/* ̾; */ + ؿͥޥ(, ̾); + +/* Multi-byte character in pp-number. */ +#define mkname( a) a ## 1 +#define mkstr( a) xmkstr( a) +#define xmkstr( a) # a +/* "abc1" */ + char * mkstr( mkname( abc)); + diff --git a/libraries/mcpp/test-t/n_cplus.cc b/libraries/mcpp/test-t/n_cplus.cc new file mode 100644 index 000000000..65ad024e7 --- /dev/null +++ b/libraries/mcpp/test-t/n_cplus.cc @@ -0,0 +1,5 @@ +/* cplus.t: C++98 pre-defined macro __cplusplus. */ + +/* 199711L; */ + __cplusplus; + diff --git a/libraries/mcpp/test-t/n_cplus.t b/libraries/mcpp/test-t/n_cplus.t new file mode 100644 index 000000000..65ad024e7 --- /dev/null +++ b/libraries/mcpp/test-t/n_cplus.t @@ -0,0 +1,5 @@ +/* cplus.t: C++98 pre-defined macro __cplusplus. */ + +/* 199711L; */ + __cplusplus; + diff --git a/libraries/mcpp/test-t/n_dslcom.cc b/libraries/mcpp/test-t/n_dslcom.cc new file mode 100644 index 000000000..45301a028 --- /dev/null +++ b/libraries/mcpp/test-t/n_dslcom.cc @@ -0,0 +1,4 @@ +/* n_dslcom: // is a comment of C++ and C99. */ +/* a; */ + a; // is a comment of C++ and C99 + diff --git a/libraries/mcpp/test-t/n_dslcom.t b/libraries/mcpp/test-t/n_dslcom.t new file mode 100644 index 000000000..45301a028 --- /dev/null +++ b/libraries/mcpp/test-t/n_dslcom.t @@ -0,0 +1,4 @@ +/* n_dslcom: // is a comment of C++ and C99. */ +/* a; */ + a; // is a comment of C++ and C99 + diff --git a/libraries/mcpp/test-t/n_line.t b/libraries/mcpp/test-t/n_line.t new file mode 100644 index 000000000..dbebfad47 --- /dev/null +++ b/libraries/mcpp/test-t/n_line.t @@ -0,0 +1,7 @@ +/* n_line.t: line number argument of #line */ +/* C99: Range of line number in #line directive is [1..2147483647] */ + +/* 2147483647; */ +#line 2147483647 + __LINE__; + diff --git a/libraries/mcpp/test-t/n_llong.t b/libraries/mcpp/test-t/n_llong.t new file mode 100644 index 000000000..475e1c56c --- /dev/null +++ b/libraries/mcpp/test-t/n_llong.t @@ -0,0 +1,20 @@ +/* n_llong.t: long long in #if expression */ + +#if 12345678901234567890 < 13345678901234567890 + "long long #if expression is implemented." +#else + "long long #if expression is not implemented." +#endif + +#if 12345678901234567890LL < 13345678901234567890LL + Valid block +#else + Block to be skipped +#endif + +#if (0x7FFFFFFFFFFFFFFFULL - 0x6FFFFFFFFFFFFFFFULL) >> 60 == 1 + Valid block +#else + Block to be skipped +#endif + diff --git a/libraries/mcpp/test-t/n_nularg.t b/libraries/mcpp/test-t/n_nularg.t new file mode 100644 index 000000000..f2620b1d2 --- /dev/null +++ b/libraries/mcpp/test-t/n_nularg.t @@ -0,0 +1,26 @@ +/* n_nularg.t: Empty argument of macro call. */ + +#define ARG( a) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); */ + SHOWN( math( sub, , y)); + +/* printf( "%s : %s\n", "EMPTY", ""); */ + SHOWS( EMPTY); + +/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ + SHOWS( APPEND( CON, 1)); + +/* printf( "%s : %s\n", "APPEND( CON, )", "CON"); */ + SHOWS( APPEND( CON, )); + +/* printf( "%s : %s\n", "APPEND( , )", ""); */ + SHOWS( APPEND( , )); + diff --git a/libraries/mcpp/test-t/n_post.t b/libraries/mcpp/test-t/n_post.t new file mode 100644 index 000000000..edf10893b --- /dev/null +++ b/libraries/mcpp/test-t/n_post.t @@ -0,0 +1,772 @@ +/* + * n_post.t + * + * 1998/08 made public kmatsui + * 2002/08 revised not to conflict with C99 Standard kmatsui + * + * Samples to test "POST_STANDARD" mode of C preprocessing. + * POST_STANDARD cpp must process these samples as shown in each comments. + * POST_STANDARD cpp must process also #error directive properly, which is + * not included here because the directive might cause translator to + * terminate. + */ + + +#define ZERO_TOKEN +#define TWO_ARGS a,b +#define MACRO_0 0 +#define MACRO_1 1 +#define sub( x, y) (x - y) +#define str( a) # a +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) + + +/* n_2.t: Line splicing by sequence. */ + +/* 2.1: In a #define directive line, between the parameter list and the + replacement text. */ +/* ab + cd + ef ; */ +#define FUNC( a, b, c) \ + a + b + c + FUNC( ab, cd, ef); + +/* 2.2: In a #define directive line, among the parameter list and among the + replacement text. */ +/* ab + cd + ef ; */ +#undef FUNC +#define FUNC( a, b \ + , c) \ + a + b \ + + c + FUNC( ab, cd, ef); + +/* 2.3: In a string literal. */ +/* "abcde" */ + "abc\ +de" + +/* 2.4: in midst of an identifier. */ +/* abcde */ + abc\ +de + + + +/* n_3.t: Handling of comment. */ + +/* 3.1: A comment is converted to one space. */ +/* abc de */ + abc/* comment */de + +/* 3.2: // is not a comment of C. */ +#if 0 /* This feature is obsolete now. */ +/* / / is not a comment of C */ + // is not a comment of C +#endif + +/* 3.3: Comment is parsed prior to the parsing of preprocessing directive. */ +/* abcd */ +#if 0 + "nonsence"; /* +#else + still in + comment */ +#else +#define MACRO_abcd /* + in comment + */ abcd +#endif + MACRO_abcd + + +/* n_4.t: Special tokens. */ + +/* 4.1: Digraph spellings in directive line. */ +/* "abc" ; */ +%: define stringize( a) %: a + + stringize( abc); + +/* 4.2: Digraph spellings are converted in translation phase 1. */ +/* "[" ; */ + stringize( <:); + + +/* n_5.t: Spaces or tabs are allowed at any place in pp-directive line, + including between the top of a pp-directive line and '#', and between + the '#' and the directive. */ + +/* 5.1: */ +/* |**|[TAB]# |**|[TAB]define |**| MACRO_abcde[TAB]|**| abcde |**| */ +/**/ # /**/ define /**/ MACRO_abcde /**/ abcde /**/ +/* abcde */ + MACRO_abcde + + +/* n_6.t: #include directive. */ + +/* 6.1: Header-name quoted by " and " as well as by < and > can include + standard headers. */ +/* Note: Standard headers can be included any times. */ +#include "ctype.h" +#include /* An obsolescent feature. */ + +/* 6.2: Macro is allowed in #include line. */ +#define HEADER "header.h" +/* Before file inclusion: #include "header.h" */ +#include HEADER +/* abc */ + MACRO_abc + +/* 6.3: With macro nonsence but legal. */ +#undef MACRO_abc +#include ZERO_TOKEN HEADER ZERO_TOKEN +/* abc */ + MACRO_abc + + +/* n_7.t: #line directive. */ + +/* 7.1: Line number and filename. */ +/* 1234 ; "cpp" ; */ +#line 1234 "cpp" + __LINE__; __FILE__; + +/* 7.2: Filename argument is optional. */ +/* 2345 ; "cpp" ; */ +#line 2345 + __LINE__; __FILE__; + +/* 7.3: Argument with macro. */ +/* 3456 ; "n_7.t" ; */ +#define LINE_AND_FILENAME 3456 "n_7.t" +#line LINE_AND_FILENAME + __LINE__; __FILE__; + +/* Restore to correct line number and filename. */ +#line 149 "n_post.t" + + +/* n_9.t: #pragma directive. */ + +/* 9.1: Any #pragma directive should be processed or ignored, should not + be diagnosed as an error. */ +#pragma once +#pragma who knows ? + + +/* n_10.t: #if, #elif, #else and #endif pp-directive. */ + +/* 10.1: */ +/* Note: an undefined identifier in #if expression is replaced to 0. */ +/* 1 ; */ +#if a + a; +#elif MACRO_0 + MACRO_0; +#elif MACRO_1 /* Valid block */ + MACRO_1; +#else + 0; +#endif + +/* 10.2: Comments must be processed even if in skipped #if block. */ +/* At least tokenization of string literal and character constant is necessary + to process comments, e.g. /* is not a comment mark in string literal. + */ +#ifdef UNDEFINED + /* Comment */ + "in literal /* is not a comment" +#endif + + +/* n_11.t: Operator "defined" in #if or #elif directive. */ + +/* 11.1: */ +#undef MACRO_abc +#define MACRO_abc abc +/* abc ; */ +/* abc ; */ +#if defined a + a; +#else + MACRO_abc; +#endif +#if defined (MACRO_abc) + MACRO_abc; +#else + 0; +#endif + +/* 11.2: "defined" is an unary operator whose result is 1 or 0. */ +#if defined MACRO_0 * 3 != 3 + Bad handling of "defined" operator. +#endif +#if (!defined ZERO_TOKEN != 0) || (-defined ZERO_TOKEN != -1) + Bad grouping of "defined", !, - operator. +#endif + + +/* n_12.t: Integer preprocessing number token and type of #if expression. */ + +#include "limits.h" + +/* 12.1: Type long. */ +#if LONG_MAX <= LONG_MIN + Bad evaluation of long. +#endif +#if LONG_MAX <= 1073741823 /* 0x3FFFFFFF */ + Bad evaluation of long. +#endif + +/* 12.2: Type unsigned long. */ +#if ULONG_MAX / 2 < LONG_MAX + Bad evaluation of unsigned long. +#endif + +/* 12.3: Octal number. */ +#if 0177777 != 65535 + Bad evaluation of octal number. +#endif + +/* 12.4: Hexadecimal number. */ +#if 0Xffff != 65535 || 0xFfFf != 65535 + Bad evaluation of hexadecimal number. +#endif + +/* 12.5: Suffix 'L' or 'l'. */ +#if 0L != 0 || 0l != 0 + Bad evaluation of 'L' suffix. +#endif + +/* 12.6: Suffix 'U' or 'u'. */ +#if 1U != 1 || 1u != 1 + Bad evaluation of 'U' suffix. +#endif + + +/* n_13.t: Valid operators in #if expression. */ + +/* Valid operators are (precedence in this order) : + defined, (unary)+, (unary)-, ~, !, + *, /, %, + +, -, + <<, >>, + <, >, <=, >=, + ==, !=, + &, + ^, + |, + &&, + ||, + ? : + */ + +/* 13.1: Bit shift. */ +#if 1 << 2 != 4 || 8 >> 1 != 4 + Bad arithmetic of <<, >> operators. +#endif + +/* 13.2: Bitwise operators. */ +#if (3 ^ 5) != 6 || (3 | 5) != 7 || (3 & 5) != 1 + Bad arithmetic of ^, |, & operators. +#endif + +/* 13.3: Result of ||, && operators is either of 1 or 0. */ +#if (2 || 3) != 1 || (2 && 3) != 1 || (0 || 4) != 1 || (0 && 5) != 0 + Bad arithmetic of ||, && operators. +#endif + +/* 13.4: ?, : operator. */ +#if (0 ? 1 : 2) != 2 + Bad arithmetic of ?: operator. +#endif + + +/* n_13_5.t: Arithmetic conversion in #if expressions. */ + +/* 13.5: The usual arithmetic conversion is not performed on bit shift. */ +#if -1 << 3U > 0 + Bad conversion of bit shift operands. +#endif + +/* 13.6: Usual arithmetic conversions. */ +#if -1 <= 0U /* -1 is converted to unsigned long. */ + Bad arithmetic conversion. +#endif + +#if -1 * 1U <= 0 + Bad arithmetic conversion. +#endif + +/* Second and third operands of conditional operator are converted to the + same type, thus -1 is converted to unsigned long. */ +#if (1 ? -1 : 0U) <= 0 + Bad arithmetic conversion. +#endif + + +/* n_13_7.t: Short-circuit evaluation of #if expression. */ + +/* 13.7: 10/0 or 10/MACRO_0 are never evaluated, "divide by zero" error + cannot occur. */ +/* Valid block */ +#if 0 && 10 / 0 + Block to be skipped +#endif +#if not_defined && 10 / not_defined + Block to be skipped +#endif +#if MACRO_0 && 10 / MACRO_0 > 1 + Block to be skipped +#endif +#if MACRO_0 ? 10 / MACRO_0 : 0 + Block to be skipped +#endif +#if MACRO_0 == 0 || 10 / MACRO_0 > 1 + Valid block +#else + Block to be skipped +#endif + + +/* n_13_8.t: Grouping of sub-expressions in #if expression. */ + +/* 13.8: Unary operators are grouped from right to left. */ +#if (- -1 != 1) || (!!9 != 1) || (-!+!9 != -1) || (~~1 != 1) + Bad grouping of -, +, !, ~ in #if expression. +#endif + +/* 13.9: ?: operators are grouped from right to left. */ +#if (1 ? 2 ? 3 ? 3 : 2 : 1 : 0) != 3 + Bad grouping of ? : in #if expression. +#endif + +/* 13.10: Other operators are grouped from left to right. */ +#if (15 >> 2 >> 1 != 1) || (3 << 2 << 1 != 24) + Bad grouping of >>, << in #if expression. +#endif + +/* 13.11: Test of precedence. */ +#if 3*10/2 >> !0*2 >> !+!-9 != 1 + Bad grouping of -, +, !, *, /, >> in #if expression. +#endif + +/* 13.12: Overall test. Grouped as: + ((((((+1 - -1 - ~~1 - -!0) & 6) | ((8 % 9) ^ (-2 * -2))) >> 1) == 7) + ? 7 : 0) != 7 + evaluated to FALSE. + */ +#if (((+1- -1-~~1- -!0&6|8%9^-2*-2)>>1)==7?7:0)!=7 + Bad arithmetic of #if expression. +#endif + + +/* n_13_13.t: #if expression with macros. */ + +#define and && +#define or || +#define not_eq != +#define bitor | + +/* 13.13: With macros expanding to operators. */ +/* Valid block */ +#if (1 bitor 2) == 3 and 4 not_eq 5 or 0 + /* #if (1 | 2) == 3 && 4 != 5 || 0 */ + Valid block +#else + Block to be skipped +#endif + +/* 13.14: With macros expanding to 0 token, nonsence but legal expression.*/ +/* Valid block */ +#if ZERO_TOKEN MACRO_1 ZERO_TOKEN > ZERO_TOKEN MACRO_0 ZERO_TOKEN + /* #if 1 > 0 */ + Valid block +#else + Block to be skipped +#endif + + +/* n_15.t: #ifdef, #ifndef directives. */ + +/* 15.1: #ifdef directive. */ +/* Valid block */ +#ifdef MACRO_1 + Valid block +#else + Block to be skipped +#endif + +/* 15.2: #ifndef directive. */ +/* Valid block */ +#ifndef MACRO_1 + Block to be skipped +#else + Valid block +#endif + + +/* n_18.t: #define directive. */ + +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* 18.1: Definition of an object-like macro. */ +/* ( 1 - 1 ) ; */ + OBJ_LIKE; + +/* 18.2: Definition of a function-like macro. */ +/* ( c ) ; */ + FTN_LIKE( c); + +/* 18.3: Spelling in string identical to parameter is not a parameter. */ +/* "n1:n2" ; */ +#define STR( n1, n2) "n1:n2" + STR( 1, 2); + + +/* n_19.t: Valid re-definitions of macros. */ + +/* 19.1: */ +#define OBJ_LIKE /* white space */ (1-1) /* other */ + +/* 19.2: */ +#define FTN_LIKE( a )( /* note the white space */ \ + a /* other stuff on this line + */ ) + +/* 19.4: */ +#define OBJ_LIKE (1 - 1) /* different white space */ + +/* 19.6: */ +#define FTN_LIKE(b) ( b ) /* different parameter spelling */ + +/* ( c ) ; */ + FTN_LIKE( c); + + +/* n_20.t: Definition of macro lexically identical to keyword. */ + +/* 20.1: */ +/* double fl ; */ +#define float double + float fl; + + +/* n_21.t: Tokenization (No preprocessing tokens are merged implicitly). */ + +/* 21.1: */ +/* - - - a ; */ +#define MINUS - + -MINUS-a; + + +/* n_22.t: Tokenization of preprocessing number. */ + +#define EXP 1 + +/* 22.1: 12E+EXP is a preprocessing number, EXP is not expanded. */ +/* 12E+EXP ; */ + 12E+EXP; + +/* 22.2: .2e-EXP is also a preprocessing number. */ +/* .2e-EXP ; */ + .2e-EXP; + +/* 22.3: + or - is allowed only following E or e, 12+EXP is not a + preprocessing number. */ +/* Three tokens: 12 + 1 ; */ + 12+EXP; + + +/* n_23.t: ## operator in macro definition. */ + +/* 23.1: */ +/* xy ; */ + glue( x, y); + +/* 23.2: Generate a preprocessing number. */ +/* .12e+2 ; */ +#undef EXP +#define EXP 2 + xglue( .12e+, EXP); + + +/* n_24.t: # operator in macro definition. */ + +/* 24.1: */ +/* "a + b" ; */ + str( a+b); + +/* 24.2: White spaces between tokens of operand are converted to one space. + */ +/* "ab + cd" ; */ + str( ab /* comment */ + + cd ); + +/* 24.3: \ is inserted before \ and " in or surrounding literals and no + other character is inserted to anywhere. */ +/* "'\"' + \"' \\\"\"" ; */ + str( '"' + "' \""); + +/* 24.4: Line splicing by is done prior to token + parsing. */ +/* "\"abc\"" ; */ + str( "ab\ +c"); + + +/* n_25.t: Macro arguments are pre-expanded (unless the argument is an + operand of # or ## operator) separately, that is, macro-replaced + completely prior to rescanning. */ + +/* 25.1: "TWO_ARGS" is read as one argument to "sub", then expanded to + "a , b", then "x" is substituted by "a , b". */ +/* ( a , b - 1 ) ; */ + sub( TWO_ARGS, 1); + +/* 25.2: An argument pre-expanded to 0-token. */ +/* ( - 1 ) ; */ + sub( ZERO_TOKEN, 1); + +/* 25.3: "glue( a, b)" is pre-expanded. */ +/* abc ; */ + xglue( glue( a, b), c); + +/* 25.4: Operands of ## operator are not pre-expanded. */ +/* MACRO_0MACRO_1 ; */ + glue( MACRO_0, MACRO_1); + +/* 25.5: Operand of # operator is not pre-expanded. */ +/* "ZERO_TOKEN" ; */ + str( ZERO_TOKEN); + + +/* n_26.t: The name once replaced is not furthur replaced. */ + +/* 26.1: Directly recursive object-like macro definition. */ +/* Z [ 0 ] ; */ +#define Z Z[0] + Z; + +/* 26.2: Intermediately recursive object-like macro definition. */ +/* AB ; */ +#define AB BA +#define BA AB + AB; + +/* 26.3: Directly recursive function-like macro definition. */ +/* x + f ( x ) ; */ +#define f(a) a + f(a) + f( x); + +/* 26.4: Intermediately recursive function-like macro definition. */ +/* x + x + g ( x ) ; */ +#define g(a) a + h( a) +#define h(a) a + g( a) + g( x); + +/* 26.5: Rescanning encounters the non-replaced macro name. */ +/* Z [ 0 ] + f ( Z [ 0 ] ) ; */ + f( Z); + + +/* n_27.t: Rescanning of a macro expand any macro call in the replacement + text after substitution of parameters by pre-expanded-arguments. This + re-examination does not involve the succeding sequences from the + source file. */ + +/* 27.1: Cascaded use of object-like macros. */ +/* 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 ; */ +#define NEST8 NEST7 + 8 +#define NEST7 NEST6 + 7 +#define NEST6 NEST5 + 6 +#define NEST5 NEST4 + 5 +#define NEST4 NEST3 + 4 +#define NEST3 NEST2 + 3 +#define NEST2 NEST1 + 2 +#define NEST1 1 + NEST8; + +/* 27.2: Cascaded use of function-like macros. */ +/* ( 1 ) + ( 1 + 2 ) + 1 + 2 + 1 + 2 + 3 + 1 + 2 + 3 + 4 ; */ +#define FUNC4( a, b) FUNC3( a, b) + NEST4 +#define FUNC3( a, b) FUNC2( a, b) + NEST3 +#define FUNC2( a, b) FUNC1( a, b) + NEST2 +#define FUNC1( a, b) (a) + (b) + FUNC4( NEST1, NEST2); + +/* 27.3: An identifier generated by ## operator is subject to expansion. */ +/* 1 ; */ + glue( MACRO_, 1); + +#define head sub( +#define math( op, a, b) op( (a), (b)) +#define SUB sub + +/* 27.4: "sub" as an argument of math() is not pre-expanded, since '(' is + missing. */ +/* ( ( a ) - ( b ) ) ; */ + math( sub, a, b); + +/* 27.5: Object-like macro expanded to name of a function-like macro. */ +/* sub ( a , b ) ; */ + SUB( a, b); + + +/* n_28.t: __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ and + __STDC_VERSION__ are predefined. */ + +/* 28.1: */ +/* "n_post.t" ; */ + __FILE__; + +/* 28.2: */ +/* 629 ; */ + __LINE__; + +/* 28.3: */ +/* "Aug 1 2001"; */ + __DATE__; + +/* 28.4: */ +/* "21:42:22" ; */ + __TIME__; + +/* 28.5: */ +/* 1 ; */ + __STDC__; + +/* 28.6: */ +/* 199409L ; */ +/* In C99, the value of this macro is 199901L */ + __STDC_VERSION__; + +/* 28.7: __LINE__, __FILE__ in an included file. */ +/* 3 ; "line.h" ; */ +#include "line.h" + + +/* n_29.t: #undef directive. */ + +/* 29.1: Undefined macro is not a macro. */ +/* DEFINED ; */ +#define DEFINED +#undef DEFINED + DEFINED; + +/* 29.2: Undefining undefined name is not an error. */ +#undef UNDEFINED + + +/* n_30.t: Macro call. */ +/* Note: Comma separate the arguments of function-like macro call, + but comma between matching inner parenthesis doesn't. This feature + is tested on so many places in this suite especially on *.c samples + which use assert() macro, that no separete item to test this feature + is provided. */ + +/* 30.1: A macro call may cross the lines. */ +#define FUNC( a, b, c) a + b + c +/* a + b + c ; */ + FUNC + ( + a, + b, + c + ) + ; + + +/* n_37.t: Translation limits. */ + +/* 37.1: Number of parameters in macro: at least 31. */ +#define glue31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E) \ + a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p##q##r##s##t##u##v##w##x##y##z##A##B##C##D##E + +/* 37.2: Number of arguments of macro call: at least 31. */ +/* ABCDEFGHIJKLMNOPQRSTUVWXYZabcde ; */ + glue31( A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R + , S, T, U, V, W, X, Y, Z, a, b, c, d, e); + +/* 37.3: Significant initial characters in an internal identifier or a + macro name: at least 31. */ +/* ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_ ; */ + ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_; + +/* 37.4: Nested conditional inclusion: at least 8 levels. */ +/* nest = 8 ; */ +#ifdef A +#else +# ifdef B +# else +# ifdef C +# else +# ifdef D +# else +# ifdef E +# else +# ifdef F +# else +# ifdef G +# else +# ifdef H +# else + nest = 8; +# endif +# endif +# endif +# endif +# endif +# endif +# endif +#endif + +/* 37.5: Nested source file inclusion: at least 8 levels. */ +/* nest = 1 ; nest = 2 ; nest = 3 ; nest = 4 ; + nest = 5 ; nest = 6 ; nest = 7 ; nest = 8 ; */ +#define X8 +#include "nest1.h" + +/* 37.6: Parenthesized expression: at least 32 levels. */ +/* nest = 32 ; */ +#if 0 + (1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + (9 - (10 + (11 - (12 + \ + (13 - (14 + (15 - (16 + (17 - (18 + (19 - (20 + (21 - (22 + (23 - \ + (24 + (25 - (26 + (27 - (28 + (29 - (30 + (31 - (32 + 0)))))))))) \ + )))))))))))))))))))))) == 0 + nest = 32; +#endif + +/* 37.7: Characters in a string (after concatenation): at least 509. */ +"123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +012345678901234567" + ; + +/* 37.8: Characters in a logical source line: at least 509. */ + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int A123456789012345678901234567890 = 123456; \ + int B123456789012345678901234567890 = 123457; \ + int C123456789012345678901234567890 = 123458; \ + int D1234567890123456789012 = 123459; + +/* 37.9: Macro definitions: at least 1024. */ + +#define X0400 +#include "m4095.h" +/* 0x0400; */ + BNJ; + diff --git a/libraries/mcpp/test-t/n_post99.t b/libraries/mcpp/test-t/n_post99.t new file mode 100644 index 000000000..457a933a2 --- /dev/null +++ b/libraries/mcpp/test-t/n_post99.t @@ -0,0 +1,275 @@ +/* + * n_post99.t + * Samples to test "Post-C99" preprocessing. + * + * 2002/08 made public kmatsui + * 2003/03 slightly revised kmatsui + */ + + +/* n_dslcom: // is a comment of C99. */ +/* a ; */ + a; // is a comment of C99 + + +/* n_ppnum.t: Preprocessing number token *p+* */ +/* Undefined on C90, because '+A' is not a valid pp-token. */ + +#define A 3 +#define glue( a, b) a ## b +/* 12p+A ; */ + glue( 12p+, A); + + +/* n_line.t: line number argument of #line */ +/* C99: Range of line number in #line directive is [1..2147483647] */ + +#line 2147483647 + __LINE__; /* 2147483647 ; */ +#line 30 /* Resume the real line number */ + __LINE__; + + +/* n_llong.t: long long in #if expression */ + +#if 12345678901234567890 < 13345678901234567890 + "long long #if expression is implemented." +#else + "long long #if expression is not implemented." +#endif + + +/* n_vargs.t: Macro of variable arguments */ +/* from C99 Standard 6.10.3 Examples */ + #define debug( ...) fprintf( stderr, __VA_ARGS__) + #define showlist( ...) puts( #__VA_ARGS__) + #define report( test, ...) ((test) ? puts( #test) \ + : printf( __VA_ARGS__)) + { + /* fprintf ( stderr , "Flag" ) ; */ + debug( "Flag"); + /* fprintf ( stderr , "X = %d\n" , x ) ; */ + debug( "X = %d\n", x); + /* puts ( "The first , second , and third items ." ) ; */ + showlist( The first, second, and third items.); + /* ( ( x > y ) ? puts ( "x > y" ) : printf ( "x is %d but y is %d", x , y ) ) ; */ + report( x>y, "x is %d but y is %d", x, y); + } + + +/* n_pragma.t: _Pragma() operator */ +/* based on the proposal to C99 by Bill Homer */ + +#define Machine_B + +#include "pragmas.h" + +/* #pragma vfunction */ +Fast_call +void f(int n, double * a, double * b) { +/* #pragma ivdep */ + Independent + while(n-- > 0) { + *a++ += *b++; + } +} + +#define f(N, A, B) \ +{ int n = (N), double * a = (A), double * b = (B); \ + Independent while(n-- > 0) { *a++ += *b++; } \ +} + +#define EXPRAG(x) _Pragma(#x) +#define PRAGMA(x) EXPRAG(x) +#define LIBFUNC xyz + +int libfunc() { ... } + +/* Direct the linker to define alternate entry points for libfunc. */ +/* #pragma duplicate libfunc as ( lib_func , xyz ) */ +PRAGMA( duplicate libfunc as (lib_func,LIBFUNC) ) + + +/* n_nularg.t: Empty argument of macro call. */ + +#define ARG( a) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +/* printf ( "%s : %d\n" , "math ( sub , , y )" , ( - y ) ) ; */ + SHOWN( math( sub, , y)); + +/* printf ( "%s : %s\n" , "EMPTY" , "" ) ; */ + SHOWS( EMPTY); + +/* printf ( "%s : %s\n" , "APPEND ( CON , 1 )" , "CON1" ) ; */ + SHOWS( APPEND( CON, 1)); + +/* printf ( "%s : %s\n" , "APPEND ( CON , )" , "CON" ) ; */ + SHOWS( APPEND( CON, )); + +/* printf ( "%s : %s\n" , "APPEND( , )" , "" ) ; */ + SHOWS( APPEND( , )); + + +/* n_stdmac.t: C99 Standard pre-defined macros. */ + +/* 199901L ; */ + __STDC_VERSION__; + +/* 1 ; or 0 ; */ + __STDC_HOSTED__; + + +/* n_tlimit.t: Tests of translation limits. */ + +/* 37.1L: Number of parameters of macro definition: at least 127. */ + +#define glue127( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, \ + a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4, \ + a5, b5, c5, d5, e5, f5, g5, h5, i5, j5, k5, l5, m5, n5, o5, p5, \ + a6, b6, c6, d6, e6, f6, g6, h6, i6, j6, k6, l6, m6, n6, o6, p6, \ + a7, b7, c7, d7, e7, f7, g7, h7, i7, j7, k7, l7, m7, n7, o7) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + p0 ## p1 ## p2 ## p3 ## p4 ## p5 ## p6 ## o7 + +/* 37.2L: Number of arguments of macro call: at least 127. */ + +/* A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6O7 ; */ + glue127( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3, P3, + A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, L4, M4, N4, O4, P4, + A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, L5, M5, N5, O5, P5, + A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, L6, M6, N6, O6, P6, + A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, L7, M7, N7, O7); + +/* 37.3L: Significant initial characters in an internal identifier or a + macro name: at least 63 bytes. */ + + int +A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef = 63; + +/* 37.4L: Nested conditional inclusion: at least 63 level. */ + +/* ifdef_nest = 0x3f ; */ +#define X3F +#include "ifdef15.h" + +/* 37.5L: Nested source file inclusion: at least 15 level. */ + +/* nest = 0x0f ; */ +#define X0F +#include "nest1.h" + +/* 37.6L: Parenthesized expression: at least 63 level. */ + +/* nest = 63 ; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - 0x3E) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -1 + nest = 63; +#endif + +/* 37.7L: Characters in a string (after concatenation) + : at least 4095 bytes. */ + +/* 4095 bytes long. */ + char *string4093 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" +; + +/* 37.8L: Length of logical source line: at least 4095 bytes. */ + +#include "long4095.h" + +/* 37.9L: Number of macro definitions: at least 4095. */ + +#undef ARG +#include "m4095.h" + +/* 0x0fff ; */ + GBM; + diff --git a/libraries/mcpp/test-t/n_ppnum.t b/libraries/mcpp/test-t/n_ppnum.t new file mode 100644 index 000000000..291420c38 --- /dev/null +++ b/libraries/mcpp/test-t/n_ppnum.t @@ -0,0 +1,8 @@ +/* n_ppnum.t: Preprocessing number token *p+* */ +/* Undefined on C90, because '+A' is not a valid pp-token. */ + +#define A 3 +#define glue( a, b) a ## b +/* 12p+A; */ + glue( 12p+, A); + diff --git a/libraries/mcpp/test-t/n_pragma.t b/libraries/mcpp/test-t/n_pragma.t new file mode 100644 index 000000000..aeaaa6fdd --- /dev/null +++ b/libraries/mcpp/test-t/n_pragma.t @@ -0,0 +1,32 @@ +/* n_pragma.t: _Pragma() operator */ +/* based on the proposal to C99 by Bill Homer */ + +#define Machine_B + +#include "pragmas.h" + +/* #pragma vfunction */ +Fast_call +void f(int n, double * a, double * b) { +/* #pragma ivdep */ + Independent + while(n-- > 0) { + *a++ += *b++; + } +} + +#define f(N, A, B) \ +{ int n = (N), double * a = (A), double * b = (B); \ + Independent while(n-- > 0) { *a++ += *b++; } \ +} + +#define EXPRAG(x) _Pragma(#x) +#define PRAGMA(x) EXPRAG(x) +#define LIBFUNC xyz + +int libfunc() { ... } + +/* Direct the linker to define alternate entry points for libfunc. */ +/* #pragma duplicate libfunc as (lib_func,xyz) */ +PRAGMA( duplicate libfunc as (lib_func,LIBFUNC) ) + diff --git a/libraries/mcpp/test-t/n_std.t b/libraries/mcpp/test-t/n_std.t new file mode 100644 index 000000000..293da0fa7 --- /dev/null +++ b/libraries/mcpp/test-t/n_std.t @@ -0,0 +1,831 @@ +/* + * n_std.t + * + * 1998/08 made public kmatsui + * 2002/08 revised not to conflict with C99 Standard kmatsui + * 2004/10 added a few testcases for macro expansion kmatsui + * + * Samples to test C++ Standard preprocessing. + * Preprocessor must process these samples as shown in each comments. + * Preprocessor must process also #error directive properly, which is not + * included here because the directive might cause translator to terminate. + */ + + +#define ZERO_TOKEN +#define TWO_ARGS a,b +#define MACRO_0 0 +#define MACRO_1 1 +#define sub( x, y) (x - y) +#define str( a) # a +#define glue( a, b) a ## b +#define xglue( a, b) glue( a, b) + + +/* n_1.t: Conversion of trigraph sequences. */ + +/* 1.1: The following 9 sequences are valid trigraph sequences. */ +/* [ ] \ ^ { } | ~ #; */ + ??( ??) ??/ ??' ??< ??> ??! ??- ??=; + +/* 1.2: In directive line. */ +/* ab | cd; */ +??= define OR( a, b) a ??! b + OR( ab, cd); + +/* 1.3: Any sequence other than above 9 is not a trigraph sequence. */ +/* ?? ??? ??% ??^ ?#; */ + ?? ??? ??% ??^ ???=; + + +/* n_2.t: Line splicing by sequence. */ + +/* 2.1: In a #define directive line, between the parameter list and the + replacement text. */ +/* ab + cd + ef; */ +#define FUNC( a, b, c) \ + a + b + c + FUNC( ab, cd, ef); + +/* 2.2: In a #define directive line, among the parameter list and among the + replacement text. */ +/* ab + cd + ef; */ +#undef FUNC +#define FUNC( a, b \ + , c) \ + a + b \ + + c + FUNC( ab, cd, ef); + +/* 2.3: In a string literal. */ +/* "abcde" */ + "abc\ +de" + +/* 2.4: in midst of an identifier. */ +/* abcde */ + abc\ +de + +/* 2.5: by trigraph. */ +/* abcde */ + abc??/ +de + + +/* n_3.t: Handling of comment. */ + +/* 3.1: A comment is converted to one space. */ +/* abc de */ + abc/* comment */de + +/* 3.2: // is not a comment of C. */ +#if 0 /* This feature is obsolete now. */ +/* / / is not a comment of C */ + // is not a comment of C +#endif + +/* 3.3: Comment is parsed prior to the parsing of preprocessing directive. */ +/* abcd */ +#if 0 + "nonsence"; /* +#else + still in + comment */ +#else +#define MACRO_abcd /* + in comment + */ abcd +#endif + MACRO_abcd + + +/* n_4.t: Special tokens. */ + +/* 4.1: Digraph spellings in directive line. */ +/* "abc"; */ +%: define stringize( a) %: a + + stringize( abc); + +/* 4.2: Digraph spellings are retained in stringization. */ +/* "<:"; */ + stringize( <:); + + +/* n_5.t: Spaces or tabs are allowed at any place in pp-directive line, + including between the top of a pp-directive line and '#', and between + the '#' and the directive. */ + +/* 5.1: */ +/* |**|[TAB]# |**|[TAB]define |**| MACRO_abcde[TAB]|**| abcde |**| */ +/**/ # /**/ define /**/ MACRO_abcde /**/ abcde /**/ +/* abcde */ + MACRO_abcde + + +/* n_6.t: #include directive. */ + +/* 6.1: Header-name quoted by " and " as well as by < and > can include + standard headers. */ +/* Note: Standard headers can be included any times. */ +#include "ctype.h" +#include + +/* 6.2: Macro is allowed in #include line. */ +#define HEADER "header.h" +/* Before file inclusion: #include "header.h" */ +#include HEADER +/* abc */ + MACRO_abc + +/* 6.3: With macro nonsence but legal. */ +#undef MACRO_abc +#include ZERO_TOKEN HEADER ZERO_TOKEN +/* abc */ + MACRO_abc + + +/* n_7.t: #line directive. */ + +/* 7.1: Line number and filename. */ +/* 1234; "cpp"; */ +#line 1234 "cpp" + __LINE__; __FILE__; + +/* 7.2: Filename argument is optional. */ +/* 2345; "cpp"; */ +#line 2345 + __LINE__; __FILE__; + +/* 7.3: Argument with macro. */ +/* 3456; "n_7.t"; */ +#define LINE_AND_FILENAME 3456 "n_7.t" +#line LINE_AND_FILENAME + __LINE__; __FILE__; + +/* Restore to correct line number and filename. */ +#line 169 "n_std.t" + + +/* n_9.t: #pragma directive. */ + +/* 9.1: Any #pragma directive should be processed or ignored, should not + be diagnosed as an error. */ +#pragma once +#pragma who knows ? + + +/* n_10.t: #if, #elif, #else and #endif pp-directive. */ + +/* 10.1: */ +/* Note: an undefined identifier in #if expression is replaced to 0. */ +/* 1; */ +#if a + a; +#elif MACRO_0 + MACRO_0; +#elif MACRO_1 /* Valid block */ + MACRO_1; +#else + 0; +#endif + +/* 10.2: Comments must be processed even if in skipped #if block. */ +/* At least tokenization of string literal and character constant is necessary + to process comments, e.g. /* is not a comment mark in string literal. + */ +#ifdef UNDEFINED + /* Comment */ + "in literal /* is not a comment" +#endif + + +/* n_11.t: Operator "defined" in #if or #elif directive. */ + +/* 11.1: */ +#undef MACRO_abc +#define MACRO_abc abc +/* abc; */ +/* abc; */ +#if defined a + a; +#else + MACRO_abc; +#endif +#if defined (MACRO_abc) + MACRO_abc; +#else + 0; +#endif + +/* 11.2: "defined" is an unary operator whose result is 1 or 0. */ +#if defined MACRO_0 * 3 != 3 + Bad handling of "defined" operator. +#endif +#if (!defined ZERO_TOKEN != 0) || (-defined ZERO_TOKEN != -1) + Bad grouping of "defined", !, - operator. +#endif + + +/* n_12.t: Integer preprocessing number token and type of #if expression. */ + +#include + +/* 12.1: Type long. */ +#if LONG_MAX <= LONG_MIN + Bad evaluation of long. +#endif +#if LONG_MAX <= 1073741823 /* 0x3FFFFFFF */ + Bad evaluation of long. +#endif + +/* 12.2: Type unsigned long. */ +#if ULONG_MAX / 2 < LONG_MAX + Bad evaluation of unsigned long. +#endif + +/* 12.3: Octal number. */ +#if 0177777 != 65535 + Bad evaluation of octal number. +#endif + +/* 12.4: Hexadecimal number. */ +#if 0Xffff != 65535 || 0xFfFf != 65535 + Bad evaluation of hexadecimal number. +#endif + +/* 12.5: Suffix 'L' or 'l'. */ +#if 0L != 0 || 0l != 0 + Bad evaluation of 'L' suffix. +#endif + +/* 12.6: Suffix 'U' or 'u'. */ +#if 1U != 1 || 1u != 1 + Bad evaluation of 'U' suffix. +#endif + +/* 12.7: Negative integer. */ +#if 0 <= -1 + Bad evaluation of negative number. +#endif + + +/* n_13.t: Valid operators in #if expression. */ + +/* Valid operators are (precedence in this order) : + defined, (unary)+, (unary)-, ~, !, + *, /, %, + +, -, + <<, >>, + <, >, <=, >=, + ==, !=, + &, + ^, + |, + &&, + ||, + ? : + */ + +/* 13.1: Bit shift. */ +#if 1 << 2 != 4 || 8 >> 1 != 4 + Bad arithmetic of <<, >> operators. +#endif + +/* 13.2: Bitwise operators. */ +#if (3 ^ 5) != 6 || (3 | 5) != 7 || (3 & 5) != 1 + Bad arithmetic of ^, |, & operators. +#endif + +/* 13.3: Result of ||, && operators is either of 1 or 0. */ +#if (2 || 3) != 1 || (2 && 3) != 1 || (0 || 4) != 1 || (0 && 5) != 0 + Bad arithmetic of ||, && operators. +#endif + +/* 13.4: ?, : operator. */ +#if (0 ? 1 : 2) != 2 + Bad arithmetic of ?: operator. +#endif + + +/* n_13_5.t: Arithmetic conversion in #if expressions. */ + +/* 13.5: The usual arithmetic conversion is not performed on bit shift. */ +#if -1 << 3U > 0 + Bad conversion of bit shift operands. +#endif + +/* 13.6: Usual arithmetic conversions. */ +#if -1 <= 0U /* -1 is converted to unsigned long. */ + Bad arithmetic conversion. +#endif + +#if -1 * 1U <= 0 + Bad arithmetic conversion. +#endif + +/* Second and third operands of conditional operator are converted to the + same type, thus -1 is converted to unsigned long. */ +#if (1 ? -1 : 0U) <= 0 + Bad arithmetic conversion. +#endif + + +/* n_13_7.t: Short-circuit evaluation of #if expression. */ + +/* 13.7: 10/0 or 10/MACRO_0 are never evaluated, "divide by zero" error + cannot occur. */ +/* Valid block */ +#if 0 && 10 / 0 + Block to be skipped +#endif +#if not_defined && 10 / not_defined + Block to be skipped +#endif +#if MACRO_0 && 10 / MACRO_0 > 1 + Block to be skipped +#endif +#if MACRO_0 ? 10 / MACRO_0 : 0 + Block to be skipped +#endif +#if MACRO_0 == 0 || 10 / MACRO_0 > 1 + Valid block +#else + Block to be skipped +#endif + + +/* n_13_8.t: Grouping of sub-expressions in #if expression. */ + +/* 13.8: Unary operators are grouped from right to left. */ +#if (- -1 != 1) || (!!9 != 1) || (-!+!9 != -1) || (~~1 != 1) + Bad grouping of -, +, !, ~ in #if expression. +#endif + +/* 13.9: ?: operators are grouped from right to left. */ +#if (1 ? 2 ? 3 ? 3 : 2 : 1 : 0) != 3 + Bad grouping of ? : in #if expression. +#endif + +/* 13.10: Other operators are grouped from left to right. */ +#if (15 >> 2 >> 1 != 1) || (3 << 2 << 1 != 24) + Bad grouping of >>, << in #if expression. +#endif + +/* 13.11: Test of precedence. */ +#if 3*10/2 >> !0*2 >> !+!-9 != 1 + Bad grouping of -, +, !, *, /, >> in #if expression. +#endif + +/* 13.12: Overall test. Grouped as: + ((((((+1 - -1 - ~~1 - -!0) & 6) | ((8 % 9) ^ (-2 * -2))) >> 1) == 7) + ? 7 : 0) != 7 + evaluated to FALSE. + */ +#if (((+1- -1-~~1- -!0&6|8%9^-2*-2)>>1)==7?7:0)!=7 + Bad arithmetic of #if expression. +#endif + + +/* n_13_13.t: #if expression with macros. */ + +#define and && +#define or || +#define not_eq != +#define bitor | + +/* 13.13: With macros expanding to operators. */ +/* Valid block */ +#if (1 bitor 2) == 3 and 4 not_eq 5 or 0 + /* #if (1 | 2) == 3 && 4 != 5 || 0 */ + Valid block +#else + Block to be skipped +#endif + +/* 13.14: With macros expanding to 0 token, nonsence but legal expression.*/ +/* Valid block */ +#if ZERO_TOKEN MACRO_1 ZERO_TOKEN > ZERO_TOKEN MACRO_0 ZERO_TOKEN + /* #if 1 > 0 */ + Valid block +#else + Block to be skipped +#endif + + +/* n_15.t: #ifdef, #ifndef directives. */ + +/* 15.1: #ifdef directive. */ +/* Valid block */ +#ifdef MACRO_1 + Valid block +#else + Block to be skipped +#endif + +/* 15.2: #ifndef directive. */ +/* Valid block */ +#ifndef MACRO_1 + Block to be skipped +#else + Valid block +#endif + + +/* n_18.t: #define directive. */ + +/* Excerpts from ISO C 6.8.3 "Examples". */ +#define OBJ_LIKE (1-1) +#define FTN_LIKE(a) ( a ) + +/* 18.1: Definition of an object-like macro. */ +/* (1-1); */ + OBJ_LIKE; +/* Macro defined to no token. */ +/* ; */ + ZERO_TOKEN; + +/* 18.2: Definition of a function-like macro. */ +/* ( c ); */ + FTN_LIKE( c); + +/* 18.3: Spelling in string identical to parameter is not a parameter. */ +/* "n1:n2"; */ +#define STR( n1, n2) "n1:n2" + STR( 1, 2); + + +/* n_19.t: Valid re-definitions of macros. */ + +/* 19.1: */ +#define OBJ_LIKE /* white space */ (1-1) /* other */ + +/* 19.2: */ +#define FTN_LIKE( a )( /* note the white space */ \ + a /* other stuff on this line + */ ) +/* ( c ); */ + FTN_LIKE( c); + + +/* n_20.t: Definition of macro lexically identical to keyword. */ + +/* 20.1: */ +/* double fl; */ +#define float double + float fl; + + +/* n_21.t: Tokenization (No preprocessing tokens are merged implicitly). */ + +/* 21.1: */ +/* - - -a; */ +#define MINUS - + -MINUS-a; + +/* 21.2: */ +#undef sub +#define sub( a, b) a-b /* '(a)-(b)' is better */ +#define Y -y /* '(-y)' is better */ +/* x- -y; */ + sub( x, Y); + + +/* n_22.t: Tokenization of preprocessing number. */ + +#define EXP 1 + +/* 22.1: 12E+EXP is a preprocessing number, EXP is not expanded. */ +/* 12E+EXP; */ + 12E+EXP; + +/* 22.2: .2e-EXP is also a preprocessing number. */ +/* .2e-EXP; */ + .2e-EXP; + +/* 22.3: + or - is allowed only following E or e, 12+EXP is not a + preprocessing number. */ +/* Three tokens: 12 + 1; */ + 12+EXP; + + +/* n_23.t: ## operator in macro definition. */ + +/* 23.1: */ +/* xy; */ + glue( x, y); + +/* 23.2: Generate a preprocessing number. */ +/* .12e+2; */ +#undef EXP +#define EXP 2 + xglue( .12e+, EXP); + + +/* n_24.t: # operator in macro definition. */ + +/* 24.1: */ +/* "a+b"; */ + str( a+b); + +/* 24.2: White spaces between tokens of operand are converted to one space. + */ +/* "ab + cd"; */ + str( ab /* comment */ + + cd ); + +/* 24.3: \ is inserted before \ and " in or surrounding literals and no + other character is inserted to anywhere. */ +/* "'\"' + \"' \\\"\""; */ + str( '"' + "' \""); + +/* 24.4: Line splicing by is done prior to token + parsing. */ +/* "\"abc\""; */ + str( "ab\ +c"); + +/* 24.5: Token separator inserted by macro expansion should be removed. + (Meanwhile, tokens should not be merged. See 21.2.) */ +#define xstr( a) str( a) +#define f(a) a +/* "x-y"; */ + xstr( x-f(y)); + + +/* n_25.t: Macro arguments are pre-expanded (unless the argument is an + operand of # or ## operator) separately, that is, are macro-replaced + completely prior to rescanning. */ + +#undef sub +#define sub( x, y) (x - y) + +/* 25.1: "TWO_ARGS" is read as one argument to "sub", then expanded to + "a,b", then "x" is substituted by "a,b". */ +/* (a,b - 1); */ + sub( TWO_ARGS, 1); + +/* 25.2: An argument pre-expanded to 0-token. */ +/* ( - 1); */ + sub( ZERO_TOKEN, 1); + +/* 25.3: "glue( a, b)" is pre-expanded. */ +/* abc; */ + xglue( glue( a, b), c); + +/* 25.4: Operands of ## operator are not pre-expanded. */ +/* MACRO_0MACRO_1; */ + glue( MACRO_0, MACRO_1); + +/* 25.5: Operand of # operator is not pre-expanded. */ +/* "ZERO_TOKEN"; */ + str( ZERO_TOKEN); + + +/* n_26.t: The name once replaced is not furthur replaced. */ + +/* 26.1: Directly recursive macro definition. */ +/* Z[0]; */ +#define Z Z[0] + Z; + +/* 26.2: Intermediately recursive macro definition. */ +/* AB; */ +#define AB BA +#define BA AB + AB; + +/* 26.3: Directly recursive function-like macro definition. */ +/* x + f(x); */ +#undef f +#define f(a) a + f(a) + f( x); + +/* 26.4: Intermediately recursive function-like macro definition. */ +/* x + x + g( x); */ +#define g(a) a + h( a) +#define h(a) a + g( a) + g( x); + +/* 26.5: Rescanning encounters the non-replaced macro name. */ +/* Z[0] + f( Z[0]); */ + f( Z); + + +/* n_27.t: Rescanning of a macro expand any macro call in the replacement + text after substitution of parameters by pre-expanded-arguments. This + re-examination may involve the succeding sequences from the source + file (what a queer thing!). */ + +/* 27.1: Cascaded use of object-like macros. */ +/* 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8; */ +#define NEST8 NEST7 + 8 +#define NEST7 NEST6 + 7 +#define NEST6 NEST5 + 6 +#define NEST5 NEST4 + 5 +#define NEST4 NEST3 + 4 +#define NEST3 NEST2 + 3 +#define NEST2 NEST1 + 2 +#define NEST1 1 + NEST8; + +/* 27.2: Cascaded use of function-like macros. */ +/* (1) + (1 + 2) + 1 + 2 + 1 + 2 + 3 + 1 + 2 + 3 + 4; */ +#define FUNC4( a, b) FUNC3( a, b) + NEST4 +#define FUNC3( a, b) FUNC2( a, b) + NEST3 +#define FUNC2( a, b) FUNC1( a, b) + NEST2 +#define FUNC1( a, b) (a) + (b) + FUNC4( NEST1, NEST2); + +/* 27.3: An identifier generated by ## operator is subject to expansion. */ +/* 1; */ + glue( MACRO_, 1); + +#define head sub( +#define math( op, a, b) op( (a), (b)) + +/* 27.4: 'sub' as an argument of math() is not pre-expanded, since '(' is + missing. */ +/* ((a) - (b)); */ + math( sub, a, b); + +/* 27.5: Queer thing. */ +/* (a - b); */ + head a,b ); + +/* 27.6: Recursive macro (the 2nd 'm' is expanded to 'n' since it is in + source file). */ +/* n; */ +#define m n +#define n( a) a + m( m); + + +/* n_28.t: __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ and + __STDC_VERSION__ are predefined. */ + +/* 28.1: */ +/* "n_std.t"; */ + __FILE__; + +/* 28.2: */ +/* 674; */ + __LINE__; + +/* 28.3: */ +/* "Aug 1 2001"; */ + __DATE__; + +/* 28.4: */ +/* "21:42:22"; */ + __TIME__; + +/* 28.5: */ +/* 1; */ + __STDC__; + +/* 28.6: */ +/* 199409L; */ +/* In C99, the value of this macro is 199901L */ + __STDC_VERSION__; + +/* 28.7: __LINE__, __FILE__ in an included file. */ +/* 3; "line.h"; */ +#include "line.h" + + +/* n_29.t: #undef directive. */ + +/* 29.1: Undefined macro is not a macro. */ +/* DEFINED; */ +#define DEFINED +#undef DEFINED + DEFINED; + +/* 29.2: Undefining undefined name is not an error. */ +#undef UNDEFINED + + +/* n_30.t: Macro call. */ +/* Note: Comma separate the arguments of function-like macro call, + but comma between matching inner parenthesis doesn't. This feature + is tested on so many places in this suite especially on *.c samples + which use assert() macro, that no separete item to test this feature + is provided. */ + +/* 30.1: A macro call may cross the lines. */ +#undef FUNC +#define FUNC( a, b, c) a + b + c +/* a + b + c; */ + FUNC + ( + a, + b, + c + ) + ; + + +/* n_32.t: Escape sequence in character constant in #if expression. */ + +/* 32.1: Character octal escape sequence. */ +#if '\123' != 83 + Bad evaluation of octal escape sequence. +#endif + +/* 32.2: Character hexadecimal escape sequence. */ +#if '\x1b' != '\033' + Bad evaluation of hexadecimal escape sequence. +#endif + + +/* n_37.t: Translation limits. */ + +/* 37.1: Number of parameters in macro: at least 31. */ +#define glue31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E) \ + a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p##q##r##s##t##u##v##w##x##y##z##A##B##C##D##E + +/* 37.2: Number of arguments of macro call: at least 31. */ +/* ABCDEFGHIJKLMNOPQRSTUVWXYZabcde; */ + glue31( A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R + , S, T, U, V, W, X, Y, Z, a, b, c, d, e); + +/* 37.3: Significant initial characters in an internal identifier or a + macro name: at least 31. */ +/* ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_; */ + ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_; + +/* 37.4: Nested conditional inclusion: at least 8 levels. */ +/* nest = 8; */ +#ifdef A +#else +# ifdef B +# else +# ifdef C +# else +# ifdef D +# else +# ifdef E +# else +# ifdef F +# else +# ifdef G +# else +# ifdef H +# else + nest = 8; +# endif +# endif +# endif +# endif +# endif +# endif +# endif +#endif + +/* 37.5: Nested source file inclusion: at least 8 levels. */ +/* nest = 1; nest = 2; nest = 3; nest = 4; + nest = 5; nest = 6; nest = 7; nest = 8; */ +#define X8 +#include "nest1.h" + +/* 37.6: Parenthesized expression: at least 32 levels. */ +/* nest = 32; */ +#if 0 + (1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + (9 - (10 + (11 - (12 + \ + (13 - (14 + (15 - (16 + (17 - (18 + (19 - (20 + (21 - (22 + (23 - \ + (24 + (25 - (26 + (27 - (28 + (29 - (30 + (31 - (32 + 0)))))))))) \ + )))))))))))))))))))))) == 0 + nest = 32; +#endif + +/* 37.7: Characters in a string (after concatenation): at least 509. */ +"123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789\ +012345678901234567" + ; + +/* 37.8: Characters in a logical source line: at least 509. */ + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int A123456789012345678901234567890 = 123456; \ + int B123456789012345678901234567890 = 123457; \ + int C123456789012345678901234567890 = 123458; \ + int D1234567890123456789012 = 123459; + +/* 37.9: Macro definitions: at least 1024. */ + +#define X0400 +#include "m4095.h" +/* 0x0400; */ + BNJ; + diff --git a/libraries/mcpp/test-t/n_std99.t b/libraries/mcpp/test-t/n_std99.t new file mode 100644 index 000000000..3a68c4bfd --- /dev/null +++ b/libraries/mcpp/test-t/n_std99.t @@ -0,0 +1,319 @@ +/* + * n_std99.t + * + * 2002/08 kmatsui + * + * Samples to test Standard C99 preprocessing. + */ + +/* n_ucn1: Universal-character-name */ + +/* UCN in character constant */ + +#if '\u5B57' + UCN-16bits is implemented. +#endif + +#if '\U00006F22' + UCN-32bits is implemented. +#endif + +/* UCN in string literal */ + + "abc\u6F22\u5B57xyz"; /* i.e. "abcxyx"; */ + +/* UCN in identifier */ + +#define macro\u5B57 9 +#define macro\U00006F22 99 + + macro\u5B57 /* 9 */ + macro\U00006F22 /* 99 */ + macro\U00006f22 /* 99 */ + +/* n_ucn2.t: Universal-character-name */ +/* UCN in pp-number */ + +#define mkint( a) a ## 1\u5B57 + + int mkint( abc) = 0; /* int abc1\u5B57 = 0; */ + +/* n_dslcom.t: // is a comment of C99. */ +/* a; */ + a; // is a comment of C99 + + +/* n_ppnum.t: Preprocessing number token *p+* */ +/* Undefined on C90, because '+A' is not a valid pp-token. */ + +#define A 3 +#define glue( a, b) a ## b +/* 12p+A; */ + glue( 12p+, A); + + +/* n_line.t: line number argument of #line */ +/* C99: Range of line number in #line directive is [1..2147483647] */ + +/* 2147483647; */ +#line 2147483647 + __LINE__; +#line 62 /* Resume the real line number */ + __LINE__; + + +/* n_llong.t: long long in #if expression */ + +#if 12345678901234567890 < 13345678901234567890 + "long long #if expression is implemented." +#else + "long long #if expression is not implemented." +#endif + +#if 12345678901234567890ULL < 13345678901234567890ULL + Valid block +#else + Block to be skipped +#endif + +#if (0x7FFFFFFFFFFFFFFFLL - 0x6FFFFFFFFFFFFFFFLL) >> 60 == 1 + Valid block +#else + Block to be skipped +#endif + + +/* n_vargs.t: Macro of variable arguments */ +/* from C99 Standard 6.10.3 Examples */ + #define debug( ...) fprintf( stderr, __VA_ARGS__) + #define showlist( ...) puts( #__VA_ARGS__) + #define report( test, ...) ((test) ? puts( #test) \ + : printf( __VA_ARGS__)) + { + /* fprintf( stderr, "Flag"); */ + debug( "Flag"); + /* fprintf( stderr, "X = %d\n", x); */ + debug( "X = %d\n", x); + /* puts( "The first, second, and third items."); */ + showlist( The first, second, and third items.); + /* ((x>y) ? puts( "x>y") : printf( "x is %d but y is %d", x, y)); */ + report( x>y, "x is %d but y is %d", x, y); + } + + +/* n_pragma.t: _Pragma() operator */ +/* based on the proposal to C99 by Bill Homer */ + +#define Machine_B + +#include "pragmas.h" + +/* #pragma vfunction */ +Fast_call +void f(int n, double * a, double * b) { +/* #pragma ivdep */ + Independent + while(n-- > 0) { + *a++ += *b++; + } +} + +#define f(N, A, B) \ +{ int n = (N), double * a = (A), double * b = (B); \ + Independent while(n-- > 0) { *a++ += *b++; } \ +} + +#define EXPRAG(x) _Pragma(#x) +#define PRAGMA(x) EXPRAG(x) +#define LIBFUNC xyz + +int libfunc() { ... } + +/* Direct the linker to define alternate entry points for libfunc. */ +/* #pragma duplicate libfunc as (lib_func,xyz) */ +PRAGMA( duplicate libfunc as (lib_func,LIBFUNC) ) + + +/* n_nularg.t: Empty argument of macro call. */ + +#define ARG( a) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); */ + SHOWN( math( sub, , y)); + +/* printf( "%s : %s\n", "EMPTY", ""); */ + SHOWS( EMPTY); + +/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ + SHOWS( APPEND( CON, 1)); + +/* printf( "%s : %s\n", "APPEND( CON, )", "CON"); */ + SHOWS( APPEND( CON, )); + +/* printf( "%s : %s\n", "APPEND( , )", ""); */ + SHOWS( APPEND( , )); + + +/* n_stdmac.t: C99 Standard pre-defined macros. */ + +/* 199901L; */ + __STDC_VERSION__; + +/* 1; or 0; */ + __STDC_HOSTED__; + + +/* n_tlimit.t: Tests of translation limits. */ + +/* 37.1L: Number of parameters of macro definition: at least 127. */ + +#define glue127( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, \ + a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4, \ + a5, b5, c5, d5, e5, f5, g5, h5, i5, j5, k5, l5, m5, n5, o5, p5, \ + a6, b6, c6, d6, e6, f6, g6, h6, i6, j6, k6, l6, m6, n6, o6, p6, \ + a7, b7, c7, d7, e7, f7, g7, h7, i7, j7, k7, l7, m7, n7, o7) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + p0 ## p1 ## p2 ## p3 ## p4 ## p5 ## p6 ## o7 + +/* 37.2L: Number of arguments of macro call: at least 127. */ + +/* A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6O7; */ + glue127( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3, P3, + A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, L4, M4, N4, O4, P4, + A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, L5, M5, N5, O5, P5, + A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, L6, M6, N6, O6, P6, + A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, L7, M7, N7, O7); + +/* 37.3L: Significant initial characters in an internal identifier or a + macro name: at least 63 bytes. */ + + int +A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef = 63; + +/* 37.4L: Nested conditional inclusion: at least 63 level. */ + +/* ifdef_nest = 0x3f; */ +#define X3F +#include "ifdef15.h" + +/* 37.5L: Nested source file inclusion: at least 15 level. */ + +/* nest = 0x0f; */ +#define X0F +#include "nest1.h" + +/* 37.6L: Parenthesized expression: at least 63 level. */ + +/* nest = 63; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - 0x3E) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -1 + nest = 63; +#endif + +/* 37.7L: Characters in a string (after concatenation) + : at least 4095 bytes. */ + +/* 4095 bytes long. */ + char *string4093 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" +; + +/* 37.8L: Length of logical source line: at least 4095 bytes. */ + +#include "long4095.h" + +/* 37.9L: Number of macro definitions: at least 4095. */ + +#undef ARG +#include "m4095.h" + +/* 0x0fff; */ + GBM; + diff --git a/libraries/mcpp/test-t/n_stdmac.t b/libraries/mcpp/test-t/n_stdmac.t new file mode 100644 index 000000000..c97394c05 --- /dev/null +++ b/libraries/mcpp/test-t/n_stdmac.t @@ -0,0 +1,8 @@ +/* n_stdmac.t: C99 Standard pre-defined macros. */ + +/* 199901L; */ + __STDC_VERSION__; + +/* 1; or 0; */ + __STDC_HOSTED__; + diff --git a/libraries/mcpp/test-t/n_tlim_2.t b/libraries/mcpp/test-t/n_tlim_2.t new file mode 100644 index 000000000..23704e286 --- /dev/null +++ b/libraries/mcpp/test-t/n_tlim_2.t @@ -0,0 +1,28 @@ +/* n_tlim_2.t: Tests of translation limits. */ + +/* tlim.1L: Number of parameters of macro definition: at least 127. */ + +#define glue127( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, \ + a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4, \ + a5, b5, c5, d5, e5, f5, g5, h5, i5, j5, k5, l5, m5, n5, o5, p5, \ + a6, b6, c6, d6, e6, f6, g6, h6, i6, j6, k6, l6, m6, n6, o6, p6, \ + a7, b7, c7, d7, e7, f7, g7, h7, i7, j7, k7, l7, m7, n7, o7) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + p0 ## p1 ## p2 ## p3 ## p4 ## p5 ## p6 ## o7 + +/* tlim.2L: Number of arguments of macro call: at least 127. */ + +/* A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6O7; */ + glue127( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3, P3, + A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, L4, M4, N4, O4, P4, + A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, L5, M5, N5, O5, P5, + A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, L6, M6, N6, O6, P6, + A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, L7, M7, N7, O7); diff --git a/libraries/mcpp/test-t/n_tlim_3.t b/libraries/mcpp/test-t/n_tlim_3.t new file mode 100644 index 000000000..cc92da617 --- /dev/null +++ b/libraries/mcpp/test-t/n_tlim_3.t @@ -0,0 +1,5 @@ +/* n_tlim_3.t: Significant initial characters in an internal identifier or a + macro name: at least 63 bytes. */ + + int +A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef = 63; diff --git a/libraries/mcpp/test-t/n_tlim_4.t b/libraries/mcpp/test-t/n_tlim_4.t new file mode 100644 index 000000000..ec4bedc92 --- /dev/null +++ b/libraries/mcpp/test-t/n_tlim_4.t @@ -0,0 +1,5 @@ +/* n_tlim_4.t: Nested conditional inclusion: at least 63 level. */ + +/* nest = 0x3f; */ +#define X3F +#include "ifdef15.h" diff --git a/libraries/mcpp/test-t/n_tlim_5.t b/libraries/mcpp/test-t/n_tlim_5.t new file mode 100644 index 000000000..e526e8b84 --- /dev/null +++ b/libraries/mcpp/test-t/n_tlim_5.t @@ -0,0 +1,5 @@ +/* n_tlim_5.t: Nested source file inclusion: at least 15 level. */ + +/* nest = 0x0f; */ +#define X0F +#include "nest1.h" diff --git a/libraries/mcpp/test-t/n_tlim_6.t b/libraries/mcpp/test-t/n_tlim_6.t new file mode 100644 index 000000000..936209b85 --- /dev/null +++ b/libraries/mcpp/test-t/n_tlim_6.t @@ -0,0 +1,16 @@ +/* n_tlim_6.t: Parenthesized expression: at least 63 level. */ + +/* nest = 63; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - 0x3E) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -1 + nest = 63; +#endif diff --git a/libraries/mcpp/test-t/n_tlim_7.t b/libraries/mcpp/test-t/n_tlim_7.t new file mode 100644 index 000000000..69e92d716 --- /dev/null +++ b/libraries/mcpp/test-t/n_tlim_7.t @@ -0,0 +1,70 @@ +/* n_tlim_7.t: Characters in a string (after concatenation) + : at least 4095 bytes. */ + +/* 4095 bytes long. */ + char *string4093 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" +; diff --git a/libraries/mcpp/test-t/n_tlim_8.t b/libraries/mcpp/test-t/n_tlim_8.t new file mode 100644 index 000000000..f666f0170 --- /dev/null +++ b/libraries/mcpp/test-t/n_tlim_8.t @@ -0,0 +1,3 @@ +/* n_tlim_8.t: Length of logical source line: at least 4095 bytes. */ + +#include "long4095.h" diff --git a/libraries/mcpp/test-t/n_tlim_9.t b/libraries/mcpp/test-t/n_tlim_9.t new file mode 100644 index 000000000..a421381a5 --- /dev/null +++ b/libraries/mcpp/test-t/n_tlim_9.t @@ -0,0 +1,7 @@ +/* n_tlim_9.t: Number of macro definitions: at least 4095. */ + +#undef ARG +#include "m4095.h" + +/* 0x0fff; */ + GBM; diff --git a/libraries/mcpp/test-t/n_tlimit.t b/libraries/mcpp/test-t/n_tlimit.t new file mode 100644 index 000000000..5f1841a9d --- /dev/null +++ b/libraries/mcpp/test-t/n_tlimit.t @@ -0,0 +1,147 @@ +/* n_tlimit.t: Tests of translation limits of C99. */ + +/* n_tlim_1: Number of parameters of macro definition: at least 127. */ + +#define glue127( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, \ + a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4, \ + a5, b5, c5, d5, e5, f5, g5, h5, i5, j5, k5, l5, m5, n5, o5, p5, \ + a6, b6, c6, d6, e6, f6, g6, h6, i6, j6, k6, l6, m6, n6, o6, p6, \ + a7, b7, c7, d7, e7, f7, g7, h7, i7, j7, k7, l7, m7, n7, o7) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + p0 ## p1 ## p2 ## p3 ## p4 ## p5 ## p6 ## o7 + +/* n_tlim_2: Number of arguments of macro call: at least 127. */ + +/* A0B0C0D0E0F0G0H0P0P1P2P3P4P5P6O7; */ + glue127( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3, P3, + A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, L4, M4, N4, O4, P4, + A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, L5, M5, N5, O5, P5, + A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, L6, M6, N6, O6, P6, + A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, L7, M7, N7, O7); + +/* n_tlim_3: Significant initial characters in an internal identifier or a + macro name: at least 63 bytes. */ + + int +A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef = 63; + +/* n_tlim_4: Nested conditional inclusion: at least 63 level. */ + +/* ifdef_nest = 0x3f; */ +#define X3F +#include "ifdef15.h" + +/* n_tlim_5: Nested source file inclusion: at least 15 level. */ + +/* nest = 0x0f; */ +#define X0F +#include "nest1.h" + +/* n_tlim_6: Parenthesized expression: at least 63 level. */ + +/* nest = 63; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - 0x3E) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -1 + nest = 63; +#endif + +/* n_tlim_7: Characters in a string (after concatenation) + : at least 4095 bytes. */ + +/* 4095 bytes long. */ + char *string4093 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +B123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +C123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" +; + +/* n_tlim_8: Length of logical source line: at least 4095 bytes. */ + +#include "long4095.h" + +/* n_tlim_9: Number of macro definitions: at least 4095. */ + +#undef ARG +#include "m4095.h" + +/* 0x0fff; */ + GBM; + diff --git a/libraries/mcpp/test-t/n_token.cc b/libraries/mcpp/test-t/n_token.cc new file mode 100644 index 000000000..021192728 --- /dev/null +++ b/libraries/mcpp/test-t/n_token.cc @@ -0,0 +1,18 @@ +/* n_token.t: special pp-token in C++ */ + +#define str( a) xstr( a) +#define xstr( a) # a +#define paste( a, b) a ## b + +/* token.1: '::' is a token in C++, although illegal token sequence + in C */ + /* "::"; */ + str( paste( :, :)); + +/* token.2: 'and', 'or', 'not', etc. are tokens in C++, although in C + these are macros defined by */ + /* "xor"; */ +#if 1 and 2 or not 3 + str( xor); +#endif + diff --git a/libraries/mcpp/test-t/n_token.t b/libraries/mcpp/test-t/n_token.t new file mode 100644 index 000000000..021192728 --- /dev/null +++ b/libraries/mcpp/test-t/n_token.t @@ -0,0 +1,18 @@ +/* n_token.t: special pp-token in C++ */ + +#define str( a) xstr( a) +#define xstr( a) # a +#define paste( a, b) a ## b + +/* token.1: '::' is a token in C++, although illegal token sequence + in C */ + /* "::"; */ + str( paste( :, :)); + +/* token.2: 'and', 'or', 'not', etc. are tokens in C++, although in C + these are macros defined by */ + /* "xor"; */ +#if 1 and 2 or not 3 + str( xor); +#endif + diff --git a/libraries/mcpp/test-t/n_ucn1.cc b/libraries/mcpp/test-t/n_ucn1.cc new file mode 100644 index 000000000..9c205b87f --- /dev/null +++ b/libraries/mcpp/test-t/n_ucn1.cc @@ -0,0 +1,24 @@ +/* n_ucn1.t: Universal-character-name */ + +/* UCN in character constant */ + +#if '\u5B57' + UCN-16bits is implemented. +#endif + +#if '\U00006F22' + UCN-32bits is implemented. +#endif + +/* UCN in string literal */ + + "abc\u6F22\u5B57xyz"; /* i.e. "abcxyx"; */ + +/* UCN in identifier */ + +#define macro\u5B57 9 +#define macro\U00006F22 99 + + macro\u5B57 /* 9 */ + macro\U00006F22 /* 99 */ + diff --git a/libraries/mcpp/test-t/n_ucn1.t b/libraries/mcpp/test-t/n_ucn1.t new file mode 100644 index 000000000..e783c77c3 --- /dev/null +++ b/libraries/mcpp/test-t/n_ucn1.t @@ -0,0 +1,25 @@ +/* n_ucn1.t: Universal-character-name */ + +/* UCN in character constant */ + +#if '\u5B57' + UCN-16bits is implemented. +#endif + +#if '\U00006F22' + UCN-32bits is implemented. +#endif + +/* UCN in string literal */ + + "abc\u6F22\u5B57xyz"; /* i.e. "abcxyx"; */ + +/* UCN in identifier */ + +#define macro\u5B57 9 +#define macro\U00006F22 99 + + macro\u5B57 /* 9 */ + macro\U00006F22 /* 99 */ + macro\U00006f22 /* 99 */ + diff --git a/libraries/mcpp/test-t/n_ucn2.t b/libraries/mcpp/test-t/n_ucn2.t new file mode 100644 index 000000000..a986109b6 --- /dev/null +++ b/libraries/mcpp/test-t/n_ucn2.t @@ -0,0 +1,8 @@ +/* n_ucn2.t: Universal-character-name */ + +/* UCN in pp-number */ + +#define mkint( a) a ## 1\u5B57 + + int mkint( abc) = 0; /* int abc1\u5B57 = 0; */ + diff --git a/libraries/mcpp/test-t/n_vargs.t b/libraries/mcpp/test-t/n_vargs.t new file mode 100644 index 000000000..f6f10594d --- /dev/null +++ b/libraries/mcpp/test-t/n_vargs.t @@ -0,0 +1,17 @@ +/* n_vargs.t: Macro of variable arguments */ +/* from C99 Standard 6.10.3 Examples */ + #define debug( ...) fprintf( stderr, __VA_ARGS__) + #define showlist( ...) puts( #__VA_ARGS__) + #define report( test, ...) ((test) ? puts( #test) \ + : printf( __VA_ARGS__)) + { + /* fprintf( stderr, "Flag"); */ + debug( "Flag"); + /* fprintf( stderr, "X = %d\n", x); */ + debug( "X = %d\n", x); + /* puts( "The first, second, and third items."); */ + showlist( The first, second, and third items.); + /* ((x>y) ? puts( "x>y") : printf( "x is %d but y is %d", x, y)); */ + report( x>y, "x is %d but y is %d", x, y); + } + diff --git a/libraries/mcpp/test-t/nest1.h b/libraries/mcpp/test-t/nest1.h new file mode 100644 index 000000000..6db0e2b83 --- /dev/null +++ b/libraries/mcpp/test-t/nest1.h @@ -0,0 +1,5 @@ +/* nest1.h */ + + nest = 1; + +#include "nest2.h" diff --git a/libraries/mcpp/test-t/nest10.h b/libraries/mcpp/test-t/nest10.h new file mode 100644 index 000000000..f97de2ab3 --- /dev/null +++ b/libraries/mcpp/test-t/nest10.h @@ -0,0 +1,2 @@ +/* nest10.h */ +#include "nest11.h" diff --git a/libraries/mcpp/test-t/nest11.h b/libraries/mcpp/test-t/nest11.h new file mode 100644 index 000000000..ca40f3811 --- /dev/null +++ b/libraries/mcpp/test-t/nest11.h @@ -0,0 +1,2 @@ +/* nest11.h */ +#include "nest12.h" diff --git a/libraries/mcpp/test-t/nest12.h b/libraries/mcpp/test-t/nest12.h new file mode 100644 index 000000000..c3dba7244 --- /dev/null +++ b/libraries/mcpp/test-t/nest12.h @@ -0,0 +1,2 @@ +/* nest12.h */ +#include "nest13.h" diff --git a/libraries/mcpp/test-t/nest13.h b/libraries/mcpp/test-t/nest13.h new file mode 100644 index 000000000..4f8355f38 --- /dev/null +++ b/libraries/mcpp/test-t/nest13.h @@ -0,0 +1,2 @@ +/* nest13.h */ +#include "nest14.h" diff --git a/libraries/mcpp/test-t/nest14.h b/libraries/mcpp/test-t/nest14.h new file mode 100644 index 000000000..b3ab47406 --- /dev/null +++ b/libraries/mcpp/test-t/nest14.h @@ -0,0 +1,2 @@ +/* nest14.h */ +#include "nest15.h" diff --git a/libraries/mcpp/test-t/nest15.h b/libraries/mcpp/test-t/nest15.h new file mode 100644 index 000000000..aeab3feb7 --- /dev/null +++ b/libraries/mcpp/test-t/nest15.h @@ -0,0 +1,4 @@ +/* nest15.h */ +#ifdef X0F + nest = 0x0f; +#endif diff --git a/libraries/mcpp/test-t/nest2.h b/libraries/mcpp/test-t/nest2.h new file mode 100644 index 000000000..89056cde6 --- /dev/null +++ b/libraries/mcpp/test-t/nest2.h @@ -0,0 +1,5 @@ +/* nest2.h */ + + nest = 2; + +#include "nest3.h" diff --git a/libraries/mcpp/test-t/nest3.h b/libraries/mcpp/test-t/nest3.h new file mode 100644 index 000000000..724e99069 --- /dev/null +++ b/libraries/mcpp/test-t/nest3.h @@ -0,0 +1,5 @@ +/* nest3.h */ + + nest = 3; + +#include "nest4.h" diff --git a/libraries/mcpp/test-t/nest4.h b/libraries/mcpp/test-t/nest4.h new file mode 100644 index 000000000..5f0cb4865 --- /dev/null +++ b/libraries/mcpp/test-t/nest4.h @@ -0,0 +1,5 @@ +/* nest4.h */ + + nest = 4; + +#include "nest5.h" diff --git a/libraries/mcpp/test-t/nest5.h b/libraries/mcpp/test-t/nest5.h new file mode 100644 index 000000000..56efbcf19 --- /dev/null +++ b/libraries/mcpp/test-t/nest5.h @@ -0,0 +1,5 @@ +/* nest5.h */ + + nest = 5; + +#include "nest6.h" diff --git a/libraries/mcpp/test-t/nest6.h b/libraries/mcpp/test-t/nest6.h new file mode 100644 index 000000000..00040c78a --- /dev/null +++ b/libraries/mcpp/test-t/nest6.h @@ -0,0 +1,5 @@ +/* nest6.h */ + + nest = 6; + +#include "nest7.h" diff --git a/libraries/mcpp/test-t/nest7.h b/libraries/mcpp/test-t/nest7.h new file mode 100644 index 000000000..ba005dc4e --- /dev/null +++ b/libraries/mcpp/test-t/nest7.h @@ -0,0 +1,5 @@ +/* nest7.h */ + + nest = 7; + +#include "nest8.h" diff --git a/libraries/mcpp/test-t/nest8.h b/libraries/mcpp/test-t/nest8.h new file mode 100644 index 000000000..7fcdb8740 --- /dev/null +++ b/libraries/mcpp/test-t/nest8.h @@ -0,0 +1,7 @@ +/* nest8.h */ + + nest = 8; +#ifndef X8 +#include "nest9.h" +#endif + diff --git a/libraries/mcpp/test-t/nest9.h b/libraries/mcpp/test-t/nest9.h new file mode 100644 index 000000000..5f84e46fe --- /dev/null +++ b/libraries/mcpp/test-t/nest9.h @@ -0,0 +1,2 @@ +/* nest9.h */ +#include "nest10.h" diff --git a/libraries/mcpp/test-t/pragmas.h b/libraries/mcpp/test-t/pragmas.h new file mode 100644 index 000000000..6bf181e3e --- /dev/null +++ b/libraries/mcpp/test-t/pragmas.h @@ -0,0 +1,24 @@ +/* pragmas.h based on the proposal to C99 by Bill Homer */ + +#if defined(Machine_A) + /* Request fastest calling sequence for machine A */ +# define Fast_call \ + _Pragma("fast_call") +#elif defined(Machine_B) + /* Request fastest calling sequence for machine B */ +# define Fast_call \ + _Pragma("vfunction") +#else +# define Fast_call +#endif + +#if defined(Machine_B) + /* Vectorization hint (ignore vector dependencies) */ +# define Independent _Pragma("ivdep") +#elif defined(Machine_C) + /* Parallelization hint (iterations are independent) */ +# define Independent _Pragma("independent") +#else +# define Independent +#endif + diff --git a/libraries/mcpp/test-t/recurs.t b/libraries/mcpp/test-t/recurs.t new file mode 100644 index 000000000..503a4872b --- /dev/null +++ b/libraries/mcpp/test-t/recurs.t @@ -0,0 +1,21 @@ +/* recurs.t: recursive macro */ +/* The sample posted to comp.std.c by B. Stroustrap. */ + +#define NIL(xxx) xxx +#define G_0(arg) NIL(G_1)(arg) +#define G_1(arg) NIL(arg) + +G_0(42) + +/* + * Note by kmatsui: + * There are two interpretations on the Standard's specification. + * (1) This macro should be expanded to 'NIL(42)'. + * (2) This macro should be expanded to '42'. + * The Standard's wording seems to justify the (1). + * GCC, Visual C++ and other major implementations, however, expand + * this macro as (2). + * MCPP V.2.4.1 or later of Standard mode expands this as (1) by default, + * and expands as (2) when invoked with -@compat option. + */ + diff --git a/libraries/mcpp/test-t/trad.t b/libraries/mcpp/test-t/trad.t new file mode 100644 index 000000000..f064536cb --- /dev/null +++ b/libraries/mcpp/test-t/trad.t @@ -0,0 +1,64 @@ +/* trad.t + * Samples for a very old "Reiser" model preprocessor. + */ + +#define glue(a, b) a/**/b +#define xglue(a, b) glue(a,b) +#define ctrl( c) 'c' & 0x1f + +#define debug(n1,n2) printf("n1= %d, n2= %s", x/**/n1, x/**/n2) + +/* ISO C preprocessor expands to :a b c; + * very old preprocessor does to :abc; + */ + glue( glue( a,b),c); + +/* ISO C :a b c; + * very old :abc; + */ + xglue( xglue( a,b),c); + +#define abc ABC + +/* ISO C preprocessor expands to :a b c; + * very old preprocessor does to :ABC; + */ + glue( glue( a,b),c); + +/* ISO C :'c' & 0x1f; + * very old :'A' & 0x1f; + */ + ctrl( A); + +/* ISO C :printf("n1= %d, n2= %s", x 1, x 2); + * very old :printf("1= %d, 2= %s", x1, x2); + */ + debug(1,2); + +/* ISO C :text other than comment after #else, #endif line is error + * very old :the text is skipped quietly + */ +#define OLD_PREPROCESSOR 1 +#if OLD_PREPROCESSOR +#else OLD_PREPROCESSOR +#endif OLD_PREPROCESSOR + +/* ISO C :Token error + * very old :Implicit closing quote at end of line + */ +asm(" + .text +_probeintr: + ss + incl _npx_intrs_while_probing + pushl %eax + movb $0x20,%al +#ifdef PC98 + outb %al,$0x08 + outb %al,$0x0 +#else + outb %al,$0xa0 + outb %al,$0x20 +#endif +"); + diff --git a/libraries/mcpp/test-t/u_1_1.t b/libraries/mcpp/test-t/u_1_1.t new file mode 100644 index 000000000..48bf69426 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_1.t @@ -0,0 +1,18 @@ +/* u_1_1.t: Undefined behaviors on unterminated line, comment or macro. */ + +/* u.1.1: End of a source file without . */ +#include "unbal3.h" +int e_1; + +/* u.1.2: End of a source file with . */ +#include "unbal4.h" +; + +/* u.1.3: End of a source file with an unterminated comment. */ +#include "unbal5.h" +*/ + +/* u.1.4: End of a source file with an uncompleted macro call. */ +#include "unbal6.h" + y); + diff --git a/libraries/mcpp/test-t/u_1_11.t b/libraries/mcpp/test-t/u_1_11.t new file mode 100644 index 000000000..aee946d71 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_11.t @@ -0,0 +1,9 @@ +/* u_1_11.t: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* u.1.11: Header-name containing ', ", \ or "/*". */ +/* Probably illegal filename and fails to open. */ +#include "../*line.h" +/* \ is a legal path-delimiter in MS-DOS or some other OS's. */ +#include "..\test-t\line.h" + diff --git a/libraries/mcpp/test-t/u_1_12.t b/libraries/mcpp/test-t/u_1_12.t new file mode 100644 index 000000000..fa2b9ec1f --- /dev/null +++ b/libraries/mcpp/test-t/u_1_12.t @@ -0,0 +1,6 @@ +/* u_1_12.t: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* u.1.12: Argument of #include other than header-name. */ +#include filename + diff --git a/libraries/mcpp/test-t/u_1_13.t b/libraries/mcpp/test-t/u_1_13.t new file mode 100644 index 000000000..839ee100e --- /dev/null +++ b/libraries/mcpp/test-t/u_1_13.t @@ -0,0 +1,6 @@ +/* u_1_13.t: Undefined behaviors on undefined #include syntax or header- + name. */ + +/* u.1.13: Excessive argument in #include directive. */ +#include Junk + diff --git a/libraries/mcpp/test-t/u_1_14.t b/libraries/mcpp/test-t/u_1_14.t new file mode 100644 index 000000000..4927c4814 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_14.t @@ -0,0 +1,15 @@ +/* u_1_14.t: Undefined behaviors on undefined #line syntax. */ + +/* u.1.14: #line directive without an argument of line number. */ +#line "filename" + +/* u.1.15: #line directive with the second argument of other than string + literal. */ +#line 1234 filename + +/* u.1.16: Excessive argument in #line directive. */ +#line 2345 "filename" Junk + +/* 14; "u_1_14.t"; or other undefined results. */ + __LINE__; __FILE__; + diff --git a/libraries/mcpp/test-t/u_1_17.t b/libraries/mcpp/test-t/u_1_17.t new file mode 100644 index 000000000..1c389470c --- /dev/null +++ b/libraries/mcpp/test-t/u_1_17.t @@ -0,0 +1,26 @@ +/* u_1_17.t: Undefined behaviors on out-of-range #line number. */ + +/* u.1.17: Line number argument of #line directive should be in range of + [1,32767]. */ +/* In C99, range of line number is [1,2147483647] */ +#if __STDC_VERSION__ < 199901L +#line 32767 /* valid here */ +/* line 32767 */ +/* line 32768 ? : out of range */ + __LINE__; /* 32769 ? or -32767 ?, maybe warned as an out-of-range */ +#line 0 +#line 32768 +#else +#line 2147483647 /* valid here */ +/* line 2147483647 */ +/* line 2147483648 ? : out of range */ + __LINE__; /* 2147483649 ? or -2147483647 ?, + maybe warned as an out-of-range */ +#line 0 +#line 2147483648 +#endif + +/* u.1.18: Line number argument of #line directive should be written in + decimal digits. */ +#line 0x1000 + diff --git a/libraries/mcpp/test-t/u_1_19.t b/libraries/mcpp/test-t/u_1_19.t new file mode 100644 index 000000000..7d3630aa3 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_19.t @@ -0,0 +1,37 @@ +/* u_1_19.t: Undefined behaviors on undefined #define and #undef syntax. */ + +/* u.1.19: A macro expanded to "defined" in #if expression. */ +#define DEFINED defined +#if DEFINED DEFINED +#endif + +#undef __linux__ +#undef __arm__ +#define __linux__ 1 +#define HAVE_MREMAP defined(__linux__) && !defined(__arm__) +/* Wrong macro definition. + * This macro should be defined as follows. + * #if defined(__linux__) && !defined(__arm__) + * #define HAVE_MREMAP 1 + * #endif + */ +#if HAVE_MREMAP + mremap(); +#endif + +/* u.1.20: Undefining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ or + "defined" in #undef directive. */ +#undef __LINE__ +/* 16; or other undefined result. */ + __LINE__; + +/* u.1.21: Defining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__ or + "defined" in #define directive. */ +#define __LINE__ 1234 +/* 18; or other undefined result. */ + __LINE__; +#define defined defined +#if defined defined +# error I am not a good preprocessor. +#endif + diff --git a/libraries/mcpp/test-t/u_1_22.t b/libraries/mcpp/test-t/u_1_22.t new file mode 100644 index 000000000..0bde5c2c2 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_22.t @@ -0,0 +1,22 @@ +/* u_1_22.t: Undefined behaviors on generating invalid pp-token by # and + ## operators. */ + +/* u.1.22: Result of ## operator is not a valid pp-token. */ +#define NUM( dig, exp) dig ## E+ ## exp +/* + * "E+" is a sequence of two pp-tokens "E" and "+", not a single pp-token. + * The first ## concatenates the last pp-token of first argument with "E", + * and the second ## concatenates "+" with the first pp-token of the second + * argument. + * While "12E" (one of the sequence generated by the token concatenation) + * is a valid pp-token, "+34" (the another sequence) is not a valid pp-token + * and causes an undefined behavior. + */ + NUM( 12, 34); + +/* u.1.23: Result of # operator is not a valid string literal. */ +/* "\\"\""; This sequence is parsed to three tokens "\\" \ "", and will be + diagnosed by compiler-proper unless diagnosed by preprocessor. */ +#define str( a) #a + str( \""); + diff --git a/libraries/mcpp/test-t/u_1_24.t b/libraries/mcpp/test-t/u_1_24.t new file mode 100644 index 000000000..4a6740edc --- /dev/null +++ b/libraries/mcpp/test-t/u_1_24.t @@ -0,0 +1,37 @@ +/* u_1_24.t: Undefined behaviors on empty argument of macro call. */ + +/* u.1.24: Empty argument of macro call. */ +/* + * Note: Since no argument and one empty argument cannot be distinguished + * syntactically, additional dummy argument may be necessary for an + * intermediate macro to process one empty argument (if possible). + */ + +#define ARG( a, dummy) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s, dummy)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); + or other undefined behavior. */ + SHOWN( math( sub, , y)); + +/* printf( "%s : %s\n", "EMPTY", ""); + or other undefined behavior. */ + SHOWS( EMPTY); + +/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ + SHOWS( APPEND( CON, 1)); + +/* printf( "%s : %s\n", "APPEND( CON, )", "CON"); + or other undefined behavior. */ + SHOWS( APPEND( CON, )); + +/* printf( "%s : %s\n", "APPEND( , )", ""); + or other undefined behavior. */ + SHOWS( APPEND( , )); + diff --git a/libraries/mcpp/test-t/u_1_25.t b/libraries/mcpp/test-t/u_1_25.t new file mode 100644 index 000000000..29e746b3b --- /dev/null +++ b/libraries/mcpp/test-t/u_1_25.t @@ -0,0 +1,18 @@ +/* u_1_25.t: Miscelaneous undefined macros. */ + +#define str( a) # a +#define sub( x, y) (x - y) +#define SUB sub + +/* u.1.25: Macro argument otherwise parsed as a directive. */ +/* "#define NAME"; or other undefined behaviour. */ + str( +#define NAME + ); + +#if 0 /* Added by C90: Corrigendum 1 (1994) and deleted by C99 */ +/* u.1.26: Expanded macro replacement list end with name of function-like + macro. */ + SUB( a, b); +#endif + diff --git a/libraries/mcpp/test-t/u_1_27.t b/libraries/mcpp/test-t/u_1_27.t new file mode 100644 index 000000000..69ffe495b --- /dev/null +++ b/libraries/mcpp/test-t/u_1_27.t @@ -0,0 +1,6 @@ +/* u_1_27.t: Pseudo-directive-line. */ + +/* u.1.27: Unknown preprocessing directive (other than #pragma). */ +#ifdefined MACRO +#endif /* The second error. */ + diff --git a/libraries/mcpp/test-t/u_1_28.t b/libraries/mcpp/test-t/u_1_28.t new file mode 100644 index 000000000..6afff68bf --- /dev/null +++ b/libraries/mcpp/test-t/u_1_28.t @@ -0,0 +1,13 @@ +/* u_1_28.t: Macro expanding to name identical to directive. */ + +#define D define +/* u.1.28: There are following two ways of preprocessing. + 1: "D" isn't expanded, because # is the first token of the line. + Preprocessor reports that "D" is an unknown directive. + 2: "D" is expanded, because that is not a directive. + Compiler-phase will diagnose the output of preprocess. + Anyway, preprocessor should not interprete this line as a preprocessing + directive. + */ +#D A B + diff --git a/libraries/mcpp/test-t/u_1_5.t b/libraries/mcpp/test-t/u_1_5.t new file mode 100644 index 000000000..f2d49718b --- /dev/null +++ b/libraries/mcpp/test-t/u_1_5.t @@ -0,0 +1,13 @@ +/* u_1_5.t: Undefined behaviors on illegal characters. */ + +/* u.1.5: Illegal characters (in other than string literal, character + constant, header-name or comment). */ +#if 1 ||2 +/* 0x1e ^ ^ 0x1f */ +#endif /* Maybe the second error. */ + +/* u.1.6: [VT], [FF] in directive line. */ +#if 1 || 2 +/* [VT] ^ ^ [FF] */ +#endif /* Maybe the second error. */ + diff --git a/libraries/mcpp/test-t/u_1_7_big5.t b/libraries/mcpp/test-t/u_1_7_big5.t new file mode 100644 index 000000000..90a87f6e7 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_7_big5.t @@ -0,0 +1,9 @@ +/* u_1_7_big5.t: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma setlocale( "chinese-traditional") /* For Visual C */ +#pragma __setlocale( "big5") /* For MCPP */ + + str( ""); /* 0xa181 */ + diff --git a/libraries/mcpp/test-t/u_1_7_eucjp.t b/libraries/mcpp/test-t/u_1_7_eucjp.t new file mode 100644 index 000000000..0549640ea --- /dev/null +++ b/libraries/mcpp/test-t/u_1_7_eucjp.t @@ -0,0 +1,8 @@ +/* u_1_7_eucjp.t: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma __setlocale( "eucjp") /* For MCPP */ + + str( ""); /* 0xb1a0 */ + diff --git a/libraries/mcpp/test-t/u_1_7_gb.t b/libraries/mcpp/test-t/u_1_7_gb.t new file mode 100644 index 000000000..a7a833d03 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_7_gb.t @@ -0,0 +1,9 @@ +/* u_1_7_gb.t: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma setlocale( "chinese-simplified") /* For Visual C */ +#pragma __setlocale( "gb2312") /* For MCPP */ + + str( ""); /* 0xb1a0 */ + diff --git a/libraries/mcpp/test-t/u_1_7_jis.t b/libraries/mcpp/test-t/u_1_7_jis.t new file mode 100644 index 000000000..dadaffb5a --- /dev/null +++ b/libraries/mcpp/test-t/u_1_7_jis.t @@ -0,0 +1,8 @@ +/* u_1_7_jis.t: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma __setlocale( "jis") /* For MCPP */ + + str( "$B1 (B"); /* 0x3120 */ + diff --git a/libraries/mcpp/test-t/u_1_7_ksc.t b/libraries/mcpp/test-t/u_1_7_ksc.t new file mode 100644 index 000000000..e169fd227 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_7_ksc.t @@ -0,0 +1,9 @@ +/* u_1_7_ksc.t: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma setlocale( "korean") /* For Visual C */ +#pragma __setlocale( "ksc5601") /* For MCPP */ + + str( ""); /* 0xb1a0 */ + diff --git a/libraries/mcpp/test-t/u_1_7_sjis.t b/libraries/mcpp/test-t/u_1_7_sjis.t new file mode 100644 index 000000000..652d8df24 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_7_sjis.t @@ -0,0 +1,9 @@ +/* u_1_7_sjis.t: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma setlocale( "japanese") /* For Visual C */ +#pragma __setlocale( "sjis") /* For MCPP */ + + str( "8"); /* 0x9138 */ + diff --git a/libraries/mcpp/test-t/u_1_7_utf8.t b/libraries/mcpp/test-t/u_1_7_utf8.t new file mode 100644 index 000000000..ecd2683ae --- /dev/null +++ b/libraries/mcpp/test-t/u_1_7_utf8.t @@ -0,0 +1,11 @@ +/* u_1_7_utf8.t: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ + +#define str( a) # a +#pragma __setlocale( "utf8") /* For MCPP */ + + str( "字"); /* 0xe5ad97 : legal */ + str( ""); /* 0xc0af : overlong */ + str( ""); /* 0xe09fbf : overlong */ + str( ""); /* 0xeda080 : UTF-16 surrogate */ + diff --git a/libraries/mcpp/test-t/u_1_8.t b/libraries/mcpp/test-t/u_1_8.t new file mode 100644 index 000000000..345bc0025 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_8.t @@ -0,0 +1,7 @@ +/* u_1_8.t: Undefined behaviors on unterminated quotations (1). */ + +/* u.1.8: Unterminated character constant. */ +/* The following "comment" may not interpreted as a comment but swallowed by + the unterminated character constant. */ +#error I can't understand. /* Token error prior to execution of #error. */ + diff --git a/libraries/mcpp/test-t/u_1_9.t b/libraries/mcpp/test-t/u_1_9.t new file mode 100644 index 000000000..76516f008 --- /dev/null +++ b/libraries/mcpp/test-t/u_1_9.t @@ -0,0 +1,10 @@ +/* u_1_8.t: Undefined behaviors on unterminated quotations (2). */ + +/* u.1.9: Unterminated string literal. */ + "String literal + across the lines. +" + +/* u.1.10: Unterminated header-name. */ +#include . */ +#include "unbal3.h" +int e_1; + +/* u.1.2: End of a source file with . */ +#include "unbal4.h" +; + +/* u.1.3: End of a source file with an unterminated comment. */ +#include "unbal5.h" +*/ + +/* u.1.4: End of a source file with an uncompleted macro call. */ +#include "unbal6.h" + y); + +/* u.1.5: Illegal characters (in other than string literal, character + constant, header-name or comment). */ +#if 1 ||2 +/* 0x1e ^ ^ 0x1f */ +#endif /* Maybe the second error. */ + +/* u.1.6: [VT], [FF] in directive line. */ +#if 1 || 2 +/* [VT] ^ ^ [FF] */ +#endif /* Maybe the second error. */ + +/* u.1.7: Invalid multi-byte character sequence (in string literal, + character constant, header-name or comment). */ +#if '== 0x8e +/* ^ 0x8e */ +#endif /* Maybe the second error. */ + +/* u.1.8: Unterminated character constant. */ +/* The following "comment" may not interpreted as a comment but swallowed by + the unterminated character constant. */ +#error I can't understand. /* Token error prior to execution of #error. */ + +/* u.1.9: Unterminated string literal. */ + "String literal + across the lines. +" + +/* u.1.10: Unterminated header-name. */ +#include Junk + +/* u.1.14: #line directive without an argument of line number. */ +#line "filename" + +/* u.1.15: #line directive with the second argument of other than string + literal. */ +#line 1234 filename + +/* u.1.16: Excessive argument in #line directive. */ +#line 2345 "filename" Junk + +/* 83; "undefs.t"; or other undefined results. */ + __LINE__; __FILE__; + +/* u.1.17: Line number argument of #line directive should be in range of + [1,32767]. */ +/* In C99, range of line number is [1,2147483647] */ +#if __STDC_VERSION__ < 199901L +#line 32767 /* valid here */ +/* line 32767 */ +/* line 32768 ? : out of range */ + __LINE__; /* 32769 ? or -32767 ?, maybe warned as an out-of-range */ +#line 0 +#line 32768 +#else +#line 2147483647 /* valid here */ +/* line 2147483647 */ +/* line 2147483648 ? : out of range */ + __LINE__; /* 2147483649 ? or -2147483647 ?, + maybe warned as an out-of-range */ +#line 0 +#line 2147483648 +#endif + +/* u.1.18: Line number argument of #line directive should be written in + decimal digits. */ +#line 0x1000 + +#line 110 /* Restore to correct line number. */ + +/* u.1.19: A macro expanded to "defined" in #if expression. */ +#define DEFINED defined +#if DEFINED DEFINED +#endif + +#undef __linux__ +#undef __arm__ +#define __linux__ 1 +#define HAVE_MREMAP defined(__linux__) && !defined(__arm__) +/* Wrong macro definition. + * This macro should be defined as follows. + * #if defined(__linux__) && !defined(__arm__) + * #define HAVE_MREMAP 1 + * #endif + */ +#if HAVE_MREMAP + mremap(); +#endif + +/* u.1.20: Undefining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, + __STDC_VERSION__ or "defined" in #undef directive. */ +#undef __LINE__ +/* 134; or other undefined result. */ + __LINE__; + +/* u.1.21: Defining __FILE__, __LINE__, __DATE__, __TIME__, __STDC__, + __STDC_VERSION__ or "defined" in #define directive. */ +#define __LINE__ 1234 +/* 140; or other undefined result. */ + __LINE__; +#define defined defined +#if defined defined +# error I am not a good preprocessor. +#endif + +/* u.1.22: Result of ## operator is not a valid pp-token. */ +#define NUM( dig, exp) dig ## E+ ## exp +/* + * "E+" is a sequence of two pp-tokens "E" and "+", not a single pp-token. + * The first ## concatenates the last pp-token of first argument with "E", + * and the second ## concatenates "+" with the first pp-token of the second + * argument. + * While "12E" (one of the sequence generated by the token concatenation) + * is a valid pp-token, "+34" (the another sequence) is not a valid pp-token + * and causes an undefined behavior. + */ + NUM( 12, 34); + +/* u.1.23: Result of # operator is not a valid string literal. */ +/* "\\"\""; This sequence is parsed to three tokens "\\" \ "", and will be + diagnosed by compiler-proper unless diagnosed by preprocessor. */ + str( \""); + +/* u.1.24: Empty argument of macro call. */ +/* + * Empty argument is permitted in C99. + * Note: Since no argument and one empty argument cannot be distinguished + * syntactically, additional dummy argument may be necessary for an + * intermediate macro to process one empty argument (if possible). + */ + +#if __STDC_VERSION__ < 199910L +#define ARG( a, dummy) # a +#define EMPTY +#define SHOWN( n) printf( "%s : %d\n", # n, n) +#define SHOWS( s) printf( "%s : %s\n", # s, ARG( s, dummy)) +#define add( a, b) (a + b) +#define sub( a, b) (a - b) +#define math( op, a, b) op( a, b) +#define APPEND( a, b) a ## b + +/* printf( "%s : %d\n", "math( sub, , y)", ( - y)); + or other undefined behavior. */ + SHOWN( math( sub, , y)); + +/* printf( "%s : %s\n", "EMPTY", ""); + or other undefined behavior. */ + SHOWS( EMPTY); + +/* printf( "%s : %s\n", "APPEND( CON, 1)", "CON1"); */ + SHOWS( APPEND( CON, 1)); + +/* printf( "%s : %s\n", "APPEND( CON, )", "CON"); + or other undefined behavior. */ + SHOWS( APPEND( CON, )); + +/* printf( "%s : %s\n", "APPEND( , )", ""); + or other undefined behavior. */ + SHOWS( APPEND( , )); +#endif + +/* u.1.25: Macro argument otherwise parsed as a directive. */ +/* "#define NAME"; or other undefined behaviour. */ + str( +#define NAME + ); + +#if 0 /* Added by C90: Corrigendum 1 (1994) and deleted by C99 */ +/* u.1.26: Expanded macro replacement list end with name of function-like + macro. */ +#define SUB sub + SUB( a, b); +#endif + +/* u.1.27: Unknown preprocessing directive (other than #pragma). */ +#ifdefined MACRO +#endif /* The second error. */ + +#define D define +/* u.1.28: There are following two ways of preprocessing. + 1: "D" isn't expanded, because # is the first token of the line. + Preprocessor reports that "D" is an unknown directive. + 2: "D" is expanded, because that is not a directive. + Compiler-phase will diagnose the output of preprocess. + Anyway, preprocessor should not interprete this line as a preprocessing + directive. + */ +#D A B + +/* u.2.1: Undefined escape sequence. */ +#if '\x' +#endif + +/* u.2.2: Illegal bit shift count. */ +#if 1 << -1 +#endif +#if 1 << 64 +#endif + diff --git a/libraries/mcpp/test-t/unspcs.t b/libraries/mcpp/test-t/unspcs.t new file mode 100644 index 000000000..9fc42b119 --- /dev/null +++ b/libraries/mcpp/test-t/unspcs.t @@ -0,0 +1,29 @@ +/* + * unspcs.t: + * 1998/08 made public kmatsui + * + * These texts are unportable ones, because the order of the evaluation is + * unspecified. Good preprocessor will warn at these texts even if the + * results are valid. Good preprocessor will also document the order of + * evaluation and the behavior on invalid results. + * Note: Order of evaluation of sub-expressions (other than operands of &&, + * ||, ? :) of #if expression is also unspecified. The order, however, never + * affects the result, because #if expression never cause side effect, so no + * warning is necessary. Precedence and grouping rules of operators are other + * things than order of evaluation, and shall be obeyed by preprocessor. + */ + +#define str( a) # a +#define xstr( a) str( a) + +/* s.1.1: Order of evaluation of #, ## operators. */ +#define MAKWIDESTR( s) L ## # s +/* Either of L"name"; or L# name; ("L#" is not a valid pp-token). */ + MAKWIDESTR( name); + +/* s.1.2: Order of evaluation of ## operators. */ +#define glue3( a, b, c) a ## b ## c +/* "1.a" or undefined, since .a is not a valid pp-token, while 1. and 1.a are + valid pp-tokens. */ + xstr( glue3( 1, ., a)); + diff --git a/libraries/mcpp/test-t/vers2.h b/libraries/mcpp/test-t/vers2.h new file mode 100644 index 000000000..91963420c --- /dev/null +++ b/libraries/mcpp/test-t/vers2.h @@ -0,0 +1,12 @@ +/* vers2.h */ + +/* comment */ # /**/ pragma /**/ once /**/ + +#include +#include + +/* + * , might have the line + * #pragma once + * near the beginning. + */ diff --git a/libraries/mcpp/test-t/warns.t b/libraries/mcpp/test-t/warns.t new file mode 100644 index 000000000..ee0b65afe --- /dev/null +++ b/libraries/mcpp/test-t/warns.t @@ -0,0 +1,137 @@ +/* + * warns.t: + * 1998/08 made public kmatsui + * 2002/12 slightly modified kmatsui + * 2003/11 added a few samples kmatsui + */ + +/* + * The following texts are legal but suspicious ones. Good preprocessor + * will warn at these texts. + */ + +/* w.1.1: "/*" in comment. */ +/* comment /* nested comment and no closing */ + +/* w.1.2: Rescanning of replacement text involves succeding text. */ +#define sub( x, y) (x - y) +#define head sub( + int a = 1, b = 2, c; + c = head a,b ); + +#define OBJECT_LIKE FUNCTION_LIKE +#define FUNCTION_LIKE( x, y) (x + y) + c = OBJECT_LIKE( a, b); /* (a + b) */ + +/* w.2.1: Negative number converted to positive in #if expression. */ +#if -1 < 0U +#endif + +/* w.2.2: Out of range of unsigned type (wraps around and never overflow) + in #if expression. */ +#if 0U - 1 +#endif + +/* + * The following texts are legal but non-portable ones, since these requires + * translation limits greater than the minima quaranteed by C90. Good + * preprocessor will warn at these texts (at least when user wants), unless + * it diagnose these as errors. + */ + +/* w.3.1: Number of parameters in macro: more than 31. */ +#define glue63( \ + a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0, \ + a1, b1, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, n1, o1, p1, \ + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, \ + a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3) \ + a0 ## b0 ## c0 ## d0 ## e0 ## f0 ## g0 ## h0 ## \ + o0 ## o1 ## o2 ## o3 ## p0 ## p1 ## p2 + +/* w.3.2: Number of arguments in macro call: more than 31. */ +/* A0B0C0D0E0F0G0H0O0O1O2O3P0P1P2; */ + glue63( + A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, + A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, + A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, + A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, L3, M3, N3, O3); + +/* w.3.3: Initial significant characters in an identifier: more than 31. */ + int +A23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef = 63; + + +/* w.3.4: Nested conditional inclusion: more than 8 levels. */ +#define X0F +/* nest = 0x0f; */ +#include "ifdef15.h" + +/* w.3.5: Nested source file inclusion: more than 8 levels. */ +#define X0F +/* nest = 0x0f; */ +#include "nest1.h" + +/* w.3.6: Parenthesized expression: more than 32 levels. */ +/* nest = 63; */ +#if \ + (0x00 + (0x01 - (0x02 + (0x03 - (0x04 + (0x05 - (0x06 + (0x07 - \ + (0x08 + (0x09 - (0x0A + (0x0B - (0x0C + (0x0D - (0x0E + (0x0F - \ + (0x10 + (0x11 - (0x12 + (0x13 - (0x14 + (0x15 - (0x16 + (0x17 - \ + (0x18 + (0x19 - (0x1A + (0x1B - (0x1C + (0x1D - (0x1E + (0x1F - \ + (0x20 + (0x21 - (0x22 + (0x23 - (0x24 + (0x25 - (0x26 + (0x27 - \ + (0x28 + (0x29 - (0x2A + (0x2B - (0x2C + (0x2D - (0x2E + (0x2F - \ + (0x30 + (0x31 - (0x32 + (0x33 - (0x34 + (0x35 - (0x36 + (0x37 - \ + (0x38 + (0x39 - (0x3A + (0x3B - (0x3C + (0x3D - 0x3E) \ + ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) \ + == -1 + nest = 63; +#endif + +/* w.3.7: Characters in a string (after concatenation): more than 509. */ + char *string1023 = +"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +4123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +5123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +6123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +7123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +9123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +a123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +b123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +c123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +d123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +e123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\ +f123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" +; + +/* w.3.8: Characters in a logical source line: more than 509. */ + int a123456789012345678901234567890 = 123450; \ + int b123456789012345678901234567890 = 123451; \ + int c123456789012345678901234567890 = 123452; \ + int d123456789012345678901234567890 = 123453; \ + int e123456789012345678901234567890 = 123454; \ + int f123456789012345678901234567890 = 123455; \ + int g123456789012345678901234567890 = 123456; \ + int h123456789012345678901234567890 = 123457; \ + int i123456789012345678901234567890 = 123458; \ + int j123456789012345678901234567890 = 123459; \ + int k123456789012345678901234567890 = 123460; \ + int l123456789012345678901234567890 = 123461; \ + int m123456789012345678901234567890 = 123462; \ + int n123456789012345678901234567890 = 123463; \ + int o123456789012345678901234567890 = 123464; \ + int p123456789012345678901234567890 = 123465; \ + int q123456789012345678901234567890 = 123466; \ + int r123456789012345678901234567890 = 123467; \ + int s123456789012345678901234567890 = 123468; \ + int t1234567890123456 = 123469; + +/* w.3.9: Macro definitions: more than 1024 (including predefined ones). */ +#define X0400 +#include "m4095.h" +/* 0x0400; */ + BNJ; + diff --git a/libraries/mcpp/tests/Makefile.am b/libraries/mcpp/tests/Makefile.am new file mode 100644 index 000000000..f2efdf73a --- /dev/null +++ b/libraries/mcpp/tests/Makefile.am @@ -0,0 +1,40 @@ +## Process this file with automake to produce Makefile.in + +AUTOMAKE_OPTIONS = dejagnu foreign + +if REPLACE_CPP + +Makefile: + +check-DEJAGNU: + EXPECT=$(EXPECT); export EXPECT + + @if test x"$(gcc_testsuite_dir)" = x""; then \ + echo "ERROR: testsuite directory is not specified. Do './configure --with-gcc-testsuite-dir=directory' prior to 'make check'"; \ + exit 1; \ + fi + @if test `$(cpp_call) -v /dev/null 2>&1 | grep 'MCPP' > /dev/null; echo $$?` != 0; \ + then \ + echo "ERROR: Do 'make install' prior to 'make check'"; \ + exit 1; \ + fi + @if test -f "$(gcc_testsuite_dir)/gcc.dg/cpp-test/test-t/cpp-test.exp"; \ + then :; \ + else \ + echo ' cp -Rp $(top_srcdir)/cpp-test $(gcc_testsuite_dir)/gcc.dg'; \ + cp -Rp $(top_srcdir)/cpp-test "$(gcc_testsuite_dir)/gcc.dg"; \ + fi + @$(top_srcdir)/tests/set_test.sh '$(CC)' '$(gcc_path)' '$(gcc_testsuite_dir)' $(gcc_maj_ver) '$(LN_S)' '$(cpp_call)' '$(target_cc)' + -$(RUNTEST) --tool gcc --srcdir $(gcc_testsuite_dir) cpp-test.exp + @$(top_srcdir)/tests/after_test.sh '$(CC)' '$(gcc_path)' '$(cpp_call)' '$(target_cc)' + +uninstall: + @if test x"$(gcc_testsuite_dir)" != x""; then \ + cd "$(gcc_testsuite_dir)"; \ + if test -f "gcc.dg/cpp-test/test-t/cpp-test.exp"; then \ + echo " rm -rf gcc.dg/cpp-test"; \ + rm -rf gcc.dg/cpp-test; \ + fi \ + fi + +endif diff --git a/libraries/mcpp/tests/Makefile.in b/libraries/mcpp/tests/Makefile.in new file mode 100644 index 000000000..66f432334 --- /dev/null +++ b/libraries/mcpp/tests/Makefile.in @@ -0,0 +1,411 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = tests +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +depcomp = +am__depfiles_maybe = +SOURCES = +DIST_SOURCES = +DEJATOOL = $(PACKAGE) +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXPECT = expect +RUNTEST = runtest +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +Target_Cpu = @Target_Cpu@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cpp_call = @cpp_call@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gcc_maj_ver = @gcc_maj_ver@ +gcc_min_ver = @gcc_min_ver@ +gcc_path = @gcc_path@ +gcc_testsuite_dir = @gcc_testsuite_dir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_system = @host_system@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +inc_dir = @inc_dir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cc = @target_cc@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = dejagnu foreign +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps tests/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign --ignore-deps tests/Makefile +.PRECIOUS: Makefile +@REPLACE_CPP_FALSE@Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +@REPLACE_CPP_FALSE@ @case '$?' in \ +@REPLACE_CPP_FALSE@ *config.status*) \ +@REPLACE_CPP_FALSE@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ +@REPLACE_CPP_FALSE@ *) \ +@REPLACE_CPP_FALSE@ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ +@REPLACE_CPP_FALSE@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ +@REPLACE_CPP_FALSE@ esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +@REPLACE_CPP_FALSE@check-DEJAGNU: site.exp +@REPLACE_CPP_FALSE@ srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ +@REPLACE_CPP_FALSE@ EXPECT=$(EXPECT); export EXPECT; \ +@REPLACE_CPP_FALSE@ runtest=$(RUNTEST); \ +@REPLACE_CPP_FALSE@ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ +@REPLACE_CPP_FALSE@ exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \ +@REPLACE_CPP_FALSE@ if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ +@REPLACE_CPP_FALSE@ then :; else exit_status=1; fi; \ +@REPLACE_CPP_FALSE@ done; \ +@REPLACE_CPP_FALSE@ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ +@REPLACE_CPP_FALSE@ fi; \ +@REPLACE_CPP_FALSE@ exit $$exit_status +site.exp: Makefile + @echo 'Making a new site.exp file...' + @echo '## these variables are automatically generated by make ##' >site.tmp + @echo '# Do not edit here. If you wish to override these values' >>site.tmp + @echo '# edit the last section' >>site.tmp + @echo 'set srcdir $(srcdir)' >>site.tmp + @echo "set objdir `pwd`" >>site.tmp + @echo 'set build_alias "$(build_alias)"' >>site.tmp + @echo 'set build_triplet $(build_triplet)' >>site.tmp + @echo 'set host_alias "$(host_alias)"' >>site.tmp + @echo 'set host_triplet $(host_triplet)' >>site.tmp + @echo 'set target_alias "$(target_alias)"' >>site.tmp + @echo 'set target_triplet $(target_triplet)' >>site.tmp + @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp + @test ! -f site.exp || \ + sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @-rm -f site.bak + @test ! -f site.exp || mv site.exp site.bak + @mv site.tmp site.exp + +distclean-DEJAGNU: + -rm -f site.exp site.bak + -l='$(DEJATOOL)'; for tool in $$l; do \ + rm -f $$tool.sum $$tool.log; \ + done + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +@REPLACE_CPP_FALSE@uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-DEJAGNU distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ + clean-libtool distclean distclean-DEJAGNU distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am + + +@REPLACE_CPP_TRUE@Makefile: + +@REPLACE_CPP_TRUE@check-DEJAGNU: +@REPLACE_CPP_TRUE@ EXPECT=$(EXPECT); export EXPECT + +@REPLACE_CPP_TRUE@ @if test x"$(gcc_testsuite_dir)" = x""; then \ +@REPLACE_CPP_TRUE@ echo "ERROR: testsuite directory is not specified. Do './configure --with-gcc-testsuite-dir=directory' prior to 'make check'"; \ +@REPLACE_CPP_TRUE@ exit 1; \ +@REPLACE_CPP_TRUE@ fi +@REPLACE_CPP_TRUE@ @if test `$(cpp_call) -v /dev/null 2>&1 | grep 'MCPP' > /dev/null; echo $$?` != 0; \ +@REPLACE_CPP_TRUE@ then \ +@REPLACE_CPP_TRUE@ echo "ERROR: Do 'make install' prior to 'make check'"; \ +@REPLACE_CPP_TRUE@ exit 1; \ +@REPLACE_CPP_TRUE@ fi +@REPLACE_CPP_TRUE@ @if test -f "$(gcc_testsuite_dir)/gcc.dg/cpp-test/test-t/cpp-test.exp"; \ +@REPLACE_CPP_TRUE@ then :; \ +@REPLACE_CPP_TRUE@ else \ +@REPLACE_CPP_TRUE@ echo ' cp -Rp $(top_srcdir)/cpp-test $(gcc_testsuite_dir)/gcc.dg'; \ +@REPLACE_CPP_TRUE@ cp -Rp $(top_srcdir)/cpp-test "$(gcc_testsuite_dir)/gcc.dg"; \ +@REPLACE_CPP_TRUE@ fi +@REPLACE_CPP_TRUE@ @$(top_srcdir)/tests/set_test.sh '$(CC)' '$(gcc_path)' '$(gcc_testsuite_dir)' $(gcc_maj_ver) '$(LN_S)' '$(cpp_call)' '$(target_cc)' +@REPLACE_CPP_TRUE@ -$(RUNTEST) --tool gcc --srcdir $(gcc_testsuite_dir) cpp-test.exp +@REPLACE_CPP_TRUE@ @$(top_srcdir)/tests/after_test.sh '$(CC)' '$(gcc_path)' '$(cpp_call)' '$(target_cc)' + +@REPLACE_CPP_TRUE@uninstall: +@REPLACE_CPP_TRUE@ @if test x"$(gcc_testsuite_dir)" != x""; then \ +@REPLACE_CPP_TRUE@ cd "$(gcc_testsuite_dir)"; \ +@REPLACE_CPP_TRUE@ if test -f "gcc.dg/cpp-test/test-t/cpp-test.exp"; then \ +@REPLACE_CPP_TRUE@ echo " rm -rf gcc.dg/cpp-test"; \ +@REPLACE_CPP_TRUE@ rm -rf gcc.dg/cpp-test; \ +@REPLACE_CPP_TRUE@ fi \ +@REPLACE_CPP_TRUE@ fi +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/mcpp/tests/after_test.sh b/libraries/mcpp/tests/after_test.sh new file mode 100644 index 000000000..be864ed58 --- /dev/null +++ b/libraries/mcpp/tests/after_test.sh @@ -0,0 +1,34 @@ +#!/bin/sh +## ./after_test.sh $CC $gcc_path $cpp_call $target_cc + +CC=$1 +gcc_path=`expr $2 : "\(.*\)/${CC}\$"` +target_cc=$4 +if test x$target_cc != x; then + CC=$target_cc +fi +cpp_name=`echo $3 | sed 's,.*/,,'` +cpp_path=`echo $3 | sed "s,/$cpp_name,,"` + +echo " cd $cpp_path" +cd "$cpp_path" +echo " removing '-23j' options from mcpp invocation" +for i in mcpp*.sh +do + cat $i | sed 's/mcpp -23j/mcpp/' > tmp + mv -f tmp $i + chmod a+x $i +done + +if test $CC = gcc; then + exit 0 +fi + +echo " cd $gcc_path" +cd "$gcc_path" +echo " rm gcc" +rm gcc +if test -f "gcc.save"; then + echo " mv gcc.save gcc" + mv gcc.save gcc +fi diff --git a/libraries/mcpp/tests/set_test.sh b/libraries/mcpp/tests/set_test.sh new file mode 100644 index 000000000..78f5eb089 --- /dev/null +++ b/libraries/mcpp/tests/set_test.sh @@ -0,0 +1,52 @@ +#! /bin/sh +# script to set mcpp testsuite corresponding to the version of GCC 2 or 3, 4 +# ./set_test.sh $CC $gcc_path $gcc_testsuite_dir $gcc_maj_ver $LN_S $cpp_call +# $target_cc + +CC=$1 +gcc_path=`expr $2 : "\(.*\)/$CC"` +target_cc=$7 +if test x$target_cc != x; then + CC=$target_cc +fi +gcc_testsuite_dir=$3 +gcc_maj_ver=$4 +if test $gcc_maj_ver = 4; then + gcc_maj_ver=3; +fi +LN_S=$5 +cpp_name=`echo $6 | sed 's,.*/,,'` +cpp_path=`echo $6 | sed "s,/$cpp_name,,"` + +echo " cd $gcc_testsuite_dir/gcc.dg/cpp-test/test-t" +cd "$gcc_testsuite_dir/gcc.dg/cpp-test/test-t" +for i in *_run.c +do + rm -f $i + echo " $LN_S $i.gcc$gcc_maj_ver $i" + $LN_S $i.gcc$gcc_maj_ver $i +done + +echo " cd $cpp_path" +cd "$cpp_path" +echo " appending '-23j' options to mcpp invocation" +for i in mcpp*.sh +do + cat $i | sed 's/mcpp/mcpp -23j/' > tmp + mv -f tmp $i + chmod a+x $i +done + +if test $CC = gcc; then + exit 0 +fi + +echo " cd $gcc_path" +cd "$gcc_path" +if test -f "gcc"; then + echo " mv gcc gcc.save" + mv gcc gcc.save +fi +echo " $LN_S $CC gcc" +$LN_S $CC gcc + diff --git a/libraries/mcpp/tool/LICENSE b/libraries/mcpp/tool/LICENSE new file mode 100644 index 000000000..4fc784a63 --- /dev/null +++ b/libraries/mcpp/tool/LICENSE @@ -0,0 +1,3 @@ +Redistribution and use of the files under this directory in source and +binary forms, with or without modification, are freely permitted. + [Kiyoshi Matsui] diff --git a/libraries/mcpp/tool/app_once.bat b/libraries/mcpp/tool/app_once.bat new file mode 100644 index 000000000..f1ff46a94 --- /dev/null +++ b/libraries/mcpp/tool/app_once.bat @@ -0,0 +1,3 @@ +REM append once.txt to header files in the current directory +REM +FOR %%f IN ( *.H ) DO copy %%f+once.txt diff --git a/libraries/mcpp/tool/clock_of.c b/libraries/mcpp/tool/clock_of.c new file mode 100644 index 000000000..8e0a5b677 --- /dev/null +++ b/libraries/mcpp/tool/clock_of.c @@ -0,0 +1,45 @@ +/* clock_of.c: to measure the execution time of a program. */ +/* 2002/08 kmatsui */ + +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#include "time.h" + +void usage( void); + +int main( int argc, char ** argv) +{ + char command[ BUFSIZ]; + char **arg, *buf; + long start_time, passed_time; + int ret; + + if (argc < 2) + usage(); + ret = -1; + arg = argv; + buf = command; + while (*++arg) { + sprintf( buf, "%s ", *arg); + buf += strlen( buf); + } + fprintf( stderr, "%s\n", command); + start_time = clock(); + ret = system( command); + if (ret == 0) { + passed_time = clock() - start_time; + fprintf( stderr, "%ld ticks passed (%f seconds).\n" + , passed_time, (double) passed_time / CLOCKS_PER_SEC); + } else { + fprintf( stderr, "Command execution error! (status: %d)\n", ret); + } + + return 0; +} + +void usage( void) +{ + fputs( "usage: clock_of []\n", stderr); + exit( 1); +} diff --git a/libraries/mcpp/tool/cpp_test.c b/libraries/mcpp/tool/cpp_test.c new file mode 100644 index 000000000..2903b8d10 --- /dev/null +++ b/libraries/mcpp/tool/cpp_test.c @@ -0,0 +1,178 @@ +/* + * cpp_test.c: to compile and run n_*.c, i_*.c; + * make a summary of the results. + * 1998/08 by kmatsui + * Made after runtest.c and summtest.c of + * "Plum-Hall Validation Sampler". + * 2005/03 by kmatsui + * Changed 'PGNUM'. + * 2006/07 by kmatsui + * Changed 'PGNUM'. + * Changed non-prototype declarations to prototype ones. + * Removed DOS-extender option. + */ + +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#include "ctype.h" +#include "errno.h" + +#define NAMEMAX 8 +#define PGMNUM 35 + +#if __MSDOS__ || __WIN32__ || _WIN32 +#define PATH_DELIM '\\' +#else +#define PATH_DELIM '/' +#endif + +#if 0 +extern int sleep( unsigned int seconds); +#endif + +void test_cpp( int argc, char **argv); +void sum_test( void); +void usage( void); + +char comp_fmt[ BUFSIZ/2] = "cc -o%s %s.c"; +char cmp_name[ NAMEMAX+1]; +char out_file[ NAMEMAX+5]; +char err_file[ NAMEMAX+5]; +char sum_file[ NAMEMAX+5]; +char err_name[ PGMNUM][ NAMEMAX+5]; +char buf[ BUFSIZ]; + +int main( int argc, char **argv) { + char *cp; + int i; + + if (argc < 2) + usage(); + if (! isalpha( argv[ 1][ 0]) + || strchr( argv[ 1], '.') != NULL + || strlen( argv[ 1]) > NAMEMAX) { + usage(); + } + strcpy( cmp_name, argv[ 1]); + sprintf( sum_file, "%s.sum", cmp_name); + sprintf( out_file, "%s.out", cmp_name); + sprintf( err_file, "%s.err", cmp_name); + for (cp = cmp_name; (i = *cp) != 0; cp++) { + if (i == '-' || i == '_' || i == '~') + *cp = '|'; /* Convert horizontal line to vertical line */ + } + if (argc > 2) + strcpy( comp_fmt, argv[ 2]); + if (freopen( out_file, "w", stdout) == NULL) + usage(); + if (freopen( err_file, "w", stderr) == NULL) + usage(); + setbuf( stdout, NULL); + setbuf( stderr, NULL); + + test_cpp( argc, argv); + sum_test(); + + return 0; +} + +void test_cpp( int argc, char ** argv) { + int i, len; + int pgm_num; + + for (pgm_num = 0; pgm_num < PGMNUM && ! feof( stdin); pgm_num++) { + /* for each input program */ + char pgm_name[ NAMEMAX+2]; + + fgets( pgm_name, NAMEMAX+1, stdin); + if ((len = strlen( pgm_name)) < 2 || *(pgm_name + len - 1) != '\n') + continue; /* skip erroneous line */ + else + *(pgm_name + len - 1) = '\0'; /* remove '\n' */ + + sprintf( buf, comp_fmt, pgm_name, pgm_name); + system( buf); + printf( "COMPILE: %s\n", buf); +#if 0 + sleep( 1); /* Wait a moment */ +#endif + sprintf( err_name[ pgm_num], "%s.err", pgm_name); + freopen( err_name[ pgm_num], "w", stderr); + sprintf( buf, ".%c%s", PATH_DELIM, pgm_name); + system( buf); + printf( "EXECUTE: %s\n", buf); +#if 0 + sleep( 1); /* Wait a moment */ +#endif + freopen( err_file, "a", stderr); + for (i = 3; i < argc; ++i) { + sprintf( buf, argv[i], pgm_name, pgm_name); + system( buf); + printf( "CLEANUP: %s\n", buf); + } + } /* end loop over each program */ +} + +void sum_test( void) +{ + FILE *sumfp, *errfp; + char *cp; + int i, len; + int nerror = 0; + int pgm_num; + + /* Make a column of summary */ + if ((sumfp = fopen( sum_file, "w")) == NULL) { + fprintf( stderr, "Can't open %s\n", sum_file); + exit( errno); + } + len = strlen( cmp_name); + for (i = 0; i < len; i++) + fprintf( sumfp, " %c\n", cmp_name[i]); + for (i = len; i <= NAMEMAX; i++) + fputs( " \n", sumfp); + + for (pgm_num = 0; pgm_num < PGMNUM; pgm_num++) { + if ((errfp = fopen( err_name[ pgm_num], "r")) == NULL) { + fputs( " -\n", sumfp); + nerror++; + } else { + cp = fgets( buf, BUFSIZ, errfp); + if (cp == NULL || strcmp( buf, "started\n") != 0) { + fputs( " -\n", sumfp); + nerror++; + } else { + fgets( buf, BUFSIZ, errfp); + if (strcmp( "success\n", buf) != 0) { + fputs( " o\n", sumfp); + nerror++; + } else { + fputs( " *\n", sumfp); + } + } + fclose( errfp); + } + } + + fprintf( sumfp, "\n%3d\n", nerror); +} + +void usage( void) +{ + fputs( "Usage:\n" + " cpp_test compiler-name \"compile command\" \"cleaning command\"s\n" + " Compiler-name must be 8 bytes or less and must be without dot.\n" + " Number of \"cleaning command\"s can be any.\n" + " Do this command in mcpp's test-c directory.\n" + "Examples:\n" + " cpp_test GCC332 \"gcc -std=iso9899:199409 -o%s %s.c\"" + " \"rm %s\" < n_i_.lst\n" + " cpp_test VC2005 \"cl -Za -D_CRT_SECURE_NO_DEPRECATE -Fe%s.exe %s.c\"" + " \"del %s.exe\" < n_i_.lst\n" + " cpp_test MCPP26 \"gcc -Wp,-23 -std=iso9899:199409 -o%s %s.c\"" + " \"rm %s\" < n_i_.lst\n" + , stderr); + exit( 0); +} + diff --git a/libraries/mcpp/tool/ins_once.c b/libraries/mcpp/tool/ins_once.c new file mode 100644 index 000000000..ec3be9408 --- /dev/null +++ b/libraries/mcpp/tool/ins_once.c @@ -0,0 +1,291 @@ +/* + * ins_once.c + * Quick and dirty program to insert '#pragma once' into the header files. + * 1998/08 kmatsui + * 2002/08 kmatsui + * Added -p, -o, -g option, removed -s option. + * Compile with -DPATH_DELIM='x' option, if the path-delimiter is any + * other than '/'. + * 2004/11 kmatsui + * Changed '#pragma __once' to '#pragma once'. + * 2006/07 kmatsui + * Removed -o option. + * Changed non-prototype declarations to prototype ones. + */ + +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#include "ctype.h" +#include "errno.h" + +#ifndef PATH_DELIM +#define PATH_DELIM '/' +#endif + +#define TRUE 1 +#define FALSE 0 + +#define IFNDEF 0x100 +#define IF 0x101 +#define PRAGMA 0x102 +#define DEFINED 0x103 +#define _ONCE 0x111 + +void usage( void); +void test_a_file( char *); +void conv_a_file( char *); +void insert_once( FILE *, FILE *, char *); +void prepend_once( FILE *, FILE *); +int look_directive( FILE *); +int get_token( char **); +void ins_once( FILE *); + +int test; + /* Only test files whether beginning with #ifndef or #if !defined. */ +int prepend; +/* + * If TRUE, prepend '#pragma once' line to the file. + * If FALSE, insert the line after the first #ifndef line. + */ +int gcc; +/* + * If TRUE, do not insert '#pragma once' line to "stddef.h". + * This is the option for GCC family. + */ + +int main( int argc, char **argv) { + extern int getopt( int, char **, char *); + extern int optind; + extern char *optarg; + int opt; + char *except[] = { "assert.h", "cassert", "cassert.h", NULL}; + char *g_except[] = { "stddef.h", "stdio.h", "signal.h", "errno.h" + , NULL}; + char *arg; + char **ep; + + if (argc < 2) + usage(); + while (optind < argc + && (opt = getopt( argc, argv, "gopt")) != EOF) { + switch (opt) { + case 't': + test = TRUE; + break; + case 'p': + prepend = TRUE; + break; + case 'g': + gcc = TRUE; + break; + default: + usage(); + break; + } + } + argv += (optind - 1); + while (*++argv) { + if ((arg = strrchr( *argv, PATH_DELIM)) != NULL) + arg++; + else + arg = *argv; + for (ep = except; *ep; ep++) { + if (strcmp( arg, *ep) == 0) + goto skip; + } + if (gcc) { + for (ep = g_except; *ep; ep++) { + if (strcmp( arg, *ep) == 0) + goto skip; + } + } + if (test) + test_a_file( *argv); + else + conv_a_file( *argv); + continue; +skip: fprintf( stderr, "Skipped %s\n", *ep); + } + return 0; +} + +void usage( void) +{ + static char *mes[] = { + "ins_once: Insert '#pragma once' to header files except \"assert.h\"\n", + " and \"stddef.h\" and some others (for GCC).\n", + "Usage: ins_once [-DPATH_DELIM=\\] [-t|-p|-g] [header1.h [header2.h [...]]]\n", + " -t : Only test files whether beginning with #ifndef or #if !defined.\n", + " -p : Prepend the line to the file\n", + " (default: insert after the first #ifndef line -- for GCC).\n", + " -g : Do not convert stddef.h, stdio.h, signal.h, errno.h.\n", + NULL, + }; + char **mesp = mes; + + while( *mesp) + fputs( *mesp++, stderr); + if (errno) { + fputs( strerror( errno), stderr); + fputc( '\n', stderr); + } + exit( errno); +} + +void test_a_file( char *fname) { +/* + * Only test the file whether it begins with #ifndef or #if !defined. + */ + char buf[ BUFSIZ]; + FILE *fp_in; + int token; + char *cp; + + fp_in = fopen( fname, "r"); + if (fp_in == NULL) + usage(); + + while (fgets( buf, BUFSIZ, fp_in) != NULL) { + cp = buf; + if (get_token( &cp) == '#') { /* The first directive */ + if (((token = get_token( &cp)) != IFNDEF) /* #ifndef */ + && (token != IF || get_token( &cp) != '!' + || get_token( &cp) != DEFINED)) { /* #if ! defined*/ + fputs( fname, stderr); + fputs( ": doesn't begin with #ifndef nor #if !defined\n", + stderr); + } + break; + } + } + fclose( fp_in); +} + +void conv_a_file( char *fname) { +/* + * Insert '#pragma once' line to seemingly apropriate place according + * the command-line options. + */ + char *tmp = "tmp_once"; + FILE *fp_in, *fp_out; + + if ((fp_in = fopen( fname, "r")) == NULL) + usage(); + if ((fp_out = fopen( tmp, "w")) == NULL) + usage(); + fprintf( stderr, "Converting %s\n", fname); + + if (prepend) + prepend_once( fp_in, fp_out); + else + insert_once( fp_in, fp_out, fname); + + fclose( fp_in); + fclose( fp_out); + if (remove( fname) != 0 || rename( tmp, fname) != 0) + usage(); +} + +void insert_once( FILE *fp_in, FILE *fp_out, char *fname) { +/* + * Insert '#pragma once' line after the first directive line, if the + * directive is #ifndef or #if !defined, else append the line at the end + * of the file. + */ + char buf[ BUFSIZ]; + int token; + int no_ifndef = TRUE; + char *cp; + + while (fgets( buf, BUFSIZ, fp_in) != NULL) { + fputs( buf, fp_out); + cp = buf; + if (get_token( &cp) == '#') { /* The first directive */ + if (((token = get_token( &cp)) == IFNDEF) /* #ifndef */ + || (token == IF && get_token( &cp) == '!' + && get_token( &cp) == DEFINED)) { /* #if ! defined*/ + no_ifndef = FALSE; + if (! look_directive( fp_in)) + ins_once( fp_out); + /* Else already written in */ + } else { /* Other directive */ + fputs( fname, stderr); + fputs( ": doesn't begin with #ifndef nor #if !defined\n", + stderr); + } + break; + } + } + while (fgets( buf, BUFSIZ, fp_in) != NULL) + fputs( buf, fp_out); + if (no_ifndef) + ins_once( fp_out); /* Append the line to the file */ +} + +void prepend_once( FILE *fp_in, FILE *fp_out) { +/* + * Prepend the '#pragma once' line at the top of the file. + */ + char buf[ BUFSIZ]; + + if (! look_directive( fp_in)) + ins_once( fp_out); /* Prepend the line to the file */ + + while (fgets( buf, BUFSIZ, fp_in) != NULL) + fputs( buf, fp_out); +} + +int look_directive( FILE *fp) { +/* + * Look whether the next line is '#pragma once'. + */ + char buf[ BUFSIZ]; + long pos; + int res = 0; + int token; + char *cp; + + pos = ftell( fp); + cp = buf; + if (fgets( buf, BUFSIZ, fp) && buf[ 0] == '\n' + && fgets( buf, BUFSIZ, fp) && get_token( &cp) == '#' + && get_token( &cp) == PRAGMA && get_token( &cp) == _ONCE) + res = 1; + fseek( fp, pos, SEEK_SET); + return res; +} + +int get_token( char **cpp) { +/* Get the next 'token', without parsing comments, literals, etc. */ + int token; + char *cp = *cpp; + + while (*cp != '\n' && isspace( *cp)) + cp++; + if (memcmp( cp, "ifndef", 6) == 0) { + token = IFNDEF; + cp += 6; + } else if (memcmp( cp, "if", 2) == 0) { + token = IF; + cp += 2; + } else if (memcmp( cp, "pragma", 6) == 0) { + token = PRAGMA; + cp += 6; + } else if (memcmp( cp, "defined", 7) == 0) { + token = DEFINED; + cp += 7; + } else if (memcmp( cp, "once", 6) == 0) { + token = _ONCE; + cp += 6; + } else { + token = *cp++; + } + *cpp = cp; + return token; +} + +void ins_once( FILE *fp) { + fputs( "\n#pragma once\n\n", fp); +} + diff --git a/libraries/mcpp/tool/once.txt b/libraries/mcpp/tool/once.txt new file mode 100644 index 000000000..99ddf32db --- /dev/null +++ b/libraries/mcpp/tool/once.txt @@ -0,0 +1,2 @@ + +#pragma once diff --git a/libraries/mcpp/tool/rm_once.c b/libraries/mcpp/tool/rm_once.c new file mode 100644 index 000000000..6f5f7b6b3 --- /dev/null +++ b/libraries/mcpp/tool/rm_once.c @@ -0,0 +1,40 @@ +/* + * rm_once.c 2002/08, 2004/11 kmatsui + * to remove '#pragma once' line from the top of header files + */ + +#include "stdio.h" +#include "stdlib.h" +#include "string.h" + +main( int argc, char ** argv) +{ + char buf[ BUFSIZ]; + char *once = "\n#pragma once\n\n"; + char *tmp = "tmp.once"; + char *fname; + FILE *fp_in, *fp_out; + int i; + char *cp; + + while (*++argv) { + if ((fp_in = fopen( *argv, "r")) != NULL) { + for (cp = buf, i = 0; i < 3; i++, cp += strlen( cp)) + fgets( cp, BUFSIZ, fp_in); + if (strcmp( buf, once) != 0) { + fprintf( stderr, "Skipped %s\n", *argv); + fclose( fp_in); + continue; + } + fprintf( stderr, "Converted %s\n", *argv); + fp_out = fopen( tmp, "w"); + while (fgets( buf, BUFSIZ, fp_in) != NULL) + fputs( buf, fp_out); + fclose( fp_in); + fclose( fp_out); + remove( *argv); + rename( tmp, *argv); + } + } + return 0; +} diff --git a/libraries/mcpp/tool/total.c b/libraries/mcpp/tool/total.c new file mode 100644 index 000000000..31b9d3f89 --- /dev/null +++ b/libraries/mcpp/tool/total.c @@ -0,0 +1,234 @@ +/* + * total.c + * Put totals of "cpp_test.tbl". + * Usage: total + * Specify the number of preprocessors by . + * 1998/08 kmatsui + * 2002/08 Updated for "cpp-test.txt" V.1.3 kmatsui + * 2004/11 Updated for "cpp-test.txt" V.1.5 kmatsui + * 2006/07 Changed non-prototype declarations to prototype ones. + * kmatsui + */ + +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#include "ctype.h" + +#define MAX_COLS (MAX_CASES + MAXC) +#define MAX_CASES 30 +#define MAXC 1 +#define OFFS 7 +#define LEN 4 +#define COLS (MAXC + cases) +#define LLEN ((COLS * LEN) + OFFS + 2 + 2) +#define MAX_LLEN ((MAX_COLS * LEN) + OFFS + 2 + 2) + +#define C90 2 +#define C99 3 +#define CPL 4 + +int cases; +int subtotal[ MAX_COLS]; +int mttl90[ MAX_COLS]; /* mid-total of C90 conformance */ +int mttl99[ MAX_COLS]; /* mid-total of C99 new features conformance */ +int mttlcpl[ MAX_COLS]; /* mid-total of C++ only features conformance */ +int grandtotal[ MAX_COLS]; +char buf[ MAX_LLEN]; + +void usage( void); +void add_points( int norm); +void put_subtotal( void); +void put_mttl( int norm); +void put_grandtotal( void); +#if !__TURBOC__ +char *stpcpy( char *p, const char *app); +#endif + +int main( int argc, char **argv) { + int i, len, sitem, mitem90, mitem99, mitemcpl, gitem, cplus; + + if (argc < 2 || argc > 4) + usage(); + len = strlen( argv[ 1]); + for (i = 0; i < len; i++) { + if (! isdigit( argv[ 1][ i])) + usage(); + } + if ((cases = atoi( argv[ 1])) > MAX_CASES) + usage(); + if (argc > 2) + if (freopen( argv[ 2], "r", stdin) == NULL) + usage(); + if (argc == 4) + if (freopen( argv[ 3], "w", stdout) == NULL) + usage(); + + sitem = mitem90 = mitem99 = mitemcpl = gitem = cplus = 0; + + while (fgets( buf, MAX_LLEN, stdin) != NULL) { + if (isalpha( buf[ 0]) && buf[ 1] == '.' && isdigit( buf[ 2])) { + add_points( C90); + sitem++; + } else if (isalpha( buf[ 0]) && buf[ 1] == '.' && isalpha( buf[ 2])) { + if (cplus) { + add_points( CPL); + mitemcpl++; + } else { + add_points( C99); + mitem99++; + } + } else if (memcmp( buf, "stotal", 6) == 0) { + put_subtotal(); + fprintf( stderr, "sitem:%d\n", sitem); + mitem90 += sitem; + sitem = 0; + } else if (memcmp( buf, "mttl90", 6) == 0) { + put_mttl( C90); + fprintf( stderr, " mitem90:%d\n", mitem90); + gitem += mitem90; + mitem90 = 0; + } else if (memcmp( buf, "mttl99", 6) == 0) { + put_mttl( C99); + fprintf( stderr, " mitem99:%d\n", mitem99); + gitem += mitem99; + mitem99 = 0; + } else if (memcmp( buf, "mttl++", 6) == 0) { + put_mttl( CPL); + fprintf( stderr, " mitem++:%d\n", mitemcpl); + gitem += mitemcpl; + mitemcpl = cplus = 0; + } else if (memcmp( buf, "gtotal", 6) == 0) { + put_grandtotal(); + fprintf( stderr, " gitem:%d\n", gitem); + } else if (memcmp( buf, "[C++:", 5) == 0) { + cplus = 1; + } + /* Else as it is. */ + fputs( buf, stdout); + } + + return 0; +} + +void usage( void) { + char **mesp; + static char *mes[] = { + "Total: Put totals of \"cpp_test.tbl\".\n", + "Usage: total cpp_test.old cpp_test.new\n", + "Specify the number of preprocessors by .\n", + NULL + }; + + mesp = mes; + while (*mesp) + fputs( *mesp++, stderr); + exit( 0); +} + +void add_points( int norm) { + int i; + int len; + int max, point; + int *arr; + char *p; + + switch (norm) { + case C90: + arr = subtotal; + break; + case C99: + arr = mttl99; + break; + case CPL: + arr = mttlcpl; + break; + } + len = strlen( buf); + + for (i = 0, p = buf + OFFS + 1; i < COLS && p - buf < len; + i++, p += LEN, i == MAXC ? (p += 2) : 0) { + if (*(p + 2) == ' ') /* No point written */ + continue; + point = atoi( p); + switch (i) { + case 0: max = point; break; + default: + if (point < 0 || max < point) { + fprintf( stderr, "Out of range: (No.%d) %d\n" + , i - 1, point); + fputs( buf, stderr); + } + break; + } + arr[ i] += point; + } +} + +void put_subtotal( void) { + int i; + char *p; + buf[ OFFS - 1] = ' '; + + for (i = 0, p = buf + OFFS; i < COLS; i++, p += LEN) { + if (i == MAXC) + p = stpcpy( p, " "); + sprintf( p, "%4d", subtotal[ i]); + mttl90[ i] += subtotal[ i]; + subtotal[ i] = 0; + } + + strcpy( p, "\n"); +} + +void put_mttl( int norm) { + int i; + char *p; + int *mttl; + + switch (norm) { + case C90: + mttl = mttl90; + break; + case C99: + mttl = mttl99; + break; + case CPL: + mttl = mttlcpl; + break; + } + buf[ OFFS - 1] = ' '; + + for (i = 0, p = buf + OFFS; i < COLS; i++, p += LEN) { + if (i == MAXC) + p = stpcpy( p, " "); + sprintf( p, "%4d", mttl[ i]); + grandtotal[ i] += mttl[ i]; + mttl[ i] = 0; + } + + strcpy( p, "\n"); +} + +void put_grandtotal( void) { + int i; + char *p; + + buf[ OFFS - 1] = ' '; + + for (i = 0, p = buf + OFFS; i < COLS; i++, p += LEN) { + if (i == MAXC) + p = stpcpy( p, " "); + sprintf( p, "%4d", grandtotal[ i]); + } + + strcpy( p, "\n"); +} + +#if !__TURBOC__ +char *stpcpy( char *p, const char *app) { + strcpy( p, app); + return p + strlen( p); +} +#endif +