I've tried to do the changes in a way that this can easily be merged into the normal MudOS distribution. There are changes to the build.MudOS script and the GNUMakefile.in because the gnu compiler under Cygwin does not produce 'a.out' as the default program output - instead it produces 'a.exe'. Therefore, the build.MudOS script has been changed to check for a CYGWIN environment variable and if present use 'a.exe' instead of 'a.out' through the use of an A_OUT variable. This A_OUT setting is written to Makefile.tmp and incorporated into the generated makefile. The GNUMakefile.in has therefore been modifed to use $(A_OUT) where it previously used a.out. (This means that users of other unixes will need to make sure they DON'T have a CYGWIN environment variable!).
The 'arch.h' file has been changed to detect Cygwin and set definitions appropriately. Note when it detects Cygwin it will undef things like WIN95, WIN32, WINNT etc. otherwise the existing Windows port code conflicts with Cygwin.
The only other changes are just a couple of conditional compilation tweaks to 'efuns_port.c' and 'socket_ctrl.c'.
The resulting driver appears to be stable and will load and run the testsuite and my own mudlib ok.
The patch was created from v22.2a25 but will probably apply just as well to other versions. Built and tested using Cygwin-b20 under Win95 and Windows NT 4.
Save this patch to a new file called cygwin-mudos.patch.
Start the Cygwin bash shell. All the rest of these instructions should be done from the bash shell.
Unpack the MudOS archive using 'tar -zxvf
Copy the patch file into the MudOS source directory, and then
apply it with the command:
Check your environment variables. In the bash shell you can list
the current ones using 'set' or 'set | less' and change them using
'export
The CYGWIN environment variable must be set to 'binmode' whilst
compiling and running MudOS, to force Cygwin to treat files in the
normal unix manner. Check the contents of the INCLUDE environment
variable - the build.MudOS script will pick up the contents of this,
so make sure it does not contain any DOS style filenames. Finally,
make sure the BISONLIB environment variable is set to the directory
containing bison.simple and bison.hairy (normally something like
'/cygnus/cygwin-b20/share').
Make sure that '/bin/sh.exe' exists - if it doesn't, create a /bin
directory and copy 'sh.exe' there from
'/cygnus/cygwin-b20/H-i586-cywin32/bin'.
Copy your local_options file into the MudOS source directory, or
create one from options.h as appropriate for your lib. Cygwin
does not come with a crypt library so you will need to make sure
that you install one separately, or that CUSTOM_CRYPT is defined
in the local_options file.
Now issue the command 'sh build.MudOS'. Make sure there is nothing
obviously wrong in the final report it gives (e.g. DOS style filenames
present, it doesn't identify Cygwin-32 etc.) and that it
is using GNUMakefile rather than Makefile.
Issue the command 'make'.
MudOS will now be built. You should end up with:
Note that the driver.exe program needs the CYGWIN environment
variable set to 'binmode' to be able to save and load files
correctly. With this in mind, it's probably easiest to set up a
.bat file to run it and set that variable there.
patch < cygwin-mudos.patch
driver.exe - the MudOS driver
addr_server.exe - the address server
portmap.exe - the portmap program
© Copyright 1999 by Scatter.