fix tc_sha, __LITTLE_ENDIAN bug in windows/mac

This commit is contained in:
ruanshudong 2020-11-09 10:36:43 +08:00
parent 126078cb1d
commit a21c4e51a9
2 changed files with 13 additions and 1 deletions

View File

@ -26,7 +26,7 @@ using namespace TestApp;
Communicator* _comm;
//static string helloObj = "TestApp.HelloServer.HelloObj@tcp -h 127.0.0.1 -p 8999";
static string helloObj = "TestApp.HelloServer.HelloObj@tcp -h 127.0.0.1 -p 8199:tcp -h 127.0.0.1 -p 8299 -t 10000";
static string helloObj = "TestApp.HelloServer.HelloObj@tcp -h 192.168.7.152 -p 8199:tcp -h 192.168.7.152 -p 8299 -t 10000";
struct Param
{

View File

@ -20,6 +20,18 @@
// #include <endian.h>
#include <limits.h>
#if (defined(__APPLE__) || defined(_WIN32))
# ifndef __LITTLE_ENDIAN
# define __LITTLE_ENDIAN 1234
# endif
# ifndef __BIG_ENDIAN
# define __BIG_ENDIAN 4321
# endif
# ifndef __BYTE_ORDER
# define __BYTE_ORDER __LITTLE_ENDIAN
# endif
#endif
namespace tars
{