ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Urlader/urlib.c
(Generate patch)

Comparing Urlader/urlib.c (file contents):
Revision 1.3 by root, Fri Jan 6 07:56:36 2012 UTC vs.
Revision 1.4 by root, Sat Jan 7 19:30:05 2012 UTC

114 114
115 if (!size) 115 if (!size)
116 return 0; 116 return 0;
117 117
118#ifdef _WIN32 118#ifdef _WIN32
119 {
119 HANDLE handle = CreateFileMapping (0, 0, PAGE_READWRITE, 0, size, NULL); 120 HANDLE handle = CreateFileMapping (0, 0, PAGE_READWRITE, 0, size, NULL);
120 121
121 addr = 0; 122 addr = 0;
122 if (handle) 123 if (handle)
123 { 124 {
124 addr = MapViewOfFile (handle, FILE_MAP_WRITE, 0, 0, size); 125 addr = MapViewOfFile (handle, FILE_MAP_WRITE, 0, 0, size);
125 CloseHandle (handle); 126 CloseHandle (handle);
126 } 127 }
128 }
127#elif defined (MAP_ANONYMOUS) 129#elif defined (MAP_ANONYMOUS)
128 addr = mmap (0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); 130 addr = mmap (0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
129 131
130 if (addr == (void *)-1) 132 if (addr == (void *)-1)
131 addr = 0; 133 addr = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines