aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-15 22:06:15 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-15 22:06:15 +0000
commit63a6a077da4d1e6d4ec3c48b0d3bacccdbc958f2 (patch)
tree72a1219d1b5eeaaa08f28862bb67263d906f91ce /include
parent467a58ed8f736f6233266937ee24625da783c9c2 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@6143 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/strings.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index f6902ef1b..70131cd9d 100755
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -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 */