Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

Comments

Add two Bionic declarations#1972

Merged
dlang-bot merged 2 commits intodlang:masterfrom
joakim-noah:android
Nov 19, 2017
Merged

Add two Bionic declarations#1972
dlang-bot merged 2 commits intodlang:masterfrom
joakim-noah:android

Conversation

@joakim-noah
Copy link
Contributor

@joakim-noah joakim-noah commented Nov 18, 2017

These were needed to get ldc 1.6 and 1.7 to compile. All stdlib tests pass with this pull, same for the dmd-testsuite with 1.7 on Android/ARM.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @joakim-noah!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

}
else version (CRuntime_Bionic)
{
void __assert(const(char)* __file, int __line, const(char)* __msg);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kinke, need this for the final 1.6 release to build for Android, don't know if ldc itself needs to be patched in any way to call this __assert with the right arguments for betterC.

Copy link
Contributor

@kinke kinke Nov 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does need to be patched as it currently assumes the Glibc signature on Linux. Can't believe they opted for shuffling around the args.

}
}
else version (linux)
else version (CRuntime_Bionic)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linux refers to kernel APIs, but I don't see errno declarations in anywhere other than libc headers.

alias errno = __error;
}
}
else version (OSX)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Darwin block right before means this block will never be called.

}
}
else
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I noticed is if I tried to go back to this old default block by making sure none of the above versions hit, I got an error in core.memory here about "errno is not an lvalue", so it appears #1917 can't be used with this default block anymore.

Copy link
Member

@PetarKirov PetarKirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and thanks for upstreaming, guys!

@dlang-bot dlang-bot merged commit 5927976 into dlang:master Nov 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants