like c/c++ standard libraries.
since the functions in the standard library eventually will call a specific OS API's to do it's jobs , how can these language libraries achieve portability, if I wanted to compile my code to run on other Os. will the libraries change it's code(the calls to the particular Os APIs) ?, is there different versions of these libraries target different OS's ?. or what ? thanks in advance.