dav/system.c

changeset 413
241db665477a
parent 412
dc74f736aea1
child 425
ae4d89c3477c
equal deleted inserted replaced
412:dc74f736aea1 413:241db665477a
28 28
29 #include <stdio.h> 29 #include <stdio.h>
30 #include <stdlib.h> 30 #include <stdlib.h>
31 #include <string.h> 31 #include <string.h>
32 #include <dirent.h> 32 #include <dirent.h>
33 #include <sys/stat.h>
34 #include <sys/types.h>
35
36 #ifndef _WIN32
37 #include <unistd.h>
38 #endif
33 39
34 #include "system.h" 40 #include "system.h"
35 41
36 void sys_freedirent(SysDirEnt *ent) { 42 void sys_freedirent(SysDirEnt *ent) {
37 free(ent->name); 43 free(ent->name);
93 return unlink(path); 99 return unlink(path);
94 } 100 }
95 101
96 int sys_mkdir(const char *path) { 102 int sys_mkdir(const char *path) {
97 return mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); 103 return mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
104 }
98 105
99 #else 106 #else
100 /* ---------- Windows implementation ---------- */ 107 /* ---------- Windows implementation ---------- */
101 108
102 static wchar_t* path2winpath(const char *path, int dir, int *newlen) { 109 static wchar_t* path2winpath(const char *path, int dir, int *newlen) {

mercurial