C99 compatibility issue in setpgrp configure probe

Bug #2006768 reported by Florian Weimer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jupp
Fix Committed
Undecided
Unassigned

Bug Description

This didn't show up in the Gentoo testing because the check eventually fails on Linux, so the reason of the failure does not make a difference:

diff --git a/acinclude.m4 b/acinclude.m4
index f7f034f30673af13..a034285c6f6d24b4 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -13,7 +13,7 @@ AC_DEFUN([joe_SETPGRP],
 #endif
 int main() {
  /* exit succesfully if setpgrp() takes two args (*BSD systems) */
- exit(setpgrp(0, 0) != 0);
+ return setpgrp(0, 0) != 0;
 }],
    [joe_cv_setpgrp_void=no],
    [joe_cv_setpgrp_void=yes],

The Fedora tester does not take other errors in the same source file into account. (Maybe it should; but then it would not have found this issue.)

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

Florian Weimer (fweimer)
summary: - C99 compatibility issue in setprgrp configure probe
+ C99 compatibility issue in setpgrp configure probe
Revision history for this message
Thorsten Glaser (mirabilos) wrote :

Thanks, committed as commitid 10063E6501A7C427A7C (and applied to the other test in the file as well, I don’t know why they used exit(3) there).

Changed in jupp:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.