Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 17 submissions in the queue.
posted by LaminatorX on Thursday March 20 2014, @01:33PM   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 Threshold/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, @10:24PM

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

    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, @11:50PM

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

    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

      by Subsentient (1111) on Friday March 21 2014, @12:25AM (#19124) Homepage Journal

      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

        by maxwell demon (1608) on Saturday March 22 2014, @12:06PM (#19670) Journal

        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.