Skip to content

Commit

Permalink
fix: compiles on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
djpiper28 committed Jul 27, 2023
1 parent 4eebd32 commit a1b9632
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ endif()

if(WIN32)
set(ADDITIONAL_FLEX_FLAGS "--wincompat")
set(LIBS ${LIBS} win32)
else()
set(ADDITIONAL_FLEX_FLAGS "")
endif()
Expand Down
2 changes: 1 addition & 1 deletion mongoose
Submodule mongoose updated 39 files
+3 −3 .github/workflows/test.yml
+3 −3 Makefile
+1 −1 examples/device-dashboard/Makefile
+3 −2 examples/device-dashboard/mbedtls_config.h
+23 −22 examples/device-dashboard/net.c
+1 −1 examples/device-dashboard/net.h
+49 −694 examples/embedded-filesystem/packed_fs.c
+1 −1 examples/esp32/device-dashboard/main/CMakeLists.txt
+2 −6 examples/http-client/main.c
+2 −5 examples/http-proxy-client/main.c
+44 −8 examples/http-restful-server/main.c
+4 −6 examples/http-reverse-proxy/main.c
+13 −14 examples/http-streaming-client/main.c
+0 −2 examples/mip-tap/main.c
+5 −7 examples/mqtt-client-aws-iot/main.c
+5 −7 examples/mqtt-client/main.c
+5 −9 examples/mqtt-over-ws-client/main.c
+8 −5 examples/smtp-client/main.c
+4 −3 examples/stm32/nucleo-f746zg-make-baremetal-builtin/Makefile
+3 −2 examples/stm32/nucleo-f746zg-make-baremetal-builtin/mbedtls_config.h
+13 −5 examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile
+53 −0 examples/stm32/nucleo-h743zi-make-baremetal-builtin/mbedtls_config.h
+10 −0 examples/stm32/nucleo-h743zi-make-baremetal-builtin/syscalls.c
+44 −18 examples/tcp/main.c
+9 −9 examples/wifi-router-dashboard/net.c
+280 −118 mongoose.c
+202 −26 mongoose.h
+159 −0 src/certs.h
+0 −12 src/config.h
+6 −0 src/net.c
+1 −0 src/sock.c
+1 −0 src/tcpip/tcpip.c
+19 −8 src/tls.h
+9 −3 src/tls_dummy.c
+113 −64 src/tls_mbed.c
+14 −5 src/tls_mbed.h
+150 −51 src/tls_openssl.c
+10 −1 src/tls_openssl.h
+62 −28 test/unit_test.c
6 changes: 5 additions & 1 deletion mse/mtg_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
#include "./thread_pool.h"
#include "../testing_h/testing.h"
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <curl/curl.h>
#include <jansson.h>
#ifdef __WINDOWS
#include <io.h>
#else
#include <unistd.h>
#endif

size_t __mse_json_write_callback(char *ptr,
size_t size,
Expand Down
6 changes: 3 additions & 3 deletions mse/thread_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "./thread_pool.h"
#include "../testing_h/testing.h"

#ifdef __WIN32
#include <win32.h>
#ifdef __WINDOWS
#include <windows.h>
#endif

#ifdef __unix
Expand Down Expand Up @@ -153,7 +153,7 @@ void mse_reset_pool(mse_task_queue_t *queue)

int mse_init_pool(mse_thread_pool_t *p)
{
#ifdef __WIN32
#ifdef __WINDOWS
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
int cpus = sysinfo.dwNumberOfProcessors;
Expand Down
3 changes: 2 additions & 1 deletion web-api/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#include "./async_query.h"
#include "../testing_h/testing.h"
#include <string.h>
#include <sys/param.h>

#define MIN(a, b) (a < b ? a : b)

// Server state, this is global as there is only every one server
static mse_t *mse = NULL;
Expand Down

0 comments on commit a1b9632

Please sign in to comment.