mirror of
https://github.com/json-c/json-c.git
synced 2026-11-08 22:50:47 +08:00
compat/strdup.h: move common compat check for strdup() to own file
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
1 parent
d4899bd4d5
commit
aaba8c1080
8 files changed
+26
-16
No files matched your search
@@ -0,0 +1,13 @@
|
||||
#ifndef __STRDUP_H_COMPAT__
|
||||
#define __STRDUP_H_COMPAT__
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if !defined(HAVE_STRDUP) && defined(_MSC_VER)
|
||||
/* MSC has the version as _strdup */
|
||||
# define strdup _strdup
|
||||
#elif !defined(HAVE_STRDUP)
|
||||
# error You do not have strdup on your system.
|
||||
#endif /* HAVE_STRDUP */
|
||||
|
||||
#endif /* __STRDUP_H_COMPAT__ */
|
||||
Reference in new issue
Block a user