diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-08-19 10:47:26 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-08-19 10:47:26 -0700 |
commit | f17692adaacc234f90db845e295946b5a68e511a (patch) | |
tree | 9b4f52cc4489ec15372eee5411d344968b1211e3 /common/parse.h | |
parent | d96d8aa5ad2e6d25f91ace456987bd494154a9ca (diff) | |
download | xrdp-proprietary-f17692adaacc234f90db845e295946b5a68e511a.tar.gz xrdp-proprietary-f17692adaacc234f90db845e295946b5a68e511a.zip |
added out_uint64_le
Diffstat (limited to 'common/parse.h')
-rw-r--r-- | common/parse.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/common/parse.h b/common/parse.h index f92e76de..3ec37104 100644 --- a/common/parse.h +++ b/common/parse.h @@ -279,6 +279,35 @@ struct stream #endif /******************************************************************************/ +#if defined(B_ENDIAN) || defined(NEED_ALIGN) +#define out_uint64_le(s, v) do \ +{ \ + *((s)->p) = (unsigned char)((v) >> 0); \ + (s)->p++; \ + *((s)->p) = (unsigned char)((v) >> 8); \ + (s)->p++; \ + *((s)->p) = (unsigned char)((v) >> 16); \ + (s)->p++; \ + *((s)->p) = (unsigned char)((v) >> 24); \ + (s)->p++; \ + *((s)->p) = (unsigned char)((v) >> 32); \ + (s)->p++; \ + *((s)->p) = (unsigned char)((v) >> 40); \ + (s)->p++; \ + *((s)->p) = (unsigned char)((v) >> 48); \ + (s)->p++; \ + *((s)->p) = (unsigned char)((v) >> 56); \ + (s)->p++; \ +} while (0) +#else +#define out_uint64_le(s, v) do \ +{ \ + *((tui64*)((s)->p)) = (v); \ + (s)->p += 8; \ +} while (0) +#endif + +/******************************************************************************/ #define out_uint32_be(s, v) do \ { \ *((s)->p) = (unsigned char)((v) >> 24); \ |