[asterisk-commits] branch group/autoconf_and_menuselect r18600 - in
/team/group/autoconf_and_men...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Apr 9 09:50:31 MST 2006
Author: russell
Date: Sun Apr 9 11:50:29 2006
New Revision: 18600
URL: http://svn.digium.com/view/asterisk?rev=18600&view=rev
Log:
instead of conditionally adding support for strsep, setenv, and unsetenv based
on being on Solaris, let autoconf check for the presence of these functions and
include them based on that information
Modified:
team/group/autoconf_and_menuselect/configure.ac
team/group/autoconf_and_menuselect/cryptostub.c
team/group/autoconf_and_menuselect/db1-ast/hash/hash.c
team/group/autoconf_and_menuselect/include/asterisk/compat.h
team/group/autoconf_and_menuselect/strcompat.c
Modified: team/group/autoconf_and_menuselect/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/configure.ac?rev=18600&r1=18599&r2=18600&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/configure.ac (original)
+++ team/group/autoconf_and_menuselect/configure.ac Sun Apr 9 11:50:29 2006
@@ -382,7 +382,7 @@
AC_FUNC_STRNLEN
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strrchr strspn strstr strtol utime strtoq strcasestr asprintf vasprintf])
+AC_CHECK_FUNCS([atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strrchr strsep strspn strstr strtol unsetenv utime strtoq strcasestr asprintf vasprintf])
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
AC_OUTPUT
Modified: team/group/autoconf_and_menuselect/cryptostub.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/cryptostub.c?rev=18600&r1=18599&r2=18600&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/cryptostub.c (original)
+++ team/group/autoconf_and_menuselect/cryptostub.c Sun Apr 9 11:50:29 2006
@@ -25,6 +25,8 @@
#include <unistd.h>
#include <stdlib.h>
+
+#include "asterisk.h"
#include "asterisk/crypto.h"
#include "asterisk/logger.h"
Modified: team/group/autoconf_and_menuselect/db1-ast/hash/hash.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/db1-ast/hash/hash.c?rev=18600&r1=18599&r2=18600&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/db1-ast/hash/hash.c (original)
+++ team/group/autoconf_and_menuselect/db1-ast/hash/hash.c Sun Apr 9 11:50:29 2006
@@ -50,6 +50,8 @@
#ifdef DEBUG
#include <assert.h>
#endif
+
+#include "../include/asterisk.h"
#include "../include/asterisk/compat.h"
Modified: team/group/autoconf_and_menuselect/include/asterisk/compat.h
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/include/asterisk/compat.h?rev=18600&r1=18599&r2=18600&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/include/asterisk/compat.h (original)
+++ team/group/autoconf_and_menuselect/include/asterisk/compat.h Sun Apr 9 11:50:29 2006
@@ -15,6 +15,18 @@
#ifndef _COMPAT_H
#define _COMPAT_H
+
+#ifndef HAVE_STRSEP
+char* strsep(char** str, const char* delims);
+#endif
+
+#ifndef HAVE_SETENV
+int setenv(const char *name, const char *value, int overwrite);
+#endif
+
+#ifndef HAVE_UNSETENV
+int unsetenv(const char *name);
+#endif
#ifdef SOLARIS
#define __BEGIN_DECLS
@@ -56,9 +68,6 @@
typedef unsigned int u_int32_t;
#endif
-char* strsep(char** str, const char* delims);
-int setenv(const char *name, const char *value, int overwrite);
-int unsetenv(const char *name);
#endif /* SOLARIS */
#ifdef __CYGWIN__
Modified: team/group/autoconf_and_menuselect/strcompat.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/strcompat.c?rev=18600&r1=18599&r2=18600&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/strcompat.c (original)
+++ team/group/autoconf_and_menuselect/strcompat.c Sun Apr 9 11:50:29 2006
@@ -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 @@
*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 @@
return putenv(buf);
}
+#endif
+#ifndef HAVE_UNSETENV
int unsetenv(const char *name)
{
return setenv(name, "", 0);
}
-
+#endif
More information about the asterisk-commits
mailing list