mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-31 17:50:26 +08:00
jna fixes
This commit is contained in:
parent
49fc091f23
commit
211004898f
@ -831,6 +831,12 @@ IF(ENABLE_FSYNC)
|
||||
SET(USE_FSYNC ON)
|
||||
ENDIF()
|
||||
|
||||
# Temporary
|
||||
OPTION (ENABLE_JNA "Enable jna bug fix code." OFF)
|
||||
IF(ENABLE_JNA)
|
||||
SET(JNA ON)
|
||||
ENDIF()
|
||||
|
||||
# Linux specific large file support flags.
|
||||
# Modelled after check in CMakeLists.txt for hdf5.
|
||||
OPTION(ENABLE_LARGE_FILE_SUPPORT "Enable large file support." ON)
|
||||
|
13
configure.ac
13
configure.ac
@ -950,6 +950,19 @@ AC_SUBST(HAS_PNETCDF,[$enable_pnetcdf])
|
||||
AC_SUBST(HAS_HDF5,[$enable_netcdf_4])
|
||||
AC_SUBST(HAS_SZLIB,[$nc_has_szlib])
|
||||
|
||||
# temporary to deal with a JNA problem
|
||||
AC_MSG_CHECKING([If compilation is for use with JNA])
|
||||
AC_ARG_ENABLE([jna],
|
||||
[AS_HELP_STRING([--enable-jna],
|
||||
[enable jna bug fix])],
|
||||
[],
|
||||
[enable_jna=no])
|
||||
test "x$enable_jna" = xno || enable_jna=yes
|
||||
AC_MSG_RESULT($enable_jna)
|
||||
if test "x$enable_jna" = xyes ; then
|
||||
AC_DEFINE([JNA], [1], [if true, include JNA bug fix])
|
||||
fi
|
||||
|
||||
# Include some specifics for netcdf on windows.
|
||||
#AH_VERBATIM([_WIN32_STRICMP],
|
||||
AH_BOTTOM(
|
||||
|
@ -1187,6 +1187,13 @@ read_type(NC_GRP_INFO_T *grp, hid_t hdf_typeid, char *type_name)
|
||||
member_name = H5Tget_member_name(type->native_hdf_typeid, m);
|
||||
if (!member_name || strlen(member_name) > NC_MAX_NAME)
|
||||
return NC_EBADNAME;
|
||||
#ifdef JNA
|
||||
/* There appears to be a bug that is
|
||||
causing malloc error. */
|
||||
member_name = strdup(member_name);
|
||||
if(member_name == NULL)
|
||||
return NC_ENOMEM;
|
||||
#endif /*JNA*/
|
||||
|
||||
/* Offset in bytes on *this* platform. */
|
||||
member_offset = H5Tget_member_offset(type->native_hdf_typeid, m);
|
||||
|
1
ljna
1
ljna
@ -16,6 +16,7 @@ FLAGS="--prefix ${PREFIX}"
|
||||
FLAGS="$FLAGS --disable-examples"
|
||||
FLAGS="$FLAGS --disable-utilities"
|
||||
FLAGS="$FLAGS --enable-shared"
|
||||
#FLAGS="$FLAGS --enable-jna"
|
||||
|
||||
export PATH
|
||||
export CC
|
||||
|
Loading…
x
Reference in New Issue
Block a user