RTEMS Targets Issue #2 - ftello()/fseeko()
Yaakov Selkowitz
yselkowitz@cygwin.com
Sun Mar 20 03:35:00 GMT 2016
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
More information about the Newlib
mailing list