Compiling DoT under Cygwin

Posted by Nick Gammon on Fri 18 Jan 2002 04:26 AM — 4 posts, 20,856 views.

Australia Forum Administrator #0
You need to make a couple of minor changes to the DoT source to compile under Cygwin.

For some reason we have yet to establish, MCCP doesn't work under Cygwin, so edit the file descript.h and add one line (around line 17) ...



/**************************************************************************/
//typedef unsigned int SOCKET;
/**************************************************************************/
#define DISABLE_MCCP // add this line
#ifndef DISABLE_MCCP // define this in your project to disable MCCP


Also the set_itimer function doesn't work, so edit the file update.cpp and add one line (around line 98) ...



/**************************************************************************/
/* Set the virtual (CPU time) timer to the standard setting, ALARM_FREQUENCY */
void reset_itimer ()
{
    struct itimerval itimer;
    itimer.it_interval.tv_usec = 0; /* miliseconds */
    itimer.it_interval.tv_sec  = ALARM_FREQUENCY;
    itimer.it_value.tv_usec = 0;
    itimer.it_value.tv_sec = ALARM_FREQUENCY;

    return; // doesn't work under Cygwin - add this line


Then you should be able to compile. Change to the configure directory and run the configure script ...


cd configure
./configure


Then change back to the source directory and run "make" ...


cd ..
make

Amended on Fri 18 Jan 2002 04:28 AM by Nick Gammon
#1
Hi
Im unable to test or confirm this, since I dont have Cygwin installed, but the recent versions have a new zlib library that is supposedly much better , however due to naming conventions and confilcts the .dll is named cygz.dll rather than the standard libz.dll , Id be interested to hear if this works ?

Also can you not just use -DDISABLE_MCCP in the compiler directives in your Makefile to disable MCCP ?

Regards

Balo.
Australia Forum Administrator #2
Quote:

Also can you not just use -DDISABLE_MCCP in the compiler directives in your Makefile to disable MCCP ?


Yes, sensible idea. :)
United Kingdom #3
1.69q compiles clean out of the box on Cygwin.

- Kal