11

I sometimes hear people using the terms "libc" and "C standard library" interchangeably. I understand that "libc" is the name (or part of the names) of many popular C standard library implementations. My guess is that because of the widespread use of these implementations, people started referring to the C standard library in general as "libc" although it is not an official name.

Is it correct to refer to the C standard library as "libc"?

pepsi
  • 6,785
  • 6
  • 42
  • 74

4 Answers4

12

I always thought that "libc" just happens to be the name (or part of the names) of many popular C standard library implementations.

This is correct. "libc" is the name of some implementations of the C Standard Library.

As an example of a C Standard Library implementation that is not named "libc," the Microsoft C Standard Library implementation is a part of the "C Run-Time Libraries," usually referred to as the "CRT."

Is it correct to refer to the C standard library as "libc"?

The C Standard Library is not named "libc," so using that term to refer to it generically (and not to a particular implementation) would be incorrect. That said, in most contexts, if you did use the term "libc" to refer to the C Standard Library, you are still likely to be understood.

James McNellis
  • 348,265
  • 75
  • 913
  • 977
  • Thanks, but your answer still leaves open the possibility that libc is both the official name and the name used by several implementations. Is it correct to use "libc" to refer to the general C standard library? I believe you are implying a no, but I just wanted to be sure. – pepsi Apr 02 '11 at 18:17
  • 2
    @pepsi: The C Standard Library is not named "libc," so using that term to refer to it generically (and not to a particular implementation) would be incorrect. That said, in most contexts, if you did use the term "libc" to refer to the C Standard Library, you are still likely to be understood. – James McNellis Apr 02 '11 at 18:25
  • Thank you. That's exactly what I wanted to clarify – pepsi Apr 02 '11 at 18:31
  • I think it's quite standard and reasonable to refer to the library portion of the C/POSIX/other OS implementation as "the libc" regardless of its filename (or whether it even has a filename) in the particular implementation. – R.. GitHub STOP HELPING ICE Apr 02 '11 at 19:20
8

"libc" is indeed the name of the implementation. It often includes functions that are not part of the C standard, and might not include functions that are part of the C standard. (A common case of the latter is the Standard C math functions being split into a separate "libm".)

dan04
  • 87,747
  • 23
  • 163
  • 198
1

'libc' refers to the C standard library. However, the libc has several implementations :

  • glibc : an implementation of libc written for the GNU Project
  • klibc : a minimalistic subset implementation of the libc
  • ...
Sandro Munda
  • 39,921
  • 24
  • 98
  • 123
0

LibC (http://www.gnu.org/s/libc/) is one particular implementation of the C library standard (http://en.wikipedia.org/wiki/C_standard_library#ISO_Standard).

Gabriel Ščerbák
  • 18,240
  • 8
  • 37
  • 52