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:
Kevin P. Fleming
2005-07-15 22:06:15 +00:00
parent da1d0363ca
commit 9d8d86e19d
8 changed files with 75 additions and 40 deletions

7
cli.c
View File

@@ -47,15 +47,10 @@ void ast_cli(int fd, char *fmt, ...)
{
char *stuff;
int res = 0;
va_list ap;
va_start(ap, fmt);
#ifdef SOLARIS
stuff = (char *)malloc(10240);
vsnprintf(stuff, 10240, fmt, ap);
#else
res = vasprintf(&stuff, fmt, ap);
#endif
va_end(ap);
if (res == -1) {
ast_log(LOG_ERROR, "Out of memory\n");