From 5da1580adaa0b7ccf5f3a6afac5e9cae615ca163 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 6 Dec 2013 09:01:32 -0500 Subject: [PATCH] Fortran: Improve pointer size detection in gfortran on MinGW In commit ecd84147 (Fortran: Detect pointer size in gfortran on MinGW, 2011-11-29) we started testing for __SIZEOF_POINTER__ but not all GNU Fortran compilers define this. Check also for __SIZEOF_SIZE_T__ which at least one version of gfortran defines without also defining __SIZEOF_POINTER__. --- Modules/CMakeFortranCompilerABI.F | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/CMakeFortranCompilerABI.F b/Modules/CMakeFortranCompilerABI.F index 7e24553fb..21ca7ff50 100644 --- a/Modules/CMakeFortranCompilerABI.F +++ b/Modules/CMakeFortranCompilerABI.F @@ -20,6 +20,10 @@ PRINT *, 'INFO:sizeof_dptr[8]' #elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 4 PRINT *, 'INFO:sizeof_dptr[4]' +#elif defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ == 8 + PRINT *, 'INFO:sizeof_dptr[8]' +#elif defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ == 4 + PRINT *, 'INFO:sizeof_dptr[4]' #endif #if 0