diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-06 21:08:16 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-06 21:08:16 +0000 |
commit | 90c80ebe9780d73ac73f4269ba9d5c9b55d4e6d8 (patch) | |
tree | 88cf2e622e5a99bc14e6ab794d22d951dffce074 /nuttx | |
parent | b0a4608425275e42c664cccd628647c5e78c8770 (diff) | |
download | px4-nuttx-90c80ebe9780d73ac73f4269ba9d5c9b55d4e6d8.tar.gz px4-nuttx-90c80ebe9780d73ac73f4269ba9d5c9b55d4e6d8.tar.bz2 px4-nuttx-90c80ebe9780d73ac73f4269ba9d5c9b55d4e6d8.zip |
Fix endian conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@644 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/fs/fs_fat32.h | 6 | ||||
-rw-r--r-- | nuttx/fs/fs_fat32util.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/fs/fs_fat32.h b/nuttx/fs/fs_fat32.h index 0ea0eca36..d3936f3a8 100644 --- a/nuttx/fs/fs_fat32.h +++ b/nuttx/fs/fs_fat32.h @@ -1,7 +1,7 @@ /**************************************************************************** * fs_fat32.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -241,7 +241,7 @@ * stream can force special, byte-by-byte accesses. */ -#ifdef CONFIG_ARCH_BIGENDIAN +#ifdef CONFIG_ENDIAN_BIG /* If the target is big-endian, then even aligned multi-byte values must be * accessed byte-by-byte. diff --git a/nuttx/fs/fs_fat32util.c b/nuttx/fs/fs_fat32util.c index ed3097006..5931d76d0 100644 --- a/nuttx/fs/fs_fat32util.c +++ b/nuttx/fs/fs_fat32util.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs_fat32util.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * References: @@ -19,7 +19,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -432,7 +432,7 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) uint16 fat_getuint16(ubyte *ptr) { -#ifdef CONFIG_ARCH_BIGENDIAN +#ifdef CONFIG_ENDIAN_BIG /* The bytes always have to be swapped if the target is big-endian */ return ((uint16)ptr[0] << 8) | ptr[1]; @@ -449,7 +449,7 @@ uint16 fat_getuint16(ubyte *ptr) uint32 fat_getuint32(ubyte *ptr) { -#ifdef CONFIG_ARCH_BIGENDIAN +#ifdef CONFIG_ENDIAN_BIG /* The bytes always have to be swapped if the target is big-endian */ return ((uint32)fat_getuint16(&ptr[0]) << 16) | fat_getuint16(&ptr[2]); @@ -467,7 +467,7 @@ uint32 fat_getuint32(ubyte *ptr) void fat_putuint16(ubyte *ptr, uint16 value16) { ubyte *val = (ubyte*)&value16; -#ifdef CONFIG_ARCH_BIGENDIAN +#ifdef CONFIG_ENDIAN_BIG /* The bytes always have to be swapped if the target is big-endian */ ptr[0] = val[1]; @@ -487,7 +487,7 @@ void fat_putuint16(ubyte *ptr, uint16 value16) void fat_putuint32(ubyte *ptr, uint32 value32) { uint16 *val = (uint16*)&value32; -#ifdef CONFIG_ARCH_BIGENDIAN +#ifdef CONFIG_ENDIAN_BIG /* The bytes always have to be swapped if the target is big-endian */ fat_putuint16(&ptr[0], val[2]); |