dav/system.h

changeset 411
a182e503617b
parent 410
0b9bea2d7283
child 412
dc74f736aea1
--- a/dav/system.h	Fri Jun 08 19:58:17 2018 +0200
+++ b/dav/system.h	Sun Jun 10 12:35:00 2018 +0200
@@ -37,17 +37,6 @@
 
 #ifdef _WIN32
 #include <Windows.h>
-struct WinDir {
-    int first;
-    HANDLE handle;
-    WIN32_FIND_DATAW finddata;
-};
-#define SYS_DIR struct WinDir*
-#define SYS_STAT struct __stat64
-
-#else
-#define SYS_DIR DIR*
-#define SYS_STAT struct stat
 #endif
 
 #ifdef __cplusplus
@@ -57,6 +46,27 @@
 typedef struct SysDirEnt {
     char *name;
 } SysDirEnt;
+    
+#ifdef _WIN32
+struct WinDir {
+    int first;
+    HANDLE handle;
+    WIN32_FIND_DATAW finddata;
+    SysDirEnt *ent;
+};
+#define SYS_DIR struct WinDir*
+#define SYS_STAT struct __stat64
+
+#else
+
+typedef struct SysDir {
+    DIR *dir;
+    SysDirEnt *ent;
+} SysDir;
+
+#define SYS_DIR SysDir*
+#define SYS_STAT struct stat
+#endif
 
 void sys_freedirent(SysDirEnt *ent);
 SYS_DIR sys_opendir(const char *path);
@@ -67,6 +77,8 @@
 
 int sys_stat(const char *path, SYS_STAT *s);
 
+int sys_rename(const char *oldpath, const char *newpath);
+
 #ifdef __cplusplus
 }
 #endif

mercurial