From: Fabian Keil Date: Sat, 22 Sep 2007 16:15:34 +0000 (+0000) Subject: - Let it compile with pcc. X-Git-Tag: v_3_0_7~149 X-Git-Url: http://www.privoxy.org/gitweb/show-status?a=commitdiff_plain;h=aa944637f685eec775f215f7122d4693fb842cea;p=privoxy.git - Let it compile with pcc. - Move our includes below system includes to prevent macro conflicts. --- diff --git a/errlog.c b/errlog.c index d424381a..c887baf2 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.52 2007/07/14 07:28:47 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.53 2007/08/05 13:53:14 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -33,6 +33,10 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.52 2007/07/14 07:28:47 fabiankeil E * * Revisions : * $Log: errlog.c,v $ + * Revision 1.53 2007/08/05 13:53:14 fabiankeil + * #1763173 from Stefan Huehner: declare some more functions + * static and use void instead of empty parameter lists. + * * Revision 1.52 2007/07/14 07:28:47 fabiankeil * Add translation function for JB_ERR_FOO codes. * @@ -282,14 +286,14 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.52 2007/07/14 07:28:47 fabiankeil E *********************************************************************/ -#include "config.h" -#include "miscutil.h" - #include #include #include #include +#include "config.h" +#include "miscutil.h" + #if defined(HAVE_STRLCPY) && defined(HAVE_GETTIMEOFDAY) #define USE_NEW_LOG_ERROR /* For gettimeofday() */ @@ -561,10 +565,12 @@ static inline size_t get_log_timestamp(char *buffer, size_t buffer_size) time_t now; struct tm tm_now; struct timeval tv_now; /* XXX: stupid name */ - gettimeofday(&tv_now, NULL); - long msecs = tv_now.tv_usec / 1000; + long msecs; int msecs_length = 0; + gettimeofday(&tv_now, NULL); + msecs = tv_now.tv_usec / 1000; + time(&now); #ifdef HAVE_LOCALTIME_R