aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-12-22 14:15:01 +0000
committerLRN <lrn1986@gmail.com>2013-12-22 14:15:01 +0000
commit7bd83bdbb22f9672050731f12d9a6b216c47659f (patch)
tree26fe717547aef33c5b3ec7ebf359badfbd9658f4
parentdaed7f922eac6b057bc972df35c70b922026ac2d (diff)
downloadgnunet-7bd83bdbb22f9672050731f12d9a6b216c47659f.tar.gz
gnunet-7bd83bdbb22f9672050731f12d9a6b216c47659f.zip
Use newer plibc, adjust the code as needed
Use plibc_set_stat_size_size Use plibc_set_stat_time_size Update plibc header Check for _stati64 (needed due to the new plibc header)
-rw-r--r--configure.ac2
-rw-r--r--src/include/plibc.h6
-rw-r--r--src/util/winproc.c3
3 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index d4ce8a0ac..01b0d58d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -210,6 +210,8 @@ AC_CHECK_MEMBER(struct tm.tm_gmtoff,
210 , 210 ,
211 [#include <time.h>]) 211 [#include <time.h>])
212 212
213AC_CHECK_DECLS([_stati64])
214
213# 'save' libs; only those libs found so far will be 215# 'save' libs; only those libs found so far will be
214# linked against _everywhere_. For the others, we 216# linked against _everywhere_. For the others, we
215# will be more selective! 217# will be more selective!
diff --git a/src/include/plibc.h b/src/include/plibc.h
index 0ce666b3f..a58735260 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: 151 $ 25 * @version $Revision$
26 */ 26 */
27 27
28#ifndef _PLIBC_H_ 28#ifndef _PLIBC_H_
@@ -70,7 +70,7 @@ extern "C" {
70/* Convert LARGE_INTEGER to double */ 70/* Convert LARGE_INTEGER to double */
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 HAVE_DECL__STATI64
74struct _stati64 74struct _stati64
75{ 75{
76 _dev_t st_dev; 76 _dev_t st_dev;
@@ -517,6 +517,8 @@ unsigned plibc_get_handle_count();
517 517
518typedef void (*TPanicProc) (int, char *); 518typedef void (*TPanicProc) (int, char *);
519void plibc_set_panic_proc(TPanicProc proc); 519void plibc_set_panic_proc(TPanicProc proc);
520void plibc_set_stat_size_size(int iLength);
521void plibc_set_stat_time_size(int iLength);
520 522
521int flock(int fd, int operation); 523int flock(int fd, int operation);
522int fsync(int fildes); 524int fsync(int fildes);
diff --git a/src/util/winproc.c b/src/util/winproc.c
index 18fa368a9..4c07eba82 100644
--- a/src/util/winproc.c
+++ b/src/util/winproc.c
@@ -147,7 +147,8 @@ GNInitWinEnv ()
147 plibc_initialized (); 147 plibc_initialized ();
148 plibc_set_panic_proc (plibc_panic); 148 plibc_set_panic_proc (plibc_panic);
149 ret = plibc_init_utf8 ("GNU", PACKAGE, 1); 149 ret = plibc_init_utf8 ("GNU", PACKAGE, 1);
150 150 plibc_set_stat_size_size (8);
151 plibc_set_stat_time_size (4);
151 /* don't load other DLLs twice */ 152 /* don't load other DLLs twice */
152 if (hNTDLL) 153 if (hNTDLL)
153 return ret; 154 return ret;