News for hackers. Stuff that matters.
Re:C library system-call wrappers, or the lack thereof by saagarjha on Wednesday November 14, 2018 @01:46AM (#18448041)
macOS lists them all in /usr/include/sys/syscall.h, so I guess you can consider that public API?
Re:C library system-call wrappers, or the lack thereof by eridius on Wednesday November 14, 2018 @04:03AM (#18448528)
macOS syscalls are explicitly not stable and may change from release to release. The only supported interface to them on macOS is libc.
Re:C library system-call wrappers, or the lack thereof by akvadrako on Wednesday November 14, 2018 @02:00AM (#18448096)
That file doesn't even exist on my system, but in any case public means official, not in some header.
Re:C library system-call wrappers, or the lack thereof by saagarjha on Wednesday November 14, 2018 @02:11AM (#18448128)
If you have the command line tools installed, it should also be under /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/syscall.h. macOS, by default, does not ship with these headers at all, and as of macOS Mojave they no longer provide them under /usr/include unless you install a certain package.

With that being said, I disagree with your characterization of “some header”–anything that’s in Apple’s headers is public API, whether it has a fancy page on developer.apple.com or not. Apple has a very clear definition of what they consider to be “private”, and anything in /usr/include isn’t it.

Re:C library system-call wrappers, or the lack thereof by akvadrako on Wednesday November 14, 2018 @06:14AM (#18449052)
Actually the path is:

  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/syscall.h 
and you can clearly see that the file is wrapped with:

  #ifdef __APPLE_API_PRIVATE
  ...
  #endif /* __APPLE_API_PRIVATE */
Re:C library system-call wrappers, or the lack thereof by saagarjha on Wednesday November 14, 2018 @11:56PM (#18456951)
Again, if you have the Command Line Tools installed, it'll be under /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/. Xcode also has a copy, but I think fewer people have that installed.
Re:C library system-call wrappers, or the lack thereof by amaccuish on Wednesday November 14, 2018 @08:46AM (#18449777)
Nope, on my system, without xcode, the previous poster's path is correct: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/syscall.h
Re:C library system-call wrappers, or the lack thereof by int_19h on Wednesday November 14, 2018 @02:24AM (#18448170)
They need to be public and stable in order to be a usable userspace API for anything other than libc. I don't think the latter requirement is satisfied:

https://github.com/golang/go/commit/02118ad0a0cacb00c1d834b3...

Re:C library system-call wrappers, or the lack thereof by masklinn on Wednesday November 14, 2018 @08:05AM (#18449524)
Nope, in fact it's so absolutely not stable (or supported) that libSystem can't be statically linked to.