Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions addons/ofxNetwork/src/ofxNetworkUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#pragma once

#include <cerrno>
#include "ofConstants.h"


#ifdef TARGET_WIN32
#include <WinSock2.h>
Expand All @@ -19,6 +17,10 @@
#define OFXNETWORK_ERROR(name) E ## name
#endif

// WinSock2.h has to be included before windows.h
#include "ofConstants.h"


/**
* @brief Log the latest network error and where it happened (file and line)
*
Expand Down
4 changes: 4 additions & 0 deletions addons/ofxNetwork/src/ofxTCPManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ SetTimeoutReceive()

****************************************************************/
#include "ofConstants.h"

#include <string.h>
#include <wchar.h>
#include <stdio.h>
Expand Down Expand Up @@ -82,6 +83,9 @@ SetTimeoutReceive()
#include <ws2tcpip.h> // TCP/IP annex needed for multicasting
#endif




//--------------------------------------------------------------------------------
class InetAddr : public sockaddr_in
{
Expand Down
1 change: 1 addition & 0 deletions addons/ofxNetwork/src/ofxUDPManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ x) Close()
#include <wchar.h>
#include <stdio.h>


#ifndef TARGET_WIN32

//unix includes - works for osx should be same for *nix
Expand Down
3 changes: 3 additions & 0 deletions libs/openFrameworks/utils/ofConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ enum ofTargetPlatform{
// http://www.ogre3d.org/docs/api/html/OgrePlatform_8h-source.html

#if defined( __WIN32__ ) || defined( _WIN32 )
#define WIN32_LEAN_AND_MEAN
#define _WINSOCKAPI_
#include <windows.h>
#define OF_OS_WINDOWS
#define TARGET_WIN32
#if defined(_MSC_VER)
Expand Down
1 change: 0 additions & 1 deletion libs/openFrameworks/utils/ofSystemUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#define _WIN32_DCOM
#include <winuser.h>
#include <commdlg.h>
#include <windows.h>
#include <shlobj.h>
#include <tchar.h>
#include <stdio.h>
Expand Down