This is the mail archive of the
mailing list for the newlib project.
Re: RTEMS Target Issue #4 - timespec2bintime and strptime
- From: Yaakov Selkowitz <yselkowitz at cygwin dot com>
- To: newlib at sourceware dot org
- Date: Mon, 21 Mar 2016 11:37:36 -0500
- Subject: Re: RTEMS Target Issue #4 - timespec2bintime and strptime
- Authentication-results: sourceware.org; auth=none
- References: <56EF45D7 dot 9030306 at oarcorp dot com> <56EF5701 dot 1080100 at cygwin dot com> <56F0215F dot 9040007 at oarcorp dot com>
- Reply-to: newlib at sourceware dot org
On 2016-03-21 11:29, Joel Sherrill wrote:
On 3/20/2016 9:05 PM, Yaakov Selkowitz wrote:
On 2016-03-20 19:52, Joel Sherrill wrote:
I have stripped a new warning in RTEMS down to needing to
define both _XOPEN_SOURCE and _BSD_SOURCE to be able
to use strptime() and timespec2bintime() in the same file.
Does the use of feature enable macros look OK in this
strptime is clearly _XOPEN_SOURCE, which is not part of the default set:
And timespec2bintime is a BSDism, per:
feature_test_macros(7) states: "If any of ... _XOPEN_SOURCE, ... is
explicitly defined, then _BSD_SOURCE, _SVID_SOURCE, and _DEFAULT_SOURCE
are not defined by default."
Therefore, both are required.
I thought I had the example and real code compiling without issues
yesterday but today, it gives a warning.
Does my example compile OK with -Wall on a bare metal target?
Just the expected unused warnings, no implicit declarations.