mozilla/rust — pull request #9196 by alexcrichton (2013-09-14 17:48:28+00:00)
Title: When declaring extern fns from external crates, use the correct abi

Beforehand it was assumed that the standard cdecl abi was used for all extern
fns of extern crates, but this reads the abi of the extern fn type and declares
the function in the local crate with the appropriate type.

I was trying to think of how to write a test for this, but I was just drawing up blanks :(. Are there standard functions in libc which are not of the cdecl abi? If so we could try linking to them and make sure that the cal completes successfully.

Otherwise, I manually verified that the function was declared correctly by looking at the llvm assembly.

cc #9055 (I'm not sure if this will fix that issue)