diff options
-rw-r--r-- | configure.in | 50 | ||||
-rw-r--r-- | include/ogg/config_types.h.in | 1 | ||||
-rw-r--r-- | include/ogg/os_types.h | 8 |
3 files changed, 58 insertions, 1 deletions
diff --git a/configure.in b/configure.in index ad2958b..d620d65 100644 --- a/configure.in +++ b/configure.in @@ -127,6 +127,22 @@ has_uint32_t=no )]) AC_MSG_RESULT($has_uint32_t) +AC_MSG_CHECKING(for uint16_t) +AC_CACHE_VAL(has_uint16_t, +[AC_TRY_RUN([ +#ifdef __BEOS__ +#include <inttypes.h> +#endif +#include <sys/types.h> +uint16_t foo; +int main() {return 0;} +], +has_uint16_t=yes, +has_uint16_t=no, +has_uint16_t=no +)]) +AC_MSG_RESULT($has_uint16_t) + AC_MSG_CHECKING(for u_int32_t) AC_CACHE_VAL(has_u_int32_t, [AC_TRY_RUN([ @@ -143,6 +159,22 @@ has_u_int32_t=no )]) AC_MSG_RESULT($has_u_int32_t) +AC_MSG_CHECKING(for u_int16_t) +AC_CACHE_VAL(has_u_int16_t, +[AC_TRY_RUN([ +#ifdef __BEOS__ +#include <inttypes.h> +#endif +#include <sys/types.h> +u_int16_t foo; +int main() {return 0;} +], +has_u_int16_t=yes, +has_u_int16_t=no, +has_u_int16_t=no +)]) +AC_MSG_RESULT($has_u_int16_t) + AC_MSG_CHECKING(for int64_t) AC_CACHE_VAL(has_int64_t, [AC_TRY_RUN([ @@ -198,6 +230,20 @@ else fi fi +if test x$has_uint16_t = "xyes" ; then + USIZE16="uint16_t" +else + if test x$has_u_int16_t = "xyes" ; then + USIZE16="u_int16_t" + else + case 2 in + $ac_cv_sizeof_short) USIZE16="unsigned short";; + $ac_cv_sizeof_int) USIZE16="unsigned int";; + $ac_cv_sizeof_long) USIZE16="unsigned long";; + esac + fi +fi + if test x$has_int64_t = "xyes" ; then SIZE64="int64_t" else @@ -211,6 +257,9 @@ fi if test -z "$SIZE16"; then AC_MSG_ERROR(No 16 bit type found on this platform!) fi +if test -z "$USIZE16"; then + AC_MSG_ERROR(No unsigned 16 bit type found on this platform!) +fi if test -z "$SIZE32"; then AC_MSG_ERROR(No 32 bit type found on this platform!) fi @@ -228,6 +277,7 @@ dnl Make substitutions AC_SUBST(LIBTOOL_DEPS) AC_SUBST(SIZE16) +AC_SUBST(USIZE16) AC_SUBST(SIZE32) AC_SUBST(USIZE32) AC_SUBST(SIZE64) diff --git a/include/ogg/config_types.h.in b/include/ogg/config_types.h.in index 8106089..568a001 100644 --- a/include/ogg/config_types.h.in +++ b/include/ogg/config_types.h.in @@ -3,6 +3,7 @@ /* these are filled in by configure */ typedef @SIZE16@ ogg_int16_t; +typedef @USIZE16@ ogg_uint16_t; typedef @SIZE32@ ogg_int32_t; typedef @USIZE32@ ogg_uint32_t; typedef @SIZE64@ ogg_int64_t; diff --git a/include/ogg/os_types.h b/include/ogg/os_types.h index 229f202..5be84e1 100644 --- a/include/ogg/os_types.h +++ b/include/ogg/os_types.h @@ -11,7 +11,7 @@ ******************************************************************** function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os_types.h,v 1.11 2002/07/19 08:25:51 msmith Exp $ + last mod: $Id: os_types.h,v 1.12 2002/09/18 04:42:09 xiphmont Exp $ ********************************************************************/ #ifndef _OS_TYPES_H @@ -32,6 +32,7 @@ typedef __int32 ogg_int32_t; typedef unsigned __int32 ogg_uint32_t; typedef __int16 ogg_int16_t; + typedef unsigned __int16 ogg_uint16_t; # else /* Cygwin */ #include <_G_config.h> @@ -39,12 +40,14 @@ typedef _G_int32_t ogg_int32_t; typedef _G_uint32_t ogg_uint32_t; typedef _G_int16_t ogg_int16_t; + typedef _G_uint16_t ogg_uint16_t; # endif #elif defined(__MACOS__) # include <sys/types.h> typedef SInt16 ogg_int16_t; + typedef UInt16 ogg_uint16_t; typedef SInt32 ogg_int32_t; typedef UInt32 ogg_uint32_t; typedef SInt64 ogg_int64_t; @@ -53,6 +56,7 @@ # include <sys/types.h> typedef int16_t ogg_int16_t; + typedef u_int16_t ogg_uint16_t; typedef int32_t ogg_int32_t; typedef u_int32_t ogg_uint32_t; typedef int64_t ogg_int64_t; @@ -62,6 +66,7 @@ /* Be */ # include <inttypes.h> typedef int16_t ogg_int16_t; + typedef u_int16_t ogg_uint16_t; typedef int32_t ogg_int32_t; typedef u_int32_t ogg_uint32_t; typedef int64_t ogg_int64_t; @@ -70,6 +75,7 @@ /* OS/2 GCC */ typedef short ogg_int16_t; + typedef unsigned short ogg_uint16_t; typedef int ogg_int32_t; typedef unsigned int ogg_uint32_t; typedef long long ogg_int64_t; |