You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/07 19:37:17 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7002: include:endian.h add openbsd style

pkarashchenko commented on code in PR #7002:
URL: https://github.com/apache/incubator-nuttx/pull/7002#discussion_r965205332


##########
include/endian.h:
##########
@@ -137,4 +137,21 @@
 #    define le64toh(n)        (n)
 #  endif
 #endif
+
+/* OpenBSD style */
+
+#define swap16                __swap_uint16
+#define swap32                __swap_uint32
+#define swap64                __swap_uint64
+
+#define betoh16               be16toh
+#define letoh16               le16toh
+#define betoh32               be32toh
+#define letoh32               le32toh
+
+#ifdef CONFIG_HAVE_LONG_LONG
+#define betoh64               be64toh
+#define letoh64               le64toh

Review Comment:
   ```suggestion
   #  define betoh64             be64toh
   #  define letoh64             le64toh
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org