mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 14:58:34 +00:00
[core] rename lib apr symbols to fspr
This commit is contained in:
1 parent
3c7e8ff989
commit
5c2726f413
354 files changed
+11614
-11614
No files matched your search
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "apr.h"
|
||||
#include "apr_private.h"
|
||||
#include "apr_strings.h"
|
||||
#include "apr_portable.h"
|
||||
#include "fspr.h"
|
||||
#include "fspr_private.h"
|
||||
#include "fspr_strings.h"
|
||||
#include "fspr_portable.h"
|
||||
|
||||
#ifdef HAVE_LANGINFO_H
|
||||
#include <langinfo.h>
|
||||
@@ -33,7 +33,7 @@
|
||||
* unpacked.
|
||||
*/
|
||||
|
||||
APR_DECLARE(const char*) apr_os_default_encoding (apr_pool_t *pool)
|
||||
APR_DECLARE(const char*) fspr_os_default_encoding (fspr_pool_t *pool)
|
||||
{
|
||||
#ifdef __MVS__
|
||||
# ifdef __CODESET__
|
||||
@@ -63,7 +63,7 @@ APR_DECLARE(const char*) apr_os_default_encoding (apr_pool_t *pool)
|
||||
}
|
||||
|
||||
|
||||
APR_DECLARE(const char*) apr_os_locale_encoding (apr_pool_t *pool)
|
||||
APR_DECLARE(const char*) fspr_os_locale_encoding (fspr_pool_t *pool)
|
||||
{
|
||||
#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
|
||||
const char *charset;
|
||||
@@ -72,12 +72,12 @@ APR_DECLARE(const char*) apr_os_locale_encoding (apr_pool_t *pool)
|
||||
if (charset && *charset) {
|
||||
#ifdef _OSD_POSIX /* Bug workaround - delete as soon as fixed in OSD_POSIX */
|
||||
/* Some versions of OSD_POSIX return nl_langinfo(CODESET)="^[nN]" */
|
||||
/* Ignore the bogus information and use apr_os_default_encoding() */
|
||||
/* Ignore the bogus information and use fspr_os_default_encoding() */
|
||||
if (charset[0] != '^')
|
||||
#endif
|
||||
return charset;
|
||||
}
|
||||
#endif
|
||||
|
||||
return apr_os_default_encoding(pool);
|
||||
return fspr_os_default_encoding(pool);
|
||||
}
|
||||
+12
-12
@@ -15,10 +15,10 @@
|
||||
*/
|
||||
|
||||
#define APR_WANT_STRFUNC
|
||||
#include "apr_want.h"
|
||||
#include "apr.h"
|
||||
#include "apr_private.h"
|
||||
#include "apr_env.h"
|
||||
#include "fspr_want.h"
|
||||
#include "fspr.h"
|
||||
#include "fspr_private.h"
|
||||
#include "fspr_env.h"
|
||||
|
||||
#if APR_HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
@@ -27,9 +27,9 @@
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_env_get(char **value,
|
||||
APR_DECLARE(fspr_status_t) fspr_env_get(char **value,
|
||||
const char *envvar,
|
||||
apr_pool_t *pool)
|
||||
fspr_pool_t *pool)
|
||||
{
|
||||
#ifdef HAVE_GETENV
|
||||
|
||||
@@ -45,9 +45,9 @@ APR_DECLARE(apr_status_t) apr_env_get(char **value,
|
||||
}
|
||||
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_env_set(const char *envvar,
|
||||
APR_DECLARE(fspr_status_t) fspr_env_set(const char *envvar,
|
||||
const char *value,
|
||||
apr_pool_t *pool)
|
||||
fspr_pool_t *pool)
|
||||
{
|
||||
#if defined(HAVE_SETENV)
|
||||
|
||||
@@ -57,9 +57,9 @@ APR_DECLARE(apr_status_t) apr_env_set(const char *envvar,
|
||||
|
||||
#elif defined(HAVE_PUTENV)
|
||||
|
||||
apr_size_t elen = strlen(envvar);
|
||||
apr_size_t vlen = strlen(value);
|
||||
char *env = apr_palloc(pool, elen + vlen + 2);
|
||||
fspr_size_t elen = strlen(envvar);
|
||||
fspr_size_t vlen = strlen(value);
|
||||
char *env = fspr_palloc(pool, elen + vlen + 2);
|
||||
char *p = env + elen;
|
||||
|
||||
memcpy(env, envvar, elen);
|
||||
@@ -77,7 +77,7 @@ APR_DECLARE(apr_status_t) apr_env_set(const char *envvar,
|
||||
}
|
||||
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_env_delete(const char *envvar, apr_pool_t *pool)
|
||||
APR_DECLARE(fspr_status_t) fspr_env_delete(const char *envvar, fspr_pool_t *pool)
|
||||
{
|
||||
#ifdef HAVE_UNSETENV
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "apr_arch_misc.h"
|
||||
#include "apr_strings.h"
|
||||
#include "apr_lib.h"
|
||||
#include "apr_dso.h"
|
||||
#include "fspr_arch_misc.h"
|
||||
#include "fspr_strings.h"
|
||||
#include "fspr_lib.h"
|
||||
#include "fspr_dso.h"
|
||||
|
||||
#if APR_HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
@@ -27,16 +27,16 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* stuffbuffer - like apr_cpystrn() but returns the address of the
|
||||
* stuffbuffer - like fspr_cpystrn() but returns the address of the
|
||||
* dest buffer instead of the address of the terminating '\0'
|
||||
*/
|
||||
static char *stuffbuffer(char *buf, apr_size_t bufsize, const char *s)
|
||||
static char *stuffbuffer(char *buf, fspr_size_t bufsize, const char *s)
|
||||
{
|
||||
apr_cpystrn(buf,s,bufsize);
|
||||
fspr_cpystrn(buf,s,bufsize);
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *apr_error_string(apr_status_t statcode)
|
||||
static char *fspr_error_string(fspr_status_t statcode)
|
||||
{
|
||||
switch (statcode) {
|
||||
case APR_ENOPOOL:
|
||||
@@ -141,9 +141,9 @@ static char *apr_error_string(apr_status_t statcode)
|
||||
#ifdef OS2
|
||||
#include <ctype.h>
|
||||
|
||||
int apr_canonical_error(apr_status_t err);
|
||||
int fspr_canonical_error(fspr_status_t err);
|
||||
|
||||
static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
|
||||
static char *fspr_os_strerror(char* buf, fspr_size_t bufsize, int err)
|
||||
{
|
||||
char result[200];
|
||||
unsigned char message[HUGE_STRING_LEN];
|
||||
@@ -153,7 +153,7 @@ static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
|
||||
|
||||
if (err >= 10000 && err < 12000) { /* socket error codes */
|
||||
return stuffbuffer(buf, bufsize,
|
||||
strerror(apr_canonical_error(err+APR_OS_START_SYSERR)));
|
||||
strerror(fspr_canonical_error(err+APR_OS_START_SYSERR)));
|
||||
}
|
||||
else if (DosGetMessage(NULL, 0, message, HUGE_STRING_LEN, err,
|
||||
"OSO001.MSG", &len) == 0) {
|
||||
@@ -166,9 +166,9 @@ static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
|
||||
|
||||
for (c=0; c<len; c++) {
|
||||
/* skip multiple whitespace */
|
||||
while (apr_isspace(message[c]) && apr_isspace(message[c+1]))
|
||||
while (fspr_isspace(message[c]) && fspr_isspace(message[c+1]))
|
||||
c++;
|
||||
*(pos++) = apr_isspace(message[c]) ? ' ' : message[c];
|
||||
*(pos++) = fspr_isspace(message[c]) ? ' ' : message[c];
|
||||
}
|
||||
|
||||
*pos = 0;
|
||||
@@ -186,7 +186,7 @@ static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
|
||||
#elif defined(WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
|
||||
|
||||
static const struct {
|
||||
apr_status_t code;
|
||||
fspr_status_t code;
|
||||
const char *msg;
|
||||
} gaErrorList[] = {
|
||||
WSAEINTR, "Interrupted system call",
|
||||
@@ -242,9 +242,9 @@ static const struct {
|
||||
};
|
||||
|
||||
|
||||
static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode)
|
||||
static char *fspr_os_strerror(char *buf, fspr_size_t bufsize, fspr_status_t errcode)
|
||||
{
|
||||
apr_size_t len=0, i;
|
||||
fspr_size_t len=0, i;
|
||||
|
||||
#ifndef NETWARE
|
||||
len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
|
||||
@@ -260,7 +260,7 @@ static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode
|
||||
if (!len) {
|
||||
for (i = 0; gaErrorList[i].msg; ++i) {
|
||||
if (gaErrorList[i].code == errcode) {
|
||||
apr_cpystrn(buf, gaErrorList[i].msg, bufsize);
|
||||
fspr_cpystrn(buf, gaErrorList[i].msg, bufsize);
|
||||
len = strlen(buf);
|
||||
break;
|
||||
}
|
||||
@@ -284,17 +284,17 @@ static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode
|
||||
else {
|
||||
/* Windows didn't provide us with a message. Even stuff like * WSAECONNREFUSED won't get a message.
|
||||
*/
|
||||
apr_snprintf(buf, bufsize, "Unrecognized Win32 error code %d", errcode);
|
||||
fspr_snprintf(buf, bufsize, "Unrecognized Win32 error code %d", errcode);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
#else
|
||||
/* On Unix, apr_os_strerror() handles error codes from the resolver
|
||||
/* On Unix, fspr_os_strerror() handles error codes from the resolver
|
||||
* (h_errno).
|
||||
*/
|
||||
static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
|
||||
static char *fspr_os_strerror(char* buf, fspr_size_t bufsize, int err)
|
||||
{
|
||||
#ifdef HAVE_HSTRERROR
|
||||
return stuffbuffer(buf, bufsize, hstrerror(err));
|
||||
@@ -327,8 +327,8 @@ static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
|
||||
|
||||
#if defined(HAVE_STRERROR_R) && defined(STRERROR_R_RC_INT) && !defined(BEOS)
|
||||
/* AIX and Tru64 style */
|
||||
static char *native_strerror(apr_status_t statcode, char *buf,
|
||||
apr_size_t bufsize)
|
||||
static char *native_strerror(fspr_status_t statcode, char *buf,
|
||||
fspr_size_t bufsize)
|
||||
{
|
||||
if (strerror_r(statcode, buf, bufsize) < 0) {
|
||||
return stuffbuffer(buf, bufsize,
|
||||
@@ -346,11 +346,11 @@ static char *native_strerror(apr_status_t statcode, char *buf,
|
||||
* we add a suitable prototype here.
|
||||
*/
|
||||
#if defined(BEOS)
|
||||
const char *strerror_r(apr_status_t, char *, apr_size_t);
|
||||
const char *strerror_r(fspr_status_t, char *, fspr_size_t);
|
||||
#endif
|
||||
|
||||
static char *native_strerror(apr_status_t statcode, char *buf,
|
||||
apr_size_t bufsize)
|
||||
static char *native_strerror(fspr_status_t statcode, char *buf,
|
||||
fspr_size_t bufsize)
|
||||
{
|
||||
const char *msg;
|
||||
|
||||
@@ -367,8 +367,8 @@ static char *native_strerror(apr_status_t statcode, char *buf,
|
||||
/* plain old strerror();
|
||||
* thread-safe on some platforms (e.g., Solaris, OS/390)
|
||||
*/
|
||||
static char *native_strerror(apr_status_t statcode, char *buf,
|
||||
apr_size_t bufsize)
|
||||
static char *native_strerror(fspr_status_t statcode, char *buf,
|
||||
fspr_size_t bufsize)
|
||||
{
|
||||
#ifdef _WIN32_WCE
|
||||
static char err[32];
|
||||
@@ -386,14 +386,14 @@ static char *native_strerror(apr_status_t statcode, char *buf,
|
||||
}
|
||||
#endif
|
||||
|
||||
APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
|
||||
apr_size_t bufsize)
|
||||
APR_DECLARE(char *) fspr_strerror(fspr_status_t statcode, char *buf,
|
||||
fspr_size_t bufsize)
|
||||
{
|
||||
if (statcode < APR_OS_START_ERROR) {
|
||||
return native_strerror(statcode, buf, bufsize);
|
||||
}
|
||||
else if (statcode < APR_OS_START_USERERR) {
|
||||
return stuffbuffer(buf, bufsize, apr_error_string(statcode));
|
||||
return stuffbuffer(buf, bufsize, fspr_error_string(statcode));
|
||||
}
|
||||
else if (statcode < APR_OS_START_EAIERR) {
|
||||
return stuffbuffer(buf, bufsize, "APR does not understand this error code");
|
||||
@@ -410,7 +410,7 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
return apr_os_strerror(buf, bufsize, statcode - APR_OS_START_SYSERR);
|
||||
return fspr_os_strerror(buf, bufsize, statcode - APR_OS_START_SYSERR);
|
||||
}
|
||||
}
|
||||
|
||||
+20
-20
@@ -31,21 +31,21 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "apr_arch_misc.h"
|
||||
#include "apr_strings.h"
|
||||
#include "apr_lib.h"
|
||||
#include "fspr_arch_misc.h"
|
||||
#include "fspr_strings.h"
|
||||
#include "fspr_lib.h"
|
||||
|
||||
#define EMSG ""
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont,
|
||||
APR_DECLARE(fspr_status_t) fspr_getopt_init(fspr_getopt_t **os, fspr_pool_t *cont,
|
||||
int argc, const char *const *argv)
|
||||
{
|
||||
void *argv_buff;
|
||||
|
||||
*os = apr_palloc(cont, sizeof(apr_getopt_t));
|
||||
*os = fspr_palloc(cont, sizeof(fspr_getopt_t));
|
||||
(*os)->cont = cont;
|
||||
(*os)->reset = 0;
|
||||
(*os)->errfn = (apr_getopt_err_fn_t*)(fprintf);
|
||||
(*os)->errfn = (fspr_getopt_err_fn_t*)(fprintf);
|
||||
(*os)->errarg = (void*)(stderr);
|
||||
|
||||
(*os)->place = EMSG;
|
||||
@@ -55,7 +55,7 @@ APR_DECLARE(apr_status_t) apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont,
|
||||
that's the primary purpose of this function. But people might
|
||||
want to use this function with arrays other than the main argv,
|
||||
and we shouldn't touch the caller's data. So we copy. */
|
||||
argv_buff = apr_palloc(cont, (argc + 1) * sizeof(const char *));
|
||||
argv_buff = fspr_palloc(cont, (argc + 1) * sizeof(const char *));
|
||||
memcpy(argv_buff, argv, argc * sizeof(const char *));
|
||||
(*os)->argv = argv_buff;
|
||||
(*os)->argv[argc] = NULL;
|
||||
@@ -68,7 +68,7 @@ APR_DECLARE(apr_status_t) apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont,
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts,
|
||||
APR_DECLARE(fspr_status_t) fspr_getopt(fspr_getopt_t *os, const char *opts,
|
||||
char *optch, const char **optarg)
|
||||
{
|
||||
const char *oli; /* option letter list index */
|
||||
@@ -101,7 +101,7 @@ APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts,
|
||||
++os->ind;
|
||||
if (os->errfn && *opts != ':') {
|
||||
(os->errfn)(os->errarg, "%s: illegal option -- %c\n",
|
||||
apr_filepath_name_get(*os->argv), os->opt);
|
||||
fspr_filepath_name_get(*os->argv), os->opt);
|
||||
}
|
||||
*optch = os->opt;
|
||||
return (APR_BADCH);
|
||||
@@ -123,7 +123,7 @@ APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts,
|
||||
if (os->errfn) {
|
||||
(os->errfn)(os->errarg,
|
||||
"%s: option requires an argument -- %c\n",
|
||||
apr_filepath_name_get(*os->argv), os->opt);
|
||||
fspr_filepath_name_get(*os->argv), os->opt);
|
||||
}
|
||||
*optch = os->opt;
|
||||
return (APR_BADCH);
|
||||
@@ -155,7 +155,7 @@ static void reverse(const char **argv, int start, int len)
|
||||
* non-option arguments, os->skip_end is where we stopped, and os->ind
|
||||
* is where we are now.
|
||||
*/
|
||||
static void permute(apr_getopt_t *os)
|
||||
static void permute(fspr_getopt_t *os)
|
||||
{
|
||||
int len1 = os->skip_end - os->skip_start;
|
||||
int len2 = os->ind - os->skip_end;
|
||||
@@ -178,27 +178,27 @@ static void permute(apr_getopt_t *os)
|
||||
}
|
||||
|
||||
/* Helper function to print out an error involving a long option */
|
||||
static apr_status_t serr(apr_getopt_t *os, const char *err, const char *str,
|
||||
apr_status_t status)
|
||||
static fspr_status_t serr(fspr_getopt_t *os, const char *err, const char *str,
|
||||
fspr_status_t status)
|
||||
{
|
||||
if (os->errfn)
|
||||
(os->errfn)(os->errarg, "%s: %s: %s\n",
|
||||
apr_filepath_name_get(*os->argv), err, str);
|
||||
fspr_filepath_name_get(*os->argv), err, str);
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Helper function to print out an error involving a short option */
|
||||
static apr_status_t cerr(apr_getopt_t *os, const char *err, int ch,
|
||||
apr_status_t status)
|
||||
static fspr_status_t cerr(fspr_getopt_t *os, const char *err, int ch,
|
||||
fspr_status_t status)
|
||||
{
|
||||
if (os->errfn)
|
||||
(os->errfn)(os->errarg, "%s: %s: %c\n",
|
||||
apr_filepath_name_get(*os->argv), err, ch);
|
||||
fspr_filepath_name_get(*os->argv), err, ch);
|
||||
return status;
|
||||
}
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,
|
||||
const apr_getopt_option_t *opts,
|
||||
APR_DECLARE(fspr_status_t) fspr_getopt_long(fspr_getopt_t *os,
|
||||
const fspr_getopt_option_t *opts,
|
||||
int *optch, const char **optarg)
|
||||
{
|
||||
const char *p;
|
||||
@@ -232,7 +232,7 @@ APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,
|
||||
p = os->argv[os->ind++] + 1;
|
||||
if (*p == '-' && p[1] != '\0') { /* Long option */
|
||||
/* Search for the long option name in the caller's table. */
|
||||
apr_size_t len = 0;
|
||||
fspr_size_t len = 0;
|
||||
|
||||
p++;
|
||||
for (i = 0; ; i++) {
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "apr.h"
|
||||
#include "apr_arch_misc.h"
|
||||
#include "apr_arch_threadproc.h"
|
||||
#include "apr_arch_file_io.h"
|
||||
#include "fspr.h"
|
||||
#include "fspr_arch_misc.h"
|
||||
#include "fspr_arch_threadproc.h"
|
||||
#include "fspr_arch_file_io.h"
|
||||
|
||||
#if APR_HAS_OTHER_CHILD
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
#include <sys/socket.h> /* for fd_set definition! */
|
||||
#endif
|
||||
|
||||
static apr_other_child_rec_t *other_children = NULL;
|
||||
static fspr_other_child_rec_t *other_children = NULL;
|
||||
|
||||
static apr_status_t other_child_cleanup(void *data)
|
||||
static fspr_status_t other_child_cleanup(void *data)
|
||||
{
|
||||
apr_other_child_rec_t **pocr, *nocr;
|
||||
fspr_other_child_rec_t **pocr, *nocr;
|
||||
|
||||
for (pocr = &other_children; *pocr; pocr = &(*pocr)->next) {
|
||||
if ((*pocr)->data == data) {
|
||||
@@ -52,24 +52,24 @@ static apr_status_t other_child_cleanup(void *data)
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
APR_DECLARE(void) apr_proc_other_child_register(apr_proc_t *proc,
|
||||
APR_DECLARE(void) fspr_proc_other_child_register(fspr_proc_t *proc,
|
||||
void (*maintenance) (int reason, void *, int status),
|
||||
void *data, apr_file_t *write_fd, apr_pool_t *p)
|
||||
void *data, fspr_file_t *write_fd, fspr_pool_t *p)
|
||||
{
|
||||
apr_other_child_rec_t *ocr;
|
||||
fspr_other_child_rec_t *ocr;
|
||||
|
||||
ocr = apr_palloc(p, sizeof(*ocr));
|
||||
ocr = fspr_palloc(p, sizeof(*ocr));
|
||||
ocr->p = p;
|
||||
ocr->proc = proc;
|
||||
ocr->maintenance = maintenance;
|
||||
ocr->data = data;
|
||||
if (write_fd == NULL) {
|
||||
ocr->write_fd = (apr_os_file_t) -1;
|
||||
ocr->write_fd = (fspr_os_file_t) -1;
|
||||
}
|
||||
else {
|
||||
#ifdef WIN32
|
||||
/* This should either go away as part of eliminating apr_proc_probe_writable_fds
|
||||
* or write_fd should point to an apr_file_t
|
||||
/* This should either go away as part of eliminating fspr_proc_probe_writable_fds
|
||||
* or write_fd should point to an fspr_file_t
|
||||
*/
|
||||
ocr->write_fd = write_fd->filehand;
|
||||
#else
|
||||
@@ -79,13 +79,13 @@ APR_DECLARE(void) apr_proc_other_child_register(apr_proc_t *proc,
|
||||
}
|
||||
ocr->next = other_children;
|
||||
other_children = ocr;
|
||||
apr_pool_cleanup_register(p, ocr->data, other_child_cleanup,
|
||||
apr_pool_cleanup_null);
|
||||
fspr_pool_cleanup_register(p, ocr->data, other_child_cleanup,
|
||||
fspr_pool_cleanup_null);
|
||||
}
|
||||
|
||||
APR_DECLARE(void) apr_proc_other_child_unregister(void *data)
|
||||
APR_DECLARE(void) fspr_proc_other_child_unregister(void *data)
|
||||
{
|
||||
apr_other_child_rec_t *cur;
|
||||
fspr_other_child_rec_t *cur;
|
||||
|
||||
cur = other_children;
|
||||
while (cur) {
|
||||
@@ -96,15 +96,15 @@ APR_DECLARE(void) apr_proc_other_child_unregister(void *data)
|
||||
}
|
||||
|
||||
/* segfault if this function called with invalid parm */
|
||||
if (cur) apr_pool_cleanup_kill(cur->p, cur->data, other_child_cleanup);
|
||||
if (cur) fspr_pool_cleanup_kill(cur->p, cur->data, other_child_cleanup);
|
||||
other_child_cleanup(data);
|
||||
}
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_proc_other_child_alert(apr_proc_t *proc,
|
||||
APR_DECLARE(fspr_status_t) fspr_proc_other_child_alert(fspr_proc_t *proc,
|
||||
int reason,
|
||||
int status)
|
||||
{
|
||||
apr_other_child_rec_t *ocr, *nocr;
|
||||
fspr_other_child_rec_t *ocr, *nocr;
|
||||
|
||||
for (ocr = other_children; ocr; ocr = nocr) {
|
||||
nocr = ocr->next;
|
||||
@@ -118,7 +118,7 @@ APR_DECLARE(apr_status_t) apr_proc_other_child_alert(apr_proc_t *proc,
|
||||
return APR_EPROC_UNKNOWN;
|
||||
}
|
||||
|
||||
APR_DECLARE(void) apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,
|
||||
APR_DECLARE(void) fspr_proc_other_child_refresh(fspr_other_child_rec_t *ocr,
|
||||
int reason)
|
||||
{
|
||||
/* Todo:
|
||||
@@ -131,7 +131,7 @@ APR_DECLARE(void) apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,
|
||||
return;
|
||||
|
||||
if (!ocr->proc->hproc) {
|
||||
/* Already mopped up, perhaps we apr_proc_kill'ed it,
|
||||
/* Already mopped up, perhaps we fspr_proc_kill'ed it,
|
||||
* they should have already unregistered!
|
||||
*/
|
||||
ocr->proc = NULL;
|
||||
@@ -176,44 +176,44 @@ APR_DECLARE(void) apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,
|
||||
#endif
|
||||
}
|
||||
|
||||
APR_DECLARE(void) apr_proc_other_child_refresh_all(int reason)
|
||||
APR_DECLARE(void) fspr_proc_other_child_refresh_all(int reason)
|
||||
{
|
||||
apr_other_child_rec_t *ocr, *next_ocr;
|
||||
fspr_other_child_rec_t *ocr, *next_ocr;
|
||||
|
||||
for (ocr = other_children; ocr; ocr = next_ocr) {
|
||||
next_ocr = ocr->next;
|
||||
apr_proc_other_child_refresh(ocr, reason);
|
||||
fspr_proc_other_child_refresh(ocr, reason);
|
||||
}
|
||||
}
|
||||
|
||||
#else /* !APR_HAS_OTHER_CHILD */
|
||||
|
||||
APR_DECLARE(void) apr_proc_other_child_register(apr_proc_t *proc,
|
||||
APR_DECLARE(void) fspr_proc_other_child_register(fspr_proc_t *proc,
|
||||
void (*maintenance) (int reason, void *, int status),
|
||||
void *data, apr_file_t *write_fd, apr_pool_t *p)
|
||||
void *data, fspr_file_t *write_fd, fspr_pool_t *p)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
APR_DECLARE(void) apr_proc_other_child_unregister(void *data)
|
||||
APR_DECLARE(void) fspr_proc_other_child_unregister(void *data)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_proc_other_child_alert(apr_proc_t *proc,
|
||||
APR_DECLARE(fspr_status_t) fspr_proc_other_child_alert(fspr_proc_t *proc,
|
||||
int reason,
|
||||
int status)
|
||||
{
|
||||
return APR_ENOTIMPL;
|
||||
}
|
||||
|
||||
APR_DECLARE(void) apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,
|
||||
APR_DECLARE(void) fspr_proc_other_child_refresh(fspr_other_child_rec_t *ocr,
|
||||
int reason)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
APR_DECLARE(void) apr_proc_other_child_refresh_all(int reason)
|
||||
APR_DECLARE(void) fspr_proc_other_child_refresh_all(int reason)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+11
-11
@@ -15,10 +15,10 @@
|
||||
*/
|
||||
|
||||
#define APR_WANT_MEMFUNC
|
||||
#include "apr_want.h"
|
||||
#include "apr_general.h"
|
||||
#include "fspr_want.h"
|
||||
#include "fspr_general.h"
|
||||
|
||||
#include "apr_arch_misc.h"
|
||||
#include "fspr_arch_misc.h"
|
||||
#include <sys/stat.h>
|
||||
#if APR_HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
#if defined(HAVE_UUID_CREATE)
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
|
||||
APR_DECLARE(fspr_status_t) fspr_os_uuid_get(unsigned char *uuid_data)
|
||||
{
|
||||
uint32_t rv;
|
||||
uuid_t g;
|
||||
@@ -68,7 +68,7 @@ APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
|
||||
|
||||
#elif defined(HAVE_UUID_GENERATE)
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
|
||||
APR_DECLARE(fspr_status_t) fspr_os_uuid_get(unsigned char *uuid_data)
|
||||
{
|
||||
uuid_t g;
|
||||
|
||||
@@ -84,8 +84,8 @@ APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
|
||||
|
||||
#if APR_HAS_RANDOM
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
|
||||
apr_size_t length)
|
||||
APR_DECLARE(fspr_status_t) fspr_generate_random_bytes(unsigned char *buf,
|
||||
fspr_size_t length)
|
||||
{
|
||||
#ifdef DEV_RANDOM
|
||||
|
||||
@@ -95,7 +95,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
|
||||
* gives EOF, so reading 'length' bytes may require opening the
|
||||
* device several times. */
|
||||
do {
|
||||
apr_ssize_t rc;
|
||||
fspr_ssize_t rc;
|
||||
|
||||
if (fd == -1)
|
||||
if ((fd = open(DEV_RANDOM, O_RDONLY)) == -1)
|
||||
@@ -145,8 +145,8 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
|
||||
|
||||
int egd_socket, egd_path_len, rv, bad_errno;
|
||||
struct sockaddr_un addr;
|
||||
apr_socklen_t egd_addr_len;
|
||||
apr_size_t resp_expected;
|
||||
fspr_socklen_t egd_addr_len;
|
||||
fspr_size_t resp_expected;
|
||||
unsigned char req[2], resp[255];
|
||||
unsigned char *curbuf = buf;
|
||||
|
||||
@@ -178,7 +178,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
|
||||
|
||||
/* EGD can only return 255 bytes of data at a time. Silly. */
|
||||
while (length > 0) {
|
||||
apr_ssize_t srv;
|
||||
fspr_ssize_t srv;
|
||||
req[0] = 2; /* We'll block for now. */
|
||||
req[1] = length > 255 ? 255: length;
|
||||
|
||||
|
||||
+25
-25
@@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "apr.h"
|
||||
#include "apr_general.h"
|
||||
#include "apr_pools.h"
|
||||
#include "apr_signal.h"
|
||||
#include "apr_atomic.h"
|
||||
#include "fspr.h"
|
||||
#include "fspr_general.h"
|
||||
#include "fspr_pools.h"
|
||||
#include "fspr_signal.h"
|
||||
#include "fspr_atomic.h"
|
||||
|
||||
#include "apr_arch_proc_mutex.h" /* for apr_proc_mutex_unix_setup_lock() */
|
||||
#include "apr_arch_internal_time.h"
|
||||
#include "fspr_arch_proc_mutex.h" /* for fspr_proc_mutex_unix_setup_lock() */
|
||||
#include "fspr_arch_internal_time.h"
|
||||
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
|
||||
APR_DECLARE(fspr_status_t) fspr_app_initialize(int *argc,
|
||||
const char * const * *argv,
|
||||
const char * const * *env)
|
||||
{
|
||||
@@ -33,57 +33,57 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
|
||||
* control manager into the process, and it's required to fix the char*
|
||||
* data passed in from win32 unicode into utf-8, win32's apr internal fmt.
|
||||
*/
|
||||
return apr_initialize();
|
||||
return fspr_initialize();
|
||||
}
|
||||
|
||||
static int initialized = 0;
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_initialize(void)
|
||||
APR_DECLARE(fspr_status_t) fspr_initialize(void)
|
||||
{
|
||||
apr_pool_t *pool;
|
||||
apr_status_t status;
|
||||
fspr_pool_t *pool;
|
||||
fspr_status_t status;
|
||||
|
||||
if (initialized++) {
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
#if !defined(BEOS) && !defined(OS2)
|
||||
apr_proc_mutex_unix_setup_lock();
|
||||
apr_unix_setup_time();
|
||||
fspr_proc_mutex_unix_setup_lock();
|
||||
fspr_unix_setup_time();
|
||||
#endif
|
||||
|
||||
if ((status = apr_pool_initialize()) != APR_SUCCESS)
|
||||
if ((status = fspr_pool_initialize()) != APR_SUCCESS)
|
||||
return status;
|
||||
|
||||
if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
|
||||
if (fspr_pool_create(&pool, NULL) != APR_SUCCESS) {
|
||||
return APR_ENOPOOL;
|
||||
}
|
||||
|
||||
apr_pool_tag(pool, "apr_initialize");
|
||||
fspr_pool_tag(pool, "fspr_initialize");
|
||||
|
||||
/* apr_atomic_init() used to be called from here aswell.
|
||||
/* fspr_atomic_init() used to be called from here aswell.
|
||||
* Pools rely on mutexes though, which can be backed by
|
||||
* atomics. Due to this circular dependency
|
||||
* apr_pool_initialize() is taking care of calling
|
||||
* apr_atomic_init() at the correct time.
|
||||
* fspr_pool_initialize() is taking care of calling
|
||||
* fspr_atomic_init() at the correct time.
|
||||
*/
|
||||
|
||||
apr_signal_init(pool);
|
||||
fspr_signal_init(pool);
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
APR_DECLARE_NONSTD(void) apr_terminate(void)
|
||||
APR_DECLARE_NONSTD(void) fspr_terminate(void)
|
||||
{
|
||||
initialized--;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
apr_pool_terminate();
|
||||
fspr_pool_terminate();
|
||||
|
||||
}
|
||||
|
||||
APR_DECLARE(void) apr_terminate2(void)
|
||||
APR_DECLARE(void) fspr_terminate2(void)
|
||||
{
|
||||
apr_terminate();
|
||||
fspr_terminate();
|
||||
}
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "apr_version.h"
|
||||
#include "apr_general.h" /* for APR_STRINGIFY */
|
||||
#include "fspr_version.h"
|
||||
#include "fspr_general.h" /* for APR_STRINGIFY */
|
||||
|
||||
APR_DECLARE(void) apr_version(apr_version_t *pvsn)
|
||||
APR_DECLARE(void) fspr_version(fspr_version_t *pvsn)
|
||||
{
|
||||
pvsn->major = APR_MAJOR_VERSION;
|
||||
pvsn->minor = APR_MINOR_VERSION;
|
||||
@@ -29,7 +29,7 @@ APR_DECLARE(void) apr_version(apr_version_t *pvsn)
|
||||
#endif
|
||||
}
|
||||
|
||||
APR_DECLARE(const char *) apr_version_string(void)
|
||||
APR_DECLARE(const char *) fspr_version_string(void)
|
||||
{
|
||||
return APR_VERSION_STRING;
|
||||
}
|
||||
Reference in new issue
Block a user