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

Ticket #1494: tango-ppc64ice.diff

File tango-ppc64ice.diff, 1.7 kB (added by afb, 15 years ago)
  • tango/net/cluster/tina/QueueFile.d

    old new  
    2222version (Posix) 
    2323         private import tango.stdc.posix.fcntl; 
    2424 
     25version (GNU) { 
     26    version (PPC64) { 
     27         extern(C) void memcpy(void*, void*, size_t); 
     28         version = MEMCPY; /* work around gdc ICE */ 
     29    } 
     30} 
     31 
    2532/****************************************************************************** 
    2633         
    2734 
     
    117124                            auto content = read (tmp); 
    118125 
    119126                            ++depth; 
    120                             current = tmp; 
     127                            version(MEMCPY) { memcpy(&current, &tmp, Header.sizeof); } else { current = tmp; } 
    121128                            insert = insert + tmp.size + tmp.sizeof; 
    122129                            conduit.seek (insert); 
    123130 
     
    216223 
    217224                // update refs 
    218225                insert = insert + chunk.sizeof + chunk.size; 
    219                 current = chunk; 
     226                version(MEMCPY) { memcpy(&current, &chunk, Header.sizeof); } else { current = chunk; } 
    220227                ++depth; 
    221228 
    222229                return dirty = true; 
     
    256263                      if (current.prior) 
    257264                          conduit.error ("queue file is corrupt"); 
    258265                      else 
    259                          current = zero; 
     266                          version(MEMCPY) { memcpy(&current, &zero, Header.sizeof); } else { current = zero; } 
    260267 
    261268                   // leave file position at insert-point 
    262269                   conduit.seek (point);