You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2019/03/20 21:07:19 UTC
svn commit: r1855942 - in /apr/apr-util/branches/1.7.x: crypto/apr_crypto.c
crypto/apr_crypto_prng.c include/apr_crypto.h xml/apr_xml.c
Author: wrowe
Date: Wed Mar 20 21:07:18 2019
New Revision: 1855942
URL: http://svn.apache.org/viewvc?rev=1855942&view=rev
Log:
When moving code from the apr to the apr-util subproject, the library changes.
APR_DECLARE is exclusive to APR. APU_DECLARE is specific to apr-util.
Modified:
apr/apr-util/branches/1.7.x/crypto/apr_crypto.c
apr/apr-util/branches/1.7.x/crypto/apr_crypto_prng.c
apr/apr-util/branches/1.7.x/include/apr_crypto.h
apr/apr-util/branches/1.7.x/xml/apr_xml.c
Modified: apr/apr-util/branches/1.7.x/crypto/apr_crypto.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/crypto/apr_crypto.c?rev=1855942&r1=1855941&r2=1855942&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/crypto/apr_crypto.c (original)
+++ apr/apr-util/branches/1.7.x/crypto/apr_crypto.c Wed Mar 20 21:07:18 2019
@@ -398,7 +398,7 @@ static apr_status_t crypto_lib_cleanup(v
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_crypto_lib_version(const char *name,
+APU_DECLARE(apr_status_t) apr_crypto_lib_version(const char *name,
const char **version)
{
apr_status_t rv = APR_ENOTIMPL;
@@ -441,7 +441,7 @@ APR_DECLARE(apr_status_t) apr_crypto_lib
return rv;
}
-APR_DECLARE(apr_status_t) apr_crypto_lib_init(const char *name,
+APU_DECLARE(apr_status_t) apr_crypto_lib_init(const char *name,
const char *params,
const apu_err_t **result,
apr_pool_t *pool)
@@ -602,7 +602,7 @@ static apr_status_t crypto_lib_term(cons
return rv;
}
-APR_DECLARE(apr_status_t) apr_crypto_lib_term(const char *name)
+APU_DECLARE(apr_status_t) apr_crypto_lib_term(const char *name)
{
if (!active_libs) {
return APR_EINIT;
@@ -623,7 +623,7 @@ APR_DECLARE(apr_status_t) apr_crypto_lib
return crypto_lib_term(name);
}
-APR_DECLARE(int) apr_crypto_lib_is_active(const char *name)
+APU_DECLARE(int) apr_crypto_lib_is_active(const char *name)
{
return active_libs && apr_hash_get(active_libs, name, APR_HASH_KEY_STRING);
}
Modified: apr/apr-util/branches/1.7.x/crypto/apr_crypto_prng.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/crypto/apr_crypto_prng.c?rev=1855942&r1=1855941&r2=1855942&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/crypto/apr_crypto_prng.c (original)
+++ apr/apr-util/branches/1.7.x/crypto/apr_crypto_prng.c Wed Mar 20 21:07:18 2019
@@ -219,7 +219,7 @@ static void cprng_thread_destroy(void *c
#define cprng_ring_unlock()
#endif /* !APR_HAS_THREADS */
-APR_DECLARE(apr_status_t) apr_crypto_prng_init(apr_pool_t *pool,
+APU_DECLARE(apr_status_t) apr_crypto_prng_init(apr_pool_t *pool,
apr_size_t bufsize,
const unsigned char seed[],
int flags)
@@ -269,7 +269,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
return apr_crypto_prng_create(&cprng_global, bufsize, flags, seed, pool);
}
-APR_DECLARE(apr_status_t) apr_crypto_prng_term(void)
+APU_DECLARE(apr_status_t) apr_crypto_prng_term(void)
{
if (!cprng_global) {
return APR_EINIT;
@@ -281,7 +281,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_crypto_random_bytes(void *buf, apr_size_t len)
+APU_DECLARE(apr_status_t) apr_crypto_random_bytes(void *buf, apr_size_t len)
{
if (!cprng_global) {
return APR_EINIT;
@@ -291,7 +291,7 @@ APR_DECLARE(apr_status_t) apr_crypto_ran
}
#if APR_HAS_THREADS
-APR_DECLARE(apr_status_t) apr_crypto_random_thread_bytes(void *buf,
+APU_DECLARE(apr_status_t) apr_crypto_random_thread_bytes(void *buf,
apr_size_t len)
{
apr_status_t rv;
@@ -359,7 +359,7 @@ static apr_status_t cprng_cleanup(void *
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_crypto_prng_create(apr_crypto_prng_t **pcprng,
+APU_DECLARE(apr_status_t) apr_crypto_prng_create(apr_crypto_prng_t **pcprng,
apr_size_t bufsize, int flags,
const unsigned char seed[],
apr_pool_t *pool)
@@ -464,7 +464,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_crypto_prng_destroy(apr_crypto_prng_t *cprng)
+APU_DECLARE(apr_status_t) apr_crypto_prng_destroy(apr_crypto_prng_t *cprng)
{
if (!cprng->pool) {
return cprng_cleanup(cprng);
@@ -486,7 +486,7 @@ static apr_status_t cprng_stream_bytes(a
return rv;
}
-APR_DECLARE(apr_status_t) apr_crypto_prng_reseed(apr_crypto_prng_t *cprng,
+APU_DECLARE(apr_status_t) apr_crypto_prng_reseed(apr_crypto_prng_t *cprng,
const unsigned char seed[])
{
apr_status_t rv = APR_SUCCESS;
@@ -584,7 +584,7 @@ static apr_status_t cprng_bytes(apr_cryp
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_crypto_prng_bytes(apr_crypto_prng_t *cprng,
+APU_DECLARE(apr_status_t) apr_crypto_prng_bytes(apr_crypto_prng_t *cprng,
void *buf, apr_size_t len)
{
apr_status_t rv;
@@ -614,7 +614,7 @@ static apr_status_t cprng_newkey(apr_cry
return cprng_stream_bytes(cprng, NULL, cprng->key, CPRNG_KEY_SIZE);
}
-APR_DECLARE(apr_status_t) apr_crypto_prng_rekey(apr_crypto_prng_t *cprng)
+APU_DECLARE(apr_status_t) apr_crypto_prng_rekey(apr_crypto_prng_t *cprng)
{
apr_status_t rv;
@@ -654,7 +654,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
}
#if APR_HAS_FORK
-APR_DECLARE(apr_status_t) apr_crypto_prng_after_fork(apr_crypto_prng_t *cprng,
+APU_DECLARE(apr_status_t) apr_crypto_prng_after_fork(apr_crypto_prng_t *cprng,
int in_child)
{
apr_status_t rv;
Modified: apr/apr-util/branches/1.7.x/include/apr_crypto.h
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/include/apr_crypto.h?rev=1855942&r1=1855941&r2=1855942&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/include/apr_crypto.h (original)
+++ apr/apr-util/branches/1.7.x/include/apr_crypto.h Wed Mar 20 21:07:18 2019
@@ -504,14 +504,14 @@ typedef struct apr_crypto_digest_rec_t {
APU_DECLARE(apr_status_t) apr_crypto_init(apr_pool_t *pool);
/* TODO: doxygen */
-APR_DECLARE(apr_status_t) apr_crypto_lib_version(const char *name,
+APU_DECLARE(apr_status_t) apr_crypto_lib_version(const char *name,
const char **version);
-APR_DECLARE(apr_status_t) apr_crypto_lib_init(const char *name,
+APU_DECLARE(apr_status_t) apr_crypto_lib_init(const char *name,
const char *params,
const apu_err_t **result,
apr_pool_t *pool);
-APR_DECLARE(apr_status_t) apr_crypto_lib_term(const char *name);
-APR_DECLARE(int) apr_crypto_lib_is_active(const char *name);
+APU_DECLARE(apr_status_t) apr_crypto_lib_term(const char *name);
+APU_DECLARE(int) apr_crypto_lib_is_active(const char *name);
/**
* @brief Zero out the buffer provided when the pool is cleaned up.
@@ -1016,7 +1016,7 @@ typedef struct apr_crypto_prng_t apr_cry
* @return APR_EREINIT if called more than once,
* any system error (APR_ENOMEM, ...).
*/
-APR_DECLARE(apr_status_t) apr_crypto_prng_init(apr_pool_t *pool,
+APU_DECLARE(apr_status_t) apr_crypto_prng_init(apr_pool_t *pool,
apr_size_t bufsize,
const unsigned char seed[],
int flags);
@@ -1025,7 +1025,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
*
* @return APR_EINIT if \ref apr_crypto_prng_init() was not called.
*/
-APR_DECLARE(apr_status_t) apr_crypto_prng_term(void);
+APU_DECLARE(apr_status_t) apr_crypto_prng_term(void);
/**
* @brief Generate cryptographically secure random bytes from the global CPRNG.
@@ -1035,7 +1035,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
* @return APR_EINIT if \ref apr_crypto_prng_init() was not called.
* any system error (APR_ENOMEM, ...).
*/
-APR_DECLARE(apr_status_t) apr_crypto_random_bytes(void *buf, apr_size_t len);
+APU_DECLARE(apr_status_t) apr_crypto_random_bytes(void *buf, apr_size_t len);
#if APR_HAS_THREADS
/**
@@ -1048,7 +1048,7 @@ APR_DECLARE(apr_status_t) apr_crypto_ran
* called without \ref APR_CRYPTO_PRNG_PER_THREAD,
* any system error (APR_ENOMEM, ...).
*/
-APR_DECLARE(apr_status_t) apr_crypto_random_thread_bytes(void *buf,
+APU_DECLARE(apr_status_t) apr_crypto_random_thread_bytes(void *buf,
apr_size_t len);
#endif
@@ -1070,7 +1070,7 @@ APR_DECLARE(apr_status_t) apr_crypto_ran
* APR_ENOTIMPL if \ref APR_CRYPTO_PRNG_LOCKED with !APR_HAS_THREADS,
* any system error (APR_ENOMEM, ...).
*/
-APR_DECLARE(apr_status_t) apr_crypto_prng_create(apr_crypto_prng_t **pcprng,
+APU_DECLARE(apr_status_t) apr_crypto_prng_create(apr_crypto_prng_t **pcprng,
apr_size_t bufsize, int flags,
const unsigned char seed[],
apr_pool_t *pool);
@@ -1081,7 +1081,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
* @param cprng The CPRNG to destroy.
* @return APR_SUCCESS.
*/
-APR_DECLARE(apr_status_t) apr_crypto_prng_destroy(apr_crypto_prng_t *cprng);
+APU_DECLARE(apr_status_t) apr_crypto_prng_destroy(apr_crypto_prng_t *cprng);
/**
* @brief Rekey a CPRNG.
@@ -1089,7 +1089,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
* @param cprng The CPRNG, or NULL for all the created CPRNGs (but per-thread).
* @return Any system error (APR_ENOMEM, ...).
*/
-APR_DECLARE(apr_status_t) apr_crypto_prng_rekey(apr_crypto_prng_t *cprng);
+APU_DECLARE(apr_status_t) apr_crypto_prng_rekey(apr_crypto_prng_t *cprng);
/**
* @brief Reseed a CPRNG.
@@ -1099,7 +1099,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
* or NULL for the seed to be gathered from system entropy.
* @return Any system error (APR_ENOMEM, ...).
*/
-APR_DECLARE(apr_status_t) apr_crypto_prng_reseed(apr_crypto_prng_t *cprng,
+APU_DECLARE(apr_status_t) apr_crypto_prng_reseed(apr_crypto_prng_t *cprng,
const unsigned char seed[]);
#if APR_HAS_FORK
@@ -1113,7 +1113,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
*
* @return Any system error (APR_ENOMEM, ...).
*/
-APR_DECLARE(apr_status_t) apr_crypto_prng_after_fork(apr_crypto_prng_t *cprng,
+APU_DECLARE(apr_status_t) apr_crypto_prng_after_fork(apr_crypto_prng_t *cprng,
int in_child);
#endif
@@ -1125,7 +1125,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prn
* @param len The destination length
* @return Any system error (APR_ENOMEM, ...).
*/
-APR_DECLARE(apr_status_t) apr_crypto_prng_bytes(apr_crypto_prng_t *cprng,
+APU_DECLARE(apr_status_t) apr_crypto_prng_bytes(apr_crypto_prng_t *cprng,
void *buf, apr_size_t len);
#endif /* APU_HAVE_CRYPTO_PRNG */
Modified: apr/apr-util/branches/1.7.x/xml/apr_xml.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/xml/apr_xml.c?rev=1855942&r1=1855941&r2=1855942&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/xml/apr_xml.c (original)
+++ apr/apr-util/branches/1.7.x/xml/apr_xml.c Wed Mar 20 21:07:18 2019
@@ -334,19 +334,19 @@ static void cdata_handler(void *userdata
apr_text_append(parser->p, hdr, s);
}
-APR_DECLARE(apr_xml_parser *) apr_xml_parser_create(apr_pool_t *pool)
+APU_DECLARE(apr_xml_parser *) apr_xml_parser_create(apr_pool_t *pool)
{
return apr_xml_parser_create_internal(pool, &start_handler, &end_handler, &cdata_handler);
}
-APR_DECLARE(apr_status_t) apr_xml_parser_feed(apr_xml_parser *parser,
+APU_DECLARE(apr_status_t) apr_xml_parser_feed(apr_xml_parser *parser,
const char *data,
apr_size_t len)
{
return parser->impl->Parse(parser, data, len, 0 /* is_final */);
}
-APR_DECLARE(apr_status_t) apr_xml_parser_done(apr_xml_parser *parser,
+APU_DECLARE(apr_status_t) apr_xml_parser_done(apr_xml_parser *parser,
apr_xml_doc **pdoc)
{
char end;
@@ -363,7 +363,7 @@ APR_DECLARE(apr_status_t) apr_xml_parser
return APR_SUCCESS;
}
-APR_DECLARE(char *) apr_xml_parser_geterror(apr_xml_parser *parser,
+APU_DECLARE(char *) apr_xml_parser_geterror(apr_xml_parser *parser,
char *errbuf,
apr_size_t errbufsize)
{
@@ -405,7 +405,7 @@ APR_DECLARE(char *) apr_xml_parser_geter
return errbuf;
}
-APR_DECLARE(apr_status_t) apr_xml_parse_file(apr_pool_t *p,
+APU_DECLARE(apr_status_t) apr_xml_parse_file(apr_pool_t *p,
apr_xml_parser **parser,
apr_xml_doc **ppdoc,
apr_file_t *xmlfd,
@@ -443,7 +443,7 @@ APR_DECLARE(apr_status_t) apr_xml_parse_
return rv;
}
-APR_DECLARE(void) apr_text_append(apr_pool_t * p, apr_text_header *hdr,
+APU_DECLARE(void) apr_text_append(apr_pool_t * p, apr_text_header *hdr,
const char *text)
{
apr_text *t = apr_palloc(p, sizeof(*t));
@@ -477,7 +477,7 @@ APR_DECLARE(void) apr_text_append(apr_po
** quotes is typically set to true for XML strings that will occur within
** double quotes -- attribute values.
*/
-APR_DECLARE(const char *) apr_xml_quote_string(apr_pool_t *p, const char *s,
+APU_DECLARE(const char *) apr_xml_quote_string(apr_pool_t *p, const char *s,
int quotes)
{
const char *scan;
@@ -804,7 +804,7 @@ static char *write_elem(char *s, const a
return s;
}
-APR_DECLARE(void) apr_xml_quote_elem(apr_pool_t *p, apr_xml_elem *elem)
+APU_DECLARE(void) apr_xml_quote_elem(apr_pool_t *p, apr_xml_elem *elem)
{
apr_text *scan_txt;
apr_xml_attr *scan_attr;
@@ -838,7 +838,7 @@ APR_DECLARE(void) apr_xml_quote_elem(apr
}
/* convert an element to a text string */
-APR_DECLARE(void) apr_xml_to_text(apr_pool_t * p, const apr_xml_elem *elem,
+APU_DECLARE(void) apr_xml_to_text(apr_pool_t * p, const apr_xml_elem *elem,
int style, apr_array_header_t *namespaces,
int *ns_map, const char **pbuf,
apr_size_t *psize)
@@ -855,7 +855,7 @@ APR_DECLARE(void) apr_xml_to_text(apr_po
*psize = size;
}
-APR_DECLARE(const char *) apr_xml_empty_elem(apr_pool_t * p,
+APU_DECLARE(const char *) apr_xml_empty_elem(apr_pool_t * p,
const apr_xml_elem *elem)
{
if (elem->ns == APR_XML_NS_NONE) {
@@ -870,7 +870,7 @@ APR_DECLARE(const char *) apr_xml_empty_
}
/* return the URI's (existing) index, or insert it and return a new index */
-APR_DECLARE(int) apr_xml_insert_uri(apr_array_header_t *uri_array,
+APU_DECLARE(int) apr_xml_insert_uri(apr_array_header_t *uri_array,
const char *uri)
{
int i;
@@ -946,7 +946,7 @@ static apr_status_t apr_xml_parser_conve
}
/* convert the whole document to EBCDIC */
-APR_DECLARE(apr_status_t) apr_xml_parser_convert_doc(apr_pool_t *pool,
+APU_DECLARE(apr_status_t) apr_xml_parser_convert_doc(apr_pool_t *pool,
apr_xml_doc *pdoc,
apr_xlate_t *convset)
{