mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 00:34:10 +08:00
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:
+6
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user