Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ubra fluffos-fluffos-2.27/src/build.FluffOS fluffos-2.27.3/src/build.FluffOS
- --- fluffos-fluffos-2.27/src/build.FluffOS 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/build.FluffOS 2019-01-12 14:31:34.145284575 -0800
- @@ -324,16 +324,29 @@
- END
- $CC -c comptest.c
- -ar rcu comptest.a comptest.o
- -if test $? -ne 0; then
- - echo "FATAL ERROR: Could not find ar."
- +gcc-ar rcu comptest.a comptest.o
- +if test $? -eq 0; then
- + AR=gcc-ar
- +else
- + ar rcu comptest.a comptest.o
- + if test $? -eq 0; then
- + AR=ar
- + else
- + echo "FATAL ERROR: Could not find gcc-ar."
- exit
- + fi
- fi
- -ranlib comptest.a
- +gcc-ranlib comptest.a
- if test $? -eq 0; then
- - RANLIB=ranlib
- + RANLIB=gcc-ranlib
- else
- - RANLIB=/bin/true
- + ranlib comptest.a
- + if test $? -eq 0; then
- + RANLIB=ranlib
- + else
- + echo "FATAL ERROR: Could not find gcc-ranlib."
- + exit
- + fi
- fi
- #
- @@ -429,6 +442,7 @@
- echo CC=$CC >>Makefile.tmp
- echo YACC=$YACC >>Makefile.tmp
- echo RANLIB=$RANLIB >>Makefile.tmp
- +echo AR=$AR >>Makefile.tmp
- echo A=a >>Makefile.tmp
- echo O=o >>Makefile.tmp
- echo A_OUT=$A_OUT >>Makefile.tmp
- diff -ubra fluffos-fluffos-2.27/src/edit_source.c fluffos-2.27.3/src/edit_source.c
- --- fluffos-fluffos-2.27/src/edit_source.c 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/edit_source.c 2019-01-12 14:31:34.149284665 -0800
- @@ -13,6 +13,7 @@
- #include "hash.h"
- #include <stdlib.h>
- #include <unistd.h>
- +#include <stdint.h>
- #ifdef WIN32
- #include <process.h>
- diff -ubra fluffos-fluffos-2.27/src/eval.c fluffos-2.27.3/src/eval.c
- --- fluffos-fluffos-2.27/src/eval.c 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/eval.c 2019-01-12 14:31:34.149284665 -0800
- @@ -11,7 +11,7 @@
- int lasttime;
- LPC_INT max_cost;
- -void set_eval(int etime){
- +void set_eval(LPC_INT etime){
- #ifndef WIN32
- long diff;
- gettimeofday(&tv, NULL);
- diff -ubra fluffos-fluffos-2.27/src/GNUmakefile.in fluffos-2.27.3/src/GNUmakefile.in
- --- fluffos-fluffos-2.27/src/GNUmakefile.in 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/GNUmakefile.in 2019-01-12 14:31:34.141284487 -0800
- @@ -91,7 +91,7 @@
- -mv y.tab.h grammar.tab.h
- packages/packages.a: packages/*.c
- - $(MAKE) -C packages 'CC=$(CC)' 'CFLAGS=$(CFLAGS) $(OPTIMIZE)' 'OBJDIR=../$(OBJDIR)' 'RANLIB=$(RANLIB)' 'A=$(A)' 'O=$(O)'
- + $(MAKE) -C packages 'CC=$(CC)' 'CFLAGS=$(CFLAGS) $(OPTIMIZE)' 'OBJDIR=../$(OBJDIR)' 'RANLIB=$(RANLIB)' 'AR=$(AR)' 'A=$(A)' 'O=$(O)'
- $(DRIVER_BIN): packages/packages.a $(OBJ) dtrace_compile
- -mv -f $(DRIVER_BIN) $(DRIVER_BIN).old
- diff -ubra fluffos-fluffos-2.27/src/make_func.y fluffos-2.27.3/src/make_func.y
- --- fluffos-fluffos-2.27/src/make_func.y 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/make_func.y 2019-01-12 14:31:34.161284932 -0800
- @@ -7,6 +7,7 @@
- #include "preprocess.h"
- #include "edit_source.h"
- #include <stdlib.h>
- +#include <stdint.h>
- #ifdef WIN32
- #define MSDOS
- diff -ubra fluffos-fluffos-2.27/src/options.h fluffos-2.27.3/src/options.h
- --- fluffos-fluffos-2.27/src/options.h 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/options.h 2019-01-12 14:31:34.161284932 -0800
- @@ -57,15 +57,37 @@
- * * Wodan's malloc, uses system malloc for small allocations and spreads
- * * large allocations through the 64 bit memory space
- * * won't work on 32 bit systems.
- + *
- * MALLOC32
- * * fixes realloc by always doing a malloc/memcpy/free instead, try this
- * * if you use more memory than expected (or MALLOC64 on a 64bit system).
- + *
- + * SMALLOC:
- + * * Satoria's smalloc.
- + * * Statistics available. (see wrappers and DO_MSTATS)
- + * * Faster than most system mallocs with modest ammount of memory overhead.
- + * * Can fall back onto system malloc if sbrk() not ok.
- + *
- + * BSDMALLOC:
- + * * BSD (Berkeley Software Distributions) malloc.
- + * * Statistics available. (see wrappers and DO_MSTATS)
- + * * Faster than SMALLOC but more memory overhead.
- + * * Requires sbrk().
- + *
- + * GCMALLOC:
- + * * Garbage Collecting malloc.
- + * * This malloc automatically frees memory when no longer referenced.
- + * * Performance can be less predictable, as garbage collection happens
- + * automatically, and is not directly controllable for the user.
- */
- #define SYSMALLOC
- -#undef MMALLOC
- #undef MALLOC64
- #undef MALLOC32
- +#undef MMALLOC
- +#undef SMALLOC
- +#undef BSDMALLOC
- #undef GCMALLOC /* needs -lgc in system_libs */
- +
- /* You may optionally choose one (or none) of these malloc wrappers. These
- * can be used in conjunction with any of the above malloc packages.
- *
- @@ -202,9 +224,6 @@
- */
- #undef NO_SNOOP
- -/* NO_ADD_ACTION: define this to remove add_action, commands, livings, etc.
- - process_input() then becomes the only way to deal with player input. */
- -
- /* NO_ENVIRONMENT: define this to remove the handling of object containment
- * relationships by the driver
- *
- @@ -247,7 +266,6 @@
- * when you're not actually using the old range behavior*/
- #undef WARN_OLD_RANGE_BEHAVIOR
- -
- /* OLD_ED: ed() efun backwards compatible with the old version. The new
- * version requires/allows a mudlib front end.
- *
- @@ -310,14 +328,13 @@
- * Keep statistics about allocated strings, etc. Which can be viewed with
- * the mud_status() efun. If this is off, mud_status() and memory_info()
- * ignore allocated strings, but string operations run faster.
- + *
- + * Similarly for arrays and classes ...
- */
- #define STRING_STATS
- -
- -/*
- - * Similarly for arrays ...
- - */
- #define ARRAY_STATS
- #define CLASS_STATS
- +
- /* LOG_CATCHES: define this to cause errors that are catch()'d to be
- * sent to the debug log anyway.
- *
- @@ -368,7 +385,7 @@
- * config files by default. If you don't wish to use this define, you may
- * always specify a full path to the config file when starting the driver.
- */
- -#define CONFIG_FILE_DIR "/home/atuin/bin"
- +#define CONFIG_FILE_DIR "."
- /* DEFAULT_PRAGMAS: This should be a sum of pragmas you want to always
- * be on, i.e.
- @@ -391,8 +408,12 @@
- * PRAGMA_SAVE_TYPES: save the types of function arguments for checking
- * calls to functions in this object by objects that
- * inherit it.
- + * PRAGMA_SAVE_BINARY: save a compiled binary version of this file for
- + * faster loading next time it is needed.
- + * (This is almost certainly broken.)
- * PRAGMA_OPTIMIZE: make a second pass over the generated code to
- - * optimize it further. Currently maybe broken.
- + * optimize it further. Used to do jump threading.
- + * (This is probably broken.)
- * PRAGMA_ERROR_CONTEXT:include some text telling where on the line a
- * compilation error occured.
- */
- @@ -404,6 +425,25 @@
- */
- #define SUPPRESS_ARGUMENT_WARNINGS
- +/* BINARIES: define this to enable the 'save_binary' pragma.
- + * This pragma, when set in a program, will cause it to save a
- + * binary image when loaded, so that subsequent loadings will
- + * be much faster. The binaries are saved in the directory
- + * specified in the configuration file. The binaries will not
- + * load if the LPC source or any of the inherited or included
- + * files are out of date, in which case the file is compiled
- + * normally (and may save a new binary).
- + *
- + * In order to save the binary, valid_save_binary() is called
- + * in master.c, and is passed the name of the source file. If
- + * this returns a non-zero value, the binary is allowed to be
- + * saved. Allowing any file by any wizard to be saved as a
- + * binary is convenient, but may take up a lot of disk space.
- + *
- + * (This is almost certainly broken.)
- + */
- +#undef BINARIES
- +
- /* NO_RESETS: completely disable the periodic calling of reset() */
- #undef NO_RESETS
- @@ -443,6 +483,11 @@
- #define NO_ANSI
- #define STRIP_BEFORE_PROCESS_INPUT
- +/* ANSI_SUBSTITUTE: This replaces the ESC character (ASCII 27) with the
- + * "record separator" non-printable character (ASCII 30).
- + */
- +#define ANSI_SUBSTITUTE 0x1e
- +
- /* OPCPROF: define this if you wish to enable OPC profiling. Allows a dump
- * of the # of times each efun is invoked (via the opcprof() efun).
- */
- @@ -461,6 +506,19 @@
- */
- #define TRAP_CRASHES
- +/* DROP_CORE: define this if you want the driver to attempt to create
- + * a core file when it crashes via the crash_MudOS() function. This
- + * define only has an affect if -DDEBUG isn't defined in the makefile
- + * (except for the SIGINT and SIGTERM signals which are always trapped).
- + *
- + * [NOTE: keep this undefined for now since it seems to hang some machines
- + * upon crashing (some DECstations apparently). If you want to get a core
- + * file, undef'ing TRAP_CRASHES should work.]
- + *
- + * This is almost certainly broken.
- + */
- +#undef DROP_CORE
- +
- /* THIS_PLAYER_IN_CALL_OUT: define this if you wish this_player() to be
- * usable from within call_out() callbacks.
- */
- @@ -615,7 +673,10 @@
- /* PACKAGE_PARSER: Natural language parsing efuns for interactive fiction
- * type applications
- */
- -#undef PACKAGE_PARSER
- +#define PACKAGE_PARSER
- +
- +/* Allows for some extended parser debugging? */
- +#define PARSE_DEBUG
- /* PACKAGE_EXTERNAL: Allows the driver to exec() commands specified in the
- * config file.
- @@ -639,6 +700,15 @@
- #undef USE_POSTGRES
- #endif
- +/*PACKAGE DWLIB: some discworld mudlib simuls coded in C (well just one right now) */
- +#define PACKAGE_DWLIB
- +
- +/* Some specific code for the Dead Souls mudlib */
- +#undef PACKAGE_DSLIB
- +
- +/* Allow the use of perl compatible regular expressions */
- +#define PACKAGE_PCRE
- +
- /****************************************************************************
- * UID PACKAGE *
- * ----------- *
- @@ -658,11 +728,6 @@
- */
- #define PACKAGE_UIDS
- -/*PACKAGE DWLIB: some discworld mudlib simuls coded in C (well just one right
- - now) */
- -
- -#define PACKAGE_DWLIB
- -
- /* AUTO_SETEUID: when an object is created it's euid is automatically set to
- * the equivalent of seteuid(getuid(this_object())). undef AUTO_SETEUID
- * if you would rather have the euid of the created object be set to 0.
- @@ -694,7 +759,25 @@
- */
- #undef USE_32BIT_ADDRESSES
- +/* LPC_TO_C: define this to enable LPC->C compilation.
- + *
- + * [NOTE: BINARIES must also be defined for LPC->C to work. Actually
- + * using binaries is not required, though.]
- + *
- + * This is almost certainly broken.
- + */
- +#undef LPC_TO_C
- +
- /* HEARTBEAT_INTERVAL: define heartbeat interval in seconds.
- + * It used to do this in microseconds (us).
- + * 1,000,000 us = 1 second. The value of this macro specifies
- + * the frequency with which the heart_beat method will be called in
- + * those LPC objects which have called set_heart_beat(1).
- + *
- + * [NOTE: if ualarm() isn't available, alarm() is used instead. Since
- + * alarm() requires its argument in units of a second, we map 1 - 1,000,000 us
- + * to an actual interval of one (1) second and 1,000,001 - 2,000,000 maps to
- + * an actual interval of two (2) seconds, etc.]
- */
- #define HEARTBEAT_INTERVAL 1
- @@ -795,8 +878,10 @@
- /* CFG_MAX_GLOBAL_VARIABLES: This value determines the maximum number of
- * global variables per object. The maximum value is 65536. There is
- * a marginal memory increase for a value over 256.
- + *
- + * Increasing max global vars beyond 256 is not recommended.
- */
- -#define CFG_MAX_GLOBAL_VARIABLES 65536
- +#define CFG_MAX_GLOBAL_VARIABLES 256
- #define CFG_EVALUATOR_STACK_SIZE 3000
- #define CFG_COMPILER_STACK_SIZE 600
- @@ -873,6 +958,7 @@
- /* ALLOW_INHERIT_AFTER_FUNCTION: allow inheriting after functions have been defined (this includes prototypes). This caused crashes in v22.2a but it may have been fixed since */
- #undef ALLOW_INHERIT_AFTER_FUNCTION
- +#undef ALLOW_INHERIT_AFTER_GLOBAL_VARIABLES
- /*PACKAGE_ASYNC: adds some efuns for asyncronous IO */
- #define PACKAGE_ASYNC
- @@ -913,5 +999,8 @@
- /* use POSIX timers for eval_cost */
- #define POSIX_TIMERS
- -#endif
- +/* Not sure why this is needed, maybe old MudOS -> FluffOS glue code? */
- +#define FLUFFOS
- +
- +#endif
- diff -ubra fluffos-fluffos-2.27/src/packages/Makefile.master fluffos-2.27.3/src/packages/Makefile.master
- --- fluffos-fluffos-2.27/src/packages/Makefile.master 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/packages/Makefile.master 2019-01-12 14:31:34.161284932 -0800
- @@ -11,7 +11,7 @@
- %endif
- all: $(OBJ)
- - ar rcu packages.$(A) $(OBJ)
- + $(AR) rcu packages.$(A) $(OBJ)
- $(RANLIB) packages.$(A)
- %ifdef GNU
- diff -ubra fluffos-fluffos-2.27/src/socket_efuns.c fluffos-2.27.3/src/socket_efuns.c
- --- fluffos-fluffos-2.27/src/socket_efuns.c 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/socket_efuns.c 2019-01-12 14:31:34.169285111 -0800
- @@ -1446,7 +1446,8 @@
- ret->item[4].u.string = string_copy(inet_address(&lpc_socks[which].r_addr),
- "socket_status");
- - if (!(lpc_socks[which].flags & STATE_FLUSHING) && lpc_socks[which].owner_ob && !(lpc_socks[which].owner_ob->flags & O_DESTRUCTED)) {
- + // Fix per Kalinash's suggestion, if (!(lpc_socks[which].flags & STATE_FLUSHING) && ...
- + if (!(lpc_socks[which].flags != STATE_FLUSHING) && lpc_socks[which].owner_ob && !(lpc_socks[which].owner_ob->flags & O_DESTRUCTED)) {
- ret->item[5].type = T_OBJECT;
- ret->item[5].u.ob = lpc_socks[which].owner_ob;
- add_ref(lpc_socks[which].owner_ob, "socket_status");
- diff -ubra fluffos-fluffos-2.27/src/std_incl.h fluffos-2.27.3/src/std_incl.h
- --- fluffos-fluffos-2.27/src/std_incl.h 2013-04-29 06:15:04.000000000 -0700
- +++ fluffos-2.27.3/src/std_incl.h 2019-01-12 14:31:34.169285111 -0800
- @@ -8,6 +8,7 @@
- # include <unistd.h>
- #endif
- +#include <stdint.h>
- #include <sys/types.h>
- #include <stdio.h>
- #include <setjmp.h>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement