From: Ryan Bloom Date: Sun, 19 Aug 2001 05:48:19 +0000 (+0000) Subject: Update the Apache code to account for the XtOffset change in APR. X-Git-Tag: 2.0.25~280 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fdd45dc48bebda3bf2a10327c0708daeeddda54;p=apache 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 --- diff --git a/modules/aaa/mod_auth.c b/modules/aaa/mod_auth.c index 482b0249d4..1e0233089d 100644 --- a/modules/aaa/mod_auth.c +++ b/modules/aaa/mod_auth.c @@ -110,13 +110,13 @@ static const char *set_auth_slot(cmd_parms *cmd, void *offset, const char *f, static const command_rec auth_cmds[] = { AP_INIT_TAKE12("AuthUserFile", set_auth_slot, - (void *) XtOffsetOf(auth_config_rec, auth_pwfile), OR_AUTHCFG, + (void *) APR_XtOffsetOf(auth_config_rec, auth_pwfile), OR_AUTHCFG, "text file containing user IDs and passwords"), AP_INIT_TAKE12("AuthGroupFile", set_auth_slot, - (void *) XtOffsetOf(auth_config_rec, auth_grpfile), OR_AUTHCFG, + (void *) APR_XtOffsetOf(auth_config_rec, auth_grpfile), OR_AUTHCFG, "text file containing group names and member user IDs"), AP_INIT_FLAG("AuthAuthoritative", ap_set_flag_slot, - (void *) XtOffsetOf(auth_config_rec, auth_authoritative), + (void *) APR_XtOffsetOf(auth_config_rec, auth_authoritative), OR_AUTHCFG, "Set to 'no' to allow access control to be passed along to lower " "modules if the UserID is not known to this module"), diff --git a/modules/aaa/mod_auth_db.c b/modules/aaa/mod_auth_db.c index 3c13531280..958c43ab7e 100644 --- a/modules/aaa/mod_auth_db.c +++ b/modules/aaa/mod_auth_db.c @@ -146,19 +146,19 @@ static const char *set_db_slot(cmd_parms *cmd, void *offset, const char *f, cons static const command_rec db_auth_cmds[] = { AP_INIT_TAKE1("AuthDBUserFile", ap_set_file_slot, - (void *) XtOffsetOf(db_auth_config_rec, auth_dbpwfile), + (void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbpwfile), OR_AUTHCFG, "db database file containing user IDs and passwords"), AP_INIT_TAKE1("AuthDBGroupFile", ap_set_file_slot, - (void *) XtOffsetOf(db_auth_config_rec, auth_dbgrpfile), + (void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbgrpfile), OR_AUTHCFG, "db database file containing group names and member user IDs"), AP_INIT_TAKE12("AuthUserFile", set_db_slot, - (void *) XtOffsetOf(db_auth_config_rec, auth_dbpwfile), + (void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbpwfile), OR_AUTHCFG, NULL), AP_INIT_TAKE12("AuthGroupFile", set_db_slot, - (void *) XtOffsetOf(db_auth_config_rec, auth_dbgrpfile), + (void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbgrpfile), OR_AUTHCFG, NULL), AP_INIT_FLAG("AuthDBAuthoritative", ap_set_flag_slot, - (void *) XtOffsetOf(db_auth_config_rec, auth_dbauthoritative), + (void *) APR_XtOffsetOf(db_auth_config_rec, auth_dbauthoritative), OR_AUTHCFG, "Set to 'no' to allow access control to be passed along to lower modules if the userID is not known to this module"), {NULL} diff --git a/modules/aaa/mod_auth_dbm.c b/modules/aaa/mod_auth_dbm.c index 3d110e9659..c904a2d36e 100644 --- a/modules/aaa/mod_auth_dbm.c +++ b/modules/aaa/mod_auth_dbm.c @@ -142,19 +142,19 @@ static const char *set_dbm_slot(cmd_parms *cmd, void *offset, static const command_rec dbm_auth_cmds[] = { AP_INIT_TAKE1("AuthDBMUserFile", ap_set_file_slot, - (void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile), + (void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile), OR_AUTHCFG, "dbm database file containing user IDs and passwords"), AP_INIT_TAKE1("AuthDBMGroupFile", ap_set_file_slot, - (void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmgrpfile), + (void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmgrpfile), OR_AUTHCFG, "dbm database file containing group names and member user IDs"), AP_INIT_TAKE12("AuthUserFile", set_dbm_slot, - (void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile), + (void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile), OR_AUTHCFG, NULL), AP_INIT_TAKE12("AuthGroupFile", set_dbm_slot, - (void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmgrpfile), + (void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmgrpfile), OR_AUTHCFG, NULL), AP_INIT_FLAG("AuthDBMAuthoritative", ap_set_flag_slot, - (void *) XtOffsetOf(dbm_auth_config_rec, auth_dbmauthoritative), + (void *) APR_XtOffsetOf(dbm_auth_config_rec, auth_dbmauthoritative), 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"), {NULL} }; diff --git a/modules/aaa/mod_auth_ldap.c b/modules/aaa/mod_auth_ldap.c index 563a36e917..0beeda8c89 100644 --- a/modules/aaa/mod_auth_ldap.c +++ b/modules/aaa/mod_auth_ldap.c @@ -754,26 +754,26 @@ command_rec mod_auth_ldap_cmds[] = { "search on the branch ou=People, o=Airius."), AP_INIT_TAKE1("AuthLDAPBindDN", ap_set_string_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, binddn), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, binddn), OR_AUTHCFG, "DN to use to bind to LDAP server. If not provided, will do an anonymous bind."), AP_INIT_TAKE1("AuthLDAPBindPassword", ap_set_string_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, bindpw), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, bindpw), OR_AUTHCFG, "Password to use to bind to LDAP server. If not provided, will do an anonymous bind."), AP_INIT_FLAG("AuthLDAPRemoteUserIsDN", ap_set_flag_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, user_is_dn), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, user_is_dn), OR_AUTHCFG, "Set to 'on' to set the REMOTE_USER environment variable to be the full " "DN of the remote user. By default, this is set to off, meaning that " "the REMOTE_USER variable will contain whatever value the remote user sent."), AP_INIT_FLAG("AuthLDAPAuthoritative", ap_set_flag_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, auth_authoritative), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, auth_authoritative), OR_AUTHCFG, "Set to 'off' to allow access control to be passed along to lower modules if " "the UserID and/or group is not known to this module"), AP_INIT_FLAG("AuthLDAPCompareDNOnServer", ap_set_flag_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, compare_dn_on_server), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, compare_dn_on_server), OR_AUTHCFG, "Set to 'on' to force auth_ldap to do DN compares (for the \"require dn\" " "directive) using the server, and set it 'off' to do the compares locally " "(at the expense of possible false matches). See the documentation for " @@ -784,7 +784,7 @@ command_rec mod_auth_ldap_cmds[] = { "member and uniquemember"), AP_INIT_FLAG("AuthLDAPGroupAttributeIsDN", ap_set_flag_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, group_attrib_is_dn), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, group_attrib_is_dn), OR_AUTHCFG, "If set to 'on', auth_ldap uses the DN that is retrieved from the server for" "subsequent group comparisons. If set to 'off', auth_ldap uses the string" "provided by the client directly. Defaults to 'on'."), @@ -795,16 +795,16 @@ command_rec mod_auth_ldap_cmds[] = { "Defaults to always."), AP_INIT_FLAG("AuthLDAPEnabled", ap_set_flag_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, enabled), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, enabled), OR_AUTHCFG, "Set to off to disable auth_ldap, even if it's been enabled in a higher tree"), AP_INIT_FLAG("AuthLDAPFrontPageHack", ap_set_flag_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, frontpage_hack), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, frontpage_hack), OR_AUTHCFG, "Set to 'on' to support Microsoft FrontPage"), #ifdef APU_HAS_LDAP_STARTTLS AP_INIT_FLAG("AuthLDAPStartTLS", ap_set_flag_slot, - (void *)XtOffsetOf(mod_auth_ldap_config_t, starttls), OR_AUTHCFG, + (void *)APR_XtOffsetOf(mod_auth_ldap_config_t, starttls), OR_AUTHCFG, "Set to 'on' to start TLS after connecting to the LDAP server."), #endif /* APU_HAS_LDAP_STARTTLS */ diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index f48ae3285c..5e3fa6d843 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -585,7 +585,7 @@ static const command_rec autoindex_cmds[] = AP_INIT_RAW_ARGS("FancyIndexing", ap_set_deprecated, NULL, OR_ALL, "The FancyIndexing directive is no longer supported. Use IndexOptions FancyIndexing."), AP_INIT_TAKE1("DefaultIcon", ap_set_string_slot, - (void *) XtOffsetOf(autoindex_config_rec, default_icon), + (void *) APR_XtOffsetOf(autoindex_config_rec, default_icon), DIR_CMD_PERMS, "an icon URL"), {NULL} }; diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 928f349aa8..1863a77acd 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -464,10 +464,10 @@ AP_INIT_ITERATE2("AddLanguage", add_language, NULL, OR_FILEINFO, AP_INIT_ITERATE2("AddType", add_type, NULL, OR_FILEINFO, "a mime type followed by one or more file extensions"), AP_INIT_TAKE1("DefaultLanguage", ap_set_string_slot, - (void*)XtOffsetOf(mime_dir_config, default_language), OR_FILEINFO, + (void*)APR_XtOffsetOf(mime_dir_config, default_language), OR_FILEINFO, "language to use for documents with no other language file extension"), AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower, - (void *)XtOffsetOf(mime_dir_config, type), OR_FILEINFO, + (void *)APR_XtOffsetOf(mime_dir_config, type), OR_FILEINFO, "a media type"), AP_INIT_ITERATE("RemoveCharset", remove_charset, NULL, OR_FILEINFO, "one or more file extensions"), @@ -480,7 +480,7 @@ AP_INIT_ITERATE("RemoveLanguage", remove_language, NULL, OR_FILEINFO, AP_INIT_ITERATE("RemoveType", remove_type, NULL, OR_FILEINFO, "one or more file extensions"), AP_INIT_TAKE1("SetHandler", ap_set_string_slot_lower, - (void *)XtOffsetOf(mime_dir_config, handler), OR_FILEINFO, + (void *)APR_XtOffsetOf(mime_dir_config, handler), OR_FILEINFO, "a handler name"), AP_INIT_TAKE1("TypesConfig", set_types_config, NULL, RSRC_CONF, "the MIME types config file"), diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c index 4bb21a823b..2f2f2c86bb 100644 --- a/modules/mappers/mod_imap.c +++ b/modules/mappers/mod_imap.c @@ -163,15 +163,15 @@ static void *merge_imap_dir_configs(apr_pool_t *p, void *basev, void *addv) static const command_rec imap_cmds[] = { AP_INIT_TAKE1("ImapMenu", ap_set_string_slot, - (void *) XtOffsetOf(imap_conf_rec, imap_menu), OR_INDEXES, + (void *) APR_XtOffsetOf(imap_conf_rec, imap_menu), OR_INDEXES, "the type of menu generated: none, formatted, semiformatted, " "unformatted"), AP_INIT_TAKE1("ImapDefault", ap_set_string_slot, - (void *) XtOffsetOf(imap_conf_rec, imap_default), OR_INDEXES, + (void *) APR_XtOffsetOf(imap_conf_rec, imap_default), OR_INDEXES, "the action taken if no match: error, nocontent, referer, " "menu, URL"), AP_INIT_TAKE1("ImapBase", ap_set_string_slot, - (void *) XtOffsetOf(imap_conf_rec, imap_base), OR_INDEXES, + (void *) APR_XtOffsetOf(imap_conf_rec, imap_base), OR_INDEXES, "the base for all URL's: map, referer, URL (or start of)"), {NULL} }; diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c index 69a54174b4..cb953f5ee5 100644 --- a/modules/metadata/mod_unique_id.c +++ b/modules/metadata/mod_unique_id.c @@ -63,7 +63,7 @@ * UUencoding modified by: Alvaro Martinez Echevarria */ -#include "apr_general.h" /* for XtOffsetOf */ +#include "apr_general.h" /* for APR_XtOffsetOf */ #include "httpd.h" #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 /* * Calculate the sizes and offsets in cur_unique_id. */ - unique_id_rec_offset[0] = XtOffsetOf(unique_id_rec, stamp); + unique_id_rec_offset[0] = APR_XtOffsetOf(unique_id_rec, stamp); unique_id_rec_size[0] = sizeof(cur_unique_id.stamp); - unique_id_rec_offset[1] = XtOffsetOf(unique_id_rec, in_addr); + unique_id_rec_offset[1] = APR_XtOffsetOf(unique_id_rec, in_addr); unique_id_rec_size[1] = sizeof(cur_unique_id.in_addr); - unique_id_rec_offset[2] = XtOffsetOf(unique_id_rec, pid); + unique_id_rec_offset[2] = APR_XtOffsetOf(unique_id_rec, pid); unique_id_rec_size[2] = sizeof(cur_unique_id.pid); - unique_id_rec_offset[3] = XtOffsetOf(unique_id_rec, counter); + unique_id_rec_offset[3] = APR_XtOffsetOf(unique_id_rec, counter); unique_id_rec_size[3] = sizeof(cur_unique_id.counter); - unique_id_rec_offset[4] = XtOffsetOf(unique_id_rec, thread_index); + unique_id_rec_offset[4] = APR_XtOffsetOf(unique_id_rec, thread_index); unique_id_rec_size[4] = sizeof(cur_unique_id.thread_index); unique_id_rec_total_size = unique_id_rec_size[0] + unique_id_rec_size[1] + unique_id_rec_size[2] + unique_id_rec_size[3] + diff --git a/modules/test/mod_autoindex.c b/modules/test/mod_autoindex.c index 7489164148..a57f037300 100644 --- a/modules/test/mod_autoindex.c +++ b/modules/test/mod_autoindex.c @@ -582,7 +582,7 @@ static const command_rec autoindex_cmds[] = AP_INIT_FLAG("FancyIndexing", fancy_indexing, NULL, DIR_CMD_PERMS, "Limited to 'on' or 'off' (superseded by IndexOptions FancyIndexing)"), AP_INIT_TAKE1("DefaultIcon", ap_set_string_slot, - (void *) XtOffsetOf(autoindex_config_rec, default_icon), + (void *) APR_XtOffsetOf(autoindex_config_rec, default_icon), DIR_CMD_PERMS, "an icon URL"), {NULL} }; diff --git a/server/core.c b/server/core.c index e7cd0fd21b..880708e95f 100644 --- a/server/core.c +++ b/server/core.c @@ -2709,7 +2709,7 @@ AP_INIT_RAW_ARGS("parent[slot].pid = pid; #ifdef SCOREBOARD_FILE - lseek(scoreboard_fd, XtOffsetOf(scoreboard, parent[slot]), 0); + lseek(scoreboard_fd, APR_XtOffsetOf(scoreboard, parent[slot]), 0); force_write(scoreboard_fd, &ap_scoreboard_image->parent[slot], sizeof(process_score)); #endif