Refactor POSIX error domain codes to be platform independent
Description
Currently the error codes are being considered as-is, which means platforms have different definitions. This causes difficulty on multi-platform runtimes because just to report an error they need to inspect which platform they are running on.
Currently the error codes are being considered as-is, which means platforms have different definitions. This causes difficulty on multi-platform runtimes because just to report an error they need to inspect which platform they are running on.