Commit 4b2f0883 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Conditionalize cdfInqHistoryString and related.

parent fddea468
......@@ -8293,17 +8293,14 @@ int cdfInqHistorySize(stream_t *streamptr)
#endif
#if defined (HAVE_LIBNETCDF)
void cdfInqHistoryString(stream_t *streamptr, char *history)
{
#if defined (HAVE_LIBNETCDF)
int ncid;
ncid = streamptr->fileID;
int ncid = streamptr->fileID;
if ( streamptr->historyID != UNDEFID )
cdf_get_att_text(ncid, NC_GLOBAL, "history", history);
#endif
}
#endif
void cdfDefVars(stream_t *streamptr)
......
......@@ -61,9 +61,8 @@ int streamInqHistorySize(int streamID)
void streamInqHistoryString(int streamID, char *history)
{
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
#ifdef HAVE_LIBNETCDF
stream_t *streamptr = stream_to_pointer(streamID);
if ( streamptr->filetype == FILETYPE_NC ||
streamptr->filetype == FILETYPE_NC2 ||
......@@ -72,6 +71,9 @@ void streamInqHistoryString(int streamID, char *history)
{
cdfInqHistoryString(streamptr, history);
}
#else
(void)streamID; (void)history;
#endif
}
/*
* Local Variables:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment