From 06b94a7f574e7794684b8584391744ded68e2989 Mon Sep 17 00:00:00 2001 From: Ryan Mulhall <35538242+rem1776@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:47:07 -0400 Subject: [PATCH] fix: add allocatable and pure macros back into platform.h (#1386) --- include/fms_platform.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/fms_platform.h b/include/fms_platform.h index fdd0bd4e41..30feb9f73b 100644 --- a/include/fms_platform.h +++ b/include/fms_platform.h @@ -46,6 +46,28 @@ use,intrinsic :: iso_c_binding, only: c_double,c_float,c_int64_t, & !DEC$ MESSAGE:'Using 8-byte addressing' #endif +!Control "pure" functions. +#ifdef NO_F95 +#define _PURE +!DEC$ MESSAGE:'Not using pure routines.' +#else +#define _PURE pure +!DEC$ MESSAGE:'Using pure routines.' +#endif + +!Control array members of derived types. +#ifdef NO_F2000 +#define _ALLOCATABLE pointer +#define _NULL =>null() +#define _ALLOCATED associated +!DEC$ MESSAGE:'Using pointer derived type array members.' +#else +#define _ALLOCATABLE allocatable +#define _NULL +#define _ALLOCATED allocated +!DEC$ MESSAGE:'Using allocatable derived type array members.' +#endif + !Control use of cray pointers within mpp_peset !Other cray pointer usage in mpp routines is compiled regardless #ifdef NO_CRAY_POINTERS