diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/XpExtUtil.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/XpExtUtil.h b/src/XpExtUtil.h index d479a95..1889825 100644 --- a/src/XpExtUtil.h +++ b/src/XpExtUtil.h @@ -48,6 +48,20 @@ extern char *_xpstrdup( const char * /* str */ ); +#ifndef HAVE__XEATDATAWORDS +#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */ +#include <limits.h> + +static inline void _XEatDataWords(Display *dpy, unsigned long n) +{ +# ifndef LONG64 + if (n >= (ULONG_MAX >> 2)) + _XIOError(dpy); +# endif + _XEatData (dpy, n << 2); +} +#endif + _XFUNCPROTOEND #endif /* _XPEXTUTIL_H */ |