Skip to content

Implementation of fcntl() to both Darwin and Glibc overlays. Ported … #413

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 2 commits into from
Dec 12, 2015
Merged

Implementation of fcntl() to both Darwin and Glibc overlays. Ported … #413

merged 2 commits into from
Dec 12, 2015

Conversation

billabt
Copy link

@billabt billabt commented Dec 11, 2015

…open(), openat() and sem_open() from Darwin to Glibc. Added tests for new fcntl functionality.

…pen(), openat() and sem_open() from Darwin to Glibc. Added tests for new fcntl functionality.
@@ -1,5 +1,6 @@
set(sources
Glibc.swift
Glibc.swift
Misc.c
Copy link
Contributor

Choose a reason for hiding this comment

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

The indentation convention for cmake is 4 spaces for continuation lines.

@gribozavr
Copy link
Contributor

LGTM with (mostly) formatting changes. It is unfortunate we don't have anything like clang-format for Swift.

@billabt
Copy link
Author

billabt commented Dec 11, 2015

This should be good to go now. Tested and working as expected.

@billabt billabt mentioned this pull request Dec 11, 2015
@gribozavr
Copy link
Contributor

Tested on OS X and Ubuntu 14.04.

gribozavr added a commit that referenced this pull request Dec 12, 2015
Implementation of fcntl() to both Darwin and Glibc overlays.  Ported …
@gribozavr gribozavr merged commit 306c586 into swiftlang:master Dec 12, 2015
@tkremenek tkremenek assigned tkremenek and billabt and unassigned tkremenek and billabt Dec 12, 2015
public func open(
path: UnsafePointer<CChar>,
_ oflag: CInt
) -> CInt {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering: why not use a default value of 0 for the mode: mode_t parameter instead of duplicating those functions?

Copy link
Contributor

Choose a reason for hiding this comment

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

Because that's how the man page describes the function: there are three variants, one accepts void, another accepts a pointer, and another accepts int. It does not describe the void one as a variant of the int one.

slavapestov pushed a commit to slavapestov/swift that referenced this pull request Nov 27, 2018
SDK: guard BSD specific paths against windows
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
Update run_cperf with 3 extra options needed by the build-script preset code.
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