mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
122803bade
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
25 lines
412 B
C
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);
|
|
}
|
|
|