1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-03 06:04:53 +00:00

- Update to 0.11.1+1

This commit is contained in:
Andrew Pantyukhin 2007-08-08 08:34:54 +00:00
parent 46753a1bd9
commit 3fccfd4d01
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=197327
3 changed files with 47 additions and 4 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= aria2
DISTVERSION= 0.10.2+1
DISTVERSION= 0.11.1+1
CATEGORIES= www
MASTER_SITES= SFE

View File

@ -1,3 +1,3 @@
MD5 (aria2-0.10.2+1.tar.bz2) = 2e1627808689f8eea9ed574ac450481a
SHA256 (aria2-0.10.2+1.tar.bz2) = e61e33d203576dca32a775431db8972b49080379435509d9dce8ac59b4f79a16
SIZE (aria2-0.10.2+1.tar.bz2) = 453403
MD5 (aria2-0.11.1+1.tar.bz2) = d0e91aa3e673d5c26e4f65b401e90189
SHA256 (aria2-0.11.1+1.tar.bz2) = 516d40da3c98b8df43a1c32a7fb04efd79caad6e350096dc1313c6fd81f3edc2
SIZE (aria2-0.11.1+1.tar.bz2) = 473089

View File

@ -0,0 +1,43 @@
--- ./src/SimpleLogger.cc.orig 2007-06-12 14:50:40.000000000 +0400
+++ ./src/SimpleLogger.cc 2007-08-06 22:43:59.000000000 +0400
@@ -41,6 +41,14 @@
#include <stdio.h>
#include <errno.h>
+#if !defined(va_copy)
+# if defined(__va_copy)
+# define va_copy(dest, src) __va_copy(dest, src)
+# else
+# define va_copy(dest, src) (dest = src)
+# endif
+#endif
+
#define WRITE_LOG(LEVEL, MSG) \
va_list ap;\
va_start(ap, MSG);\
@@ -86,6 +94,8 @@
void SimpleLogger::writeLog(FILE* file, int level, const char* msg, va_list ap, Exception* e, bool printHeader) const
{
+ va_list apCopy;
+ va_copy(apCopy, ap);
string levelStr;
switch(level) {
case Logger::DEBUG:
@@ -114,7 +124,7 @@
if(printHeader) {
writeHeader(file, datestr, levelStr);
}
- vfprintf(file, string(Util::replace(msg, "\r", "")+"\n").c_str(), ap);
+ vfprintf(file, string(Util::replace(msg, "\r", "")+"\n").c_str(), apCopy);
for(Exception* nestedEx = e; nestedEx; nestedEx = nestedEx->getCause()) {
// TODO a quick hack not to print header in console
if(printHeader) {
@@ -123,6 +133,7 @@
fprintf(file, "exception: %s\n", Util::replace(nestedEx->getMsg(), "\r", "").c_str());
}
fflush(file);
+ va_end(apCopy);
}
void SimpleLogger::writeFile(int level, const char* msg, va_list ap, Exception* e) const {