diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6b30967..2cf6d73 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,22 +1,26 @@ +// See https://go.microsoft.com/fwlink/?LinkId=733558 +// for the documentation about the tasks.json format { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { + "label": "msvc build", "type": "shell", - "label": "Make Debug", - "command": "make", + "command": "cl.exe", "args": [ - "Debug" - ], - "problemMatcher": [ - "$gcc" + "/favor:AMD64", + "/c", + "/I ${workspaceFolder}/src/include", + "${file}" ], "group": { "kind": "build", "isDefault": true - } + }, + "presentation": { + "reveal": "always" + }, + "problemMatcher": "$msCompile" } ] -} \ No newline at end of file + } \ No newline at end of file diff --git a/src/include/lib3270-internals.h b/src/include/lib3270-internals.h index e430be1..d76aaf1 100644 --- a/src/include/lib3270-internals.h +++ b/src/include/lib3270-internals.h @@ -105,16 +105,25 @@ #endif +#if defined(_WIN32) || defined(_MSC_VER) + + #include + #include + +#else + + #include /* Unix system calls */ + #include /* System time-related data types */ + +#endif // _WIN32 /* * Prerequisite #includes. */ #include /* Unix standard I/O library */ -#include /* Unix system calls */ #include /* Character classes */ #include /* String manipulations */ #include /* Basic system data types */ -#include /* System time-related data types */ #include /* C library time functions */ #include "localdefs.h" /* {s,tcl,c}3270-specific defines */ @@ -291,7 +300,7 @@ struct lib3270_text */ typedef struct timeout { - LIB3270_LINKED_LIST_HEAD; + LIB3270_LINKED_LIST_HEAD unsigned char in_play; @@ -313,7 +322,7 @@ typedef struct timeout */ typedef struct _input_t { - LIB3270_LINKED_LIST_HEAD; + LIB3270_LINKED_LIST_HEAD unsigned char enabled; int fd; @@ -325,14 +334,14 @@ typedef struct _input_t struct lib3270_state_callback { - LIB3270_LINKED_LIST_HEAD; + LIB3270_LINKED_LIST_HEAD void (*func)(H3270 *, int, void *); /**< @brief Function to call */ }; struct lib3270_toggle_callback { - LIB3270_LINKED_LIST_HEAD; + LIB3270_LINKED_LIST_HEAD void (*func)(H3270 *, LIB3270_TOGGLE_ID, char, void *); /**< @brief Function to call */ }; diff --git a/src/include/lib3270/session.h b/src/include/lib3270/session.h index 4717bea..676e77f 100644 --- a/src/include/lib3270/session.h +++ b/src/include/lib3270/session.h @@ -31,13 +31,13 @@ #define LIB3270_SESSION_H_INCLUDED 1 - #ifdef WIN32 + #if defined(_WIN32) || defined(_MSC_VER) #include #include #include #else #include - #endif // WIN32 + #endif // _WIN32 #ifdef HAVE_LIBSSL #include -- libgit2 0.21.2