diff -ruN reuse-4.2.1/source/db/revisions reuse/source/db/revisions --- reuse-4.2.1/source/db/revisions 2005-10-27 13:05:19.000000000 +0400 +++ reuse/source/db/revisions 2005-11-07 13:49:36.000000000 +0300 @@ -575,3 +575,4 @@ unix/stream_io.c 6 9 1927650 ./include/reuse/Sets.h 6 8 315277 ./include/reuse/osdeps.h 6 22 214306 +unix/exec.c 6 35 3451533 diff -ruN reuse-4.2.1/source/db/versions reuse/source/db/versions --- reuse-4.2.1/source/db/versions 2005-10-27 13:05:20.000000000 +0400 +++ reuse/source/db/versions 2005-11-09 10:04:49.000000000 +0300 @@ -97,3 +97,4 @@ 1900 4.0 1 2005/03/28 1903 4.2 0 2005/08/08 1916 4.2 1 2005/10/27 +1917 4.2 2 2005/11/09 diff -ruN reuse-4.2.1/source/NEWS reuse/source/NEWS --- reuse-4.2.1/source/NEWS 2005-10-27 13:24:42.000000000 +0400 +++ reuse/source/NEWS 2005-11-09 10:02:39.000000000 +0300 @@ -1,4 +1,8 @@ -$Id: NEWS,v 6.12 2005/10/27 09:07:28 cher Exp $ +$Id: NEWS,v 6.14 2005/11/09 07:02:39 cher Exp $ + +Reuse 4.2.2 (20051109) +====================== +Fixes for Linux kernel 2.6. Reuse 4.2.1 (20051027) ====================== diff -ruN reuse-4.2.1/source/unix/exec.c reuse/source/unix/exec.c --- reuse-4.2.1/source/unix/exec.c 2005-10-27 12:57:52.000000000 +0400 +++ reuse/source/unix/exec.c 2005-11-07 13:47:25.000000000 +0300 @@ -1,4 +1,4 @@ -/* $Id: exec.c,v 6.34 2005/10/27 08:57:52 cher Exp $ */ +/* $Id: exec.c,v 6.35 2005/11/07 10:47:25 cher Exp $ */ /* Copyright (C) 1998-2005 Alexander Chernov */ /* Created: <1998-01-21 14:33:28 cher> */ @@ -48,6 +48,7 @@ #include #include #include +#include #ifdef __linux__ #include @@ -1769,8 +1770,9 @@ * running a simple program with time limit set to 0 sec and * measuring the actual running time */ - int pid, status, retcode; + int pid, status, retcode, mjver, mnver; struct rusage usage; + struct utsname buf; if (linux_fix_time_flag >= 0) return; if (linux_ms_time_limit >= 0) return; @@ -1792,6 +1794,17 @@ if (WIFEXITED(status) && WEXITSTATUS(status) == 0) linux_ms_time_limit = 1; + /* it looks like this check does not work on 2.6/x86_64 */ + if (uname(&buf) >= 0) { + // however `uname' may hardly fail... + if (!strcasecmp(buf.sysname, "linux") + && sscanf(buf.release, "%d.%d", &mjver, &mnver) == 2 + && (mjver >= 3 || (mjver == 2 && mnver >= 6))) { + linux_fix_time_flag = 0; + return; + } + } + if ((pid = fork()) < 0) return; if (!pid) { struct rlimit lim; @@ -1821,7 +1834,7 @@ #if REUSE_COMPILE_CVSID - 0 != 0 static char const cvsid[] = -"$Id: exec.c,v 6.34 2005/10/27 08:57:52 cher Exp $"; +"$Id: exec.c,v 6.35 2005/11/07 10:47:25 cher Exp $"; #endif /* REUSE_COMPILE_CVSID */ /*