Changeset 2502
- Timestamp:
- 08/26/07 04:22:40 (1 year ago)
- Files:
-
- trunk/dsss.conf (modified) (1 diff)
- trunk/lib/common/tango/core/Thread.d (modified) (2 diffs)
- trunk/lib/compiler/gdc/Makefile.am (modified) (1 diff)
- trunk/lib/compiler/gdc/Makefile.in (modified) (2 diffs)
- trunk/lib/compiler/gdc/aaA.d (modified) (2 diffs)
- trunk/lib/compiler/gdc/adi.d (modified) (2 diffs)
- trunk/lib/compiler/gdc/config.h.in (modified) (2 diffs)
- trunk/lib/compiler/gdc/config/ldfuncs33 (modified) (1 diff)
- trunk/lib/compiler/gdc/config/noldfuncs33 (modified) (1 diff)
- trunk/lib/compiler/gdc/config/unix-mid (modified) (2 diffs)
- trunk/lib/compiler/gdc/configure (modified) (7 diffs)
- trunk/lib/compiler/gdc/configure.in (modified) (4 diffs)
- trunk/lib/compiler/gdc/frag-ac.in (modified) (1 diff)
- trunk/lib/compiler/gdc/genobj.d (modified) (4 diffs)
- trunk/lib/compiler/gdc/phobos-ver-syms.in (modified) (1 diff)
- trunk/object.di (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dsss.conf
r2465 r2502 22 22 23 23 [tango/io] 24 version (GNU) { 25 exclude = tango/io/compress/Zlib.d 26 } 24 27 25 28 [tango/math] 26 29 27 30 [tango/net] 28 version (GNU) {29 exclude = tango/net/cluster30 }31 31 32 32 [tango/stdc] trunk/lib/common/tango/core/Thread.d
r2477 r2502 926 926 if( !set ) 927 927 { 928 foreach( Thread t; sm_tbeg ) 928 //foreach( Thread t; sm_tbeg ) Bug in GDC 0.24 SVN (r139) 929 for( Thread t = sm_tbeg; t; t = t.next ) 929 930 { 930 931 t.m_local[key] = null; … … 953 954 { 954 955 sm_local[key] = false; 955 foreach( Thread t; sm_tbeg ) 956 // foreach( Thread t; sm_tbeg ) Bug in GDC 0.24 SVN (r139) 957 for( Thread t = sm_tbeg; t; t = t.next ) 956 958 { 957 959 t.m_local[key] = null; trunk/lib/compiler/gdc/Makefile.am
r2465 r2502 81 81 critical.o \ 82 82 dgccmain2.o \ 83 gcc/builtins.o \ 83 84 genobj.o \ 84 85 invariant.o \ trunk/lib/compiler/gdc/Makefile.in
r2030 r2502 119 119 DCFG_FWIDE = @DCFG_FWIDE@ 120 120 DCFG_GETPWNAM_R = @DCFG_GETPWNAM_R@ 121 DCFG_HAVE_FGETLINE = @DCFG_HAVE_FGETLINE@ 122 DCFG_HAVE_FGETLN = @DCFG_HAVE_FGETLN@ 123 DCFG_HAVE_GETDELIM = @DCFG_HAVE_GETDELIM@ 124 DCFG_HAVE_UNLOCKED_STDIO = @DCFG_HAVE_UNLOCKED_STDIO@ 125 DCFG_HAVE_UNLOCKED_WIDE_STDIO = @DCFG_HAVE_UNLOCKED_WIDE_STDIO@ 121 126 DCFG_MMAP = @DCFG_MMAP@ 122 127 DCFG_NAN = @DCFG_NAN@ … … 253 258 critical.o \ 254 259 dgccmain2.o \ 260 gcc/builtins.o \ 255 261 genobj.o \ 256 262 invariant.o \ trunk/lib/compiler/gdc/aaA.d
r1617 r2502 102 102 { 103 103 BB* a; 104 version (X86_64)105 {106 }107 else108 {109 // This is here only to retain binary compatibility with the110 // old way we did AA's. Should eventually be removed.111 //int reserved;112 }113 104 } 114 105 … … 763 754 return result; 764 755 } 756 757 758 /*********************************** 759 * Construct an associative array of type ti from 760 * length pairs of key/value pairs. 761 */ 762 763 extern (C) 764 BB* _d_assocarrayliteralTp(TypeInfo_AssociativeArray ti, size_t length, 765 void *keys, void *values) 766 { 767 auto valuesize = ti.next.tsize(); // value size 768 auto keyti = ti.key; 769 auto keysize = keyti.tsize(); // key size 770 BB* result; 771 772 //printf("_d_assocarrayliteralT(keysize = %d, valuesize = %d, length = %d)\n", keysize, valuesize, length); 773 //writefln("tivalue = %s", ti.next.classinfo.name); 774 if (length == 0 || valuesize == 0 || keysize == 0) 775 { 776 ; 777 } 778 else 779 { 780 //va_list q; 781 //va_start!(size_t)(q, length); 782 void * qkey = keys; 783 void * qval = values; 784 785 result = new BB(); 786 size_t i; 787 788 for (i = 0; i < prime_list.length - 1; i++) 789 { 790 if (length <= prime_list[i]) 791 break; 792 } 793 auto len = prime_list[i]; 794 result.b = new aaA*[len]; 795 796 size_t keystacksize = (keysize + int.sizeof - 1) & ~(int.sizeof - 1); 797 size_t valuestacksize = (valuesize + int.sizeof - 1) & ~(int.sizeof - 1); 798 799 size_t keytsize = aligntsize(keysize); 800 801 for (size_t j = 0; j < length; j++) 802 { void* pkey = qkey; 803 //q += keystacksize; 804 qkey += keysize; 805 void* pvalue = qval; 806 //q += valuestacksize; 807 qval += valuesize; 808 aaA* e; 809 810 auto key_hash = keyti.getHash(pkey); 811 //printf("hash = %d\n", key_hash); 812 i = key_hash % len; 813 auto pe = &result.b[i]; 814 while (1) 815 { 816 e = *pe; 817 if (!e) 818 { 819 // Not found, create new elem 820 //printf("create new one\n"); 821 e = cast(aaA *) cast(void*) new void[aaA.sizeof + keytsize + valuesize]; 822 memcpy(e + 1, pkey, keysize); 823 e.hash = key_hash; 824 *pe = e; 825 result.nodes++; 826 break; 827 } 828 if (key_hash == e.hash) 829 { 830 auto c = keyti.compare(pkey, e + 1); 831 if (c == 0) 832 break; 833 pe = (c < 0) ? &e.left : &e.right; 834 } 835 else 836 pe = (key_hash < e.hash) ? &e.left : &e.right; 837 } 838 memcpy(cast(void *)(e + 1) + keytsize, pvalue, valuesize); 839 } 840 841 //va_end(q); 842 } 843 return result; 844 } 845 846 trunk/lib/compiler/gdc/adi.d
r1806 r2502 126 126 memmove(lo + stridehi, lo + stridelo , (hi - lo) - stridelo); 127 127 memcpy(lo, tmp.ptr, stridehi); 128 memcpy(hi + stridehi -stridelo, tmplo.ptr, stridelo);128 memcpy(hi + cast(int) stridehi - cast(int) stridelo, tmplo.ptr, stridelo); 129 129 130 130 lo += stridehi; 131 hi = hi - 1 + (stridehi -stridelo);131 hi = hi - 1 + (cast(int) stridehi - cast(int) stridelo); 132 132 } 133 133 } … … 218 218 */ 219 219 memcpy(tmp.ptr, hi, stridehi * wchar.sizeof); 220 memcpy(hi + stridehi -stridelo, lo, stridelo * wchar.sizeof);220 memcpy(hi + cast(int) stridehi - cast(int) stridelo, lo, stridelo * wchar.sizeof); 221 221 memmove(lo + stridehi, lo + stridelo , (hi - (lo + stridelo)) * wchar.sizeof); 222 222 memcpy(lo, tmp.ptr, stridehi * wchar.sizeof); 223 223 224 224 lo += stridehi; 225 hi = hi - 1 + (stridehi -stridelo);225 hi = hi - 1 + (cast(int) stridehi - cast(int) stridelo); 226 226 } 227 227 } trunk/lib/compiler/gdc/config.h.in
r1857 r2502 7 7 #undef HAVE_EXP2 8 8 9 /* Define to 1 if you have the `flockfile' function. */ 10 #undef HAVE_FLOCKFILE 11 9 12 /* Define to 1 fpclassify and signbit are available */ 10 13 #undef HAVE_FP_CLASSIFY_SIGNBIT 14 15 /* Define to 1 if you have the `funlockfile' function. */ 16 #undef HAVE_FUNLOCKFILE 17 18 /* Define to 1 if you have the `getc_unlocked' function. */ 19 #undef HAVE_GETC_UNLOCKED 20 21 /* Define to 1 if you have the `getwc_unlocked' function. */ 22 #undef HAVE_GETWC_UNLOCKED 11 23 12 24 /* Define to 1 if you have the <inttypes.h> header file. */ … … 45 57 /* Define to 1 if the system has the type `pthread_spinlock_t'. */ 46 58 #undef HAVE_PTHREAD_SPINLOCK_T 59 60 /* Define to 1 if you have the `putc_unlocked' function. */ 61 #undef HAVE_PUTC_UNLOCKED 62 63 /* Define to 1 if you have the `putwc_unlocked' function. */ 64 #undef HAVE_PUTWC_UNLOCKED 47 65 48 66 /* Define to 1 if you have the <semaphore.h> header file. */ trunk/lib/compiler/gdc/config/ldfuncs33
r454 r2502 1 // If long double functions are present, just alias2 // to the __builtin_ version. This may not do the right thing (TODO)3 4 // GCC 3.3 doesn't have some of these builtins5 //6 extern (C) {7 real acosl(real);8 real asinl(real);9 real atanl(real);10 real atan2l(real, real);11 12 alias __builtin_cosl cosl;13 alias __builtin_sinl sinl;14 15 real tanl(real);16 real acoshl(real);17 real asinhl(real);18 real atanhl(real);19 real coshl(real);20 real sinhl(real);21 real tanhl(real);22 23 alias __builtin_expl expl;24 25 real exp2l(real);26 real expm1l(real);27 real frexpl(real, int*);28 int ilogbl(real);29 real ldexpl(real, int);30 31 alias __builtin_logl logl;32 33 real log10l(real);34 real log1pl(real);35 real log2l(real);36 real logbl(real);37 real modfl(real, real*);38 real scalbnl(real, int);39 real scalblnl(real, Clong_t);40 real cbrtl(real);41 real fabsl(real);42 real hypotl(real, real);43 real powl(real, real);44 45 alias __builtin_sqrtl sqrtl;46 47 real erfl(real);48 real erfcl(real);49 real lgammal(real);50 real tgammal(real);51 real ceill(real);52 real floorl(real);53 real nearbyintl(real);54 real rintl(real);55 Clong_t lrintl(real);56 long llrintl(real);57 real roundl(real);58 Clong_t lroundl(real);59 long llroundl(real);60 real truncl(real);61 real fmodl(real, real);62 real remainderl(real, real);63 real remquol(real, real, int*);64 real copysignl(real, real);65 66 //alias __builtin_nanl nanl;//67 real nanl(char *);68 69 real nextafterl(real, real);70 real nexttowardl(real, real);71 real fdiml(real, real);72 real fmaxl(real, real);73 real fminl(real, real);74 real fmal(real, real, real);75 76 alias __builtin_sqrt sqrt;77 //alias __builtin_sqrtf sqrtf;// needs an extra step78 }trunk/lib/compiler/gdc/config/noldfuncs33
r454 r2502 1 // If long double functions are present, just alias2 // to the __builtin_ version. This may not do the right thing (TODO)3 4 // GCC 3.3 doesn't have some of these builtins5 //6 extern (C) {7 double acos(double);8 alias acos acosl;9 double asin(double);10 alias asin asinl;11 double atan(double);12 alias atan atanl;13 double atan2(double, double);14 alias atan2 atan2l;15 16 alias __builtin_cos cosl;17 alias __builtin_sin sinl;18 19 double tan(double);20 alias tan tanl;21 double acosh(double);22 alias acosh acoshl;23 double asinh(double);24 alias asinh asinhl;25 double atanh(double);26 alias atanh atanhl;27 double cosh(double);28 alias cosh coshl;29 double sinh(double);30 alias sinh sinhl;31 double tanh(double);32 alias tanh tanhl;33 34 alias __builtin_exp expl;35 36 double exp2(double);37 alias exp2 exp2l;38 double expm1(double);39 alias expm1 expm1l;40 double frexp(double, int*);41 alias frexp frexpl;42 int ilogb(double);43 alias ilogb ilogbl;44 double ldexp(double, int);45 alias ldexp ldexpl;46 47 alias __builtin_log logl;48 49 double log10(double);50 alias log10 log10l;51 double log1p(double);52 alias log1p log1pl;53 double log2(double);54 alias log2 log2l;55 double logb(double);56 alias logb logbl;57 58 double modf(double, double*);59 double modfl(real a, real* b)60 {61 double c;62 double result = modf(a, & c);63 *b = c;64 return result;65 }66 67 double scalbn(double, int);68 alias scalbn scalbnl;69 double scalbln(double, int); // C long int70 alias scalbln scalblnl;71 double cbrt(double);72 alias cbrt cbrtl;73 double fabs(double);74 alias fabs fabsl;75 double hypot(double, double);76 alias hypot hypotl;77 double pow(double, double);78 alias pow powl;79 80 alias __builtin_sqrt sqrtl;81 82 double erf(double);83 alias erf erfl;84 double erfc(double);85 alias erfc erfcl;86 double lgamma(double);87 alias lgamma lgammal;88 double tgamma(double);89 alias tgamma tgammal;90 double ceil(double);91 alias ceil ceill;92 double floor(double);93 alias floor floorl;94 double nearbyint(double);95 alias nearbyint nearbyintl;96 double rint(double);97 alias rint rintl;98 int lrint(double); // C long int99 alias lrint lrintl;100 long llrint(double);101 alias llrint llrintl;102 double round(double);103 alias round roundl;104 int lround(double); // C long int105 alias lround lroundl;106 long llround(double);107 alias llround llroundl;108 double trunc(double);109 alias trunc truncl;110 double fmod(double, double);111 alias fmod fmodl;112 double remainder(double, double);113 alias remainder remainderl;114 double remquo(double, double, int*);115 alias remquo remquol;116 double copysign(double, double);117 alias copysign copysignl;118 119 alias __builtin_nan nanl;120 121 double nextafter(double, double);122 alias nextafter nextafterl;123 alias nextafter nexttowardl;124 double fdim(double, double);125 alias fdim fdiml;126 double fmax(double, double);127 alias fmax fmaxl;128 double fmin(double, double);129 alias fmin fminl;130 double fma(double, double, double);131 alias fma fmal;132 133 alias __builtin_sqrt sqrt;134 //alias __builtin_sqrtf sqrtf;// needs an extra step135 }trunk/lib/compiler/gdc/config/unix-mid
r1856 r2502 293 293 int creat(char*, mode_t); 294 294 char* ctermid(char*); 295 int dirfd(DIR*);296 295 char* dirname(char*); 297 296 int fattach(int, char*); … … 301 300 int fmtmsg(int, char*, int, char*, char*, char*); 302 301 int fpathconf(int, int); 303 int fseeko(FILE*, off_t, int);304 off_t ftello(FILE*);305 302 306 303 extern char** environ; trunk/lib/compiler/gdc/configure
r2360 r2502 714 714 DCFG_SPAWNVP 715 715 DCFG_FWIDE 716 DCFG_HAVE_GETDELIM 717 DCFG_HAVE_FGETLN 718 DCFG_HAVE_FGETLINE 719 DCFG_HAVE_UNLOCKED_STDIO 720 DCFG_HAVE_UNLOCKED_WIDE_STDIO 716 721 DCFG_STRTOLD 717 722 DCFG_CBRIDGE_STDIO … … 4031 4036 { echo "$as_me:$LINENO: result: $d_gcc_ver" >&5 4032 4037 echo "${ECHO_T}$d_gcc_ver" >&6; } 4033 if echo "$d_gcc_ver" | grep '^3.3' > /dev/null; then4034 d_gcc_33=334035 fi4036 4038 4037 4039 … … 5227 5229 5228 5230 case "$target_os" in 5229 darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs $d_gcc_33;;5231 darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs ;; 5230 5232 darwin*) DCFG_LONG_DOUBLE_FUNCS=config/ldfuncs-darwin ;; 5231 5233 linux*) … … 5508 5510 DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs 5509 5511 fi 5510 DCFG_LONG_DOUBLE_FUNCS="$DCFG_LONG_DOUBLE_FUNCS $d_gcc_33"5512 DCFG_LONG_DOUBLE_FUNCS="$DCFG_LONG_DOUBLE_FUNCS" 5511 5513 fi 5512 5514 … … 6514 6516 echo "${ECHO_T}$ac_cv_func_fwide" >&6; } 6515 6517 if test $ac_cv_func_fwide = yes; then 6516 DCFG_FWIDE="GNU_Have_fwide" 6517 else 6518 DCFG_FWIDE="" 6519 fi 6518 DCFG_FWIDE=1 6519 else 6520 DCFG_FWIDE=0 6521 fi 6522 6523 6524 6525 { echo "$as_me:$LINENO: checking for getdelim" >&5 6526 echo $ECHO_N "checking for getdelim... $ECHO_C" >&6; } 6527 if test "${ac_cv_func_getdelim+set}" = set; then 6528 echo $ECHO_N "(cached) $ECHO_C" >&6 6529 else 6530 cat >conftest.$ac_ext <<_ACEOF 6531 /* confdefs.h. */ 6532 _ACEOF 6533 cat confdefs.h >>conftest.$ac_ext 6534 cat >>conftest.$ac_ext <<_ACEOF 6535 /* end confdefs.h. */ 6536 /* Define getdelim to an innocuous variant, in case <limits.h> declares getdelim. 6537 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 6538 #define getdelim innocuous_getdelim 6539 6540 /* System header to define __stub macros and hopefully few prototypes, 6541 which can conflict with char getdelim (); below. 6542 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6543 <limits.h> exists even on freestanding compilers. */ 6544 6545 #ifdef __STDC__ 6546 # include <limits.h> 6547 #else 6548 # include <assert.h> 6549 #endif 6550 6551 #undef getdelim 6552 6553 /* Override any GCC internal prototype to avoid an error. 6554 Use char because int might match the return type of a GCC 6555 builtin and then its argument prototype would still apply. */ 6556 #ifdef __cplusplus 6557 extern "C" 6558 #endif 6559 char getdelim (); 6560 /* The GNU C library defines this for functions which it implements 6561 to always fail with ENOSYS. Some functions are actually named 6562 something starting with __ and the normal name is an alias. */ 6563 #if defined __stub_getdelim || defined __stub___getdelim 6564 choke me 6565 #endif 6566 6567 int 6568 main () 6569 { 6570 return getdelim (); 6571 ; 6572 return 0; 6573 } 6574 _ACEOF 6575 rm -f conftest.$ac_objext conftest$ac_exeext 6576 if { (ac_try="$ac_link" 6577 case "(($ac_try" in 6578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6579 *) ac_try_echo=$ac_try;; 6580 esac 6581 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 6582 (eval "$ac_link") 2>conftest.er1 6583 ac_status=$? 6584 grep -v '^ *+' conftest.er1 >conftest.err 6585 rm -f conftest.er1 6586 cat conftest.err >&5 6587 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6588 (exit $ac_status); } && { 6589 test -z "$ac_c_werror_flag" || 6590 test ! -s conftest.err 6591 } && test -s conftest$ac_exeext && 6592 $as_test_x conftest$ac_exeext; then 6593 ac_cv_func_getdelim=yes 6594 else 6595 echo "$as_me: failed program was:" >&5 6596 sed 's/^/| /' conftest.$ac_ext >&5 6597 6598 ac_cv_func_getdelim=no 6599 fi 6600 6601 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6602 conftest$ac_exeext conftest.$ac_ext 6603 fi 6604 { echo "$as_me:$LINENO: result: $ac_cv_func_getdelim" >&5 6605 echo "${ECHO_T}$ac_cv_func_getdelim" >&6; } 6606 if test $ac_cv_func_getdelim = yes; then 6607 DCFG_HAVE_GETDELIM=1 6608 else 6609 DCFG_HAVE_GETDELIM=0 6610 fi 6611 6612 6613 6614 { echo "$as_me:$LINENO: checking for fgetln" >&5 6615 echo $ECHO_N "checking for fgetln... $ECHO_C" >&6; } 6616 if test "${ac_cv_func_fgetln+set}" = set; then 6617 echo $ECHO_N "(cached) $ECHO_C" >&6 6618 else 6619 cat >conftest.$ac_ext <<_ACEOF 6620 /* confdefs.h. */ 6621 _ACEOF 6622 cat confdefs.h >>conftest.$ac_ext 6623 cat >>conftest.$ac_ext <<_ACEOF 6624 /* end confdefs.h. */ 6625 /* Define fgetln to an innocuous variant, in case <limits.h> declares fgetln. 6626 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 6627 #define fgetln innocuous_fgetln 6628 6629 /* System header to define __stub macros and hopefully few prototypes, 6630 which can conflict with char fgetln (); below. 6631 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6632 <limits.h> exists even on freestanding compilers. */ 6633 6634 #ifdef __STDC__ 6635 # include <limits.h> 6636 #else 6637 # include <assert.h> 6638 #endif 6639 6640 #undef fgetln 6641 6642 /* Override any GCC internal prototype to avoid an error. 6643 Use char because int might match the return type of a GCC 6644 builtin and then its argument prototype would still apply. */ 6645 #ifdef __cplusplus 6646 extern "C" 6647 #endif 6648 char fgetln (); 6649 /* The GNU C library defines this for functions which it implements 6650 to always fail with ENOSYS. Some functions are actually named 6651 something starting with __ and the normal name is an alias. */ 6652 #if defined __stub_fgetln || defined __stub___fgetln 6653 choke me 6654 #endif 6655 6656 int 6657 main () 6658 { 6659 return fgetln (); 6660 ; 6661 return 0; 6662 } 6663 _ACEOF 6664 rm -f conftest.$ac_objext conftest$ac_exeext 6665 if { (ac_try="$ac_link" 6666 case "(($ac_try" in 6667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6668 *) ac_try_echo=$ac_try;; 6669 esac 6670 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 6671 (eval "$ac_link") 2>conftest.er1 6672 ac_status=$? 6673 grep -v '^ *+' conftest.er1 >conftest.err 6674 rm -f conftest.er1 6675 cat conftest.err >&5 6676 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6677 (exit $ac_status); } && { 6678 test -z "$ac_c_werror_flag" || 6679 test ! -s conftest.err 6680 } && test -s conftest$ac_exeext && 6681 $as_test_x conftest$ac_exeext; then 6682 ac_cv_func_fgetln=yes 6683 else 6684 echo "$as_me: failed program was:" >&5 6685 sed 's/^/| /' conftest.$ac_ext >&5 6686 6687 ac_cv_func_fgetln=no 6688 fi 6689 6690 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6691 conftest$ac_exeext conftest.$ac_ext 6692 fi 6693 { echo "$as_me:$LINENO: result: $ac_cv_func_fgetln" >&5 6694 echo "${ECHO_T}$ac_cv_func_fgetln" >&6; } 6695 if test $ac_cv_func_fgetln = yes; then 6696 DCFG_HAVE_FGETLN=1 6697 else 6698 DCFG_HAVE_FGETLN=0 6699 fi 6700 6701 6702 6703 { echo "$as_me:$LINENO: checking for fgetline" >&5 6704 echo $ECHO_N "checking for fgetline... $ECHO_C" >&6; } 6705 if test "${ac_cv_func_fgetline+set}" = set; then 6706 echo $ECHO_N "(cached) $ECHO_C" >&6 6707 else 6708 cat >conftest.$ac_ext <<_ACEOF 6709 /* confdefs.h. */ 6710 _ACEOF 6711 cat confdefs.h >>conftest.$ac_ext 6712 cat >>conftest.$ac_ext <<_ACEOF 6713 /* end confdefs.h. */ 6714 /* Define fgetline to an innocuous variant, in case <limits.h> declares fgetline. 6715 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 6716 #define fgetline innocuous_fgetline 6717 6718 /* System header to define __stub macros and hopefully few prototypes, 6719 which can conflict with char fgetline (); below. 6720 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6721 <limits.h> exists even on freestanding compilers. */ 6722 6723 #ifdef __STDC__ 6724 # include <limits.h> 6725 #else 6726 # include <assert.h> 6727 #endif 6728 6729 #undef fgetline 6730 6731 /* Override any GCC internal prototype to avoid an error. 6732 Use char because int might match the return type of a GCC 6733 builtin and then its argument prototype would still apply. */ 6734 #ifdef __cplusplus 6735 extern "C" 6736 #endif 6737 char fgetline (); 6738 /* The GNU C library defines this for functions which it implements 6739 to always fail with ENOSYS. Some functions are actually named 6740 something starting with __ and the normal name is an alias. */ 6741 #if defined __stub_fgetline || defined __stub___fgetline 6742 choke me 6743 #endif 6744 6745 int 6746 main () 6747 { 6748 return fgetline (); 6749 ; 6750 return 0; 6751 } 6752 _ACEOF 6753 rm -f conftest.$ac_objext conftest$ac_exeext 6754 if { (ac_try="$ac_link" 6755 case "(($ac_try" in 6756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6757 *) ac_try_echo=$ac_try;; 6758 esac 6759 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 6760 (eval "$ac_link") 2>conftest.er1 6761 ac_status=$? 6762 grep -v '^ *+' conftest.er1 >conftest.err 6763 rm -f conftest.er1 6764 cat conftest.err >&5 6765 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6766 (exit $ac_status); } && { 6767 test -z "$ac_c_werror_flag" || 6768 test ! -s conftest.err 6769 } && test -s conftest$ac_exeext && 6770 $as_test_x conftest$ac_exeext; then 6771 ac_cv_func_fgetline=yes 6772 else 6773 echo "$as_me: failed program was:" >&5 6774 sed 's/^/| /' conftest.$ac_ext >&5 6775 6776 ac_cv_func_fgetline=no 6777 fi 6778 6779 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6780 conftest$ac_exeext conftest.$ac_ext 6781 fi 6782 { echo "$as_me:$LINENO: result: $ac_cv_func_fgetline" >&5 6783 echo "${ECHO_T}$ac_cv_func_fgetline" >&6; } 6784 if test $ac_cv_func_fgetline = yes; then 6785 DCFG_HAVE_FGETLINE=1 6786 else 6787 DCFG_HAVE_FGETLINE=0 6788 fi 6789 6790 6791 6792 DCFG_HAVE_UNLOCKED_STDIO=1 6793 6794 6795 6796 6797 for ac_func in flockfile funlockfile putc_unlocked getc_unlocked 6798 do 6799 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 6800 { echo "$as_me:$LINENO: checking for $ac_func" >&5 6801 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 6802 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 6803 echo $ECHO_N "(cached) $ECHO_C" >&6 6804 else 6805 cat >conftest.$ac_ext <<_ACEOF 6806 /* confdefs.h. */ 6807 _ACEOF 6808 cat confdefs.h >>conftest.$ac_ext 6809 cat >>conftest.$ac_ext <<_ACEOF 6810 /* end confdefs.h. */ 6811 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. 6812 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 6813 #define $ac_func innocuous_$ac_func 6814 6815 /* System header to define __stub macros and hopefully few prototypes, 6816 which can conflict with char $ac_func (); below. 6817 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6818 <limits.h> exists even on freestanding compilers. */ 6819 6820 #ifdef __STDC__ 6821 # include <limits.h> 6822 #else 6823 # include <assert.h> 6824 #endif 6825 6826 #undef $ac_func 6827 6828 /* Override any GCC internal prototype to avoid an error. 6829 Use char because int might match the return type of a GCC 6830 builtin and then its argument prototype would still apply. */ 6831 #ifdef __cplusplus 6832 extern "C" 6833 #endif 6834 char $ac_func (); 6835 /* The GNU C library defines this for functions which it implements 6836 to always fail with ENOSYS. Some functions are actually named 6837 something starting with __ and the normal name is an alias. */ 6838 #if defined __stub_$ac_func || defined __stub___$ac_func 6839 choke me 6840 #endif 6841 6842 int 6843 main () 6844 { 6845 return $ac_func (); 6846 ; 6847 return 0; 6848 } 6849 _ACEOF 6850 rm -f conftest.$ac_objext conftest$ac_exeext 6851 if { (ac_try="$ac_link" 6852 case "(($ac_try" in 6853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6854 *) ac_try_echo=$ac_try;; 6855 esac 6856 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 6857 (eval "$ac_link") 2>conftest.er1 6858 ac_status=$? 6859 grep -v '^ *+' conftest.er1 >conftest.err 6860 rm -f conftest.er1 6861 cat conftest.err >&5 6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6863 (exit $ac_status); } && { 6864 test -z "$ac_c_werror_flag" || 6865 test ! -s conftest.err 6866 } && test -s conftest$ac_exeext && 6867 $as_test_x conftest$ac_exeext; then 6868 eval "$as_ac_var=yes" 6869 else 6870 echo "$as_me: failed program was:" >&5 6871 sed 's/^/| /' conftest.$ac_ext >&5 6872 6873 eval "$as_ac_var=no" 6874 fi 6875 6876 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6877 conftest$ac_exeext conftest.$ac_ext 6878 fi 6879 ac_res=`eval echo '${'$as_ac_var'}'` 6880 { echo "$as_me:$LINENO: result: $ac_res" >&5 6881 echo "${ECHO_T}$ac_res" >&6; } 6882 if test `eval echo '${'$as_ac_var'}'` = yes; then 6883 cat >>confdefs.h <<_ACEOF 6884 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 6885 _ACEOF 6886 6887 else 6888 DCFG_HAVE_UNLOCKED_STDIO=0 6889 fi 6890 done 6891 6892 6893 6894 DCFG_HAVE_UNLOCKED_WIDE_STDIO=$DCFG_HAVE_UNLOCKED_STDIO 6895 6896 6897 for ac_func in putwc_unlocked getwc_unlocked 6898 do 6899 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 6900 { echo "$as_me:$LINENO: checking for $ac_func" >&5 6901 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 6902 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 6903 echo $ECHO_N "(cached) $ECHO_C" >&6 6904 else 6905 cat >conftest.$ac_ext <<_ACEOF 6906 /* confdefs.h. */ 6907 _ACEOF 6908 cat confdefs.h >>conftest.$ac_ext 6909 cat >>conftest.$ac_ext <<_ACEOF 6910 /* end confdefs.h. */ 6911 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. 6912 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 6913 #define $ac_func innocuous_$ac_func 6914 6915 /* System header to define __stub macros and hopefully few prototypes, 6916 which can conflict with char $ac_func (); below. 6917 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6918 <limits.h> exists even on freestanding compilers. */ 6919 6920 #ifdef __STDC__ 6921 # include <limits.h> 6922 #else 6923 # include <assert.h> 6924 #endif 6925 6926 #undef $ac_func 6927 6928 /* Override any GCC internal prototype to avoid an error. 6929 Use char because int might match the return type of a GCC 6930 builtin and then its argument prototype would still apply. */ 6931 #ifdef __cplusplus 6932 extern "C" 6933 #endif 6934 char $ac_func (); 6935 /* The GNU C library defines this for functions which it implements 6936 to always fail with ENOSYS. Some functions are actually named 6937 something starting with __ and the normal name is an alias. */ 6938 #if defined __stub_$ac_func || defined __stub___$ac_func 6939 choke me 6940 #endif 6941 6942 int 6943 main () 6944 { 6945 return $ac_func (); 6946 ; 6947 return 0; 6948 } 6949 _ACEOF 6950 rm -f conftest.$ac_objext conftest$ac_exeext 6951 if { (ac_try="$ac_link" 6952 case "(($ac_try" in 6953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6954 *) ac_try_echo=$ac_try;; 6955 esac 6956 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 6957 (eval "$ac_link") 2>conftest.er1 6958 ac_status=$? 6959 grep -v '^ *+' conftest.er1 >conftest.err 6960 rm -f conftest.er1 6961 cat conftest.err >&5 6962 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6963 (exit $ac_status); } && { 6964 test -z "$ac_c_werror_flag" || 6965 test ! -s conftest.err 6966 } && test -s conftest$ac_exeext && 6967 $as_test_x conftest$ac_exeext; then 6968 eval "$as_ac_var=yes" 6969 else 6970 echo "$as_me: failed program was:" >&5 6971 sed 's/^/| /' conftest.$ac_ext >&5 6972 6973 eval "$as_ac_var=no" 6974 fi 6975 6976 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6977 conftest$ac_exeext conftest.$ac_ext 6978 fi 6979 ac_res=`eval echo '${'$as_ac_var'}'` 6980 { echo "$as_me:$LINENO: result: $ac_res" >&5 6981 echo "${ECHO_T}$ac_res" >&6; } 6982 if test `eval echo '${'$as_ac_var'}'` = yes; then 6983 cat >>confdefs.h <<_ACEOF 6984 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 6985 _ACEOF 6986 6987 else 6988 DCFG_HAVE_UNLOCKED_WIDE_STDIO=0 6989 fi 6990 done 6520 6991 6521 6992 … … 10030 10501 DCFG_SPAWNVP!$DCFG_SPAWNVP$ac_delim 10031 10502 DCFG_FWIDE!$DCFG_FWIDE$ac_delim 10503 DCFG_HAVE_GETDELIM!$DCFG_HAVE_GETDELIM$ac_delim 10504 DCFG_HAVE_FGETLN!$DCFG_HAVE_FGETLN$ac_delim 10505 DCFG_HAVE_FGETLINE!$DCFG_HAVE_FGETLINE$ac_delim 10506 DCFG_HAVE_UNLOCKED_STDIO!$DCFG_HAVE_UNLOCKED_STDIO$ac_delim 10507 DCFG_HAVE_UNLOCKED_WIDE_STDIO!$DCFG_HAVE_UNLOCKED_WIDE_STDIO$ac_delim 10032 10508 DCFG_STRTOLD!$DCFG_STRTOLD$ac_delim 10033 10509 DCFG_CBRIDGE_STDIO!$DCFG_CBRIDGE_STDIO$ac_delim … … 10049 10525 _ACEOF 10050 10526 10051 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 26; then10527 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 31; then 10052 10528 break 10053 10529 elif $ac_last_try; then trunk/lib/compiler/gdc/configure.in
r2465 r2502 190 190 d_gcc_ver=`$GDC -dumpversion` 191 191 AC_MSG_RESULT($d_gcc_ver) 192 if echo "$d_gcc_ver" | grep '^3.3' > /dev/null; then193 d_gcc_33=33194 fi195 192 196 193 dnl Eventually need to include everything from libstdc++-v3/acinclude.m4 … … 260 257 261 258 case "$target_os" in 262 darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs $d_gcc_33;;259 darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs ;; 263 260 darwin*) DCFG_LONG_DOUBLE_FUNCS=config/ldfuncs-darwin ;; 264 261 linux*) … … 283 280 DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs 284 281 fi 285 DCFG_LONG_DOUBLE_FUNCS="$DCFG_LONG_DOUBLE_FUNCS $d_gcc_33"282 DCFG_LONG_DOUBLE_FUNCS="$DCFG_LONG_DOUBLE_FUNCS" 286 283 fi 287 284 … … 377 374 AC_SUBST(DCFG_SPAWNVP) 378 375 379 AC_CHECK_FUNC(fwide, DCFG_FWIDE="GNU_Have_fwide",DCFG_FWIDE="")376 AC_CHECK_FUNC(fwide,[DCFG_FWIDE=1],[DCFG_FWIDE=0]) 380 377 AC_SUBST(DCFG_FWIDE) 378 379 AC_CHECK_FUNC(getdelim,[DCFG_HAVE_GETDELIM=1],[DCFG_HAVE_GETDELIM=0]) 380 AC_SUBST(DCFG_HAVE_GETDELIM) 381 382 AC_CHECK_FUNC(fgetln,[DCFG_HAVE_FGETLN=1],[DCFG_HAVE_FGETLN=0]) 383 AC_SUBST(DCFG_HAVE_FGETLN) 384 385 AC_CHECK_FUNC(fgetline,[DCFG_HAVE_FGETLINE=1],[DCFG_HAVE_FGETLINE=0]) 386 AC_SUBST(DCFG_HAVE_FGETLINE) 387 388 DCFG_HAVE_UNLOCKED_STDIO=1 389 AC_CHECK_FUNCS([flockfile funlockfile putc_unlocked getc_unlocked], 390 [],[DCFG_HAVE_UNLOCKED_STDIO=0]) 391 AC_SUBST(DCFG_HAVE_UNLOCKED_STDIO) 392 393 DCFG_HAVE_UNLOCKED_WIDE_STDIO=$DCFG_HAVE_UNLOCKED_STDIO 394 AC_CHECK_FUNCS([putwc_unlocked getwc_unlocked], [],[DCFG_HAVE_UNLOCKED_WIDE_STDIO=0]) 395 AC_SUBST(DCFG_HAVE_UNLOCKED_WIDE_STDIO) 381 396 382 397 AC_CHECK_FUNC(strtold,DCFG_STRTOLD="GNU_Have_strtold",DCFG_STRTOLD="") trunk/lib/compiler/gdc/frag-ac.in
r454 r2502 5 5 @DCFG_SQRTF@ 6 6 7 // C stdio config for std.stdio 8 const bool Have_fwide = @DCFG_FWIDE@; 9 const bool Have_getdelim = @DCFG_HAVE_GETDELIM@; 10 const bool Have_fgetln = @DCFG_HAVE_FGETLN@; 11 const bool Have_fgetline = @DCFG_HAVE_FGETLINE@; 12 const bool Have_Unlocked_Stdio = @DCFG_HAVE_UNLOCKED_STDIO@; 13 const bool Have_Unlocked_Wide_Stdio = @DCFG_HAVE_UNLOCKED_WIDE_STDIO@; 14 7 15 // ...frags-ac.in trunk/lib/compiler/gdc/genobj.d
r2465 r2502 116 116 } 117 117 118 /****** 119 * Create instance of class specified by classname. 120 * The class must either have no constructors or have 121 * a default constructor. 122 * Returns: 123 * null if failed 124 */ 125 static Object factory(char[] classname) 126 { 127 auto ci = ClassInfo.find(classname); 128 if (ci) 129 { 130 return ci.create(); 131 } 132 return null; 133 } 134 118 135 interface Monitor 119 136 { … … 157 174 void* deallocator; 158 175 OffsetTypeInfo[] offTi; 159 /+160 176 void function(Object) defaultConstructor; // default Constructor 161 177 … … 193 209 return o; 194 210 } 195 +/196 211 } 197 212 … … 901 916 } 902 917 918 /+ This is in r139, not sure if it should be here 919 + class TypeInfo_Const : TypeInfo 920 + { 921 + char[] toString() { return "c





