comparison dmd/File.d @ 183:190ba98276b3

Several changes to make it build on posix systems. I've only tried to build on Mac OS X but it should build on Linux now as well. This should also fix ticket #9.
author Jacob Carlborg <doob@me.com>
date Mon, 25 Oct 2010 15:36:13 +0200
parents e3afd1303184
children a4c9de8e39b3
comparison
equal deleted inserted replaced
181:aa70dca07cb0 183:190ba98276b3
109 if (fstat(fd, &buf)) { 109 if (fstat(fd, &buf)) {
110 printf("\tfstat error, errno = %d\n", errno); 110 printf("\tfstat error, errno = %d\n", errno);
111 goto err2; 111 goto err2;
112 } 112 }
113 113
114 off_t size = buf.st_size; 114 size_t size = cast(size_t) buf.st_size;
115 buffer = cast(ubyte*)GC.malloc(size + 2); 115 buffer = cast(ubyte*)GC.malloc(size + 2);
116 if (buffer is null) { 116 if (buffer is null) {
117 printf("\tmalloc error, errno = %d\n", errno); 117 printf("\tmalloc error, errno = %d\n", errno);
118 goto err2; 118 goto err2;
119 } 119 }