summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbojan <bojan@13f79535-47bb-0310-9956-ffa450edef68>2008-05-29 00:08:39 +0000
committerbojan <bojan@13f79535-47bb-0310-9956-ffa450edef68>2008-05-29 00:08:39 +0000
commit955f301612513b69f9ddde9caee23c5c66dbce84 (patch)
tree7b93361d56978761a142ae6a74ad85f2bbd45899
parent31ec640d7dcf4d99f64f9d3417328554b1263a4c (diff)
downloadlibapr-955f301612513b69f9ddde9caee23c5c66dbce84.tar.gz
Backport r661159 from the trunk.
If -Wall is turned on, result of compile tests may be altered. Use the variable to avoid warnings. Trivial style fixes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@661160 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build/apr_hints.m424
-rw-r--r--build/apr_network.m48
2 files changed, 18 insertions, 14 deletions
diff --git a/build/apr_hints.m4 b/build/apr_hints.m4
index d8dc3cf5f..66837b63a 100644
--- a/build/apr_hints.m4
+++ b/build/apr_hints.m4
@@ -415,19 +415,19 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
APR_ADDTO(CPPFLAGS, [-D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1])
;;
*-ibm-os390)
- APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
- APR_SETIFNULL(apr_sysvsem_is_global, [yes])
- APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
- APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
- AC_DEFINE(HAVE_ZOS_PTHREADS, 1, [Define for z/OS pthread API nuances])
- APR_ADDTO(CPPFLAGS, [-U_NO_PROTO -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1])
- ;;
+ APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
+ APR_SETIFNULL(apr_sysvsem_is_global, [yes])
+ APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
+ APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
+ AC_DEFINE(HAVE_ZOS_PTHREADS, 1, [Define for z/OS pthread API nuances])
+ APR_ADDTO(CPPFLAGS, [-U_NO_PROTO -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1])
+ ;;
*-ibm-as400)
- APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
- APR_SETIFNULL(apr_process_lock_is_global, [yes])
- APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
- APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
- ;;
+ APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
+ APR_SETIFNULL(apr_process_lock_is_global, [yes])
+ APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
+ APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
+ ;;
*cygwin*)
APR_ADDTO(CPPFLAGS, [-DCYGWIN])
;;
diff --git a/build/apr_network.m4 b/build/apr_network.m4
index dbef435d4..192fcd817 100644
--- a/build/apr_network.m4
+++ b/build/apr_network.m4
@@ -244,6 +244,8 @@ APR_TRY_COMPILE_NO_WARNING([
],[
int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
(char *) 0, 0, (struct hostent **) 0, &tmp);
+/* use tmp to suppress the warning */
+tmp=0;
], ac_cv_gethostbyname_r_style=glibc2, ac_cv_gethostbyname_r_style=none))
if test "$ac_cv_gethostbyname_r_style" = "glibc2"; then
@@ -269,8 +271,10 @@ APR_TRY_COMPILE_NO_WARNING([
#endif
],[
int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
- (struct hostent_data *) 0);],
-ac_cv_gethostbyname_r_arg=hostent_data, ac_cv_gethostbyname_r_arg=char))
+ (struct hostent_data *) 0);
+/* use tmp to suppress the warning */
+tmp=0;
+], ac_cv_gethostbyname_r_arg=hostent_data, ac_cv_gethostbyname_r_arg=char))
if test "$ac_cv_gethostbyname_r_arg" = "hostent_data"; then
AC_DEFINE(GETHOSTBYNAME_R_HOSTENT_DATA, 1, [Define if gethostbyname_r has the hostent_data for the third argument])