From dc0634c6e039b1eca3f4e0c481871d8e0d49e661 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Fri, 27 Sep 2024 14:22:59 -0600 Subject: [PATCH] Toggle legacy macros to on, for now. --- CMakeLists.txt | 2 +- configure.ac | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2d99b501c..8c3e9eeaee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -550,7 +550,7 @@ endif() # Option legacy macros # Do we want to enable unsafe macros, e.g. _FillValue in addition to NC_FillValue. # See https://github.com/Unidata/netcdf-c/issues/3029 -option(NETCDF_ENABLE_LEGACY_MACROS "Enable legacy macros for backwards compatibility. Use with Caution." OFF) +option(NETCDF_ENABLE_LEGACY_MACROS "Enable legacy macros for backwards compatibility. Use with Caution." ON) # Option Logging, only valid for netcdf4 dispatchers. option(NETCDF_ENABLE_LOGGING "Enable Logging." OFF) diff --git a/configure.ac b/configure.ac index 2972e3e0d3..fb6642281d 100644 --- a/configure.ac +++ b/configure.ac @@ -466,10 +466,11 @@ fi # See https://github.com/Unidata/netcdf-c/issues/3029 AC_MSG_CHECKING([whether to allow legacy macros]) AC_ARG_ENABLE([legacy-macros], - [AS_HELP_STRING([--enable-legacy-macros], + [AS_HELP_STRING([--disable-legacy-macros], [enable legacy macros for backwards compatibility purposes. Use with caution.\ This can lead to unexpected consequences/behavior.])]) -test "x$enable_legacy_macros" = xyes || enable_legacy_macros=no +test "x$enable_legacy_macros" = xno || enable_legacy_macros=yes +AC_MSG_RESULT($enable_legacy_macros) if test "x$enable_legacy_macros" = xyes; then AC_DEFINE([NETCDF_ENABLE_LEGACY_MACROS], 1, [If true, enable legacy macros in netcdf.h]) fi