Bug 130829 - gcc 3.[45] with -std=c99, srand48() not declared in stdlib.h
Summary: gcc 3.[45] with -std=c99, srand48() not declared in stdlib.h
Keywords:
Status: CLOSED DUPLICATE of bug 130815
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-24 23:02 UTC by John Ellson
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:05:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Ellson 2004-08-24 23:02:58 UTC
Description of problem:
srand48() not declared in stdlib.h contrary to man 3 srand48

Version-Release number of selected component (if applicable):
glibc-headers-2.3.3-46
gcc35-3.5.0-0.9
gcc-3.4.1-9

How reproducible:
100%

Steps to Reproduce:
1.

ellson@ontap:~> cat bug.c
#include <stdlib.h>
int main() {
        srand48(123456);
        return (0);
}
ellson@ontap:~>  gcc35 -std=c99 bug.c
bug.c: In function `main':
bug.c:3: warning: implicit declaration of function 'srand48'
ellson@ontap:~>

2.
3.
  
Actual results:
warning about implicit declaration

Expected results:
no warning

Additional info:

Will someone please put me out of my misery here?   What am I missing 
with -std=c99  that causes all of these implicit declaration warnings?

Comment 1 Jakub Jelinek 2004-08-30 06:37:47 UTC
srand48 is SysV or X/Open API.

*** This bug has been marked as a duplicate of 130815 ***

Comment 2 Red Hat Bugzilla 2006-02-21 19:05:15 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


Note You need to log in before you can comment on or make changes to this bug.