This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: RTEMS Targets Issue #2 - ftello()/fseeko()
- From: Yaakov Selkowitz <yselkowitz at cygwin dot com>
- To: newlib at sourceware dot org
- Date: Sat, 19 Mar 2016 22:35:31 -0500
- Subject: Re: RTEMS Targets Issue #2 - ftello()/fseeko()
- Authentication-results: sourceware.org; auth=none
- References: <56ED87FD dot 2050406 at oarcorp dot com>
On 2016-03-19 12:10, Joel Sherrill wrote:
We have a few files which get warnings because
ftello() and/or fseeko() are not prototyped.
These were protected by:
#if !defined(__STRICT_ANSI__) || defined(__USE_XOPEN2K)
Note that __USE_* is the glibc form of the internal macros, where newlib
has (even prior to my changes) used the BSD form __*_VISIBLE. So this
was wrong to start with.
But now have:
#if __LARGEFILE_VISIBLE
The RTEMS fseeko() test does not explicitly define
__USE_XOPEN2K so I am guessing it was implicit before.
Does the newlib guard need tinkering, the RTEMS default
features, or the test code in RTEMS?
feature_test_macros(7) says that _XOPEN_SOURCE >= 500 includes these two
largefile functions implicitly, but fseeko(3) says they are also
POSIX.1-2001. Does changing the guard to:
#if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112
fix this issue?
--
Yaakov