mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
19 lines
347 B
D
19 lines
347 B
D
void main()
|
|
{
|
|
int* e = __errno_location();
|
|
printf("&errno = %p\n", e);
|
|
printf("errno = %d\n", *e);
|
|
}
|
|
|
|
extern(C):
|
|
version(darwin) {
|
|
int* __error();
|
|
alias __error __errno_location;
|
|
} else version (Windows) {
|
|
int* strerror();
|
|
alias strerror __errno_location;
|
|
} else {
|
|
int* __errno_location();
|
|
}
|
|
int printf(char*,...);
|