public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] hurd: Do not include full <stdarg.h> in <hurd.h>
@ 2023-07-31 10:54 Florian Weimer
  2023-08-02 20:39 ` Samuel Thibault
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2023-07-31 10:54 UTC (permalink / raw)
  To: libc-alpha

This fixes a hurd/check-installed-headers-c failure with
-std=c89 #define _FORTIFY_SOURCE 1:

In file included from ../hurd/hurd.h:354,
                 from ../sysdeps/hurd/include/hurd.h:2,
                 from /tmp/cih_test_9IaUwa.c:10:
…/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:54:34: error: "__STDC_VERSION__" is not defined, evaluates to 0 [-Werror=undef]
   54 | #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \
      |                                  ^~~~~~~~~~~~~~~~
…/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:55:8: error: "__cplusplus" is not defined, evaluates to 0 [-Werror=undef]
   55 |     || __cplusplus + 0 >= 201103L
      |        ^~~~~~~~~~~
cc1: all warnings being treated as errors

---
 hurd/hurd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hurd/hurd.h b/hurd/hurd.h
index 06f00e93d6..a38e665676 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -350,12 +350,12 @@ extern int hurd_check_cancel (void);
 
 extern io_t __getdport (int fd), getdport (int fd);
 
-
+#define __need___va_list
 #include <stdarg.h>
 
 /* Write formatted output to PORT, a Mach port supporting the i/o protocol,
    according to the format string FORMAT, using the argument list in ARG.  */
-int vpprintf (io_t port, const char *format, va_list arg);
+int vpprintf (io_t port, const char *format, __gnuc_va_list arg);
 
 
 #endif	/* hurd.h */


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] hurd: Do not include full <stdarg.h> in <hurd.h>
  2023-07-31 10:54 [PATCH] hurd: Do not include full <stdarg.h> in <hurd.h> Florian Weimer
@ 2023-08-02 20:39 ` Samuel Thibault
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2023-08-02 20:39 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

Florian Weimer via Libc-alpha, le lun. 31 juil. 2023 12:54:50 +0200, a ecrit:
> This fixes a hurd/check-installed-headers-c failure with
> -std=c89 #define _FORTIFY_SOURCE 1:
> 
> In file included from ../hurd/hurd.h:354,
>                  from ../sysdeps/hurd/include/hurd.h:2,
>                  from /tmp/cih_test_9IaUwa.c:10:
> …/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:54:34: error: "__STDC_VERSION__" is not defined, evaluates to 0 [-Werror=undef]
>    54 | #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \
>       |                                  ^~~~~~~~~~~~~~~~
> …/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:55:8: error: "__cplusplus" is not defined, evaluates to 0 [-Werror=undef]
>    55 |     || __cplusplus + 0 >= 201103L
>       |        ^~~~~~~~~~~
> cc1: all warnings being treated as errors

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Thanks!

> ---
>  hurd/hurd.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hurd/hurd.h b/hurd/hurd.h
> index 06f00e93d6..a38e665676 100644
> --- a/hurd/hurd.h
> +++ b/hurd/hurd.h
> @@ -350,12 +350,12 @@ extern int hurd_check_cancel (void);
>  
>  extern io_t __getdport (int fd), getdport (int fd);
>  
> -
> +#define __need___va_list
>  #include <stdarg.h>
>  
>  /* Write formatted output to PORT, a Mach port supporting the i/o protocol,
>     according to the format string FORMAT, using the argument list in ARG.  */
> -int vpprintf (io_t port, const char *format, va_list arg);
> +int vpprintf (io_t port, const char *format, __gnuc_va_list arg);
>  
>  
>  #endif	/* hurd.h */
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-02 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-31 10:54 [PATCH] hurd: Do not include full <stdarg.h> in <hurd.h> Florian Weimer
2023-08-02 20:39 ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).