[Bug bootstrap/39470] [melt] - lrand48_r() and srand48_r() are GNU extensions and are not portable
rob1weld at aol dot com
gcc-bugzilla@gcc.gnu.org
Sun Mar 15 23:18:00 GMT 2009
------- Comment #1 from rob1weld at aol dot com 2009-03-15 23:18 -------
Workaround:
Define this at top of one file and export it in the other:
struct drand48_data
{
unsigned short int __x[3]; /* Current state. */
unsigned short int __old_x[3]; /* Old state. */
unsigned short int __c; /* Additive const. in congruential formula. */
unsigned short int __init; /* Flag for initializing. */
unsigned long long int __a; /* Factor in congruential formula. */
};
Use these versions of __drand48_iterate(), nrand48_r(), lrand48_r() and
srand48_r() at the top of one of the files (with exports in the other):
http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/uclinux-h8/uClibc/libc/stdlib/drand48-iter.c?revision=1.1.1.2&view=markup
http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/uclinux-h8/uClibc/libc/stdlib/nrand48_r.c?view=markup&revision=1.1.1.1
http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/uclinux-h8/uClibc/libc/stdlib/lrand48_r.c?view=markup&revision=1.1.1.1
http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/uclinux-h8/uClibc/libc/stdlib/srand48_r.c?view=markup&revision=1.1.1.1
The build continues ...
Rob
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39470
More information about the Gcc-bugs
mailing list