]> git.saurik.com Git - apple/libc.git/blobdiff - i386/sys/cerror.s
Libc-391.4.3.tar.gz
[apple/libc.git] / i386 / sys / cerror.s
index 53d164d1322d5477bc19dd7dd48868660c16e2f4..b071f0a74a36e22ab2ab0052dd3be206cf38a629 100644 (file)
 
        .globl  _errno
 
+LABEL(cerror_cvt)
+       cmpl    $102, %eax      /* EOPNOTSUPP? */
+       jnz     cerror
+       movl    $45, %eax       /* Yes; make ENOTSUP for compatibility */
 LABEL(cerror)
        REG_TO_EXTERN(%eax, _errno)
-       pushl   %eax
+       mov             %esp,%edx
+       andl    $0xfffffff0,%esp
+       subl    $16,%esp
+       movl    %edx,4(%esp)
+       movl    %eax,(%esp)
        CALL_EXTERN(_cthread_set_errno_self)
-       addl    $4,%esp
+       movl    4(%esp),%esp
        movl    $-1,%eax
        movl    $-1,%edx /* in case a 64-bit value is returned */
        ret