Commit 3fb246237df40e25ed9e1c24a34c0779778e79e6
1 parent
e6349372
Fix compilation issue with Microsoft Visual Studio 2008
Reported by Allan Cornet.
Showing
9 changed files
with
35 additions
and
4 deletions
README.rst
| ... | ... | @@ -26,6 +26,9 @@ Installation |
| 26 | 26 | |
| 27 | 27 | The shell commands are ``./autogen.sh; ./configure; make; make install``. |
| 28 | 28 | |
| 29 | +If you want to compile with Microsoft Visual Studio, you need to install | |
| 30 | +http://code.google.com/p/msinttypes/ to fill the absence of stdint.h. | |
| 31 | + | |
| 29 | 32 | Testing |
| 30 | 33 | ------- |
| 31 | 34 | ... | ... |
src/modbus-data.c
src/modbus-private.h
| ... | ... | @@ -18,11 +18,16 @@ |
| 18 | 18 | #ifndef _MODBUS_PRIVATE_H_ |
| 19 | 19 | #define _MODBUS_PRIVATE_H_ |
| 20 | 20 | |
| 21 | -#include <sys/time.h> | |
| 21 | +#ifndef _MSC_VER | |
| 22 | +# include <stdint.h> | |
| 23 | +# include <sys/time.h> | |
| 24 | +#else | |
| 25 | +# include "stdint.h" | |
| 26 | +# include <time.h> | |
| 27 | +#endif | |
| 22 | 28 | #include <sys/types.h> |
| 23 | -#include <stdint.h> | |
| 24 | - | |
| 25 | 29 | #include <config.h> |
| 30 | + | |
| 26 | 31 | #include "modbus.h" |
| 27 | 32 | |
| 28 | 33 | MODBUS_BEGIN_DECLS | ... | ... |
src/modbus-rtu-private.h
src/modbus-rtu.c
src/modbus-tcp.c
src/modbus.c
src/modbus.h
tests/unit-test.h