1# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc. 2# This file is free software; the Free Software Foundation 3# gives unlimited permission to copy and/or distribute it, 4# with or without modifications, as long as this notice is preserved. 5 6# gl_LONG_DOUBLE_VS_DOUBLE 7# determines whether 'long double' and 'double' have the same representation. 8# The currently known platforms where this is the case are: 9# Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9. 10 11long_double_eq_double_test = ''' 12#include <float.h> 13int main () 14{ 15 typedef int check[sizeof (long double) == sizeof (double) 16 && LDBL_MANT_DIG == DBL_MANT_DIG 17 && LDBL_MAX_EXP == DBL_MAX_EXP 18 && LDBL_MIN_EXP == DBL_MIN_EXP 19 ? 1 : -1]; 20 return check; 21} 22''' 23 24gl_cv_long_double_equals_double = cc.compiles(long_double_eq_double_test) 25