Created
June 18, 2014 12:43
-
-
Save c9s/772af3186bf8929e6ffd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if _GNU_SOURCE || POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || __DARWIN_C_LEVEL >= 200809L | |
#define HAVE_STRNDUP | |
#endif | |
#if _SVID_SOURCE || _BSD_SOURCE \ | |
|| _XOPEN_SOURCE >= 500 \ | |
|| _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED \ | |
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L \ | |
|| __DARWIN_C_LEVEL >= 200809L | |
#define HAVE_STRDUP | |
#endif | |
#ifndef HAVE_STRDUP | |
char *strdup(const char *s); | |
#endif | |
#ifndef HAVE_STRNDUP | |
char *strndup(const char *s, int n); | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment