Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the term "libc" equivalent to "C standard library"?

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"?

like image 980
pepsi Avatar asked Apr 02 '11 18:04

pepsi


People also ask

Is libc the same as glibc?

libc is a generic term used to refer to all C standard libraries -- there are several. glibc is the most commonly used one; others include eglibc, uclibc, and dietlibc.

Does C++ depend on libc?

Most implementations of libstdc++ depend on libc, so they require it. The C++ standard includes most of the C standard library. So it's kind of a dependency and technically it's part of the C++ standard library.

What is libc in Linux?

The term "libc" is commonly used as a shorthand for the "standard C library", a library of standard functions that can be used by all C programs (and sometimes by programs in other languages).

How many C libraries are there?

The ANSI C standard library consists of 24 C header files which can be included into a programmer's project with a single directive. Each header file contains one or more function declarations, data type definitions and macros.


1 Answers

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.

like image 97
James McNellis Avatar answered Sep 29 '22 10:09

James McNellis