[PATCH] Fix Ada bootstrap failure on Cygwin since switch to C++11 (PR98590)

Arnaud Charlet charlet@adacore.com
Fri Feb 5 13:59:25 GMT 2021


> > We'd rather not have PR references in the source files, so please remove it
> > (it will be there as part of the commit log and git annotate).
> >
> > OK with the comment updated.
> 
> Thanks, here's the revised patch.

OK, thanks.

> gcc/ada/
> 
> 2021-02-05  Mikael Pettersson  <mikpelinux@gmail.com>
> 
>         PR bootstrap/98590
>         * cstreams.c: Ensure fileno_unlocked() is visible on Cygwin.
> 
> diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
> index 4e00dedbbd6..7d64277110b 100644
> --- a/gcc/ada/cstreams.c
> +++ b/gcc/ada/cstreams.c
> @@ -37,6 +37,11 @@
>  #define _FILE_OFFSET_BITS 64
>  /* the define above will make off_t a 64bit type on GNU/Linux */
> 
> +/* tell Cygwin's <stdio.h> to expose fileno_unlocked() */
> +#if defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(_GNU_SOURCE)
> +#define _GNU_SOURCE
> +#endif
> +
>  #include <stdio.h>
>  #include <sys/types.h>
>  #include <sys/stat.h>


More information about the Gcc-patches mailing list