tm3d
/
owTools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Works now with Windows Visual Studio C++ too
[owTools.git]
/
src
/
owInterface.h
diff --git
a/src/owInterface.h
b/src/owInterface.h
index
952f3dc
..
0370d03
100755
(executable)
--- a/
src/owInterface.h
+++ b/
src/owInterface.h
@@
-34,12
+34,28
@@
#ifndef __OWINTERFACES_H_
#define __OWINTERFACES_H_
#ifndef __OWINTERFACES_H_
#define __OWINTERFACES_H_
+#if defined(WIN) || defined(LINUX)
+#else
+#if defined(_WINDOWS) || defined(__WINDOWS__) || defined(_WIN32) || defined(WIN32)
+#define WIN
+#else
+#define LINUX
+#endif
+#endif
+
+
#include <vector>
#include <stdint.h>
#include <string>
#include <vector>
#include <stdint.h>
#include <string>
+#ifdef LINUX
#include <termios.h>
#include <termios.h>
+#endif
#include <stdarg.h>
#include <stdarg.h>
+#ifdef WIN
+#include <Windows.h>
+
+#endif
class owDevice;
class owDeviceConfig;
class owDevice;
class owDeviceConfig;
@@
-48,7
+64,7
@@
class owDeviceConfig;
#if defined(_WINDOWS) || defined(__WINDOWS__) || defined(_WIN32) || defined(WIN32)
#define USE_WINDOWS_TIME 1
#include <windows.h>
#if defined(_WINDOWS) || defined(__WINDOWS__) || defined(_WIN32) || defined(WIN32)
#define USE_WINDOWS_TIME 1
#include <windows.h>
- #include "win32/usb.h" // libusb header
+
//
#include "win32/usb.h" // libusb header
#else
#define USE_WINDOWS_TIME 0
#include <time.h>
#else
#define USE_WINDOWS_TIME 0
#include <time.h>
@@
-84,7
+100,12
@@
public:
va_list arg;
int done;
va_start (arg, format);
va_list arg;
int done;
va_start (arg, format);
+#ifdef LINUX
done = vsprintf (s, format, arg);
done = vsprintf (s, format, arg);
+#endif
+#ifdef WIN
+ done = vsprintf_s(s,300, format, arg);
+#endif
va_end (arg);
logtext=s;
level=llevel;
va_end (arg);
logtext=s;
level=llevel;