Toggle legacy macros to on, for now.

This commit is contained in:
Ward Fisher 2024-09-27 14:22:59 -06:00
parent 0f92d4c0f6
commit dc0634c6e0
2 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -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