[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modernize ftruncate module
From: |
Jim Meyering |
Subject: |
Re: modernize ftruncate module |
Date: |
Thu, 22 Sep 2011 11:34:40 +0200 |
Bruno Haible wrote:
> Hi Jim,
>
> Here's a proposal to modernize the 'ftruncate' module. It's triggered by link
> errors that I got on MSVC 9, because the 'ftruncate' module, while present in
> gnulib, is marked as 'obsolete' and therefore not included by default.
> This classification was based on the knowledge that all modern Unix platforms
> have ftruncate(), mingw too, and MSVC was not yet a portability target.
>
> But now that MSVC is worth considering (because we have a standard 'compile'
> script for it in GNU, and there is demand from Octave), the actions that make
> sense are:
> - drop the old code for SVR2 platforms,
> - keep the code for native Windows platforms,
> - un-deprecate the module.
>
> Additional improvements:
> - Include <io.h>, for the declaration of chsize().
> - Depend on 'largefile', for automatic use of ftruncate64.
>
>
> 2011-09-21 Bruno Haible <address@hidden>
>
> ftruncate: Un-deprecate, concentrate on Win32 support.
> * modules/ftruncate (Status, Notice): Remove sections.
> (Depends-on): Add largefile.
> * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Drop failure message on non-mingw
> platforms.
> * lib/ftruncate.c: Remove code for the older platforms. For Win32,
> include
> <io.h>.
> * modules/perror-tests (Depends-on): Add ftruncate.
> * doc/posix-functions/ftruncate.texi: Mention the MSVC problem and the
> 'ftruncate' module.
That sounds fine.