This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] arm, provide ftruncate() and truncate() stubs.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- Cc: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Mon, 18 Nov 2013 09:41:28 +0000
- Subject: Re: [PATCH] arm, provide ftruncate() and truncate() stubs.
- Authentication-results: sourceware.org; auth=none
- References: <52850739 dot 3030409 at arm dot com>
On 14/11/13 17:24, Marcus Shawcroft wrote:
> This one might be a tad contraversial...
>
But obviously not controversial enough to cause any responses.
> We have a customer providing his own libgloss. His libgloss provides a
> sane ftruncate(). The vanilla ARM libgloss does not provide an
> ftruncate() implementation hence when libgfortran is configured,
> autoconf does not detect ftruncate() and configures in a call to emit a
> run time diagnostic instead of calling ftruncate().
>
> The intention here is to provide an ftruncate stub to ensure that
> libgfortran configury configures in the ftruncate call. The stub always
> returns failure because we have no mechanism to implement a sane
> ftruncate over the AngelAPI.
>
> OK?
>
> Cheers
> /Marcus
>
> libgloss
>
> * arm/ftruncate.c: New.
> * arm/truncate.c: New.
> * arm/Makefile.in (RDPMON_OBJS): Add ftruncate.o and truncate.o.
> (rdimon-ftruncate.o, rdimon-truncate.o): New rule:
>
> newlib
>
> * libc/include/sys/unistd.h (ftruncate, truncate): Define
> for __arm__.
OK.
R.