Thread: Difference between GLIBC and Standard C library

  1. #1
    char main() RoshanX's Avatar
    Join Date
    Mar 2003
    Posts
    68

    Difference between GLIBC and Standard C library

    Does anyone konw the difference between GLIBC and standard C library.
    GLIBC seem to miss a few elements, for example stdarg.h .
    First there was God. He was quite lonely, so he created Dennis.
    Dennis was unimpressed with God.
    So, . . . God created Brian..........Khan Klatt
    http://www.clifford.at/fun/GOD

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    glibc missing stdarg.h - surely some mistake.
    Where did you get that from?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    char main() RoshanX's Avatar
    Join Date
    Mar 2003
    Posts
    68
    I am using UBUNTU, with all the development packages installed.
    It's not only stdarg.h ( it's no at /usr/include ) , but some other includes as well ( some in /usr/include/sys )
    First there was God. He was quite lonely, so he created Dennis.
    Dennis was unimpressed with God.
    So, . . . God created Brian..........Khan Klatt
    http://www.clifford.at/fun/GOD

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Sounds like you're missing a whole bunch of stuff.
    Are you sure you installed the library as well as the compiler?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    char main() RoshanX's Avatar
    Join Date
    Mar 2003
    Posts
    68
    yes. I have.
    is libc redundent or in a LInux system you have both libc and glibc ?
    First there was God. He was quite lonely, so he created Dennis.
    Dennis was unimpressed with God.
    So, . . . God created Brian..........Khan Klatt
    http://www.clifford.at/fun/GOD

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    glibc is an implementation of the C runtime library, along with some additional stuff required by POSIX or just thought useful by the developers.
    However, some really compiler-specific parts of the CRT are not part of glibc and are instead expected to be provided by the compiler. stdarg.h is not part of glibc, but of gcc. Also, because it is compiler-specific, it is not in /usr/include, but in the gcc-version-specific include dir. On my Gentoo, that's /usr/lib/gcc/<platform>/<version>/include
    That is, my GCC 3.4.6 has it here:
    /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/include/stdarg.h
    whereas my GCC 4.1.1 has it here:
    /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stdarg.h

    The third stdarg.h in my system is some workaround for a eVC bug that STLPort uses.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating our own fprintf function in our library
    By baskar.v in forum C Programming
    Replies: 6
    Last Post: 04-06-2008, 03:31 PM
  2. *** glibc detected *** free(): invalid next size
    By icebabe in forum C Programming
    Replies: 2
    Last Post: 05-24-2006, 12:09 PM