aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/compat/fcntl.h6
-rw-r--r--include/compat/stdio.h4
-rw-r--r--include/compat/win32netcompat.h4
3 files changed, 8 insertions, 6 deletions
diff --git a/include/compat/fcntl.h b/include/compat/fcntl.h
index edc468a..99c2d58 100644
--- a/include/compat/fcntl.h
+++ b/include/compat/fcntl.h
@@ -29,10 +29,4 @@
29#define FD_CLOEXEC 1 29#define FD_CLOEXEC 1
30#endif 30#endif
31 31
32int posix_open(const char *path, ...);
33
34#ifndef NO_REDEF_POSIX_FUNCTIONS
35#define open(path, ...) posix_open(path, __VA_ARGS__)
36#endif
37
38#endif 32#endif
diff --git a/include/compat/stdio.h b/include/compat/stdio.h
index a0dda6f..d5725c9 100644
--- a/include/compat/stdio.h
+++ b/include/compat/stdio.h
@@ -26,6 +26,10 @@ int asprintf(char **str, const char *fmt, ...);
26 26
27#ifdef _WIN32 27#ifdef _WIN32
28 28
29#if defined(_MSC_VER)
30#define __func__ __FUNCTION__
31#endif
32
29void posix_perror(const char *s); 33void posix_perror(const char *s);
30FILE * posix_fopen(const char *path, const char *mode); 34FILE * posix_fopen(const char *path, const char *mode);
31char * posix_fgets(char *s, int size, FILE *stream); 35char * posix_fgets(char *s, int size, FILE *stream);
diff --git a/include/compat/win32netcompat.h b/include/compat/win32netcompat.h
index 933f083..eabebe9 100644
--- a/include/compat/win32netcompat.h
+++ b/include/compat/win32netcompat.h
@@ -26,7 +26,10 @@
26 26
27int posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); 27int posix_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
28 28
29int posix_open(const char *path, ...);
30
29int posix_close(int fd); 31int posix_close(int fd);
32
30ssize_t posix_read(int fd, void *buf, size_t count); 33ssize_t posix_read(int fd, void *buf, size_t count);
31 34
32ssize_t posix_write(int fd, const void *buf, size_t count); 35ssize_t posix_write(int fd, const void *buf, size_t count);
@@ -39,6 +42,7 @@ int posix_setsockopt(int sockfd, int level, int optname,
39 42
40#ifndef NO_REDEF_POSIX_FUNCTIONS 43#ifndef NO_REDEF_POSIX_FUNCTIONS
41#define connect(sockfd, addr, addrlen) posix_connect(sockfd, addr, addrlen) 44#define connect(sockfd, addr, addrlen) posix_connect(sockfd, addr, addrlen)
45#define open(path, ...) posix_open(path, __VA_ARGS__)
42#define close(fd) posix_close(fd) 46#define close(fd) posix_close(fd)
43#define read(fd, buf, count) posix_read(fd, buf, count) 47#define read(fd, buf, count) posix_read(fd, buf, count)
44#define write(fd, buf, count) posix_write(fd, buf, count) 48#define write(fd, buf, count) posix_write(fd, buf, count)