apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60539] New: Add possibility to use cached ac_cv_strerror_r_rc_int for cross compiles
Date Sat, 31 Dec 2016 16:40:28 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60539

            Bug ID: 60539
           Summary: Add possibility to use cached ac_cv_strerror_r_rc_int
                    for cross compiles
           Product: APR
           Version: HEAD
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: APR
          Assignee: bugs@apr.apache.org
          Reporter: sebastian_ml@gmx.net
  Target Milestone: ---

Created attachment 34573
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34573&action=edit
Patch to allow user to provide variable ac_cv_strerror_r_rc_int

Hello all,

When cross-compiling, apr sets ac_cv_strerror_r_rc_int=no. While this
assumption is likely true in most cases, it's not true in all cases. For
instance when cross-compiling with a musl toolchain it's not true (strerror_r
returns int). We get a compiler warning there:

misc/unix/errorcodes.c: In function 'native_strerror':
misc/unix/errorcodes.c:358:9: warning: assignment makes pointer from integer
without a cast [-Wint-conversion]
     msg = strerror_r(statcode, buf, bufsize);
         ^

I propose that the user should have the possibility to specify whether or not
strerror_r returns an int or not by providing ac_cv_strerror_r_rc_int=yes (or
no) as a variable when running ./configure. I've attached a patch that adds
this possibility without changing the current default of assuming a non-int
return when cross-compiling.

Kind regards,
Sebastian

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message