pawoo.net is part of the decentralized social network powered by Mastodon.
The Social Coop Limited が運営するマストドンインスタンス「Pawoo」は、文章や画像を投稿して楽しむSNSです。 「創作活動や自由なコミュニケーションを楽しめる場」として、どなたにも幅広く使っていただけます。

Server stats:

28K
active users

Learn more

Foone🏳️‍⚧️<p>I would say it's the result of a badly written debug macro, ie there's a function that only prints <a href="https://digipres.club/tags/IFDEF" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>IFDEF</span></a> DEBUG, instead of a function that's only called if DEBUG is defined. </p><p>except it takes no parameters, so that'd only work if it's a debug function that examples globals and prints about them.</p><p>which is possible, this program is global-heavy</p>
SASANO Takayoshi<p><a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> USE_WRESLIB<br> <a href="https://social.mikutter.hachune.net/tags/include" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>include</span></a> "wresset2.h"<br><a href="https://social.mikutter.hachune.net/tags/else" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>else</span></a><br> <a href="https://social.mikutter.hachune.net/tags/include" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>include</span></a> &lt;windows.h&gt;<br><a href="https://social.mikutter.hachune.net/tags/endif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>endif</span></a></p><p>WRESLIBを使わない、という選択肢は無いってこと…?</p>
SASANO Takayoshi<p>bld/cc/c/cmdlnx86.c:<a href="https://social.mikutter.hachune.net/tags/elif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elif</span></a> defined( __BSD__ )<br>bld/nwlib/c/cmdline.c:<a href="https://social.mikutter.hachune.net/tags/elif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elif</span></a> defined( __BSD__ )<br>bld/plusplus/c/cmdlnx86.c:<a href="https://social.mikutter.hachune.net/tags/elif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elif</span></a> defined( __BSD__ )<br>bld/wasm/c/main.c:<a href="https://social.mikutter.hachune.net/tags/elif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elif</span></a> defined(__BSD__)<br>bld/watcom/c/clibext.c:<a href="https://social.mikutter.hachune.net/tags/elif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elif</span></a> defined( __BSD__ )<br>bld/watcom/h/clibext.h:<a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> __BSD__<br>bld/watcom/h/wendian.h:<a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> __BSD__<br>bld/wl/c/cmdline.c:<a href="https://social.mikutter.hachune.net/tags/elif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elif</span></a> defined( __BSD__ )<br>bld/wmake/c/mglob.c:<a href="https://social.mikutter.hachune.net/tags/elif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elif</span></a> defined( __BSD__ ) || defined( __FreeBSD__ )<br>bld/wmake/c/mglob.c: "__BSD__=\n"</p>
kakkun61<p>C ファイルによく見るやつ足した<br />&gt; <a href="https://pawoo.net/tags/ifdef" class="mention hashtag" rel="tag">#<span>ifdef</span></a> __cplusplus<br />&gt; extern &quot;C&quot; {<br />&gt; <a href="https://pawoo.net/tags/endif" class="mention hashtag" rel="tag">#<span>endif</span></a></p>
Izumi Tsutsui<p>nanotodon の <a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> MONO_SIXEL の部分を -mono オプション指定の値に応じて動的に切り替える、という課題(を思い出した)</p>
daniel:// stenberg://<p><span class="h-card"><a href="https://fosstodon.org/@kees" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>kees</span></a></span> <span class="h-card"><a href="https://norden.social/@hikhvar" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>hikhvar</span></a></span> <span class="h-card"><a href="https://infosec.exchange/@dascandy" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>dascandy</span></a></span> yeah, that's basically what I found in the curl code left from &lt; 2000. Mostly comments and a few <a href="https://mastodon.social/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a>/#defines.</p>
Clifton Royston<p><span class="h-card"><a href="https://mastodon.social/@mcc" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mcc</span></a></span> </p><p>I assume by "erase" you mean "suppress compile". </p><p>If so then yes, "<a href="https://wandering.shop/tags/if" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>if</span></a> false" works perfectly well for what you want.</p><p>C# "<a href="https://wandering.shop/tags/if" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>if</span></a>" is really a hybrid of C "<a href="https://wandering.shop/tags/if" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>if</span></a>" and "<a href="https://wandering.shop/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a>". Any defined symbol evaluates to boolean true, regardless of what it's defined to, and you can do boolean math on them, e.g.<br><a href="https://wandering.shop/tags/if" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>if</span></a> A || B</p><p>I use variations on "<a href="https://wandering.shop/tags/if" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>if</span></a> false" and "<a href="https://wandering.shop/tags/if" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>if</span></a> true" a lot when I'm debugging code I want to be conditionally compiled under some circumstances/targets.</p>
Martin Uecker<p><span class="h-card"><a href="https://pony.social/@thephd" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>thephd</span></a></span> <span class="h-card"><a href="https://mathstodon.xyz/@dougmerritt" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>dougmerritt</span></a></span> I think the concerns of making NULL not be 0 are exaggerated. The POSIX world would not be affected in the first place. And there is always the option for a vendor to offer some backwards compatibility option, which would be as simple as<br> <a href="https://mastodon.social/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> OLD_CRAP<br> <a href="https://mastodon.social/tags/define" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>define</span></a> NULL 0<br> <a href="https://mastodon.social/tags/else" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>else</span></a><br> <a href="https://mastodon.social/tags/define" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>define</span></a> NULL (void*)0<br> <a href="https://mastodon.social/tags/endif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>endif</span></a><br> for those who really do not wish to fix their bugs in their legacy old code.</p>
Programming Weekly<p>Tired of other developers? <a href="https://mastodon.social/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> your code with your Windows username</p><p><a href="https://stannedelchev.net/tired-of-other-developers-ifdef-your-code-with-your-windows-username/" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">stannedelchev.net/tired-of-oth</span><span class="invisible">er-developers-ifdef-your-code-with-your-windows-username/</span></a></p><p>Discussions: <a href="https://discu.eu/q/https://stannedelchev.net/tired-of-other-developers-ifdef-your-code-with-your-windows-username/" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">discu.eu/q/https://stannedelch</span><span class="invisible">ev.net/tired-of-other-developers-ifdef-your-code-with-your-windows-username/</span></a></p><p><a href="https://mastodon.social/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a></p>
あっきぃ<p>やったことメモ:</p><p>RP2040向けの、RTCから時刻を取得するコードを<br><a href="https://github.com/adafruit/circuitpython/blob/main/lib/mbedtls_config/mbedtls_port.c#L50" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/adafruit/circuitpyt</span><span class="invisible">hon/blob/main/lib/mbedtls_config/mbedtls_port.c#L50</span></a></p><p>RP2350の場合はpowmanを使って取得するようにしてみた</p><p><a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> PICO_RP2350<br><a href="https://social.mikutter.hachune.net/tags/include" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>include</span></a> "hardware/powman.h"<br>time_t rp2_rtctime_seconds(time_t *timer) {<br> return powman_timer_get_ms() / 1000ULL;<br>}<br><a href="https://social.mikutter.hachune.net/tags/endif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>endif</span></a></p><p>が、CircuitPython側でRuntimeError: pystack exhaustedで死ぬので、たぶんまだなんかおかしい</p>
Alex Russell<p><span class="h-card"><a href="https://digipres.club/@misty" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>misty</span></a></span> it's particularly wild because:</p><p>a.) there was so much divergence *pre*-fork; e.g., different JS engines, IDL systems, network stacks, process model, 3D subsystem, media engines, and feature set (via *many* runtime flags and <a href="https://toot.cafe/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> differences)</p><p>b.) that has gotten *much* larger! Since the fork, Blink rewrote the layout engine (LayoutNG), font handling, and implemented dozens of features that aren't in WebKit yet</p>
Izumi Tsutsui<p><a href="https://sourceware.org/git/?p=glibc.git;a=blame;f=time/time.h;hb=f2bea4da2e65b5d91a23a01fb2062bcec33974aa#l94" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">sourceware.org/git/?p=glibc.gi</span><span class="invisible">t;a=blame;f=time/time.h;hb=f2bea4da2e65b5d91a23a01fb2062bcec33974aa#l94</span></a><br>glibc も strptime(3) は XPG4 相当のままなんかな。</p><p><a href="https://sourceware.org/git/?p=glibc.git;a=blame;f=time/time.h;hb=33808bf1164be2e7c8535bdd5ac398c75c33ed49#l243" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">sourceware.org/git/?p=glibc.gi</span><span class="invisible">t;a=blame;f=time/time.h;hb=33808bf1164be2e7c8535bdd5ac398c75c33ed49#l243</span></a><br>一方で gmtime(3) が <a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> __USE_GNU で囲まれてないのはオレオレ関数扱いなのか</p>
Izumi Tsutsui<p><a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> linux のほうも</p><p><a href="https://social.mikutter.hachune.net/tags/include" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>include</span></a> "getopt.h" /* Always include local (nonstandard) getopt.h */</p><p>になってるから直すか</p>
Izumi Tsutsui<p><a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> no_more_needed<br><a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> __NetBSD__<br><a href="https://social.mikutter.hachune.net/tags/include" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>include</span></a> &lt;sys/resource.h&gt;<br><a href="https://social.mikutter.hachune.net/tags/endif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>endif</span></a><br><a href="https://social.mikutter.hachune.net/tags/endif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>endif</span></a> /* no_more_needed */</p><p>ワラタ</p>
Izumi Tsutsui<p>うーん。 ubuntu でビルド通ったとは書いたけれど、よくよく見直すと mkisofs.c に<br><a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> linux<br>とか<br><a href="https://social.mikutter.hachune.net/tags/if" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>if</span></a> defined(__NetBSD__) || defined(__OpenBSD__) <br>とあってイマイチやな。</p><p>NetBSD の src/tools ビルドのしくみとしては、 NetBSD互換のヘッダを用意してよほど細かいOS依存を使っていない限りは OS別の指定しなくても動く程度には通るようになっているはずなので、後で直す</p>
THE MARTYR OF BUTLERIAN JIHAD<p>Let me tell you how much I hate C.</p><p>Imagine some genius wrote a function-like C macro. For example,</p><p><a href="https://mstdn.starnix.network/tags/define" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>define</span></a> FUCK() really_fuck(&amp;you)</p><p>So far so good? Not quite. What if it's wrapped in conditional compilation pragmas?</p><p><a href="https://mstdn.starnix.network/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> USER_IS_FUCKED</p><p>define FUCK() really_fuck(&amp;you)</p><p><a href="https://mstdn.starnix.network/tags/endif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>endif</span></a></p><p>This might even work. But! Imagine if that condition is missed and the macro is left undefined. What happens to the code that uses this macro?</p><p>In C, a call to an undeclared function isn't an error but a warning, and it's often allowed to pass (wtf is -Wall lmao). Adding insult to injury, imagine you build not an executable but a shared library. This way, the error happens... in runtime! Now sprinkle not just one conditional macro but a few dozen, scattered all over code. Make sure that includes order actually matters and that headers to not include each other directly. Now you know how I've spent the past three days.</p><p>I fucking hate C. It's a retarded abomination of a language and anyone using it seriously needs to have his genitals cauterised with a glowing hot piece of rebar inserted into urethra.</p>
mmu_man<p><span class="h-card"><a href="https://studio8502.ca/@mos_8502" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mos_8502</span></a></span> <span class="h-card"><a href="https://chaos.social/@jacqueline" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>jacqueline</span></a></span> yeah, I mean just put <a href="https://m.g3l.org/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> __GNUC__ around almost everywhere and an <a href="https://m.g3l.org/tags/else" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>else</span></a> <a href="https://m.g3l.org/tags/error" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>error</span></a> FIXME 😅</p>
SASANO Takayoshi<p><a href="https://social.mikutter.hachune.net/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> SYSV<br><a href="https://social.mikutter.hachune.net/tags/error" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>error</span></a><br><a href="https://social.mikutter.hachune.net/tags/endif" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>endif</span></a><br>int main(int argc, char *argv[]){return 0;}</p><p>OmniOS CE、build-essenialをインストールしてgccで上のコードをビルドしてもエラー出ないんですよね。</p>
Björkus "No time_t to Die" Dorkus<p><span class="h-card"><a href="https://infosec.exchange/@malwareminigun" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>malwareminigun</span></a></span> This reminds me that I gotta <a href="https://pony.social/tags/ifdef" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ifdef</span></a> _WIN32 and actually add that to the benchmarks...</p><p>.... Bad news is I don't want to re-run the benchmarks, they take like 7 hours to run. 😩😩</p>
【小さな惑星ビッグバン】τπεory :verifyblack: <span class="h-card"><a class="u-url mention" href="https://shitposter.club/users/coldacid" rel="nofollow noopener noreferrer" target="_blank">@<span>coldacid</span></a></span> that what ive thought<br>seems nice to have a <br><a class="hashtag" href="https://ak.kyaruc.moe/tag/ifdef" rel="nofollow noopener noreferrer" target="_blank">#ifdef</a> HI<br>void randomstuff() {<br>...<br>}<br><a class="hashtag" href="https://ak.kyaruc.moe/tag/endif" rel="nofollow noopener noreferrer" target="_blank">#endif</a><br><br>and then have a -DHI switch in the compiler to "turn on" code blocks