folly: fix sysMembarrier() with newer kernel headers
[folly.git] / folly / portability / Unistd.h
old mode 100755 (executable)
new mode 100644 (file)
index 364fca9..2c0c0cd
@@ -1,5 +1,5 @@
 /*
- * 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 <sys/locking.h> // @manual
+
 #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);
-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);
 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