|
File tango-ppc64ice.diff, 1.7 kB
(added by afb, 15 years ago)
|
|
-
tango/net/cluster/tina/QueueFile.d
old |
new |
|
22 | 22 | version (Posix) |
---|
23 | 23 | private import tango.stdc.posix.fcntl; |
---|
24 | 24 | |
---|
| 25 | version (GNU) { |
---|
| 26 | version (PPC64) { |
---|
| 27 | extern(C) void memcpy(void*, void*, size_t); |
---|
| 28 | version = MEMCPY; /* work around gdc ICE */ |
---|
| 29 | } |
---|
| 30 | } |
---|
| 31 | |
---|
25 | 32 | /****************************************************************************** |
---|
26 | 33 | |
---|
27 | 34 | |
… | … | |
117 | 124 | auto content = read (tmp); |
---|
118 | 125 | |
---|
119 | 126 | ++depth; |
---|
120 | | current = tmp; |
---|
| 127 | version(MEMCPY) { memcpy(¤t, &tmp, Header.sizeof); } else { current = tmp; } |
---|
121 | 128 | insert = insert + tmp.size + tmp.sizeof; |
---|
122 | 129 | conduit.seek (insert); |
---|
123 | 130 | |
… | … | |
216 | 223 | |
---|
217 | 224 | // update refs |
---|
218 | 225 | insert = insert + chunk.sizeof + chunk.size; |
---|
219 | | current = chunk; |
---|
| 226 | version(MEMCPY) { memcpy(¤t, &chunk, Header.sizeof); } else { current = chunk; } |
---|
220 | 227 | ++depth; |
---|
221 | 228 | |
---|
222 | 229 | return dirty = true; |
… | … | |
256 | 263 | if (current.prior) |
---|
257 | 264 | conduit.error ("queue file is corrupt"); |
---|
258 | 265 | else |
---|
259 | | current = zero; |
---|
| 266 | version(MEMCPY) { memcpy(¤t, &zero, Header.sizeof); } else { current = zero; } |
---|
260 | 267 | |
---|
261 | 268 | // leave file position at insert-point |
---|
262 | 269 | conduit.seek (point); |
Download in other formats:
|
|
|
|
|
Copyright © 2006-2024 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic