Changeset 2892 for box/trunk/lib


Ignore:
Timestamp:
27/03/2011 16:50:54 (14 months ago)
Author:
chris
Message:

Add inline definition of ftruncate to fix MSVC compile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/win32/emu.h

    r2873 r2892  
    436436int console_read(char* pBuffer, size_t BufferSize); 
    437437 
     438// Defined thus by MinGW, but missing from MSVC 
     439// [http://curl.haxx.se/mail/lib-2004-11/0260.html] 
     440#ifndef HAVE_FTRUNCATE 
     441        int ftruncate(int, off_t);  
     442        inline int ftruncate(int __fd, off_t __length)  
     443        {  
     444                return _chsize(__fd, __length);  
     445        }  
     446#endif 
     447 
    438448#ifdef _MSC_VER 
    439449        /* disable certain compiler warnings to be able to actually see the show-stopper ones */ 
Note: See TracChangeset for help on using the changeset viewer.