Bug 72045 - setenv is not present on Solaris 8 (should use putenv)
Summary: setenv is not present on Solaris 8 (should use putenv)
Status: RESOLVED FIXED
Alias: None
Product: configure
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Solaris
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-07 11:42 UTC by David Rutitsky
Modified: 2004-01-07 16:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Attempt at fixing the problem (698 bytes, patch)
2004-01-07 15:58 UTC, Thiago Macieira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Rutitsky 2004-01-07 11:42:19 UTC
Version:            (using KDE KDE 3.1.94)
Compiler:          gcc 3.2 
OS:          Solaris

kurifiltertest.cpp: In function `int main(int, char**)':
kurifiltertest.cpp:147: `setenv' undeclared (first use this function)
kurifiltertest.cpp:147: (Each undeclared identifier is reported only once for 
   each function it appears in.)
/usr/local/gcc-3.2/include/c++/3.2/bits/stl_threads.h: At global scope:
/usr/local/gcc-3.2/include/c++/3.2/bits/stl_threads.h: In instantiation of `__gthread_mutex_t std::_Swap_lock_struct<0>::_S_swap_lock':
/usr/local/gcc-3.2/include/c++/3.2/bits/stl_threads.h:122:   instantiated from here
/usr/local/gcc-3.2/include/c++/3.2/bits/stl_threads.h:115: warning: missing 
   initializer for member `_pthread_mutex::<anonymous 
   struct>::__pthread_mutex_magic'
gmake[3]: *** [kurifiltertest.o] Error 1
gmake[3]: Leaving directory `/home/drutitsky/KDE3/kdelibs-3.1.94/kio/tests'
gmake[2]: *** [check-am] Error 2
gmake[2]: Leaving directory `/home/drutitsky/KDE3/kdelibs-3.1.94/kio/tests'
gmake[1]: *** [check-recursive] Error 1
gmake[1]: Leaving directory `/home/drutitsky/KDE3/kdelibs-3.1.94/kio'
gmake: *** [check-recursive] Error 1

Should use putenv instead setenv on Solaris. May be should bbe macro.
Comment 1 Maksim Orlovich 2004-01-07 15:09:05 UTC
setenv() should be provided by libkdefakes (it's under kdelibs/kdecore) when missing. So it sounds like configure for some reason decided you have setenv or such
Comment 2 Thiago Macieira 2004-01-07 15:58:39 UTC
Created attachment 4024 [details]
Attempt at fixing the problem

The error comes from the compiler, not from the linker. Which means all it
needs is a declaration, since libkdefakes in linked from libkdecore, which in
turn is linked from libkio.

Can you test the attached patch and see if it corrects the problem?

Note: this test also fails for me, but due to another reason. It seems to be a
"since 3.2" feature that isn't working.
Comment 3 Stephan Kulow 2004-01-07 16:20:17 UTC
how about including config.h then?
Comment 4 David Faure 2004-01-07 16:36:40 UTC
Subject: kdelibs/kio/tests

CVS commit by faure: 

This should fix the setenv problem on Solaris.
CCMAIL: 72045-done@bugs.kde.org


  M +1 -1      kurifiltertest.cpp   1.36


--- kdelibs/kio/tests/kurifiltertest.cpp  #1.35:1.36
@@ -1,3 +1,3 @@
-
+#include <config.h>
 #include <iostream>
 #include <stdlib.h>