diff --git a/Unix/PmCleanSystem.icl b/Unix/PmCleanSystem.icl index 7016b7caa49adea063a068e1159e30d07963d246..6173c50b74077af46fc47f1687be4b2a4de72026 100644 --- a/Unix/PmCleanSystem.icl +++ b/Unix/PmCleanSystem.icl @@ -417,7 +417,8 @@ Link linker winfun path # (w_pid,status) = wait_pid linker_pid 0 | w_pid <> -1 && w_pid<>linker_pid = abort "waitpid failed" - # result = (status bitand 0xff00) >> 8 + # result = status >> 8; + # result = (result bitand 127) - (result bitand 128); // 8 bit sign extend # wtermsig = status bitand 0x7f | wtermsig<>0 = abort "linker exited abnormally" @@ -448,8 +449,9 @@ Link linker winfun path # (w_pid,status) = wait_pid ld_pid 0 | w_pid <> -1 && w_pid<>ld_pid = abort "waitpid failed" - # result = (status bitand 0xff00) >> 8 # wtermsig = status bitand 0x7f + # result = status >> 8; + # result = (result bitand 127) - (result bitand 128); // 8 bit sign extend | wtermsig<>0 = abort "ld exited abnormally" # link_ok = result>=0 @@ -493,7 +495,8 @@ Link linker winfun path # (w_pid,status) = wait_pid linker_pid 0 | w_pid <> -1 && w_pid<>linker_pid = abort "waitpid failed" - # result = (status bitand 0xff00) >> 8 + # result = status >> 8; + # result = (result bitand 127) - (result bitand 128); // 8 bit sign extend # wtermsig = status bitand 0x7f | wtermsig<>0 = abort "linker exited abnormally"