removes win32 support for dav edit feature/dav-edit

Sat, 28 Mar 2020 17:15:47 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 28 Mar 2020 17:15:47 +0100
branch
feature/dav-edit
changeset 715
f4da6141e233
parent 714
10a5d6ce0906
child 716
5c2e4da00b04

removes win32 support for dav edit

dav/main.c file | annotate | diff | comparison | revisions
--- a/dav/main.c	Sat Mar 28 17:07:10 2020 +0100
+++ b/dav/main.c	Sat Mar 28 17:15:47 2020 +0100
@@ -35,7 +35,9 @@
 #include <unistd.h>
 #include <time.h>
 #include <sys/types.h>
+#ifndef _WIN32
 #include <sys/wait.h>
+#endif
 #include <ucx/string.h>
 #include <ucx/utils.h>
 #include <dirent.h>
@@ -1165,6 +1167,10 @@
 }
 
 int cmd_edit(CmdArgs *a) {
+#ifdef _WIN32
+    fprintf(stderr, "This feature is not supported on your platform.\n");
+    return -1;
+#else
     if(a->argc != 1) {
         fprintf(stderr, "Too %s arguments\n", a->argc < 1 ? "few":"many");
         fprintf(stderr, "Usage: dav %s\n", find_usage_str("edit"));
@@ -1263,7 +1269,6 @@
     char* viargs[3] = {editor, outfile, NULL};
 
     int ret = 0;
-    // TODO: solution for windows
     pid_t pid = fork();
     if(pid < 0) {
         perror("Cannot create process for editor");
@@ -1315,6 +1320,7 @@
     free(path);
     
     return ret;
+#endif
 }
 
 int get_resource(Repository *repo, GetResource *getres, CmdArgs *a, void *unused) {

mercurial