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

Fix #2831: Towards a more complete posixlib unistd.scala #2882

Merged
merged 1 commit into from Oct 7, 2022

Conversation

LeeTibbert
Copy link
Contributor

@LeeTibbert LeeTibbert commented Oct 6, 2022

Fix #2831. posixlib unistd.scala is more capable and useful now. It is almost complete.

  • A number of A number of _CS, _PC, _SC symbolic constants were not implemented
    because they are not defined on Linux, macOS, or both. Windows
    appears to support this subset.

    A few other constants or methods were not implemented.

     // _POSIX2_VERSION was not implemented
    
     // pid_t setpgrp(void); // [OB XSI], not implemented
    

    See the file for the complete list.

  • Two methods were deprecated in order to match the POSIX spec.
    These need a release note but the 0.5.0 release file is awaiting merge, hence locked.
    I will create an Issue so that these deprecations do not get lost.

      @deprecated(
        "Not POSIX, subject to complete removal in the future.", 
        since = "posixlib 0.5.0"
     )
     def sethostname(name: CString, len: CSize): CInt = extern
    
     @deprecated(
       "Removed in POSIX.1-2008. Consider posix_spawn().",
       "posixlib 0.5.0"
     )
     def vfork(): CInt = extern
    
  • An method deprecated in Scala Native 0.4.5 was not removed because, IMO,
    a sufficient interval has not yet passed.

2022-10-19 For the enquiring mind, the deprecated items are now recorded in the
0.5.0 Changelog (PR #2924)

@LeeTibbert LeeTibbert changed the title WIP: Fix #2831: Towards a more complete posixlib unistd.scala Fix #2831: Towards a more complete posixlib unistd.scala Oct 6, 2022
Copy link
Contributor

@WojciechMazur WojciechMazur left a comment

Choose a reason for hiding this comment

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

That's a lot of new bindings and improvements. Thank you!

@WojciechMazur WojciechMazur merged commit 6cb47e0 into scala-native:main Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

posixlib unistd.h needs updating to POSIX 2018, at least to provide getlogin_r()
2 participants