This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: Add ftruncate support to newlib/gdb-sim to unbreak -fprofile-arcs
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: Nathan Sidwell <nathan at codesourcery dot com>,newlib at sources dot redhat dot com, gdb-patches at sources dot redhat dot com,gcc at gcc dot gnu dot org
- Date: Wed, 09 Jul 2003 16:41:57 -0400
- Subject: Re: RFA: Add ftruncate support to newlib/gdb-sim to unbreak -fprofile-arcs
- Organization: Red Hat Inc.
- References: <200307092012.h69KC3P04817@linsvr1.uk.superh.com>
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.