mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.5K
active users

#standardc

0 posts0 participants0 posts today
JdeBP<p><span class="h-card" translate="no"><a href="https://mastodon.bsd.cafe/@gumnos" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>gumnos</span></a></span> <span class="h-card" translate="no"><a href="https://polymaths.social/@rl_dane" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>rl_dane</span></a></span> </p><p>This is a very old wrinkle, that pre-dates Unicode. I remember this going around on Usenet. </p><p>The locale's collation order affects character ranges.</p><p><a href="https://mastodonapp.uk/tags/locale" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>locale</span></a> <a href="https://mastodonapp.uk/tags/internationalization" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>internationalization</span></a> <a href="https://mastodonapp.uk/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a></p>
JdeBP<p>The "Welsh or Standard C library function?" questionnaire gave me a chuckle. Sadly, I recognized the library functions immediately. (-:</p><p><a href="https://toot.wales/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> <a href="https://toot.wales/tags/Welsh" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Welsh</span></a></p>
JdeBP<p><span class="h-card" translate="no"><a href="https://infosec.exchange/@david_chisnall" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>david_chisnall</span></a></span> </p><p>You've built a argument on the assumption of binary incompatibility, but in fact there was none.</p><p>There was no layout change nor symbol name changes.</p><p>The struct layout stayed entirely the same. The struct definition merely moved from one header to another and replaced the declarations of some members with external library types rather than their underscored aliases that standard headers use.</p><p>The thing that would have introduced binary incompatibility, which <a href="https://mastodonapp.uk/tags/OpenBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenBSD</span></a> has had to deal with this year, <a href="https://mastodonapp.uk/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a> had already done 7 years earlier back in 2001, and is still the case now.</p><p>By 2008, it was just moving struct definitions out of a standard header and removing "inline" macros. The one thing in base that that broke in 2008 (because of *source* incompatibility) went away in 2011, and Jordan Hubbard patched some stuff in ports a decade ago.</p><p>It is entirely feasible in 2025 for FreeBSD to regain parity with OpenBSD quite simply.</p><p><a href="https://mastodonapp.uk/tags/stdio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>stdio</span></a> <a href="https://mastodonapp.uk/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> <a href="https://mastodonapp.uk/tags/OpaqueTypes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpaqueTypes</span></a></p>
JdeBP<p>So … are any <a href="https://mastodonapp.uk/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a> developers up to reinstating John Baldwin's change from 2008 and bringing FreeBSD back to parity with <a href="https://mastodonapp.uk/tags/OpenBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenBSD</span></a>?</p><p><a href="https://cgit.freebsd.org/src/commit/include/stdio.h?id=c17bf9a9a5a3b59e03108b785f6b15070ff25651" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">cgit.freebsd.org/src/commit/in</span><span class="invisible">clude/stdio.h?id=c17bf9a9a5a3b59e03108b785f6b15070ff25651</span></a></p><p><a href="https://news.ycombinator.com/item?id=44628639" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">news.ycombinator.com/item?id=4</span><span class="invisible">4628639</span></a></p><p><a href="https://mastodonapp.uk/tags/stdio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>stdio</span></a> <a href="https://mastodonapp.uk/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> <a href="https://mastodonapp.uk/tags/OpaqueTypes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpaqueTypes</span></a> <a href="https://mastodonapp.uk/tags/libc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>libc</span></a></p>
JdeBP<p><span class="h-card" translate="no"><a href="https://chaos.social/@blinry" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>blinry</span></a></span> <span class="h-card" translate="no"><a href="https://social.jvns.ca/@b0rk" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>b0rk</span></a></span> </p><p>You really should tell the <a href="https://tty0.social/tags/BusyBox" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BusyBox</span></a> people about that C bug in the feature autodetection.</p><p>I recently had to update a whole lot of K&amp;R code (written a decade after C89) for similar reasons. I even had a similar autodetection break.</p><p>C99 has and C23 is even more going to hit a lot of old codebases where people wrote things K&amp;R style, sadly in the cases of many of them well after <a href="https://tty0.social/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> came into existence.</p>
JdeBP<p><span class="h-card" translate="no"><a href="https://mastodon.social/@pitrh" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>pitrh</span></a></span> </p><p>I remember this one from the 1990s. Unless one carefully retains the same structure layout, everything that uses getc(), putc(), and fileno() at minimum is broken until recompiled from source.</p><p><a href="https://mastodonapp.uk/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> <a href="https://mastodonapp.uk/tags/OpenBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenBSD</span></a></p>
JdeBP<p><span class="h-card" translate="no"><a href="https://mastodon.social/@cks" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>cks</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>whitequark</span></a></span> </p><p>It's interesting comparing Usenet of 1993 to Hacker News of today. Some questions are perennial, it seems:</p><p>"But what use is malloc(0)?" followed by a discussion of people rolling their own Pascal-like strings.</p><p>"Why unique?" followed by a discussion of making sets and maps.</p><p>"It's not a valid pointer." leading to the usual pantomime rejoinder.</p><p>I haven't seen anyone ask what the old implementations that returned NULL did to errno, though.</p><p><a href="https://mastodonapp.uk/tags/CLanguage" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CLanguage</span></a> <a href="https://mastodonapp.uk/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> <a href="https://mastodonapp.uk/tags/C89" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C89</span></a> <a href="https://mastodonapp.uk/tags/POSIX1" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>POSIX1</span></a> <a href="https://mastodonapp.uk/tags/malloc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>malloc</span></a> <a href="https://mastodonapp.uk/tags/SVID" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SVID</span></a></p>
JdeBP<p><span class="h-card" translate="no"><a href="https://mastodon.social/@cks" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>cks</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>whitequark</span></a></span></p><p>Back in 1993, <a href="https://mastodonapp.uk/tags/AIX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AIX</span></a> was the example that people gave of a C library where malloc(0) returned NULL.</p><p><a href="https://groups.google.com/g/comp.unix.aix/c/lstmVEcmD2Q/m/wRsWt_Tnw1UJ" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">groups.google.com/g/comp.unix.</span><span class="invisible">aix/c/lstmVEcmD2Q/m/wRsWt_Tnw1UJ</span></a></p><p>Most of the C libraries that I touched back then either just handed off to the operating system's API for suballocation, which did not treat zero specially, or had their own suballocation functions, which did not treat zero specially.</p><p><a href="https://mastodonapp.uk/tags/CLanguage" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CLanguage</span></a> <a href="https://mastodonapp.uk/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> <a href="https://mastodonapp.uk/tags/C89" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C89</span></a> <a href="https://mastodonapp.uk/tags/POSIX1" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>POSIX1</span></a> <a href="https://mastodonapp.uk/tags/malloc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>malloc</span></a> <a href="https://mastodonapp.uk/tags/SVID" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SVID</span></a></p>
JdeBP<p><span class="h-card" translate="no"><a href="https://hachyderm.io/@dalias" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>dalias</span></a></span> <span class="h-card" translate="no"><a href="https://social.treehouse.systems/@ska" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>ska</span></a></span> </p><p>Well they *are* making their own versions of those two macros. I'd already read the ostensible rationale for it, and it seemed poor.</p><p>They have a problem with their own code's headers having lots of cross-dependencies. (Strong coupling and low cohesion: a long-standing <a href="https://tty0.social/tags/systemd" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>systemd</span></a> problem.) That's not a reason for fiddling with the <a href="https://tty0.social/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> library, let alone making one's own FILE and DIR macros.</p><p><a href="https://tty0.social/tags/musl" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>musl</span></a></p>
JdeBP<p><span class="h-card" translate="no"><a href="https://social.treehouse.systems/@ska" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>ska</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@dalias" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>dalias</span></a></span> </p><p>I understood Daniel J. Bernstein's avoidance of the Standard C library, especially strings and standard I/O which had been rife with pointer mis-uses for decades.</p><p>But this is not that.</p><p>Why on Earth would one continue to use stdio but roll one's own version of the GNU C library's FILE and DIR macros?</p><p><a href="https://github.com/systemd/systemd/issues/37779#issuecomment-2952813363" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/systemd/systemd/iss</span><span class="invisible">ues/37779#issuecomment-2952813363</span></a></p><p><a href="https://tty0.social/tags/StandardC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StandardC</span></a> <a href="https://tty0.social/tags/systemd" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>systemd</span></a> <a href="https://tty0.social/tags/musl" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>musl</span></a></p>