summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/k5-platform.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h
index ee3730ad0..9b02462b6 100644
--- a/src/include/k5-platform.h
+++ b/src/include/k5-platform.h
@@ -713,6 +713,35 @@ load_64_le (const void *cvp)
#endif
}
+static inline void
+store_16_n (unsigned int val, void *vp)
+{
+#ifdef _WIN32
+ unsigned __int16 n;
+#else
+ uint16_t n;
+#endif
+ n = val;
+ memcpy(vp, &n, 2);
+}
+static inline void
+store_32_n (unsigned int val, void *vp)
+{
+#ifdef _WIN32
+ unsigned __int32 n;
+#else
+ uint32_t n;
+#endif
+ n = val;
+ memcpy(vp, &n, 4);
+}
+static inline void
+store_64_n (UINT64_TYPE val, void *vp)
+{
+ UINT64_TYPE n;
+ n = val;
+ memcpy(vp, &n, 8);
+}
static inline unsigned short
load_16_n (const void *p)
{