> > For future reference, TRT for this kind of problem is to
> > autoconf for the right struct field name, using AC_CHECK_MEMBER
> > or AC_CHECK_MEMBERS (then use e.g. #if HAVE_STAT_ST_MTIM / #if
> > HAVE_STAT_ST_MTIMESPEC, definitely not #if __APPLE__).
> 
> I'm not diasgreeing with your technical comment; now I am in a difficult 
> position.
> I don't have resources at the moment to make the changes you suggest, and
> Darwin is bootstrap-broken (at least for Ada).
> 
> so .. the attached is a workaround - now I've resolved the second bootstrap 
> issue
> on powerpc-darwin, I was able to test it more widely.
> 
> I have *not* applied the patch, pending a 'proper' solution at some 
> unspecified
> time in the future .. 

Your patch is OK, the "proper" solution is unlikely to appear anytime soon,
so let's not have best be the enemy of good (enough).

Arno

> Darwin has timeval entries for file access and modification
> times but they are named differently from those on Linux (and
> presumably everywhere else, since no other platform has
> reported an issue).
> ---
>  gcc/ada/adaint.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
> index b7406a03c31..560f3529442 100644
> --- a/gcc/ada/adaint.c
> +++ b/gcc/ada/adaint.c
> @@ -237,6 +237,11 @@ UINT __gnat_current_ccs_encoding;
>  
>  #include "adaint.h"
>  
> +#if defined (__APPLE__) && defined (st_mtime)
> +#define st_atim st_atimespec
> +#define st_mtim st_mtimespec
> +#endif
> +
>  /* Define symbols O_BINARY and O_TEXT as harmless zeroes if they are not
>     defined in the current system. On DOS-like systems these flags control
>     whether the file is opened/created in text-translation mode (CR/LF in

Reply via email to