projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AU discover: remember discover-at-start setting
[ardour.git]
/
libs
/
midi++2
/
ipmidi_port.cc
diff --git
a/libs/midi++2/ipmidi_port.cc
b/libs/midi++2/ipmidi_port.cc
index 297ad894f7c060edeb30140e3dac377d6fdde12a..567df99335e4c41a7d4cc167e1c13d081189eca8 100644
(file)
--- a/
libs/midi++2/ipmidi_port.cc
+++ b/
libs/midi++2/ipmidi_port.cc
@@
-25,13
+25,17
@@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#if defined(WIN32)
+#ifdef COMPILER_MSVC
+#undef O_NONBLOCK
+#define O_NONBLOCK 0
+#endif
+#if defined(PLATFORM_WINDOWS)
#include <winsock2.h>
#else
#include <netdb.h>
#endif
#include <winsock2.h>
#else
#include <netdb.h>
#endif
-#if defined(
WIN32
)
+#if defined(
PLATFORM_WINDOWS
)
static WSADATA g_wsaData;
typedef int socklen_t;
#else
static WSADATA g_wsaData;
typedef int socklen_t;
#else
@@
-40,9
+44,6
@@
typedef int socklen_t;
inline void closesocket(int s) { ::close(s); }
#endif
inline void closesocket(int s) { ::close(s); }
#endif
-#include <jack/jack.h>
-#include <jack/midiport.h>
-
#include "pbd/xml++.h"
#include "pbd/error.h"
#include "pbd/failed_constructor.h"
#include "pbd/xml++.h"
#include "pbd/error.h"
#include "pbd/failed_constructor.h"
@@
-116,7
+117,7
@@
get_address (int sock, struct in_addr *inaddr, const string& ifname )
{
// Get interface address from supplied name.
{
// Get interface address from supplied name.
-#if !defined(
WIN32
)
+#if !defined(
PLATFORM_WINDOWS
)
struct ifreq ifr;
::strncpy(ifr.ifr_name, ifname.c_str(), sizeof(ifr.ifr_name));
struct ifreq ifr;
::strncpy(ifr.ifr_name, ifname.c_str(), sizeof(ifr.ifr_name));
@@
-145,13
+146,13
@@
get_address (int sock, struct in_addr *inaddr, const string& ifname )
return false;
return false;
-#endif // !
WIN32
+#endif // !
PLATFORM_WINDOWS'
}
bool
IPMIDIPort::open_sockets (int base_port, const string& ifname)
{
}
bool
IPMIDIPort::open_sockets (int base_port, const string& ifname)
{
-#if !defined(
WIN32
)
+#if !defined(
PLATFORM_WINDOWS
)
int protonum = 0;
struct protoent *proto = ::getprotobyname("IP");
int protonum = 0;
struct protoent *proto = ::getprotobyname("IP");
@@
-250,7
+251,7
@@
IPMIDIPort::open_sockets (int base_port, const string& ifname)
return true;
#else
return false;
return true;
#else
return false;
-#endif // !
WIN32
+#endif // !
PLATFORM_WINDOWS'
}
int
}
int