Skip to content

Commit

Permalink
Remove unused HD macros (#3120)
Browse files Browse the repository at this point in the history
* Remove unused HD macros
The library prefixes most C and POSIX API calls with 'HD'. We are
going to start removing these so the code looks like normal C.

This PR removes most of the unused HD markup macros.

* Replace ntohl/ntohs
  • Loading branch information
derobins authored Jun 14, 2023
1 parent ce794d6 commit d1ef48e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 310 deletions.
11 changes: 0 additions & 11 deletions config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,6 @@ if (MINGW OR NOT WINDOWS)
endif ()
CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)
CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGETD)

# ----------------------------------------------------------------------
# cygwin user credentials are different then on linux
#
if (NOT CYGWIN AND NOT MINGW)
CHECK_FUNCTION_EXISTS (getpwuid ${HDF_PREFIX}_HAVE_GETPWUID)
endif ()
endif ()

#-----------------------------------------------------------------------------
Expand All @@ -451,10 +444,6 @@ CHECK_FUNCTION_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R)
CHECK_FUNCTION_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM)
CHECK_FUNCTION_EXISTS (setsysinfo ${HDF_PREFIX}_HAVE_SETSYSINFO)

CHECK_FUNCTION_EXISTS (siglongjmp ${HDF_PREFIX}_HAVE_SIGLONGJMP)
CHECK_FUNCTION_EXISTS (sigsetjmp ${HDF_PREFIX}_HAVE_SIGSETJMP)
CHECK_FUNCTION_EXISTS (sigprocmask ${HDF_PREFIX}_HAVE_SIGPROCMASK)

CHECK_FUNCTION_EXISTS (strcasestr ${HDF_PREFIX}_HAVE_STRCASESTR)
CHECK_FUNCTION_EXISTS (strdup ${HDF_PREFIX}_HAVE_STRDUP)
CHECK_FUNCTION_EXISTS (symlink ${HDF_PREFIX}_HAVE_SYMLINK)
Expand Down
12 changes: 0 additions & 12 deletions config/cmake/H5pubconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@
/* Define to 1 if you have the `gethostname' function. */
#cmakedefine H5_HAVE_GETHOSTNAME @H5_HAVE_GETHOSTNAME@

/* Define to 1 if you have the `getpwuid' function. */
#cmakedefine H5_HAVE_GETPWUID @H5_HAVE_GETPWUID@

/* Define to 1 if you have the `getrusage' function. */
#cmakedefine H5_HAVE_GETRUSAGE @H5_HAVE_GETRUSAGE@

Expand Down Expand Up @@ -267,15 +264,6 @@
/* Define to 1 if you have the `setsysinfo' function. */
#cmakedefine H5_HAVE_SETSYSINFO @H5_HAVE_SETSYSINFO@

/* Define to 1 if you have the `siglongjmp' function. */
#cmakedefine H5_HAVE_SIGLONGJMP @H5_HAVE_SIGLONGJMP@

/* Define to 1 if you have the `sigprocmask' function. */
#cmakedefine H5_HAVE_SIGPROCMASK @H5_HAVE_SIGPROCMASK@

/* Define to 1 if you have the `sigsetjmp' function. */
#cmakedefine H5_HAVE_SIGSETJMP @H5_HAVE_SIGSETJMP@

/* Define to 1 if you have the `stat64' function. */
#cmakedefine H5_HAVE_STAT64 @H5_HAVE_STAT64@

Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ case "`uname`" in
CYGWIN*)
;;
*)
AC_CHECK_FUNCS([GetConsoleScreenBufferInfo getpwuid])
AC_CHECK_FUNCS([GetConsoleScreenBufferInfo])
;;
esac
AC_CHECK_FUNCS([_scrsize ioctl])
Expand Down Expand Up @@ -2080,7 +2080,6 @@ AC_SEARCH_LIBS([clock_gettime], [rt posix4])
AC_CHECK_FUNCS([alarm asprintf clock_gettime fcntl flock fork])
AC_CHECK_FUNCS([gethostname getrusage gettimeofday])
AC_CHECK_FUNCS([rand_r random setsysinfo])
AC_CHECK_FUNCS([siglongjmp sigsetjmp sigprocmask])
AC_CHECK_FUNCS([strcasestr strdup symlink])
AC_CHECK_FUNCS([tmpfile vasprintf waitpid])

Expand Down
Loading

0 comments on commit d1ef48e

Please sign in to comment.