diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2015-05-25 17:55:41 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2015-05-25 17:55:41 +0200 |
commit | 66079abd1083a00f165b8fc62eec885f872b903c (patch) | |
tree | 59ea7cba7e00a5c8e793a8e870961b922a900ea8 /src/cli.c | |
parent | 1c0c08414529cc10c45cd34a1a5188970c98a892 (diff) | |
download | biruda-66079abd1083a00f165b8fc62eec885f872b903c.tar.gz biruda-66079abd1083a00f165b8fc62eec885f872b903c.tar.bz2 |
various fixes on Windows
Diffstat (limited to 'src/cli.c')
-rw-r--r-- | src/cli.c | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -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]; |