[MPlayer-dev-eng] [patch] turn wordsize check from runtime to compile time
Mike Frysinger
vapier.adi at gmail.com
Thu Dec 6 23:54:17 CET 2007
On Dec 6, 2007 5:04 PM, Ivan Kalvachev <ikalvachev at gmail.com> wrote:
> On Dec 6, 2007 10:28 PM, Mike Frysinger <vapier.adi at gmail.com> wrote:
> > On May 7, 2007 12:06 PM, Mike Frysinger <vapier.adi at gmail.com> wrote:
> > > attached patch changes the sizeof(size_t) discovery process from a
> > > runtime check (which doesnt work when cross-compiling) to a compile
> > > time check (which does work when cross-compiling)
> > >
> > > tested on ppc/linux and blackfin/linux
> >
> > so what's it gonna take for this ? just realized that this patch was
> > never merged ... it still applies (once you change "$TMPO" to
> > "$TMPEXE" in the patch) to current trunk ...
>
> I'm not configure maintainer and I'm not even quite good in shell scripts.
> However, I think there are few things that may be improved.
> 1. Don't try to compile array[-1], with gcc you never know, it may
> actually compile it.
i highly doubt it. and if it does, gcc is broken, not the configure
check. this test case was distilled from autoconf, so if it's good
enough for them, it's good enough for a crazy custom hack of a
configure script that mplayer uses.
> Better try to use #if #error directives.
that wont work. this is compile, not preprocess.
> 2. No need to check for 0 case. What are we going to do if it succeeds?
then your compiler is a pos ?
> 3. I think that MP_WORDSIZE <bits> , your code returns it as <chars//bytes//>
it looks that way ... i'll tweak it and send out a new one.
thanks
-mike
More information about the MPlayer-dev-eng
mailing list