Ignore:
Timestamp:
Jan 28, 2015, 5:14:00 PM (11 years ago)
Author:
bird
Message:

More generic ENOSPC workaround for windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/mscfakes.h

    r2713 r2759  
    2828#ifdef _MSC_VER
    2929
     30/* Include the config file (kmk's) so we don't need to duplicate stuff from it here. */
     31#include "config.h"
     32
    3033#include <io.h>
    3134#include <direct.h>
     
    3437#include <malloc.h>
    3538#include "getopt.h"
     39#ifndef MSCFAKES_NO_WINDOWS_H
     40# include <Windows.h>
     41#endif
    3642
    37 /* Note: Duplicated it config.h.win */
    3843#include <sys/stat.h>
    3944#include <io.h>
     
    7984typedef unsigned short gid_t;
    8085#endif
     86#if defined(_M_AMD64) || defined(_M_X64) || defined(_M_IA64) || defined(_WIN64)
     87typedef __int64 ssize_t;
     88#else
    8189typedef long ssize_t;
     90#endif
    8291typedef unsigned long u_long;
    8392typedef unsigned int u_int;
    8493typedef unsigned short u_short;
    8594
    86 #ifndef timerisset
     95#if !defined(timerisset) && defined(MSCFAKES_NO_WINDOWS_H)
    8796struct timeval
    8897{
     
    138147int symlink(const char *pszDst, const char *pszLink);
    139148int utimes(const char *pszPath, const struct timeval *paTimes);
    140 int writev(int fd, const struct iovec *vector, int count);
     149ssize_t writev(int fd, const struct iovec *vector, int count);
    141150
    142 
     151/* bird write ENOSPC hacks. */
     152#undef write
     153#define write msc_write
     154ssize_t msc_write(int fd, const void *pvSrc, size_t cbSrc);
    143155
    144156/*
Note: See TracChangeset for help on using the changeset viewer.