Commit ea4e8108 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

fixup some portability include files. addresses #1269

git-svn-id: file:///svn/toku/tokudb.1032b@8018 c7de825b-a66e-492c-adef-691d508d4ae1
parent 521b040d
......@@ -5,7 +5,7 @@
#error
#endif
#if defined __cplusplus
#if defined(__cplusplus)
extern "C" {
#endif
......@@ -20,7 +20,7 @@ static inline uint32_t toku_ntohl(uint32_t i) {
return ntohl(i);
}
#if defined __cplusplus
#if defined(__cplusplus)
};
#endif
......
#if !defined(TOKU_OS_TYPES_H)
#define TOKU_OS_TYPES_H
#if defined(__cplusplus)
extern "C" {
#endif
#include <sys/types.h>
typedef int toku_os_handle_t;
......@@ -13,4 +18,8 @@ struct fileid {
#define O_BINARY 0
#endif
#if defined(__cplusplus)
};
#endif
#endif
#ifndef _TOKU_PTHREAD_H
#define _TOKU_PTHREAD_H
#if defined __cplusplus
#if defined(__cplusplus)
extern "C" {
#endif
......@@ -100,7 +100,7 @@ int toku_pthread_cond_broadcast(toku_pthread_cond_t *cond) {
return pthread_cond_broadcast(cond);
}
#if defined __cplusplus
#if defined(__cplusplus)
};
#endif
......
#include <stdlib.h>
#ifndef _TOKU_DIRENT_H
#define _TOKU_DIRENT_H
#if defined(__cplusplus)
extern "C" {
#endif
//The DIR functions do not exist in windows, but the Linux API ends up
//just using a wrapper. We might convert these into an toku_os_* type api.
......@@ -14,5 +18,9 @@ int closedir(DIR *dir);
#define NAME_MAX 255
#endif
#if defined(__cplusplus)
};
#endif
#endif
#ifndef _MISC_H
#define _MISC_H
#if defined(__cplusplus)
extern "C" {
#endif
#include "toku_os.h"
#include <sys/stat.h>
......@@ -68,5 +73,9 @@ char *realpath(const char *path, char *resolved_path);
int unsetenv(const char *name);
int setenv(const char *name, const char *value, int overwrite);
#if defined(__cplusplus)
};
#endif
#endif
#ifndef _STDINT_H
#define _STDINT_H
#if defined(__cplusplus)
extern "C" {
#endif
#include <basetsd.h>
#include <sys/types.h>
......@@ -33,5 +38,9 @@ typedef SSIZE_T ssize_t;
#define INT64_MAX _I64_MAX
#define UINT64_MAX _UI64_MAX
#if defined(__cplusplus)
};
#endif
#endif
......@@ -5,7 +5,7 @@
#error
#endif
#if defined __cplusplus
#if defined(__cplusplus)
extern "C" {
#endif
......@@ -36,7 +36,7 @@ static inline uint32_t toku_ntohl(uint32_t i) {
#endif
#if defined __cplusplus
#if defined(__cplusplus)
};
#endif
......
#if !defined(TOKU_OS_TYPES_H)
#define TOKUOS_TYPES_H
#ifndef TOKU_OS_TYPES_H
#define TOKU_OS_TYPES_H
#if defined(__cplusplus)
extern "C" {
#endif
#include <stdlib.h>
#include <direct.h>
......@@ -29,5 +33,9 @@ struct dirent {
struct __toku_windir;
typedef struct __toku_windir DIR;
#if defined(__cplusplus)
};
#endif
#endif
#ifndef _TOKU_PTHREAD_H
#define _TOKU_PTHREAD_H
#if defined __cplusplus
#if defined(__cplusplus)
extern "C" {
#endif
......@@ -82,7 +82,7 @@ int toku_pthread_cond_signal(toku_pthread_cond_t *cond);
int toku_pthread_cond_broadcast(toku_pthread_cond_t *cond);
#if defined __cplusplus
#if defined(__cplusplus)
};
#endif
......
#ifndef _TOKU_STDLIB_H
#define _TOKU_STDLIB_H
#include <stdlib.h>
#if defined(__cplusplus)
extern "C" {
#endif
long int random(void);
void srandom(unsigned int seed);
#if defined(__cplusplus)
};
#endif
#endif
#ifndef _TOKUWIN_UNISTD_H
#define _TOKUWIN_UNISTD_H
#if defined(__cplusplus)
extern "C" {
#endif
#include <io.h>
#include <stdio.h>
#include <stdint.h>
......@@ -19,5 +24,9 @@ sleep(unsigned int);
int
usleep(unsigned int);
#if defined(__cplusplus)
};
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment