Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4680 | right-hear | 1 | /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ |
2 | /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
||
3 | #ifndef __dj_include_sys_system_h__ |
||
4 | #define __dj_include_sys_system_h__ |
||
5 | |||
6 | #ifdef __cplusplus |
||
7 | extern "C" { |
||
8 | #endif |
||
9 | |||
10 | #ifndef __dj_ENFORCE_ANSI_FREESTANDING |
||
11 | |||
12 | #ifndef __STRICT_ANSI__ |
||
13 | |||
14 | #ifndef _POSIX_SOURCE |
||
15 | |||
16 | extern int _shell_command (const char *_prog, const char *_cmdline); |
||
17 | extern int _is_unixy_shell (const char *_prog); |
||
18 | extern int _is_dos_shell (const char *_prog); |
||
19 | |||
20 | /* Checking for special executable formats */ |
||
21 | |||
22 | typedef struct { |
||
23 | char magic[16]; |
||
24 | int struct_length; |
||
25 | char go32[16]; |
||
26 | unsigned char buffer[0]; |
||
27 | } _v1_stubinfo; |
||
28 | |||
29 | |||
30 | typedef struct { |
||
31 | union { |
||
32 | unsigned version:8; /* The version of DJGPP created that COFF exe */ |
||
33 | struct { |
||
34 | unsigned minor:4; /* The minor version of DJGPP */ |
||
35 | unsigned major:4; /* The major version of DJGPP */ |
||
36 | } v; |
||
37 | } version; |
||
38 | |||
39 | unsigned object_format:4; /* What an object format */ |
||
40 | # define _V2_OBJECT_FORMAT_UNKNOWN 0x00 |
||
41 | # define _V2_OBJECT_FORMAT_COFF 0x01 |
||
42 | |||
43 | unsigned exec_format:4; /* What an executable format */ |
||
44 | # define _V2_EXEC_FORMAT_UNKNOWN 0x00 |
||
45 | # define _V2_EXEC_FORMAT_COFF 0x01 |
||
46 | # define _V2_EXEC_FORMAT_STUBCOFF 0x02 |
||
47 | # define _V2_EXEC_FORMAT_EXE 0x03 |
||
48 | # define _V2_EXEC_FORMAT_UNIXSCRIPT 0x04 |
||
49 | |||
50 | unsigned valid:1; /* Only when nonzero all the information is valid */ |
||
51 | |||
52 | unsigned has_stubinfo:1; /* When nonzero the stubinfo info is valid */ |
||
53 | |||
54 | unsigned unused:14; |
||
55 | |||
56 | _v1_stubinfo *stubinfo; |
||
57 | } _v2_prog_type; |
||
58 | |||
59 | /* When program == NULL you have to pass a valid file handle |
||
60 | in fd, otherwise the file is opened and closed by the function */ |
||
61 | const _v2_prog_type *_check_v2_prog(const char *program, int fd); |
||
62 | |||
63 | #endif /* !_POSIX_SOURCE */ |
||
64 | #endif /* !__STRICT_ANSI__ */ |
||
65 | #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
||
66 | |||
67 | #ifndef __dj_ENFORCE_FUNCTION_CALLS |
||
68 | #endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
||
69 | |||
70 | #ifdef __cplusplus |
||
71 | } |
||
72 | #endif |
||
73 | |||
74 | #endif /* __dj_include_sys_system_h__ */ |