mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
strcompat.c
11
strcompat.c
@@ -3,8 +3,11 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#include "asterisk/compat.h"
|
||||
|
||||
#ifndef HAVE_STRSEP
|
||||
char* strsep(char** str, const char* delims)
|
||||
{
|
||||
char* token;
|
||||
@@ -27,9 +30,9 @@ char* strsep(char** str, const char* delims)
|
||||
*str=NULL;
|
||||
return token;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifndef HAVE_SETENV
|
||||
int setenv(const char *name, const char *value, int overwrite)
|
||||
{
|
||||
unsigned char *buf;
|
||||
@@ -46,9 +49,11 @@ int setenv(const char *name, const char *value, int overwrite)
|
||||
|
||||
return putenv(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UNSETENV
|
||||
int unsetenv(const char *name)
|
||||
{
|
||||
return setenv(name, "", 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user