Hi On Wed, Dec 04, 2024 at 07:48:48PM +0800, Zhao Zhili wrote: [...] > >> -#else > >> +#else // _WIN32 > >> + > >> +#ifdef _WASI_EMULATED_SIGNAL > > > > Why the nested #else + #ifdef, why not #elif defined()? I think that would > > keep the logic slightly less complex. > > Should be fixed by > https://ffmpeg.org/pipermail/ffmpeg-devel/2024-December/337041.html > > By the way, how to make nested conditional compile readable? The code use > nested #if already: > > #ifdef _WIN32 > #include <windows.h> > #if ARCH_X86_32 > #include <setjmp.h> > > I remember this patch use nested #else + #ifdef is for easy to comment. > Should we use indent like in VLC?
I dont know what VLC does but #ifdef _WIN32 # include <windows.h> #if ARCH_X86_32 # include <setjmp.h> is the way most indented preprocessor directives are indented in FFmpeg and i think its also slightly more readable then non indented. Teh alteranative with "#" not in the first column is said to be less compatible But indention of preprocessor directives seems inconsistantly handled in FFmpeg thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answer.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".