aboutsummaryrefslogtreecommitdiff
path: root/src/include/plibc.h
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-10-08 09:30:21 +0000
committerLRN <lrn1986@gmail.com>2013-10-08 09:30:21 +0000
commit73bfdbd5294ec0e4f953e19c766920c0ae3b0737 (patch)
tree0afddc44b25e81e0c67c03f5b99bab2fc7b5f516 /src/include/plibc.h
parente44fe0ebd67f916046eb21f33ba10fb02b5d7b73 (diff)
downloadgnunet-73bfdbd5294ec0e4f953e19c766920c0ae3b0737.tar.gz
gnunet-73bfdbd5294ec0e4f953e19c766920c0ae3b0737.zip
Update plibc header
Diffstat (limited to 'src/include/plibc.h')
-rw-r--r--src/include/plibc.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/include/plibc.h b/src/include/plibc.h
index 842edb66c..0ce666b3f 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: 149 $ 25 * @version $Revision: 151 $
26 */ 26 */
27 27
28#ifndef _PLIBC_H_ 28#ifndef _PLIBC_H_
@@ -71,7 +71,7 @@ extern "C" {
71#define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \ 71#define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \
72 (double)((x).LowPart)) 72 (double)((x).LowPart))
73#ifndef __MINGW64_VERSION_MAJOR 73#ifndef __MINGW64_VERSION_MAJOR
74struct stat64 74struct _stati64
75{ 75{
76 _dev_t st_dev; 76 _dev_t st_dev;
77 _ino_t st_ino; 77 _ino_t st_ino;
@@ -81,9 +81,9 @@ struct stat64
81 short st_gid; 81 short st_gid;
82 _dev_t st_rdev; 82 _dev_t st_rdev;
83 __int64 st_size; 83 __int64 st_size;
84 __time64_t st_atime; 84 time_t st_atime;
85 __time64_t st_mtime; 85 time_t st_mtime;
86 __time64_t st_ctime; 86 time_t st_ctime;
87}; 87};
88#endif 88#endif
89typedef unsigned int sa_family_t; 89typedef unsigned int sa_family_t;
@@ -364,7 +364,7 @@ enum
364/* Make sure it's the same as WSATIMEDOUT */ 364/* Make sure it's the same as WSATIMEDOUT */
365# define ETIMEDOUT 138 /* Connection timed out */ 365# define ETIMEDOUT 138 /* Connection timed out */
366#endif 366#endif
367#if !defined(EWOULDBLOCK) || EWOULBLOCK == 140 367#if !defined(EWOULDBLOCK) || EWOULDBLOCK == 140
368# undef EWOULDBLOCK /* MinGW-w64 defines it as 140, but we want it as EAGAIN */ 368# undef EWOULDBLOCK /* MinGW-w64 defines it as 140, but we want it as EAGAIN */
369# define EWOULDBLOCK EAGAIN /* Operation would block */ 369# define EWOULDBLOCK EAGAIN /* Operation would block */
370#endif 370#endif
@@ -558,7 +558,7 @@ int _win_close(int fd);
558int _win_creat(const char *path, mode_t mode); 558int _win_creat(const char *path, mode_t mode);
559char *_win_ctime(const time_t *clock); 559char *_win_ctime(const time_t *clock);
560char *_win_ctime_r(const time_t *clock, char *buf); 560char *_win_ctime_r(const time_t *clock, char *buf);
561int _win_fstat(int handle, struct _stat *buffer); 561int _win_fstat(int handle, struct stat *buffer);
562int _win_ftruncate(int fildes, off_t length); 562int _win_ftruncate(int fildes, off_t length);
563int _win_truncate(const char *fname, int distance); 563int _win_truncate(const char *fname, int distance);
564int _win_kill(pid_t pid, int sig); 564int _win_kill(pid_t pid, int sig);
@@ -572,8 +572,8 @@ long _win_random(void);
572void _win_srandom(unsigned int seed); 572void _win_srandom(unsigned int seed);
573int _win_remove(const char *path); 573int _win_remove(const char *path);
574int _win_rename(const char *oldname, const char *newname); 574int _win_rename(const char *oldname, const char *newname);
575int _win_stat(const char *path, struct _stat *buffer); 575int _win_stat(const char *path, struct stat *buffer);
576int _win_stat64(const char *path, struct stat64 *buffer); 576int _win_stati64(const char *path, struct _stati64 *buffer);
577long _win_sysconf(int name); 577long _win_sysconf(int name);
578int _win_unlink(const char *filename); 578int _win_unlink(const char *filename);
579int _win_write(int fildes, const void *buf, size_t nbyte); 579int _win_write(int fildes, const void *buf, size_t nbyte);
@@ -585,8 +585,8 @@ void *_win_mmap(void *start, size_t len, int access, int flags, int fd,
585 unsigned long long offset); 585 unsigned long long offset);
586int _win_msync(void *start, size_t length, int flags); 586int _win_msync(void *start, size_t length, int flags);
587int _win_munmap(void *start, size_t length); 587int _win_munmap(void *start, size_t length);
588int _win_lstat(const char *path, struct _stat *buf); 588int _win_lstat(const char *path, struct stat *buf);
589int _win_lstat64(const char *path, struct stat64 *buf); 589int _win_lstati64(const char *path, struct _stati64 *buf);
590int _win_readlink(const char *path, char *buf, size_t bufsize); 590int _win_readlink(const char *path, char *buf, size_t bufsize);
591int _win_accept(int s, struct sockaddr *addr, int *addrlen); 591int _win_accept(int s, struct sockaddr *addr, int *addrlen);
592 592
@@ -745,6 +745,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start);
745 #define TDESTROY(r, f) tdestroy(r, f) 745 #define TDESTROY(r, f) tdestroy(r, f)
746 #define LFIND(k, b, n, s, c) lfind(k, b, n, s, c) 746 #define LFIND(k, b, n, s, c) lfind(k, b, n, s, c)
747 #define LSEARCH(k, b, n, s, c) lsearch(k, b, n, s, c) 747 #define LSEARCH(k, b, n, s, c) lsearch(k, b, n, s, c)
748 #define STRUCT_STAT64 struct stat64
748#else 749#else
749 #define DIR_SEPARATOR '\\' 750 #define DIR_SEPARATOR '\\'
750 #define DIR_SEPARATOR_STR "\\" 751 #define DIR_SEPARATOR_STR "\\"
@@ -780,7 +781,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start);
780 #define REMOVE(p) _win_remove(p) 781 #define REMOVE(p) _win_remove(p)
781 #define RENAME(o, n) _win_rename(o, n) 782 #define RENAME(o, n) _win_rename(o, n)
782 #define STAT(p, b) _win_stat(p, b) 783 #define STAT(p, b) _win_stat(p, b)
783 #define STAT64(p, b) _win_stat64(p, b) 784 #define STAT64(p, b) _win_stati64(p, b)
784 #define SYSCONF(n) _win_sysconf(n) 785 #define SYSCONF(n) _win_sysconf(n)
785 #define UNLINK(f) _win_unlink(f) 786 #define UNLINK(f) _win_unlink(f)
786 #define WRITE(f, b, n) _win_write(f, b, n) 787 #define WRITE(f, b, n) _win_write(f, b, n)
@@ -795,7 +796,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start);
795 #define STRERROR(i) _win_strerror(i) 796 #define STRERROR(i) _win_strerror(i)
796 #define READLINK(p, b, s) _win_readlink(p, b, s) 797 #define READLINK(p, b, s) _win_readlink(p, b, s)
797 #define LSTAT(p, b) _win_lstat(p, b) 798 #define LSTAT(p, b) _win_lstat(p, b)
798 #define LSTAT64(p, b) _win_lstat64(p, b) 799 #define LSTAT64(p, b) _win_lstati64(p, b)
799 #define PRINTF printf 800 #define PRINTF printf
800 #define FPRINTF fprintf 801 #define FPRINTF fprintf
801 #define VPRINTF(f, a) vprintf(f, a) 802 #define VPRINTF(f, a) vprintf(f, a)
@@ -845,6 +846,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start);
845 #define TDESTROY(r, f) _win_tdestroy(r, f) 846 #define TDESTROY(r, f) _win_tdestroy(r, f)
846 #define LFIND(k, b, n, s, c) _win_lfind(k, b, n, s, c) 847 #define LFIND(k, b, n, s, c) _win_lfind(k, b, n, s, c)
847 #define LSEARCH(k, b, n, s, c) _win_lsearch(k, b, n, s, c) 848 #define LSEARCH(k, b, n, s, c) _win_lsearch(k, b, n, s, c)
849 #define STRUCT_STAT64 struct _stati64
848#endif 850#endif
849 851
850/* search.h */ 852/* search.h */