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

Comparing Urlader/urlib.c (file contents):
Revision 1.4 by root, Sat Jan 7 19:30:05 2012 UTC vs.
Revision 1.5 by root, Mon Jan 9 14:13:54 2012 UTC

21 21
22 #define u_setenv(name,value) SetEnvironmentVariable (name, value) 22 #define u_setenv(name,value) SetEnvironmentVariable (name, value)
23 #define u_mkdir(path) !CreateDirectory (path, NULL) 23 #define u_mkdir(path) !CreateDirectory (path, NULL)
24 #define u_chdir(path) !SetCurrentDirectory (path) 24 #define u_chdir(path) !SetCurrentDirectory (path)
25 #define u_rename(fr,to) !MoveFile (fr, to) 25 #define u_rename(fr,to) !MoveFile (fr, to)
26 #define u_open(path) CreateFile (path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL) 26 #define u_open(path) CreateFile (path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL)
27 #define u_creat(path,exec) CreateFile (path, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL) 27 #define u_creat(path,exec) CreateFile (path, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL)
28 #define u_creat(path,exec) CreateFile (path, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL) 28 #define u_creat(path,exec) CreateFile (path, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL)
29 #define u_close(handle) CloseHandle (handle) 29 #define u_close(handle) CloseHandle (handle)
30 #define u_append(path,add) PathAppend (path, add) 30 #define u_append(path,add) PathAppend (path, add)
31 #define u_write(handle,data,len) (WriteFile (handle, data, len, &dword, 0) ? dword : -1) 31 #define u_write(handle,data,len) (WriteFile (handle, data, len, &dword, 0) ? dword : -1)
32 32
33 #define u_fsync(handle) FlushFileBuffers (handle) 33 #define u_fsync(handle) FlushFileBuffers (handle)
34 #define u_sync() 34 #define u_sync()
35 35
36 #define u_lockfile(path) CreateFile (path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL) 36 #define u_lockfile(path) CreateFile (path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)
37 #define u_cloexec(handle) 37 #define u_cloexec(handle)
38 38
39#else 39#else
40 40
41 #define _GNU_SOURCE 1 41 #define _GNU_SOURCE 1

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines