Skip to content

Commit

Permalink
fixing MSVC compilation errors for client2
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-dixon committed Aug 30, 2024
1 parent 11eb94d commit c7936fb
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ add_definitions(
)

if( WIN32 OR MINGW )
add_definitions( -D_CRT_SECURE_NO_WARNINGS )
add_definitions( -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX )
set( CMAKE_FIND_LIBRARY_PREFIXES "lib" "" )
set( CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".dll.lib" ".a" ".lib" )
if( MINGW )
Expand Down
4 changes: 4 additions & 0 deletions source/client2/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#include "accAPI.h"
#include "exceptions.hpp"

#ifdef _WIN32
# include "windows_defines.hpp"
#endif

#include <clientserver/udaDefines.h>
#include <logging/logging.h>
#include <clientserver/errorLog.h>
Expand Down
5 changes: 1 addition & 4 deletions source/client2/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#ifdef _WIN32
# include <cctype>
# include <winsock2.h> // must be included before connection.h to avoid macro redefinition in rpc/types.h
# include "windows_defines.hpp"
#endif

#include "connection.hpp"
Expand Down Expand Up @@ -40,10 +41,6 @@
# endif
#endif

#if _MSC_VER && !__INTEL_COMPILER
# define strncasecmp _strnicmp
#endif

#include <clientserver/errorLog.h>
#include <clientserver/manageSockets.h>
#include <logging/logging.h>
Expand Down
1 change: 0 additions & 1 deletion source/clientserver/memstream_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "memstream.h"

#define NOMINMAX
#include <windows.h>
#include <cstdlib>
#include <string.h>
Expand Down
1 change: 0 additions & 1 deletion source/clientserver/udaDefines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#if defined(_WIN32)

#define NOMINMAX
#include <windows.h>
#include <io.h>
#include <fcntl.h>
Expand Down
1 change: 0 additions & 1 deletion source/server/serverMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#if defined(__GNUC__)
# include <unistd.h>
#else
# define NOMINMAX
# include <windows.h>
# define sleep Sleep
#endif
Expand Down
1 change: 0 additions & 1 deletion source/server2/server_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#if defined(__GNUC__)
# include <unistd.h>
#else
# define NOMINMAX
# include <windows.h>
# define sleep Sleep
#endif
Expand Down

0 comments on commit c7936fb

Please sign in to comment.