Skip to content

Commit

Permalink
Toggle legacy macros to on, for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
WardF committed Sep 27, 2024
1 parent 0f92d4c commit dc0634c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc0634c

Please sign in to comment.