/[inetutils]/inetutils/m4/size_max.m4
ViewVC logotype

Diff of /inetutils/m4/size_max.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ams, Fri Jan 21 13:02:47 2005 UTC revision 1.2 by gray, Sun Jul 31 20:11:00 2005 UTC
# Line 1  Line 1 
1  # size_max.m4 serial 2  # size_max.m4 serial 3
2  dnl Copyright (C) 2003 Free Software Foundation, Inc.  dnl Copyright (C) 2003, 2005 Free Software Foundation, Inc.
3  dnl This file is free software; the Free Software Foundation  dnl This file is free software; the Free Software Foundation
4  dnl gives unlimited permission to copy and/or distribute it,  dnl gives unlimited permission to copy and/or distribute it,
5  dnl with or without modifications, as long as this notice is preserved.  dnl with or without modifications, as long as this notice is preserved.
# Line 26  Found it Line 26  Found it
26      dnl than the type 'unsigned long'.      dnl than the type 'unsigned long'.
27      dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',      dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
28      dnl which is guaranteed to work from LONG_MIN to LONG_MAX.      dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
29      _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,      _AC_COMPUTE_INT([(size_t)~(size_t)0 / 10], res_hi,
30        [#include <stddef.h>], result=?)        [#include <stddef.h>], result=?)
31      _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,      _AC_COMPUTE_INT([(size_t)~(size_t)0 % 10], res_lo,
32        [#include <stddef.h>], result=?)        [#include <stddef.h>], result=?)
33      _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,      _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
34        [#include <stddef.h>], result=?)        [#include <stddef.h>], result=?)
# Line 48  Found it Line 48  Found it
48        fi        fi
49      else      else
50        dnl Shouldn't happen, but who knows...        dnl Shouldn't happen, but who knows...
51        result='~(size_t)0'        result='((size_t)~(size_t)0)'
52      fi      fi
53    fi    fi
54    AC_MSG_RESULT([$result])    AC_MSG_RESULT([$result])

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26