Changeset 4653 for zzuf


Ignore:
Timestamp:
Sep 22, 2010, 9:47:56 PM (9 years ago)
Author:
Sam Hocevar
Message:

Fix zzat compilation on Win32 and create a .vcxproj file for it.

Location:
zzuf/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/msvc/config.h

    r4372 r4653  
    3333/* #undef HAVE_FGETLN */
    3434/* #undef HAVE_FGETS_UNLOCKED */
    35 #define HAVE_FOPEN64 1
     35/* #undef HAVE_FOPEN64 */
    3636/* #undef HAVE_FORK */
    3737/* #undef HAVE_FREAD_UNLOCKED */
  • zzuf/trunk/msvc/zzuf10.sln

    r3971 r4653  
    11
    22Microsoft Visual Studio Solution File, Format Version 11.00
    3 # Visual Studio 2010
     3# Visual C++ Express 2010
    44Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzuf", "zzuf.vcxproj", "{2E5723ED-A886-45A9-AAAC-3D02F2EFC358}"
    55EndProject
     
    77EndProject
    88Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zznop", "zznop.vcxproj", "{04486051-18D2-402D-91C0-3E0A8F2FD0D7}"
     9EndProject
     10Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzat", "zzat.vcxproj", "{83987482-7F82-427E-7832-809F80AB809C}"
    911EndProject
    1012Global
     
    2628                {04486051-18D2-402D-91C0-3E0A8F2FD0D7}.Release|Win32.ActiveCfg = Release|Win32
    2729                {04486051-18D2-402D-91C0-3E0A8F2FD0D7}.Release|Win32.Build.0 = Release|Win32
     30                {83987482-7F82-427E-7832-809F80AB809C}.Debug|Win32.ActiveCfg = Debug|Win32
     31                {83987482-7F82-427E-7832-809F80AB809C}.Debug|Win32.Build.0 = Debug|Win32
     32                {83987482-7F82-427E-7832-809F80AB809C}.Release|Win32.ActiveCfg = Release|Win32
     33                {83987482-7F82-427E-7832-809F80AB809C}.Release|Win32.Build.0 = Release|Win32
    2834        EndGlobalSection
    2935        GlobalSection(SolutionProperties) = preSolution
  • zzuf/trunk/src/zzat.c

    r4376 r4653  
    2525/* Needed for getc_unlocked() on OpenSolaris */
    2626#define __EXTENSIONS__
     27
     28#if defined _MSC_VER
     29#   include <io.h>
     30typedef int ssize_t;
     31#   define snprintf sprintf_s
     32#   define close _close
     33#endif
    2734
    2835#if defined HAVE_STDINT_H
     
    136143            break;
    137144        case 'r': /* --repeat */
    138             repeat = atoi(optarg);
     145            repeat = atoi(myoptarg);
    139146            break;
    140147        case 's': /* --squeeze-blank */
     
    371378}
    372379
    373 #define PARSECMD(fmt, arg...) \
     380#define PARSECMD(fmt, ...) \
    374381    (make_fmt(&parser, fmt) == sscanf(sequence, parser.tmpfmt, \
    375                                       ##arg, &parser.ch) \
     382                                      __VA_ARGS__, &parser.ch) \
    376383         && parser.ch == parser.lastch)
    377384
     
    578585#endif
    579586        else if (PARSECMD("rewind ( )"))
    580             MY_FSEEK(rewind(f), -retlen);
     587            MY_FSEEK(rewind(f), -(int)retlen);
    581588        else if (PARSECMD("ungetc ( )"))
    582589            MY_FSEEK(if(retoff) ungetc((unsigned char)retbuf[retoff - 1], f),
Note: See TracChangeset for help on using the changeset viewer.