aboutsummaryrefslogtreecommitdiff
path: root/src/include/plibc.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-14 16:14:42 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-14 16:14:42 +0000
commit946de21c805f2684d27ea7a4d7b6ae5a6337f925 (patch)
tree240d1551cadca44fe1e3fd760d25121f223cab31 /src/include/plibc.h
parent672f23ab910aa13a5a0f5e7f96f9786404ac447a (diff)
downloadgnunet-946de21c805f2684d27ea7a4d7b6ae5a6337f925.tar.gz
gnunet-946de21c805f2684d27ea7a4d7b6ae5a6337f925.zip
-fix #3033
Diffstat (limited to 'src/include/plibc.h')
-rw-r--r--src/include/plibc.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/include/plibc.h b/src/include/plibc.h
index d19037728..842edb66c 100644
--- a/src/include/plibc.h
+++ b/src/include/plibc.h
@@ -22,7 +22,7 @@
22 * @brief PlibC header 22 * @brief PlibC header
23 * @attention This file is usually not installed under Unix, 23 * @attention This file is usually not installed under Unix,
24 * so ship it with your application 24 * so ship it with your application
25 * @version $Revision$ 25 * @version $Revision: 149 $
26 */ 26 */
27 27
28#ifndef _PLIBC_H_ 28#ifndef _PLIBC_H_
@@ -115,6 +115,10 @@ enum
115 _SC_PAGE_SIZE = 30 115 _SC_PAGE_SIZE = 30
116}; 116};
117 117
118#if !defined(EACCESS)
119# define EACCESS EACCES
120#endif
121
118/* Thanks to the Cygwin project */ 122/* Thanks to the Cygwin project */
119#if !defined(ENOCSI) 123#if !defined(ENOCSI)
120# define ENOCSI 43 /* No CSI structure available */ 124# define ENOCSI 43 /* No CSI structure available */
@@ -521,9 +525,6 @@ int inet_pton4(const char *src, u_char *dst, int pton);
521#if USE_IPV6 525#if USE_IPV6
522int inet_pton6(const char *src, u_char *dst); 526int inet_pton6(const char *src, u_char *dst);
523#endif 527#endif
524#if !defined(FTRUNCATE_DEFINED)
525int truncate(const char *fname, int distance);
526#endif
527int statfs(const char *path, struct statfs *buf); 528int statfs(const char *path, struct statfs *buf);
528const char *hstrerror(int err); 529const char *hstrerror(int err);
529int mkstemp(char *tmplate); 530int mkstemp(char *tmplate);
@@ -557,8 +558,9 @@ int _win_close(int fd);
557int _win_creat(const char *path, mode_t mode); 558int _win_creat(const char *path, mode_t mode);
558char *_win_ctime(const time_t *clock); 559char *_win_ctime(const time_t *clock);
559char *_win_ctime_r(const time_t *clock, char *buf); 560char *_win_ctime_r(const time_t *clock, char *buf);
560int _win_fstat(int handle, struct stat *buffer); 561int _win_fstat(int handle, struct _stat *buffer);
561int _win_ftruncate(int fildes, off_t length); 562int _win_ftruncate(int fildes, off_t length);
563int _win_truncate(const char *fname, int distance);
562int _win_kill(pid_t pid, int sig); 564int _win_kill(pid_t pid, int sig);
563int _win_pipe(int *phandles); 565int _win_pipe(int *phandles);
564intptr_t _win_mkfifo(const char *path, mode_t mode); 566intptr_t _win_mkfifo(const char *path, mode_t mode);
@@ -570,7 +572,7 @@ long _win_random(void);
570void _win_srandom(unsigned int seed); 572void _win_srandom(unsigned int seed);
571int _win_remove(const char *path); 573int _win_remove(const char *path);
572int _win_rename(const char *oldname, const char *newname); 574int _win_rename(const char *oldname, const char *newname);
573int _win_stat(const char *path, struct stat *buffer); 575int _win_stat(const char *path, struct _stat *buffer);
574int _win_stat64(const char *path, struct stat64 *buffer); 576int _win_stat64(const char *path, struct stat64 *buffer);
575long _win_sysconf(int name); 577long _win_sysconf(int name);
576int _win_unlink(const char *filename); 578int _win_unlink(const char *filename);
@@ -583,7 +585,7 @@ void *_win_mmap(void *start, size_t len, int access, int flags, int fd,
583 unsigned long long offset); 585 unsigned long long offset);
584int _win_msync(void *start, size_t length, int flags); 586int _win_msync(void *start, size_t length, int flags);
585int _win_munmap(void *start, size_t length); 587int _win_munmap(void *start, size_t length);
586int _win_lstat(const char *path, struct stat *buf); 588int _win_lstat(const char *path, struct _stat *buf);
587int _win_lstat64(const char *path, struct stat64 *buf); 589int _win_lstat64(const char *path, struct stat64 *buf);
588int _win_readlink(const char *path, char *buf, size_t bufsize); 590int _win_readlink(const char *path, char *buf, size_t bufsize);
589int _win_accept(int s, struct sockaddr *addr, int *addrlen); 591int _win_accept(int s, struct sockaddr *addr, int *addrlen);
@@ -610,6 +612,7 @@ int _win_setsockopt(int s, int level, int optname, const void *optval,
610 int optlen); 612 int optlen);
611int _win_shutdown(int s, int how); 613int _win_shutdown(int s, int how);
612int _win_socket(int af, int type, int protocol); 614int _win_socket(int af, int type, int protocol);
615int _win_socketpair(int af, int type, int protocol, int socket_vector[2]);
613struct hostent *_win_gethostbyaddr(const char *addr, int len, int type); 616struct hostent *_win_gethostbyaddr(const char *addr, int len, int type);
614struct hostent *_win_gethostbyname(const char *name); 617struct hostent *_win_gethostbyname(const char *name);
615struct hostent *gethostbyname2(const char *name, int af); 618struct hostent *gethostbyname2(const char *name, int af);
@@ -658,6 +661,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start);
658 #define FOPEN(f, m) fopen(f, m) 661 #define FOPEN(f, m) fopen(f, m)
659 #define FCLOSE(f) fclose(f) 662 #define FCLOSE(f) fclose(f)
660 #define FTRUNCATE(f, l) ftruncate(f, l) 663 #define FTRUNCATE(f, l) ftruncate(f, l)
664 #define TRUNCATE(f, l) truncate(f, l)
661 #define OPENDIR(d) opendir(d) 665 #define OPENDIR(d) opendir(d)
662 #define CLOSEDIR(d) closedir(d) 666 #define CLOSEDIR(d) closedir(d)
663 #define READDIR(d) readdir(d) 667 #define READDIR(d) readdir(d)
@@ -722,6 +726,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start);
722 #define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n) 726 #define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n)
723 #define SHUTDOWN(s, h) shutdown(s, h) 727 #define SHUTDOWN(s, h) shutdown(s, h)
724 #define SOCKET(a, t, p) socket(a, t, p) 728 #define SOCKET(a, t, p) socket(a, t, p)
729 #define SOCKETPAIR(a, t, p, v) socketpair(a, t, p, v)
725 #define GETHOSTBYADDR(a, l, t) gethostbyaddr(a, l, t) 730 #define GETHOSTBYADDR(a, l, t) gethostbyaddr(a, l, t)
726 #define GETHOSTBYNAME(n) gethostbyname(n) 731 #define GETHOSTBYNAME(n) gethostbyname(n)
727 #define GETTIMEOFDAY(t, n) gettimeofday(t, n) 732 #define GETTIMEOFDAY(t, n) gettimeofday(t, n)
@@ -756,6 +761,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start);
756 #define FOPEN(f, m) _win_fopen(f, m) 761 #define FOPEN(f, m) _win_fopen(f, m)
757 #define FCLOSE(f) _win_fclose(f) 762 #define FCLOSE(f) _win_fclose(f)
758 #define FTRUNCATE(f, l) _win_ftruncate(f, l) 763 #define FTRUNCATE(f, l) _win_ftruncate(f, l)
764 #define TRUNCATE(f, l) _win_truncate(f, l)
759 #define OPENDIR(d) _win_opendir(d) 765 #define OPENDIR(d) _win_opendir(d)
760 #define CLOSEDIR(d) _win_closedir(d) 766 #define CLOSEDIR(d) _win_closedir(d)
761 #define READDIR(d) _win_readdir(d) 767 #define READDIR(d) _win_readdir(d)
@@ -820,6 +826,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start);
820 #define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n) 826 #define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n)
821 #define SHUTDOWN(s, h) _win_shutdown(s, h) 827 #define SHUTDOWN(s, h) _win_shutdown(s, h)
822 #define SOCKET(a, t, p) _win_socket(a, t, p) 828 #define SOCKET(a, t, p) _win_socket(a, t, p)
829 #define SOCKETPAIR(a, t, p, v) _win_socketpair(a, t, p, v)
823 #define GETHOSTBYADDR(a, l, t) _win_gethostbyaddr(a, l, t) 830 #define GETHOSTBYADDR(a, l, t) _win_gethostbyaddr(a, l, t)
824 #define GETHOSTBYNAME(n) _win_gethostbyname(n) 831 #define GETHOSTBYNAME(n) _win_gethostbyname(n)
825 #define GETTIMEOFDAY(t, n) gettimeofday(t, n) 832 #define GETTIMEOFDAY(t, n) gettimeofday(t, n)