Stories
Slash Boxes
Comments

Dev.SN ♥ developers

posted by LaminatorX on Thursday March 20 2014, @09:33AM   Printer-friendly
from the ilibc-ulibc-we-all-C-for-libc dept.

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."

 
This discussion has been archived. No new comments can be posted.
Display Options Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by maxwell demon on Thursday March 20 2014, @06:24PM

    by maxwell demon (1608) on Thursday March 20 2014, @06:24PM (#19089)

    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.
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 1) by Subsentient on Thursday March 20 2014, @07:50PM

    by Subsentient (1111) on Thursday March 20 2014, @07:50PM (#19122) Homepage

    char data[] is an incomplete type.

    • (Score: 1) by Subsentient on Thursday March 20 2014, @08:25PM

      by Subsentient (1111) on Thursday March 20 2014, @08:25PM (#19124) Homepage

      Wait, guess it isn't in C99. I'm tired.

      • (Score: 2) by maxwell demon on Saturday March 22 2014, @08:06AM

        by maxwell demon (1608) on Saturday March 22 2014, @08:06AM (#19670)

        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.