This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Inconsistent guards for internal and user types
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Newlib <newlib at sourceware dot org>
- Date: Wed, 13 Apr 2016 10:44:52 +0200
- Subject: Inconsistent guards for internal and user types
- Authentication-results: sourceware.org; auth=none
Hello,
Newlib defines defaults for internal types via <sys/_types.h> and uses
<machine/_types.h> to let systems define their own type if necessary.
For example
#ifndef __dev_t_defined
typedef short __dev_t;
#endif
However, the __*_t_defined pattern conflicts with the glibc type guard
pattern for user types, e.g. dev_t in this this example. I suggest to
introduce a __machine_*_t_pattern for internal types (defined by
<machine/_types.h>, used by <sys/_types.h>). For example
#ifndef __machine_dev_t_defined
typedef short __dev_t;
#endif
--
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.