diff options
author | Tim Terriberry <tterribe@xiph.org> | 2010-06-10 13:42:06 +0000 |
---|---|---|
committer | Tim Terriberry <tterribe@xiph.org> | 2010-06-10 13:42:06 +0000 |
commit | 6e1740c2921c9d37342b107b7de9951258dd0dc0 (patch) | |
tree | 6933d1671a8404beac3d0de139c92f3a87fa72c3 /include/ogg | |
parent | e73a2c97ab7700410badbe1090e2cb0456c062c8 (diff) | |
download | ogg-git-6e1740c2921c9d37342b107b7de9951258dd0dc0.tar.gz |
The generic TYPE_MAX macros introduced in r17270 require the gcc typeof
extension, which is not supported by MSVC.
We don't actually need that generality, though, so revert to simply using
LONG_MAX instead.
svn path=/trunk/ogg/; revision=17287
Diffstat (limited to 'include/ogg')
-rw-r--r-- | include/ogg/os_types.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/include/ogg/os_types.h b/include/ogg/os_types.h index cefd04f..4d4315d 100644 --- a/include/ogg/os_types.h +++ b/include/ogg/os_types.h @@ -24,19 +24,6 @@ #define _ogg_realloc realloc #define _ogg_free free -/* get non-brittle portable type-based MIN/MAX. Assumes 2's-complement - math */ -#define TYPE_HALF_MAX_SIGNED(type) \ - ((typeof(type))1 << (sizeof(type)*8-2)) -#define TYPE_MAX_SIGNED(type) \ - (TYPE_HALF_MAX_SIGNED(type) - 1 + TYPE_HALF_MAX_SIGNED(type)) -#define TYPE_MIN_SIGNED(type) \ - (-1 - TYPE_MAX_SIGNED(type)) -#define TYPE_MIN(type) \ - ((typeof(type))-1 < 1?TYPE_MIN_SIGNED(type):(typeof(type))0) -#define TYPE_MAX(type) \ - ((typeof(type))~TYPE_MIN(type)) - #if defined(_WIN32) # if defined(__CYGWIN__) |