Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-23 Thread Hans-Peter Nilsson
On Fri, 23 Oct 2020, Arnaud Charlet wrote: > > > 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

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-23 Thread Arnaud Charlet
> > 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

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-23 Thread Iain Sandoe
Hans-Peter Nilsson wrote: > On Wed, 21 Oct 2020, Iain Sandoe wrote: > >> Arnaud Charlet wrote: >> This patch breaks bootstrap on Darwin platforms. Pierre-Marie de Rodat wrote: > The modification file time precision now defined by OS. > > Tested on

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-22 Thread Hans-Peter Nilsson
On Wed, 21 Oct 2020, Iain Sandoe wrote: > Arnaud Charlet wrote: > > > > This patch breaks bootstrap on Darwin platforms. > > > > > > Pierre-Marie de Rodat wrote: > > > > > > > The modification file time precision now defined by OS. > > > > > > > > Tested on x86_64-pc-linux-gnu, committed on

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-21 Thread Arnaud Charlet
> >What about instead putting above extern long long __gnat_file_time the > >following: > > > >#if __APPLE__ > >#define st_mtim st_mtimespec > >#define st_atim st_atimespec > >#endif > > > >To avoid having the two (nested) #if __APPLE__ and keep the code easier two => three :-) > >to follow? >

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-21 Thread Iain Sandoe
Arnaud Charlet wrote: This patch breaks bootstrap on Darwin platforms. Pierre-Marie de Rodat wrote: The modification file time precision now defined by OS. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * adaint.c (__gnat_file_time): New routine.

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-21 Thread Arnaud Charlet
> This patch breaks bootstrap on Darwin platforms. > > Pierre-Marie de Rodat wrote: > > > The modification file time precision now defined by OS. > > > > Tested on x86_64-pc-linux-gnu, committed on trunk > > > > gcc/ada/ > > > > * adaint.c (__gnat_file_time): New routine. > >

Re: [Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-21 Thread Iain Sandoe via Gcc-patches
Hi Folks, This patch breaks bootstrap on Darwin platforms. Pierre-Marie de Rodat wrote: > The modification file time precision now defined by OS. > > Tested on x86_64-pc-linux-gnu, committed on trunk > > gcc/ada/ > > * adaint.c (__gnat_file_time): New routine. >

[Ada] Improve precision of Ada.Directories.Modification_Time

2020-10-21 Thread Pierre-Marie de Rodat
The modification file time precision now defined by OS. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * adaint.c (__gnat_file_time): New routine. (__gnat_copy_attribs): Copy timestamps in nanoseconds. * libgnat/a-direct.adb (C_Modification_Time): Bind to