Where is "open" in "core.sys.linux.unistd"?

rempas rempas at tutanota.com
Fri Jul 9 15:27:47 UTC 2021


On Friday, 9 July 2021 at 15:04:32 UTC, rikki cattermole wrote:
>
> On 10/07/2021 2:51 AM, rempas wrote:
>> The file can be found quickly 
>> [here](https://github.com/dlang/druntime/blob/master/src/core/sys/posix/unistd.d) or in your system if you want. Now the question is, why isn't there an "open" function for the equivalent system call? "close", "write", "read" etc. all exist. Anyone knows what's going on with open?
>
> This is easily explained.
>
> open is not declared to be defined in unist.h[0]
>
> You may be wanting fopen from stdio.h[1]
>
> Or open from fcntl.h[2]
>
> [0] https://man7.org/linux/man-pages/man0/unistd.h.0p.html
> [1] https://man7.org/linux/man-pages/man0/stdio.h.0p.html
> [2] https://man7.org/linux/man-pages/man0/fcntl.h.0p.html

Thanks man, have a nice day


More information about the Digitalmars-d-learn mailing list