RFA: Add ftruncate support to newlib/gdb-sim to unbreak -fprofile-arcs

J. Johnston jjohnstn@redhat.com
Wed Jul 9 20:42:00 GMT 2003


I would recommend separating out the ftruncate and truncate prototypes in
sys/unistd.h so as to keep the number of #if defined(x).. groupings to a minimum.
Other than that minor nit, no problems checking it in from the newlib perspective.

-- Jeff J.

Joern Rennecke wrote:
>>>--- libc/sys/sh/truncate.c	Wed Jul  9 17:18:48 2003
>>>***************
>>>*** 0 ****
>>>--- 1,9 ----
>>>+ #include <_ansi.h>
>>>+ #include <sys/types.h>
>>>+ #include "sys/syscall.h"
>>>+ 
>>>+ int
>>>+ truncate (const char *path, off_t length)
>>>+ {
>>>+   return __trap34 (SYS_ftruncate, path, length, 0);
>>
>>                            ^ typo?
> 
> 
> Oops, yes, that should be SYS_truncate.  Please consider the newlib patch
> thusly amended.
> 




More information about the Gdb-patches mailing list