[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: Thomas Leitner <tom () radar ! tu-graz ! ac ! at>
Date: 2000-05-11 6:04:13
[Download RAW message or body]
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?
Tom
--
--------------------------------------------------------------------------
Dr. Tom Leitner Dept. of Communications
Graz University of Technology,
e-mail : tom@radar.tu-graz.ac.at Inffeldgasse 12
Phone : +43-316-873-7455 A-8010 Graz / Austria / Europe
Fax : +43-316-463-697
Home page : http://wiis.tu-graz.ac.at/people/tom.html
PGP public key on : ftp://wiis.tu-graz.ac.at/pgp-keys/tom.asc or send
mail with subject "get Thomas Leitner" to pgp-public-keys@keys.pgp.net
--------------------------------------------------------------------------
Before we have the paperless office, we have the paperless toilet!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic