From 44aab0b99f81fbc8c34c5bcc1674785867f7b349 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 23 May 2020 11:31:21 +0200 Subject: [PATCH] include/xlocale: Expose xlocale prototypes also upon wrong #include order. The correct order to expose xlocale prototypes is for example: #include #include This commit fixes the two cases where we didn't accept the reverse order. FreeBSD's commit msg says that some ports use the wrong order. Based-on: FreeBSD's r233600 Reported-by: zrj --- include/inttypes.h | 3 +++ include/stdio.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/inttypes.h b/include/inttypes.h index 6c72370481..7c1261518a 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -48,6 +48,9 @@ typedef struct { } imaxdiv_t; __BEGIN_DECLS +#ifdef _XLOCALE_H_ +#include +#endif intmax_t imaxabs(intmax_t) __pure2; imaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2; diff --git a/include/stdio.h b/include/stdio.h index b51064336e..d3e1a6a08c 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -191,6 +191,9 @@ __END_DECLS #define stderr __stderrp __BEGIN_DECLS +#ifdef _XLOCALE_H_ +#include +#endif /* * Functions defined in ANSI C standard. */ -- 2.11.4.GIT