From 65b6a3ba3e3a552117e57099245001ca75ab996c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 12 Oct 2000 11:25:16 +0000 Subject: [PATCH] fixes resulting from non-standard usage of swprintf [SVN r7927] --- configure | 263 ++++++++++------------- configure.in | 28 +-- include/boost/re_detail/regex_config.hpp | 5 + lib/bc55.mak | 4 +- lib/bcb4.mak | 6 +- lib/bcb5.mak | 6 +- makefile_gen | 3 +- src/wide_posix_api.cpp | 21 +- 8 files changed, 131 insertions(+), 205 deletions(-) diff --git a/configure b/configure index d8525ec1..fa60e641 100644 --- a/configure +++ b/configure @@ -1759,7 +1759,7 @@ cat > conftest.$ac_ext <&6 -echo "configure:1786: checking for wsprintf support" >&5 -cat > conftest.$ac_ext < -#endif -#ifndef BOOST_RE_NO_WCTYPE_H -#include -#endif -#include -#include -#include - -int main() { - - wchar_t c[50]; - wsprintf(c, "abcd"); - -; return 0; } -EOF -if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define BOOST_RE_NO_WSPRINTF -EOF - -echo "$ac_t""no" 1>&6 -fi -rm -f conftest* -fi - - # Check whether --enable-member-templates or --disable-member-templates was given. if test "${enable_member_templates+set}" = set; then @@ -1837,9 +1795,9 @@ EOF else echo $ac_n "checking for member template classes and functions""... $ac_c" 1>&6 -echo "configure:1841: checking for member template classes and functions" >&5 +echo "configure:1799: checking for member template classes and functions" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1907,9 +1865,9 @@ EOF else echo $ac_n "checking for parameterised function returns""... $ac_c" 1>&6 -echo "configure:1911: checking for parameterised function returns" >&5 +echo "configure:1869: checking for parameterised function returns" >&5 cat > conftest.$ac_ext < @@ -1923,7 +1881,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1954,7 +1912,7 @@ EOF else echo $ac_n "checking for 64-bit integral type""... $ac_c" 1>&6 -echo "configure:1958: checking for 64-bit integral type" >&5 +echo "configure:1916: checking for 64-bit integral type" >&5 if test "$ac_cv_sizeof_short" -eq 8; then cat >> confdefs.h <<\EOF @@ -1982,7 +1940,7 @@ have_int64="true" fi if test "$have_int64" != "true"; then cat > conftest.$ac_ext < @@ -1994,7 +1952,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes - int64_t" 1>&6 have_int64="true" @@ -2013,7 +1971,7 @@ fi if test "$have_int64" != "true"; then cat > conftest.$ac_ext < @@ -2025,7 +1983,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes - long long" 1>&6 have_int64="true" @@ -2045,7 +2003,7 @@ fi if test "$have_int64" != "true"; then cat > conftest.$ac_ext < @@ -2057,7 +2015,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes - __int64" 1>&6 have_int64="true" @@ -2096,7 +2054,7 @@ EOF else echo $ac_n "checking for catopen in -lnl_types""... $ac_c" 1>&6 -echo "configure:2100: checking for catopen in -lnl_types" >&5 +echo "configure:2058: checking for catopen in -lnl_types" >&5 ac_lib_var=`echo nl_types'_'catopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2104,7 +2062,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnl_types $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2146,7 +2104,7 @@ else fi echo $ac_n "checking for catopen in -lposix""... $ac_c" 1>&6 -echo "configure:2150: checking for catopen in -lposix" >&5 +echo "configure:2108: checking for catopen in -lposix" >&5 ac_lib_var=`echo posix'_'catopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2154,7 +2112,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2197,9 +2155,9 @@ fi echo $ac_n "checking for POSIX message categories""... $ac_c" 1>&6 -echo "configure:2201: checking for POSIX message categories" >&5 +echo "configure:2159: checking for POSIX message categories" >&5 cat > conftest.$ac_ext < @@ -2213,7 +2171,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2233,7 +2191,7 @@ fi if test "$enable_threads" != "no" && test "$enable_ms_windows" = "no"; then echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:2237: checking for pthread_mutex_init in -lpthread" >&5 +echo "configure:2195: checking for pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2241,7 +2199,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2283,7 +2241,7 @@ else fi echo $ac_n "checking for pthread_mutex_init in -lposix""... $ac_c" 1>&6 -echo "configure:2287: checking for pthread_mutex_init in -lposix" >&5 +echo "configure:2245: checking for pthread_mutex_init in -lposix" >&5 ac_lib_var=`echo posix'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2291,7 +2249,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2334,9 +2292,9 @@ fi echo $ac_n "checking for POSIX threads""... $ac_c" 1>&6 -echo "configure:2338: checking for POSIX threads" >&5 +echo "configure:2296: checking for POSIX threads" >&5 cat > conftest.$ac_ext < @@ -2353,7 +2311,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -2385,9 +2343,9 @@ EOF else echo $ac_n "checking for template nested class access""... $ac_c" 1>&6 -echo "configure:2389: checking for template nested class access" >&5 +echo "configure:2347: checking for template nested class access" >&5 cat > conftest.$ac_ext < @@ -2424,7 +2382,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2450,9 +2408,9 @@ rm -f conftest* fi echo $ac_n "checking for explicit template instantiation""... $ac_c" 1>&6 -echo "configure:2454: checking for explicit template instantiation" >&5 +echo "configure:2412: checking for explicit template instantiation" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2528,9 +2486,9 @@ EOF else echo $ac_n "checking for __fastcall and __stdcall""... $ac_c" 1>&6 -echo "configure:2532: checking for __fastcall and __stdcall" >&5 +echo "configure:2490: checking for __fastcall and __stdcall" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -2583,9 +2541,9 @@ fi echo $ac_n "checking for standard library namespace""... $ac_c" 1>&6 -echo "configure:2587: checking for standard library namespace" >&5 +echo "configure:2545: checking for standard library namespace" >&5 cat > conftest.$ac_ext < @@ -2609,7 +2567,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes - std" 1>&6 have_std_namespace="yes" @@ -2624,9 +2582,9 @@ fi rm -f conftest* echo $ac_n "checking for ""... $ac_c" 1>&6 -echo "configure:2628: checking for " >&5 +echo "configure:2586: checking for " >&5 cat > conftest.$ac_ext < @@ -2656,7 +2614,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2674,9 +2632,9 @@ fi rm -f conftest* echo $ac_n "checking for ""... $ac_c" 1>&6 -echo "configure:2678: checking for " >&5 +echo "configure:2636: checking for " >&5 cat > conftest.$ac_ext < @@ -2687,7 +2645,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2705,9 +2663,9 @@ fi rm -f conftest* echo $ac_n "checking for ""... $ac_c" 1>&6 -echo "configure:2709: checking for " >&5 +echo "configure:2667: checking for " >&5 cat > conftest.$ac_ext < @@ -2719,7 +2677,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2735,9 +2693,9 @@ rm -f conftest* if test "$enable_stl" != "no" && test "$need_algo" = "yes"; then echo $ac_n "checking for ""... $ac_c" 1>&6 -echo "configure:2739: checking for " >&5 +echo "configure:2697: checking for " >&5 cat > conftest.$ac_ext < @@ -2748,7 +2706,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -2793,9 +2751,9 @@ rm -f conftest* fi echo $ac_n "checking for ""... $ac_c" 1>&6 -echo "configure:2797: checking for " >&5 +echo "configure:2755: checking for " >&5 cat > conftest.$ac_ext < @@ -2813,7 +2771,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2833,9 +2791,9 @@ rm -f conftest* if test "$enable_stl" != "no"; then echo $ac_n "checking for ""... $ac_c" 1>&6 -echo "configure:2837: checking for " >&5 +echo "configure:2795: checking for " >&5 cat > conftest.$ac_ext < @@ -2850,7 +2808,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2868,9 +2826,9 @@ fi if test "$enable_stl" != "no"; then echo $ac_n "checking for std::basic_string default arguments""... $ac_c" 1>&6 -echo "configure:2872: checking for std::basic_string default arguments" >&5 +echo "configure:2830: checking for std::basic_string default arguments" >&5 cat > conftest.$ac_ext < @@ -2885,7 +2843,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2907,9 +2865,9 @@ fi ac_have_locale='no' if test "$enable_stl" != "no"; then echo $ac_n "checking for ""... $ac_c" 1>&6 -echo "configure:2911: checking for " >&5 +echo "configure:2869: checking for " >&5 cat > conftest.$ac_ext < @@ -2922,7 +2880,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ac_have_locale='yes' @@ -2944,9 +2902,9 @@ fi if test "$enable_stl" != "no"; then echo $ac_n "checking for ""... $ac_c" 1>&6 -echo "configure:2948: checking for " >&5 +echo "configure:2906: checking for " >&5 cat > conftest.$ac_ext < @@ -2962,7 +2920,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2982,9 +2940,9 @@ rm -f conftest* fi echo $ac_n "checking for std::distance""... $ac_c" 1>&6 -echo "configure:2986: checking for std::distance" >&5 +echo "configure:2944: checking for std::distance" >&5 cat > conftest.$ac_ext < @@ -2998,7 +2956,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3015,7 +2973,7 @@ rm -f conftest* if test "$enable_stl" != "no" && test "$have_dist" != "yes"; then cat > conftest.$ac_ext < @@ -3029,7 +2987,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3055,9 +3013,9 @@ fi if test "$enable_stl" != "no" && test "$have_si" != "yes"; then echo $ac_n "checking for standard iterator syntax""... $ac_c" 1>&6 -echo "configure:3059: checking for standard iterator syntax" >&5 +echo "configure:3017: checking for standard iterator syntax" >&5 cat > conftest.$ac_ext < @@ -3074,7 +3032,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3098,7 +3056,7 @@ fi if test "$enable_stl" != "no" && test "$have_si" != "yes"; then cat > conftest.$ac_ext < @@ -3115,7 +3073,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3146,9 +3104,9 @@ fi if test "$have_oi" != "yes"; then echo $ac_n "checking for output iterator syntax""... $ac_c" 1>&6 -echo "configure:3150: checking for output iterator syntax" >&5 +echo "configure:3108: checking for output iterator syntax" >&5 cat > conftest.$ac_ext < @@ -3161,7 +3119,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3187,9 +3145,9 @@ fi if test "$enable_stl" != "no" && test "$have_ii" != "yes"; then echo $ac_n "checking for input iterator syntax""... $ac_c" 1>&6 -echo "configure:3191: checking for input iterator syntax" >&5 +echo "configure:3149: checking for input iterator syntax" >&5 cat > conftest.$ac_ext < @@ -3202,7 +3160,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3221,7 +3179,7 @@ fi if test "$enable_stl" != "no" && test "$have_ii" != "yes"; then cat > conftest.$ac_ext < @@ -3234,7 +3192,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3260,9 +3218,9 @@ fi if test "$enable_stl" != "no" && test "$have_fi" != "yes"; then echo $ac_n "checking for forward iterator syntax""... $ac_c" 1>&6 -echo "configure:3264: checking for forward iterator syntax" >&5 +echo "configure:3222: checking for forward iterator syntax" >&5 cat > conftest.$ac_ext < @@ -3275,7 +3233,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3301,9 +3259,9 @@ fi if test "$enable_stl" != "no" && test "$have_bi" != "yes"; then echo $ac_n "checking for bidirectional iterator syntax""... $ac_c" 1>&6 -echo "configure:3305: checking for bidirectional iterator syntax" >&5 +echo "configure:3263: checking for bidirectional iterator syntax" >&5 cat > conftest.$ac_ext < @@ -3316,7 +3274,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3342,9 +3300,9 @@ fi if test "$enable_stl" != "no" && test "$have_ri" != "yes"; then echo $ac_n "checking for random access iterator syntax""... $ac_c" 1>&6 -echo "configure:3346: checking for random access iterator syntax" >&5 +echo "configure:3304: checking for random access iterator syntax" >&5 cat > conftest.$ac_ext < @@ -3357,7 +3315,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3383,9 +3341,9 @@ fi if test "$enable_stl" != "no"; then echo $ac_n "checking for output iterator assignment""... $ac_c" 1>&6 -echo "configure:3387: checking for output iterator assignment" >&5 +echo "configure:3345: checking for output iterator assignment" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -3568,9 +3526,9 @@ old_libs="$LIBS" LIBS="conf2.cpp $old_libs" echo $ac_n "checking for link time template merging""... $ac_c" 1>&6 -echo "configure:3572: checking for link time template merging" >&5 +echo "configure:3530: checking for link time template merging" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3607,9 +3565,9 @@ if eval "$CXX $CXXFLAGS -c conf2.cpp" && eval "ar -rc libconf2.a conf2$ac_obj_ex LIBS="-L./ -lconf2 $old_libs" echo $ac_n "checking for link time template merging from archive files""... $ac_c" 1>&6 -echo "configure:3611: checking for link time template merging from archive files" >&5 +echo "configure:3569: checking for link time template merging from archive files" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3751,9 +3709,9 @@ old_libs="$LIBS" LIBS="conf2.cpp $old_libs" echo $ac_n "checking for link time template merging of switch statements""... $ac_c" 1>&6 -echo "configure:3755: checking for link time template merging of switch statements" >&5 +echo "configure:3713: checking for link time template merging of switch statements" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -4144,5 +4102,6 @@ rm -f jm_opt.out + diff --git a/configure.in b/configure.in index b78fa6dd..8f924bb4 100644 --- a/configure.in +++ b/configure.in @@ -559,7 +559,7 @@ AC_TRY_LINK( ], [ wchar_t c[50]; - swprintf(c, L"abcd"); + swprintf(c, 50, L"abcd"); ], [AC_MSG_RESULT(yes)], [AC_DEFINE(BOOST_RE_NO_SWPRINTF,[]) @@ -567,31 +567,6 @@ AC_MSG_RESULT(no)] enable_swprintf="no") fi -if test "$enable_wstring" != "no" && test "$enable_swprintf" = "no"; then -AC_MSG_CHECKING(for wsprintf support) -AC_TRY_LINK( -[ -#include "confdefs.h" -#ifndef BOOST_RE_NO_WCHAR_H -#include -#endif -#ifndef BOOST_RE_NO_WCTYPE_H -#include -#endif -#include -#include -#include -], -[ - wchar_t c[50]; - wsprintf(c, "abcd"); -], -[AC_MSG_RESULT(yes)], -[AC_DEFINE(BOOST_RE_NO_WSPRINTF,[]) -AC_MSG_RESULT(no)]) -fi - - AC_ARG_ENABLE(member-templates, [--disable-member-templates turns off member template class and function support]) if test "$enable_member_templates" = "no"; then @@ -1743,5 +1718,6 @@ rm -f jm_opt.out + diff --git a/include/boost/re_detail/regex_config.hpp b/include/boost/re_detail/regex_config.hpp index 363ad6b6..6d27f254 100644 --- a/include/boost/re_detail/regex_config.hpp +++ b/include/boost/re_detail/regex_config.hpp @@ -150,6 +150,8 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_INT64t __int64 #define BOOST_RE_IMM64(val) val##i64 #define BOOST_RE_NO_CAT + // broken wide character support: + #define BOOST_RE_NO_SWPRINTF #ifdef __MT__ #define BOOST_RE_THREADS @@ -213,6 +215,7 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_NO_CAT #define BOOST_RE_NO_PARTIAL_FUNC_SPEC #define BOOST_RE_NO_TEMPLATE_FRIEND + #define BOOST_RE_NO_SWPRINTF #ifdef _MT #define BOOST_RE_THREADS @@ -266,6 +269,7 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_OLD_IOSTREAM #define BOOST_RE_NESTED_TEMPLATE_DECL #define BOOST_RE_NO_WCSTRING + #define BOOST_RE_NO_SWPRINTF #endif @@ -304,6 +308,7 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_IMM64(val) val##LL #define BOOST_RE_NESTED_TEMPLATE_DECL #define BOOST_RE_NO_TEMPLATE_FRIEND + #define BOOST_RE_NO_SWPRINTF #endif diff --git a/lib/bc55.mak b/lib/bc55.mak index 184b0591..7057df7e 100644 --- a/lib/bc55.mak +++ b/lib/bc55.mak @@ -267,7 +267,7 @@ bcb5\bcb5re300lm.lib : bcb5\bcb5re300lm\c_regex_traits.obj bcb5\bcb5re300lm\c_re bcc32 @&&| -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../; -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300lm.dll bcb5\bcb5re300lm\c_regex_traits.obj bcb5\bcb5re300lm\c_regex_traits_common.obj bcb5\bcb5re300lm\cpp_regex_traits.obj bcb5\bcb5re300lm\cregex.obj bcb5\bcb5re300lm\fileiter.obj bcb5\bcb5re300lm\posix_api.obj bcb5\bcb5re300lm\regex.obj bcb5\bcb5re300lm\regex_debug.obj bcb5\bcb5re300lm\regex_synch.obj bcb5\bcb5re300lm\w32_regex_traits.obj bcb5\bcb5re300lm\wide_posix_api.obj $(XLFLAGS) | - implib bcb5\bcb5re300lm.lib -c bcb5\bcb5re300lm.dll + implib -c bcb5\bcb5re300lm.lib bcb5\bcb5re300lm.dll ######################################################## # @@ -343,5 +343,5 @@ bcb5\bcb5re300l.lib : bcb5\bcb5re300l\c_regex_traits.obj bcb5\bcb5re300l\c_regex bcc32 @&&| -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../; -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300l.dll bcb5\bcb5re300l\c_regex_traits.obj bcb5\bcb5re300l\c_regex_traits_common.obj bcb5\bcb5re300l\cpp_regex_traits.obj bcb5\bcb5re300l\cregex.obj bcb5\bcb5re300l\fileiter.obj bcb5\bcb5re300l\posix_api.obj bcb5\bcb5re300l\regex.obj bcb5\bcb5re300l\regex_debug.obj bcb5\bcb5re300l\regex_synch.obj bcb5\bcb5re300l\w32_regex_traits.obj bcb5\bcb5re300l\wide_posix_api.obj $(XLFLAGS) | - implib bcb5\bcb5re300l.lib -c bcb5\bcb5re300l.dll + implib -c bcb5\bcb5re300l.lib bcb5\bcb5re300l.dll diff --git a/lib/bcb4.mak b/lib/bcb4.mak index e7302e82..d8bfafd8 100644 --- a/lib/bcb4.mak +++ b/lib/bcb4.mak @@ -344,7 +344,7 @@ bcb4\bcb4re300lv.lib : bcb4\bcb4re300lv\c_regex_traits.obj bcb4\bcb4re300lv\c_re bcc32 @&&| -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../; -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb4\bcb4re300lv.dll bcb4\bcb4re300lv\c_regex_traits.obj bcb4\bcb4re300lv\c_regex_traits_common.obj bcb4\bcb4re300lv\cpp_regex_traits.obj bcb4\bcb4re300lv\cregex.obj bcb4\bcb4re300lv\fileiter.obj bcb4\bcb4re300lv\posix_api.obj bcb4\bcb4re300lv\regex.obj bcb4\bcb4re300lv\regex_debug.obj bcb4\bcb4re300lv\regex_synch.obj bcb4\bcb4re300lv\w32_regex_traits.obj bcb4\bcb4re300lv\wide_posix_api.obj $(XLFLAGS) | - implib bcb4\bcb4re300lv.lib -c bcb4\bcb4re300lv.dll + implib -c bcb4\bcb4re300lv.lib bcb4\bcb4re300lv.dll ######################################################## # @@ -420,7 +420,7 @@ bcb4\bcb4re300lm.lib : bcb4\bcb4re300lm\c_regex_traits.obj bcb4\bcb4re300lm\c_re bcc32 @&&| -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../; -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb4\bcb4re300lm.dll bcb4\bcb4re300lm\c_regex_traits.obj bcb4\bcb4re300lm\c_regex_traits_common.obj bcb4\bcb4re300lm\cpp_regex_traits.obj bcb4\bcb4re300lm\cregex.obj bcb4\bcb4re300lm\fileiter.obj bcb4\bcb4re300lm\posix_api.obj bcb4\bcb4re300lm\regex.obj bcb4\bcb4re300lm\regex_debug.obj bcb4\bcb4re300lm\regex_synch.obj bcb4\bcb4re300lm\w32_regex_traits.obj bcb4\bcb4re300lm\wide_posix_api.obj $(XLFLAGS) | - implib bcb4\bcb4re300lm.lib -c bcb4\bcb4re300lm.dll + implib -c bcb4\bcb4re300lm.lib bcb4\bcb4re300lm.dll ######################################################## # @@ -496,5 +496,5 @@ bcb4\bcb4re300l.lib : bcb4\bcb4re300l\c_regex_traits.obj bcb4\bcb4re300l\c_regex bcc32 @&&| -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../; -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb4\bcb4re300l.dll bcb4\bcb4re300l\c_regex_traits.obj bcb4\bcb4re300l\c_regex_traits_common.obj bcb4\bcb4re300l\cpp_regex_traits.obj bcb4\bcb4re300l\cregex.obj bcb4\bcb4re300l\fileiter.obj bcb4\bcb4re300l\posix_api.obj bcb4\bcb4re300l\regex.obj bcb4\bcb4re300l\regex_debug.obj bcb4\bcb4re300l\regex_synch.obj bcb4\bcb4re300l\w32_regex_traits.obj bcb4\bcb4re300l\wide_posix_api.obj $(XLFLAGS) | - implib bcb4\bcb4re300l.lib -c bcb4\bcb4re300l.dll + implib -c bcb4\bcb4re300l.lib bcb4\bcb4re300l.dll diff --git a/lib/bcb5.mak b/lib/bcb5.mak index f51a605e..7dc6a833 100644 --- a/lib/bcb5.mak +++ b/lib/bcb5.mak @@ -344,7 +344,7 @@ bcb5\bcb5re300lv.lib : bcb5\bcb5re300lv\c_regex_traits.obj bcb5\bcb5re300lv\c_re bcc32 @&&| -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../; -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300lv.dll bcb5\bcb5re300lv\c_regex_traits.obj bcb5\bcb5re300lv\c_regex_traits_common.obj bcb5\bcb5re300lv\cpp_regex_traits.obj bcb5\bcb5re300lv\cregex.obj bcb5\bcb5re300lv\fileiter.obj bcb5\bcb5re300lv\posix_api.obj bcb5\bcb5re300lv\regex.obj bcb5\bcb5re300lv\regex_debug.obj bcb5\bcb5re300lv\regex_synch.obj bcb5\bcb5re300lv\w32_regex_traits.obj bcb5\bcb5re300lv\wide_posix_api.obj $(XLFLAGS) | - implib bcb5\bcb5re300lv.lib -c bcb5\bcb5re300lv.dll + implib -c bcb5\bcb5re300lv.lib bcb5\bcb5re300lv.dll ######################################################## # @@ -420,7 +420,7 @@ bcb5\bcb5re300lm.lib : bcb5\bcb5re300lm\c_regex_traits.obj bcb5\bcb5re300lm\c_re bcc32 @&&| -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../; -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300lm.dll bcb5\bcb5re300lm\c_regex_traits.obj bcb5\bcb5re300lm\c_regex_traits_common.obj bcb5\bcb5re300lm\cpp_regex_traits.obj bcb5\bcb5re300lm\cregex.obj bcb5\bcb5re300lm\fileiter.obj bcb5\bcb5re300lm\posix_api.obj bcb5\bcb5re300lm\regex.obj bcb5\bcb5re300lm\regex_debug.obj bcb5\bcb5re300lm\regex_synch.obj bcb5\bcb5re300lm\w32_regex_traits.obj bcb5\bcb5re300lm\wide_posix_api.obj $(XLFLAGS) | - implib bcb5\bcb5re300lm.lib -c bcb5\bcb5re300lm.dll + implib -c bcb5\bcb5re300lm.lib bcb5\bcb5re300lm.dll ######################################################## # @@ -496,5 +496,5 @@ bcb5\bcb5re300l.lib : bcb5\bcb5re300l\c_regex_traits.obj bcb5\bcb5re300l\c_regex bcc32 @&&| -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../; -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300l.dll bcb5\bcb5re300l\c_regex_traits.obj bcb5\bcb5re300l\c_regex_traits_common.obj bcb5\bcb5re300l\cpp_regex_traits.obj bcb5\bcb5re300l\cregex.obj bcb5\bcb5re300l\fileiter.obj bcb5\bcb5re300l\posix_api.obj bcb5\bcb5re300l\regex.obj bcb5\bcb5re300l\regex_debug.obj bcb5\bcb5re300l\regex_synch.obj bcb5\bcb5re300l\w32_regex_traits.obj bcb5\bcb5re300l\wide_posix_api.obj $(XLFLAGS) | - implib bcb5\bcb5re300l.lib -c bcb5\bcb5re300l.dll + implib -c bcb5\bcb5re300l.lib bcb5\bcb5re300l.dll diff --git a/makefile_gen b/makefile_gen index b4223fd3..be4e6275 100644 --- a/makefile_gen +++ b/makefile_gen @@ -434,7 +434,7 @@ EOF echo " bcc32 @&&|" >> $tout echo "$opts -e$subdir\\$libname.dll $all_obj \$(XLFLAGS)" >> $tout echo "|" >> $tout - echo " implib $subdir\\$libname.lib -c $subdir\\$libname.dll" >> $tout + echo " implib -c $subdir\\$libname.lib $subdir\\$libname.dll" >> $tout echo "" >> $tout } @@ -608,3 +608,4 @@ rm -f $tout $iout + diff --git a/src/wide_posix_api.cpp b/src/wide_posix_api.cpp index eff4a149..ae1437ef 100644 --- a/src/wide_posix_api.cpp +++ b/src/wide_posix_api.cpp @@ -29,16 +29,9 @@ #ifndef BOOST_RE_NO_WCHAR_H #include #endif -#ifndef BOOST_RE_NO_WCTYPE_H -#include -#endif #include #include -#if defined(BOOST_RE_NO_SWPRINTF) && !defined(BOOST_RE_NO_WSPRINTF) -#include -#endif - namespace boost{ namespace { @@ -124,7 +117,7 @@ BOOST_RE_IX_DECL unsigned int BOOST_RE_CCALL regerrorW(int code, const regex_tW* } return result; } -#if !defined(BOOST_RE_NO_SWPRINTF) || !defined(BOOST_RE_NO_WSPRINTF) +#if !defined(BOOST_RE_NO_SWPRINTF) if(code == REG_ATOI) { wchar_t localbuf[5]; @@ -134,21 +127,13 @@ BOOST_RE_IX_DECL unsigned int BOOST_RE_CCALL regerrorW(int code, const regex_tW* { if(std::wcscmp(e->re_endp, wnames[i]) == 0) { -#if defined(BOOST_RE_NO_SWPRINTF) - wsprintf(localbuf, "%d", i); -#else - std::swprintf(localbuf, L"%d", i); -#endif + std::swprintf(localbuf, 5, L"%d", i); if(std::wcslen(localbuf) < buf_size) std::wcscpy(buf, localbuf); return std::wcslen(localbuf) + 1; } } -#if defined(BOOST_RE_NO_SWPRINTF) - wsprintf(localbuf, "%d", 0); -#else - std::swprintf(localbuf, L"%d", 0); -#endif + std::swprintf(localbuf, 5, L"%d", 0); if(std::wcslen(localbuf) < buf_size) std::wcscpy(buf, localbuf); return std::wcslen(localbuf) + 1;