mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
more magic numbers
This commit is contained in:
parent
0dcdf7198f
commit
c172acab98
16
configure.ac
16
configure.ac
@ -587,6 +587,14 @@ if test -n "$UDF0_DISPATCH"; then
|
||||
[])
|
||||
fi
|
||||
|
||||
# Did the user specify a magic number for user-defined format 0?
|
||||
AC_MSG_CHECKING([whether a magic number for user-defined format 0 was specified])
|
||||
AC_ARG_WITH([udf0-magic-number],
|
||||
[AS_HELP_STRING([--with-udf0-magic-number=<magic_number>],
|
||||
[Specify a magic number for user-defined format 0 (ignored unless --with-udf0 is also used).])],
|
||||
[UDF0_MAGIC_NUMBER=$with_udf0_magic_number])
|
||||
AC_MSG_RESULT([$UDF0_MAGIC_NUMBER])
|
||||
|
||||
# Did the user specify a user-defined format 1?
|
||||
AC_MSG_CHECKING([whether user-defined format 1 was specified])
|
||||
AC_ARG_WITH([udf1],
|
||||
@ -603,6 +611,14 @@ if test -n "$UDF1_DISPATCH"; then
|
||||
[])
|
||||
fi
|
||||
|
||||
# Did the user specify a magic number for user-defined format 0?
|
||||
AC_MSG_CHECKING([whether a magic number for user-defined format 1 was specified])
|
||||
AC_ARG_WITH([udf1-magic-number],
|
||||
[AS_HELP_STRING([--with-udf1-magic-number=<magic_number>],
|
||||
[Specify a magic number for user-defined format 1 (ignored unless --with-udf1 is also used).])],
|
||||
[UDF1_MAGIC_NUMBER=$with_udf1_magic_number])
|
||||
AC_MSG_RESULT([$UDF1_MAGIC_NUMBER])
|
||||
|
||||
# Did the user specify a default cache preemption?
|
||||
AC_MSG_CHECKING([whether a default cache preemption for HDF5 was specified])
|
||||
AC_ARG_WITH([chunk-cache-preemption],
|
||||
|
@ -2292,7 +2292,8 @@ NC_open(const char *path0, int cmode, int basepe, size_t *chunksizehintp,
|
||||
}
|
||||
|
||||
/* Force flag consistentcy */
|
||||
if(model == NC_FORMATX_NC4 || model == NC_FORMATX_NC_HDF4 || model == NC_FORMATX_DAP4)
|
||||
if(model == NC_FORMATX_NC4 || model == NC_FORMATX_NC_HDF4 || model == NC_FORMATX_DAP4 ||
|
||||
model == NC_FORMATX_UDF0 || model == NC_FORMATX_UDF1)
|
||||
cmode |= NC_NETCDF4;
|
||||
else if(model == NC_FORMATX_DAP2) {
|
||||
cmode &= ~NC_NETCDF4;
|
||||
@ -2358,6 +2359,14 @@ NC_open(const char *path0, int cmode, int basepe, size_t *chunksizehintp,
|
||||
dispatcher = HDF4_dispatch_table;
|
||||
break;
|
||||
#endif
|
||||
#ifdef USE_NETCDF4
|
||||
case NC_FORMATX_UDF0:
|
||||
dispatcher = UDF0_dispatch_table;
|
||||
break;
|
||||
case NC_FORMATX_UDF1:
|
||||
dispatcher = UDF1_dispatch_table;
|
||||
break;
|
||||
#endif /* USE_NETCDF4 */
|
||||
case NC_FORMATX_NC3:
|
||||
dispatcher = NC3_dispatch_table;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user