Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

Comments

core.sys.posix.unistd: Add XSI legacy bindings#3364

Closed
ibuclaw wants to merge 1 commit intodlang:masterfrom
ibuclaw:xsilegacy
Closed

core.sys.posix.unistd: Add XSI legacy bindings#3364
ibuclaw wants to merge 1 commit intodlang:masterfrom
ibuclaw:xsilegacy

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Feb 3, 2021

In the unistd module, there are a number of legacy XSI functions, not all are presently available on all supported platforms.

std.experimental also declares a couple of these functions locally (they shouldn't be doing this).

Some thoughts:

  1. Should these be labelled as deprecated?
  2. Should they be moved to core.sys.<platform-specific>.unistd? Existing functions in core.sys.posix.unistd will then be labelled as deprecated.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + druntime#3364"

@maxhaton
Copy link
Member

maxhaton commented Feb 3, 2021

What does not supported mean in this case - completely missing or a runtime error? If we are silently assuming they are there when they aren't, deprecation seems the way (then they should be moved to a platform specific alternative).

Also, what platforms are effected specifically (I'm not all that familiar with XSI beyond the very basics)?

@ibuclaw
Copy link
Member Author

ibuclaw commented Feb 3, 2021

What does not supported mean in this case - completely missing or a runtime error?

Depends on the platform. For Musl, calling sbrk() only sets errno to ENOMEM and nothing else, whereas on DragonFly, it is completely absent.

If we are silently assuming they are there when they aren't, deprecation seems the way (then they should be moved to a platform specific alternative).

Also, what platforms are effected specifically (I'm not all that familiar with XSI beyond the very basics)?

All posix-compliant platforms should implement XSI, but when the baseline supported revision is adjusted - and most probably support version 7 by now - then these functions are #ifdef'd out of the headers.

@RazvanN7
Copy link
Contributor

I think that the simplest way would be to just deprecate them. @ibuclaw care to do that in this PR?

@RazvanN7
Copy link
Contributor

RazvanN7 commented Mar 1, 2021

ping @ibuclaw

@RazvanN7
Copy link
Contributor

RazvanN7 commented Mar 2, 2021

@ibuclaw How do we move forward here?

@dlang-bot dlang-bot added Needs Rebase needs a `git rebase` performed stalled labels May 27, 2021
@RazvanN7
Copy link
Contributor

@ibuclaw Should we close this?

@Geod24
Copy link
Member

Geod24 commented Jul 9, 2022

Druntime have been merged into DMD. Please re-submit your PR to dlang/dmd repository.

@Geod24 Geod24 closed this Jul 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Needs Rebase needs a `git rebase` performed stalled System Headers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants