/*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#pragma once
#ifndef _WIN32
+
#include <unistd.h>
+
#else
+
#include <cstdint>
+
#include <sys/locking.h>
+
#include <folly/portability/SysTypes.h>
// This is different from the normal headers because there are a few cases,
int getuid();
int isatty(int fh);
int lockf(int fd, int cmd, off_t len);
-long lseek(int fh, long off, int orig);
-int read(int fh, void* buf, unsigned int mcc);
+off_t lseek(int fh, off_t off, int orig);
+ssize_t read(int fh, void* buf, size_t mcc);
int rmdir(const char* path);
-int pipe(int* pth);
-int pread(int fd, void* buf, size_t count, off_t offset);
-int pwrite(int fd, const void* buf, size_t count, off_t offset);
+int pipe(int pth[2]);
+ssize_t pread(int fd, void* buf, size_t count, off_t offset);
+ssize_t pwrite(int fd, const void* buf, size_t count, off_t offset);
ssize_t readlink(const char* path, char* buf, size_t buflen);
-int setmode(int fh, int md);
void* sbrk(intptr_t i);
unsigned int sleep(unsigned int seconds);
-size_t sysconf(int tp);
-long tell(int fh);
+long sysconf(int tp);
int truncate(const char* path, off_t len);
int usleep(unsigned int ms);
-int write(int fh, void const* buf, unsigned int mcc);
+ssize_t write(int fh, void const* buf, size_t count);
}
}
}
/* using override */ using namespace folly::portability::unistd;
+
#endif