libc
What is the rationale for fread/fwrite taking size and count as arguments?
We had a discussion here at work regarding why fread() and fwrite() take a size per member and count and return the number of members read/written rather than just taking a buffer and size. The only u[详细]
2023-01-16 22:14 分类:问答Where is ptrdiff_t defined in C?
Where is ptrdiff_t de开发者_如何学Gofined in C?It\'s defined in stddef.h. That header defines the integral types size_t, ptrdiff_t, and wchar_t, the functional macro offsetof, and the constant macr[详细]
2023-01-13 20:54 分类:问答Is there really no mremap in Darwin?
I\'m trying to find out how to remap memory-mapped files on a Mac (when I want to expand the available space).[详细]
2023-01-12 11:32 分类:问答Question about libc_write()
I\'m trying to determine what libc_write does exactly.I\'m executing a binary on a processor simulator I designed in c++ and the program being run has jumped to the function call libc_write().Now, the[详细]
2023-01-12 08:29 分类:问答Statically linking new libc symbols to use with a lower libc version
I have an app that uses eventfd and timerfd kernel syscalls. For that use you need a modern kernel and a libc that supports them, at least 2.8.[详细]
2023-01-10 03:55 分类:问答Is stdlib's qsort recursive?
I\'ve read that qsort is just a generic sort, with no promises about implementation. I don\'t know about how libraries vary from platform to plaform, but assuming the Mac OS X and Linux implementation[详细]
2023-01-09 12:51 分类:问答Can I add a systemcall from a module?
Can I add a 开发者_如何学Csystemcall from a module?In some kernel versions it is possible to add or modify a systemcall by changing the sys_call_table. But because this table is not intended to be cha[详细]
2023-01-09 11:10 分类:问答What's the difference between hard and soft floating point numbers?
When I compile C code with my cross toolchain, the linker prints pages of warni开发者_JS百科ngs saying that my executable uses hard floats but my libc uses soft floats. What\'s the difference?Hard flo[详细]
2023-01-08 09:42 分类:问答Why is fseeko() faster with giant files than small ones?
I\'m getting some strange performance results here and I\'m hoping someone on stackoverflow.com can shed some light on this![详细]
2023-01-07 10:31 分类:问答stdlib and colored output in C
I am making a simple application which requires colored output. How can I make my output colored like emacs and bas开发者_如何学JAVAh do?[详细]
2023-01-06 12:43 分类:问答