[Asterisk-cvs] asterisk/include/asterisk strings.h,1.4,1.5

kpfleming at lists.digium.com kpfleming at lists.digium.com
Fri Jul 15 17:58:27 CDT 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv12870/include/asterisk

Modified Files:
	strings.h 
Log Message:
phase two of string portability stuff:
  don't need ast_ prefixes on functions
  use individual #defines for function presence
  add vasprintf to portability library



Index: strings.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/strings.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- strings.h	15 Jul 2005 00:39:01 -0000	1.4
+++ strings.h	15 Jul 2005 22:06:15 -0000	1.5
@@ -197,14 +197,32 @@
 		(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 */




More information about the svn-commits mailing list