aca467c797bea980a8235982877f336f34a9cbc3
1 /* $Id: errno.c,v 1.6 2003/08/22 13:55:15 ea Exp $
4 * COPYRIGHT: See COPYING in the top level directory
5 * PROJECT: ReactOS POSIX+ Subsystem
6 * FILE: subsys/psx/lib/psxdll/errno/errno.c
7 * PURPOSE: Internal errno implementation
8 * PROGRAMMER: KJK::Hyperion <noog@libero.it>
13 #include <ddk/ntddk.h>
14 #include <psx/pdata.h>
15 #include <psx/errno.h>
16 #include <psx/debug.h>
18 int * __PdxGetThreadErrNum(void)
20 return &(((__PPDX_TDATA
) (NtCurrentTeb()->TlsSlots
[__PdxGetProcessData()->TlsIndex
]) )->ErrNum
);
23 /**********************************************************************
25 * RtlNtStatusToPsxErrno
28 * Convert an Executive status ID into a POSIX error number
32 * Not present in the legacy WNT (a ReactOS extension to support
33 * the POSIX+ subsystem).
36 * Status The Executive status ID to convert.
43 * 2003-08-22 ea: moved here from NTDLL
46 RtlNtStatusToPsxErrno(IN NTSTATUS Status
)
53 return -1; /* generic POSIX error */