Questions tagged [libc]

The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output and string handling, in the C programming language.

The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output and string handling, in the C programming language.

There are many implementations of libc with different resource requirements, security goals, etc. With a typical tool chain the libc, compiler and OS work together to achieve some ISO, Posix or custom features/standards. Some libc implementation are only a subset of the ISO standard, but still full featured enough to be used in many applications.

Specific libc tags:

  • - the full Gnu Libc found on most GCC installs.
  • - a smaller micro-controller libc for resource constrained devices
  • - Android libc
  • - unhosted libc
  • - more modern lighter foot print libc

Websites

See also:

Do not confuse with , which is for the C++ programming language.

1076 questions
-1
votes
1 answer

rust libc::setsockopt cast to c_void

I'm trying to call setsockopt but can't figure out the cast to c_void. IP_HDRINCL isn't in nix or socket crates, so I have to use libc. I'm following the example of How to set the socket option SO_REUSEPORT in Rust? let trueval: c_int = 1; let ret…
ruckc
  • 505
  • 1
  • 6
  • 23
-1
votes
1 answer

Installing missing symbol file libstdc++-libc6.1-1.so.2 on Linux Mint 17

I am trying to execute a cellular automata program on Linux Mint 17, and I get the following error: ./simu: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory I have libstdc++…
-1
votes
1 answer

In which freebsd release libdl.so sys calls are included in libc.so?

Currently I am facing issue with running python3.6 , bash and many other on my FreeBSD box, As a workaround we have a created a symlink for libdl.so => libc.so and it works but we would like to know more about it.
-1
votes
2 answers

Ubuntu E: Sub-process /usr/bin/dpkg returned an error code (1)

I am recieving the following error when attempting to install libc6:i386. Here is the following error: root@zeus-desktop:/home/zeus# sudo apt-get install libc6:i386 Reading package lists... Done Building dependency tree Reading state…
Chris
  • 11
  • 1
  • 1
-1
votes
1 answer

strncpy chosen by linker from libc instead of rom version

I use 106Micro core and Xtensa toolchain (gcc) for ESP8266 chip. Not sure what strncpy function is used According to map file .text 0x4010077c 0xfa…
yo3hcv
  • 1,531
  • 2
  • 17
  • 27
-1
votes
2 answers

Ubuntu 16.04 lightdm segmentation fault

I'm newbie into Linux world, and i have installed Ubuntu 16.04 LTS x64 with graphics driver for Cirrus Logic 5440 graphics card. What happened, I could not start X-server, Lightdm display manager breaks on segmentation fault caused by libc.so.6,…
Alex Zed
  • 49
  • 7
-1
votes
1 answer

What are the historical reasons that "streams" are called FILE in C

The GNU libc manual mentions that there are historical reasons that the data structure representing "streams" is called FILE. After getting curious i've googled around and tried to look into it but I can't seem to find this fabulous tale. Any…
Oliver Belanger
  • 107
  • 1
  • 6
-1
votes
1 answer

kernel panic - not syncing: Attempted to kill init ! on centos running on my embedded board

I am currently working on centos running on intel atom board. I mistakenly renamed lic-2.17.so to _libc-2.17.so library on my board, when I reboot the board it is giving me below error. [ OK ] Reached target Initrd Default…
anikhan
  • 1,147
  • 3
  • 18
  • 44
-1
votes
2 answers

write system call C - HDD Sequential or Random Access ?

I am looking for a solution to detect how's the write function access to the disk. I want to know if it is a sequential or random access. I thought about open the write system call on the libC and try to edit it and count if it is a random or seq…
-1
votes
3 answers

memset is not working properly

I have the following set of code not able to find why I am getting garbage value.My intention is to copy the number of byte as destination irrespective of source to make a generic copy for my application. But not getting the correct result.Is there…
pradipta
  • 1,718
  • 2
  • 13
  • 24
-1
votes
1 answer

Is there any better way to generate guid in gcc

I had a requirement to generate guid in C, How can generate guid(http://en.wikipedia.org/wiki/Globally_unique_identifier) in libc . I need to generate guids randomly .
Kajal
  • 223
  • 4
  • 15
-2
votes
1 answer

secure_getenv function not giving the expected result

In my program I am using secure_getenv function to fetch some environment variables. I included stdlib.h in my program. This is the sample call to secure_getenv. Line 1 : char *myenv; Line 2 : myenv = __secure_getenv("DATA"); After the above lines…
-2
votes
1 answer

Creating a new Linux systemcall need changes in libc as well?

If I am creating a new Linux system call , does that need changes in libc as well?
Franc
  • 319
  • 9
  • 28
-2
votes
2 answers

Fastest fgets implementation in C

The known fgets libc function implementation uses fgetc() inside, how can I use read() with bigger buffer or other method instead to speed up the function? For example I read /proc/pid/maps file to search some strings. The file's format is known,…
Phillip
  • 259
  • 1
  • 2
  • 11
-2
votes
2 answers

Why 'l' and 'll' modifier do the same for printf (C)

I don't understand the difference between l and ll length specifier for the printf function : printf("%ld \n", 9999999991474836499); printf("%lld \n", 9999999991474836499); The two printf make the same output because to the type overflow:…
Sadek
  • 175
  • 1
  • 7
1 2 3
71
72