Some more OpenSSL 1.1.0 compat APIs
[folly.git] / folly / portability / Unistd.h
old mode 100755 (executable)
new mode 100644 (file)
index 4d4548e..b4cd106
 #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,
@@ -68,18 +73,16 @@ pid_t getppid();
 int getuid();
 int isatty(int fh);
 int lockf(int fd, int cmd, off_t len);
-long lseek(int fh, long off, int orig);
+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[2]);
-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);
+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);
 long sysconf(int tp);
-long tell(int fh);
 int truncate(const char* path, off_t len);
 int usleep(unsigned int ms);
 ssize_t write(int fh, void const* buf, size_t count);
@@ -88,4 +91,5 @@ ssize_t write(int fh, void const* buf, size_t count);
 }
 
 /* using override */ using namespace folly::portability::unistd;
+
 #endif