Skip to content

various: timespec/timeval.tv_sec is time_t, not long, according to POSIX #21379

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

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

kanavin
Copy link

@kanavin kanavin commented Aug 15, 2023

This matters on 32 bit systems configured with 64 bit time_t (so they survive beyond 2038). Casting them to long is causing loss of bits and badly mismatched time data.

@richardleach
Copy link
Contributor

I've approved the workflow to run, but don't know how portable this change is, since tv_sec might still be defined as a long in some platforms.

@tonycoz
Copy link
Contributor

tonycoz commented Aug 16, 2023

I think this is fine.

For maximum consistency it could use Time_t instead of time_t but there's already plenty of core code that uses time_t.

@kanavin
Copy link
Author

kanavin commented Aug 16, 2023

Can you help me understand the single failure?

@jkeenan
Copy link
Contributor

jkeenan commented Aug 16, 2023

Can you help me understand the single failure?

Can you help me understand the single failure?

  1. You have made changes to dist/threads-shared/shared.xs. This requires you to increment $VERSION in the corresponding .pm file, i.e., dist/threads-shared/lib/threads/shared.pm.
  2. You need to add your name and email address to AUTHORS. I believe you can do this by running perl Porting/updateAUTHORS.pl.
    After the above steps, run make test_porting to confirm that those errors have been corrected, then run the full suite (make test_harness) once more, then commit and re-push.

This matters on 32 bit systems configured with 64 bit time_t
(so they survive beyond 2038). Casting them to long is causing loss of bits
and badly mismatched time data.

Signed-off-by: Alexander Kanavin <[email protected]>
@kanavin
Copy link
Author

kanavin commented Aug 17, 2023

Thanks, I've done those changes.

@khwilliamson khwilliamson merged commit abe403b into Perl:blead Aug 21, 2023
@@ -8,7 +8,7 @@ use Config;

use Scalar::Util qw(reftype refaddr blessed);

our $VERSION = '1.68'; # Please update the pod, too.
our $VERSION = '1.69'; # Please update the pod, too.
Copy link
Contributor

Choose a reason for hiding this comment

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

The version number is reiterated in the POD on line 1.99, so probably (as per the comment) should be updated to 1.69.

brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Sep 7, 2024
A number of items are removed because the issues have already been resolved
with recipe patches (in separate commits).

Some issues were also resolved via upstream version updates:

glib-2.0 update to 2.78.0 that includes:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550

curl update to 8.3.0 that includes
curl/curl#11610

util-linux update to 2.39 that includes
util-linux/util-linux#2430
util-linux/util-linux@3ab9e69
util-linux/util-linux#2435

glib-networking update to 2.78.0 that includes
https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241

python3-cryptography update to 42.0.0 which resolves
pyca/cryptography#9370 via
pyca/cryptography#9964

perl update to 5.40.0 which resolves
Perl/perl5#21379

Signed-off-by: Alexander Kanavin <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Oct 17, 2024
A number of items are removed because the issues have already been resolved
with recipe patches (in separate commits).

Some issues were also resolved via upstream version updates:

glib-2.0 update to 2.78.0 that includes:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550

curl update to 8.3.0 that includes
curl/curl#11610

util-linux update to 2.39 that includes
util-linux/util-linux#2430
util-linux/util-linux@3ab9e69
util-linux/util-linux#2435

glib-networking update to 2.78.0 that includes
https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241

python3-cryptography update to 42.0.0 which resolves
pyca/cryptography#9370 via
pyca/cryptography#9964

perl update to 5.40.0 which resolves
Perl/perl5#21379

Signed-off-by: Alexander Kanavin <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Nov 15, 2024
A number of items are removed because the issues have been resolved
with recipe patches (in separate commits).

Some issues were also resolved via upstream version updates:

glib-2.0 update to 2.78.0 that includes:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550

curl update to 8.3.0 that includes
curl/curl#11610

util-linux update to 2.39 that includes
util-linux/util-linux#2430
util-linux/util-linux@3ab9e69
util-linux/util-linux#2435

glib-networking update to 2.78.0 that includes
https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241

python3-cryptography update to 42.0.0 which resolves
pyca/cryptography#9370 via
pyca/cryptography#9964

perl update to 5.40.0 which includes
Perl/perl5#21379

python3 update to 3.13.0 which includes
python/cpython#118425

tcl update to 9.0.0 which includes
tcltk/tcl@4ca6172
(tcl8 recipe has a simple backport of this)

Signed-off-by: Alexander Kanavin <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Jan 21, 2025
A number of items are removed because the issues have been resolved
with recipe patches (in separate commits).

Some issues were also resolved via upstream version updates:

glib-2.0 update to 2.78.0 that includes:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550

curl update to 8.3.0 that includes
curl/curl#11610

util-linux update to 2.39 that includes
util-linux/util-linux#2430
util-linux/util-linux@3ab9e69
util-linux/util-linux#2435

glib-networking update to 2.78.0 that includes
https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241

python3-cryptography update to 42.0.0 which resolves
pyca/cryptography#9370 via
pyca/cryptography#9964

perl update to 5.40.0 which includes
Perl/perl5#21379

python3 update to 3.13.0 which includes
python/cpython#118425
python3 update to 3.13.1 which includes
python/cpython#124972

tcl update to 9.0.0 which includes
tcltk/tcl@4ca6172
(tcl8 recipe has a simple backport of this)

dbus update to 1.16.0 which includes
https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/444
https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/289

Signed-off-by: Alexander Kanavin <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this pull request Feb 17, 2025
A number of items are removed because the issues have been resolved
with recipe patches (in separate commits).

Some issues were also resolved via upstream version updates:

glib-2.0 update to 2.78.0 that includes:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550

curl update to 8.3.0 that includes
curl/curl#11610

util-linux update to 2.39 that includes
util-linux/util-linux#2430
util-linux/util-linux@3ab9e69
util-linux/util-linux#2435

glib-networking update to 2.78.0 that includes
https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241

python3-cryptography update to 42.0.0 which resolves
pyca/cryptography#9370 via
pyca/cryptography#9964

perl update to 5.40.0 which includes
Perl/perl5#21379

python3 update to 3.13.0 which includes
python/cpython#118425
python3 update to 3.13.1 which includes
python/cpython#124972

tcl update to 9.0.0 which includes
tcltk/tcl@4ca6172
(tcl8 recipe has a simple backport of this)

dbus update to 1.16.0 which includes
https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/444
https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/289

Signed-off-by: Alexander Kanavin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants