mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-07 13:49:18 +00:00
phase two of string portability stuff:
don't need ast_ prefixes on functions use individual #defines for function presence add vasprintf to portability library git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -197,14 +197,32 @@ struct ast_realloca {
|
||||
(ra)->ptr; \
|
||||
})
|
||||
|
||||
#define HAVE_VASPRINTF
|
||||
|
||||
#ifdef __linux__
|
||||
#define ast_strcasestr strcasestr
|
||||
#define ast_strndup strndup
|
||||
#define ast_strnlen strnlen
|
||||
#else /* !__linux__ */
|
||||
char *ast_strcasestr(const char *, const char *);
|
||||
char *ast_strndup(const char *, size_t);
|
||||
size_t ast_strnlen(const char *, size_t);
|
||||
#endif /* !__linux__ */
|
||||
#define HAVE_STRCASESTR
|
||||
#define HAVE_STRNDUP
|
||||
#define HAVE_STRNLEN
|
||||
#endif
|
||||
|
||||
#ifdef SOLARIS
|
||||
#undef HAVE_VASPRINTF
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASESTR
|
||||
char *strcasestr(const char *, const char *);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNDUP
|
||||
char *strndup(const char *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNLEN
|
||||
size_t strnlen(const char *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
int vasprintf(char **strp, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#endif /* _ASTERISK_STRINGS_H */
|
||||
|
Reference in New Issue
Block a user