Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Add gmtime_r() to rule A.5 exceptions #68414

Merged

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Feb 1, 2024

Add gmtime_r() to rule's A.5 exception list, and move its implementation to common libc area, as per @stephanosio comment in #68003.

Fixes #68003
Fixes #68056

gmtime_r() has been in the minimal libc for years, however it was not
added to expcetions due to an overlook. In order to do this however, it
has to be moved first to the common libc area, so that it's available
to any libc that may not implement it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
According to commit 400c1fa which
introduced rule A.5 to the coding guidelines, the initial exception list
was based on the non-standard function availability in minimal libc.

gmtime_r() however, has not been included to the list, although it's
present in minimal libc since 3e8df8b.

This commit fixes this, by adding gmtime_r() to the rule A.5 exception
list.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Copy link
Member

@aescolar aescolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me

@keith-packard
Copy link
Collaborator

will need to update picolibc and the SDK for this. Is this going to land before the release?

@stephanosio
Copy link
Member

stephanosio commented Feb 2, 2024

will need to update picolibc and the SDK for this. Is this going to land before the release?

We will need to target the next release since there is not enough time to get that done.

@aescolar
Copy link
Member

@stephanosio should we just merge this? Both CI checks failures are false positives, and there is no hard need to wait for a new SDK release containing the latest pico, as the code which uses it sets the macros it needs today. Worse case, in the meanwhile, new code using it would see a build warning if those are not set.

@stephanosio
Copy link
Member

Scancode and compliance check failures are false positives. Merging.

@stephanosio stephanosio merged commit f250080 into zephyrproject-rtos:main Feb 27, 2024
24 of 26 checks passed
@rlubos rlubos deleted the libc/add-gmtime_r-to-exceptions branch July 1, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: C Library C Standard Library area: Coding Guidelines Coding guidelines and style area: Documentation
Projects
None yet
6 participants