Fixed compatibility of output.
[AROS.git] / compiler / posixc / __posixc_intbase.h
bloba69eb265da35ebaab418e040935803617f850ed1
1 /*
2 Copyright © 2012-2016, 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>
17 #include <stdint.h>
18 #include <stdio.h>
19 #include <sys/stat.h>
21 /* Some private structs */
22 struct random_state;
23 struct __env_item;
24 struct _fdesc;
25 struct vfork_data;
27 struct PosixCIntBase
29 struct PosixCBase PosixCBase;
31 /* common */
32 APTR internalpool;
33 int32_t flags;
35 /* random.c */
36 struct random_state *rs;
38 /* __posixc_environ.c; don't use this field outside that file */
39 char ***environptr;
41 /* __env.c */
42 struct __env_item *env_list;
44 /* __exec.c */
45 BPTR exec_seglist;
46 char *exec_args;
47 char *exec_taskname;
48 APTR exec_pool;
49 char **exec_tmparray;
50 BPTR exec_oldin, exec_oldout, exec_olderr;
51 struct StdCBase *exec_oldstdcbase;
53 /* __fdesc.c */
54 int fd_slots;
55 struct _fdesc **fd_array;
57 /* __upath.c */
58 char *upathbuf; /* Buffer that holds intermediate converted paths */
59 int doupath; /* BOOL - does the conversion need to be done? */
60 int parent_does_upath; /* BOOL - parent does upath conversion */
62 /* __vfork.c */
63 struct vfork_data *vfork_data;
65 /* chdir.c/fchdir.c */
66 int cd_changed;
67 BPTR cd_lock;
69 /* flock.c */
70 struct MinList _file_locks, *file_locks;
72 /* umask */
73 mode_t umask;
75 /* __stdio.c */
76 struct MinList stdio_files;
79 /* flags; values of flags are power of two so they can be ORed together */
81 /* When a program is started with the exec functions and from vfork,
82 this is indicated in the flags of the library.
83 This way the child can use the parent posixc.library during its
84 initialization phase */
85 #define EXEC_PARENT 0x00000001
86 #define VFORK_PARENT 0x00000002
88 /* This flag is set by vfork() to correctly report child process ID during
89 execution of child code, even though that it's actually executed by parent
90 process until execve() is called. */
91 #define PRETEND_CHILD 0x00000004
93 #endif //__POSIXC_INTBASE_H