Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: Nikola Milutinovic <Nikola.Milutinovic@ev.co.yu>
Subject: PGP 5.0i compile problem - LOCATED
Date: 1999/01/19	[thread overview]
Message-ID: <36A4749D.37F4F8D4@ev.co.yu> (raw)

Hi all.

There was a post, a week or two ago, regarding problems when compiling
Preaty Good Privacy 5.0i on Digital UNIX. The error message was about
lines with "BIG", "LITTLE" and "BIGLITTLE" macros, which were taken as
functions.

LOCATION (so far)
-----------------
The problem lies in several files, this particular in
"./src/lib/bn/bni.h". There are problems in "bngermain.c" and "bni32.c",
in the same directory, as well.

PROBLEM
-------
Several lines containing conditional pre-processor directives "#if",
"#ifdef", "#ifndef" and "#endif" were not placed in the 1st column of
the line, they were in. In other words, they were indented. This caused
cpp to drop them from compiling, causing "a lot of fun" for the cc.
I.e.:

	/* Do we want bnYield()? */
	#ifndef BNYIELD
	#define BNYIELD 0
	#endif

instead of

/* Do we want bnYield()? */
#ifndef BNYIELD
#define BNYIELD 0
#endif

I'm not sure what the standard says about CPP directives. I remember
reading that NewLines, Tabs and Spaces are treated as WhiteSpace and
that you can write the whole program in a single line, if you like.
Well, not with Digital, apparently. This problem is totaly the "feature"
of cpp.

This problem manifested itself on both 4.0D and 3.2G versions of Digital
UNIX.

WORKAROUND
----------
Since this feature of cpp persists in both 3.2 and in 4.0 versions, it
is highly unlikely we'll see it changed. The only thing that you can do
is delete all such indentations from the code. The cc (cpp) will issue a
warning on every such line, so it shouldn't be too difficult.

Any feedback, sugestions and advice is welcome.

Nix.



             reply	other threads:[~1999-01-19  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-19  5:00 Nikola Milutinovic [this message]
1999-01-20  5:00 ` PGP 5.0i compile problem - LOCATED Andrew Moar
1999-01-20  5:00   ` Ray Bellis
1999-01-20  5:00     ` John Parks
1999-01-21  5:00     ` Martin Vorlaender
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox