[Privoxy-devel] Do extended statistics work on Windows?

Lee ler762 at gmail.com
Mon Sep 21 18:10:03 UTC 2020


On 9/21/20, Fabian Keil <fk at fabiankeil.de> wrote:
> I'm wondering if the attached patch is required to get
> FEATURE_EXTENDED_STATISTICS (enabled by configuring
> with --enable-extended-statistics) working on Windows.
>
> It is modelled after 23b99e99ad but we're still using
> %llu on Windows in errlog.c which seems inconsistent.

I don't think it's required - but it doesn't hurt either.

The mingw cross-compiler complains about %llu but it seems to work:

$cat llu.c
#include <stdio.h>
int main (int argc, char *argv[]) {
  unsigned long long int ull=12345678901234567890;
  printf("I64u: %I64u\n", ull);
  printf("llu : %llu\n",  ull);
}

$i686-w64-mingw32-gcc -Wall llu.c
llu.c: In function ‘main’:
llu.c:3:30: warning: integer constant is so large that it is unsigned
   unsigned long long int ull=12345678901234567890;
                              ^~~~~~~~~~~~~~~~~~~~
llu.c:5:19: warning: unknown conversion type character ‘l’ in format [-Wformat=]
   printf("llu : %llu\n",  ull);
                   ^
llu.c:5:10: warning: too many arguments for format [-Wformat-extra-args]
   printf("llu : %llu\n",  ull);
          ^~~~~~~~~~~~~~
llu.c:5:19: warning: unknown conversion type character ‘l’ in format [-Wformat=]
   printf("llu : %llu\n",  ull);
                   ^
llu.c:5:10: warning: too many arguments for format [-Wformat-extra-args]
   printf("llu : %llu\n",  ull);
          ^~~~~~~~~~~~~~

$./a
I64u: 12345678901234567890
llu : 12345678901234567890

$

Lee


More information about the Privoxy-devel mailing list