Skip to content
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

Merged
merged 56 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b314391
Removed XDR configuration options
Feb 2, 2024
b30b0d9
Remove mfhdf/xdr/byteordr.c
Feb 2, 2024
5d7c1d5
Remove mfhdf/xdr/xdrtest.opt
Feb 2, 2024
17a429b
Incorporated XDR into the mfhdf library
Feb 2, 2024
21c1a28
Removed unused XDR functions
Feb 2, 2024
ee9ecef
Removed unused things from XDR struct
Feb 2, 2024
afeded4
Remove XDRDEBUG code
Feb 2, 2024
746d7a8
Remove control and inline fields from XDR struct
Feb 2, 2024
ef3bec3
Moved types.h content to xdr.h
Feb 2, 2024
0ed84f9
Removed unused XDR header cruft
Feb 2, 2024
52d3243
Removed xdr_enum, which was unused
Feb 2, 2024
f48d111
Remove xdr_short and xdr_u_short
Feb 2, 2024
2058ebd
Removed capital flavor of XDR macros
Feb 2, 2024
186ff32
Moved xdr_vector into xdrtest.c
Feb 2, 2024
07dba71
Remove xdrposix_inline
Feb 2, 2024
e9fd083
Change XDRLIBAPI --> HDFLIBAPI
Feb 2, 2024
b652425
Remove free, 64-bit int XDR functions
Feb 2, 2024
9cb6f01
Replace u_int and u_long with ANSI types
Feb 2, 2024
479e632
xdr.h Boolean cleanup
Feb 2, 2024
8d8c7b3
Moved things out of xdr.h
Feb 3, 2024
3f7cecf
Misc XDR cleanup
Feb 3, 2024
7cb8fe2
Removed ancient Sun get/put_int ops
Feb 3, 2024
94b4b4d
Remove xdrstdio and xdrtest
Feb 3, 2024
c35b885
Move xdrposix.c to xdr.c
Feb 3, 2024
2bbd6fd
Remove ops from XDR
Feb 3, 2024
b48e32d
Remove put/getint32 functions
Feb 3, 2024
df7bb3b
Removed 64-bit XDR functions
Feb 3, 2024
057c4c1
Remove redundant xdr_get/putlong()
Feb 3, 2024
4e39b8b
Ran formatter
Feb 3, 2024
7e90156
Add helpful comments
Feb 3, 2024
46986f4
Add check for size of long to configure/CMake
Feb 3, 2024
d47a85f
Merge remote-tracking branch 'canonical/master' into remove_xdr_entir…
Feb 4, 2024
b40378c
Fix codespell issues
Feb 4, 2024
1b5d7af
Update preprocessor directives
Feb 4, 2024
3367a27
Add winsock2.h for htonl on Windows
Feb 4, 2024
7ab4bc6
Update winsock defines for MinGW
Feb 4, 2024
3a08966
Committing clang-format changes
github-actions[bot] Feb 4, 2024
26a55f2
Add htonl comments
Feb 4, 2024
5b488db
Clean up htonl, etc. build functionality
Feb 4, 2024
0351705
Tweak to CMake Windows network libraries
Feb 4, 2024
240f8c1
HDF4 --> CMAKE_REQUIRED_LIBRARIES
Feb 4, 2024
07ae856
Restore missing target_link_libraries
Feb 4, 2024
a9a954a
Restore netinet/in.h
Feb 4, 2024
4da9e6e
Refactoring and commenting
Feb 4, 2024
d66422b
Spelling fixes
Feb 4, 2024
4e19ae1
Fix typo
Feb 4, 2024
b8451c8
Improve comments about 64-bit BE systems
Feb 4, 2024
64e6dbd
Fix incorrect error string
Feb 4, 2024
82400d0
Switched some xdr long ops to int
Feb 4, 2024
56e6daf
Replaced problematic XDR long operations
Feb 4, 2024
54e6bf5
Merge remote-tracking branch 'canonical/master' into remove_xdr_entir…
Feb 6, 2024
2511111
Added h4 prefix to XDR calls
Feb 6, 2024
6a7a011
Renamed XDR files w/ h4 prefix
Feb 6, 2024
b335b9f
Committing clang-format changes
github-actions[bot] Feb 6, 2024
143f66a
Merge remote-tracking branch 'canonical/master' into remove_xdr_entir…
Feb 6, 2024
3bdfb4f
Merge branch 'remove_xdr_entirely2' of https://github.com/derobins/hd…
Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,10 @@ permissions:
# in parallel. We just have one job, but the matrix items defined below will
# run in parallel.
jobs:
call-workflow-xdr-autotools:
name: "Autotools XDR Workflows"
uses: ./.github/workflows/main-auto.yml
with:
xdr: enable
netcdf: enable
shared: enable
build_mode: "production"

call-system-xdr-autotools:
name: "Autotools System XDR Workflows"
uses: ./.github/workflows/main-auto.yml
with:
xdr: disable
netcdf: enable
shared: enable
build_mode: "production"

call-debug-netcdf-autotools:
name: "Autotools Debug NetCDF Workflows"
uses: ./.github/workflows/main-auto.yml
with:
xdr: enable
netcdf: enable
shared: enable
build_mode: "debug"
Expand All @@ -42,7 +23,6 @@ jobs:
name: "Autotools Release NetCDF Workflows"
uses: ./.github/workflows/main-auto.yml
with:
xdr: enable
netcdf: enable
shared: enable
build_mode: "production"
Expand All @@ -52,7 +32,6 @@ jobs:
uses: ./.github/workflows/main-auto.yml
with:
netcdf: disable
xdr: enable
shared: disable
build_mode: "debug"

Expand All @@ -61,7 +40,6 @@ jobs:
uses: ./.github/workflows/main-auto.yml
with:
netcdf: disable
xdr: enable
shared: disable
build_mode: "production"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
- uses: actions/checkout@v4.1.1
- uses: codespell-project/actions-codespell@master
with:
skip: ./config/sanitizer/sanitizers.cmake,./hdf/util/testfiles/*.raw,./hdf/util/testfiles/head.r8,./mfhdf/ncdump/*,./mfhdf/ncgen/*,./mfhdf/nctest/*,./mfhdf/xdr/*,./mfhdf/README,./mfhdf/THANKS,./mfhdf/FAQ
skip: ./config/sanitizer/sanitizers.cmake,./hdf/util/testfiles/*.raw,./hdf/util/testfiles/head.r8,./mfhdf/ncdump/*,./mfhdf/ncgen/*,./mfhdf/nctest/*,./mfhdf/README,./mfhdf/THANKS,./mfhdf/FAQ
ignore_words_list: acount,anid,ans,clude,isnt,inout,fo,msdos,nam,nd,pres,sav,shs,siz,varn,vlone
2 changes: 1 addition & 1 deletion .github/workflows/hdfeos2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install HDF4
run: |
./autogen.sh
./configure --prefix=/usr/local --enable-shared --enable-hdf4-xdr -disable-fortran --disable-netcdf
./configure --prefix=/usr/local --enable-shared --disable-fortran --disable-netcdf
make
sudo make install
- name: Install HDF-EOS2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/intel-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
--enable-build-mode=${{ inputs.build_mode }} \
--enable-netcdf \
--enable-shared \
--enable-hdf4-xdr \
--disable-fortran

# BUILD
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/main-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ on:
description: "netcdf enable/disable"
required: true
type: string
xdr:
description: "xdr enable/disable(system)"
required: true
type: string

permissions:
contents: read
Expand All @@ -33,7 +29,7 @@ jobs:
# Linux (Ubuntu) w/ gcc + Autotools
#
Autotools_build_and_test:
name: "GCC-${{ inputs.build_mode }}-NC=${{ inputs.netcdf }}d-XDR=${{ inputs.xdr }}d"
name: "GCC-${{ inputs.build_mode }}-NC=${{ inputs.netcdf }}d"
# Don't run the action if the commit message says to skip CI
if: "!contains(github.event.head_commit.message, 'skip-ci')"

Expand Down Expand Up @@ -64,7 +60,6 @@ jobs:
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure \
--enable-build-mode=${{ inputs.build_mode }} \
--${{ inputs.xdr }}-hdf4-xdr \
--${{ inputs.netcdf }}-netcdf \
--disable-fortran \
--${{ inputs.shared }}-java \
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/main-cmake-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ jobs:
-DBUILD_SHARED_LIBS:BOOL=${{ inputs.shared }} \
-DHDF4_BUILD_EXAMPLES:BOOL=ON \
-DBUILD_JPEG_WITH_PIC:BOOL=ON \
-DHDF4_BUILD_XDR_LIB:BOOL=ON \
-DHDF4_ENABLE_NETCDF:BOOL=${{ inputs.netcdf }} \
-DHDF4_BUILD_FORTRAN:BOOL=OFF \
-DHDF4_BUILD_JAVA:BOOL=OFF \
Expand Down Expand Up @@ -104,4 +103,4 @@ jobs:
- name: List files in the space
run: |
ls -l ${{ runner.workspace }}/build


6 changes: 1 addition & 5 deletions .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
- name: "Windows MSVC"
os: windows-latest
toolchain: ""
xdr: ON
fortran: OFF
java: ON
docs: ON
Expand All @@ -69,7 +68,6 @@ jobs:
# so it's not critical
- name: "Ubuntu gcc"
os: ubuntu-latest
xdr: ON
fortran: OFF
java: ON
docs: ON
Expand All @@ -88,7 +86,6 @@ jobs:
# but that seems unnecessary
- name: "MacOS Clang"
os: macos-13
xdr: ON
fortran: OFF
java: ON
docs: ON
Expand Down Expand Up @@ -168,7 +165,6 @@ jobs:
-DBUILD_SHARED_LIBS:BOOL=${{ inputs.shared }} \
-DHDF4_BUILD_EXAMPLES:BOOL=ON \
-DBUILD_JPEG_WITH_PIC:BOOL=ON \
-DHDF4_BUILD_XDR_LIB:BOOL=${{ matrix.xdr }} \
-DHDF4_ENABLE_NETCDF:BOOL=${{ inputs.netcdf }} \
-DHDF4_BUILD_FORTRAN:BOOL=${{ matrix.fortran }} \
-DHDF4_BUILD_JAVA:BOOL=${{ env.useJava }} \
Expand Down Expand Up @@ -231,4 +227,4 @@ jobs:
path: ${{ runner.workspace }}/build/HDF-*-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'macos-13') && (inputs.netcdf == 'true') && (inputs.shared == 'true') }}


2 changes: 0 additions & 2 deletions .github/workflows/ppc64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
cd "build"
../configure \
--enable-build-mode=production \
--enable-hdf4-xdr \
--enable-netcdf \
--disable-fortran \
--disable-java \
Expand Down Expand Up @@ -91,7 +90,6 @@ jobs:
-DBUILD_SHARED_LIBS:BOOL=ON \
-DHDF4_BUILD_EXAMPLES=ON \
-DBUILD_JPEG_WITH_PIC:BOOL=ON \
-DHDF4_BUILD_XDR_LIB:BOOL=ON \
-DHDF4_ENABLE_NETCDF:BOOL=ON \
-DHDF4_BUILD_FORTRAN=OFF \
-DHDF4_BUILD_JAVA=OFF \
Expand Down
1 change: 0 additions & 1 deletion CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ endif ()
set (HDF4_INCLUDES_BUILD_TIME
${HDF4_HDF_SOURCE_DIR}
${HDF4_MFHDF_SOURCE_DIR}
${HDF4_MFHDF_XDR_DIR}
${HDF4_BINARY_DIR}
)

Expand Down
41 changes: 0 additions & 41 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ set (HDF4_SRC_LIB_CORENAME "hdf")
set (HDF4_SRC_FCSTUB_LIB_CORENAME "hdf_fcstub")
set (HDF4_SRC_FORTRAN_LIB_CORENAME "hdf_fortran")
set (HDF4_MF_LIB_CORENAME "mfhdf")
set (HDF4_MF_XDR_LIB_CORENAME "xdr")
set (HDF4_HDF_TEST_LIB_CORENAME "hdf_test")
set (HDF4_HDF_TEST_FCSTUB_LIB_CORENAME "hdf_test_fcstub")
set (HDF4_MF_FCSTUB_LIB_CORENAME "mfhdf_fcstub")
Expand All @@ -170,7 +169,6 @@ set (HDF4_SRC_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_SRC_LIB_COREN
set (HDF4_SRC_FCSTUB_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_SRC_FCSTUB_LIB_CORENAME}")
set (HDF4_SRC_FORTRAN_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_SRC_FORTRAN_LIB_CORENAME}")
set (HDF4_MF_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_MF_LIB_CORENAME}")
set (HDF4_MF_XDR_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_MF_XDR_LIB_CORENAME}")
set (HDF4_HDF_TEST_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_HDF_TEST_LIB_CORENAME}")
set (HDF4_HDF_TEST_FCSTUB_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_HDF_TEST_FCSTUB_LIB_CORENAME}")
set (HDF4_MF_FCSTUB_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_MF_FCSTUB_LIB_CORENAME}")
Expand All @@ -188,7 +186,6 @@ set (HDF4_SRC_LIB_TARGET "${HDF4_SRC_LIB_CORENAME}-static")
set (HDF4_SRC_FCSTUB_LIB_TARGET "${HDF4_SRC_FCSTUB_LIB_CORENAME}-static")
set (HDF4_SRC_FORTRAN_LIB_TARGET "${HDF4_SRC_FORTRAN_LIB_CORENAME}-static")
set (HDF4_MF_LIB_TARGET "${HDF4_MF_LIB_CORENAME}-static")
set (HDF4_MF_XDR_LIB_TARGET "${HDF4_MF_XDR_LIB_CORENAME}-static")
set (HDF4_HDF_TEST_LIB_TARGET "${HDF4_HDF_TEST_LIB_CORENAME}-static")
set (HDF4_HDF_TEST_FCSTUB_LIB_TARGET "${HDF4_HDF_TEST_FCSTUB_LIB_CORENAME}-static")
set (HDF4_MF_FCSTUB_LIB_TARGET "${HDF4_MF_FCSTUB_LIB_CORENAME}-static")
Expand All @@ -202,7 +199,6 @@ set (HDF4_SRC_LIBSH_TARGET "${HDF4_SRC_LIB_CORENAME}-shared")
set (HDF4_SRC_FCSTUB_LIBSH_TARGET "${HDF4_SRC_FCSTUB_LIB_CORENAME}-shared")
set (HDF4_SRC_FORTRAN_LIBSH_TARGET "${HDF4_SRC_FORTRAN_LIB_CORENAME}-shared")
set (HDF4_MF_LIBSH_TARGET "${HDF4_MF_LIB_CORENAME}-shared")
set (HDF4_MF_XDR_LIBSH_TARGET "${HDF4_MF_XDR_LIB_CORENAME}-shared")
set (HDF4_MF_FCSTUB_LIBSH_TARGET "${HDF4_MF_FCSTUB_LIB_CORENAME}-shared")
set (HDF4_MF_FORTRAN_LIBSH_TARGET "${HDF4_MF_FORTRAN_LIB_CORENAME}-shared")
set (HDF4_TOOLS_LIBSH_TARGET "${HDF4_TOOLS_LIB_CORENAME}-shared")
Expand All @@ -218,7 +214,6 @@ set (HDF4_MFHDFSOURCE_DIR ${HDF4_SOURCE_DIR}/mfhdf/libsrc)
set (HDF4_MFHDF_TEST_DIR ${HDF4_SOURCE_DIR}/mfhdf/test)
set (HDF4_MFHDF_UTIL_DIR ${HDF4_SOURCE_DIR}/mfhdf/util)
set (HDF4_MFHDF_FORTRAN_DIR ${HDF4_SOURCE_DIR}/mfhdf/fortran)
set (HDF4_MFHDF_XDR_DIR ${HDF4_SOURCE_DIR}/mfhdf/xdr)
set (HDF4_JAVA_JNI_SRC_DIR ${HDF4_SOURCE_DIR}/java/src/jni)
set (HDF4_JAVA_HDF_SRC_DIR ${HDF4_SOURCE_DIR}/java/src/hdf)
set (HDF4_JAVA_TEST_SRC_DIR ${HDF4_SOURCE_DIR}/java/test)
Expand Down Expand Up @@ -472,48 +467,12 @@ if (HDF4_ENABLE_NETCDF)
set (${HDF_PREFIX}_BUILD_NETCDF 1)
endif ()

#-----------------------------------------------------------------------------
# Option to build HDF4 xdr Library
#-----------------------------------------------------------------------------
option (HDF4_BUILD_XDR_LIB "Build HDF4 XDR Library" OFF)
if (WIN32 OR MINGW OR APPLE)
set (HDF4_BUILD_XDR_LIB ON CACHE BOOL "Build HDF4 XDR Library" FORCE)
else ()
if (NOT HDF4_BUILD_XDR_LIB)
include (FindXDR)
if (XDR_FOUND)
set (CMAKE_REQUIRED_LIBRARIES "${XDR_LIBRARIES}" )
message (STATUS "HDF4 XDR Library found: ${XDR_LIBRARIES}")
set (LINK_LIBS ${LINK_LIBS} ${XDR_LIBRARIES})
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${XDR_LIBRARIES})
include_directories(${XDR_INCLUDE_DIRS})
else ()
set (HDF4_BUILD_XDR_LIB ON CACHE BOOL "Build HDF4 XDR Library" FORCE)
message (STATUS "HDF4 XDR Library will be built")
endif ()
endif ()
endif ()

if (HDF4_BUILD_XDR_LIB)
set (H4_NO_SYS_XDR_INC 1)
add_subdirectory (mfhdf/xdr)
endif ()

#-----------------------------------------------------------------------------
# Add the HDF4 Library Target to the build
#-----------------------------------------------------------------------------
add_subdirectory (hdf/src)
add_subdirectory (mfhdf/libsrc)

if (HDF4_BUILD_XDR_LIB)
if (NOT ONLY_SHARED_LIBS)
add_dependencies (${HDF4_MF_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET})
endif ()
if (BUILD_SHARED_LIBS)
add_dependencies (${HDF4_MF_LIBSH_TARGET} ${HDF4_MF_XDR_LIBSH_TARGET})
endif ()
endif ()

#-----------------------------------------------------------------------------
# Option to build documentation
#-----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"inherits": ["ci-StdCompression", "ci-StdExamples"],
"cacheVariables": {
"HDF_PACKAGE_NAMESPACE": {"type": "STRING", "value": "hdf4::"},
"HDF4_BUILD_XDR_LIB": "ON",
"HDF4_BUILD_GENERATORS": "ON",
"HDF4_ENABLE_ALL_WARNINGS": "ON",
"HDF4_MINGW_STATIC_GCC_LIBS": "ON"
Expand Down
19 changes: 3 additions & 16 deletions config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ macro (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
endmacro ()

# ----------------------------------------------------------------------
# WINDOWS Hard code Values
# WINDOWS hard-coded values
# ----------------------------------------------------------------------
set (WINDOWS)

Expand All @@ -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")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change?

Copy link
Member Author

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?

Copy link
Collaborator

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.

Copy link
Member Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

set (${HDF_PREFIX}_HAVE_WIN32_API 1)
set (${HDF_PREFIX}_HAVE_LIBM 1)
set (${HDF_PREFIX}_HAVE_STRDUP 1)
Expand All @@ -85,7 +85,7 @@ if (WINDOWS)
endif ()

# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
# END of WINDOWS hard-coded values
# ----------------------------------------------------------------------

if (NOT WINDOWS)
Expand Down Expand Up @@ -451,19 +451,6 @@ CHECK_FUNCTION_EXISTS (asprintf ${HDF_PREFIX}_HAVE_ASPRINTF)
CHECK_FUNCTION_EXISTS (vasprintf ${HDF_PREFIX}_HAVE_VASPRINTF)
CHECK_FUNCTION_EXISTS (waitpid ${HDF_PREFIX}_HAVE_WAITPID)

if (NOT WINDOWS)
CHECK_FUNCTION_EXISTS (ntohl ${HDF_PREFIX}_HAVE_NTOHL)
CHECK_FUNCTION_EXISTS (htonl ${HDF_PREFIX}_HAVE_HTONL)
CHECK_FUNCTION_EXISTS (ntohs ${HDF_PREFIX}_HAVE_NTOHS)
CHECK_FUNCTION_EXISTS (htons ${HDF_PREFIX}_HAVE_HTONS)
else ()
set (CMAKE_REQUIRED_LIBRARIES "ws2_32")
check_symbol_exists (ntohl "winsock2.h" ${HDF_PREFIX}_HAVE_NTOHL)
check_symbol_exists (htonl "winsock2.h" ${HDF_PREFIX}_HAVE_HTONL)
check_symbol_exists (ntohs "winsock2.h" ${HDF_PREFIX}_HAVE_NTOHS)
check_symbol_exists (htons "winsock2.h" ${HDF_PREFIX}_HAVE_HTONS)
endif ()

#-----------------------------------------------------------------------------
# Check how to print a Long Long integer
#-----------------------------------------------------------------------------
Expand Down
47 changes: 0 additions & 47 deletions config/cmake/FindXDR.cmake

This file was deleted.

Loading
Loading