[sr #110362] STRERROR_R_CHAR_P broken by 326c9a547423d25c621bc5c0ef76edbf6eda8c92

2020-11-05 Thread Zack Weinberg
Update of sr #110362 (project autoconf):

  Status:None => Done   
 Open/Closed:Open => Closed 

___

Follow-up Comment #1:

Fixed in c8b3f6987a7bbfe15ce2c2f04f308a6abc263d04.

Annoyingly, the test suite cannot detect this; we'd have to have a database of
expected *results* for the tests, which we don't, and we'd have to run the
test suite on an OS where strerror_r actually does return `char *`.  It
doesn't help that AC_COMPILE_IFELSE has no concept of "this compilation
failed, but not for the reason we think it might fail."

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110362] STRERROR_R_CHAR_P broken by 326c9a547423d25c621bc5c0ef76edbf6eda8c92

2020-11-04 Thread anonymous
URL:
  

 Summary: STRERROR_R_CHAR_P broken by
326c9a547423d25c621bc5c0ef76edbf6eda8c92
 Project: Autoconf
Submitted by: None
Submitted on: Wed 04 Nov 2020 09:08:51 PM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: pter...@gmail.com
 Open/Closed: Open
 Discussion Lock: Any
Operating System: GNU/Linux

___

Details:

After
http://git.savannah.gnu.org/cgit/autoconf.git/commit/lib/autoconf/functions.m4?id=326c9a547423d25c621bc5c0ef76edbf6eda8c92
detection fails because  is no longer included.


checking whether strerror_r is declared... yes
checking whether strerror_r returns char *... no



configure:11444: x86_64-mageia-linux-gnu-gcc -c -O2 -g -pipe -Wformat
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
--param=ssp-buffer-size=4 -fstack-protector-all
-fasynchronous-unwind-tables -I/usr/include/et -fPIC
-fno-strict-aliasing -fstack-protector-all -I/usr/include/et
conftest.c >&5
conftest.c: In function 'main':
conftest.c:77:14: warning: implicit declaration of function
'strerror_r' [-Wimplicit-function-declaration]
   77 |char x = *strerror_r (0, buf, sizeof buf);
  |  ^~
conftest.c:77:13: error: invalid type argument of unary '*' (have 'int')
   77 |char x = *strerror_r (0, buf, sizeof buf);
  | ^~~~
conftest.c:78:14: warning: initialization of 'char *' from 'int' makes
pointer from integer without a cast [-Wint-conversion]
   78 |char *p = strerror_r (0, buf, sizeof buf);
  |  ^~
configure:11444: $? = 1


The suspicious part of the commit is:


-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],





___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/