This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Removal of FreeBSD 5.0 specific test
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, marc
Priority: normal Keywords: patch

Created on 2002-11-16 16:48 by marc, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fbsd.diff marc, 2002-11-16 16:48 Removal of FreeBSD specific case
fbsd_2.diff marc, 2002-11-18 15:42 cleaner version of the patch
Messages (5)
msg41688 - (view) Author: Marc Recht (marc) Date: 2002-11-16 16:48
After latest Additions to the FreeBSD 5.0-current
headers, the
special case isn't needed any longer. The two last
problematic 
functions are ctermid_r and setgroups which aren't
defined in the POSIX/XOPEN case. This patch works
around the problem by
setting CFLAGS with -Wall -Werror for gcc before
checking for
this two functions.
msg41689 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-17 20:49
Logged In: YES 
user_id=21627

Can you please explain the purpose of setting CFLAGS first
to MY_CPPFLAGS etc? Also, why are you seeting OLDFLAGS
between the if and the then?

Also, setting -Werror might have unintended site effects,
IMO, testing for a declaration is better done by checking
whether the address of a function can be taken.

Apart from that, the patch looks good.
msg41690 - (view) Author: Marc Recht (marc) Date: 2002-11-17 23:19
Logged In: YES 
user_id=205

The setting of CFLAGS is for the test below. For FreeBSD
XOPEN* and POSIX* would be sufficient, but IMO it's better
to set all (till this point) found CFLAGS. The setting of
OLDCFLAGS should have been one line above the if. It's used
to safe the CFLAGS before the tests and restore it later.
That allows to set the (problematic?) -Werror for the two
checks. 
But, silly me., you're right.. By checking the address of
the function it works without -Wall -Werror. Though the
CFLAGS are still needed.
msg41691 - (view) Author: Marc Recht (marc) Date: 2002-11-18 15:42
Logged In: YES 
user_id=205

Sometime I should just think twice.. 
So, this version of the patch is cleaner. The checks if the
address of the function in question could be taken and
instead of setting (gcc specific) compiler flags confdefs.h
is included.. So, it should work if all c compilers..
 
msg41692 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-21 20:42
Logged In: YES 
user_id=21627

Thanks for the patch. Accepted as

configure 1.360
configure.in 1.371
pyconfig.h.in 1.62
History
Date User Action Args
2022-04-10 16:05:54adminsetgithub: 37489
2002-11-16 16:48:27marccreate