diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-09-28 20:53:57 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-09-28 20:53:57 +0000 |
commit | d715e7fd84e8f4a78d11c958cc57bbad082acf71 (patch) | |
tree | 48105803d372b0214a3a437d3d24d770ea172ab0 /sys/isofs | |
parent | d140acdd8c4412ebbb08c81355b12ebcd1d59c43 (diff) |
No part of the code defines UNALIGNED_ACCESS, use reverted tests for
__STRICT_ALIGNMENT instead.
Help pedro@ deraadt@, ok deraadt@
Diffstat (limited to 'sys/isofs')
-rw-r--r-- | sys/isofs/cd9660/iso.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/isofs/cd9660/iso.h b/sys/isofs/cd9660/iso.h index 99a1f688de1..2753905c9a7 100644 --- a/sys/isofs/cd9660/iso.h +++ b/sys/isofs/cd9660/iso.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iso.h,v 1.13 2003/06/02 23:28:05 millert Exp $ */ +/* $OpenBSD: iso.h,v 1.14 2005/09/28 20:53:54 miod Exp $ */ /* $NetBSD: iso.h,v 1.20 1997/07/07 22:45:34 cgd Exp $ */ /*- @@ -203,8 +203,8 @@ static __inline int isonum_721(p) u_char *p; { -#if defined(UNALIGNED_ACCESS) && (BYTE_ORDER == LITTLE_ENDIAN) - return *(u_int16t *)p; +#if !defined(__STRICT_ALIGNMENT) && (BYTE_ORDER == LITTLE_ENDIAN) + return *(u_int16_t *)p; #else return *p|((char)p[1] << 8); #endif @@ -215,8 +215,8 @@ static __inline int isonum_722(p) unsigned char *p; { -#if defined(UNALIGNED_ACCESS) && (BYTE_ORDER == BIG_ENDIAN) - return *(u_int16t *)p; +#if !defined(__STRICT_ALIGNMENT) && (BYTE_ORDER == BIG_ENDIAN) + return *(u_int16_t *)p; #else return ((char)*p << 8)|p[1]; #endif @@ -226,14 +226,14 @@ isonum_722(p) static __inline int isonum_723(u_char *p) { -#if defined(UNALIGNED_ACCESS) && \ +#if !defined(__STRICT_ALIGNMENT) && \ ((BYTE_ORDER == LITTLE_ENDIAN) || (BYTE_ORDER == BIG_ENDIAN)) #if BYTE_ORDER == LITTLE_ENDIAN - return *(u_int16t *)p; + return *(u_int16_t *)p; #else - return *(u_int16t *)(p + 2); + return *(u_int16_t *)(p + 2); #endif -#else /* !UNALIGNED_ACCESS or weird byte order */ +#else /* __STRICT_ALIGNMENT or weird byte order */ return *p|(p[1] << 8); #endif } @@ -243,8 +243,8 @@ static __inline int isonum_731(p) u_char *p; { -#if defined(UNALIGNED_ACCESS) && (BYTE_ORDER == LITTLE_ENDIAN) - return *(u_int32t *)p; +#if !defined(__STRICT_ALIGNMENT) && (BYTE_ORDER == LITTLE_ENDIAN) + return *(u_int32_t *)p; #else return *p|(p[1] << 8)|(p[2] << 16)|(p[3] << 24); #endif @@ -255,8 +255,8 @@ static __inline int isonum_732(p) unsigned char *p; { -#if defined(UNALIGNED_ACCESS) && (BYTE_ORDER == BIG_ENDIAN) - return *(u_int32t *)p; +#if !defined(__STRICT_ALIGNMENT) && (BYTE_ORDER == BIG_ENDIAN) + return *(u_int32_t *)p; #else return (*p << 24)|(p[1] << 16)|(p[2] << 8)|p[3]; #endif @@ -266,14 +266,14 @@ isonum_732(p) static __inline int isonum_733(u_char *p) { -#if defined(UNALIGNED_ACCESS) && \ +#if !defined(__STRICT_ALIGNMENT) && \ ((BYTE_ORDER == LITTLE_ENDIAN) || (BYTE_ORDER == BIG_ENDIAN)) #if BYTE_ORDER == LITTLE_ENDIAN - return *(u_int32t *)p; + return *(u_int32_t *)p; #else - return *(u_int32t *)(p + 4); + return *(u_int32_t *)(p + 4); #endif -#else /* !UNALIGNED_ACCESS or weird byte order */ +#else /* __STRICT_ALIGNMENT or weird byte order */ return *p|(p[1] << 8)|(p[2] << 16)|(p[3] << 24); #endif } |