-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate XDR into the mfhdf library #483
Conversation
We are removing XDR from the library, so the configuration options are being removed and the library's version of XDR will always be used. Removes: Autotools: --enable-hdf4-xdr CMake: HDF4_BUILD_XDR_LIB
This provided implementations of htons, etc. if a platform didn't have them. It's never compiled.
This appears to be an old VMS file and is not referenced in the test code
We no longer build a separate XDR library as all the XDR functionality has been moved to mfhdf/libsrc and is built with the mfhdf library. Because of this, we no longer distribute a separate XDR library with either build system. We also no longer distribute the XDR types.h and xdr.h headers.
Also, other misc cleanup
Also minor cleanup
Also, ran the formatter
* Included mfhdf.h to get Boolean values * Removed redundant TRUE/FALSE
* Move xdrposix.c netCDF fxns to file.c * XDR handle ops macro --> function * Comment out Sun get/put_int calls * Misc reorg and commenting
No longer needed since we make everyone use our XDR
xdrtest.c relies on xdrstdio and I want to unify xdr.c and xdrposix.c, so out they go...
Also hard-codes xdrposix calls for op-specific calls
Everything is hard-coded to POSIX now
Replaced with xdr_int, which is 32-bits on all supported platforms
These were commented out some time ago
@@ -64,7 +64,7 @@ if (WIN32 AND NOT MINGW) | |||
endif () | |||
|
|||
if (WINDOWS) | |||
set (HDF4_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib") | |||
set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to get MinGW to work and this seemed like the more correct thing to do. Is it not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not really because HDF4_REQUIRED_LIBRARIES is temporary for checking, I believe CMAKE_REQUIRED_LIBRARIES is more global.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that the point, though? We want to require links to ws2_32, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it looks like the opposite is true - CMAKE_REQUIRED_LIBRARIES is temporary for checking, we use HDF4_REQUIRED_LIBRARIES after the configure_checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then again CMAKE_REQUIRED_LIBRARIES shows up afterwards - ARRGH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HDF5 uses CMAKE_REQUIRED_LIBRARIES is temporary for checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For HDF4 CMakeLists.txt line 485 incorrectly set CMAKE_REQUIRED_LIBRARIES and should have been setting HDF4_REQUIRED_LIBRARIES.
Then everything would be correct ;
CMAKE_REQUIRED_LIBRARIES is temporary for checking, we use HDF4_REQUIRED_LIBRARIES after the configure_checks.
… into remove_xdr_entirely2
XDR is now consolidated into the mfhdf library:
XDR will eventually be removed from HDF4, but in the meantime, this will make it easier to deal with that layer and will fix the linking issues seen on some platforms.
Fixes #15
Fixes #25
Fixes #423
Fixes #151