Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2502

Show
Ignore:
Timestamp:
08/26/07 04:22:40 (1 year ago)
Author:
Gregor
Message:

*: Upgraded to GDC 0.24

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dsss.conf

    r2465 r2502  
    2222 
    2323[tango/io] 
     24version (GNU) { 
     25    exclude = tango/io/compress/Zlib.d 
     26} 
    2427 
    2528[tango/math] 
    2629 
    2730[tango/net] 
    28 version (GNU) { 
    29     exclude = tango/net/cluster 
    30 } 
    3131 
    3232[tango/stdc] 
  • trunk/lib/common/tango/core/Thread.d

    r2477 r2502  
    926926                if( !set ) 
    927927                { 
    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 ) 
    929930                    { 
    930931                        t.m_local[key] = null; 
     
    953954        { 
    954955            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 ) 
    956958            { 
    957959                t.m_local[key] = null; 
  • trunk/lib/compiler/gdc/Makefile.am

    r2465 r2502  
    8181    critical.o \ 
    8282    dgccmain2.o \ 
     83    gcc/builtins.o \ 
    8384    genobj.o \ 
    8485    invariant.o \ 
  • trunk/lib/compiler/gdc/Makefile.in

    r2030 r2502  
    119119DCFG_FWIDE = @DCFG_FWIDE@ 
    120120DCFG_GETPWNAM_R = @DCFG_GETPWNAM_R@ 
     121DCFG_HAVE_FGETLINE = @DCFG_HAVE_FGETLINE@ 
     122DCFG_HAVE_FGETLN = @DCFG_HAVE_FGETLN@ 
     123DCFG_HAVE_GETDELIM = @DCFG_HAVE_GETDELIM@ 
     124DCFG_HAVE_UNLOCKED_STDIO = @DCFG_HAVE_UNLOCKED_STDIO@ 
     125DCFG_HAVE_UNLOCKED_WIDE_STDIO = @DCFG_HAVE_UNLOCKED_WIDE_STDIO@ 
    121126DCFG_MMAP = @DCFG_MMAP@ 
    122127DCFG_NAN = @DCFG_NAN@ 
     
    253258    critical.o \ 
    254259    dgccmain2.o \ 
     260    gcc/builtins.o \ 
    255261    genobj.o \ 
    256262    invariant.o \ 
  • trunk/lib/compiler/gdc/aaA.d

    r1617 r2502  
    102102{ 
    103103    BB* a; 
    104     version (X86_64) 
    105     { 
    106     } 
    107     else 
    108     { 
    109         // This is here only to retain binary compatibility with the 
    110         // old way we did AA's. Should eventually be removed. 
    111         //int reserved; 
    112     } 
    113104} 
    114105 
     
    763754    return result; 
    764755} 
     756 
     757 
     758/*********************************** 
     759 * Construct an associative array of type ti from 
     760 * length pairs of key/value pairs. 
     761 */ 
     762 
     763extern (C) 
     764BB* _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  
    126126        memmove(lo + stridehi, lo + stridelo , (hi - lo) - stridelo); 
    127127            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); 
    129129 
    130130            lo += stridehi; 
    131             hi = hi - 1 + (stridehi - stridelo); 
     131       hi = hi - 1 + (cast(int) stridehi - cast(int) stridelo); 
    132132        } 
    133133    } 
     
    218218             */ 
    219219            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); 
    221221            memmove(lo + stridehi, lo + stridelo , (hi - (lo + stridelo)) * wchar.sizeof); 
    222222            memcpy(lo, tmp.ptr, stridehi * wchar.sizeof); 
    223223 
    224224            lo += stridehi; 
    225             hi = hi - 1 + (stridehi - stridelo); 
     225       hi = hi - 1 + (cast(int) stridehi - cast(int) stridelo); 
    226226        } 
    227227    } 
  • trunk/lib/compiler/gdc/config.h.in

    r1857 r2502  
    77#undef HAVE_EXP2 
    88 
     9/* Define to 1 if you have the `flockfile' function. */ 
     10#undef HAVE_FLOCKFILE 
     11 
    912/* Define to 1 fpclassify and signbit are available */ 
    1013#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 
    1123 
    1224/* Define to 1 if you have the <inttypes.h> header file. */ 
     
    4557/* Define to 1 if the system has the type `pthread_spinlock_t'. */ 
    4658#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 
    4765 
    4866/* 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 alias 
    2 // to the __builtin_ version.  This may not do the right thing (TODO) 
    3  
    4 // GCC 3.3 doesn't have some of these builtins 
    5 // 
    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 step 
    78 } 
  • trunk/lib/compiler/gdc/config/noldfuncs33

    r454 r2502  
    1 // If long double functions are present, just alias 
    2 // to the __builtin_ version.  This may not do the right thing (TODO) 
    3  
    4 // GCC 3.3 doesn't have some of these builtins 
    5 // 
    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 int 
    70 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 int 
    99 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 int 
    105 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 step 
    135 } 
  • trunk/lib/compiler/gdc/config/unix-mid

    r1856 r2502  
    293293    int creat(char*, mode_t); 
    294294    char* ctermid(char*); 
    295     int dirfd(DIR*); 
    296295    char* dirname(char*); 
    297296    int fattach(int, char*); 
     
    301300    int fmtmsg(int, char*, int, char*, char*, char*); 
    302301    int fpathconf(int, int); 
    303     int fseeko(FILE*, off_t, int); 
    304     off_t ftello(FILE*); 
    305302 
    306303    extern char** environ; 
  • trunk/lib/compiler/gdc/configure

    r2360 r2502  
    714714DCFG_SPAWNVP 
    715715DCFG_FWIDE 
     716DCFG_HAVE_GETDELIM 
     717DCFG_HAVE_FGETLN 
     718DCFG_HAVE_FGETLINE 
     719DCFG_HAVE_UNLOCKED_STDIO 
     720DCFG_HAVE_UNLOCKED_WIDE_STDIO 
    716721DCFG_STRTOLD 
    717722DCFG_CBRIDGE_STDIO 
     
    40314036{ echo "$as_me:$LINENO: result: $d_gcc_ver" >&5 
    40324037echo "${ECHO_T}$d_gcc_ver" >&6; } 
    4033 if echo "$d_gcc_ver" | grep '^3.3' > /dev/null; then 
    4034   d_gcc_33=33 
    4035 fi 
    40364038 
    40374039 
     
    52275229 
    52285230case "$target_os" in 
    5229   darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs$d_gcc_33 ;; 
     5231  darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs ;; 
    52305232  darwin*)  DCFG_LONG_DOUBLE_FUNCS=config/ldfuncs-darwin ;; 
    52315233  linux*) 
     
    55085510    DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs 
    55095511    fi 
    5510     DCFG_LONG_DOUBLE_FUNCS="$DCFG_LONG_DOUBLE_FUNCS$d_gcc_33
     5512    DCFG_LONG_DOUBLE_FUNCS="$DCFG_LONG_DOUBLE_FUNCS
    55115513fi 
    55125514 
     
    65146516echo "${ECHO_T}$ac_cv_func_fwide" >&6; } 
    65156517if test $ac_cv_func_fwide = yes; then 
    6516   DCFG_FWIDE="GNU_Have_fwide" 
    6517 else 
    6518   DCFG_FWIDE="" 
    6519 fi 
     6518  DCFG_FWIDE=1 
     6519else 
     6520  DCFG_FWIDE=0 
     6521fi 
     6522 
     6523 
     6524 
     6525{ echo "$as_me:$LINENO: checking for getdelim" >&5 
     6526echo $ECHO_N "checking for getdelim... $ECHO_C" >&6; } 
     6527if test "${ac_cv_func_getdelim+set}" = set; then 
     6528  echo $ECHO_N "(cached) $ECHO_C" >&6 
     6529else 
     6530  cat >conftest.$ac_ext <<_ACEOF 
     6531/* confdefs.h.  */ 
     6532_ACEOF 
     6533cat confdefs.h >>conftest.$ac_ext 
     6534cat >>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 
     6557extern "C" 
     6558#endif 
     6559char 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 
     6564choke me 
     6565#endif 
     6566 
     6567int 
     6568main () 
     6569
     6570return getdelim (); 
     6571  ; 
     6572  return 0; 
     6573
     6574_ACEOF 
     6575rm -f conftest.$ac_objext conftest$ac_exeext 
     6576if { (ac_try="$ac_link" 
     6577case "(($ac_try" in 
     6578  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     6579  *) ac_try_echo=$ac_try;; 
     6580esac 
     6581eval "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 
     6594else 
     6595  echo "$as_me: failed program was:" >&5 
     6596sed 's/^/| /' conftest.$ac_ext >&5 
     6597 
     6598    ac_cv_func_getdelim=no 
     6599fi 
     6600 
     6601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     6602      conftest$ac_exeext conftest.$ac_ext 
     6603fi 
     6604{ echo "$as_me:$LINENO: result: $ac_cv_func_getdelim" >&5 
     6605echo "${ECHO_T}$ac_cv_func_getdelim" >&6; } 
     6606if test $ac_cv_func_getdelim = yes; then 
     6607  DCFG_HAVE_GETDELIM=1 
     6608else 
     6609  DCFG_HAVE_GETDELIM=0 
     6610fi 
     6611 
     6612 
     6613 
     6614{ echo "$as_me:$LINENO: checking for fgetln" >&5 
     6615echo $ECHO_N "checking for fgetln... $ECHO_C" >&6; } 
     6616if test "${ac_cv_func_fgetln+set}" = set; then 
     6617  echo $ECHO_N "(cached) $ECHO_C" >&6 
     6618else 
     6619  cat >conftest.$ac_ext <<_ACEOF 
     6620/* confdefs.h.  */ 
     6621_ACEOF 
     6622cat confdefs.h >>conftest.$ac_ext 
     6623cat >>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 
     6646extern "C" 
     6647#endif 
     6648char 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 
     6653choke me 
     6654#endif 
     6655 
     6656int 
     6657main () 
     6658
     6659return fgetln (); 
     6660  ; 
     6661  return 0; 
     6662
     6663_ACEOF 
     6664rm -f conftest.$ac_objext conftest$ac_exeext 
     6665if { (ac_try="$ac_link" 
     6666case "(($ac_try" in 
     6667  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     6668  *) ac_try_echo=$ac_try;; 
     6669esac 
     6670eval "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 
     6683else 
     6684  echo "$as_me: failed program was:" >&5 
     6685sed 's/^/| /' conftest.$ac_ext >&5 
     6686 
     6687    ac_cv_func_fgetln=no 
     6688fi 
     6689 
     6690rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     6691      conftest$ac_exeext conftest.$ac_ext 
     6692fi 
     6693{ echo "$as_me:$LINENO: result: $ac_cv_func_fgetln" >&5 
     6694echo "${ECHO_T}$ac_cv_func_fgetln" >&6; } 
     6695if test $ac_cv_func_fgetln = yes; then 
     6696  DCFG_HAVE_FGETLN=1 
     6697else 
     6698  DCFG_HAVE_FGETLN=0 
     6699fi 
     6700 
     6701 
     6702 
     6703{ echo "$as_me:$LINENO: checking for fgetline" >&5 
     6704echo $ECHO_N "checking for fgetline... $ECHO_C" >&6; } 
     6705if test "${ac_cv_func_fgetline+set}" = set; then 
     6706  echo $ECHO_N "(cached) $ECHO_C" >&6 
     6707else 
     6708  cat >conftest.$ac_ext <<_ACEOF 
     6709/* confdefs.h.  */ 
     6710_ACEOF 
     6711cat confdefs.h >>conftest.$ac_ext 
     6712cat >>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 
     6735extern "C" 
     6736#endif 
     6737char 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 
     6742choke me 
     6743#endif 
     6744 
     6745int 
     6746main () 
     6747
     6748return fgetline (); 
     6749  ; 
     6750  return 0; 
     6751
     6752_ACEOF 
     6753rm -f conftest.$ac_objext conftest$ac_exeext 
     6754if { (ac_try="$ac_link" 
     6755case "(($ac_try" in 
     6756  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     6757  *) ac_try_echo=$ac_try;; 
     6758esac 
     6759eval "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 
     6772else 
     6773  echo "$as_me: failed program was:" >&5 
     6774sed 's/^/| /' conftest.$ac_ext >&5 
     6775 
     6776    ac_cv_func_fgetline=no 
     6777fi 
     6778 
     6779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     6780      conftest$ac_exeext conftest.$ac_ext 
     6781fi 
     6782{ echo "$as_me:$LINENO: result: $ac_cv_func_fgetline" >&5 
     6783echo "${ECHO_T}$ac_cv_func_fgetline" >&6; } 
     6784if test $ac_cv_func_fgetline = yes; then 
     6785  DCFG_HAVE_FGETLINE=1 
     6786else 
     6787  DCFG_HAVE_FGETLINE=0 
     6788fi 
     6789 
     6790 
     6791 
     6792DCFG_HAVE_UNLOCKED_STDIO=1 
     6793 
     6794 
     6795 
     6796 
     6797for ac_func in flockfile funlockfile putc_unlocked getc_unlocked 
     6798do 
     6799as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 
     6800{ echo "$as_me:$LINENO: checking for $ac_func" >&5 
     6801echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 
     6802if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 
     6803  echo $ECHO_N "(cached) $ECHO_C" >&6 
     6804else 
     6805  cat >conftest.$ac_ext <<_ACEOF 
     6806/* confdefs.h.  */ 
     6807_ACEOF 
     6808cat confdefs.h >>conftest.$ac_ext 
     6809cat >>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 
     6832extern "C" 
     6833#endif 
     6834char $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 
     6839choke me 
     6840#endif 
     6841 
     6842int 
     6843main () 
     6844
     6845return $ac_func (); 
     6846  ; 
     6847  return 0; 
     6848
     6849_ACEOF 
     6850rm -f conftest.$ac_objext conftest$ac_exeext 
     6851if { (ac_try="$ac_link" 
     6852case "(($ac_try" in 
     6853  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     6854  *) ac_try_echo=$ac_try;; 
     6855esac 
     6856eval "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" 
     6869else 
     6870  echo "$as_me: failed program was:" >&5 
     6871sed 's/^/| /' conftest.$ac_ext >&5 
     6872 
     6873    eval "$as_ac_var=no" 
     6874fi 
     6875 
     6876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     6877      conftest$ac_exeext conftest.$ac_ext 
     6878fi 
     6879ac_res=`eval echo '${'$as_ac_var'}'` 
     6880           { echo "$as_me:$LINENO: result: $ac_res" >&5 
     6881echo "${ECHO_T}$ac_res" >&6; } 
     6882if 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 
     6887else 
     6888  DCFG_HAVE_UNLOCKED_STDIO=0 
     6889fi 
     6890done 
     6891 
     6892 
     6893 
     6894DCFG_HAVE_UNLOCKED_WIDE_STDIO=$DCFG_HAVE_UNLOCKED_STDIO 
     6895 
     6896 
     6897for ac_func in putwc_unlocked getwc_unlocked 
     6898do 
     6899as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 
     6900{ echo "$as_me:$LINENO: checking for $ac_func" >&5 
     6901echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 
     6902if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 
     6903  echo $ECHO_N "(cached) $ECHO_C" >&6 
     6904else 
     6905  cat >conftest.$ac_ext <<_ACEOF 
     6906/* confdefs.h.  */ 
     6907_ACEOF 
     6908cat confdefs.h >>conftest.$ac_ext 
     6909cat >>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 
     6932extern "C" 
     6933#endif 
     6934char $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 
     6939choke me 
     6940#endif 
     6941 
     6942int 
     6943main () 
     6944
     6945return $ac_func (); 
     6946  ; 
     6947  return 0; 
     6948
     6949_ACEOF 
     6950rm -f conftest.$ac_objext conftest$ac_exeext 
     6951if { (ac_try="$ac_link" 
     6952case "(($ac_try" in 
     6953  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     6954  *) ac_try_echo=$ac_try;; 
     6955esac 
     6956eval "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" 
     6969else 
     6970  echo "$as_me: failed program was:" >&5 
     6971sed 's/^/| /' conftest.$ac_ext >&5 
     6972 
     6973    eval "$as_ac_var=no" 
     6974fi 
     6975 
     6976rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     6977      conftest$ac_exeext conftest.$ac_ext 
     6978fi 
     6979ac_res=`eval echo '${'$as_ac_var'}'` 
     6980           { echo "$as_me:$LINENO: result: $ac_res" >&5 
     6981echo "${ECHO_T}$ac_res" >&6; } 
     6982if 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 
     6987else 
     6988  DCFG_HAVE_UNLOCKED_WIDE_STDIO=0 
     6989fi 
     6990done 
    65206991 
    65216992 
     
    1003010501DCFG_SPAWNVP!$DCFG_SPAWNVP$ac_delim 
    1003110502DCFG_FWIDE!$DCFG_FWIDE$ac_delim 
     10503DCFG_HAVE_GETDELIM!$DCFG_HAVE_GETDELIM$ac_delim 
     10504DCFG_HAVE_FGETLN!$DCFG_HAVE_FGETLN$ac_delim 
     10505DCFG_HAVE_FGETLINE!$DCFG_HAVE_FGETLINE$ac_delim 
     10506DCFG_HAVE_UNLOCKED_STDIO!$DCFG_HAVE_UNLOCKED_STDIO$ac_delim 
     10507DCFG_HAVE_UNLOCKED_WIDE_STDIO!$DCFG_HAVE_UNLOCKED_WIDE_STDIO$ac_delim 
    1003210508DCFG_STRTOLD!$DCFG_STRTOLD$ac_delim 
    1003310509DCFG_CBRIDGE_STDIO!$DCFG_CBRIDGE_STDIO$ac_delim 
     
    1004910525_ACEOF 
    1005010526 
    10051   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 26; then 
     10527  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 31; then 
    1005210528    break 
    1005310529  elif $ac_last_try; then 
  • trunk/lib/compiler/gdc/configure.in

    r2465 r2502  
    190190d_gcc_ver=`$GDC -dumpversion` 
    191191AC_MSG_RESULT($d_gcc_ver) 
    192 if echo "$d_gcc_ver" | grep '^3.3' > /dev/null; then 
    193   d_gcc_33=33 
    194 fi 
    195192 
    196193dnl Eventually need to include everything from libstdc++-v3/acinclude.m4 
     
    260257 
    261258case "$target_os" in 
    262   darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs$d_gcc_33 ;; 
     259  darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs ;; 
    263260  darwin*)  DCFG_LONG_DOUBLE_FUNCS=config/ldfuncs-darwin ;; 
    264261  linux*) 
     
    283280    DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs 
    284281    fi 
    285     DCFG_LONG_DOUBLE_FUNCS="$DCFG_LONG_DOUBLE_FUNCS$d_gcc_33
     282    DCFG_LONG_DOUBLE_FUNCS="$DCFG_LONG_DOUBLE_FUNCS
    286283fi 
    287284 
     
    377374AC_SUBST(DCFG_SPAWNVP) 
    378375 
    379 AC_CHECK_FUNC(fwide,DCFG_FWIDE="GNU_Have_fwide",DCFG_FWIDE=""
     376AC_CHECK_FUNC(fwide,[DCFG_FWIDE=1],[DCFG_FWIDE=0]
    380377AC_SUBST(DCFG_FWIDE) 
     378 
     379AC_CHECK_FUNC(getdelim,[DCFG_HAVE_GETDELIM=1],[DCFG_HAVE_GETDELIM=0]) 
     380AC_SUBST(DCFG_HAVE_GETDELIM) 
     381 
     382AC_CHECK_FUNC(fgetln,[DCFG_HAVE_FGETLN=1],[DCFG_HAVE_FGETLN=0]) 
     383AC_SUBST(DCFG_HAVE_FGETLN) 
     384 
     385AC_CHECK_FUNC(fgetline,[DCFG_HAVE_FGETLINE=1],[DCFG_HAVE_FGETLINE=0]) 
     386AC_SUBST(DCFG_HAVE_FGETLINE) 
     387 
     388DCFG_HAVE_UNLOCKED_STDIO=1 
     389AC_CHECK_FUNCS([flockfile funlockfile putc_unlocked getc_unlocked], 
     390    [],[DCFG_HAVE_UNLOCKED_STDIO=0]) 
     391AC_SUBST(DCFG_HAVE_UNLOCKED_STDIO) 
     392 
     393DCFG_HAVE_UNLOCKED_WIDE_STDIO=$DCFG_HAVE_UNLOCKED_STDIO 
     394AC_CHECK_FUNCS([putwc_unlocked getwc_unlocked], [],[DCFG_HAVE_UNLOCKED_WIDE_STDIO=0]) 
     395AC_SUBST(DCFG_HAVE_UNLOCKED_WIDE_STDIO) 
    381396 
    382397AC_CHECK_FUNC(strtold,DCFG_STRTOLD="GNU_Have_strtold",DCFG_STRTOLD="") 
  • trunk/lib/compiler/gdc/frag-ac.in

    r454 r2502  
    55@DCFG_SQRTF@ 
    66 
     7//   C stdio config for std.stdio 
     8const bool Have_fwide = @DCFG_FWIDE@; 
     9const bool Have_getdelim = @DCFG_HAVE_GETDELIM@; 
     10const bool Have_fgetln = @DCFG_HAVE_FGETLN@; 
     11const bool Have_fgetline = @DCFG_HAVE_FGETLINE@; 
     12const bool Have_Unlocked_Stdio = @DCFG_HAVE_UNLOCKED_STDIO@; 
     13const bool Have_Unlocked_Wide_Stdio = @DCFG_HAVE_UNLOCKED_WIDE_STDIO@; 
     14 
    715// ...frags-ac.in 
  • trunk/lib/compiler/gdc/genobj.d

    r2465 r2502  
    116116    } 
    117117 
     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 
    118135    interface Monitor 
    119136    { 
     
    157174    void*       deallocator; 
    158175    OffsetTypeInfo[] offTi; 
    159 /+ 
    160176    void function(Object) defaultConstructor;   // default Constructor 
    161177 
     
    193209        return o; 
    194210    } 
    195 +/ 
    196211} 
    197212 
     
    901916} 
    902917 
     918/+ This is in r139, not sure if it should be here 
     919+ class TypeInfo_Const : TypeInfo 
     920+ { 
     921+     char[] toString() { return "c