[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Porting KDE 2 (1.90) to other Unixes ...
From:       Michael Koch <m_koch () bigfoot ! de>
Date:       2000-05-11 6:10:43
[Download RAW message or body]

Am Don, 11 Mai 2000 schrieb Thomas Leitner:
> On Wed, 10 May 2000, David Faure wrote:
> 
> > On Wed, May 10, 2000 at 08:39:44PM +0200, Thomas Leitner wrote:
> > > 
> > > The first problem: Under Tru64, there's no "setenv" system call. In my
> > > 1.1.2 port, I used to work around this with something like this:
> > > 
> > > #define setenv(a, b, c) \
> > >         { char buf[8192]; sprintf(buf, "%s=%s", a, b); putenv(buf); }
> > > 
> > > The question: Is there an include file which is included by *ALL* KDE 
> > > source files where I can put such workarounds in order to avoid having
> > > to mess with each individual source file? It would also help to work
> > > around similar problems.
> > 
> > You don't need that.
> > kdelibs/kdecore/fakes.cpp provides an implementation for setenv
> > (obviously using putenv) if the system doesn't have it.
> > And config.h.bot provides the prototype for setenv in this case.
> > So the "real solution" is already in place. Did you actually hit a problem
> > while trying to compile KDE ?
> 
> Yes I did. It first showed up here:
> 
> gmake[3]: Entering directory `/home/kde2/kdelibs/kdecore'
> /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H
> -I. -I. -I.. -I./../libltdl/ -I../dcop -I../kdecore -I../kdeui
> -I/home/kde2/qt-copy/include -I. -I/usr/local/kde2/include
> -DQT_NO_ASCII_CAST -DQT_NO_COMPAT   -O2 -fno-exceptions -fno-rtti
> -fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes
> -Wwrite-strings -Wno-long-long -fno-builtin -I/usr/local/kde2/include
> -I/home/kde2/qt-copy/include -I.  -frtti  -c kapp.cpp
> g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./../libltdl/ -I../dcop -I../kdecore
> -I../kdeui -I/home/kde2/qt-copy/include -I. -I/usr/local/kde2/include
> -DQT_NO_ASCII_CAST -DQT_NO_COMPAT -O2 -fno-exceptions -fno-rtti
> -fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes
> -Wwrite-strings -Wno-long-long -fno-builtin -I/usr/local/kde2/include
> -I/home/kde2/qt-copy/include -I. -frtti -Wp,-MD,.deps/kapp.pp -c kapp.cpp
> -DPIC -o kapp.lo
> kapp.cpp: In method `void KApplication::propagateSessionManager()':
> kapp.cpp:449: `::setenv' undeclared (first use here)
> 
> However, "setenv" was only an example. I've stumbled accross many
> similar problems which could be solved easily without modifying the
> source files when I had kind of an "os.h" include file which would
> be included in each and every source file. 
> 
> Any ideas?

I think we need a header file for kdelibs/kdecore/fakes.cpp. this can be
included in such cases then. But it should only be included if one plaftform
has problems with a file not in everyone.


Ciao,
Michael
--
koch@kde.org, m_koch@bigfoot.de
http://heaven.riednet.wh.tu-darmstadt.de/~mkoch

To me vi is Zen.  To use vi is to practice zen. Every command is
a koan. Profound to the user, unintelligible to the uninitiated.
You discover truth everytime you use it.
                                 -- reddy@lion.austin.ibm.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic