--- crontab.c.orig 2001-09-19 13:09:56.000000000 -0400 +++ crontab.c 2003-04-14 20:19:50.000000000 -0400 @@ -694,6 +694,17 @@ poke_daemon() { return; } #else +#ifdef __CYGWIN__ + if (GetVersion() & 0x80000000) { + if (utime(SYSCRONTAB, NULL) < OK && + (errno != ENOENT || + open(SYSCRONTAB, O_RDONLY | O_CREAT, 0644) < 0)) { + fprintf(stderr, "crontab: can't update mtime on crontab\n"); + perror(SYSCRONTAB); + } + return; + } +#endif if (utime(SPOOL_DIR, NULL) < OK) { fprintf(stderr, "crontab: can't update mtime on spooldir\n"); perror(SPOOL_DIR); --- env.c.orig 2002-07-05 05:56:22.000000000 -0400 +++ env.c 2003-04-14 19:50:16.000000000 -0400 @@ -59,14 +59,14 @@ env_init() { #ifdef __CYGWIN__ static char **int_env_copy(); - return int_env_copy(environ, cyg_exclude); -#else + if ((GetVersion() & 0x80000000) == 0) + return int_env_copy(environ, cyg_exclude); +#endif register char **p = (char **) malloc(sizeof(char **)); if (p) p[0] = NULL; return (p); -#endif } --- compat.h.orig 2001-06-07 12:11:28.000000000 -0400 +++ compat.h 2003-04-14 22:00:24.000000000 -0400 @@ -113,7 +113,8 @@ # define HAVE_SAVED_UIDS #endif -#if !defined(ATT) && !defined(__linux) && !defined(IRIX) && !defined(UNICOS) +#if !defined(ATT) && !defined(__linux) && !defined(IRIX) && \ + !defined(UNICOS) && !defined(__CYGWIN__) # define USE_SIGCHLD #endif @@ -148,7 +149,7 @@ #endif #if defined(__CYGWIN__) -#define _PATH_SENDMAIL "/usr/sbin/ssmtp" +#include #define CRONDIR "/var/cron" #define _PATH_VARRUN "/var/run/" #endif --- cron.sh.done 2003-04-11 15:43:12.000000000 -0400 +++ cron.sh 2003-04-14 20:32:04.000000000 -0400 @@ -13,3 +13,12 @@ then mkdir /var/cron/tabs fi chmod 1777 /var/cron/tabs + +if [ ! -d /usr/sbin ] +then + mkdir -p /usr/sbin +fi +if [ ! -e /usr/sbin/sendmail -a ! -L /usr/sbin/sendmail ] +then + ln -s /usr/sbin/ssmtp.exe /usr/sbin/sendmail +fi