Can we use "ImportC" used yet?

jfondren julian.fondren at gmail.com
Fri Oct 15 20:52:09 UTC 2021


On Friday, 15 October 2021 at 20:45:35 UTC, jfondren wrote:
> ```
> 0
> stat(27, 11, 1, 8592, 1000, 5, 0, 34824, 0, 1024, 0, 
> timespec(1634329152, 581807916), timespec(1634329152, 
> 581807916), timespec(1634272061, 581807916), [0, 0, 0])
> 9
> ```
>
> the d programmer did not have to carefully `extern (C)` an 
> fstat function, nor define a struct, nor care about issues like 
> an evil platform padding its struct with some bytes and 
> overwriting the stack unless the d programmer accounts for that.

Speaking of padding the struct, what's what `[0, 0, 0]` at the 
end of my stat() output? I hadn't noticed it before.

```
     __syscall_slong_t __glibc_reserved[3];
```

yeah, core.sys.posix.sys.stat doesn't account for that.


More information about the Digitalmars-d-learn mailing list