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

Linux updates #14170

Merged
merged 4 commits into from
May 4, 2020
Merged

Linux updates #14170

merged 4 commits into from
May 4, 2020

Conversation

wltsmrz
Copy link
Contributor

@wltsmrz wltsmrz commented Apr 30, 2020

Not sure where we stand on adding #define _GNU_SOURCE to generate constants, but here's some updates if there is interest

Some other flags (flags beyond open()) were inadvertently picked up via detect.nim, and changes were required to detect.nim so that nothing was missing from generated lib/posix/posix_linux_amd64_consts.nim

O_TMPFILE: since Linux 3.11
O_PATH: since Linux 2.6.39
O_NOATIME: since Linux 2.6.8
O_DIRECT: since Linux 2.4.10
@wltsmrz
Copy link
Contributor Author

wltsmrz commented Apr 30, 2020

Looks like the conversion to TSa_Family per detect.nim is causing at least one of the tests to fail. If there's interest in this pull request I'll suggest reverting to cint in detect.nim for AF_INET*

@Araq
Copy link
Member

Araq commented May 4, 2020

The PR is welcome, but as you noticed the TSa_Family change does break backwards compat.

@wltsmrz
Copy link
Contributor Author

wltsmrz commented May 4, 2020

@Araq Fixed detect.nim for AF_INET*

@@ -244,8 +241,6 @@ type
st_atim*: Timespec ## Time of last access.
st_mtim*: Timespec ## Time of last data modification.
st_ctim*: Timespec ## Time of last status change.
reserved: array[3, clong]
Copy link
Member

Choose a reason for hiding this comment

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

This must stay for binary compatibility. NLVM needs it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I was trying to figure out why this was here. Is there a way to hide reserved from iterators?

Copy link
Member

Choose a reason for hiding this comment

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

Currently not but we need some new annotation like reserved {.padding.}

Copy link
Member

Choose a reason for hiding this comment

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

=> was discussed in nim-lang/RFCs#205 propoosal 4 {.hidden.}

Copy link
Contributor

Choose a reason for hiding this comment

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

this broke nlvm

@Araq Araq merged commit c817e85 into nim-lang:devel May 4, 2020
EchoPouet pushed a commit to EchoPouet/Nim that referenced this pull request Jun 13, 2020
* Add posix_memalign()

* Add linux-specific open() flags

O_TMPFILE: since Linux 3.11
O_PATH: since Linux 2.6.39
O_NOATIME: since Linux 2.6.8
O_DIRECT: since Linux 2.4.10

* Fix Stat type

* Fix POSIX AF_INET* const generation
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request May 17, 2022
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request Nov 7, 2022
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request Nov 29, 2022
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request Jun 25, 2023
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request Jun 26, 2023
@arnetheduck arnetheduck mentioned this pull request Jun 26, 2023
Araq pushed a commit that referenced this pull request Jun 27, 2023
bung87 pushed a commit to bung87/Nim that referenced this pull request Jul 29, 2023
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request Sep 11, 2023
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request Sep 18, 2023
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request Nov 19, 2023
arnetheduck added a commit to arnetheduck/Nim that referenced this pull request Aug 26, 2024
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.

4 participants