diff options
Diffstat (limited to 'm4/size_max.m4')
-rw-r--r-- | m4/size_max.m4 | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/m4/size_max.m4 b/m4/size_max.m4 index ce992db1..de69025d 100644 --- a/m4/size_max.m4 +++ b/m4/size_max.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # size_max.m4 serial 9 | 1 | # size_max.m4 serial 10 |
2 | dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2003, 2005-2006, 2008-2016 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -34,10 +34,14 @@ Found it | |||
34 | if test $fits_in_uint = 1; then | 34 | if test $fits_in_uint = 1; then |
35 | dnl Even though SIZE_MAX fits in an unsigned int, it must be of type | 35 | dnl Even though SIZE_MAX fits in an unsigned int, it must be of type |
36 | dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. | 36 | dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. |
37 | AC_TRY_COMPILE([#include <stddef.h> | 37 | AC_COMPILE_IFELSE( |
38 | extern size_t foo; | 38 | [AC_LANG_PROGRAM( |
39 | extern unsigned long foo; | 39 | [[#include <stddef.h> |
40 | ], [], [fits_in_uint=0]) | 40 | extern size_t foo; |
41 | extern unsigned long foo; | ||
42 | ]], | ||
43 | [[]])], | ||
44 | [fits_in_uint=0]) | ||
41 | fi | 45 | fi |
42 | dnl We cannot use 'expr' to simplify this expression, because 'expr' | 46 | dnl We cannot use 'expr' to simplify this expression, because 'expr' |
43 | dnl works only with 'long' integers in the host environment, while we | 47 | dnl works only with 'long' integers in the host environment, while we |