-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Port Native libraries to SunOS #34867
Conversation
src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysLog.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/Interop/Unix/System.Native/Interop.SysLog.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
cfmakeraw(&term); | ||
#else | ||
term.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Linux, cfmakeraw shows without the IMAXBEL. It was really just convenience and I'm wondering if we can get away without the fork and always list all options. (that can be done later)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I think three things can be simplified:
- cfmakeraw -> list of options
- cfsetspeed -> i/o speed separately
- statfs -> statvfs
- former is kernel call, latter is libc standard function, and Solaris/Illumos is known to err to the libc functions generally, without
sysctl(2)
like Linux orsysctl(3)
like BSD.
- former is kernel call, latter is libc standard function, and Solaris/Illumos is known to err to the libc functions generally, without
I wanted to keep changes simple for the first pass, however, can make these changes and simplify the PR. Wdyt, should we make these three now or postpone it until later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do it later. cc: @krwq
@@ -495,7 +511,11 @@ int32_t SystemIoPortsNative_TermiosReset(intptr_t handle, int32_t speed, int32_t | |||
return -1; | |||
} | |||
|
|||
#if HAVE_CFSETSPEED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above. cfsetspeed() is a 4.4BSD extension.
We may use cfsetispeed and cfsetospeed on all platforms.
I think this work item can have os-sunos and area-Infrastructure-libraries labels. |
Tagging @safern, @ViktorHofer as an area owner. If you would like to be tagged for a label, please notify danmosemsft. |
Summary of changes:
MountPoints.FormatInfo
.__c_static_assert__
.cfsetspeed
is not supported.cfmakeraw
is not supported.netpacket/packet.h
andnet/if_arp.h
headers.fopen
fallback, asgetmntinfo
is not supported.statfs(2)
prototype.statfs(2)
with different prototype is supported, preferred way is to use libc'sstatvfs(3)
.RLIMIT_*
resources are different/non-supported, mapped them accordingly.getgrouplist(3)
.Contributes to: #4173.