blob: 8d46e673ae46e41ad46ee0d2a2d165c886a10c9b [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001NAME
Zesstra7ea4a032019-11-26 20:11:40 +01002 predefined - predefined #defines by the parser
MG Mud User88f12472016-06-24 23:31:02 +02003
4DESCRIPTION
Zesstra7ea4a032019-11-26 20:11:40 +01005 Several preprocessor macros are pre#defined by the parser,
6 to provide information about parser version, compile time
7 options and parser invocation options:
MG Mud User88f12472016-06-24 23:31:02 +02008
Zesstra7ea4a032019-11-26 20:11:40 +01009 LPC3 : always defined.
10 __LDMUD__ : always defined.
11 __EUIDS__ : always (for compatibility).
12 COMPAT_FLAG : defined if the driver runs in compat mode.
13 __COMPAT_MODE__ : ditto
14 __STRICT_EUIDS__ : defined if strict euid usage is enforced.
15 __FILENAME_SPACES__ : defined if filenames may contain spaces.
MG Mud User88f12472016-06-24 23:31:02 +020016
Zesstra7ea4a032019-11-26 20:11:40 +010017 __MASTER_OBJECT__ : the name of the master object (in compat
18 mode without leading '/').
19 __FILE__ : the name of the compiled file (in compat
20 mode without leading '/').
21 __LINE__ : the current line number.
22 __FUNCTION__ : the current function name.
23 __DIR__ : the directory path of the compiled file
24 (in compat mode without leading '/').
25 __PATH__(n) : the directory path of the compiled file
26 without the <n> trailing elements (in
27 compat mode without leading '/').
28 __VERSION__ : the version string of the driver.
29 __VERSION_MAJOR__ : the major version number of the driver.
30 __VERSION_MINOR__ : the minor version number of the driver.
31 __VERSION_MICRO__ : the micro version number of the driver.
32 __VERSION_PATCH__ : the patchlevel of the driver; a 0 here
33 means 'no patchlevel'.
34 __VERSION_COMMITID__ : the commit ID of the source of the driver
35 (attention: it might be <unknown>, if the
36 driver was not compiled from a git
37 repository)
38 __VERSION_LOCAL__ : the (optional) LOCAL_LEVEL, the user has
39 defined.
MG Mud User88f12472016-06-24 23:31:02 +020040
Zesstra7ea4a032019-11-26 20:11:40 +010041 __DOMAIN_NAME__ : the domain the host is part of.
42 __HOST_IP_NUMBER__ : the hosts IP number (as a string).
43 __HOST_NAME__ : the full hostname.
44 __MAX_RECURSION__ : the max count of nested function calls
45 (this is config.h:MAX_USER_TRACE).
46 __MAX_EVAL_COST__ : the max evaluation cost.
47 __RESET_TIME__ : default interval time between object
48 resets.
49 __CLEANUP_TIME__ : default interval time between object
50 cleanups.
51 __ALARM_TIME__ : the configured timing granularity.
52 __HEART_BEAT_INTERVAL__ : the configured heartbeat time.
53 __SYNCHRONOUS_HEART_BEAT__ : defined if synchronous heartbeats are
54 enabled.
55 __MAX_COMMAND_LENGTH__ : the maximum length a command can have.
56 __EFUN_DEFINED__(name) : if the efun 'name' exists, this
57 macro evaluates to " 1 ", else to " 0 ".
58 __DRIVER_LOG__ : the name of the default debug.log file
59 (within the mudlib); undefined if a
60 different name has been specified on the
61 commandline.
62 __WIZLIST__ : the name of the (mudlib) file from where
63 the driver read the initial WIZLIST
64 information. It is undefined if the driver
65 was configured to not read the
66 information.
MG Mud User88f12472016-06-24 23:31:02 +020067
Zesstra7ea4a032019-11-26 20:11:40 +010068 __MAX_MALLOC__ : the internal upper limit for total memory
69 usage.
70 __INT_MAX__ : the largest integer number.
71 __INT_MIN__ : the smallest integer number.
72 __FLOAT_MAX__ : the largest (positive) float number.
73 __FLOAT_MIN__ : the smallest (positive) float number.
MG Mud User88f12472016-06-24 23:31:02 +020074
Zesstra7ea4a032019-11-26 20:11:40 +010075 __LPC_NOSAVE__ : always defined.
76 __LPC_STRUCTS__ : always defined.
77 __LPC_INLINE_CLOSURES__ : always defined.
78 __LPC_ARRAY_CALLS__ : always defined.
79 __BOOT_TIME__ : the time() the driver was started.
MG Mud User88f12472016-06-24 23:31:02 +020080
Zesstra7ea4a032019-11-26 20:11:40 +010081 If the ERQ is supported, the following macros are defined:
MG Mud User88f12472016-06-24 23:31:02 +020082
Zesstra7ea4a032019-11-26 20:11:40 +010083 __ERQ_MAX_SEND__ : the max size of the send buffer.
84 __ERQ_MAX_REPLY__ : the max size of the reply buffer.
MG Mud User88f12472016-06-24 23:31:02 +020085
Zesstra7ea4a032019-11-26 20:11:40 +010086 The following macros are defined if their associated package
87 has been compiled into the driver:
MG Mud User88f12472016-06-24 23:31:02 +020088
Zesstra7ea4a032019-11-26 20:11:40 +010089 __IDNA__ : support for IDNA.
90 __IPV6__ : support for IP v.6.
91 __MYSQL__ : support for mySQL.
92 __PGSQL__ : support for PostgreSQL.
93 __SQLITE__ : support for SQLite 3.
94 __XML_DOM__ : support for XML parsing.
95 __MCCP__ : support for MCCP.
96 http://www.randomly.org/projects/MCCP
97 __ALISTS__ : support for alists.
98 __PCRE__ : support for PCRE (always defined).
99 __TLS__ : support for TLS (internal).
100 __GNUTLS__ : if __TLS__: TLS support provided by
101 GnuTLS.
102 __OPENSSL__ : if __TLS__: TLS support provided by
103 OpenSSL.
104 __GCRYPT__ : cryptographic routines provided by
105 libgcrypt.
106 __DEPRECATED__ : support for obsolete and deprecated efuns.
MG Mud User88f12472016-06-24 23:31:02 +0200107
108HISTORY
Zesstra7ea4a032019-11-26 20:11:40 +0100109 3.2.1 added __DOMAIN_NAME__, __HOST_IP_NUMBER__, __HOST_NAME__,
110 __MAX_RECURSION__, __EFUN_DEFINED__().
111 3.2.5 added __COMPAT_MODE__, __NATIVE_MODE__, __EUIDS__,
112 __ERQ_MAX_SEND__ and __ERQ_MAX_REPLY__.
113 3.2.6 added __MAX_EVAL_COST__.
114 3.2.7 added __STRICT_EUIDS__ and made __EUIDS__ standard.
115 3.2.8 added __IPV6__, __LPC_NOSAVE__, __DIR__, __PATH__().
116 3.2.9 added __LDMUD__, __MYSQL__, __DEPRECATED__, __VERSION_MAJOR__,
117 __VERSION_MINOR__, __VERSION_MICRO__, __VERSION_PATCH__,
118 __INT_MAX__, __INT_MIN__, __FLOAT_MIN__, __FLOAT_MAX__,
119 __CATCH_EVAL_COST__, __MASTER_EVAL_COST__, __RESET_TIME__,
120 __CLEANUP_TIME__, __DRIVER_LOG__, and __WIZLIST__.
121 3.2.10 added __MAX_MALLOC__, __MSDOS_FS__, __LPC_ARRAY_CALLS__
122 and __FILENAME_SPACES__.
123 3.3 made __LPC_NOSAVE__ always defined and added __ALISTS__,
124 __MCCP__, __LPC_STRUCTS__, __LPC_INLINE_CLOSURES__, __PGSQL__,
125 __PTHREADS__, __TLS__, __BOOT_TIME__, __ALARM_TIME__,
126 __HEART_BEAT_INTERVAL__, __SYNCHRONOUS_HEART_BEAT__, and __PCRE__.
127 3.3.713 added __IDNA__, __SQLITE__.
128 3.3.714 added __OPENSSL__, __GNUTLS__.
129 3.3.718 added __XML_DOM__.
130 3.3.719 removed __PTHREADS__, AMIGA, MSDOS_FS, __BEOS__
131 and added __GCRYPT__.
132 3.3.721 added __FUNCTION__.
133 3.5.0 changed __LPC_STRUCTS__, __LPC_INLINE_CLOSURES__,
134 __LPC_ARRAY_CALLS__ to be always on.
135 removed __ALISTS__
MG Mud User88f12472016-06-24 23:31:02 +0200136
137SEE ALSO
Zesstra7ea4a032019-11-26 20:11:40 +0100138 pragma(LPC), preprocessor(LPC)