Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#15 Compilation Errors : MIPSEL LINUX

Complete and Stable
closed-out-of-date
Daniel Kouril
5
2006-09-04
2006-01-30
vijay
No

Cross compilation error fixed which was seen on :

Board : Toshiba MIPSEL processor core TX 3927 R3000
core [Applicable to similar series ]

Software :
Linux Kernel 2.4.28
mod_auth_kerb-5.0-rc6
httpd-2.2.0
krb5-1.4.2

ap_ series of APIs replaced with apr_ series as
described in the Apache API documentation.

DIFF between the original and the FIXED file:

diff /tmp/mod_auth_kerb-5.0-
rc6/src/mod_auth_kerb.c ./src/mod_auth_kerb.c
145c145
< (void*)APR_XtOffsetOf(kerb_auth_config,
var), \ ---
> (void*)APR_OFFSETOF(kerb_auth_config,
var), \ 234c234
< rec = (kerb_auth_config *) ap_pcalloc(p,
sizeof(kerb_auth_config));
---
> rec = (kerb_auth_config *) apr_pcalloc(p,
sizeof(kerb_auth_config));
252c252
< sec->krb_auth_realms= ap_pstrdup(cmd->pool, arg);
---
> sec->krb_auth_realms= apr_pstrdup(cmd->pool,
arg);
390,392c390,392
< tkt_file_p = ap_pstrdup(r->pool, tkt_file);
< ap_register_cleanup(r->pool, tkt_file_p,
< krb4_cache_cleanup,
ap_null_cleanup);
---
> tkt_file_p = apr_pstrdup(r->pool, tkt_file);
> // apr_register_cleanup(r->pool,
tkt_file_p,krb4_cache_cleanup, ap_null_cleanup);
> apr_pool_cleanup_register(r->pool,
tkt_file_p,krb4_cache_cleanup, ap_null_cleanup);
435c435
< user = ap_pstrdup(r->pool, sent_name);
---
> user = apr_pstrdup(r->pool, sent_name);
437,438c437,438
< user = ap_pstrcat(r->pool, user, ".",
sent_instance, NULL);
< user = ap_pstrcat(r->pool, user, "@", realm,
NULL);
---
> user = apr_pstrcat(r->pool, user, ".",
sent_instance, NULL);
> user = apr_pstrcat(r->pool, user, "@", realm,
NULL);
442c442
< ap_table_setn(r->subprocess_env, "KRBTKFILE",
tkt_file_p);
---
> apr_table_setn(r->subprocess_env, "KRBTKFILE",
tkt_file_p);
680c680
< ccname = ap_psprintf(r->pool, "FILE:%
s/krb5cc_apache_XXXXXX", P_tmpdir);
---
> ccname = apr_psprintf(r->pool, "FILE:%
s/krb5cc_apache_XXXXXX", P_tmpdir);
709,711c709,711
< ap_table_setn(r->subprocess_env, "KRB5CCNAME",
ccname);
< ap_register_cleanup(r->pool, ccname,
< krb5_cache_cleanup,
ap_null_cleanup);
---
> apr_table_setn(r->subprocess_env, "KRB5CCNAME",
ccname);
> // apr_register_cleanup(r->pool,
ccname, krb5_cache_cleanup, NULL);
> apr_pool_cleanup_register(r->pool,
ccname, krb5_cache_cleanup, NULL);
869c869
< MK_USER = ap_pstrdup (r->pool, name);
---
> MK_USER = apr_pstrdup (r->pool, name);
905c905
< err_msg = ap_pstrdup(p, prefix);
---
> err_msg = apr_pstrdup(p, prefix);
915c915
< err_msg = ap_pstrcat(p, err_msg, ": ",
(char*) status_string.value, NULL);
---
> err_msg = apr_pstrcat(p, err_msg, ": ",
(char*) status_string.value, NULL);
925c925
< err_msg = ap_pstrcat(p, err_msg,
---
> err_msg = apr_pstrcat(p, err_msg,
1138,1139c1138,1139
< input_token.length = ap_base64decode_len
(auth_param) + 1;
< input_token.value = ap_pcalloc(r->connection-
>pool, input_token.length);
---
> input_token.length = apr_base64_decode_len
(auth_param) + 1;
> input_token.value = apr_pcalloc(r->connection-
>pool, input_token.length);
1142c1142
< "ap_pcalloc() failed (not enough
memory)");
---
> "apr_pcalloc() failed (not enough
memory)");
1146c1146
< input_token.length = ap_base64decode
(input_token.value, auth_param);
---
> input_token.length = apr_base64_decode
(input_token.value, auth_param);
1174,1175c1174,1175
< len = ap_base64encode_len(output_token.length)
+ 1;
< token = ap_pcalloc(r->connection->pool, len +
1);
---
> len = apr_base64_encode_len
(output_token.length) + 1;
> token = apr_pcalloc(r->connection->pool, len +
1);
1178c1178
< "ap_pcalloc() failed (not enough
memory)");
---
> "apr_pcalloc() failed (not enough
memory)");
1183c1183
< ap_base64encode(token, output_token.value,
output_token.length);
---
> apr_base64_encode(token, output_token.value,
output_token.length);
1227c1227
< MK_USER = ap_pstrdup(r->pool, output_token.value);
---
> MK_USER = apr_pstrdup(r->pool,
output_token.value);
1288,1289c1288,1289
< ap_pstrcat(r->pool, "Negotiate ",
negotiate_ret_value, NULL);
< ap_table_add(r->err_headers_out, header_name,
negoauth_param);
---
> apr_pstrcat(r->pool, "Negotiate ",
negotiate_ret_value, NULL);
> apr_table_add(r->err_headers_out,
header_name, negoauth_param);
1292,1293c1292,1293
< ap_table_add(r->err_headers_out, header_name,
< ap_pstrcat(r->pool, "Basic
realm=\"", auth_name, "\"", NULL));
---
> apr_table_add(r->err_headers_out, header_name,
> apr_pstrcat(r->pool, "Basic
realm=\"", auth_name, "\"", NULL));
1301,1302c1301,1302
< ap_table_add(r->err_headers_out, header_name,
< ap_pstrcat(r->pool, "Basic
realm=\"", auth_name, "\"", NULL));
---
> apr_table_add(r->err_headers_out, header_name,
> apr_pstrcat(r->pool, "Basic
realm=\"", auth_name, "\"", NULL));

Feel free to mail me in case of any doubt

--
Vijay
vijay_vishy@yahoo.com

Discussion

  • vijay
    vijay
    2006-01-30

    Cross compilation errors fixed : Updated incompatible apache APIs

     
    Attachments
  • Daniel Kouril
    Daniel Kouril
    2006-09-04

    • assigned_to: nobody --> kouril
    • status: open --> closed-out-of-date
     
  • Daniel Kouril
    Daniel Kouril
    2006-09-04

    Logged In: YES
    user_id=770705

    As of version 5.1 the module compiles with apache 1.3, 2.0
    and 2.2. Thanks for your contribution.

    Daniel