● Naming conventions
● Type conventions
● Shitty strings
● Shitty, incomplete, wrong and ugly time functions
● Unholy unsafe functions, half of them
● No dynamic sizing of return values everywhere
● Lack of blasphemously basic stuff, can't even detect overflow
● Lack of horribly basic data structures support (cudder lists, vectors, sets, dictionaries)
● Lack of any minimally decent platform-independent I/O, curses, abstract graphics toolkit, etc., can't do shit captain
Can't bash it much more beause it's basically a good for nothing, tiny, incomplete library.
and shitty string functions.Namely strncpy. Why the fuck
If the length of src is less than n, strncpy() pads the remainder of dest with null bytes.
Who the fuck thought that it is a good idea? It makes no sense.
In C it's impossible to copy string no longer than N fast. memcpy can not stop at 0 byte. strcpy is not safe. strncpy happily fill most of buffer with zero, though it most probably already was a zero. And strncat does the same shit.
Clib is the shittiest, hands down.
Or maybe java stdlib.
Name:
Anonymous2010-11-12 5:57
>>16 Who the fuck thought that it is a good idea? It makes no sense.
Perhaps useful for some ugly hacks (like extending the string by writing at its end without writing a final \0); the kind of ugly hacks that made C famous for buffer-related vulnerabilities.
Name:
Anonymous2010-11-12 6:15
REALPATH(3) Linux Programmer's Manual REALPATH(3)
NAME
realpath - return the canonicalized absolute pathname
...
BUGS
Never use this function. It is broken by design since it is impossible
to determine a suitable size for the output buffer. According to
POSIX a buffer of size PATH_MAX suffices, but PATH_MAX need not be a
defined constant, blah blah blah
OK, Linus, I get your point. Now what do I use instead of this shitty broken function? What do I use, Linus? Eh, Linus? Eh?
The javascript standard library comes to mind. It was designed after the java library by edict, which is a rather foolish thing to do to an otherwise completely different language.