mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Many Solaris fixes - this moves some of the stuff from utils.c to strcompat.c
Every OS uses strcompat now - this was done on purpose. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -114,6 +114,9 @@
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define to 1 if you have the `getloadavg' function. */
|
||||
#undef HAVE_GETLOADAVG
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
|
@@ -18,19 +18,48 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifndef HAVE_STRSEP
|
||||
char* strsep(char** str, const char* delims);
|
||||
#if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)
|
||||
int asprintf(char **str, const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETLOADAVG
|
||||
int getloadavg(double *list, int nelem);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SETENV
|
||||
int setenv(const char *name, const char *value, int overwrite);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASESTR
|
||||
char *strcasestr(const char *, const char *);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRNDUP) && !defined(__AST_DEBUG_MALLOC)
|
||||
char *strndup(const char *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNLEN
|
||||
size_t strnlen(const char *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRSEP
|
||||
char* strsep(char** str, const char* delims);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRTOQ
|
||||
uint64_t strtoq(const char *nptr, char **endptr, int base);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UNSETENV
|
||||
int unsetenv(const char *name);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_VASPRINTF) && !defined(__AST_DEBUG_MALLOC)
|
||||
int vasprintf(char **strp, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#ifdef SOLARIS
|
||||
#define __BEGIN_DECLS
|
||||
#define __END_DECLS
|
||||
|
@@ -256,28 +256,4 @@ struct ast_realloca {
|
||||
(ra)->ptr; \
|
||||
})
|
||||
|
||||
#ifndef HAVE_STRCASESTR
|
||||
char *strcasestr(const char *, const char *);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRNDUP) && !defined(__AST_DEBUG_MALLOC)
|
||||
char *strndup(const char *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNLEN
|
||||
size_t strnlen(const char *, size_t);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_VASPRINTF) && !defined(__AST_DEBUG_MALLOC)
|
||||
int vasprintf(char **strp, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)
|
||||
int asprintf(char **str, const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRTOQ
|
||||
uint64_t strtoq(const char *nptr, char **endptr, int base);
|
||||
#endif
|
||||
|
||||
#endif /* _ASTERISK_STRINGS_H */
|
||||
|
@@ -264,10 +264,6 @@ int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*st
|
||||
*/
|
||||
char *ast_process_quotes_and_slashes(char *start, char find, char replace_with);
|
||||
|
||||
#ifndef HAVE_GETLOADAVG
|
||||
int getloadavg(double *list, int nelem);
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
#define ast_random random
|
||||
#else
|
||||
|
Reference in New Issue
Block a user