vendor/libgit2/src/posix.h in rugged-1.1.0 vs vendor/libgit2/src/posix.h in rugged-1.1.1
- old
+ new
@@ -87,10 +87,16 @@
* mingw lacks EAFNOSUPPORT. */
#ifndef EAFNOSUPPORT
#define EAFNOSUPPORT (INT_MAX-1)
#endif
+/* Compiler independent macro to handle signal interrpted system calls */
+#define HANDLE_EINTR(result, x) do { \
+ result = (x); \
+ } while (result == -1 && errno == EINTR);
+
+
/* Provide a 64-bit size for offsets. */
#if defined(_MSC_VER)
typedef __int64 off64_t;
#elif defined(__HAIKU__)
@@ -116,9 +122,12 @@
* Use your manpages to check the docs on these.
*/
extern ssize_t p_read(git_file fd, void *buf, size_t cnt);
extern int p_write(git_file fd, const void *buf, size_t cnt);
+
+extern ssize_t p_pread(int fd, void *data, size_t size, off64_t offset);
+extern ssize_t p_pwrite(int fd, const void *data, size_t size, off64_t offset);
#define p_close(fd) close(fd)
#define p_umask(m) umask(m)
extern int p_open(const char *path, int flags, ...);