diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-12 17:49:35 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-12 17:49:35 +0000 |
commit | 18669722d84491f37066f9c6798c74852598212a (patch) | |
tree | ee4c5ecda27f6056ff610a8637166628a4c6b0e5 /nuttx/include | |
parent | 2b184e2630f74fe4f568212de7e143a9bc3743b8 (diff) | |
download | px4-firmware-18669722d84491f37066f9c6798c74852598212a.tar.gz px4-firmware-18669722d84491f37066f9c6798c74852598212a.tar.bz2 px4-firmware-18669722d84491f37066f9c6798c74852598212a.zip |
Define NULL to be (0) for C++
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5023 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/sys/types.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nuttx/include/sys/types.h b/nuttx/include/sys/types.h index 6014b9b74..2ae69d4a7 100644 --- a/nuttx/include/sys/types.h +++ b/nuttx/include/sys/types.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/sys/types.h * - * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -63,8 +63,11 @@ /* NULL is usually defined in stddef.h (which includes this file) */ #ifndef NULL - /* SDCC is sensitive to NULL pointer type conversions */ -# ifdef SDCC + /* SDCC is sensitive to NULL pointer type conversions, and C++ defines + * NULL as zero + */ + +# if defined(SDCC) || defined(__cplusplus) # define NULL (0) # else # define NULL ((void*)0) |