diff --git a/TPMCmd/Simulator/src/TPMCmdp.c b/TPMCmd/Simulator/src/TPMCmdp.c index 522f9499..a5879f48 100644 --- a/TPMCmd/Simulator/src/TPMCmdp.c +++ b/TPMCmd/Simulator/src/TPMCmdp.c @@ -40,11 +40,7 @@ // of the testing. //** Includes and Data Definitions -#include -#include -#include #include "TpmBuildSwitches.h" -#include "BaseTypes.h" #ifdef _MSC_VER # pragma warning(push, 3) @@ -52,17 +48,18 @@ # include # pragma warning(pop) #elif defined(__unix__) +# include "BaseTypes.h" +# ifndef TRUE +# define TRUE 1 +# endif +# ifndef FALSE +# define FALSE 0 +# endif typedef int SOCKET; #else # error "Unsupported platform." #endif -#ifndef TRUE -# define TRUE 1 -#endif -#ifndef FALSE -# define FALSE 0 -#endif #include "Platform_fp.h" #include "ExecCommand_fp.h" diff --git a/TPMCmd/Simulator/src/TPMCmds.c b/TPMCmd/Simulator/src/TPMCmds.c index 9f9efd62..99a42a77 100644 --- a/TPMCmd/Simulator/src/TPMCmds.c +++ b/TPMCmd/Simulator/src/TPMCmds.c @@ -37,13 +37,8 @@ //** Includes, Defines, Data Definitions, and Function Prototypes #include "TpmBuildSwitches.h" -#include "BaseTypes.h" -#include #include -#include -#include -#include #ifdef _MSC_VER # pragma warning(push, 3) @@ -51,19 +46,22 @@ # include # pragma warning(pop) #elif defined(__unix__) +# include +# include +# include +# include "BaseTypes.h" # define _strcmpi strcasecmp +# ifndef TRUE +# define TRUE 1 +# endif +# ifndef FALSE +# define FALSE 0 +# endif typedef int SOCKET; #else # error "Unsupported platform." #endif -#ifndef TRUE -# define TRUE 1 -#endif -#ifndef FALSE -# define FALSE 0 -#endif - #include "TpmTcpProtocol.h" #include "Manufacture_fp.h" #include "Platform_fp.h" diff --git a/TPMCmd/Simulator/src/TcpServer.c b/TPMCmd/Simulator/src/TcpServer.c index 4641aa40..6fe70230 100644 --- a/TPMCmd/Simulator/src/TcpServer.c +++ b/TPMCmd/Simulator/src/TcpServer.c @@ -39,7 +39,6 @@ // //** Includes, Locals, Defines and Function Prototypes #include "TpmBuildSwitches.h" -#include "BaseTypes.h" #include #ifdef _MSC_VER @@ -47,7 +46,7 @@ # include # include # pragma warning(pop) -typedef int socklen_t; + typedef int socklen_t; #elif defined(__unix__) # include # include @@ -56,28 +55,24 @@ typedef int socklen_t; # include # include # include +# include "BaseTypes.h" # define ZeroMemory(ptr, sz) (memset((ptr), 0, (sz))) # define closesocket(x) close(x) # define INVALID_SOCKET (-1) # define SOCKET_ERROR (-1) # define WSAGetLastError() (errno) # define INT_PTR intptr_t +# ifndef TRUE +# define TRUE 1 +# endif +# ifndef FALSE +# define FALSE 0 +# endif typedef int SOCKET; #else # error "Unsupported platform." #endif -#ifndef TRUE -# define TRUE 1 -#endif -#ifndef FALSE -# define FALSE 0 -#endif - -#include -#include -#include - #include "TpmTcpProtocol.h" #include "Manufacture_fp.h" #include "TpmProfile.h"