summaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/cli.c b/src/cli.c
index 66bc5b6..0ec95b1 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1,18 +1,16 @@
#include "cli.h"
-#ifdef _WIN32
-int start_interactive( bool colors, const char *host, unsigned short port, FILE *in )
-{
- fprintf( stderr, "ERROR: Not implemented on Windows!\n" );
- return EXIT_FAILURE;
-}
-
-#else
+#ifndef _WIN32
#include <strings.h>
+#endif
#include <ctype.h>
#include <stdarg.h>
+#ifndef _WIN32
#include "linenoise.h"
+#endif
+#ifndef _WIN32
#include "http_lib.h"
+#endif
#include "json-c/json.h"
#include <stdlib.h>
@@ -24,6 +22,9 @@ int start_interactive( bool colors, const char *host, unsigned short port, FILE
#include "coordinator.h"
#include "worker.h"
#include "system.h"
+
+#ifndef _WIN32
+
typedef enum {
COMMAND, // command parsing
START_WORKER, // worker command expecting a worker parameter
@@ -256,6 +257,16 @@ static void stop_worker( const char *worker_name )
}
}
+#endif
+
+#ifdef _WIN32
+int start_interactive( bool colors, const char *host, unsigned short port, FILE *in )
+{
+ fprintf( stderr, "ERROR: Not implemented on Windows!\n" );
+ return EXIT_FAILURE;
+}
+
+#else
int start_interactive( bool colors, const char *host, unsigned short port, FILE *in )
{
char history_filename[1024];