Skip to content

Commit 9d2dcd6

Browse files
author
Ryan Bloom
committed
Update the Apache code to account for the XtOffset change in APR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90356 13f79535-47bb-0310-9956-ffa450edef68
1 parent 05a9e44 commit 9d2dcd6

11 files changed

Lines changed: 46 additions & 46 deletions

File tree

modules/aaa/mod_auth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ static const char *set_auth_slot(cmd_parms *cmd, void *offset, const char *f,
110110
static const command_rec auth_cmds[] =
111111
{
112112
AP_INIT_TAKE12("AuthUserFile", set_auth_slot,
113-
(void *) XtOffsetOf(auth_config_rec, auth_pwfile), OR_AUTHCFG,
113+
(void *) APR_XtOffsetOf(auth_config_rec, auth_pwfile), OR_AUTHCFG,
114114
"text file containing user IDs and passwords"),
115115
AP_INIT_TAKE12("AuthGroupFile", set_auth_slot,
116-
(void *) XtOffsetOf(auth_config_rec, auth_grpfile), OR_AUTHCFG,
116+
(void *) APR_XtOffsetOf(auth_config_rec, auth_grpfile), OR_AUTHCFG,
117117
"text file containing group names and member user IDs"),
118118
AP_INIT_FLAG("AuthAuthoritative", ap_set_flag_slot,
119-
(void *) XtOffsetOf(auth_config_rec, auth_authoritative),
119+
(void *) APR_XtOffsetOf(auth_config_rec, auth_authoritative),
120120
OR_AUTHCFG,
121121
"Set to 'no' to allow access control to be passed along to lower "
122122
"modules if the UserID is not known to this module"),

modules/aaa/mod_auth_db.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,19 @@ static const char *set_db_slot(cmd_parms *cmd, void *offset, const char *f, cons
146146
static const command_rec db_auth_cmds[] =
147147
{
148148
AP_INIT_TAKE1("AuthDBUserFile", ap_set_file_slot,
149-
(void *) XtOffsetOf(db_auth_config_rec, auth_dbpwfile),
149+
(void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbpwfile),
150150
OR_AUTHCFG, "db database file containing user IDs and passwords"),
151151
AP_INIT_TAKE1("AuthDBGroupFile", ap_set_file_slot,
152-
(void *) XtOffsetOf(db_auth_config_rec, auth_dbgrpfile),
152+
(void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbgrpfile),
153153
OR_AUTHCFG, "db database file containing group names and member user IDs"),
154154
AP_INIT_TAKE12("AuthUserFile", set_db_slot,
155-
(void *) XtOffsetOf(db_auth_config_rec, auth_dbpwfile),
155+
(void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbpwfile),
156156
OR_AUTHCFG, NULL),
157157
AP_INIT_TAKE12("AuthGroupFile", set_db_slot,
158-
(void *) XtOffsetOf(db_auth_config_rec, auth_dbgrpfile),
158+
(void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbgrpfile),
159159
OR_AUTHCFG, NULL),
160160
AP_INIT_FLAG("AuthDBAuthoritative", ap_set_flag_slot,
161-
(void *) XtOffsetOf(db_auth_config_rec, auth_dbauthoritative),
161+
(void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbauthoritative),
162162
OR_AUTHCFG,
163163
"Set to 'no' to allow access control to be passed along to lower modules if the userID is not known to this module"),
164164
{NULL}

modules/aaa/mod_auth_dbm.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,19 @@ static const char *set_dbm_slot(cmd_parms *cmd, void *offset,
142142
static const command_rec dbm_auth_cmds[] =
143143
{
144144
AP_INIT_TAKE1("AuthDBMUserFile", ap_set_file_slot,
145-
(void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile),
145+
(void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile),
146146
OR_AUTHCFG, "dbm database file containing user IDs and passwords"),
147147
AP_INIT_TAKE1("AuthDBMGroupFile", ap_set_file_slot,
148-
(void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmgrpfile),
148+
(void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmgrpfile),
149149
OR_AUTHCFG, "dbm database file containing group names and member user IDs"),
150150
AP_INIT_TAKE12("AuthUserFile", set_dbm_slot,
151-
(void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile),
151+
(void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile),
152152
OR_AUTHCFG, NULL),
153153
AP_INIT_TAKE12("AuthGroupFile", set_dbm_slot,
154-
(void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmgrpfile),
154+
(void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmgrpfile),
155155
OR_AUTHCFG, NULL),
156156
AP_INIT_FLAG("AuthDBMAuthoritative", ap_set_flag_slot,
157-
(void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmauthoritative),
157+
(void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmauthoritative),
158158
OR_AUTHCFG, "Set to 'no' to allow access control to be passed along to lower modules, if the UserID is not known in this module"),
159159
{NULL}
160160
};

modules/aaa/mod_auth_ldap.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -754,26 +754,26 @@ command_rec mod_auth_ldap_cmds[] = {
754754
"search on the branch <b>ou=People, o=Airius</b>."),
755755

756756
AP_INIT_TAKE1("AuthLDAPBindDN", ap_set_string_slot,
757-
(void *)XtOffsetOf(mod_auth_ldap_config_t, binddn), OR_AUTHCFG,
757+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, binddn), OR_AUTHCFG,
758758
"DN to use to bind to LDAP server. If not provided, will do an anonymous bind."),
759759

760760
AP_INIT_TAKE1("AuthLDAPBindPassword", ap_set_string_slot,
761-
(void *)XtOffsetOf(mod_auth_ldap_config_t, bindpw), OR_AUTHCFG,
761+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, bindpw), OR_AUTHCFG,
762762
"Password to use to bind to LDAP server. If not provided, will do an anonymous bind."),
763763

764764
AP_INIT_FLAG("AuthLDAPRemoteUserIsDN", ap_set_flag_slot,
765-
(void *)XtOffsetOf(mod_auth_ldap_config_t, user_is_dn), OR_AUTHCFG,
765+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, user_is_dn), OR_AUTHCFG,
766766
"Set to 'on' to set the REMOTE_USER environment variable to be the full "
767767
"DN of the remote user. By default, this is set to off, meaning that "
768768
"the REMOTE_USER variable will contain whatever value the remote user sent."),
769769

770770
AP_INIT_FLAG("AuthLDAPAuthoritative", ap_set_flag_slot,
771-
(void *)XtOffsetOf(mod_auth_ldap_config_t, auth_authoritative), OR_AUTHCFG,
771+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, auth_authoritative), OR_AUTHCFG,
772772
"Set to 'off' to allow access control to be passed along to lower modules if "
773773
"the UserID and/or group is not known to this module"),
774774

775775
AP_INIT_FLAG("AuthLDAPCompareDNOnServer", ap_set_flag_slot,
776-
(void *)XtOffsetOf(mod_auth_ldap_config_t, compare_dn_on_server), OR_AUTHCFG,
776+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, compare_dn_on_server), OR_AUTHCFG,
777777
"Set to 'on' to force auth_ldap to do DN compares (for the \"require dn\" "
778778
"directive) using the server, and set it 'off' to do the compares locally "
779779
"(at the expense of possible false matches). See the documentation for "
@@ -784,7 +784,7 @@ command_rec mod_auth_ldap_cmds[] = {
784784
"member and uniquemember"),
785785

786786
AP_INIT_FLAG("AuthLDAPGroupAttributeIsDN", ap_set_flag_slot,
787-
(void *)XtOffsetOf(mod_auth_ldap_config_t, group_attrib_is_dn), OR_AUTHCFG,
787+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, group_attrib_is_dn), OR_AUTHCFG,
788788
"If set to 'on', auth_ldap uses the DN that is retrieved from the server for"
789789
"subsequent group comparisons. If set to 'off', auth_ldap uses the string"
790790
"provided by the client directly. Defaults to 'on'."),
@@ -795,16 +795,16 @@ command_rec mod_auth_ldap_cmds[] = {
795795
"Defaults to always."),
796796

797797
AP_INIT_FLAG("AuthLDAPEnabled", ap_set_flag_slot,
798-
(void *)XtOffsetOf(mod_auth_ldap_config_t, enabled), OR_AUTHCFG,
798+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, enabled), OR_AUTHCFG,
799799
"Set to off to disable auth_ldap, even if it's been enabled in a higher tree"),
800800

801801
AP_INIT_FLAG("AuthLDAPFrontPageHack", ap_set_flag_slot,
802-
(void *)XtOffsetOf(mod_auth_ldap_config_t, frontpage_hack), OR_AUTHCFG,
802+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, frontpage_hack), OR_AUTHCFG,
803803
"Set to 'on' to support Microsoft FrontPage"),
804804

805805
#ifdef APU_HAS_LDAP_STARTTLS
806806
AP_INIT_FLAG("AuthLDAPStartTLS", ap_set_flag_slot,
807-
(void *)XtOffsetOf(mod_auth_ldap_config_t, starttls), OR_AUTHCFG,
807+
(void *)APR_XtOffsetOf(mod_auth_ldap_config_t, starttls), OR_AUTHCFG,
808808
"Set to 'on' to start TLS after connecting to the LDAP server."),
809809
#endif /* APU_HAS_LDAP_STARTTLS */
810810

modules/generators/mod_autoindex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ static const command_rec autoindex_cmds[] =
585585
AP_INIT_RAW_ARGS("FancyIndexing", ap_set_deprecated, NULL, OR_ALL,
586586
"The FancyIndexing directive is no longer supported. Use IndexOptions FancyIndexing."),
587587
AP_INIT_TAKE1("DefaultIcon", ap_set_string_slot,
588-
(void *) XtOffsetOf(autoindex_config_rec, default_icon),
588+
(void *) APR_XtOffsetOf(autoindex_config_rec, default_icon),
589589
DIR_CMD_PERMS, "an icon URL"),
590590
{NULL}
591591
};

modules/http/mod_mime.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,10 @@ AP_INIT_ITERATE2("AddLanguage", add_language, NULL, OR_FILEINFO,
464464
AP_INIT_ITERATE2("AddType", add_type, NULL, OR_FILEINFO,
465465
"a mime type followed by one or more file extensions"),
466466
AP_INIT_TAKE1("DefaultLanguage", ap_set_string_slot,
467-
(void*)XtOffsetOf(mime_dir_config, default_language), OR_FILEINFO,
467+
(void*)APR_XtOffsetOf(mime_dir_config, default_language), OR_FILEINFO,
468468
"language to use for documents with no other language file extension"),
469469
AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower,
470-
(void *)XtOffsetOf(mime_dir_config, type), OR_FILEINFO,
470+
(void *)APR_XtOffsetOf(mime_dir_config, type), OR_FILEINFO,
471471
"a media type"),
472472
AP_INIT_ITERATE("RemoveCharset", remove_charset, NULL, OR_FILEINFO,
473473
"one or more file extensions"),
@@ -480,7 +480,7 @@ AP_INIT_ITERATE("RemoveLanguage", remove_language, NULL, OR_FILEINFO,
480480
AP_INIT_ITERATE("RemoveType", remove_type, NULL, OR_FILEINFO,
481481
"one or more file extensions"),
482482
AP_INIT_TAKE1("SetHandler", ap_set_string_slot_lower,
483-
(void *)XtOffsetOf(mime_dir_config, handler), OR_FILEINFO,
483+
(void *)APR_XtOffsetOf(mime_dir_config, handler), OR_FILEINFO,
484484
"a handler name"),
485485
AP_INIT_TAKE1("TypesConfig", set_types_config, NULL, RSRC_CONF,
486486
"the MIME types config file"),

modules/mappers/mod_imap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ static void *merge_imap_dir_configs(apr_pool_t *p, void *basev, void *addv)
163163
static const command_rec imap_cmds[] =
164164
{
165165
AP_INIT_TAKE1("ImapMenu", ap_set_string_slot,
166-
(void *) XtOffsetOf(imap_conf_rec, imap_menu), OR_INDEXES,
166+
(void *) APR_XtOffsetOf(imap_conf_rec, imap_menu), OR_INDEXES,
167167
"the type of menu generated: none, formatted, semiformatted, "
168168
"unformatted"),
169169
AP_INIT_TAKE1("ImapDefault", ap_set_string_slot,
170-
(void *) XtOffsetOf(imap_conf_rec, imap_default), OR_INDEXES,
170+
(void *) APR_XtOffsetOf(imap_conf_rec, imap_default), OR_INDEXES,
171171
"the action taken if no match: error, nocontent, referer, "
172172
"menu, URL"),
173173
AP_INIT_TAKE1("ImapBase", ap_set_string_slot,
174-
(void *) XtOffsetOf(imap_conf_rec, imap_base), OR_INDEXES,
174+
(void *) APR_XtOffsetOf(imap_conf_rec, imap_base), OR_INDEXES,
175175
"the base for all URL's: map, referer, URL (or start of)"),
176176
{NULL}
177177
};

modules/metadata/mod_unique_id.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* UUencoding modified by: Alvaro Martinez Echevarria <alvaro@lander.es>
6464
*/
6565

66-
#include "apr_general.h" /* for XtOffsetOf */
66+
#include "apr_general.h" /* for APR_XtOffsetOf */
6767

6868
#include "httpd.h"
6969
#include "http_config.h"
@@ -187,15 +187,15 @@ static void unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *p
187187
/*
188188
* Calculate the sizes and offsets in cur_unique_id.
189189
*/
190-
unique_id_rec_offset[0] = XtOffsetOf(unique_id_rec, stamp);
190+
unique_id_rec_offset[0] = APR_XtOffsetOf(unique_id_rec, stamp);
191191
unique_id_rec_size[0] = sizeof(cur_unique_id.stamp);
192-
unique_id_rec_offset[1] = XtOffsetOf(unique_id_rec, in_addr);
192+
unique_id_rec_offset[1] = APR_XtOffsetOf(unique_id_rec, in_addr);
193193
unique_id_rec_size[1] = sizeof(cur_unique_id.in_addr);
194-
unique_id_rec_offset[2] = XtOffsetOf(unique_id_rec, pid);
194+
unique_id_rec_offset[2] = APR_XtOffsetOf(unique_id_rec, pid);
195195
unique_id_rec_size[2] = sizeof(cur_unique_id.pid);
196-
unique_id_rec_offset[3] = XtOffsetOf(unique_id_rec, counter);
196+
unique_id_rec_offset[3] = APR_XtOffsetOf(unique_id_rec, counter);
197197
unique_id_rec_size[3] = sizeof(cur_unique_id.counter);
198-
unique_id_rec_offset[4] = XtOffsetOf(unique_id_rec, thread_index);
198+
unique_id_rec_offset[4] = APR_XtOffsetOf(unique_id_rec, thread_index);
199199
unique_id_rec_size[4] = sizeof(cur_unique_id.thread_index);
200200
unique_id_rec_total_size = unique_id_rec_size[0] + unique_id_rec_size[1] +
201201
unique_id_rec_size[2] + unique_id_rec_size[3] +

modules/test/mod_autoindex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ static const command_rec autoindex_cmds[] =
582582
AP_INIT_FLAG("FancyIndexing", fancy_indexing, NULL, DIR_CMD_PERMS,
583583
"Limited to 'on' or 'off' (superseded by IndexOptions FancyIndexing)"),
584584
AP_INIT_TAKE1("DefaultIcon", ap_set_string_slot,
585-
(void *) XtOffsetOf(autoindex_config_rec, default_icon),
585+
(void *) APR_XtOffsetOf(autoindex_config_rec, default_icon),
586586
DIR_CMD_PERMS, "an icon URL"),
587587
{NULL}
588588
};

server/core.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,7 +2709,7 @@ AP_INIT_RAW_ARGS("<LocationMatch", urlsection, (void*)1, RSRC_CONF,
27092709
AP_INIT_RAW_ARGS("<FilesMatch", filesection, (void*)1, OR_ALL,
27102710
"Container for directives affecting files matching specified patterns"),
27112711
AP_INIT_TAKE1("AuthType", ap_set_string_slot,
2712-
(void*)XtOffsetOf(core_dir_config, ap_auth_type), OR_AUTHCFG,
2712+
(void*)APR_XtOffsetOf(core_dir_config, ap_auth_type), OR_AUTHCFG,
27132713
"An HTTP authorization type (e.g., \"Basic\")"),
27142714
AP_INIT_TAKE1("AuthName", set_authname, NULL, OR_AUTHCFG,
27152715
"The authentication realm (e.g. \"Members Only\")"),
@@ -2738,7 +2738,7 @@ AP_INIT_RAW_ARGS("AllowOverride", set_override, NULL, ACCESS_CONF,
27382738
AP_INIT_RAW_ARGS("Options", set_options, NULL, OR_OPTIONS,
27392739
"Set a number of attributes for a given directory"),
27402740
AP_INIT_TAKE1("DefaultType", ap_set_string_slot,
2741-
(void*)XtOffsetOf (core_dir_config, ap_default_type),
2741+
(void*)APR_XtOffsetOf (core_dir_config, ap_default_type),
27422742
OR_FILEINFO, "the default MIME type for untypable files"),
27432743

27442744
/* Old server config file commands */
@@ -2749,17 +2749,17 @@ AP_INIT_TAKE1("HostnameLookups", set_hostname_lookups, NULL,
27492749
"\"on\" to enable, \"off\" to disable reverse DNS lookups, or \"double\" to "
27502750
"enable double-reverse DNS lookups"),
27512751
AP_INIT_TAKE1("ServerAdmin", set_server_string_slot,
2752-
(void *)XtOffsetOf (server_rec, server_admin), RSRC_CONF,
2752+
(void *)APR_XtOffsetOf (server_rec, server_admin), RSRC_CONF,
27532753
"The email address of the server administrator"),
27542754
AP_INIT_TAKE1("ServerName", set_server_string_slot,
2755-
(void *)XtOffsetOf (server_rec, server_hostname), RSRC_CONF,
2755+
(void *)APR_XtOffsetOf (server_rec, server_hostname), RSRC_CONF,
27562756
"The hostname of the server"),
27572757
AP_INIT_TAKE1("ServerSignature", set_signature_flag, NULL, OR_ALL,
27582758
"En-/disable server signature (on|off|email)"),
27592759
AP_INIT_TAKE1("ServerRoot", set_server_root, NULL, RSRC_CONF,
27602760
"Common directory of server-related files (logs, confs, etc.)"),
27612761
AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
2762-
(void *)XtOffsetOf (server_rec, error_fname), RSRC_CONF,
2762+
(void *)APR_XtOffsetOf (server_rec, error_fname), RSRC_CONF,
27632763
"The filename of the error log"),
27642764
AP_INIT_RAW_ARGS("ServerAlias", set_server_alias, NULL, RSRC_CONF,
27652765
"A name or names alternately used to access the server"),
@@ -2802,7 +2802,7 @@ AP_INIT_TAKE1("LimitRequestFieldsize", set_limit_req_fieldsize, NULL,
28022802
AP_INIT_TAKE1("LimitRequestFields", set_limit_req_fields, NULL, RSRC_CONF,
28032803
"Limit (0 = unlimited) on max number of header fields in a request message"),
28042804
AP_INIT_TAKE1("LimitRequestBody", set_limit_req_body,
2805-
(void*)XtOffsetOf(core_dir_config, limit_req_body), OR_ALL,
2805+
(void*)APR_XtOffsetOf(core_dir_config, limit_req_body), OR_ALL,
28062806
"Limit (in bytes) on maximum size of request message body"),
28072807
AP_INIT_TAKE1("LimitXMLRequestBody", set_limit_xml_req_body, NULL, OR_ALL,
28082808
"Limit (in bytes) on maximum size of an XML-based request "
@@ -2811,23 +2811,23 @@ AP_INIT_TAKE1("LimitXMLRequestBody", set_limit_xml_req_body, NULL, OR_ALL,
28112811
/* System Resource Controls */
28122812
#ifdef RLIMIT_CPU
28132813
AP_INIT_TAKE12("RLimitCPU", set_limit_cpu,
2814-
(void*)XtOffsetOf(core_dir_config, limit_cpu),
2814+
(void*)APR_XtOffsetOf(core_dir_config, limit_cpu),
28152815
OR_ALL, "Soft/hard limits for max CPU usage in seconds"),
28162816
#else
28172817
AP_INIT_TAKE12("RLimitCPU", no_set_limit, NULL,
28182818
OR_ALL, "Soft/hard limits for max CPU usage in seconds"),
28192819
#endif
28202820
#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined (RLIMIT_AS)
28212821
AP_INIT_TAKE12("RLimitMEM", set_limit_mem,
2822-
(void*)XtOffsetOf(core_dir_config, limit_mem),
2822+
(void*)APR_XtOffsetOf(core_dir_config, limit_mem),
28232823
OR_ALL, "Soft/hard limits for max memory usage per process"),
28242824
#else
28252825
AP_INIT_TAKE12("RLimitMEM", no_set_limit, NULL,
28262826
OR_ALL, "Soft/hard limits for max memory usage per process"),
28272827
#endif
28282828
#ifdef RLIMIT_NPROC
28292829
AP_INIT_TAKE12("RLimitNPROC", set_limit_nproc,
2830-
(void*)XtOffsetOf(core_dir_config, limit_nproc),
2830+
(void*)APR_XtOffsetOf(core_dir_config, limit_nproc),
28312831
OR_ALL, "soft/hard limits for max number of processes per uid"),
28322832
#else
28332833
AP_INIT_TAKE12("RLimitNPROC", no_set_limit, NULL,

0 commit comments

Comments
 (0)