Bug 145560 - kdebase/config.h.cmake contains an incorrect prototype for unsetenv
Summary: kdebase/config.h.cmake contains an incorrect prototype for unsetenv
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-17 16:53 UTC by Steve Evans
Modified: 2007-05-17 17:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Change unsetenv to return int rather than void (413 bytes, patch)
2007-05-17 16:54 UTC, Steve Evans
Details
Change unsetenv to return int rather than void (correct version) (339 bytes, patch)
2007-05-17 16:55 UTC, Steve Evans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Evans 2007-05-17 16:53:41 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.4.6 
OS:                Solaris

(This is a problem with kdebase's build process, but kdebase cannot be picked as an application in bugs.kde.org, so I picked kwin as an arbitrary app in kdebase.)

The file kdebase/config.h.cmake has a prototype for unsetenv when the system does not provide one. Unfortunately it incorrectly specifies the return type as void when it should be int.

Why doesn't kdebase rely on the unsetenv prototype provided in kdefakes.h by including that file where unsetenv is used rather than duplicating the prototype?
Comment 1 Steve Evans 2007-05-17 16:54:24 UTC
Created attachment 20603 [details]
Change unsetenv to return int rather than void
Comment 2 Steve Evans 2007-05-17 16:55:50 UTC
Created attachment 20604 [details]
Change unsetenv to return int rather than void (correct version)

Sorry, I supplied the wrong file in the previous attachment
Comment 3 Lubos Lunak 2007-05-17 17:06:11 UTC
SVN commit 665654 by lunakl:

unsetenv() returns int. I wonder why we have the prototype in config.h?
CCMAIL: kde-core-devel@kde.org
BUG: 145560



 M  +1 -1      config.h.cmake  


--- trunk/KDE/kdebase/config.h.cmake #665653:665654
@@ -134,7 +134,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-void unsetenv (const char *);
+int unsetenv (const char *);
 #ifdef __cplusplus
 }
 #endif