libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 72d8598be9e3fa781a2f76631170defed61f0d6e
parent e4ec70ff4599c32ce00457a232ddb7c4108f5651
Author: Nils Durner <durner@gnunet.org>
Date:   Sun, 23 Jan 2005 04:35:35 +0000

Fix tarextractor (MinGW)

Diffstat:
Msrc/plugins/tarextractor.c | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/plugins/tarextractor.c b/src/plugins/tarextractor.c @@ -22,8 +22,9 @@ #include "extractor.h" #include <time.h> #include <zlib.h> -#include <langinfo.h> - +#ifndef MINGW + #include <langinfo.h> +#endif /* * Note that this code is not complete! @@ -164,7 +165,13 @@ struct EXTRACTOR_Keywords * libextractor_tar_extract(const char * filename, char tmbuf[60]; ctm = *gmtime(&ctime); - if (strftime(tmbuf, sizeof(tmbuf), nl_langinfo(D_FMT), &ctm)) + if (strftime(tmbuf, sizeof(tmbuf), +#ifndef MINGW + nl_langinfo(D_FMT), +#else + "%x", +#endif + &ctm)) prev = addKeyword(EXTRACTOR_CREATION_DATE, strdup(tmbuf), prev); }