The patch below allows Subversion to be compiled with g++ provided the
the option -fpermissive is used. The advantage of doing this is that we
get extra warnings, in particular we get enum type checking (in C any
enum can be passed where an enum is expected). This isn't a conversion
to C++, Subversion is still C, it's simply an option to allow another
compiler.
There are two major obstacles to building Subversion with a C++
compiler: Subversion uses C++ keywords (new, delete, private, this,
namespace) as identifiers, and C allows the implicit conversion of
pointers to and from void*.
Using "g++ -fpermissive" solves the void* issue but does mean that g++
is probably the only C++ compiler that can be used (clang++ doesn't
work).
The patch involves:
- renaming identifiers to avoid C++ keywords
- moving enums declared inside structures outside the structure
- one cast to resolve strchr overload
- one static zero initialisation extended to cope with const members
- one initialisation converted to assignment to allow goto
- one variable made extern
- one struct renamed to avoid the POSIX name key_t
None of the changes affect Subversion's public API.
Renaming is the largest part of the change. One ugly rename is that
Apache's mod_dav.h uses 'namespace' so I added "#define namespace ns"
before including the file and then I did not need to explicitly rename
the identifier in those source files. I could have used this #define
technique in other files but chose to explicitly rename instead.
What do people think? Good idea? Too ugly for the limited benefit?
Log/patch below:
* subversion/include/svn_ra_svn.h
(enum svn_ra_svn_item_kind_t): New, replaces enum nested in
struct svn_ra_svn_item_t.
* subversion/libsvn_client/merge.c
(conflict_report_dup): Rename variable to avoid C++ keyword.
* subversion/libsvn_client/mergeinfo.c
(svn_client__merge_path_dup): Rename variable to avoid C++ keyword.
* subversion/libsvn_client/patch.c
(write_symlink): Rename variable to avoid C++ keyword.
* subversion/libsvn_diff/diff_file.c
(struct file_info): New, replaces struct nested in
struct svn_diff__file_baton_t.
* subversion/libsvn_fs_base/key-gen.h
* subversion/libsvn_fs_base/key-gen.c
(svn_fs_base__next_key): Rename parameter to avoid C++ keyword.
* subversion/libsvn_fs_fs/id.c
(serialize_id_private, deserialize_id_private): Rename variable to
avoid C++ keyword.
* subversion/libsvn_fs_fs/key-gen.h
* subversion/libsvn_fs_fs/key-gen.c
(svn_fs_fs__next_key): Rename parameter to avoid C++ keyword.
* subversion/libsvn_ra_serf/commit.c
(enum walker_filter_t): New, replaces enum nested in struct walker_baton_t.
* subversion/libsvn_ra_serf/ra_serf.h
(struct svn_ra_serf__dav_props_t, struct ns_t,
struct svn_ra_serf__xml_state_t): Rename elements to avoid C++ keywords.
* subversion/libsvn_ra_serf/property.c
(propfind_opened, create_propfind_body, create_propfind_body): Use
renamed element.
* subversion/libsvn_ra_serf/replay.c
(push_state, start_replay, end_replay, cdata_replay): Use renamed element.
* subversion/libsvn_ra_serf/serf.c
(get_dirent_props): Use renamed element.
* subversion/libsvn_ra_serf/update.c
(push_state, start_report, end_report, cdata_report): Use renamed element.
* subversion/libsvn_ra_serf/util.c
(start_error, end_error, start_207, end_207): Use renamed element.
* subversion/libsvn_ra_serf/xml.c
(define_namespaces, svn_ra_serf__expand_ns, svn_ra_serf__xml_push_state,
svn_ra_serf__xml_cb_start, svn_ra_serf__xml_cb_end,
svn_ra_serf__xml_cb_cdata): Use renamed element.
* subversion/libsvn_repos/delta.c
(delete): Rename to...
(delete_entry): ...this.
(add_file_or_dir, svn_repos_dir_delta2, delta_dirs): Use new name.
* subversion/libsvn_subr/date.c
(template_match): Rename parameter to avoid C++ keyword.
* subversion/libsvn_subr/sorts.c
(bsearch_lower_bound): Rename variable to avoid C++ keyword.
* subversion/libsvn_subr/temp_serializer.c
(svn_temp_serializer__push): Rename variable to avoid C++ keyword.
* subversion/libsvn_subr/utf.c
(fuzzy_escape): Rename variable to avoid C++ keyword.
* subversion/libsvn_wc/wc_db_wcroot.c
(svn_wc__db_wcroot_parse_local_abspath): Separate initialisation to allow
goto.
* subversion/mod_authz_svn/mod_authz_svn.c
* subversion/mod_dav_svn/activity.c
* subversion/mod_dav_svn/deadprops.c
* subversion/mod_dav_svn/liveprops.c
* subversion/mod_dav_svn/lock.c
* subversion/mod_dav_svn/merge.c
* subversion/mod_dav_svn/mirror.c
* subversion/mod_dav_svn/mod_dav_svn.c
* subversion/mod_dav_svn/posts/create_txn.c
* subversion/mod_dav_svn/reports/dated-rev.c
* subversion/mod_dav_svn/reports/deleted-rev.c
* subversion/mod_dav_svn/reports/file-revs.c
* subversion/mod_dav_svn/reports/get-location-segments.c
* subversion/mod_dav_svn/reports/get-locations.c
* subversion/mod_dav_svn/reports/get-locks.c
* subversion/mod_dav_svn/reports/inherited-props.c
* subversion/mod_dav_svn/reports/log.c
* subversion/mod_dav_svn/reports/mergeinfo.c
* subversion/mod_dav_svn/reports/replay.c
* subversion/mod_dav_svn/reports/update.c
* subversion/mod_dav_svn/repos.c
* subversion/mod_dav_svn/version.c
* subversion/mod_dav_svn/util.c
Add #define to avoid C++ keyword.
* subversion/mod_dav_svn/dav_svn.h
(dav_svn__new_error_tag): Rename parameter to avoid C++ keyword.
* subversion/svnmucc/svnmucc.c
(enum operation_kind): New, replaces nested enum in struct operation.
* subversion/svnserve/cyrus_auth.c
(cyrus_auth_request): Cast to resolve overload.
* subversion/tests/libsvn_fs/fs-test.c
* subversion/tests/libsvn_fs_base/fs-base-test.c
(delete): Rename to...
(delete_nodes): ...this.
(func_list): Use new name.
* subversion/tests/libsvn_subr/hashdump-test.c
(test3): Rename variable to avoid C++ keyword.
* subversion/tests/libsvn_subr/io-test.c
(test_file_definition): Explicit zero initialisation for all const members.
* tools/server-side/mod_dontdothat/mod_dontdothat.c
Add #define to avoid C++ keyword, make global extern to avoid redefinition.
* tools/server-side/svn-rep-sharing-stats.c
(struct key_t): Rename to..
(struct svn_key_t): ...this to avoid POSIX type.
Index: subversion/include/svn_ra_svn.h
===================================================================
--- subversion/include/svn_ra_svn.h (revision 1455448)
+++ subversion/include/svn_ra_svn.h (working copy)
@@ -142,15 +142,16 @@ typedef struct svn_ra_svn_cmd_entry_t
} svn_ra_svn_cmd_entry_t;
/** Memory representation of an on-the-wire data item. */
+/** Variant indicator. */
+enum svn_ra_svn_item_kind_t {
+ SVN_RA_SVN_NUMBER,
+ SVN_RA_SVN_STRING,
+ SVN_RA_SVN_WORD,
+ SVN_RA_SVN_LIST
+};
typedef struct svn_ra_svn_item_t
{
- /** Variant indicator. */
- enum {
- SVN_RA_SVN_NUMBER,
- SVN_RA_SVN_STRING,
- SVN_RA_SVN_WORD,
- SVN_RA_SVN_LIST
- } kind;
+ enum svn_ra_svn_item_kind_t kind;
/** Variant data. */
union {
apr_uint64_t number;
Index: subversion/libsvn_client/merge.c
===================================================================
--- subversion/libsvn_client/merge.c (revision 1455448)
+++ subversion/libsvn_client/merge.c (working copy)
@@ -5352,11 +5352,11 @@ static conflict_report_t *
conflict_report_dup(const conflict_report_t *report,
apr_pool_t *result_pool)
{
- conflict_report_t *new = apr_pmemdup(result_pool, report, sizeof(*new));
+ conflict_report_t *dup = apr_pmemdup(result_pool, report, sizeof(*dup));
- new->target_abspath = apr_pstrdup(result_pool, report->target_abspath);
- new->r = svn_merge_range_dup(report->r, result_pool);
- return new;
+ dup->target_abspath = apr_pstrdup(result_pool, report->target_abspath);
+ dup->r = svn_merge_range_dup(report->r, result_pool);
+ return dup;
}
/* Create and return an error structure appropriate for the unmerged
Index: subversion/libsvn_client/mergeinfo.c
===================================================================
--- subversion/libsvn_client/mergeinfo.c (revision 1455448)
+++ subversion/libsvn_client/mergeinfo.c (working copy)
@@ -54,19 +54,19 @@ svn_client__merge_path_t *
svn_client__merge_path_dup(const svn_client__merge_path_t *old,
apr_pool_t *pool)
{
- svn_client__merge_path_t *new = apr_pmemdup(pool, old, sizeof(*old));
+ svn_client__merge_path_t *dup = apr_pmemdup(pool, old, sizeof(*old));
- new->abspath = apr_pstrdup(pool, old->abspath);
- if (new->remaining_ranges)
- new->remaining_ranges = svn_rangelist_dup(old->remaining_ranges, pool);
- if (new->pre_merge_mergeinfo)
- new->pre_merge_mergeinfo = svn_mergeinfo_dup(old->pre_merge_mergeinfo,
+ dup->abspath = apr_pstrdup(pool, old->abspath);
+ if (dup->remaining_ranges)
+ dup->remaining_ranges = svn_rangelist_dup(old->remaining_ranges, pool);
+ if (dup->pre_merge_mergeinfo)
+ dup->pre_merge_mergeinfo = svn_mergeinfo_dup(old->pre_merge_mergeinfo,
pool);
- if (new->implicit_mergeinfo)
- new->implicit_mergeinfo = svn_mergeinfo_dup(old->implicit_mergeinfo,
+ if (dup->implicit_mergeinfo)
+ dup->implicit_mergeinfo = svn_mergeinfo_dup(old->implicit_mergeinfo,
pool);
- return new;
+ return dup;
}
svn_client__merge_path_t *
Index: subversion/libsvn_client/patch.c
===================================================================
--- subversion/libsvn_client/patch.c (revision 1455448)
+++ subversion/libsvn_client/patch.c (working copy)
@@ -932,8 +932,8 @@ write_symlink(void *baton, const char *buf, apr_si
static const char *
choose_target_filename(const svn_patch_t *patch)
{
- apr_size_t old;
- apr_size_t new;
+ apr_size_t n_old;
+ apr_size_t n_new;
if (strcmp(patch->old_filename, "/dev/null") == 0)
return patch->new_filename;
@@ -940,22 +940,22 @@ choose_target_filename(const svn_patch_t *patch)
if (strcmp(patch->new_filename, "/dev/null") == 0)
return patch->old_filename;
- old = svn_path_component_count(patch->old_filename);
- new = svn_path_component_count(patch->new_filename);
+ n_old = svn_path_component_count(patch->old_filename);
+ n_new = svn_path_component_count(patch->new_filename);
- if (old == new)
+ if (n_old == n_new)
{
- old = strlen(svn_dirent_basename(patch->old_filename, NULL));
- new = strlen(svn_dirent_basename(patch->new_filename, NULL));
+ n_old = strlen(svn_dirent_basename(patch->old_filename, NULL));
+ n_new = strlen(svn_dirent_basename(patch->new_filename, NULL));
- if (old == new)
+ if (n_old == n_new)
{
- old = strlen(patch->old_filename);
- new = strlen(patch->new_filename);
+ n_old = strlen(patch->old_filename);
+ n_new = strlen(patch->new_filename);
}
}
- return (old < new) ? patch->old_filename : patch->new_filename;
+ return (n_old < n_new) ? patch->old_filename : patch->new_filename;
}
/* Attempt to initialize a *PATCH_TARGET structure for a target file
Index: subversion/libsvn_diff/diff_file.c
===================================================================
--- subversion/libsvn_diff/diff_file.c (revision 1455448)
+++ subversion/libsvn_diff/diff_file.c (working copy)
@@ -67,30 +67,32 @@ typedef struct svn_diff__file_token_t
} svn_diff__file_token_t;
-typedef struct svn_diff__file_baton_t
-{
- const svn_diff_file_options_t *options;
+struct file_info {
+ const char *path; /* path to this file, absolute or relative to CWD */
- struct file_info {
- const char *path; /* path to this file, absolute or relative to CWD */
+ /* All the following fields are active while this datasource is open */
+ apr_file_t *file; /* handle of this file */
+ apr_off_t size; /* total raw size in bytes of this file */
- /* All the following fields are active while this datasource is open */
- apr_file_t *file; /* handle of this file */
- apr_off_t size; /* total raw size in bytes of this file */
+ /* The current chunk: CHUNK_SIZE bytes except for the last chunk. */
+ int chunk; /* the current chunk number, zero-based */
+ char *buffer; /* a buffer containing the current chunk */
+ char *curp; /* current position in the current chunk */
+ char *endp; /* next memory address after the current chunk */
- /* The current chunk: CHUNK_SIZE bytes except for the last chunk. */
- int chunk; /* the current chunk number, zero-based */
- char *buffer; /* a buffer containing the current chunk */
- char *curp; /* current position in the current chunk */
- char *endp; /* next memory address after the current chunk */
+ svn_diff__normalize_state_t normalize_state;
- svn_diff__normalize_state_t normalize_state;
+ /* Where the identical suffix starts in this datasource */
+ int suffix_start_chunk;
+ apr_off_t suffix_offset_in_chunk;
+};
- /* Where the identical suffix starts in this datasource */
- int suffix_start_chunk;
- apr_off_t suffix_offset_in_chunk;
- } files[4];
+typedef struct svn_diff__file_baton_t
+{
+ const svn_diff_file_options_t *options;
+ struct file_info files[4];
+
/* List of free tokens that may be reused. */
svn_diff__file_token_t *tokens;
Index: subversion/libsvn_fs_base/key-gen.c
===================================================================
--- subversion/libsvn_fs_base/key-gen.c (revision 1455448)
+++ subversion/libsvn_fs_base/key-gen.c (working copy)
@@ -36,7 +36,7 @@
void
-svn_fs_base__next_key(const char *this, apr_size_t *len, char *next)
+svn_fs_base__next_key(const char *this_key, apr_size_t *len, char *next)
{
apr_size_t olen = *len; /* remember the first length */
int i = olen - 1; /* initial index; we work backwards */
@@ -46,7 +46,7 @@ void
incrementing the number, after all. */
/* Leading zeros are not allowed, except for the string "0". */
- if ((*len > 1) && (this[0] == '0'))
+ if ((*len > 1) && (this_key[0] == '0'))
{
*len = 0;
return;
@@ -54,7 +54,7 @@ void
for (i = (olen - 1); i >= 0; i--)
{
- c = this[i];
+ c = this_key[i];
/* Validate as we go. */
if (! (((c >= '0') && (c <= '9')) || ((c >= 'a') && (c <= 'z'))))
Index: subversion/libsvn_fs_base/key-gen.h
===================================================================
--- subversion/libsvn_fs_base/key-gen.h (revision 1455448)
+++ subversion/libsvn_fs_base/key-gen.h (working copy)
@@ -59,7 +59,7 @@ extern "C" {
/* Generate the next key after a given alphanumeric key.
*
- * The first *LEN bytes of THIS are an ascii representation of a
+ * The first *LEN bytes of THIS_KEY are an ascii representation of a
* number in base 36: digits 0-9 have their usual values, and a-z have
* values 10-35.
*
@@ -70,12 +70,12 @@ extern "C" {
* terminator. In other words, the outgoing *LEN will be either equal
* to the incoming, or to the incoming + 1.
*
- * If THIS contains anything other than digits and lower-case
+ * If THIS_KEY contains anything other than digits and lower-case
* alphabetic characters, or if it starts with `0' but is not the
* string "0", then *LEN is set to zero and the effect on NEXT
* is undefined.
*/
-void svn_fs_base__next_key(const char *this, apr_size_t *len, char *next);
+void svn_fs_base__next_key(const char *this_key, apr_size_t *len, char *next);
/* Compare two strings A and B as base-36 alphanumeric keys.
Index: subversion/libsvn_fs_fs/id.c
===================================================================
--- subversion/libsvn_fs_fs/id.c (revision 1455448)
+++ subversion/libsvn_fs_fs/id.c (working copy)
@@ -327,17 +327,17 @@ static void
serialize_id_private(svn_temp_serializer__context_t *context,
const id_private_t * const *pvt)
{
- const id_private_t *private = *pvt;
+ const id_private_t *privat = *pvt;
/* serialize the pvt data struct itself */
svn_temp_serializer__push(context,
(const void * const *)pvt,
- sizeof(*private));
+ sizeof(*privat));
/* append the referenced strings */
- svn_temp_serializer__add_string(context, &private->node_id);
- svn_temp_serializer__add_string(context, &private->copy_id);
- svn_temp_serializer__add_string(context, &private->txn_id);
+ svn_temp_serializer__add_string(context, &privat->node_id);
+ svn_temp_serializer__add_string(context, &privat->copy_id);
+ svn_temp_serializer__add_string(context, &privat->txn_id);
/* return to caller's nesting level */
svn_temp_serializer__pop(context);
@@ -372,14 +372,14 @@ static void
deserialize_id_private(void *buffer, id_private_t **pvt)
{
/* fixup the reference to the only sub-structure */
- id_private_t *private;
+ id_private_t *privat;
svn_temp_deserializer__resolve(buffer, (void**)pvt);
/* fixup the sub-structure itself */
- private = *pvt;
- svn_temp_deserializer__resolve(private, (void**)&private->node_id);
- svn_temp_deserializer__resolve(private, (void**)&private->copy_id);
- svn_temp_deserializer__resolve(private, (void**)&private->txn_id);
+ privat = *pvt;
+ svn_temp_deserializer__resolve(privat, (void**)&privat->node_id);
+ svn_temp_deserializer__resolve(privat, (void**)&privat->copy_id);
+ svn_temp_deserializer__resolve(privat, (void**)&privat->txn_id);
}
/* Deserialize an ID inside the BUFFER.
Index: subversion/libsvn_fs_fs/key-gen.c
===================================================================
--- subversion/libsvn_fs_fs/key-gen.c (revision 1455448)
+++ subversion/libsvn_fs_fs/key-gen.c (working copy)
@@ -77,7 +77,7 @@ svn_fs_fs__add_keys(const char *key1, const char *
void
-svn_fs_fs__next_key(const char *this, apr_size_t *len, char *next)
+svn_fs_fs__next_key(const char *this_key, apr_size_t *len, char *next)
{
apr_ssize_t i;
apr_size_t olen = *len; /* remember the first length */
@@ -87,7 +87,7 @@ void
incrementing the number, after all. */
/* Leading zeros are not allowed, except for the string "0". */
- if ((*len > 1) && (this[0] == '0'))
+ if ((*len > 1) && (this_key[0] == '0'))
{
*len = 0;
return;
@@ -95,7 +95,7 @@ void
for (i = (olen - 1); i >= 0; i--)
{
- c = this[i];
+ c = this_key[i];
/* Validate as we go. */
if (! (((c >= '0') && (c <= '9')) || ((c >= 'a') && (c <= 'z'))))
Index: subversion/libsvn_fs_fs/key-gen.h
===================================================================
--- subversion/libsvn_fs_fs/key-gen.h (revision 1455448)
+++ subversion/libsvn_fs_fs/key-gen.h (working copy)
@@ -54,7 +54,7 @@ extern "C" {
/* Generate the next key after a given alphanumeric key.
*
- * The first *LEN bytes of THIS are an ascii representation of a
+ * The first *LEN bytes of THIS_KEY are an ascii representation of a
* number in base 36: digits 0-9 have their usual values, and a-z have
* values 10-35.
*
@@ -65,12 +65,12 @@ extern "C" {
* terminator. In other words, the outgoing *LEN will be either equal
* to the incoming, or to the incoming + 1.
*
- * If THIS contains anything other than digits and lower-case
+ * If THIS_KEY contains anything other than digits and lower-case
* alphabetic characters, or if it starts with `0' but is not the
* string "0", then *LEN is set to zero and the effect on NEXT
* is undefined.
*/
-void svn_fs_fs__next_key(const char *this, apr_size_t *len, char *next);
+void svn_fs_fs__next_key(const char *this_key, apr_size_t *len, char *next);
/* Compare two strings A and B as base-36 alphanumeric keys.
Index: subversion/libsvn_ra_serf/commit.c
===================================================================
--- subversion/libsvn_ra_serf/commit.c (revision 1455448)
+++ subversion/libsvn_ra_serf/commit.c (working copy)
@@ -607,6 +607,11 @@ get_encoding_and_cdata(const char **encoding_p,
return SVN_NO_ERROR;
}
+enum walker_filter_t {
+ filter_all_props,
+ filter_props_with_old_value,
+ filter_props_without_old_value
+};
typedef struct walker_baton_t {
serf_bucket_t *body_bkt;
apr_pool_t *body_pool;
@@ -618,11 +623,7 @@ typedef struct walker_baton_t {
/* Hack, since change_rev_prop(old_value_p != NULL, value = NULL) uses D:set
rather than D:remove... (see notes/http-and-webdav/webdav-protocol) */
- enum {
- filter_all_props,
- filter_props_with_old_value,
- filter_props_without_old_value
- } filter;
+ enum walker_filter_t filter;
/* Is the property being deleted? */
svn_boolean_t deleting;
Index: subversion/libsvn_ra_serf/property.c
===================================================================
--- subversion/libsvn_ra_serf/property.c (revision 1455448)
+++ subversion/libsvn_ra_serf/property.c (working copy)
@@ -188,7 +188,7 @@ propfind_opened(svn_ra_serf__xml_estate_t *xes,
if (entered_state == PROPVAL)
{
- svn_ra_serf__xml_note(xes, PROPVAL, "ns", tag->namespace);
+ svn_ra_serf__xml_note(xes, PROPVAL, "ns", tag->ns);
svn_ra_serf__xml_note(xes, PROPVAL, "name", tag->name);
}
else if (entered_state == PROPSTAT)
@@ -495,7 +495,7 @@ create_propfind_body(serf_bucket_t **bkt,
body_bkt = serf_bucket_aggregate_create(alloc);
prop = ctx->find_props;
- while (prop && prop->namespace)
+ while (prop && prop->ns)
{
/* special case the allprop case. */
if (strcmp(prop->name, "allprop") == 0)
@@ -515,7 +515,7 @@ create_propfind_body(serf_bucket_t **bkt,
alloc);
serf_bucket_aggregate_append(body_bkt, tmp);
- tmp = SERF_BUCKET_SIMPLE_STRING(prop->namespace, alloc);
+ tmp = SERF_BUCKET_SIMPLE_STRING(prop->ns, alloc);
serf_bucket_aggregate_append(body_bkt, tmp);
tmp = SERF_BUCKET_SIMPLE_STRING_LEN("\"/>", sizeof("\"/>")-1,
Index: subversion/libsvn_ra_serf/ra_serf.h
===================================================================
--- subversion/libsvn_ra_serf/ra_serf.h (revision 1455448)
+++ subversion/libsvn_ra_serf/ra_serf.h (working copy)
@@ -262,7 +262,7 @@ struct svn_ra_serf__session_t {
*/
typedef struct svn_ra_serf__dav_props_t {
/* Element namespace */
- const char *namespace;
+ const char *ns;
/* Element name */
const char *name;
} svn_ra_serf__dav_props_t;
@@ -272,7 +272,7 @@ typedef struct svn_ra_serf__dav_props_t {
*/
typedef struct ns_t {
/* The assigned name. */
- const char *namespace;
+ const char *ns;
/* The full URL for this namespace. */
const char *url;
/* The next namespace in our list. */
@@ -520,7 +520,7 @@ typedef struct svn_ra_serf__xml_state_t {
int current_state;
/* Private pointer set by the parsing code. */
- void *private;
+ void *privat;
/* Allocations should be made in this pool to match the lifetime of the
* state.
Index: subversion/libsvn_ra_serf/replay.c
===================================================================
--- subversion/libsvn_ra_serf/replay.c (revision 1455448)
+++ subversion/libsvn_ra_serf/replay.c (working copy)
@@ -151,11 +151,11 @@ push_state(svn_ra_serf__xml_parser_t *parser,
info = apr_palloc(replay_ctx->dst_rev_pool, sizeof(*info));
info->pool = replay_ctx->dst_rev_pool;
- info->parent = parser->state->private;
+ info->parent = parser->state->privat;
info->baton = NULL;
info->stream = NULL;
- parser->state->private = info;
+ parser->state->privat = info;
}
else if (state == CHANGE_PROP)
{
@@ -164,13 +164,13 @@ push_state(svn_ra_serf__xml_parser_t *parser,
info = apr_pcalloc(replay_ctx->dst_rev_pool, sizeof(*info));
info->pool = replay_ctx->dst_rev_pool;
- info->parent = parser->state->private;
+ info->parent = parser->state->privat;
info->prop_value = svn_stringbuf_create_empty(info->pool);
- parser->state->private = info;
+ parser->state->privat = info;
}
- return parser->state->private;
+ return parser->state->privat;
}
static svn_error_t *
@@ -329,7 +329,7 @@ start_replay(svn_ra_serf__xml_parser_t *parser,
else if ((state == OPEN_DIR || state == ADD_DIR) &&
strcmp(name.name, "close-directory") == 0)
{
- replay_info_t *info = parser->state->private;
+ replay_info_t *info = parser->state->privat;
SVN_ERR(ctx->editor->close_directory(info->baton, scratch_pool));
@@ -418,7 +418,7 @@ start_replay(svn_ra_serf__xml_parser_t *parser,
else if ((state == OPEN_FILE || state == ADD_FILE) &&
strcmp(name.name, "close-file") == 0)
{
- replay_info_t *info = parser->state->private;
+ replay_info_t *info = parser->state->privat;
const char *checksum;
checksum = svn_xml_get_attr_value("checksum", attrs);
@@ -514,7 +514,7 @@ end_replay(svn_ra_serf__xml_parser_t *parser,
else if ((state == APPLY_TEXTDELTA) &&
strcmp(name.name, "apply-textdelta") == 0)
{
- replay_info_t *info = parser->state->private;
+ replay_info_t *info = parser->state->privat;
SVN_ERR(svn_stream_close(info->stream));
svn_ra_serf__xml_pop_state(parser);
}
@@ -522,7 +522,7 @@ end_replay(svn_ra_serf__xml_parser_t *parser,
(strcmp(name.name, "change-file-prop") == 0 ||
strcmp(name.name, "change-dir-prop") == 0))
{
- prop_info_t *info = parser->state->private;
+ prop_info_t *info = parser->state->privat;
const svn_string_t *prop_val;
if (info->del_prop)
@@ -567,7 +567,7 @@ cdata_replay(svn_ra_serf__xml_parser_t *parser,
if (state == APPLY_TEXTDELTA)
{
- replay_info_t *info = parser->state->private;
+ replay_info_t *info = parser->state->privat;
apr_size_t written;
written = len;
@@ -580,7 +580,7 @@ cdata_replay(svn_ra_serf__xml_parser_t *parser,
}
else if (state == CHANGE_PROP)
{
- prop_info_t *info = parser->state->private;
+ prop_info_t *info = parser->state->privat;
svn_stringbuf_appendbytes(info->prop_value, data, len);
}
Index: subversion/libsvn_ra_serf/serf.c
===================================================================
--- subversion/libsvn_ra_serf/serf.c (revision 1455448)
+++ subversion/libsvn_ra_serf/serf.c (working copy)
@@ -833,7 +833,7 @@ get_dirent_props(apr_uint32_t dirent_fields,
if (dirent_fields & SVN_DIRENT_KIND)
{
prop = apr_array_push(props);
- prop->namespace = "DAV:";
+ prop->ns = "DAV:";
prop->name = "resourcetype";
}
@@ -840,7 +840,7 @@ get_dirent_props(apr_uint32_t dirent_fields,
if (dirent_fields & SVN_DIRENT_SIZE)
{
prop = apr_array_push(props);
- prop->namespace = "DAV:";
+ prop->ns = "DAV:";
prop->name = "getcontentlength";
}
@@ -847,7 +847,7 @@ get_dirent_props(apr_uint32_t dirent_fields,
if (dirent_fields & SVN_DIRENT_HAS_PROPS)
{
prop = apr_array_push(props);
- prop->namespace = SVN_DAV_PROP_NS_DAV;
+ prop->ns = SVN_DAV_PROP_NS_DAV;
prop->name = "deadprop-count";
}
@@ -854,7 +854,7 @@ get_dirent_props(apr_uint32_t dirent_fields,
if (dirent_fields & SVN_DIRENT_CREATED_REV)
{
svn_ra_serf__dav_props_t *p = apr_array_push(props);
- p->namespace = "DAV:";
+ p->ns = "DAV:";
p->name = SVN_DAV__VERSION_NAME;
}
@@ -861,7 +861,7 @@ get_dirent_props(apr_uint32_t dirent_fields,
if (dirent_fields & SVN_DIRENT_TIME)
{
prop = apr_array_push(props);
- prop->namespace = "DAV:";
+ prop->ns = "DAV:";
prop->name = SVN_DAV__CREATIONDATE;
}
@@ -868,7 +868,7 @@ get_dirent_props(apr_uint32_t dirent_fields,
if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)
{
prop = apr_array_push(props);
- prop->namespace = "DAV:";
+ prop->ns = "DAV:";
prop->name = "creator-displayname";
}
}
@@ -879,12 +879,12 @@ get_dirent_props(apr_uint32_t dirent_fields,
The neon behavior is to retrieve all properties in this case */
prop = apr_array_push(props);
- prop->namespace = "DAV:";
+ prop->ns = "DAV:";
prop->name = "allprop";
}
prop = apr_array_push(props);
- prop->namespace = NULL;
+ prop->ns = NULL;
prop->name = NULL;
return (svn_ra_serf__dav_props_t *) props->elts;
Index: subversion/libsvn_ra_serf/update.c
===================================================================
--- subversion/libsvn_ra_serf/update.c (revision 1455448)
+++ subversion/libsvn_ra_serf/update.c (working copy)
@@ -555,7 +555,7 @@ push_state(svn_ra_serf__xml_parser_t *parser,
svn_ra_serf__xml_push_state(parser, state);
- info = parser->state->private;
+ info = parser->state->privat;
/* Our private pool needs to be disjoint from the state pool. */
if (!info)
@@ -605,7 +605,7 @@ push_state(svn_ra_serf__xml_parser_t *parser,
ctx->root_dir = new_info->dir;
}
- parser->state->private = new_info;
+ parser->state->privat = new_info;
}
else if (state == OPEN_FILE || state == ADD_FILE)
{
@@ -624,10 +624,10 @@ push_state(svn_ra_serf__xml_parser_t *parser,
new_info->props = apr_hash_make(new_info->pool);
- parser->state->private = new_info;
+ parser->state->privat = new_info;
}
- return parser->state->private;
+ return parser->state->privat;
}
@@ -1891,7 +1891,7 @@ start_report(svn_ra_serf__xml_parser_t *parser,
if (rev_str) /* Not available on older repositories! */
delete_rev = SVN_STR_TO_REV(rev_str);
- info = parser->state->private;
+ info = parser->state->privat;
SVN_ERR(ensure_dir_opened(info->dir));
@@ -1921,7 +1921,7 @@ start_report(svn_ra_serf__xml_parser_t *parser,
_("Missing name attr in absent-directory element"));
}
- info = parser->state->private;
+ info = parser->state->privat;
SVN_ERR(ensure_dir_opened(info->dir));
@@ -1946,7 +1946,7 @@ start_report(svn_ra_serf__xml_parser_t *parser,
_("Missing name attr in absent-file element"));
}
- info = parser->state->private;
+ info = parser->state->privat;
SVN_ERR(ensure_dir_opened(info->dir));
@@ -1963,7 +1963,7 @@ start_report(svn_ra_serf__xml_parser_t *parser,
if (strcmp(name.name, "checked-in") == 0)
{
info = push_state(parser, ctx, IGNORE_PROP_NAME);
- info->prop_ns = name.namespace;
+ info->prop_ns = name.ns;
info->prop_name = apr_pstrdup(parser->state->pool, name.name);
info->prop_encoding = NULL;
svn_stringbuf_setempty(info->prop_value);
@@ -2004,7 +2004,7 @@ start_report(svn_ra_serf__xml_parser_t *parser,
}
else if (strcmp(name.name, "fetch-props") == 0)
{
- info = parser->state->private;
+ info = parser->state->privat;
info->dir->fetch_props = TRUE;
}
@@ -2023,7 +2023,7 @@ start_report(svn_ra_serf__xml_parser_t *parser,
if (strcmp(name.name, "checked-in") == 0)
{
info = push_state(parser, ctx, IGNORE_PROP_NAME);
- info->prop_ns = name.namespace;
+ info->prop_ns = name.ns;
info->prop_name = apr_pstrdup(parser->state->pool, name.name);
info->prop_encoding = NULL;
svn_stringbuf_setempty(info->prop_value);
@@ -2035,13 +2035,13 @@ start_report(svn_ra_serf__xml_parser_t *parser,
}
else if (strcmp(name.name, "fetch-props") == 0)
{
- info = parser->state->private;
+ info = parser->state->privat;
info->fetch_props = TRUE;
}
else if (strcmp(name.name, "fetch-file") == 0)
{
- info = parser->state->private;
+ info = parser->state->privat;
info->base_checksum = svn_xml_get_attr_value("base-checksum", attrs);
if (info->base_checksum)
@@ -2133,7 +2133,7 @@ start_report(svn_ra_serf__xml_parser_t *parser,
info = push_state(parser, ctx, PROP);
- info->prop_ns = name.namespace;
+ info->prop_ns = name.ns;
info->prop_name = apr_pstrdup(parser->state->pool, name.name);
info->prop_encoding = svn_xml_get_attr_value("encoding", attrs);
svn_stringbuf_setempty(info->prop_value);
@@ -2169,7 +2169,7 @@ end_report(svn_ra_serf__xml_parser_t *parser,
(state == ADD_DIR && (strcmp(name.name, "add-directory") == 0))))
{
const char *checked_in_url;
- report_info_t *info = parser->state->private;
+ report_info_t *info = parser->state->privat;
/* We've now closed this directory; note it. */
info->dir->tag_closed = TRUE;
@@ -2238,7 +2238,7 @@ end_report(svn_ra_serf__xml_parser_t *parser,
}
else if (state == OPEN_FILE && strcmp(name.name, "open-file") == 0)
{
- report_info_t *info = parser->state->private;
+ report_info_t *info = parser->state->privat;
/* Expand our full name now if we haven't done so yet. */
if (!info->name)
@@ -2342,7 +2342,7 @@ end_report(svn_ra_serf__xml_parser_t *parser,
}
else if (state == ADD_FILE && strcmp(name.name, "add-file") == 0)
{
- report_info_t *info = parser->state->private;
+ report_info_t *info = parser->state->privat;
/* go fetch info->name from DAV:checked-in */
info->url = svn_ra_serf__get_ver_prop(info->props, info->base_name,
@@ -2379,7 +2379,7 @@ end_report(svn_ra_serf__xml_parser_t *parser,
}
else if (state == TXDELTA && strcmp(name.name, "txdelta") == 0)
{
- report_info_t *info = parser->state->private;
+ report_info_t *info = parser->state->privat;
/* Pre 1.2, mod_dav_svn was using <txdelta> tags (in addition to
<fetch-file>s and such) when *not* in "send-all" mode. As a
@@ -2405,7 +2405,7 @@ end_report(svn_ra_serf__xml_parser_t *parser,
const svn_string_t *set_val_str;
apr_pool_t *pool;
- info = parser->state->private;
+ info = parser->state->privat;
dir = info->dir;
/* We're going to be slightly tricky. We don't care what the ->url
@@ -2415,7 +2415,7 @@ end_report(svn_ra_serf__xml_parser_t *parser,
ns_name_match = NULL;
for (ns = dir->ns_list; ns; ns = ns->next)
{
- if (strcmp(ns->namespace, info->prop_ns) == 0)
+ if (strcmp(ns->ns, info->prop_ns) == 0)
{
ns_name_match = ns;
if (strcmp(ns->url, info->prop_name) == 0)
@@ -2431,11 +2431,11 @@ end_report(svn_ra_serf__xml_parser_t *parser,
ns = apr_palloc(dir->pool, sizeof(*ns));
if (!ns_name_match)
{
- ns->namespace = apr_pstrdup(dir->pool, info->prop_ns);
+ ns->ns = apr_pstrdup(dir->pool, info->prop_ns);
}
else
{
- ns->namespace = ns_name_match->namespace;
+ ns->ns = ns_name_match->ns;
}
ns->url = apr_pstrdup(dir->pool, info->prop_name);
@@ -2482,12 +2482,12 @@ end_report(svn_ra_serf__xml_parser_t *parser,
}
svn_ra_serf__set_ver_prop(props, info->base_name, info->base_rev,
- ns->namespace, ns->url, set_val_str, pool);
+ ns->ns, ns->url, set_val_str, pool);
/* Advance handling: if we spotted the md5-checksum property on
the wire, remember it's value. */
if (strcmp(ns->url, "md5-checksum") == 0
- && strcmp(ns->namespace, SVN_DAV_PROP_NS_DAV) == 0)
+ && strcmp(ns->ns, SVN_DAV_PROP_NS_DAV) == 0)
info->final_checksum = apr_pstrdup(info->pool, set_val_str->data);
svn_ra_serf__xml_pop_state(parser);
@@ -2512,7 +2512,7 @@ cdata_report(svn_ra_serf__xml_parser_t *parser,
if (parser->state->current_state == PROP)
{
- report_info_t *info = parser->state->private;
+ report_info_t *info = parser->state->privat;
svn_stringbuf_appendbytes(info->prop_value, data, len);
}
@@ -2525,7 +2525,7 @@ cdata_report(svn_ra_serf__xml_parser_t *parser,
if (ctx->send_all_mode)
{
apr_size_t nlen = len;
- report_info_t *info = parser->state->private;
+ report_info_t *info = parser->state->privat;
SVN_ERR(svn_stream_write(info->base64_decoder, data, &nlen));
if (nlen != len)
Index: subversion/libsvn_ra_serf/util.c
===================================================================
--- subversion/libsvn_ra_serf/util.c (revision 1455448)
+++ subversion/libsvn_ra_serf/util.c (working copy)
@@ -833,7 +833,7 @@ start_error(svn_ra_serf__xml_parser_t *parser,
svn_ra_serf__server_error_t *ctx = parser->user_data;
if (!ctx->in_error &&
- strcmp(name.namespace, "DAV:") == 0 &&
+ strcmp(name.ns, "DAV:") == 0 &&
strcmp(name.name, "error") == 0)
{
ctx->in_error = TRUE;
@@ -879,7 +879,7 @@ end_error(svn_ra_serf__xml_parser_t *parser,
svn_ra_serf__server_error_t *ctx = parser->user_data;
if (ctx->in_error &&
- strcmp(name.namespace, "DAV:") == 0 &&
+ strcmp(name.ns, "DAV:") == 0 &&
strcmp(name.name, "error") == 0)
{
ctx->in_error = FALSE;
@@ -1124,7 +1124,7 @@ start_207(svn_ra_serf__xml_parser_t *parser,
svn_ra_serf__server_error_t *ctx = parser->user_data;
if (!ctx->in_error &&
- strcmp(name.namespace, "DAV:") == 0 &&
+ strcmp(name.ns, "DAV:") == 0 &&
strcmp(name.name, "multistatus") == 0)
{
ctx->in_error = TRUE;
@@ -1136,7 +1136,7 @@ start_207(svn_ra_serf__xml_parser_t *parser,
ctx->collect_cdata = TRUE;
}
else if (ctx->in_error &&
- strcmp(name.namespace, "DAV:") == 0 &&
+ strcmp(name.ns, "DAV:") == 0 &&
strcmp(name.name, "status") == 0)
{
/* Start collecting cdata. */
@@ -1158,7 +1158,7 @@ end_207(svn_ra_serf__xml_parser_t *parser,
svn_ra_serf__server_error_t *ctx = parser->user_data;
if (ctx->in_error &&
- strcmp(name.namespace, "DAV:") == 0 &&
+ strcmp(name.ns, "DAV:") == 0 &&
strcmp(name.name, "multistatus") == 0)
{
ctx->in_error = FALSE;
@@ -1177,7 +1177,7 @@ end_207(svn_ra_serf__xml_parser_t *parser,
ctx->error->apr_err = SVN_ERR_RA_DAV_REQUEST_FAILED;
}
else if (ctx->in_error &&
- strcmp(name.namespace, "DAV:") == 0 &&
+ strcmp(name.ns, "DAV:") == 0 &&
strcmp(name.name, "status") == 0)
{
int status_code;
Index: subversion/libsvn_ra_serf/xml.c
===================================================================
--- subversion/libsvn_ra_serf/xml.c (revision 1455448)
+++ subversion/libsvn_ra_serf/xml.c (working copy)
@@ -139,7 +139,7 @@ define_namespaces(svn_ra_serf__ns_t **ns_list,
/* Have we already defined this ns previously? */
for (cur_ns = *ns_list; cur_ns; cur_ns = cur_ns->next)
{
- if (strcmp(cur_ns->namespace, prefix) == 0)
+ if (strcmp(cur_ns->ns, prefix) == 0)
{
found = TRUE;
break;
@@ -156,7 +156,7 @@ define_namespaces(svn_ra_serf__ns_t **ns_list,
else
pool = baton;
new_ns = apr_palloc(pool, sizeof(*new_ns));
- new_ns->namespace = apr_pstrdup(pool, prefix);
+ new_ns->ns = apr_pstrdup(pool, prefix);
new_ns->url = apr_pstrdup(pool, tmp_attrs[1]);
/* Push into the front of NS_LIST. Parent states will point
@@ -197,9 +197,9 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_props_t *r
for (ns = ns_list; ns; ns = ns->next)
{
- if (strncmp(ns->namespace, name, colon - name) == 0)
+ if (strncmp(ns->ns, name, colon - name) == 0)
{
- returned_prop_name->namespace = ns->url;
+ returned_prop_name->ns = ns->url;
returned_prop_name->name = colon + 1;
return;
}
@@ -211,9 +211,9 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_props_t *r
for (ns = ns_list; ns; ns = ns->next)
{
- if (! ns->namespace[0])
+ if (! ns->ns[0])
{
- returned_prop_name->namespace = ns->url;
+ returned_prop_name->ns = ns->url;
returned_prop_name->name = name;
return;
}
@@ -222,7 +222,7 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_props_t *r
/* If the prefix is not found, then the name is NOT within a
namespace. */
- returned_prop_name->namespace = "";
+ returned_prop_name->ns = "";
returned_prop_name->name = name;
}
@@ -399,12 +399,12 @@ svn_ra_serf__xml_push_state(svn_ra_serf__xml_parse
if (parser->state)
{
- new_state->private = parser->state->private;
+ new_state->privat = parser->state->privat;
new_state->ns_list = parser->state->ns_list;
}
else
{
- new_state->private = NULL;
+ new_state->privat = NULL;
new_state->ns_list = NULL;
}
@@ -589,7 +589,7 @@ svn_ra_serf__xml_cb_start(svn_ra_serf__xml_context
/* If we're waiting for an element to close, then just ignore all
other element-opens. */
- if (xmlctx->waiting.namespace != NULL)
+ if (xmlctx->waiting.ns != NULL)
return SVN_NO_ERROR;
/* Look for xmlns: attributes. Lazily create the state pool if any
@@ -609,7 +609,7 @@ svn_ra_serf__xml_cb_start(svn_ra_serf__xml_context
/* Found a specific transition. */
if (strcmp(elemname.name, scan->name) == 0
- && strcmp(elemname.namespace, scan->ns) == 0)
+ && strcmp(elemname.ns, scan->ns) == 0)
break;
}
if (scan->ns == NULL)
@@ -690,7 +690,7 @@ svn_ra_serf__xml_cb_start(svn_ra_serf__xml_context
/* Some basic copies to set up the new estate. */
new_xes->state = scan->to_state;
new_xes->tag.name = apr_pstrdup(new_pool, elemname.name);
- new_xes->tag.namespace = apr_pstrdup(new_pool, elemname.namespace);
+ new_xes->tag.ns = apr_pstrdup(new_pool, elemname.ns);
new_xes->custom_close = scan->custom_close;
/* Start with the parent's namespace set. */
@@ -723,15 +723,15 @@ svn_ra_serf__xml_cb_end(svn_ra_serf__xml_context_t
svn_ra_serf__expand_ns(&elemname, xes->ns_list, raw_name);
- if (xmlctx->waiting.namespace != NULL)
+ if (xmlctx->waiting.ns != NULL)
{
/* If this element is not the closer, then keep waiting... */
if (strcmp(elemname.name, xmlctx->waiting.name) != 0
- || strcmp(elemname.namespace, xmlctx->waiting.namespace) != 0)
+ || strcmp(elemname.ns, xmlctx->waiting.ns) != 0)
return SVN_NO_ERROR;
/* Found it. Stop waiting, and go back for more. */
- xmlctx->waiting.namespace = NULL;
+ xmlctx->waiting.ns = NULL;
return SVN_NO_ERROR;
}
@@ -743,7 +743,7 @@ svn_ra_serf__xml_cb_end(svn_ra_serf__xml_context_t
would imply closing an ancestor tag (where did ours go?) or a spurious
tag closure. */
if (strcmp(elemname.name, xes->tag.name) != 0
- || strcmp(elemname.namespace, xes->tag.namespace) != 0)
+ || strcmp(elemname.ns, xes->tag.ns) != 0)
return svn_error_create(SVN_ERR_XML_MALFORMED, NULL,
_("The response contains invalid XML"));
@@ -797,7 +797,7 @@ svn_ra_serf__xml_cb_cdata(svn_ra_serf__xml_context
{
/* If we are waiting for a closing tag, then we are uninterested in
the cdata. Just return. */
- if (xmlctx->waiting.namespace != NULL)
+ if (xmlctx->waiting.ns != NULL)
return SVN_NO_ERROR;
/* If the current state is collecting cdata, then copy the cdata. */
Index: subversion/libsvn_repos/delta.c
===================================================================
--- subversion/libsvn_repos/delta.c (revision 1455448)
+++ subversion/libsvn_repos/delta.c (working copy)
@@ -123,10 +123,10 @@ static svn_error_t *delta_files(struct context *c,
/* Generic directory deltafication routines. */
-static svn_error_t *delete(struct context *c,
- void *dir_baton,
- const char *edit_path,
- apr_pool_t *pool);
+static svn_error_t *delete_entry(struct context *c,
+ void *dir_baton,
+ const char *edit_path,
+ apr_pool_t *pool);
static svn_error_t *add_file_or_dir(struct context *c,
void *dir_baton,
@@ -312,7 +312,7 @@ svn_repos_dir_delta2(svn_fs_root_t *src_root,
SVN_ERR(authz_root_check(tgt_root, authz_root_path,
authz_read_func, authz_read_baton, pool));
SVN_ERR(editor->open_root(edit_baton, rootrev, pool, &root_baton));
- SVN_ERR(delete(&c, root_baton, src_entry, pool));
+ SVN_ERR(delete_entry(&c, root_baton, src_entry, pool));
goto cleanup;
}
if (src_kind == svn_node_none)
@@ -348,7 +348,7 @@ svn_repos_dir_delta2(svn_fs_root_t *src_root,
SVN_ERR(authz_root_check(tgt_root, authz_root_path,
authz_read_func, authz_read_baton, pool));
SVN_ERR(editor->open_root(edit_baton, rootrev, pool, &root_baton));
- SVN_ERR(delete(&c, root_baton, src_entry, pool));
+ SVN_ERR(delete_entry(&c, root_baton, src_entry, pool));
SVN_ERR(add_file_or_dir(&c, root_baton, depth, tgt_fullpath,
src_entry, tgt_kind, pool));
}
@@ -769,10 +769,10 @@ delta_files(struct context *c,
/* Emit a delta to delete the entry named TARGET_ENTRY from DIR_BATON. */
static svn_error_t *
-delete(struct context *c,
- void *dir_baton,
- const char *edit_path,
- apr_pool_t *pool)
+delete_entry(struct context *c,
+ void *dir_baton,
+ const char *edit_path,
+ apr_pool_t *pool)
{
return c->editor->delete_entry(edit_path, SVN_INVALID_REVNUM,
dir_baton, pool);
@@ -1003,7 +1003,7 @@ delta_dirs(struct context *c,
else if ((src_kind != tgt_kind)
|| ((distance == -1) && (! c->ignore_ancestry)))
{
- SVN_ERR(delete(c, dir_baton, e_fullpath, subpool));
+ SVN_ERR(delete_entry(c, dir_baton, e_fullpath, subpool));
SVN_ERR(add_file_or_dir(c, dir_baton,
MAYBE_DEMOTE_DEPTH(depth),
t_fullpath, e_fullpath, tgt_kind,
@@ -1063,7 +1063,7 @@ delta_dirs(struct context *c,
|| (src_kind == svn_node_dir
&& depth == svn_depth_immediates))
{
- SVN_ERR(delete(c, dir_baton, e_fullpath, subpool));
+ SVN_ERR(delete_entry(c, dir_baton, e_fullpath, subpool));
}
}
}
Index: subversion/libsvn_subr/date.c
===================================================================
--- subversion/libsvn_subr/date.c (revision 1455448)
+++ subversion/libsvn_subr/date.c (working copy)
@@ -102,7 +102,7 @@ find_rule(char tchar)
return NULL;
}
-/* Attempt to match the date-string in VALUE to the provided TEMPLATE,
+/* Attempt to match the date-string in VALUE to the provided TEMPLAT,
using the rules defined above. Return TRUE on successful match,
FALSE otherwise. On successful match, fill in *EXP with the
matched values and set *LOCALTZ to TRUE if the local time zone
@@ -110,7 +110,7 @@ find_rule(char tchar)
information was provided), or FALSE if not. */
static svn_boolean_t
template_match(apr_time_exp_t *expt, svn_boolean_t *localtz,
- const char *template, const char *value)
+ const char *templat, const char *value)
{
int multiplier = 100000;
int tzind = 0;
@@ -121,7 +121,7 @@ template_match(apr_time_exp_t *expt, svn_boolean_t
for (;;)
{
- const rule *match = find_rule(*template++);
+ const rule *match = find_rule(*templat++);
char vchar = *value++;
apr_int32_t *place;
@@ -154,9 +154,9 @@ template_match(apr_time_exp_t *expt, svn_boolean_t
case SKIPFROM:
if (!vchar)
break;
- match = find_rule(*template);
+ match = find_rule(*templat);
if (!strchr(match->valid, vchar))
- template = strchr(template, ']') + 1;
+ templat = strchr(templat, ']') + 1;
value--;
continue;
case ACCEPT:
Index: subversion/libsvn_subr/sorts.c
===================================================================
--- subversion/libsvn_subr/sorts.c (revision 1455448)
+++ subversion/libsvn_subr/sorts.c (working copy)
@@ -198,13 +198,13 @@ bsearch_lower_bound(const void *key,
/* Binary search for the lowest position at which to insert KEY. */
while (lower <= upper)
{
- int try = lower + (upper - lower) / 2; /* careful to avoid overflow */
- int cmp = compare_func((const char *)base + try * elt_size, key);
+ int nxt = lower + (upper - lower) / 2; /* careful to avoid overflow */
+ int cmp = compare_func((const char *)base + nxt * elt_size, key);
if (cmp < 0)
- lower = try + 1;
+ lower = nxt + 1;
else
- upper = try - 1;
+ upper = nxt - 1;
}
assert(lower == upper + 1);
Index: subversion/libsvn_subr/temp_serializer.c
===================================================================
--- subversion/libsvn_subr/temp_serializer.c (revision 1455448)
+++ subversion/libsvn_subr/temp_serializer.c (working copy)
@@ -228,16 +228,16 @@ svn_temp_serializer__push(svn_temp_serializer__con
apr_size_t struct_size)
{
const void *source = *source_struct;
- source_stack_t *new;
+ source_stack_t *entry;
/* recycle an old entry or create a new one for the structure stack */
if (context->recycler)
{
- new = context->recycler;
- context->recycler = new->upper;
+ entry = context->recycler;
+ context->recycler = entry->upper;
}
else
- new = apr_palloc(context->pool, sizeof(*new));
+ entry = apr_palloc(context->pool, sizeof(*entry));
/* the serialized structure must be properly aligned */
if (source)
@@ -248,12 +248,12 @@ svn_temp_serializer__push(svn_temp_serializer__con
store_current_end_pointer(context, source_struct);
/* store source and target information */
- new->source_struct = source;
- new->target_offset = context->buffer->len;
+ entry->source_struct = source;
+ entry->target_offset = context->buffer->len;
/* put the new entry onto the stack*/
- new->upper = context->source;
- context->source = new;
+ entry->upper = context->source;
+ context->source = entry;
/* finally, actually append the new struct
* (so we can now manipulate pointers within it) */
Index: subversion/libsvn_subr/utf.c
===================================================================
--- subversion/libsvn_subr/utf.c (revision 1455448)
+++ subversion/libsvn_subr/utf.c (working copy)
@@ -479,7 +479,7 @@ fuzzy_escape(const char *src, apr_size_t len, apr_
{
const char *src_orig = src, *src_end = src + len;
apr_size_t new_len = 0;
- char *new;
+ char *new_ptr;
const char *new_orig;
/* First count how big a dest string we'll need. */
@@ -494,9 +494,9 @@ fuzzy_escape(const char *src, apr_size_t len, apr_
}
/* Allocate that amount, plus one slot for '\0' character. */
- new = apr_palloc(pool, new_len + 1);
+ new_ptr = apr_palloc(pool, new_len + 1);
- new_orig = new;
+ new_orig = new_ptr;
/* And fill it up. */
while (src_orig < src_end)
@@ -507,19 +507,19 @@ fuzzy_escape(const char *src, apr_size_t len, apr_
function escapes different characters. Please keep in sync!
### If we add another fuzzy escape somewhere, we should abstract
### this out to a common function. */
- apr_snprintf(new, 6, "?\\%03u", (unsigned char) *src_orig);
- new += 5;
+ apr_snprintf(new_ptr, 6, "?\\%03u", (unsigned char) *src_orig);
+ new_ptr += 5;
}
else
{
- *new = *src_orig;
- new += 1;
+ *new_ptr = *src_orig;
+ new_ptr += 1;
}
src_orig++;
}
- *new = '\0';
+ *new_ptr = '\0';
return new_orig;
}
Index: subversion/libsvn_wc/wc_db_wcroot.c
===================================================================
--- subversion/libsvn_wc/wc_db_wcroot.c (revision 1455448)
+++ subversion/libsvn_wc/wc_db_wcroot.c (working copy)
@@ -525,9 +525,9 @@ svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_w
{
svn_error_t *err;
svn_node_kind_t adm_subdir_kind;
+ const char *adm_subdir;
- const char *adm_subdir = svn_dirent_join(local_abspath, adm_relpath,
- scratch_pool);
+ adm_subdir = svn_dirent_join(local_abspath, adm_relpath, scratch_pool);
SVN_ERR(svn_io_check_path(adm_subdir, &adm_subdir_kind, scratch_pool));
Index: subversion/mod_authz_svn/mod_authz_svn.c
===================================================================
--- subversion/mod_authz_svn/mod_authz_svn.c (revision 1455448)
+++ subversion/mod_authz_svn/mod_authz_svn.c (working copy)
@@ -36,6 +36,9 @@
#include <ap_mmn.h>
#include <apr_uri.h>
#include <apr_lib.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "mod_dav_svn.h"
Index: subversion/mod_dav_svn/activity.c
===================================================================
--- subversion/mod_dav_svn/activity.c (revision 1455448)
+++ subversion/mod_dav_svn/activity.c (working copy)
@@ -26,6 +26,9 @@
#include <apr_md5.h>
#include <httpd.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_checksum.h"
Index: subversion/mod_dav_svn/authz.c
===================================================================
--- subversion/mod_dav_svn/authz.c (revision 1455448)
+++ subversion/mod_dav_svn/authz.c (working copy)
@@ -31,6 +31,9 @@
#include "private/svn_fspath.h"
#include "mod_authz_svn.h"
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include "dav_svn.h"
Index: subversion/mod_dav_svn/dav_svn.h
===================================================================
--- subversion/mod_dav_svn/dav_svn.h (revision 1455448)
+++ subversion/mod_dav_svn/dav_svn.h (working copy)
@@ -789,7 +789,7 @@ dav_svn__new_error_tag(apr_pool_t *pool,
int status,
int error_id,
const char *desc,
- const char *namespace,
+ const char *ns,
const char *tagname);
Index: subversion/mod_dav_svn/deadprops.c
===================================================================
--- subversion/mod_dav_svn/deadprops.c (revision 1455448)
+++ subversion/mod_dav_svn/deadprops.c (working copy)
@@ -26,6 +26,9 @@
#include <apr_hash.h>
#include <httpd.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_xml.h"
Index: subversion/mod_dav_svn/liveprops.c
===================================================================
--- subversion/mod_dav_svn/liveprops.c (revision 1455448)
+++ subversion/mod_dav_svn/liveprops.c (working copy)
@@ -29,6 +29,9 @@
#include <http_core.h>
#include <http_log.h>
#include <util_xml.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_checksum.h"
Index: subversion/mod_dav_svn/lock.c
===================================================================
--- subversion/mod_dav_svn/lock.c (revision 1455448)
+++ subversion/mod_dav_svn/lock.c (working copy)
@@ -26,6 +26,9 @@
#include <httpd.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_fs.h"
Index: subversion/mod_dav_svn/merge.c
===================================================================
--- subversion/mod_dav_svn/merge.c (revision 1455448)
+++ subversion/mod_dav_svn/merge.c (working copy)
@@ -34,6 +34,9 @@
#include "svn_props.h"
#include "svn_xml.h"
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include "dav_svn.h"
#include "private/svn_fspath.h"
Index: subversion/mod_dav_svn/mirror.c
===================================================================
--- subversion/mod_dav_svn/mirror.c (revision 1455448)
+++ subversion/mod_dav_svn/mirror.c (working copy)
@@ -30,6 +30,9 @@
#include "private/svn_fspath.h"
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include "dav_svn.h"
Index: subversion/mod_dav_svn/mod_dav_svn.c
===================================================================
--- subversion/mod_dav_svn/mod_dav_svn.c (revision 1455448)
+++ subversion/mod_dav_svn/mod_dav_svn.c (working copy)
@@ -32,6 +32,9 @@
#include <http_request.h>
#include <http_log.h>
#include <ap_provider.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_version.h"
Index: subversion/mod_dav_svn/posts/create_txn.c
===================================================================
--- subversion/mod_dav_svn/posts/create_txn.c (revision 1455448)
+++ subversion/mod_dav_svn/posts/create_txn.c (working copy)
@@ -22,6 +22,9 @@
*/
#include <httpd.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_dav.h"
Index: subversion/mod_dav_svn/reports/dated-rev.c
===================================================================
--- subversion/mod_dav_svn/reports/dated-rev.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/dated-rev.c (working copy)
@@ -26,6 +26,9 @@
#include <httpd.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_fs.h"
Index: subversion/mod_dav_svn/reports/deleted-rev.c
===================================================================
--- subversion/mod_dav_svn/reports/deleted-rev.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/deleted-rev.c (working copy)
@@ -25,6 +25,9 @@
#include <apr_xml.h>
#include <httpd.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_xml.h"
Index: subversion/mod_dav_svn/reports/file-revs.c
===================================================================
--- subversion/mod_dav_svn/reports/file-revs.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/file-revs.c (working copy)
@@ -35,6 +35,9 @@
#include "private/svn_log.h"
#include "private/svn_fspath.h"
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include "../dav_svn.h"
struct file_rev_baton {
Index: subversion/mod_dav_svn/reports/get-location-segments.c
===================================================================
--- subversion/mod_dav_svn/reports/get-location-segments.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/get-location-segments.c (working copy)
@@ -28,6 +28,9 @@
#include <httpd.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_fs.h"
Index: subversion/mod_dav_svn/reports/get-locations.c
===================================================================
--- subversion/mod_dav_svn/reports/get-locations.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/get-locations.c (working copy)
@@ -27,6 +27,9 @@
#include <httpd.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_fs.h"
Index: subversion/mod_dav_svn/reports/get-locks.c
===================================================================
--- subversion/mod_dav_svn/reports/get-locks.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/get-locks.c (working copy)
@@ -26,6 +26,9 @@
#include <httpd.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_fs.h"
Index: subversion/mod_dav_svn/reports/inherited-props.c
===================================================================
--- subversion/mod_dav_svn/reports/inherited-props.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/inherited-props.c (working copy)
@@ -27,6 +27,9 @@
#include <http_request.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_pools.h"
Index: subversion/mod_dav_svn/reports/log.c
===================================================================
--- subversion/mod_dav_svn/reports/log.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/log.c (working copy)
@@ -25,6 +25,9 @@
#include <apr_strings.h>
#include <apr_xml.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_repos.h"
Index: subversion/mod_dav_svn/reports/mergeinfo.c
===================================================================
--- subversion/mod_dav_svn/reports/mergeinfo.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/mergeinfo.c (working copy)
@@ -27,6 +27,9 @@
#include <http_request.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_pools.h"
Index: subversion/mod_dav_svn/reports/replay.c
===================================================================
--- subversion/mod_dav_svn/reports/replay.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/replay.c (working copy)
@@ -27,6 +27,9 @@
#include <http_request.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_pools.h"
Index: subversion/mod_dav_svn/reports/update.c
===================================================================
--- subversion/mod_dav_svn/reports/update.c (revision 1455448)
+++ subversion/mod_dav_svn/reports/update.c (working copy)
@@ -27,6 +27,9 @@
#include <http_request.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_pools.h"
Index: subversion/mod_dav_svn/repos.c
===================================================================
--- subversion/mod_dav_svn/repos.c (revision 1455448)
+++ subversion/mod_dav_svn/repos.c (working copy)
@@ -32,6 +32,9 @@
#include <http_protocol.h>
#include <http_log.h>
#include <http_core.h> /* for ap_construct_url */
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#define CORE_PRIVATE /* To make ap_show_mpm public in 2.2 */
Index: subversion/mod_dav_svn/util.c
===================================================================
--- subversion/mod_dav_svn/util.c (revision 1455448)
+++ subversion/mod_dav_svn/util.c (working copy)
@@ -26,6 +26,9 @@
#include <apr_uri.h>
#include <apr_buckets.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include <http_protocol.h>
#include <http_core.h>
Index: subversion/mod_dav_svn/version.c
===================================================================
--- subversion/mod_dav_svn/version.c (revision 1455448)
+++ subversion/mod_dav_svn/version.c (working copy)
@@ -26,6 +26,9 @@
#include <httpd.h>
#include <http_log.h>
+#ifdef __cplusplus
+#define namespace ns
+#endif
#include <mod_dav.h>
#include "svn_fs.h"
Index: subversion/svnmucc/svnmucc.c
===================================================================
--- subversion/svnmucc/svnmucc.c (revision 1455448)
+++ subversion/svnmucc/svnmucc.c (working copy)
@@ -151,16 +151,17 @@ typedef enum action_code_t {
ACTION_RM
} action_code_t;
+enum operation_kind {
+ OP_OPEN,
+ OP_DELETE,
+ OP_ADD,
+ OP_REPLACE,
+ OP_PROPSET /* only for files for which no other operation is
+ occuring; directories are OP_OPEN with non-empty
+ props */
+};
struct operation {
- enum {
- OP_OPEN,
- OP_DELETE,
- OP_ADD,
- OP_REPLACE,
- OP_PROPSET /* only for files for which no other operation is
- occuring; directories are OP_OPEN with non-empty
- props */
- } operation;
+ enum operation_kind operation;
svn_node_kind_t kind; /* to copy, mkdir, put or set revprops */
svn_revnum_t rev; /* to copy, valid for add and replace */
const char *url; /* to copy, valid for add and replace */
Index: subversion/svnserve/cyrus_auth.c
===================================================================
--- subversion/svnserve/cyrus_auth.c (revision 1455448)
+++ subversion/svnserve/cyrus_auth.c (working copy)
@@ -354,7 +354,8 @@ svn_error_t *cyrus_auth_request(svn_ra_svn_conn_t
if (result != SASL_OK)
return fail_cmd(conn, pool, sasl_ctx);
- if ((p = strchr(user, '@')) != NULL)
+ /* cast to resolve overload in C++ */
+ if ((p = strchr((char*)user, '@')) != NULL)
{
/* Drop the realm part. */
b->user = apr_pstrndup(b->pool, user, p - (const char *)user);
Index: subversion/tests/libsvn_fs/fs-test.c
===================================================================
--- subversion/tests/libsvn_fs/fs-test.c (revision 1455448)
+++ subversion/tests/libsvn_fs/fs-test.c (working copy)
@@ -2500,8 +2500,8 @@ delete_mutables(const svn_test_opts_t *opts,
* delete_mutables(). It might be worthwhile to combine them.
*/
static svn_error_t *
-delete(const svn_test_opts_t *opts,
- apr_pool_t *pool)
+delete_nodes(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
{
svn_fs_t *fs;
svn_fs_txn_t *txn;
@@ -4969,7 +4969,7 @@ struct svn_test_descriptor_t test_funcs[] =
"set and get some node properties"),
SVN_TEST_OPTS_PASS(delete_mutables,
"delete mutable nodes from directories"),
- SVN_TEST_OPTS_PASS(delete,
+ SVN_TEST_OPTS_PASS(delete_nodes,
"delete nodes tree"),
SVN_TEST_OPTS_PASS(fetch_youngest_rev,
"fetch the youngest revision from a filesystem"),
Index: subversion/tests/libsvn_fs_base/fs-base-test.c
===================================================================
--- subversion/tests/libsvn_fs_base/fs-base-test.c (revision 1455448)
+++ subversion/tests/libsvn_fs_base/fs-base-test.c (working copy)
@@ -667,8 +667,8 @@ delete_mutables(const svn_test_opts_t *opts,
* delete_mutables(). It might be worthwhile to combine them.
*/
static svn_error_t *
-delete(const svn_test_opts_t *opts,
- apr_pool_t *pool)
+delete_nodes(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
{
svn_fs_t *fs;
svn_fs_txn_t *txn;
@@ -1528,7 +1528,7 @@ struct svn_test_descriptor_t test_funcs[] =
"open an existing Berkeley DB filesystem"),
SVN_TEST_OPTS_PASS(delete_mutables,
"delete mutable nodes from directories"),
- SVN_TEST_OPTS_PASS(delete,
+ SVN_TEST_OPTS_PASS(delete_nodes,
"delete nodes tree"),
SVN_TEST_OPTS_PASS(abort_txn,
"abort a transaction"),
Index: subversion/tests/libsvn_subr/hashdump-test.c
===================================================================
--- subversion/tests/libsvn_subr/hashdump-test.c (revision 1455448)
+++ subversion/tests/libsvn_subr/hashdump-test.c (working copy)
@@ -121,7 +121,7 @@ test2(apr_pool_t *pool)
static svn_error_t *
test3(apr_pool_t *pool)
{
- apr_hash_index_t *this;
+ apr_hash_index_t *hi;
int found_discrepancy = 0;
/* Build a hash in global variable "proplist", then write to a file. */
@@ -134,9 +134,9 @@ test3(apr_pool_t *pool)
same data. */
/* Loop over our original hash */
- for (this = apr_hash_first(pool, proplist);
- this;
- this = apr_hash_next(this))
+ for (hi = apr_hash_first(pool, proplist);
+ hi;
+ hi = apr_hash_next(hi))
{
const void *key;
apr_ssize_t keylen;
@@ -144,7 +144,7 @@ test3(apr_pool_t *pool)
svn_string_t *orig_str, *new_str;
/* Get a key and val. */
- apr_hash_this(this, &key, &keylen, &val);
+ apr_hash_this(hi, &key, &keylen, &val);
orig_str = val;
/* Look up the key in the new hash */
Index: subversion/tests/libsvn_subr/io-test.c
===================================================================
--- subversion/tests/libsvn_subr/io-test.c (revision 1455448)
+++ subversion/tests/libsvn_subr/io-test.c (working copy)
@@ -112,7 +112,7 @@ struct test_file_definition_t test_file_definition
{"twochunk_plus_one_b3", "aabaa", SVN__STREAM_CHUNK_SIZE*2 + 1},
{"twochunk_plus_one_b4", "aaaba", SVN__STREAM_CHUNK_SIZE*2 + 1},
{"twochunk_plus_one_b5", "aaaab", SVN__STREAM_CHUNK_SIZE*2 + 1},
- {0},
+ {0, 0, 0},
};
/* Function to prepare a single test file */
Index: tools/server-side/mod_dontdothat/mod_dontdothat.c
===================================================================
--- tools/server-side/mod_dontdothat/mod_dontdothat.c (revision 1455448)
+++ tools/server-side/mod_dontdothat/mod_dontdothat.c (working copy)
@@ -33,11 +33,12 @@
#include <expat.h>
+#define namespace ns
#include "mod_dav_svn.h"
#include "svn_string.h"
#include "svn_config.h"
-module AP_MODULE_DECLARE_DATA dontdothat_module;
+extern module AP_MODULE_DECLARE_DATA dontdothat_module;
typedef struct dontdothat_config_rec {
const char *config_file;
Index: tools/server-side/svn-rep-sharing-stats.c
===================================================================
--- tools/server-side/svn-rep-sharing-stats.c (revision 1455448)
+++ tools/server-side/svn-rep-sharing-stats.c (working copy)
@@ -171,7 +171,7 @@ static svn_error_t *check_experimental(void)
}
/* The parts of a rep that determine whether it's being shared. */
-struct key_t
+struct svn_key_t
{
svn_revnum_t revision;
apr_off_t offset;
@@ -191,7 +191,7 @@ static svn_error_t *record(apr_hash_t *records,
representation_t *rep,
apr_pool_t *result_pool)
{
- struct key_t *key;
+ struct svn_key_t *key;
struct value_t *value;
/* Skip if we ignore this particular kind of reps, or if the rep doesn't
--
Philip
Received on 2013-03-12 11:09:55 CET