Issue: #include <stdio.h> shall not cause intmax_t to be defined

Sebastian Huber sebastian.huber@embedded-brains.de
Wed May 4 07:59:54 GMT 2022


On 03/05/2022 19:00, Corinna Vinschen wrote:
> On Apr 27 00:41, Pavel M wrote:
>> Hi all,
>>
>> Issue: #include <stdio.h> shall not cause intmax_t to be defined. However,
>> now it causes. This is because now <stdio.h> includes <sys/types.h>, which
>> includes <sys/_stdint.h>.
>> Note: per C11 the types intmax_t and uintmax_t defined in the header
>> <stdint.h>, and <stdint.h> is not included in <stdio.h>.
>> Consider fixing.
> I pushed a patch to fix this.

In FreeBSD, <sys/types.h> provides the stdint.h types. Could we bring 
back this with

#if __BSD_VISIBLE
#include <machine/endian.h>
#include <sys/select.h>
#include <sys/_stdint.h>
#  define	physadr		physadr_t
#  define	quad		quad_t

?

In addition, the C11 header files should not include <sys/types.h>.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the Newlib mailing list