~elly/lambdamoo unlisted

688186945c5c7133fbabc4b0ed9ba6cb2db14b7e — Elly Fong-Jones 6 months ago c8f0c2e
gut options.h as well
2 files changed, 1 insertions(+), 110 deletions(-)

M options.h
M tasks.c
M options.h => options.h +0 -110
@@ 86,31 86,9 @@
#define DEFAULT_FG_SECONDS	5
#define DEFAULT_BG_SECONDS	3

/******************************************************************************
 * NETWORK_PROTOCOL must be defined as one of the following:
 *
 * NP_SINGLE	The server will accept only one user at a time, communicating
 *		with them using the standard input and output streams of the
 *		server itself.
 * NP_TCP	The server will use TCP/IP protocols, such as are used by the
 *		Internet `telnet' command.
 * NP_LOCAL	The server will use a non-networking mechanism, entirely local
 *		to the machine on which the server is running.  Depending on
 *		the value of NETWORK_STYLE, below, this will be either UNIX-
 *		domain sockets (NS_BSD) or named pipes (NS_SYSV).
 *
 * If NP_TCP is selected, then DEFAULT_PORT is the TCP port number on which the
 * server listens when no port argument is given on the command line.
 *
 * If NP_LOCAL is selected, then DEFAULT_CONNECT_FILE is the name of the UNIX
 * pseudo-file through which the server will listen for connections when no
 * file name is given on the command line.
 */

#define NETWORK_PROTOCOL 	NP_TCP

#define DEFAULT_PORT 		7777
#define DEFAULT_CONNECT_FILE	"/tmp/.MOO-server"

/******************************************************************************
 * If NETWORK_PROTOCOL is not defined as NP_SINGLE, then NETWORK_STYLE must be


@@ 125,24 103,6 @@
#define NETWORK_STYLE NS_BSD

/******************************************************************************
 * If NETWORK_PROTOCOL is not defined as NP_SINGLE, then MPLEX_STYLE must be
 * defined as one of the following:
 *
 * MP_SELECT	The server will assume that the select() system call exists.
 * MP_POLL	The server will assume that the poll() system call exists and
 *		that, if NETWORK_PROTOCOL is NP_LOCAL above, it works for
 *		named pipes (FIFOs).
 * MP_FAKE	The server will use a nasty trick that works only if you've
 *		defined NETWORK_PROTOCOL as NP_LOCAL and NETWORK_STYLE as
 *		NS_SYSV above.
 *
 * Usually, it works best to leave MPLEX_STYLE undefined and let the code at
 * the bottom of this file pick the right value.
 */

/* #define MPLEX_STYLE MP_POLL */

/******************************************************************************
 * Define OUTBOUND_NETWORK to enable the built-in MOO function
 * open_network_connection(), which allows (only) wizard-owned MOO code to make
 * outbound network connections from the server.


@@ 236,25 196,6 @@
#error Think carefully before enabling BYTECODE_REDUCE_REF.  This feature is still beta.  Comment out this line if you are sure.
#endif

/******************************************************************************
 * This package comes with a copy of the implementation of malloc() from GNU
 * Emacs.  This is a very nice and reasonably portable implementation, but some
 * systems, notably the NeXT machine, won't allow programs to provide their own
 * implementations of standard C functions.  Also, the GNU malloc()
 * implementation uses a fair amount more memory than some system-supplied
 * ones, though it does allow for better debugging support.  Define
 * USE_GNU_MALLOC to enable the use of the GNU malloc() implementation.
 ******************************************************************************
 * NOTE: This switch is now officially deprecated; it is recommended that you
 *	 avoid its use.  The GNU code is no longer as portable as once it might
 *	 have been, and it causes compilation errors on many systems.  If you
 *	 do enable it, and then experience compilation problems in the file
 *	 `gnu_malloc.c', your first step should be to re-disable its use.  This
 *	 option may be completely removed in a later release of the server.
 ******************************************************************************
 */

/* #define USE_GNU_MALLOC */

/*****************************************************************************
 ********** You shouldn't need to change anything below this point. **********


@@ 281,57 222,6 @@

#include "config.h"

#if NETWORK_PROTOCOL != NP_SINGLE  &&  !defined(MPLEX_STYLE)
#  if NETWORK_STYLE == NS_BSD
#    if HAVE_SELECT
#      define MPLEX_STYLE MP_SELECT
#    else
       #error You cannot use BSD sockets without having select()!
#    endif
#  else				/* NETWORK_STYLE == NS_SYSV */
#    if NETWORK_PROTOCOL == NP_LOCAL
#      if SELECT_WORKS_ON_FIFOS
#        define MPLEX_STYLE MP_SELECT
#      else
#        if POLL_WORKS_ON_FIFOS
#	   define MPLEX_STYLE MP_POLL
#	 else
#	   if FSTAT_WORKS_ON_FIFOS
#	     define MPLEX_STYLE MP_FAKE
#	   else
	     #error I need to be able to do a multiplexing wait on FIFOs!
#	   endif
#	 endif
#      endif
#    else			/* It's a TLI-based networking protocol */
#      if HAVE_POLL
#        define MPLEX_STYLE MP_POLL
#      else
         #error You cannot use TLI without having poll()!
#      endif
#    endif
#  endif
#endif

#if (NETWORK_PROTOCOL == NP_LOCAL || NETWORK_PROTOCOL == NP_SINGLE) && defined(OUTBOUND_NETWORK)
#  error You cannot define "OUTBOUND_NETWORK" with that "NETWORK_PROTOCOL"
#endif

#if NETWORK_PROTOCOL != NP_LOCAL && NETWORK_PROTOCOL != NP_SINGLE && NETWORK_PROTOCOL != NP_TCP
#  error Illegal value for "NETWORK_PROTOCOL"
#endif

#if NETWORK_STYLE != NS_BSD && NETWORK_STYLE != NS_SYSV
#  error Illegal value for "NETWORK_STYLE"
#endif

#if defined(MPLEX_STYLE) 	\
    && MPLEX_STYLE != MP_SELECT \
    && MPLEX_STYLE != MP_POLL \
    && MPLEX_STYLE != MP_FAKE
#  error Illegal value for "MPLEX_STYLE"
#endif

#endif				/* !Options_h */

/* 

M tasks.c => tasks.c +1 -0
@@ 15,6 15,7 @@
    Pavel@Xerox.Com
 *****************************************************************************/

#include <limits.h>
#include <string.h>
#include <time.h>