diff -Nurp dillo-0.6.6/configure dillo-0.6.6-cygwin/configure --- dillo-0.6.6/configure 2002-05-30 05:02:14.000000000 +0800 +++ dillo-0.6.6-cygwin/configure 2003-03-01 13:22:40.000000000 +0800 @@ -1204,8 +1204,8 @@ ac_config_headers="$ac_config_headers co ac_config_commands="$ac_config_commands default-1" -CPPFLAGS="$CPPFLAGS -I/usr/local/include" -LDFLAGS="$LDFLAGS -L/usr/local/lib" +#CPPFLAGS="$CPPFLAGS -I/usr/local/include" +#LDFLAGS="$LDFLAGS -L/usr/local/lib" # Check whether --with-jpeg-lib or --without-jpeg-lib was given. if test "${with_jpeg_lib+set}" = set; then @@ -2722,7 +2722,7 @@ fi system=`uname -s` case $system in - Linux|SunOS) + Linux|SunOS|CYGWIN*) echo "$as_me:2727: checking for pthread_create in -lpthread" >&5 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 diff -Nurp dillo-0.6.6/src/Makefile.in dillo-0.6.6-cygwin/src/Makefile.in --- dillo-0.6.6/src/Makefile.in 2002-05-30 05:02:56.000000000 +0800 +++ dillo-0.6.6-cygwin/src/Makefile.in 2003-03-01 13:23:54.000000000 +0800 @@ -85,7 +85,7 @@ CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) -DEFS = @DEFS@ -I. -I$(srcdir) -I.. +DEFS = -DSYSCONFDIR="\"$(sysconfdir)\"" @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ diff -Nurp dillo-0.6.6/src/cookies.c dillo-0.6.6-cygwin/src/cookies.c --- dillo-0.6.6/src/cookies.c 2002-05-28 04:47:50.000000000 +0800 +++ dillo-0.6.6-cygwin/src/cookies.c 2003-03-01 10:23:56.000000000 +0800 @@ -130,6 +130,9 @@ void a_Cookies_init() GList *domain_cookies; char *filename; char line[LINE_MAXLEN]; +#ifndef HAVE_LOCKF + struct flock lck; +#endif Cookie_control_init(); @@ -145,7 +148,16 @@ void a_Cookies_init() } /* Try to get a lock from the file descriptor */ +#ifdef HAVE_LOCKF disabled = (lockf(fileno(file_stream), F_TLOCK, 0) == -1); +#else /* POSIX lock */ + lck.l_start = 0; /* start at beginning of file */ + lck.l_len = 0; /* lock entire file */ + lck.l_type = F_WRLCK; + lck.l_whence = SEEK_SET; /* absolute offset */ + + disabled = (fcntl(fileno(file_stream), F_SETLK, &lck) == -1); +#endif if (disabled) { DEBUG_MSG(10, "The cookies file has a file lock:\n" " disabling cookies in this dillo!\n"); @@ -278,6 +290,9 @@ static gboolean Cookies_freeall_cb(gpoin void a_Cookies_freeall() { int fd; +#ifndef HAVE_LOCKF + struct flock lck; +#endif if (disabled) return; @@ -288,7 +303,16 @@ void a_Cookies_freeall() g_hash_table_foreach_remove(cookies, Cookies_freeall_cb, NULL); +#ifdef HAVE_LOCKF lockf(fd, F_ULOCK, 0); +#else /* POSIX file lock */ + lck.l_start = 0; /* start at beginning of file */ + lck.l_len = 0; /* lock entire file */ + lck.l_type = F_UNLCK; + lck.l_whence = SEEK_SET; /* absolute offset */ + + fcntl(fileno(file_stream), F_SETLKW, &lck); +#endif fclose(file_stream); } diff -Nurp dillo-0.6.6/src/prefs.c dillo-0.6.6-cygwin/src/prefs.c --- dillo-0.6.6/src/prefs.c 2002-04-04 00:31:46.000000000 +0800 +++ dillo-0.6.6-cygwin/src/prefs.c 2003-03-01 11:59:28.000000000 +0800 @@ -232,6 +232,9 @@ static guint Prefs_parser(GScanner *scan return G_TOKEN_NONE; } +#ifndef SYSCONFDIR +#define SYSCONFDIR "/usr/local/etc" +#endif static gint Prefs_load(void) { GScanner *scanner; @@ -244,7 +247,7 @@ static gint Prefs_load(void) fd = open(file, O_RDONLY); g_free(file); if (fd < 0 && (fd = open("/etc/dillorc", O_RDONLY)) < 0) - if ((fd = open("/usr/local/etc/dillorc", O_RDONLY)) < 0) + if ((fd = open(SYSCONFDIR"/dillorc", O_RDONLY)) < 0) return FILE_NOT_FOUND; scanner = g_scanner_new(NULL);