Vanilla List Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [VANILLA-LIST:2098] Bobs recent changes in the CVS tree
On Sun, 14 Mar 1999 you wrote:
>Quoting Kurt Siegl (007@freemail.at):
>> No please don't do that. The config.h file should only include the things
>> required for every file. In fact it should not include anything and should
>> be placed as the first include it each C-file. It's only purpose is to
>> set all the config variables.
>
>Then a total re-do of the config.h file is required.
Actually most of the things are still clean, since I originally wrote
all that stuff.
>First, I believe it IS included in every file already.
At least all cleaned up files have this. I don't know if the xsg
stuff is already using the autoconf stuff. Last time I checked it wasn't.
>Second, there is many things in config.h that do not need to be in
>every file. These things where there before I did the Solaris changes.
I know, people tend to make quick hacks which stay forever.
>The overhead is only there if the feature is defined.
Which means that you will include for example xpm.h in every file even
if you need it only in one. In particular when compiling in debug mode
the overhead is quite a lot.
>#if defined(HAVE_SYS_FILIO_H)
>#include <sys/filio.h>
>#endif
>
>You'd like to see in the C files, the above statement instead of in
>the config.h?
No, that's why I invented the #include #defined concept.
In the config.h file you define:
#ifdef HAVE_SYS_FILIO_H
#define INC_SYS_FILIO <sys/filio.h>
#else
#define INC_SYS_FILIO NULLFILE
#endif
and in the C files you only need to include
#include INC_SYS_FILIO
That's how the concept has been originally designed.
An other recent addon to the autconf stuff which is not correct is the warning:
configure: warning: If you are running Linux and RSA make sure to get our gmp package. See http://vanilla.us.netrek.org
if you don't have the mp.h header files.
The problem I asume you like to address with this check here has nothing
to do with Linux.
With GMP 2.0 the GMP package does not include a mp.h BSD compatibility
package anymore. Since Linux uses now GMP 2.x you will see this problem
there. Most other Unix systems have a BSD MP package included, which
doesn't give you this problem.
With my recent additions autoconfig properly detect GMP 2.x and define
some macros translating BSD MP calls to GMP calls.
To use them you need a few fixes in the RSA package, which are done
already for the free world (NO US part ;-) ) version.
To fix the US part you basically have to add:
#include "../config.h"
#include INC_MP
MPTYPEDEF
on top and replace the MINT type with MPTYPE
and assigments like:
temp = itom(0);
with
assignItom(temp,0);
Since I don't know the crypted code I can't tell you much more.
Kurt (007)
--
Kurt Siegl / Franzberg 4, A-4483 Hargelsberg, Austria
Email: 007@netrek.org Tel (ISDN): *(7225)7017
URL: http://www.ooenet.at/user/siegl/kurt/