ada/adaint.c (__gnat_copy_attribs): RTEMS should use utime()

Message ID 20210401183234.12742-1-joel@rtems.org
State New
Headers show
Series
  • ada/adaint.c (__gnat_copy_attribs): RTEMS should use utime()
Related show

Commit Message

Joel Sherrill April 1, 2021, 6:32 p.m.
Change the preprocessor logic so RTEMS uses utime().
    gcc/ada/
	* adaint.c (__gnat_copy_attribs): RTEMS should use utime().
---
 gcc/ada/adaint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.24.4

Comments

Andrew MacLeod via Gcc-patches April 1, 2021, 7:01 p.m. | #1
On 1 April 2021 20:32:34 CEST, Joel Sherrill <joel@rtems.org> wrote:
>Change the preprocessor logic so RTEMS uses utime().

>    gcc/ada/

>	* adaint.c (__gnat_copy_attribs): RTEMS should use utime().


RTEMS probably doesn't care alot about accurate time, from the looks. Otherwise it would not mandate use of the obsolescent utime() (AFA SUS is concerned WRT nanoseconds precision) it seems?
They probably know what they're doing I suppose.
thanks,
PS I shouldn't reply to none of my business, I know..
>---

> gcc/ada/adaint.c | 2 +-

> 1 file changed, 1 insertion(+), 1 deletion(-)

>

>diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c

>index 0a90c92402c..d3b83f61076 100644

>--- a/gcc/ada/adaint.c

>+++ b/gcc/ada/adaint.c

>@@ -3270,7 +3270,7 @@ __gnat_copy_attribs (char *from ATTRIBUTE_UNUSED,

>char *to ATTRIBUTE_UNUSED,

>      return -1;

>   }

> 

>-#if (defined (__vxworks) && _WRS_VXWORKS_MAJOR < 7)

>+#if (defined (__vxworks) && _WRS_VXWORKS_MAJOR < 7) ||

>defined(__rtems__)

> 

>   /* VxWorks prior to 7 only has utime.  */

>
Andrew MacLeod via Gcc-patches April 1, 2021, 7:08 p.m. | #2
On 1 April 2021 21:01:27 CEST, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
>On 1 April 2021 20:32:34 CEST, Joel Sherrill <joel@rtems.org> wrote:

>>Change the preprocessor logic so RTEMS uses utime().

>>    gcc/ada/

>>	* adaint.c (__gnat_copy_attribs): RTEMS should use utime().

>

>RTEMS probably doesn't care alot about accurate time, from the looks.

>Otherwise it would not mandate use of the obsolescent utime() (AFA SUS

>is concerned WRT nanoseconds precision) it seems?

>They probably know what they're doing I suppose.

>thanks,

>PS I shouldn't reply to none of my business, I know..


Meh. Okok. You got me. April 1st ;)
grats :)
Joel Sherrill April 1, 2021, 7:23 p.m. | #3
L

On Thu, Apr 1, 2021, 2:08 PM Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
wrote:

> On 1 April 2021 21:01:27 CEST, Bernhard Reutner-Fischer <

> rep.dot.nop@gmail.com> wrote:

> >On 1 April 2021 20:32:34 CEST, Joel Sherrill <joel@rtems.org> wrote:

> >>Change the preprocessor logic so RTEMS uses utime().

> >>    gcc/ada/

> >>      * adaint.c (__gnat_copy_attribs): RTEMS should use utime().

> >

> >RTEMS probably doesn't care alot about accurate time, from the looks.

> >Otherwise it would not mandate use of the obsolescent utime() (AFA SUS

> >is concerned WRT nanoseconds precision) it seems?

> >They probably know what they're doing I suppose.

> >thanks,

> >PS I shouldn't reply to none of my business, I know.

>


RTEMS is a single address space real-time operating system.  It's not that
we don't care about nanoaecond accurate time. It's just that we don't
support the utimesat() call yet. Given a choice, I'll take still compiles
and works. :)

A filesystem is not required with RTEMS and few deployed systems would have
much beyond a static root filesystem anyway.


> Meh. Okok. You got me. April 1st ;)

> grats :)

>


We'd be happy to have help implementing the missing POSIX *at() methods.
And that's not an April Fools Day joke. :)

--joel

>
Arnaud Charlet April 8, 2021, 10:01 a.m. | #4
> Change the preprocessor logic so RTEMS uses utime().

>     gcc/ada/

> 	* adaint.c (__gnat_copy_attribs): RTEMS should use utime().


This change is OK.

> ---

>  gcc/ada/adaint.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c

> index 0a90c92402c..d3b83f61076 100644

> --- a/gcc/ada/adaint.c

> +++ b/gcc/ada/adaint.c

> @@ -3270,7 +3270,7 @@ __gnat_copy_attribs (char *from ATTRIBUTE_UNUSED, char *to ATTRIBUTE_UNUSED,

>       return -1;

>    }

>  

> -#if (defined (__vxworks) && _WRS_VXWORKS_MAJOR < 7)

> +#if (defined (__vxworks) && _WRS_VXWORKS_MAJOR < 7) || defined(__rtems__)

>  

>    /* VxWorks prior to 7 only has utime.  */

>  

> -- 

> 2.24.4

>

Patch

diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 0a90c92402c..d3b83f61076 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -3270,7 +3270,7 @@  __gnat_copy_attribs (char *from ATTRIBUTE_UNUSED, char *to ATTRIBUTE_UNUSED,
      return -1;
   }
 
-#if (defined (__vxworks) && _WRS_VXWORKS_MAJOR < 7)
+#if (defined (__vxworks) && _WRS_VXWORKS_MAJOR < 7) || defined(__rtems__)
 
   /* VxWorks prior to 7 only has utime.  */