This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++ testsuite regressions


David Edelsohn <dje@watson.ibm.com> writes:

| >>>>> Paolo Carlini writes:
| 
| Paolo> Does the below help? Otherwise something is very misteriously broken
| Paolo> wrt  _GLIBCXX_HAVE_SETENV...
| 
| 	cstdlib already is included via stdc++.h.  That is not the
| problem.
| 
| 	The problem is that setenv() only is present in stdlib.h with
| XOPEN 6.  I will change the GCC AIX configuration to define the right
| macro and see if that helps.
| 
| 	However, libstdc++ cstdlib refers to getenv but not to setenv.
| The testcase works without that addition, but I am not sure if that is
| correct.  However because of the weird XOPEN changes, adding that might
| break some targets.

You're probably right.  
setenv() is -not- a C standard function.  So, we should use it only if
we do know that the target supports it and the set of compiler options
we use enable that function to be present.
_GLIBCXX_HAVE_SETENV by itself is insufficient because its value is
determined at configure time, and therefore depends on the set of
options used to test its presence/absence.  That set of options is not
necessarily the ones we use to run the testsuite, even less what users
would use to compile their programs.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]