thrift/contrib/transport-sample/config.h
Roger Meier 122803bade THRIFT-1558 Named Pipe and Anonymous Pipe transport for Windows
Patch: Peace
add pipe crossplatform example to contrib

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1351477 13f79535-47bb-0310-9956-ffa450edef68
2012-06-18 20:23:58 +00:00

25 lines
412 B
C

//Missing definitions for *NIX systems. This sample project
//was initially created on Windows.
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#define TEXT(str) str
inline int Sleep(int ms)
{
return sleep(ms/1000); //sleep() param is in seconds
}
inline int _tcscmp(const char* str1, const char* str2)
{
return strcmp(str1, str2);
}
inline int _tstoi(const char* str)
{
return atoi(str);
}