Subject: Re: libpam build problems
To: Emmanuel Dreyfus <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 02/19/2005 12:15:59
On Feb 19, 3:35pm, firstname.lastname@example.org (Emmanuel Dreyfus) wrote:
-- Subject: libpam build problems
| In order to cross-compile libpam from amd64 to macppc, I had to apply the
| attached patches to the source. Does that need to be committed and propagated to
| OpenPAM, or is there a lint flag that needs to get rid of in our build system?
| There are two distincts problems: sizeof's result is not of type size_t, and
| lint will complain about that when sizeof is used as an argument for a function
| that wants size_t (e.g.: calloc and friends). Lint shuts up if I add a (size_t)
| Second problem: *data = (void *)(intptr_t)dp->data; bugs because converting a
| pointer to int may loose bits. Indeed, but where is the conversion? Removing the
| (intptr_t) cast cause lint to shut up.
The cross-compiler binaries are broken. sizeof returns size_t and
intptr_t is guaranteed not to lose conversion bits. There is no
point in adding those patches.