diff options
| author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2013-08-09 19:44:05 -0700 |
|---|---|---|
| committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2013-08-09 19:44:05 -0700 |
| commit | d2de1b703be307ffd36e618cef68b3976ddf548d (patch) | |
| tree | 26fd69308d9f66a213c817ac3d47061af4772b2b /common/parse.h | |
| parent | 23433c9c7e10af845c80a6b58324f24b1f3cf189 (diff) | |
| parent | 8b48e2274e4ecbce56893b6915d13781474d19d6 (diff) | |
| download | xrdp-proprietary-d2de1b703be307ffd36e618cef68b3976ddf548d.tar.gz xrdp-proprietary-d2de1b703be307ffd36e618cef68b3976ddf548d.zip | |
Merge branch 'master' of github.com:neutrinolabs/xrdp
Diffstat (limited to 'common/parse.h')
| -rw-r--r-- | common/parse.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/common/parse.h b/common/parse.h index 226e246b..f92e76de 100644 --- a/common/parse.h +++ b/common/parse.h @@ -184,6 +184,31 @@ struct stream #endif /******************************************************************************/ +#if defined(B_ENDIAN) || defined(NEED_ALIGN) +#define in_uint64_le(s, v) do \ +{ \ + (v) = (tui64) \ + ( \ + (((tui64)(*((unsigned char*)((s)->p + 0)))) << 0) | \ + (((tui64)(*((unsigned char*)((s)->p + 1)))) << 8) | \ + (((tui64)(*((unsigned char*)((s)->p + 2)))) << 16) | \ + (((tui64)(*((unsigned char*)((s)->p + 3)))) << 24) | \ + (((tui64)(*((unsigned char*)((s)->p + 4)))) << 32) | \ + (((tui64)(*((unsigned char*)((s)->p + 5)))) << 40) | \ + (((tui64)(*((unsigned char*)((s)->p + 6)))) << 48) | \ + (((tui64)(*((unsigned char*)((s)->p + 7)))) << 56) \ + ); \ + (s)->p += 8; \ +} while (0) +#else +#define in_uint64_le(s, v) do \ +{ \ + (v) = *((tui64*)((s)->p)); \ + (s)->p += 8; \ +} while (0) +#endif + +/******************************************************************************/ #define in_uint32_be(s, v) do \ { \ (v) = *((unsigned char*)((s)->p)); \ |
