On Sun, 7 Jan 2007, Jeff Johnson wrote:
> On 1/5/07, Robert Kennedy <robertk motown.cc.utexas.edu> wrote:
> ...
>> fts.c: In function `fts_build':
>> fts.c:819: error: `USHRT_MAX' undeclared (first use
in this function)
>> fts.c:819: error: (Each undeclared identifier is
reported only once
>> fts.c:819: error: for each function it appears in.)
>> fts.c: In function `fts_palloc':
>> fts.c:1128: error: `USHRT_MAX' undeclared (first
use in this function)
>> fts.c: In function `fts_safe_changedir':
>
> This patch should "fix", its not like
USHRT_MAX does anything real or useful:
> Index: fts.c
>
============================================================
=======
> RCS file: /cvs/devel/rpm/rpmio/fts.c,v
> retrieving revision 1.11.2.5
> diff -u -b -B -w -p -r1.11.2.5 fts.c
> --- fts.c 24 Nov 2006 17:34:48 -0000
1.11.2.5
> +++ fts.c 7 Jan 2007 13:28:56 -0000
>  -80,6 +80,9  static char sccsid[] = " (#)fts.c
8.6 (B
> # define __fchdir fchdir
> #endif
>
> +#if !defined(USHRT_MAX)
> +#define USHRT_MAX 65535
> +#endif
>
> /* Largest alignment size needed, minus one.
> Usually long double is the worst case. */
>
>> fts.c:1204: warning: passing arg 2 of `fstat' from
incompatible pointer
>> type
>
> Hmmm, this might need investigation, "struct
stat64 *" is perhaps incorrect
> for your solaris build environment.
It is a wider problem beyond USHRT_MAX. All the constants
that rpm
tried to use from sys/types.h (USHRT_MAX, LONG_MIN,
LONG_MAX, INT_MIN, and
INT_MAX) have the same problem. I defined them all with -D
flags to check
and it made it through. My build environment is the forte
compilers. The
machine is 64-bit but the target should just be plain old
32-bit sparc.
Now I am running into 16 pages of "Text relocation
against unknown symbol"
errors at the final linking stage. My understanding of
relocation on
SPARC architectures is lacking, but I was under the
impression that if the
libraries were all compiled with -fPIC (or not) that it
should work out
OK.
Cheers,
Robert Kennedy
_______________________________________________
Rpm-devel mailing list
Rpm-devel lists.dulug.duke.edu
https://lists.dulug.duke.edu/mailman/listinfo/rpm-devel
a>
|