Description of problem: Compiling a program using drand48(3) it is not declared, but withhout it there are no complaints. Version-Release number of selected component (if applicable): glibc-2.4-4, gcc-4.1.0-3 How reproducible: Always Steps to Reproduce: 1. Compile program given below with "gcc --std=c99 -c tst.c" 2. 3. Actual results: tst.c: In function âtstâ: tst.c:5: warning: implicit declaration of function âdrand48â Expected results: No warnings Additional info:
Created attachment 126331 [details] A little test program
That's correct, <stdlib.h> header content is mandated by ISO C99, and drand48 is not an ISO C99 function. Please read info libc 'Feature Test Macros' for details. E.g. -std=gnu99 instead of -std=c99, or -std=c99 -D_GNU_SOURCE, -std=c99 -D_XOPEN_SOURCE=600 and several other switches will provide the drand48 prototype.