dalias writes
"The musl libc project has released version 1.0, the result of three years of development and testing. Musl is a lightweight, fast, simple, MIT-licensed, correctness-oriented alternative to the GNU C library (glibc), uClibc, or Android's Bionic. At this point musl provides all mandatory C99 and POSIX interfaces (plus a lot of widely-used extensions), and well over 5000 packages are known to build successfully against musl.
Several options are available for trying musl. Compiler toolchains are available from the musl-cross project, and several new musl-based Linux distributions are already available (Sabotage and Snowflake, among others). Some well-established distributions including OpenWRT and Gentoo are in the process of adding musl-based variants, and others (Aboriginal, Alpine, Bedrock, Dragora) are adopting musl as their default libc."
(Score: 2) by maxwell demon on Thursday March 20 2014, @10:24PM
Nobody forces you to use the standard string library. Apart from the file operations and command line arguments (and those can easily be wrapped), I don't see anything that forces you to use zero-terminated strings. Indeed, with C99, you even have a portable way to implement your length-prefixed strings:
typedef struct MyString
{
int length;
char data[];
} *pMyString;
Of course with that definition, you get to implement all string functions yourself. But then, the string functions C provides are mostly quite basic anyway.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 1) by Subsentient on Thursday March 20 2014, @11:50PM
char data[] is an incomplete type.
"It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
(Score: 1) by Subsentient on Friday March 21 2014, @12:25AM
Wait, guess it isn't in C99. I'm tired.
"It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
(Score: 2) by maxwell demon on Saturday March 22 2014, @12:06PM
In C99, it is specifically allowed at the end of a struct. It allows to allocate extra memory after the struct and use that as members of the array. It's called flexible array member.
The Tao of math: The numbers you can count are not the real numbers.