Mercurial > projects > ldc
diff lphobos/std/stream.d @ 662:88e23f8c2354
Applied downs' latest Phobos patch
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 06 Oct 2008 21:40:33 +0200 |
parents | 373489eeaf90 |
children |
line wrap: on
line diff
--- a/lphobos/std/stream.d Mon Oct 06 21:27:29 2008 +0200 +++ b/lphobos/std/stream.d Mon Oct 06 21:40:33 2008 +0200 @@ -1139,7 +1139,7 @@ if (count != -1) break; psize *= 2; - p = cast(char*) alloca(psize); + p = cast(char*) /*alloca*/malloc(psize); } else version (Unix) { count = vsnprintf(p, psize, f, args_copy); if (count == -1) @@ -1148,7 +1148,7 @@ psize = count + 1; else break; - p = cast(char*) alloca(psize); + p = cast(char*) /*alloca*/malloc(psize); } else throw new Exception("unsupported platform"); } @@ -1779,6 +1779,8 @@ Append = 10 // includes FileMode.Out } +version(linux) version = Unix; + version (Win32) { private import std.c.windows.windows; extern (Windows) { @@ -2232,7 +2234,8 @@ * manner with the source stream so the source stream's position and state will be * kept in sync with the EndianStream if only non-getc functions are called. */ -class EndianStream : FilterStream { +/// This causes a crash in -O2 +/+class EndianStream : FilterStream { Endian endian; /// Endianness property of the source stream. @@ -2510,6 +2513,7 @@ em.position(0); } } ++/ /*** * Parameterized subclass that wraps an array-like buffer with a stream