This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH 1/2] Move kernel dependent parts of <sys/time.h>
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: joel at rtems dot org
- Cc: newlib at sourceware dot org, "rtems-devel at rtems dot org" <devel at rtems dot org>
- Date: Fri, 8 Apr 2016 08:39:41 +0200
- Subject: Re: [PATCH 1/2] Move kernel dependent parts of <sys/time.h>
- Authentication-results: sourceware.org; auth=none
- References: <1460026724-14238-1-git-send-email-sebastian dot huber at embedded-brains dot de> <CAF9ehCW_1ji9ciVwm243xSPgwcYwmtYKC2qvYj1pjmZ57v71BQ at mail dot gmail dot com>
On 07/04/16 17:56, Joel Sherrill wrote:
Does this address the warning in the RTEMS main_date.c command that
popped up with the newlib guard changes?
No, this patch solves a completely different problem. The strptime() is
declared in <time.h> via
#if __XSI_VISIBLE
char *_EXFUN(strptime, (const char *__restrict,
const char *__restrict,
struct tm *__restrict));
#endif
which uses
#if (_XOPEN_SOURCE - 0) >= 700
#define __XSI_VISIBLE 700
#elif (_XOPEN_SOURCE - 0) >= 600
#define __XSI_VISIBLE 600
#elif (_XOPEN_SOURCE - 0) >= 500
#define __XSI_VISIBLE 500
#elif defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)
#define __XSI_VISIBLE 4
#elif defined(_XOPEN_SOURCE)
#define __XSI_VISIBLE 1
#else
#define __XSI_VISIBLE 0
#endif
I guess we need an
#define _XOPEN_SOURCE
#include <time.h>
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschÃftliche Mitteilung im Sinne des EHUG.