mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [RFC PATCH] time.h: drop non-standard and out-of-date CLOCK_SGI_CYCLE
@ 2024-11-21 17:40 Yao Zi
  2025-02-22  0:27 ` Rich Felker
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Zi @ 2024-11-21 17:40 UTC (permalink / raw)
  To: musl; +Cc: Yao Zi

This definition was introduced in commit d74e462a ("add CLOCK_TAI (and
CLOCK_SGI_CYCLE) clock ids to time.h added in linux-v3.10 commit
1ff3c9677bff7e468e0c487d0ffefe4e901d33f4"). However, it's actually a
platform specific feature, available only on SGI SN2 IA64 systems. Its
Linux support has been removed later in commit 07903ada9613
("mmtimer: Remove the SGI SN2 mmtimer driver").

Having this definition is known to cause applications misdetect the
environment. There's no reason to keep a non-standard, seldom-available
and removed-since-4.13-kernel macro in a standard header.

Signed-off-by: Yao Zi <ziyao@disroot.org>
---
 include/time.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/time.h b/include/time.h
index 3d948372..0fe02111 100644
--- a/include/time.h
+++ b/include/time.h
@@ -94,7 +94,6 @@ struct itimerspec {
 #define CLOCK_BOOTTIME           7
 #define CLOCK_REALTIME_ALARM     8
 #define CLOCK_BOOTTIME_ALARM     9
-#define CLOCK_SGI_CYCLE         10
 #define CLOCK_TAI               11
 
 #define TIMER_ABSTIME 1
-- 
2.47.0


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

* Re: [musl] [RFC PATCH] time.h: drop non-standard and out-of-date CLOCK_SGI_CYCLE
  2024-11-21 17:40 [musl] [RFC PATCH] time.h: drop non-standard and out-of-date CLOCK_SGI_CYCLE Yao Zi
@ 2025-02-22  0:27 ` Rich Felker
  2025-02-22  3:17   ` Yao Zi
  0 siblings, 1 reply; 3+ messages in thread
From: Rich Felker @ 2025-02-22  0:27 UTC (permalink / raw)
  To: Yao Zi; +Cc: musl

On Thu, Nov 21, 2024 at 05:40:16PM +0000, Yao Zi wrote:
> This definition was introduced in commit d74e462a ("add CLOCK_TAI (and
> CLOCK_SGI_CYCLE) clock ids to time.h added in linux-v3.10 commit
> 1ff3c9677bff7e468e0c487d0ffefe4e901d33f4"). However, it's actually a
> platform specific feature, available only on SGI SN2 IA64 systems. Its
> Linux support has been removed later in commit 07903ada9613
> ("mmtimer: Remove the SGI SN2 mmtimer driver").
> 
> Having this definition is known to cause applications misdetect the
> environment. There's no reason to keep a non-standard, seldom-available
> and removed-since-4.13-kernel macro in a standard header.
> 
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
>  include/time.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/time.h b/include/time.h
> index 3d948372..0fe02111 100644
> --- a/include/time.h
> +++ b/include/time.h
> @@ -94,7 +94,6 @@ struct itimerspec {
>  #define CLOCK_BOOTTIME           7
>  #define CLOCK_REALTIME_ALARM     8
>  #define CLOCK_BOOTTIME_ALARM     9
> -#define CLOCK_SGI_CYCLE         10
>  #define CLOCK_TAI               11
>  
>  #define TIMER_ABSTIME 1
> -- 
> 2.47.0

I think this looks ok. Any objections?

Rich

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

* Re: [musl] [RFC PATCH] time.h: drop non-standard and out-of-date CLOCK_SGI_CYCLE
  2025-02-22  0:27 ` Rich Felker
@ 2025-02-22  3:17   ` Yao Zi
  0 siblings, 0 replies; 3+ messages in thread
From: Yao Zi @ 2025-02-22  3:17 UTC (permalink / raw)
  To: musl

On Fri, Feb 21, 2025 at 07:27:25PM -0500, Rich Felker wrote:
> On Thu, Nov 21, 2024 at 05:40:16PM +0000, Yao Zi wrote:
> > This definition was introduced in commit d74e462a ("add CLOCK_TAI (and
> > CLOCK_SGI_CYCLE) clock ids to time.h added in linux-v3.10 commit
> > 1ff3c9677bff7e468e0c487d0ffefe4e901d33f4"). However, it's actually a
> > platform specific feature, available only on SGI SN2 IA64 systems. Its
> > Linux support has been removed later in commit 07903ada9613
> > ("mmtimer: Remove the SGI SN2 mmtimer driver").
> > 
> > Having this definition is known to cause applications misdetect the
> > environment. There's no reason to keep a non-standard, seldom-available
> > and removed-since-4.13-kernel macro in a standard header.
> > 
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
> >  include/time.h | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/include/time.h b/include/time.h
> > index 3d948372..0fe02111 100644
> > --- a/include/time.h
> > +++ b/include/time.h
> > @@ -94,7 +94,6 @@ struct itimerspec {
> >  #define CLOCK_BOOTTIME           7
> >  #define CLOCK_REALTIME_ALARM     8
> >  #define CLOCK_BOOTTIME_ALARM     9
> > -#define CLOCK_SGI_CYCLE         10
> >  #define CLOCK_TAI               11
> >  
> >  #define TIMER_ABSTIME 1
> > -- 
> > 2.47.0
> 
> I think this looks ok. Any objections?
> 

Should I send it as formal patch again, or are you okay with picking the
RFC one directly?

> Rich

Thanks,
Yao Zi

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

end of thread, other threads:[~2025-02-22  3:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-21 17:40 [musl] [RFC PATCH] time.h: drop non-standard and out-of-date CLOCK_SGI_CYCLE Yao Zi
2025-02-22  0:27 ` Rich Felker
2025-02-22  3:17   ` Yao Zi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).