/* DO NOT EDIT! * * This file is created automatically by configure from the template * in config.h.in. */ #ifndef CONFIG_H__ #define CONFIG_H__ 1 /* ----------- Commandline Argument Defaults ---------- * These options provide default settings for those options which can * also be set on the commandline. */ /* Define COMPAT_MODE if you are using the 2.4.5 mudlib or one of its * derivatives. */ @cdef_compat_mode@ COMPAT_MODE /* The name of the master object. */ #define MASTER_NAME @val_master_name@ /* Define ALLOW_FILENAME_SPACES if the driver should accept space characters * in filenames. If it is not defined, a hardcoded test for space characters * is activated. */ @cdef_filename_spaces@ ALLOW_FILENAME_SPACES /* --- Runtime limits --- */ /* This is the maximum array size allowed for one single array. * If 0, any size is allowed. */ #define MAX_ARRAY_SIZE @val_max_array_size@ /* This is the maximum number of entries allowed for a single mapping. * If 0, any size is allowed. */ #define MAX_MAPPING_KEYS @val_max_mapping_keys@ /* This is the maximum number of values held in a single mapping. * If 0, any size is allowed. */ #define MAX_MAPPING_SIZE @val_max_mapping_size@ /* Max size of a file allowed to be read by 'read_file()'. */ #define READ_FILE_MAX_SIZE @val_read_file_max_size@ /* Define MAX_BYTE_TRANSFER to the number of bytes you allow to be read * and written with read_bytes and write_bytes */ #define MAX_BYTE_TRANSFER @val_max_byte_transfer@ /* This is the maximum number of callouts allowed at one time. * If 0, any number is allowed. */ #define MAX_CALLOUTS @val_max_callouts@ /* When USE_PTHREADS is used, define this to the maximum amount of data * to be held pending for writing. * A value of 0 means 'unlimited'. */ #define PTHREAD_WRITE_MAX_SIZE @val_pthreads_write_max_size@ /* --- Timing --- */ /* If an object is left alone for a certain time, then the * function clean_up will be called. This function can do anything, * like destructing the object. If the function isn't defined by the * object, then nothing will happen. * * This time should be substantially longer than the swapping time. */ #define TIME_TO_CLEAN_UP @val_time_to_clean_up@ /* How long time until an unused object is swapped out. * Machine with too many players and too little memory: 900 (15 minutes) * Machine with few players and lot of memory: 10000 * Machine with infinite memory: 0 (never swap). */ #define TIME_TO_SWAP @val_time_to_swap@ #define TIME_TO_SWAP_VARIABLES @val_time_to_swap_variables@ /* How many seconds until an object is reset again. * Set this value high if big system, otherwise low. */ #define TIME_TO_RESET @val_time_to_reset@ /* The granularity of alarm() calls. * This is the granularity of the call_outs, * and base granularity of heart_beat, reset und clean_up calls. */ #define ALARM_TIME @val_alarm_time@ /* The interval between heart beats. */ #define HEART_BEAT_INTERVAL @val_heart_beat_interval@ /* Shall all heart beats happen in the same time frame? * (i.e. only every HEART_BEAT_INTERVAL seconds.) */ @cdef_synchronous_heart_beat@ SYNCHRONOUS_HEART_BEAT /* --- Memory --- */ /* Reserve an extra memory area from malloc(), to free when we run out * of memory to get some warning and start Armageddon. * If this value is 0, no area will be reserved. */ #define RESERVED_USER_SIZE @val_reserved_user_size@ #define RESERVED_MASTER_SIZE @val_reserved_master_size@ #define RESERVED_SYSTEM_SIZE @val_reserved_system_size@ /* If MIN_MALLOCED is > 0, the gamedriver will reserve this amount of * memory on startup for large blocks, thus reducing the large block * fragmentation. The value therefore should be a significantly large * multiple of the large chunk size. * As a rule of thumb, reserve enough memory to cover the first couple * of days of uptime. */ #define MIN_MALLOCED @val_min_malloced@ /* If MIN_SMALL_MALLOCED is > 0, the gamedriver will reserve this * amount of memory on startup for small blocks, thus reducing the small block * fragmentation. The value therefore should be a significantly large * multiple of the small chunk size. * As a rule of thumb, reserve enough memory to cover the first couple * of days of uptime. */ #define MIN_SMALL_MALLOCED @val_min_small_malloced@ /* This value gives the upper limit for the total allocated memory * (useful for systems with no functioning process limit). * A value of 0 means 'unlimited'. * TODO: This should be named 'MAX_MALLOC' - ditto in configure. */ #define MAX_MALLOCED @val_max_malloced@ /* --- Interpreter --- */ /* Define STRICT_EUIDS if the driver is to enforce the use of euids, * ie. load_object() and clone_object() require the current object to * have a non-zero euid. */ @cdef_strict_euids@ STRICT_EUIDS /* Maximum number of evaluated nodes/loop. * If this is exceeded, the current function is halted. */ #define MAX_COST @val_max_cost@ /* Define SHARE_VARIABLES if a clone's variables are to be assigned * from the current blueprint's variables. Undefine it if clones * should be initialized by __INIT(). */ @cdef_share_variables@ SHARE_VARIABLES /* --- Communication --- */ /* The input escape character. */ #define INPUT_ESCAPE @val_input_escape@ /* Define what port number the game is to use. */ #define PORTNO @val_portno@ /* Define this to the port on which the driver can receive UDP message. * If set to -1, the port will not be opened unless the mud is given a valid * port number on startup with the -u commandline option. */ #define UDP_PORT @val_udp_port@ /* Maximum numbers of ports the GD accepts connections to. */ #define MAXNUMPORTS @val_maxnumports@ /* Should code for the external request demon be included? */ @cdef_erq_demon@ ERQ_DEMON /* Maximum sizes for an erq send or reply. */ #define ERQ_MAX_REPLY @val_erq_max_reply@ #define ERQ_MAX_SEND @val_erq_max_send@ /* Define this if you want IPv6 support (assuming that your host * actually offers this. */ @cdef_use_ipv6@ USE_IPV6 /* If you want to use threads to write the data to the sockets * define USE_PTHREADS. */ @cdef_use_pthreads@ USE_PTHREADS /* ----------- Compilation Options ---------- * To change these options, the config.h must be recreated and the * driver recompiled. */ /* Trace the most recently executed bytecode instructions? */ @cdef_trace_code@ TRACE_CODE /* If using TRACE_CODE , how many instructions should be kept? */ #define TOTAL_TRACE_LENGTH @val_total_trace_length@ /* Runtime statistics: * COMM_STAT: count number and size of outgoing packets. * APPLY_CACHE_STAT: count number of hits and misses in the apply cache. */ @cdef_comm_stat@ COMM_STAT @cdef_apply_cache_stat@ APPLY_CACHE_STAT /* The name of the swapfile used by the driver to swap out objects (if * enabled), relative to the mudlib directory. The driver will append * '.' to the file. */ #define SWAP_FILE @val_swap_file@ /* --- Memory --- */ /* Which memory manager to use. Possible defines are * MALLOC_smalloc: Satoria's malloc. Fastest, uses the least memory, * supports garbage collection. * MALLOC_slaballoc: Slab allocator. Fastest, reduces fragmentation, * supports garbage collection, not threadsafe. * MALLOC_sysmalloc: the normal system malloc() * MALLOC_ptmalloc: ptmalloc from www.malloc.de - threadsafe. */ #define MALLOC_@val_malloc@ /* Define this to let the memory allocator request memory from the system * directly using sbrk() (assuming the system supports it). * If not defined, the memory allocator will use malloc(). * Supported by: MALLOC_smalloc, MALLOC_slaballoc. */ @cdef_malloc_sbrk@ MALLOC_SBRK /* Define this to annotate all allocations with a magic word to find * simple misuses of memory (like multiple frees). * Supported by: MALLOC_smalloc, MALLOC_slaballoc. */ @cdef_malloc_check@ MALLOC_CHECK /* Define this to annotate all allocations with file:line of the driver * source responsible for it. */ @cdef_malloc_trace@ MALLOC_TRACE /* Define this to annotate all allocations with file:line of the lpc program * responsible for it. */ @cdef_malloc_lpc_trace@ MALLOC_LPC_TRACE /* Define this to log all calls to esbrk() (the system memory allocator). * Works best if MALLOC_TRACE is defined. * This define is useful if your mud keeps growing in total memory size * instead of re-using the memory already allocated. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. */ @cdef_malloc_sbrk_trace@ MALLOC_SBRK_TRACE /* --- Wizlist --- */ /* Where to save the WIZLIST information. * If not defined, and neither given on the commandline, the driver will * not read the WIZLIST file. */ @cdef_wizlist_file@ WIZLIST_FILE @val_wizlist_file@ /* --- Access Control --- */ /* #define ACCESS_CONTROL if you want the driver to do any access control. * TODO: Make this a runtime option. */ @cdef_access_control@ ACCESS_CONTROL /* file for access permissions data */ /* TODO: Make this a runtime option */ #define ACCESS_FILE @val_access_file@ /* logfile to show valid and rejected connections * simple not define this for NO logs * TODO: Make this a runtime option. */ @cdef_access_log@ ACCESS_LOG @val_access_log@ /* --- Language --- */ /* Define USE_PARSE_COMMAND if you want the efun parse_command(). */ @cdef_use_parse_command@ USE_PARSE_COMMAND /* Define USE_SET_LIGHT if you want the efun set_light() and the * simple 2.4.5 light system. */ @cdef_use_set_light@ USE_SET_LIGHT /* Define USE_SET_IS_WIZARD if you want the efun set_is_wizard(). */ @cdef_use_set_is_wizard@ USE_SET_IS_WIZARD /* Define USE_PROCESS_STRING if you want the efun process_string(). */ @cdef_use_process_string@ USE_PROCESS_STRING /* Define USE_SYSTEM_CRYPT if you want crypt() to be implemented by your * operating system (assuming it offers this function). This makes your * programm smaller and may even let you take advantage of improvements * of your OS, but may also prohibit transporting encrypted date like * passwords between different systems. * Undefine USE_SYSTEM_CRYPT if you want to use the driver's portable * crypt() implementation. */ @cdef_use_system_crypt@ USE_SYSTEM_CRYPT /* Define this if you want MCCP (Mud Control Compression Protocol). */ @cdef_use_mccp@ USE_MCCP /* Define this if you want TLS (Transport Layer Security) over Telnet. */ @cdef_use_tls@ USE_TLS /* Define this if you want mySQL support (assuming that your host * actually offers this. */ @cdef_use_mysql@ USE_MYSQL /* Define this if you want PostgreSQL support (assuming that your host * actually offers this. */ @cdef_use_pgsql@ USE_PGSQL /* Define this if you want SQLite support (assuming that your host * actually offers this. */ @cdef_use_sqlite@ USE_SQLITE /* Define this if you want JSON support (assuming that your host * actually offers this. */ @cdef_use_json@ USE_JSON /* Define this if you want expat support (assuming that your host * actually offers this. */ @cdef_use_expat@ USE_EXPAT /* Define this if you want alist support. */ @cdef_use_alists@ USE_ALISTS /* Define this if you want to allow call_other()s on arrays of objects. */ @cdef_lpc_array_calls@ USE_ARRAY_CALLS /* Define this if you want PCRE instead of traditional regexps. */ @cdef_use_pcre@ USE_PCRE /* Define this if you want to use builtin PCRE (ignored when PCRE * is disabled as a whole). */ @cdef_use_builtin_pcre@ USE_BUILTIN_PCRE /* Define this if you want the obsolete and deprecated efuns. */ @cdef_use_deprecated@ USE_DEPRECATED /* --- Runtime limits --- */ /* Maximum size of a socket send buffer. */ #define SET_BUFFER_SIZE_MAX @val_set_buffer_size_max@ /* CATCH_RESERVED_COST is the default value added to the eval cost for the * time executing code guarded by a catch() statement, so that an * eval_cost-too-big error can still be caught and handled. * * To catch an eval_cost too big error in an object that called recursive * master functions, CATCH_RESERVED_COST should be greater than * MASTER_RESERVED_COST. */ #define CATCH_RESERVED_COST @val_catch_reserved_cost@ /* MASTER_RESERVED_COST is the total reserve available for master applies. * It is halved for every recursion into another master apply. */ #define MASTER_RESERVED_COST @val_master_reserved_cost@ /* must be power of 2 */ /* TODO: Check that at runtime */ /* If this is defined, expensive operations like string additions * receive additional evalcosts depending on the amount of data handled. */ @cdef_dynamic_costs@ DYNAMIC_COSTS /* Define the maximum stack size of the stack machine. This stack will also * contain all local variables and arguments. */ #define EVALUATOR_STACK_SIZE @val_evaluator_stack_size@ /* Define the maximum call depth for functions. * MAX_USER_TRACE is used for for normal program execution, the full * MAX_TRACE is only available in error handling. * * MAX_TRACE must be larger than MAX_USER_TRACE (check at compile time). */ #define MAX_USER_TRACE @val_max_user_trace@ #define MAX_TRACE @val_max_trace@ /* Maximum number of bits in a bit field. They are stored in printable * strings, 6 bits per byte. * The limit is more based on considerations of speed than memory * consumption. */ #define MAX_BITS @val_max_bits@ /* Maximum number of players in the game. */ #define MAX_PLAYERS @val_max_players@ /* When uploading files, we want fast response; however, normal players * shouldn't be able to hog the system in this way. Define ALLOWED_ED_CMDS * to be the ratio of the no of ed cmds executed per player cmd. */ #define ALLOWED_ED_CMDS @val_allowed_ed_cmds@ /* TODO: ALLOWED_ED_CMDS: make this a runtime option */ /* --- Compiler --- */ /* Define the size of the compiler stack. This defines how complex * expressions the compiler can parse. The value should be big enough. */ #define COMPILER_STACK_SIZE @val_compiler_stack_size@ /* Max number of local variables in a function. */ #define MAX_LOCAL @val_max_local@ /* Maximum size of an expanded preprocessor definition. */ #define DEFMAX @val_defmax@ /* --- Internal Tables --- */ /* Define the size of the shared string hash table. This number needn't * be prime, probably between 1000 and 30000; if you set it to about 1/5 * of the number of distinct strings you have, you will get a hit ratio * (number of comparisons to find a string) very close to 1, as found strings * are automatically moved to the head of a hash chain. You will never * need more, and you will still get good results with a smaller table. * If the size is a power of two, hashing will be faster. */ #define HTABLE_SIZE @val_htable_size@ /* Object hash table size. * Define this like you did with the strings; probably set to about 1/4 of * the number of objects in a game, as the distribution of accesses to * objects is somewhat more uniform than that of strings. */ #define OTABLE_SIZE @val_otable_size@ /* Define the size of the table of defines, reserved words, identifiers * and efun names. Should be either several times smaller than HTABLE_SIZE * or identical with it. */ #define ITABLE_SIZE @val_itable_size@ /* the number of apply_low cache entries will be 2^APPLY_CACHE_BITS. */ #define APPLY_CACHE_BITS @val_apply_cache_bits@ /* The parameters of the regular expression/result cache. * The expression cache uses a hashtable of RXCACHE_TABLE entries. * Undefine RXCACHE_TABLE to disable the all regexp caching. */ @cdef_rxcache_table@ RXCACHE_TABLE @val_rxcache_table@ /* --- Current Developments --- * These options can be used to disable developments-in-progress if their * code turns out to be interrrupting. */ /* Define this if you want structs supported. */ @cdef_use_structs@ USE_STRUCTS /* Define this if you want the new inline closure syntax supported. * (f-020528). */ @cdef_use_new_inlines@ USE_NEW_INLINES /* --- Profiling --- * For profiling of the VM instruction implementations, refer to the Makefile */ /* Enable usage statistics of VM instructions. * For profiling of the VM instructions themselves, see the Profiling * Options in the Makefile. */ @cdef_opcprof@ OPCPROF #ifdef OPCPROF /* With OPCPROF, the dump of the statistics include the names * of the instructions. */ @cdef_verbose_opcprof@ VERBOSE_OPCPROF #endif /* --- Standard Debugging --- */ /* Enable basic run time sanity checks. This will use more time * and space, but nevertheless you are strongly encouraged to keep * it defined. */ @cdef_debug@ DEBUG /* Enable debug output from the LPC compiler. */ @cdef_yydebug@ YYDEBUG /* Disable inlining. */ @cdef_no_inlines@ NO_INLINES /* Activate debug prints in the telnet machine. */ @cdef_debug_telnet@ DEBUG_TELNET /* Activate allocation debug prints in the malloc module. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. */ @cdef_debug_malloc_allocs@ DEBUG_MALLOC_ALLOCS /* The DEBUG level for the ERQ daemon: * 0 : no debug output * 1 : standard debug output * 2 : verbose debug output */ #define ERQ_DEBUG @val_erq_debug@ /* --- Specific Debugging --- * These options have been introduced to debug specific problems and will * be removed again later. */ /* Enable the automatic data cleanup from the backend. * TODO: Remove this macro once it is proven stable. */ #define NEW_CLEANUP /* Log the details of the automatic data cleanup for each individual object. * This is useful if the cleanup is suspected to hog the CPU. * TODO: Remove this macro once it is proven stable. */ #undef LOG_NEW_CLEANUP /* Log the details of the automatic data cleanup of all objects. This is * useful if the cleanup is suspected to hog the CPU. * TODO: Remove this macro once it is proven stable. */ #define LOG_NEW_CLEANUP_ALL /* Enable the use of freelists in the malloc AVL nodes. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. * TODO: Remove this macro once it is proven stable or if the change * TODO:: didn't bring any advantages.. */ #define USE_AVL_FREELIST /* Order malloc large block freelists by address. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. * TODO: Remove if it doesn't help with the fragmentation, as it uses up * TODO:: a small, but measurable amount of time in the allocator. */ #define MALLOC_ORDER_LARGE_FREELISTS /* Order slaballoc partial-slab freelists by number of free blocks. * Supported by: MALLOC_slaballoc. * TODO: Remove if it doesn't help with the fragmentation, as it uses up * TODO:: a small, but measurable amount of time in the allocator. */ #define MALLOC_ORDER_SLAB_FREELISTS /* Allow slaballoc to use multiples of DESIRED_SLAB_SIZE when creating * new slabs. */ #define SLABALLOC_DYNAMIC_SLABS /* Collect extended malloc statistics. * Supported by: MALLOC_smalloc, MALLOC_slaballoc. * TODO: Remove this macro or make it configurable. */ #define MALLOC_EXT_STATISTICS /* Collected statistics about string comparisons. * TODO: Remove this macro after we got our data. */ #define EXT_STRING_STATS /* Trace changes to the tot_alloc_object and tot_alloc_object_size * statistics, in order to find the status bugs (enables commandline * option --check-object-stat). Will produce a decent amount of * output on stderr. */ @cdef_check_object_stat@ CHECK_OBJECT_STAT /* Activate total mapping size consistency check code. It has a small * impact on the execution speed. This define was used to find * the inaccuracy in the mapping statistic. */ @cdef_check_mapping_total@ CHECK_MAPPING_TOTAL /* Activate object refcount check code. It will produce a decent * amount of log output. It will also fatal() the driver as soon * as it detects an inconsistency in the list of destructed objects. */ @cdef_check_object_ref@ CHECK_OBJECT_REF /* Activate object referencing checking code during the GC. It will * print error messages to gcout when an object or program is * referenced as something else. No penalty for using. * Requires MALLOC_TRACE to work. Incompatible with DUMP_GC_REFS. */ #ifdef MALLOC_TRACE @cdef_check_object_gc_ref@ CHECK_OBJECT_GC_REF #endif /* Sometimes the GC stumbles over invalid references to memory * blocks (namely 'Program referenced as something else'). Define * this macro to get a detailed dump of all found references * (Warning: LOTS of output!). Incompatible with CHECK_OBJECT_GC_REF. */ @cdef_dump_gc_refs@ DUMP_GC_REFS /****** PSYCLPC ******/ /* maximum number of currently outgoing connections which are * not yet fully established * psyced needs a quite large value here */ #define MAX_OUTCONN @val_max_net_connects@ /* Size of each interactive socket's buffer for incoming data. * This is also the maximum size for one command(). * For MUD use, this value used to be 2048 traditionally. */ #define MAX_TEXT @val_size_socket_buffer@ /* Why make comments in config.h if you're not supposed to edit it anyway? * Here is the list of the new psyclpc flags. * See elsewhere for explainations. * @cdef_backtrace_always@ BACKTRACE_ALWAYS @cdef_use_paranoid_refs@ PARANOID_REFS */ @cdef_use_actions@ USE_ACTIONS @cdef_use_authlocal@ USE_AUTHLOCAL @cdef_use_builtin_editor@ USE_BUILTIN_EDITOR @cdef_use_experimental@ USE_EXPERIMENTAL @cdef_use_inventories@ USE_INVENTORIES @cdef_use_ldmud_compatibility@ USE_LDMUD_COMPATIBILITY @cdef_use_paranoia@ USE_PARANOIA @cdef_use_restored_objects@ USE_RESTORED_OBJECTS @cdef_use_shadowing@ USE_SHADOWING @cdef_use_snooping@ USE_SNOOPING @cdef_use_socket_limits@ USE_SOCKET_LIMITS @cdef_use_srv@ USE_SRV @cdef_use_swap@ USE_SWAP /* Set up a configuration like LDMUD with a lot more debugging * code in your regularely running driver than you will want. * Of course you also have to set all the new use_something * selectors to yes, or simply run ./configure as it stands. */ #ifdef USE_LDMUD_COMPATIBILITY # ifdef DEBUG # ifndef USE_PARANOIA # define USE_PARANOIA # endif # endif # define CHECK_REFS # define USE_TRASH # define VERBOSE #endif #endif /* CONFIG_H__ */