Re: [PATCH] Adapts to -std=c11 on OS/2
KO Myung-Hun <[email protected]> Tue, 01 Oct 2024 16:30:27 +0900
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi/2. Alexander Strasser wrote: > On 2024-09-28 20:47 +0900, KO Myung-Hun wrote: >> Dave Yeo wrote: >>> On 09/27/24 08:36 AM, KO Myung-Hun wrote: >>>> -std=c11 disables many extensions of OS/2 kLIBC. And this causes many >>>> compilation errors such as implicit functions. >>>> >>>> To enable extensions of OS/2 kLIBC, define _EMX_SOURCE before including >>>> any headers. >>> >>> I did the same before deciding that adding -D_EMX_SOURCE to >>> --extra-cflags was less invasive. >> >> If an user does not add -D_EMX_SOURCE to --extra-cflags, compilation >> will fail. I think this is not a correct way. >> >> It would be better to succeed to compile regardless of user's configuration. > > Would it be best to have it defined when compiling every file for OS/2? > > If so, you could try if this would do the trick: > > diff --git a/configure b/configure > index 7a403e0a6..371bff55b 100755 > --- a/configure > +++ b/configure > @@ -1952,6 +1952,7 @@ if os2 ; then > test -n "$ld_static" && ld_static='-Wl,-static' > # OS/2 linker does not support a thin archive. Remove 'T' flag. > _arflags=$(echo $_arflags | tr -d T) > + extra_cflags="-D_EMX_SOURCE $extra_cflags" > fi > > if wine ; then > > > Otherwise the patches of komh look good to me. > > @komh: Feel free to commit to SVN whatever solution works best for you! > If _EMX_SOURCE is allowed for all the files in MPlayer, I prefer it. Thanks! -- KO Myung-Hun Korean OS/2 User Community : https://www.os2.kr/