aca467c797bea980a8235982877f336f34a9cbc3
[reactos.git] / posix / lib / psxdll / errno / errno.c
1 /* $Id: errno.c,v 1.6 2003/08/22 13:55:15 ea Exp $
2 */
3 /*
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>
9 * UPDATE HISTORY:
10 * 27/12/2001: Created
11 */
12
13 #include <ddk/ntddk.h>
14 #include <psx/pdata.h>
15 #include <psx/errno.h>
16 #include <psx/debug.h>
17
18 int * __PdxGetThreadErrNum(void)
19 {
20 return &(((__PPDX_TDATA) (NtCurrentTeb()->TlsSlots[__PdxGetProcessData()->TlsIndex]) )->ErrNum);
21 }
22
23 /**********************************************************************
24 * NAME EXPORTED
25 * RtlNtStatusToPsxErrno
26 *
27 * DESCRIPTION
28 * Convert an Executive status ID into a POSIX error number
29 * (errno.h).
30 *
31 * NOTE
32 * Not present in the legacy WNT (a ReactOS extension to support
33 * the POSIX+ subsystem).
34 *
35 * ARGUMENTS
36 * Status The Executive status ID to convert.
37 *
38 * RETURN VALUE
39 * errno as in errno.h
40 *
41 * REVISIONS
42 * 1999-11-30 ea
43 * 2003-08-22 ea: moved here from NTDLL
44 */
45 INT STDCALL
46 RtlNtStatusToPsxErrno(IN NTSTATUS Status)
47 {
48 #if 0
49 switch (Status)
50 {
51 }
52 #endif
53 return -1; /* generic POSIX error */
54 }
55
56 /* EOF */
57