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

Changeset 3078

Show
Ignore:
Timestamp:
01/08/08 21:04:34 (1 year ago)
Author:
sean
Message:

* Changed how -m32 is set so the lib will build on 64-bit GDC.
* Fixed a few remaining conversion issues. This change refs #845.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/common/tango/posix.mak

    r3031 r3078  
    2121ADD_DFLAGS= 
    2222 
    23 CFLAGS=-O -m32 $(ADD_CFLAGS) 
    24 #CFLAGS=-g -m32 $(ADD_CFLAGS) 
     23CFLAGS=-O $(ADD_CFLAGS) 
     24#CFLAGS=-g $(ADD_CFLAGS) 
    2525 
    2626DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS) 
  • trunk/lib/compiler/dmd/posix.mak

    r3031 r3078  
    1818MD=mkdir -p 
    1919 
    20 CFLAGS=-O -m32 $(ADD_CFLAGS) 
    21 #CFLAGS=-g -m32 $(ADD_CFLAGS) 
     20CFLAGS=-O $(ADD_CFLAGS) 
     21#CFLAGS=-g $(ADD_CFLAGS) 
    2222 
    2323DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS) 
  • trunk/lib/gc/basic/gc.d

    r3073 r3078  
    155155extern (C) GCStats gc_stats() 
    156156{ 
    157     GCStats stats
    158     _gc.getStats(stats); 
     157    GCStats stats = void
     158    _gc.getStats( stats ); 
    159159    return stats; 
    160160} 
  • trunk/lib/gc/basic/gcx.d

    r3076 r3078  
    102102 
    103103    extern (C) void onOutOfMemoryError(); 
     104 
     105    enum 
     106    { 
     107        OPFAIL = ~cast(size_t)0 
     108    } 
    104109} 
    105110 
     
    193198                    return i; 
    194199            } 
    195             return ~0u;        // not found 
     200            return OPFAIL; // not found 
    196201        } 
    197202 
     
    662667                                { 
    663668                                    auto u = pool.extendPages(pagenum + newsz - pool.ncommitted); 
    664                                     if (u == ~0u
     669                                    if (u == OPFAIL
    665670                                        break; 
    666671                                    i = pagenum + newsz; 
     
    775780        { 
    776781            auto u = pool.extendPages(minsz - sz); 
    777             if (u == ~0u
     782            if (u == OPFAIL
    778783                return 0; 
    779784            sz = minsz; 
     
    14081413    byte *maxAddr;      // max(topAddr) 
    14091414 
    1410     uint npools; 
     1415    size_t npools; 
    14111416    Pool **pooltable; 
    14121417 
     
    18281833        Pool*  pool = newPool(npages); 
    18291834 
    1830         if (!pool || pool.extendPages(npages) == ~0u
     1835        if (!pool || pool.extendPages(npages) == OPFAIL
    18311836            return 0; 
    18321837        return pool.ncommitted * PAGESIZE; 
     
    18591864                pool = pooltable[n]; 
    18601865                pn = pool.allocPages(npages); 
    1861                 if (pn != ~0u
     1866                if (pn != OPFAIL
    18621867                    goto L1; 
    18631868            } 
     
    18841889                } 
    18851890                pn = pool.allocPages(npages); 
    1886                 assert(pn != ~0u); 
     1891                assert(pn != OPFAIL); 
    18871892                goto L1; 
    18881893            case 1: 
     
    18921897                    goto Lnomemory; 
    18931898                pn = pool.allocPages(npages); 
    1894                 assert(pn != ~0u); 
     1899                assert(pn != OPFAIL); 
    18951900                goto L1; 
    18961901            case 2: 
     
    20092014            pool = pooltable[n]; 
    20102015            pn = pool.allocPages(1); 
    2011             if (pn != ~0u
     2016            if (pn != OPFAIL
    20122017                goto L1; 
    20132018        } 
     
    22532258                            continue; 
    22542259 
    2255                         pn = (o - pool.baseAddr) / PAGESIZE; 
     2260                        pn = cast(size_t)(o - pool.baseAddr) / PAGESIZE; 
    22562261                        bin = cast(Bins)pool.pagetable[pn]; 
    22572262                        if (bin < B_PAGE) 
     
    25572562 
    25582563            i = current.find(p); 
    2559             if (i == ~0u
     2564            if (i == OPFAIL
    25602565            { 
    25612566                debug(PRINTF) printf("free'ing unallocated memory %x\n", p); 
     
    25792584 
    25802585                j = prev.find(current.data[i].p); 
    2581                 if (j == ~0u
     2586                if (j == OPFAIL
    25822587                    current.data[i].print(); 
    25832588                else 
     
    25952600                { 
    25962601                    j = prev.find(current.data[i].p); 
    2597                     if (j == ~0u
     2602                    if (j == OPFAIL
    25982603                        debug(PRINTF) printf("N"); 
    25992604                    else 
     
    26162621 
    26172622            i = current.find(p); 
    2618             if (i == ~0u
     2623            if (i == OPFAIL
    26192624            { 
    26202625                debug(PRINTF) printf("parent'ing unallocated memory %x, parent = %x\n", p, parent); 
     
    27672772    /** 
    27682773     * Allocate n pages from Pool. 
    2769      * Returns ~0u on failure. 
    2770      */ 
    2771     uint allocPages(size_t n) 
     2774     * Returns OPFAIL on failure. 
     2775     */ 
     2776    size_t allocPages(size_t n) 
    27722777    { 
    27732778        size_t i; 
     
    27932798    /** 
    27942799     * Extend Pool by n pages. 
    2795      * Returns ~0u on failure. 
    2796      */ 
    2797     uint extendPages(size_t n) 
     2800     * Returns OPFAIL on failure. 
     2801     */ 
     2802    size_t extendPages(size_t n) 
    27982803    { 
    27992804        //debug(PRINTF) printf("Pool::extendPages(n = %d)\n", n); 
     
    28212826        } 
    28222827 
    2823         return ~0u
     2828        return OPFAIL
    28242829    } 
    28252830 
  • trunk/lib/gc/basic/posix.mak

    r3031 r3078  
    2121ADD_DFLAGS= 
    2222 
    23 CFLAGS=-O -m32 $(ADD_CFLAGS) 
    24 #CFLAGS=-g -m32 $(ADD_CFLAGS) 
     23CFLAGS=-O $(ADD_CFLAGS) 
     24#CFLAGS=-g $(ADD_CFLAGS) 
    2525 
    2626DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)