From 2bd0e0efdc6a44cc1096fb0e835d5798f0ed885c Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Sun, 7 Feb 2021 07:04:43 +0100 Subject: [PATCH] config: Add check for long double Signed-off-by: Christophe de Dinechin --- config/check_longdouble.c | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 config/check_longdouble.c diff --git a/config/check_longdouble.c b/config/check_longdouble.c new file mode 100644 index 0000000..61eb4b7 --- /dev/null +++ b/config/check_longdouble.c @@ -0,0 +1,41 @@ +// ***************************************************************************** +// check_longdouble.c make-it-quick project +// ***************************************************************************** +// +// File description: +// +// Check if compiler offers a long double type +// +// (I know, this is a bit outdated) +// +// +// +// +// +// +// ***************************************************************************** +// This software is licensed under the GNU General Public License v3 +// (C) 2018-2019, Christophe de Dinechin +// ***************************************************************************** +// This file is part of make-it-quick +// +// make-it-quick is free software: you can r redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// make-it-quick is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with make-it-quick, in a file named COPYING. +// If not, see . +// ***************************************************************************** + +int main() +{ + long double x = 0.0; + return sizeof(x) > sizeof(double) ? 0 : 1; +}