Define NULL to be (0) for C++

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5023 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-08-12 17:49:35 +00:00
parent b7a1b00c08
commit 7e20685e1a
2 changed files with 8 additions and 3 deletions
+6 -3
View File
@@ -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)