summaryrefslogtreecommitdiffstats
path: root/gl/m4/size_max.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/size_max.m4')
-rw-r--r--gl/m4/size_max.m416
1 files changed, 10 insertions, 6 deletions
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4
index ce992db..4b247ab 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,5 +1,5 @@
1# size_max.m4 serial 9 1# size_max.m4 serial 10
2dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2005-2006, 2008-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl 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