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

Changeset 4334

Show
Ignore:
Timestamp:
02/25/09 03:20:14 (3 years ago)
Author:
larsivi
Message:

Apply workaround for GDC bug 2688 (PPC64 memcpy issue), refs #1494, thanks afb.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/net/cluster/tina/QueueFile.d

    r4179 r4334  
    2222version (Posix) 
    2323         private import tango.stdc.posix.fcntl; 
     24 
     25version (GNU) {  
     26    version (PPC64) {  
     27        extern (C) void memcpy(void*, void*, size_t); 
     28        version = PPC64_MEMCPY; /* Workaround for GDC bugzilla entry 2688 */ 
     29    } 
     30} 
    2431 
    2532/****************************************************************************** 
     
    118125 
    119126                            ++depth; 
    120                             current = tmp; 
     127                            version (PPC64_MEMCPY) { memcpy(&current, &tmp, Header.sizeof); } else { current = tmp; } 
    121128                            insert = insert + tmp.size + tmp.sizeof; 
    122129                            conduit.seek (insert); 
     
    217224                // update refs 
    218225                insert = insert + chunk.sizeof + chunk.size; 
    219                 current = chunk; 
     226                version (PPC64_MEMCPY) { memcpy(&current, &chunk, Header.sizeof); } else { current = chunk; } 
    220227                ++depth; 
    221228 
     
    257264                          conduit.error ("queue file is corrupt"); 
    258265                      else 
    259                          current = zero; 
     266                         version (PPC64_MEMCPY) { memcpy(&current, &zero, Header.sizeof); } else { current = zero; } 
    260267 
    261268                   // leave file position at insert-point