MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | NAME |
| 2 | predefined - predefined #defines by the parser |
| 3 | |
| 4 | DESCRIPTION |
| 5 | Several preprocessor macros are pre#defined by the parser, |
| 6 | to provide information about parser version, compile time |
| 7 | options and parser invocation options: |
| 8 | |
| 9 | 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. |
| 16 | |
| 17 | __MASTER_OBJECT__ : the name of the master object (in compat mode |
| 18 | without leading '/'). |
| 19 | __FILE__ : the name of the compiled file (in compat mode |
| 20 | without leading '/'). |
| 21 | __LINE__ : the current line number. |
| 22 | __FUNCTION__ : the current function name. |
| 23 | __DIR__ : the directory path of the compiled file (in |
| 24 | compat mode without leading '/'). |
| 25 | __PATH__(n) : the directory path of the compiled file without |
| 26 | the <n> trailing elements (in compat mode without |
| 27 | 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 means |
| 33 | 'no patchlevel'. |
| 34 | __VERSION_COMMITID__ : the commit ID of the source of the driver |
| 35 | (attention: it might be <unknown>, if the driver |
| 36 | was not compiled from a git repository) |
| 37 | __VERSION_LOCAL__ : the (optional) LOCAL_LEVEL, the user has defined. |
| 38 | |
| 39 | |
| 40 | __DOMAIN_NAME__ : the domain the host is part of. |
| 41 | __HOST_IP_NUMBER__ : the hosts IP number (as a string). |
| 42 | __HOST_NAME__ : the full hostname. |
| 43 | __MAX_RECURSION__ : the max count of nested function calls |
| 44 | (this is config.h:MAX_USER_TRACE). |
| 45 | __MAX_EVAL_COST__ : the max evaluation cost. |
| 46 | __RESET_TIME__ : default interval time between object resets. |
| 47 | __CLEANUP_TIME__ : default interval time between object cleanups. |
| 48 | __ALARM_TIME__ : the configured timing granularity. |
| 49 | __HEART_BEAT_INTERVAL__: the configured heartbeat time. |
| 50 | __SYNCHRONOUS_HEART_BEAT__: defined if synchronous heartbeats are |
| 51 | enabled. |
| 52 | __MAX_COMMAND_LENGTH__: the maximum length a command can have. |
| 53 | __EFUN_DEFINED__(name) : if the efun 'name' exists, this |
| 54 | macro evaluates to " 1 ", else to " 0 ". |
| 55 | __DRIVER_LOG__ : the name of the default debug.log file (within |
| 56 | the mudlib); undefined if a different name |
| 57 | has been specified on the commandline. |
| 58 | __WIZLIST__ : the name of the (mudlib) file from where the |
| 59 | driver read the initial WIZLIST information. |
| 60 | It is undefined if the driver was configured |
| 61 | to not read the information. |
| 62 | __MAX_MALLOC__ : the internal upper limit for total memory |
| 63 | usage. |
| 64 | __INT_MAX__ : the largest integer number |
| 65 | __INT_MIN__ : the smallest integer number |
| 66 | __FLOAT_MAX__ : the largest (positive) float number |
| 67 | __FLOAT_MIN__ : the smallest (positive) float number |
| 68 | |
| 69 | __LPC_NOSAVE__ : always defined |
| 70 | __LPC_STRUCTS__ : defined when struct support is enabled. |
| 71 | Once structs are fully supported, this macro |
| 72 | will always be defined. |
| 73 | __LPC_INLINE_CLOSURES__: defined when the 'real' inline closures |
| 74 | are enabled. |
| 75 | __LPC_ARRAY_CALLS__: call_other()s on arrays of objects enabled. |
| 76 | __BOOT_TIME__ : the time() the driver was started. |
| 77 | |
| 78 | If the ERQ is supported, the following macros are defined: |
| 79 | |
| 80 | __ERQ_MAX_SEND__ : the max size of the send buffer |
| 81 | __ERQ_MAX_REPLY__ : the max size of the reply buffer |
| 82 | |
| 83 | The following macros are defined if their associated package |
| 84 | has been compiled into the driver: |
| 85 | |
| 86 | __IDNA__ : support for IDNA |
| 87 | __IPV6__ : support for IP v.6 |
| 88 | __MYSQL__ : support for mySQL |
| 89 | __PGSQL__ : support for PostgreSQL |
| 90 | __SQLITE__ : support for SQLite 3. |
| 91 | __XML_DOM__ : support for XML parsing. |
| 92 | __JSON__ : support for JSON parsing/serializing. |
| 93 | __MCCP__: support for MCCP http://www.randomly.org/projects/MCCP |
| 94 | __ALISTS__: support for alists |
| 95 | __PCRE__: support for PCRE |
| 96 | __TLS__: support for TLS (internal) |
| 97 | __GNUTLS__: if __TLS__: TLS support provided by GnuTLS. |
| 98 | __OPENSSL__: if __TLS__: TLS support provided by OpenSSL. |
| 99 | __GCRYPT__: cryptographic routines provided by libgcrypt. |
| 100 | __DEPRECATED__: support for obsolete and deprecated efuns. |
| 101 | |
| 102 | |
| 103 | HISTORY |
| 104 | 3.2.1 added __DOMAIN_NAME__, __HOST_IP_NUMBER__, __HOST_NAME__, |
| 105 | __MAX_RECURSION__, __EFUN_DEFINED__(). |
| 106 | 3.2.5 added __COMPAT_MODE__, __NATIVE_MODE__, __EUIDS__, |
| 107 | __ERQ_MAX_SEND__ and __ERQ_MAX_REPLY__. |
| 108 | 3.2.6 added __MAX_EVAL_COST__. |
| 109 | 3.2.7 added __STRICT_EUIDS__ and made __EUIDS__ standard. |
| 110 | 3.2.8 added __IPV6__, __LPC_NOSAVE__, __DIR__, __PATH__(). |
| 111 | 3.2.9 added __LDMUD__, __MYSQL__, __DEPRECATED__, __VERSION_MAJOR__, |
| 112 | __VERSION_MINOR__, __VERSION_MICRO__, __VERSION_PATCH__, |
| 113 | __INT_MAX__, __INT_MIN__, __FLOAT_MIN__, __FLOAT_MAX__, |
| 114 | __CATCH_EVAL_COST__, __MASTER_EVAL_COST__, __RESET_TIME__, |
| 115 | __CLEANUP_TIME__, __DRIVER_LOG__, and __WIZLIST__. |
| 116 | 3.2.10 added __MAX_MALLOC__, __MSDOS_FS__, __LPC_ARRAY_CALLS__ |
| 117 | and __FILENAME_SPACES__. |
| 118 | 3.3 made __LPC_NOSAVE__ always defined and added __ALISTS__, |
| 119 | __MCCP__, __LPC_STRUCTS__, __LPC_INLINE_CLOSURES__, __PGSQL__, |
| 120 | __PTHREADS__, __TLS__, __BOOT_TIME__, __ALARM_TIME__, |
| 121 | __HEART_BEAT_INTERVAL__, __SYNCHRONOUS_HEART_BEAT__, and __PCRE__. |
| 122 | 3.3.713 added __IDNA__, __SQLITE__. |
| 123 | 3.3.714 added __OPENSSL__, __GNUTLS__. |
| 124 | 3.3.718 added __XML_DOM__. |
| 125 | 3.3.719 removed __PTHREADS__, AMIGA, MSDOS_FS, __BEOS__ |
| 126 | and added __GCRYPT__. |
| 127 | 3.3.721 added __FUNCTION__. |
| 128 | |
| 129 | SEE ALSO |
| 130 | pragma(LPC), preprocessor(LPC) |