diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-12-30 23:34:20 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-12-30 23:34:20 +0000 |
commit | cec4c4d2c9468a0d0234d306c886ba97515b1690 (patch) | |
tree | 326bbe7079e54314b42270d115ae6d39e8f037b8 /nuttx/include/sys | |
parent | f3532ac59f8b6bb4d4a7239b73b5fcb4b66ed6b1 (diff) | |
download | px4-nuttx-cec4c4d2c9468a0d0234d306c886ba97515b1690.tar.gz px4-nuttx-cec4c4d2c9468a0d0234d306c886ba97515b1690.tar.bz2 px4-nuttx-cec4c4d2c9468a0d0234d306c886ba97515b1690.zip |
More SDCC compilation fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@468 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/sys')
-rw-r--r-- | nuttx/include/sys/types.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/nuttx/include/sys/types.h b/nuttx/include/sys/types.h index 0460c5e5c..2fd53e41d 100644 --- a/nuttx/include/sys/types.h +++ b/nuttx/include/sys/types.h @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * sys/types.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 @@ -31,39 +31,44 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ #ifndef __SYS_TYPES_H #define __SYS_TYPES_H -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> #include <arch/types.h> #include <nuttx/compiler.h> -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ /* Values for type boolean */ #define TRUE 1 #define FALSE 0 -/* NULL is usually defined in stddef.h */ +/* NULL is usually defined in stddef.h (which includes this file) */ #ifndef NULL -#define NULL (void*)0L + /* SDCC is sensitive to NULL pointer type conversions */ +# ifdef SDCC +# define NULL (0) +# else +# define NULL ((void*)0) +# endif #endif /* POSIX-like OS return values: */ #if !defined(__cplusplus) -#undef ERROR -#define ERROR -1 +# undef ERROR +# define ERROR -1 #endif #undef OK @@ -86,9 +91,9 @@ #define SCHED_PRIORITY_MIN 1 #define SCHED_PRIORITY_IDLE 0 -/************************************************************ +/**************************************************************************** * Type Declarations - ************************************************************/ + ****************************************************************************/ #ifndef __ASSEMBLY__ #ifndef CONFIG_HAVE_DOUBLE @@ -132,8 +137,8 @@ typedef int (*main_t)(int argc, char *argv[]); #endif -/************************************************************ +/**************************************************************************** * Global Function Prototypes - ************************************************************/ + ****************************************************************************/ #endif /* __SYS_TYPES_H */ |