From ff9cea26062a93e9b435e5de74908fec1c167bae Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 28 Nov 2006 14:19:24 +0000 Subject: [PATCH] Remove unused file ptrdiff_max.m4. --- ChangeLog | 4 +++ m4/ptrdiff_max.m4 | 73 ----------------------------------------------- 2 files changed, 4 insertions(+), 73 deletions(-) delete mode 100644 m4/ptrdiff_max.m4 diff --git a/ChangeLog b/ChangeLog index 0b6e07dab6..4f25db5db5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-11-28 Bruno Haible + + * m4/ptrdiff_max.m4: Remove file. + 2006-11-21 Bruno Haible * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of diff --git a/m4/ptrdiff_max.m4 b/m4/ptrdiff_max.m4 deleted file mode 100644 index 79e68f2a1f..0000000000 --- a/m4/ptrdiff_max.m4 +++ /dev/null @@ -1,73 +0,0 @@ -# ptrdiff_max.m4 serial 2 -dnl Copyright (C) 2003, 2006 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl From Bruno Haible. - -AC_DEFUN([gl_PTRDIFF_MAX], -[ - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_CHECK_HEADERS_ONCE(stdint.h) - dnl First test whether the system already has PTRDIFF_MAX. - AC_MSG_CHECKING([for PTRDIFF_MAX]) - result= - AC_EGREP_CPP([Found it], [ -#include -#if HAVE_STDINT_H -#include -#endif -#ifdef PTRDIFF_MAX -Found it -#endif -], result=yes) - if test -z "$result"; then - dnl Define it ourselves. Here we assume that the type 'ptrdiff_t' is not - dnl wider than the type 'long'. - dnl The AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', - dnl which is guaranteed to work from LONG_MIN to LONG_MAX. - AC_COMPUTE_INT([res], [STYPE_MAXIMUM (ptrdiff_t)], [ -#include -#include -#define STYPE_MINIMUM(t) (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)) -#define STYPE_MAXIMUM(t) ((t) (~ (t) 0 - STYPE_MINIMUM (t))) -], result=?) - AC_COMPUTE_INT([fits_in_int], [sizeof (ptrdiff_t) <= sizeof (int)], - [#include ], result=?) - if test "$fits_in_int" = 1; then - dnl Even though PTRDIFF_MAX fits in an int, it must be of type - dnl 'long' if the type 'ptrdiff_t' is the same as 'long'. - AC_TRY_COMPILE([#include - extern ptrdiff_t foo; - extern long foo; - ], [], fits_in_int=0) - fi - if test -z "$result"; then - if test "$fits_in_int" = 1; then - result="$res" - else - result="$res"L - fi - else - dnl Shouldn't happen, but who knows... - result='((ptrdiff_t)(~(ptrdiff_t)0-(~(ptrdiff_t)0<<(sizeof(ptrdiff_t)*CHAR_BIT-1))))' - fi - fi - AC_MSG_RESULT([$result]) - if test "$result" != yes; then - AC_DEFINE_UNQUOTED([PTRDIFF_MAX], [$result], - [Define as the maximum value of type 'ptrdiff_t', if the system doesn't define it.]) - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) -- 2.30.2