mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Merge pull request #55 from dawid-aurobit/mingw
support for mingw (mxe.cc)
This commit is contained in:
commit
15d37ac3aa
@ -55,7 +55,7 @@ int run(int argc, char **argv)
|
||||
|
||||
// Argument 2 is the baudrate
|
||||
unsigned long baud = 0;
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
sscanf_s(argv[2], "%lu", &baud);
|
||||
#else
|
||||
sscanf(argv[2], "%lu", &baud);
|
||||
|
||||
@ -650,7 +650,7 @@ public:
|
||||
explicit IOException (std::string file, int line, int errnum)
|
||||
: file_(file), line_(line), errno_(errnum) {
|
||||
std::stringstream ss;
|
||||
#if defined(_WIN32)
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
char error_str [1024];
|
||||
strerror_s(error_str, 1024, errnum);
|
||||
#else
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
#if defined (__MINGW32__)
|
||||
# define alloca __builtin_alloca
|
||||
#endif
|
||||
|
||||
#include "serial/serial.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user