[FFmpeg-devel] [PATCH] add _XOPEN_SOURCE definition to tools/trasher.c
Michael Niedermayer
michaelni
Tue Mar 24 17:17:19 CET 2009
On Tue, Mar 24, 2009 at 08:15:26AM +0100, Diego Biurrun wrote:
> On Tue, Mar 24, 2009 at 01:29:32AM +0100, Michael Niedermayer wrote:
> > On Tue, Mar 24, 2009 at 12:01:04AM +0100, Diego Biurrun wrote:
> > > On Mon, Mar 23, 2009 at 10:32:16PM +0000, M?ns Rullg?rd wrote:
> > > > Diego Biurrun <diego at biurrun.de> writes:
> > > >
> > > > > When compiling tools/trasher.c the following warnings appear:
> > > > >
> > > > > tools/trasher.c: In function 'main':
> > > > > tools/trasher.c:44: warning: implicit declaration of function 'srandom'
> > > > > tools/trasher.c:51: warning: implicit declaration of function 'random'
> > > > >
> > > > > According to
> > > > >
> > > > > http://www.opengroup.org/onlinepubs/009695399/functions/srandom.html
> > > > >
> > > > > (s)random is an XSI extension, so adding
> > > > >
> > > > > #define _XOPEN_SOURCE 600
> > > > >
> > > > > to the file seems to be the correct solution.
> > > >
> > > > You attached an empty file. I don't think I've seen that before. And
> > > > in the same breath as commenting on somebody else's lack of patch too...
> > >
> > > Clearly, I was destined to come up with clever new ways to botch patch
> > > attachment. Just forgetting it for the 999th time would not give
> > > anybody comic relief...
> >
> > you could post the patch and attach the reply next time
>
> :)
>
> > about the patch, why not use lfg lcg or any other generate we have?
>
> It would considerably bloat the size of the program. I think the idea
> is for those tiny tools to be standalone. random() seems to be good
> enough for this use case.
what about marsaglias KISS99 generator or even
a LCG, that would just be state = state*C0 + C1
random() has the disadvantage that it returns different values on different
platorms, making debuging and reproducing issues harder.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090324/830cf3ee/attachment.pgp>
More information about the ffmpeg-devel
mailing list