[Patches] [ python-Patches-639371 ] Removal of FreeBSD 5.0 specific test

noreply@sourceforge.net noreply@sourceforge.net
Thu, 21 Nov 2002 12:42:01 -0800


Patches item #639371, was opened at 2002-11-16 17:48
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=639371&group_id=5470

Category: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Marc Recht (marc)
Assigned to: Martin v. L÷wis (loewis)
Summary: Removal of FreeBSD 5.0 specific test

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-21 21:42

Message:
Logged In: YES 
user_id=21627

Thanks for the patch. Accepted as

configure 1.360
configure.in 1.371
pyconfig.h.in 1.62


----------------------------------------------------------------------

Comment By: Marc Recht (marc)
Date: 2002-11-18 16:42

Message:
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..
 

----------------------------------------------------------------------

Comment By: Marc Recht (marc)
Date: 2002-11-18 00:19

Message:
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.

----------------------------------------------------------------------

Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-17 21:49

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=639371&group_id=5470