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
0
votes
1 answer

rpm install in CentOS6 does not recognize dynamic library libc.so.6

I'm new to rpm and cannot find a way to get it to recognize .so files in /usr/lib, it cannot find libc.so.6 which is there. Is this related to the rpm build process or something I can perhaps modify. The man page did not have anything which appeared…
apollon
  • 95
  • 1
  • 2
  • 13
0
votes
3 answers

static inline functions in libc

I've found static inline function in Bionic libc (stdlib.h). I want to compile a file without including stdlib.h. As example: test file: extern int test(void) void foo() { int a = test(); } int main() { foo (); return 0; } Why do I…
Laser
  • 6,652
  • 8
  • 54
  • 85
0
votes
1 answer

libc macro in autoconf

I want to write a macro for finding libc . I found that ldd -version option can be used for finding version. It is giving a lot of information but i want only version, how to get the version. $ldd --version ldd (Ubuntu EGLIBC 2.12.1-0ubuntu6)…
Siva Krishna Aleti
  • 593
  • 1
  • 9
  • 23
0
votes
2 answers

rsyslogd issues , logged with openlog () but logs going to /var/log/messages

i have a c program the code is setlogmask (LOG_UPTO (LOG_NOTICE)); openlog ("thelog", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1); syslog (LOG_NOTICE, "thelog : started by User %d", getuid ()); syslog (LOG_INFO, "thelog: an info is logging"); …
Kajal
  • 223
  • 4
  • 15
0
votes
1 answer

Is there a c-runtime function equivalent of fscanf, which contains the same parameter list?

Hi i have a function like this while(fscanf(fp,"\n%d\t%s\t%s\t%X%X\t%d\t \n",&record.Index,record.Name,record.Empcode,&record.CSN_MSB,&record.AccessRights)!=EOF) { printf("\nIndex: %d\nEmployee Name: %s\nEmpcode: %s\nCSN: %X\nAccessRights:…
amar
  • 509
  • 3
  • 8
  • 17
0
votes
2 answers

linking mess with libc

I have a library compiled into a .a file, linked against my application. (iphone, developing with Xcode) Everything seems to be fine, linking seems to succeed, but when I run the program it crashes. The point of crash is at a memcmp() call in the…
Ziku Rata
0
votes
3 answers

How to communicate from one program to another long running program?

I have a long running program in C under Linux: longrun.c #include int main() { int mode=0; int c=0; while(1) { printf("\nrun @ mode %d value : %d ",mode,c ); if (c>100) c=0; …
Kajal
  • 223
  • 4
  • 15
0
votes
2 answers

Order of linkinkg libc and libpthread on FreeBSD

I have this simple c-code It works fine when i link it as gcc -g app.c.o -o app -lrt -lpthread -lc But if we change order of linking libc and libthread gcc -g app.c.o -o app -lrt -lc -lpthread it does not work. We know on FreeBSD stubs of…
andreych
  • 181
  • 6
0
votes
2 answers

Make Multiple POSTs using PHP in cURL

I am attempting to login into my Elance account using cURL in PHP. I successfully login through the first login form. However, you have to answer a security question on the next page. I am trying to POST the answer and submit the form, however, I…
three3
  • 2,756
  • 14
  • 57
  • 85
0
votes
2 answers

Unexpected Behaviour from tcmalloc

I have been using tcmalloc for a few months in a large project, and so far I must say that I am pretty happy about it, most of all for its HeapProfiling features which allowed to track memory leaks and remove them. In the past couple of weeks though…
BaroneAshura
  • 191
  • 1
  • 1
  • 14
0
votes
3 answers

how to replace a string in an efficient way in C

I have a string which is generated by linux uuid generation code (libc): 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb I need to replace some of the characters in this string: - with _ 2 with f 4 with x I am generating the 200 UUIDs using a loop. So for…
Kajal
  • 223
  • 4
  • 15
0
votes
1 answer

libc-2.3.2.so symbol to libc.so.6

I compiled a package that includes binutils, linux-headers, linux-2.6.9 and glibc 2.3.2, gcc, etc. This eventually creates a file bin used to be loaded onto a satellite signal receiver. When I want to run an external program compiled, I get an…
0
votes
2 answers

Does the assert() in assert.h in the C standard library support some sort of failed assertion handler?

Normally when you call assert(foo()) and the assertion fails, the program automatically aborts. Is there any way to add some sort of handler that can clean up some resources before exiting?
Matt
  • 21,026
  • 18
  • 63
  • 115
0
votes
3 answers

Bash 'yes a' and 'yes b'

bash: $: yes a [some output] then press Ctrl+Z $: yes b [some output] then press Ctrl+Z then, do bg twice and got some output: a b b b a a a a b a a a a b b a b a a a a a b a a a b a a b a a ... a b b b b b b b b etc. Why a and b…
0
votes
2 answers

Creating a Unix user from an application

I'm working on a home-grown user database tied to a larger sustainment application. The idea has been floated around to tie our users to system users, creating matching /etc/passwd entries each time a new user is generated in our program. Other…
Derek_6424246
  • 237
  • 3
  • 12