mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
cstring: undefine macros defined in new strings.h.
This commit is contained in:
@@ -44,6 +44,19 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
|
//***************************************************************************
|
||||||
|
// Pre-processor Definitions
|
||||||
|
//***************************************************************************
|
||||||
|
|
||||||
|
// Remove macros defined in strings.h. The index() definition, in
|
||||||
|
// particular, can cause naming collision problems.
|
||||||
|
|
||||||
|
#undef bcmp
|
||||||
|
#undef bcopy
|
||||||
|
#undef bzero
|
||||||
|
#undef index
|
||||||
|
#undef rindex
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
// Namespace
|
// Namespace
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
|
|||||||
+5
-1
@@ -47,7 +47,11 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Compatibility definitions */
|
/* Compatibility definitions
|
||||||
|
*
|
||||||
|
* Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004
|
||||||
|
* Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008
|
||||||
|
*/
|
||||||
|
|
||||||
#define bcmp(b1,b2,len) memcmp(b1,b2,(size_t)len)
|
#define bcmp(b1,b2,len) memcmp(b1,b2,(size_t)len)
|
||||||
#define bcopy(b1,b2,len) (void)memmove(b2,b1,len)
|
#define bcopy(b1,b2,len) (void)memmove(b2,b1,len)
|
||||||
|
|||||||
Reference in New Issue
Block a user