[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: ftruncate tests are on the way out, maybe
From: |
Jim Meyering |
Subject: |
FYI: ftruncate tests are on the way out, maybe |
Date: |
Sun, 18 Jun 2006 16:04:26 +0200 |
Since ftruncate has been used unconditionally in shred since 1999,
this seems like a safe bet. I suspect it'll eventually be ok to
remove the SysV-ish lib/ftruncate.c, as well.
I've just made this change in coreutils (trunk, not branch):
2006-06-18 Jim Meyering <address@hidden>
* ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
configure fail, and request a bug report to inform us about it.
Add a comment that, barring reports to the contrary, in 2007 we'll
assume ftruncate is universally available.
Index: m4/ftruncate.m4
===================================================================
RCS file: /fetish/cu/m4/ftruncate.m4,v
retrieving revision 1.9
diff -u -p -r1.9 ftruncate.m4
--- m4/ftruncate.m4 22 Sep 2005 06:05:39 -0000 1.9
+++ m4/ftruncate.m4 18 Jun 2006 13:46:00 -0000
@@ -1,17 +1,29 @@
-#serial 8
+#serial 9
# See if we need to emulate a missing ftruncate function using fcntl or chsize.
-# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003-2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# FIXME: remove this macro, along with all uses of HAVE_FTRUNCATE in 2007,
+# if the check below provokes no reports.
+
AC_DEFUN([gl_FUNC_FTRUNCATE],
[
AC_REPLACE_FUNCS(ftruncate)
if test $ac_cv_func_ftruncate = no; then
gl_PREREQ_FTRUNCATE
+ # If someone lacks ftruncate, make configure fail, and request
+ # a bug report to inform us about it.
+ if test x"$SKIP_FTRUNCATE_CHECK" != xyes; then
+ AC_MSG_FAILURE([Your system lacks the ftruncate function.
+ Please report this, along with the output of "uname -a", to the
+ address@hidden mailing list. To continue past this point,
+ rerun configure with SKIP_FTRUNCATE_CHECK=yes set in the environment.
+ E.g., env SKIP_FTRUNCATE_CHECK=yes ./configure])
+ fi
fi
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: ftruncate tests are on the way out, maybe,
Jim Meyering <=