[openssh-commits] [openssh] branch master updated: provide a htobe32() replacement
git+noreply at mindrot.org
git+noreply at mindrot.org
Sun Jun 14 18:56:47 AEST 2026
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new ea505c83e provide a htobe32() replacement
ea505c83e is described below
commit ea505c83ecae67c66c020f03b964cf471055191e
Author: Damien Miller <djm at mindrot.org>
AuthorDate: Sun Jun 14 18:56:31 2026 +1000
provide a htobe32() replacement
---
configure.ac | 2 +-
defines.h | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 530c8e316..cba44faf2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -588,7 +588,7 @@ for include in sys/queue.h sys/tree.h; do
esac >"$header"
done
-AC_CHECK_DECLS([le32toh, le64toh, htole64], [], [], [
+AC_CHECK_DECLS([le32toh, le64toh, htole64, htobe32], [], [], [
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
diff --git a/defines.h b/defines.h
index 54f0fc83f..0057aa168 100644
--- a/defines.h
+++ b/defines.h
@@ -663,7 +663,8 @@ struct winsize {
#if (defined(HAVE_DECL_LE32TOH) && HAVE_DECL_LE32TOH == 0) || \
(defined(HAVE_DECL_LE64TOH) && HAVE_DECL_LE64TOH == 0) || \
- (defined(HAVE_DECL_HTOLE64) && HAVE_DECL_HTOLE64 == 0)
+ (defined(HAVE_DECL_HTOLE64) && HAVE_DECL_HTOLE64 == 0) || \
+ (defined(HAVE_DECL_HTOBE32) && HAVE_DECL_HTOBE32 == 0)
# define openssh_swap32(v) \
(uint32_t)(((uint32_t)(v) & 0xff) << 24 | \
((uint32_t)(v) & 0xff00) << 8 | \
@@ -687,7 +688,10 @@ struct winsize {
# endif
# if defined(HAVE_DECL_HTOLE64) && HAVE_DECL_HTOLE64 == 0
# define htole64(v) (openssh_swap64(v))
-# endif
+# endif
+# if defined(HAVE_DECL_HTOBE32) && HAVE_DECL_HTOBE32 == 0
+# define htobe32(v) ((uint32_t)v)
+# endif
# else
# if defined(HAVE_DECL_LE32TOH) && HAVE_DECL_LE32TOH == 0
# define le32toh(v) ((uint32_t)v)
@@ -698,6 +702,9 @@ struct winsize {
# if defined(HAVE_DECL_HTOLE64) && HAVE_DECL_HTOLE64 == 0
# define htole64(v) ((uint64_t)v)
# endif
+# if defined(HAVE_DECL_HTOBE32) && HAVE_DECL_HTOBE32 == 0
+# define htobe32(v) (openssh_swap32(v))
+# endif
# endif
#endif
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list