diff options
author | Roger Meier <roger@apache.org> | 2012-06-18 20:23:58 +0000 |
---|---|---|
committer | Roger Meier <roger@apache.org> | 2012-06-18 20:23:58 +0000 |
commit | 122803bade37e82451785ec53dddafd98774b92e (patch) | |
tree | b4aa0b39667079c15af7447869bec149c626380e /contrib/transport-sample/config.h | |
parent | 89cc4303aac22b4505934fa965ee7981c83f171c (diff) | |
download | thrift-122803bade37e82451785ec53dddafd98774b92e.tar.gz |
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
Diffstat (limited to 'contrib/transport-sample/config.h')
-rw-r--r-- | contrib/transport-sample/config.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/transport-sample/config.h b/contrib/transport-sample/config.h new file mode 100644 index 000000000..a20d78513 --- /dev/null +++ b/contrib/transport-sample/config.h @@ -0,0 +1,24 @@ +//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); +} + |