123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef __PJ_COMPAT_LIMITS_H__
- #define __PJ_COMPAT_LIMITS_H__
- #include <pj/config.h>
- #if defined(PJ_HAS_LIMITS_H) && PJ_HAS_LIMITS_H != 0
- # include <limits.h>
- #else
- # ifdef _MSC_VER
- # pragma message("limits.h is not found or not supported. LONG_MIN and "\
- "LONG_MAX will be defined by the library in "\
- "pj/compats/limits.h and overridable in config_site.h")
- # else
- # warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " \
- "will be defined by the library in pj/compats/limits.h and "\
- "overridable in config_site.h"
- # endif
- # ifndef LONG_MAX
- # if __WORDSIZE == 64
- # define LONG_MAX 9223372036854775807L
- # else
- # define LONG_MAX 2147483647L
- # endif
- # endif
- # ifndef LONG_MIN
- # define LONG_MIN (-LONG_MAX - 1L)
- # endif
- # ifndef ULONG_MAX
- # if __WORDSIZE == 64
- # define ULONG_MAX 18446744073709551615UL
- # else
- # define ULONG_MAX 4294967295UL
- # endif
- # endif
- #endif
- #endif
|