#119 IPv6 support for Windows, again

closed-accepted
5
2010-10-24
2010-01-30
Anonymous
No

Seems I can't upload new patch in the old thread, so I make a new one.

Actually, I really don't know anything about autoconf, so I'm not sure this patch do things in right way. However, it works. Hope it's useful.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-01-30
     
  • Fabian Keil

    Fabian Keil - 2010-01-30

    Great, thanks.

    The autoconf changes look reasonable to, although so far I only tested that it still works on FreeBSD.

    I suspect that the line 'CFLAGS="$CFLAGS -DWINVER=0x501"' could cause problems on Windows 95, 98 and ME, but that's a minor issue and shouldn't be too hard to fix.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-01-31

    According to the MSDN (http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx), if we want to keep compatibility with Windows 2k and etc, we need to include ws2tcpip.h and wspiapi.h. But mingw doesn't have wspiapi.h, and ws2tcpip.h just looks like this:

    #if (_WIN32_WINNT >= 0x0501)
    void WSAAPI freeaddrinfo (struct addrinfo*);
    int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
    struct addrinfo**);
    int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
    char*,DWORD,int);
    #else
    /* FIXME: Need WS protocol-independent API helpers. */
    #endif

    So, unless patch mingw, WINVER might be requisite for IPv6.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-01-31

    I tried to build with MinGW-w64 (http://sourceforge.net/projects/mingw-w64), it can be done with some warnings.

    1. Install Cygwin (autoconf, zlib, etc) to CYGDIR.
    2. Download mingw-w32-bin_i686-mingw_20100123_sezero.zip and unzip it.
    3. Rename mingw32 to mingw64 and move it to CYGWIN.
    4. From CYGWIN/usr/include, copy zconf.h and zlib.h to CYGWIN/mingw64/i686-w64-mingw32/include.
    5. From CYGWIN/lib/mingw, copy libz.a to CYGWIN/mingw64/i686-w64-mingw32/lib.
    6. Uncompress privoxy-3.0.15-beta-src.tar.gz, patch with ipv6_mingw64.diff.
    7. export PATH=/mingw64/bin:$PATH
    8. autoheader, autoconf, configure --enable-mingw32, then make.

    Make Output:

    gcc -c -pipe -O2 -mwindows -mno-cygwin -Wall -Ipcre errlog.c -o errlog.o
    errlog.c: In function 'log_error':
    errlog.c:750: warning: unknown conversion type character 'l' in format
    errlog.c:750: warning: too many arguments for format

    gcc -c -pipe -O2 -mwindows -mno-cygwin -Wall -Ipcre jbsockets.c -o jbsockets.o
    jbsockets.c: In function 'connect_to':
    jbsockets.c:300: warning: passing argument 4 of 'getsockopt' from incompatible p
    ointer type
    d:\opt\cygwin\mingw64\bin\../lib/gcc/i686-w64-mingw32/4.4.3/../../../../i686-w64
    -mingw32/include/winsock2.h:1301: note: expected 'char *' but argument is of typ
    e 'int *'

    gcc -c -pipe -O2 -mwindows -mno-cygwin -Wall -Ipcre parsers.c -o parsers.o
    In file included from parsers.c:102:
    strptime.h: In function 'strptime_internal':
    strptime.h:538: warning: suggest explicit braces to avoid ambiguous 'else'
    parsers.c: In function 'create_content_length_header':
    parsers.c:4236: warning: unknown conversion type character 'l' in format
    parsers.c:4236: warning: too many arguments for format

    windres -D__MINGW32__=0.2 -O coff -i w32.rc -o w32.res
    <command-line>: warning: "__MINGW32__" redefined
    <built-in>: warning: this is the location of the previous definition

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-01-31
     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-01-31

    privoxy.exe (3.0.15) build with MinGW-w64

     
  • Fabian Keil

    Fabian Keil - 2010-10-10

    Patch committed, thanks again.

    We usually give contributors credit with real name (or an abbreviation thereof). If it isn't known, we use the SF name in the ChangeLog only. Please let me know which name to use.

     
  • Fabian Keil

    Fabian Keil - 2010-10-10
    • assigned_to: nobody --> fabiankeil
    • status: open --> pending-accepted
     
  • SourceForge Robot

    • status: pending-accepted --> closed-accepted
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks