Thread: Getting source code for stdio.c

  1. #1
    Thang Le thavali's Avatar
    Join Date
    Jan 2011
    Location
    Earth
    Posts
    20

    Getting source code for stdio.c

    <<< split from dead thread stdio.c??? >>>
    i downloaded source code of GCC from : svn://gcc.gnu.org/svn/gcc/trunk
    And i try find the stdio.c file but i can't find it. Where is stdio.c stored ? In embedded system, we need re-direct the printf functions, so i need know how compiler can compile printf function if there hasn't stdio.c file ?

    Thanks

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    The standard C libraries aren't part of the gcc package. gcc is just the compiler. What you want to find is the source code for glibc (GNU Lib C).
    If you understand what you're doing, you're not learning anything.

  3. #3
    Thang Le thavali's Avatar
    Join Date
    Jan 2011
    Location
    Earth
    Posts
    20
    Thank you to itsme86

    I mistook. which i need is source code of standard C libraries, which store stdio.c file. And i got stdio.c file in dir : glibc-2.10.1\libio but code in stdio.c has no implement printf function. please let me know where was the printf function implemented ? and where was the FILE struct which to control a I/O stream defined ?

    regards
    Last edited by thavali; 01-23-2011 at 09:35 AM.

  4. #4
    -bleh-
    Join Date
    Aug 2010
    Location
    somewhere in this universe
    Posts
    463
    Quote Originally Posted by thavali View Post
    Thank you to itsme86

    I mistook. which i need is source code of standard C libraries, which store stdio.c file. And i got stdio.c file in dir : glibc-2.10.1\libio but code in stdio.c has no implement printf function. please let me know where was the printf function implemented ? and where was the FILE struct which to control a I/O stream defined ?

    regards
    This may help:
    Header Files
    "All that we see or seem
    Is but a dream within a dream." - Poe

  5. #5
    Thang Le thavali's Avatar
    Join Date
    Jan 2011
    Location
    Earth
    Posts
    20
    thanks nimitzhunter

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seven Kingdoms I: Ancient Adversaries for Linux
    By MIH1406 in forum Projects and Job Recruitment
    Replies: 13
    Last Post: 01-17-2010, 05:03 PM
  2. How do you call another source code file?
    By nifear4 in forum C Programming
    Replies: 2
    Last Post: 10-28-2008, 12:16 PM
  3. DxEngine source code
    By Sang-drax in forum Game Programming
    Replies: 5
    Last Post: 06-26-2003, 05:50 PM
  4. Lines from Unix's source code have been copied into the heart of Linux????
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 05-19-2003, 03:50 PM
  5. Source Code Beautifier
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 05-05-2002, 09:21 PM