Changeset 4888


Ignore:
Timestamp:
Nov 5, 2014, 1:23:27 AM (5 years ago)
Author:
Sam Hocevar
Message:

win32: update to newer mingw compiler version.

Location:
zzuf/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/build-win32

    r4253 r4888  
    1818cd "${BUILDDIR}"
    1919# Build for win32
    20 "${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/ --libdir=/
     20"${SRCDIR}/configure" --host=i686-w64-mingw32 --prefix=/ --bindir=/ --libdir=/
    2121
    2222make pkglibdir=/ pkgdatadir=/data bindir=/
  • zzuf/trunk/configure.ac

    r4887 r4888  
    7979  [#include <sys/types.h>
    8080   #include <sys/socket.h>])
     81AC_CHECK_TYPES(fpos64_t, [], [],
     82  [#define _LARGEFILE64_SOURCE
     83   #define _LARGEFILE_SOURCE
     84   #include <stdio.h>])
    8185
    8286AC_MSG_CHECKING(for connect() second argument)
     
    156160 [ac_v_fpos64_t="(x)"])
    157161AC_MSG_RESULT($ac_v_fpos64_t)
    158 AC_DEFINE_UNQUOTED(FPOS_CAST(x), $ac_v_fpos64_t, [Define to a macro for accessing an fpos64_t variable])
     162AC_DEFINE_UNQUOTED(FPOS64_CAST(x), $ac_v_fpos64_t, [Define to a macro for accessing an fpos64_t variable])
    159163
    160164AC_MSG_CHECKING(for pragma INIT/FINI)
  • zzuf/trunk/msvc/config.h

    r4839 r4888  
    4444/* #undef HAVE_FOPEN64 */
    4545/* #undef HAVE_FORK */
     46/* #undef HAVE_FPOS64_T */
    4647/* #undef HAVE_FREAD_UNLOCKED */
    4748/* #undef HAVE_FREEBSD_FILE */
  • zzuf/trunk/src/libzzuf/lib-fd.c

    r4809 r4888  
    7878
    7979#if defined CONNECT_USES_STRUCT_SOCKADDR
     80#   define SOCKADDR_T struct sockaddr
     81#elif defined HAVE_WINSOCK2_H
    8082#   define SOCKADDR_T struct sockaddr
    8183#else
  • zzuf/trunk/src/libzzuf/lib-stream.c

    r4810 r4888  
    5353#include "fd.h"
    5454
     55#if defined HAVE_FPOS64_T
     56#   define FPOS64_T fpos64_t
     57#else
     58#   define FPOS64_T fpos_t
     59#endif
     60
    5561#if defined HAVE___SREFILL
    5662#undef __srefill
     
    102108#endif
    103109#if defined HAVE_FSETPOS64
    104 static int     (*ORIG(fsetpos64))(FILE *stream, const fpos64_t *pos);
     110static int     (*ORIG(fsetpos64))(FILE *stream, const FPOS64_T *pos);
    105111#endif
    106112#if defined HAVE___FSETPOS64
    107 static int     (*ORIG(__fsetpos64)) (FILE *stream, const fpos64_t *pos);
     113static int     (*ORIG(__fsetpos64)) (FILE *stream, const FPOS64_T *pos);
    108114#endif
    109115static void    (*ORIG(rewind))   (FILE *stream);
     
    387393    } while(0)
    388394
     395#if HAVE_FPOS64_T
     396#   define FPOS_T_TO_INT64_T(x) ((int64_t)FPOS64_CAST(x))
     397#else
     398#   define FPOS_T_TO_INT64_T(x) ((int64_t)(x))
     399#endif
     400
    389401#define ZZ_FSETPOS(myfsetpos) \
    390402    do \
     
    413425                         get_stream_cnt(stream) + get_stream_off(stream)); \
    414426        } \
    415         _zz_setpos(fd, (int64_t)FPOS_CAST(*pos)); \
     427        _zz_setpos(fd, FPOS_T_TO_INT64_T(*pos)); \
    416428        debug_stream("after", stream); \
    417429        debug("%s([%i], %lli) = %i", __func__, \
    418               fd, (long long int)FPOS_CAST(*pos), ret); \
     430              fd, (long long int)FPOS_T_TO_INT64_T(*pos), ret); \
    419431    } \
    420432    while(0)
     
    483495#if defined HAVE_FSETPOS64
    484496#undef fsetpos64
    485 int NEW(fsetpos64)(FILE *stream, const fpos64_t *pos)
     497int NEW(fsetpos64)(FILE *stream, const FPOS64_T *pos)
    486498{
    487499    int ret; ZZ_FSETPOS(fsetpos64); return ret;
     
    491503#if defined HAVE___FSETPOS64
    492504#undef __fsetpos64
    493 int NEW(__fsetpos64)(FILE *stream, const fpos64_t *pos)
     505int NEW(__fsetpos64)(FILE *stream, const FPOS64_T *pos)
    494506{
    495507    int ret; ZZ_FSETPOS(__fsetpos64); return ret;
  • zzuf/trunk/src/libzzuf/lib-win32.c

    r4839 r4888  
    425425zzuf_table_t table_win32[] =
    426426{
     427#if defined HAVE_CLOSEHANDLE
    427428    DIVERT(CloseHandle),
     429#endif
     430#if defined HAVE_CREATEFILEA
    428431    DIVERT(CreateFileA),
     432#endif
     433#if defined HAVE_CREATEFILEW
    429434    DIVERT(CreateFileW),
     435#endif
     436#if defined HAVE_READFILE
    430437    DIVERT(ReadFile),
     438#endif
     439#if defined HAVE_READFILEEX
    431440    DIVERT(ReadFileEx),
     441#endif
     442#if defined HAVE_CREATEIOCOMPLETIONPORT
    432443    DIVERT(CreateIoCompletionPort),
     444#endif
     445#if defined HAVE_GETQUEUEDCOMPLETIONSTATUS
    433446    DIVERT(GetQueuedCompletionStatus),
     447#endif
     448#if defined HAVE_GETOVERLAPPEDRESULT
    434449    DIVERT(GetOverlappedResult),
     450#endif
     451#if defined HAVE_CREATEFILEMAPPINGA
    435452    DIVERT(CreateFileMappingA),
     453#endif
     454#if defined HAVE_CREATEFILEMAPPINGW
    436455    DIVERT(CreateFileMappingW),
     456#endif
     457#ifdef HAVE_MAPVIEWOFFILE
    437458    DIVERT(MapViewOfFile),
     459#endif
    438460
    439461#if defined HAVE_ALLOCCONSOLE
  • zzuf/trunk/src/libzzuf/libzzuf.h

    r4827 r4888  
    3838
    3939#ifdef _WIN32
    40 #   include <Windows.h>
     40#   include <windows.h>
    4141extern CRITICAL_SECTION _zz_pipe_cs;
    4242#endif
  • zzuf/trunk/src/libzzuf/network.c

    r4834 r4888  
    3030#   include <arpa/inet.h>
    3131#elif defined HAVE_WINSOCK2_H
    32 #   include <WinSock2.h>
    33 #   include <WS2tcpip.h>
     32#   include <winsock2.h>
     33#   include <ws2tcpip.h>
    3434#endif
    3535
Note: See TracChangeset for help on using the changeset viewer.