revert between 56095 -> 55830 in arch
[AROS.git] / compiler / posixc / __posixc_intbase.h
blob5a264c2690feff2b4bd00f4de3239f22c0448cb9
1 /*
2 Copyright © 2012-2017, The AROS Development Team. All rights reserved.
3 $Id$
5 This file defines the private part of PosixCBase.
6 This should only be used internally in posixc.library code so
7 changes can be made to this structure without breaking backwards
8 compatibility.
9 */
10 #ifndef __POSIXC_INTBASE_H
11 #define __POSIXC_INTBASE_H
13 #include <libraries/posixc.h>
14 #include <exec/lists.h>
15 #include <dos/dos.h>
16 #include <devices/timer.h>
18 #include <limits.h>
19 #include <stdint.h>
20 #include <stdio.h>
21 #include <sys/stat.h>
22 #include <pwd.h>
24 /* Some private structs */
25 struct random_state;
26 struct __env_item;
27 struct _fdesc;
28 struct vfork_data;
30 struct PosixCIntBase
32 struct PosixCBase PosixCBase;
34 /* common */
35 APTR internalpool;
36 int32_t flags;
38 struct Device *timerBase;
39 struct timerequest timerReq;
40 struct MsgPort timerPort;
42 /* random.c */
43 struct random_state *rs;
45 /* getpwuid.c */
46 struct passwd pwd;
48 /* getpass.c */
49 char passbuffer[PASS_MAX];
50 #if (0)
51 /* sigprocmask.c */
52 sigset_t sigmask;
53 sigset_t signals;
54 #endif
56 /* __posixc_environ.c; don't use this field outside that file */
57 char ***environptr;
59 /* __env.c */
60 struct __env_item *env_list;
62 /* __exec.c */
63 BPTR exec_seglist;
64 char *exec_args;
65 char *exec_taskname;
66 APTR exec_pool;
67 char **exec_tmparray;
68 BPTR exec_oldin, exec_oldout, exec_olderr;
69 struct StdCBase *exec_oldstdcbase;
71 /* __fdesc.c */
72 int fd_slots;
73 struct _fdesc **fd_array;
75 /* __upath.c */
76 char *upathbuf; /* Buffer that holds intermediate converted paths */
77 int doupath; /* BOOL - does the conversion need to be done? */
78 int parent_does_upath; /* BOOL - parent does upath conversion */
80 /* __vfork.c */
81 struct vfork_data *vfork_data;
83 /* chdir.c/fchdir.c */
84 int cd_changed;
85 BPTR cd_lock;
87 /* flock.c */
88 struct MinList _file_locks, *file_locks;
90 /* umask */
91 mode_t umask;
93 /* __stdio.c */
94 struct MinList stdio_files;
96 /* setuid.c/getuid.c */
97 uid_t uid; /* Real user id of process */
98 uid_t euid; /* Effective user id of process */
99 /* set(e)gid.c/get(e)gid.c */
100 gid_t gid; /* Real group id of process */
101 gid_t egid; /* Effective group id of process */
104 /* flags; values of flags are power of two so they can be ORed together */
106 /* When a program is started with the exec functions and from vfork,
107 this is indicated in the flags of the library.
108 This way the child can use the parent posixc.library during its
109 initialization phase */
110 #define EXEC_PARENT 0x00000001
111 #define VFORK_PARENT 0x00000002
113 /* This flag is set by vfork() to correctly report child process ID during
114 execution of child code, even though that it's actually executed by parent
115 process until execve() is called. */
116 #define PRETEND_CHILD 0x00000004
118 #endif //__POSIXC_INTBASE_H