build/windows_clang

This commit is contained in:
MeyerFabian
2020-07-17 18:01:05 +02:00
parent 47207248d4
commit ba70c7d543
53 changed files with 127 additions and 127 deletions

View File

@@ -21,7 +21,7 @@
#include <sys/types.h>
#include <iostream>
#if !defined (WIN32) || defined(__CYGWIN__)
#if !defined (_WIN32) || defined(__CYGWIN__)
#include <sys/ioctl.h>
#include <sys/uio.h>
#include <sys/socket.h>
@@ -54,7 +54,7 @@
#elif defined (__APPLE__)
#include <unistd.h>
#include <sys/sockio.h>
#elif defined (WIN32)
#elif defined (_WIN32)
#include <winsock.h>
#include <stdio.h>
#elif defined (__hpux)
@@ -73,7 +73,7 @@ Broadcaster::Broadcaster( void )
_ifr_name = "eth0";
#elif defined(__sun)
_ifr_name = "hme0";
#elif !defined (WIN32)
#elif !defined (_WIN32)
_ifr_name = "ef0";
#endif
_port = 0;
@@ -84,7 +84,7 @@ Broadcaster::Broadcaster( void )
Broadcaster::~Broadcaster( void )
{
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
closesocket( _so);
#else
close( _so );
@@ -93,7 +93,7 @@ Broadcaster::~Broadcaster( void )
bool Broadcaster::init( void )
{
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
WORD version = MAKEWORD(1,1);
WSADATA wsaData;
// First, we start up Winsock
@@ -111,13 +111,13 @@ bool Broadcaster::init( void )
perror( "Socket" );
return false;
}
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
const BOOL on = TRUE;
#else
int on = 1;
#endif
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char *) &on, sizeof(int));
#else
setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
@@ -127,17 +127,17 @@ bool Broadcaster::init( void )
saddr.sin_port = htons( _port );
if( _address == 0 )
{
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
setsockopt( _so, SOL_SOCKET, SO_BROADCAST, (const char *) &on, sizeof(int));
#else
setsockopt( _so, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on));
#endif
#if !defined (WIN32) || defined(__CYGWIN__)
#if !defined (_WIN32) || defined(__CYGWIN__)
struct ifreq ifr;
strcpy( ifr.ifr_name, _ifr_name.c_str());
#endif
#if defined (WIN32) // get the server address
#if defined (_WIN32) // get the server address
saddr.sin_addr.s_addr = htonl(INADDR_BROADCAST);
}
#else
@@ -202,7 +202,7 @@ void Broadcaster::sync( void )
return;
}
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
unsigned int size = sizeof( SOCKADDR_IN );
sendto( _so, (const char *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
int err = WSAGetLastError ();

View File

@@ -29,7 +29,7 @@
// Class definition for broadcasting a buffer to a LAN
//
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(_WIN32) || defined(__CYGWIN__)
#include <netinet/in.h>
#endif
@@ -65,7 +65,7 @@ class Broadcaster
std::string _ifr_name;
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__)
SOCKET _so;
#else
int _so;
@@ -74,7 +74,7 @@ class Broadcaster
short _port;
void *_buffer;
unsigned int _buffer_size;
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__)
SOCKADDR_IN saddr;
#else
struct sockaddr_in saddr;

View File

@@ -36,7 +36,7 @@
#include <iostream>
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
#include <winsock.h>
#endif

View File

@@ -19,7 +19,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
#include <winsock.h>
#else
#include <unistd.h>
@@ -46,7 +46,7 @@ Receiver::Receiver( void )
Receiver::~Receiver( void )
{
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
closesocket( _so);
#else
close( _so );
@@ -55,7 +55,7 @@ Receiver::~Receiver( void )
bool Receiver::init( void )
{
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__)
WORD version = MAKEWORD(1,1);
WSADATA wsaData;
// First, we start up Winsock
@@ -73,7 +73,7 @@ bool Receiver::init( void )
perror( "Socket" );
return false;
}
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
// const BOOL on = TRUE;
// setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(int));
#else
@@ -84,7 +84,7 @@ bool Receiver::init( void )
// struct sockaddr_in saddr;
saddr.sin_family = AF_INET;
saddr.sin_port = htons( _port );
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
saddr.sin_addr.s_addr = htonl(INADDR_ANY);
#else
saddr.sin_addr.s_addr = 0;
@@ -137,7 +137,7 @@ unsigned int Receiver::sync( void )
tv.tv_sec = 0;
tv.tv_usec = 0;
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
// saddr.sin_port = htons( _port );
recvfrom( _so, (char *)_buffer, _buffer_size, 0, (sockaddr*)&saddr, &size );
// recvfrom(sock_Receive, szMessage, 256, 0, (sockaddr*)&addr_Cli, &clilen)

View File

@@ -28,7 +28,7 @@
// Class definition for the recipient of a broadcasted message
//
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(_WIN32) || defined(__CYGWIN__)
#include <netinet/in.h>
#endif
@@ -53,7 +53,7 @@ class Receiver
bool init( void );
private :
#if defined (WIN32) && !defined(__CYGWIN__)
#if defined (_WIN32) && !defined(__CYGWIN__)
SOCKET _so;
SOCKADDR_IN saddr;
#else

View File

@@ -18,7 +18,7 @@
* THE SOFTWARE.
*/
#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
#if defined(_WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
// disable the double to float errors.
#pragma warning( disable : 4305 )
#endif

View File

@@ -18,7 +18,7 @@
* THE SOFTWARE.
*/
#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
#if defined(_WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
// disable the double to float errors.
#pragma warning( disable : 4305 )
#endif

View File

@@ -18,7 +18,7 @@
* THE SOFTWARE.
*/
#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
#if defined(_WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
// disable the double to float errors.
#pragma warning( disable : 4305 )
#endif

View File

@@ -417,7 +417,7 @@ int main(int argc, char** argv)
arguments.getApplicationUsage()->addCommandLineOption("--shader","Use shaders to post process the video.");
arguments.getApplicationUsage()->addCommandLineOption("--interactive","Use camera manipulator to allow movement around movie.");
arguments.getApplicationUsage()->addCommandLineOption("--flip","Flip the movie so top becomes bottom.");
#if defined(WIN32) || defined(__APPLE__)
#if defined(_WIN32) || defined(__APPLE__)
arguments.getApplicationUsage()->addCommandLineOption("--devices","Print the Video input capability via QuickTime and exit.");
#endif
@@ -433,7 +433,7 @@ int main(int argc, char** argv)
return 1;
}
#if defined(WIN32) || defined(__APPLE__)
#if defined(_WIN32) || defined(__APPLE__)
// if user requests devices video capability.
if (arguments.read("-devices") || arguments.read("--devices"))
{

View File

@@ -18,7 +18,7 @@
* THE SOFTWARE.
*/
#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
#if defined(_WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
// disable the double to float errors.
#pragma warning( disable : 4305 )
#endif

View File

@@ -16,7 +16,7 @@
* THE SOFTWARE.
*/
#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
#if defined(_WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
/////////////////////////////////////////////////////////////////////////////
// Disable unavoidable warning messages:
@@ -32,7 +32,7 @@
#pragma warning(disable : 4103 4114 4201 4237 4251 4275 4290 4503 4335 4786)
#endif // WIN32
#endif // _WIN32
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>

View File

@@ -50,7 +50,7 @@ std::ostream& TestContext::tout(TraceLevel tl) const
TestContext::TraceStream::TraceStream(std::ostream& o, TraceLevel tl):
_traceLevel(tl),
_outputStreamPtr(&o),
#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
#if defined(_WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
_nullStream("nul")
#else
_nullStream("/dev/null")

View File

@@ -10,7 +10,7 @@
#endif
// For wxCURSOR_BLANK below, but isn't used a.t.m.
//#ifdef WIN32
//#ifdef _WIN32
//#include "wx/msw/wx.rc"
//#endif