OILS / bin / oils_for_unix_preamble.h View on Github | oils.pub

72 lines, 55 significant
1// bin/oils_for_unix_preamble.h: declarations to run oils_for_unix.mycpp
2
3#include <errno.h>
4#include <fcntl.h> // e.g. F_DUPFD used directly
5#include <fnmatch.h> // FNM_CASEFOLD in osh/sh_expr_eval.py
6#include <glob.h> // GLOB_PERIOD in osh/glob_.py
7#include <regex.h> // REG_ICASE in osh/sh_expr_eval.py
8#include <sys/resource.h> // RLIM_INFINITY in builtin/process_osh.py
9#include <sys/wait.h> // e.g. WIFSIGNALED() called directly
10
11// WCOREDUMP is not defined on all systems (e.g., AIX, SunOS)
12// Provide a fallback similar to bash's posixwait.h
13#ifndef WCOREDUMP
14# define WCOREDUMP(status) ((status) & 0200)
15#endif
16
17#include "_gen/core/optview.h"
18#include "_gen/core/runtime.asdl.h"
19#include "_gen/core/value.asdl.h"
20#include "_gen/data_lang/nil8.asdl.h"
21#include "_gen/display/pretty.asdl.h"
22#include "_gen/frontend/arg_types.h"
23#include "_gen/frontend/consts.h"
24#include "_gen/frontend/help_meta.h"
25#include "_gen/frontend/id_kind.asdl.h" // syntax.asdl depends on this
26#include "_gen/frontend/option.asdl.h"
27#include "_gen/frontend/signal.h"
28#include "_gen/frontend/syntax.asdl.h"
29#include "_gen/frontend/types.asdl.h"
30#include "_gen/ysh/grammar_nt.h"
31#include "cpp/core.h"
32#include "cpp/data_lang.h"
33#include "cpp/fanos.h"
34#include "cpp/frontend_flag_spec.h"
35#include "cpp/frontend_match.h"
36#include "cpp/frontend_pyreadline.h"
37#include "cpp/libc.h"
38#include "cpp/osh.h"
39#include "cpp/osh_tdop.h"
40#include "cpp/pgen2.h"
41#include "cpp/pylib.h"
42#include "cpp/stdlib.h"
43#include "cpp/translation_stubs.h"
44#include "mycpp/runtime.h" // runtime library e.g. with Python data structures
45
46// Function prototypes are emitted in mycpp's DECL phase, and some of them have
47// default args that reuide this.
48
49using id_kind_asdl::Id;
50
51using hnode_asdl::hnode;
52
53using pretty_asdl::doc;
54
55using runtime_asdl::cmd_value;
56using runtime_asdl::part_value;
57using runtime_asdl::scope_e;
58
59using syntax_asdl::command;
60using syntax_asdl::expr;
61using syntax_asdl::loc;
62using syntax_asdl::printf_part; // added when self._Percent() used it in
63 // function signature
64using syntax_asdl::proc_sig;
65using syntax_asdl::suffix_op;
66using syntax_asdl::word;
67using syntax_asdl::word_part;
68
69using types_asdl::lex_mode_e;
70
71using value_asdl::sh_lvalue; // for builtin_assign.py and builtin_misc.py
72using value_asdl::value;