On Sat, 10 Aug 2013 18:56:30 +0200 Irek Szczesniak wrote:
> On Sat, Aug 10, 2013 at 6:37 PM, Irek Szczesniak <[email protected]> 
> wrote:
> > On Sat, Aug 10, 2013 at 7:46 AM, Glenn Fowler <[email protected]> wrote:
> >>
> >> On Fri, 9 Aug 2013 21:30:32 +0200 Irek Szczesniak wrote:
> >>> On Fri, Aug 9, 2013 at 9:07 PM, Irek Szczesniak <[email protected]> 
> >>> wrote:
> >>> > Fedora 19 is *again* missing the #define O_SEARCH to define O_SEARCH
> >>> > as alias to O_PATH.
> >>
> >>> This broke a while ago when #define __USE_GNU 1 was moved to
> >>> src/lib/libast/features/standards. Nice attempt but won't work because
> >>> __USE_GNU is an internal flag of the Linux kernel headers and is unset
> >>> by the normal includes in /usr/include. Worst of all the Linux
> >>> includes are broken and only reveal O_PATH if used with __USE_GNU=1.
> >>
> >>> What I don't understand: Roland added a safeguard against malfunctions:
> >>> /*
> >>>  * Make sure _GNU_SOURCE is active on Linux. Some versions
> >>>  * give us serious trouble in this case so we have this
> >>>  * assert to *abort* early instead of let us hunt for "ghost
> >>>  * bugs"
> >>>  */
> >>> #ifdef __linux__
> >>> #ifndef __USE_GNU
> >>> #error "ASSERT: __USE_GNU should be defined by now"
> >>> #endif
> >>> #endif
> >>
> >>> This had been introduced to *prevent* this from happening. WTF was
> >>> this assertion removed? This is really the kind of regression which
> >>> should NEVER happen because it fucks up the rest of the applications.
> >
> > I have to apologies for the explicit language. Imagine being under
> > pressure and then find a regression. A regression for which was
> > considered impossible because multiple layers of safeguards had been
> > established to make the AST build fail the hard way in case of a
> > regression.
> >
> >>> Wasted time: 2h 17 minutes to find out that O_SEARCH was unavailable
> >>> in our application. Anyone wanna pay?

> FYI I was ranting about the removal of this #error in fcntl.c:
> /*
>  * Make sure _GNU_SOURCE is active on Linux. Some versions
>  * give us serious trouble in this case so we have this
>  * assert to *abort* early instead of let us hunt for "ghost
>  * bugs"
>  */
> #ifdef __linux__
> #ifndef __USE_GNU
> #error "ASSERT: __USE_GNU should be defined by now"
> #endif
> #endif

> If #error is triggered then you have no __USE_GNU. Which results in
> zero extensions like O_DIRECTORY or O_DIRECT, or on Linux >=3.1 no
> O_PATH.

> What was the reason for removing that #error? If its triggered then
> you have problems and removing the #error doesn't remove the problems
> for you.

I don't like programming in build bombs -- its hard enough getting builds to 
work
I was concerned that some linux variants + FEATURE/standards might crash a 
build when
O_PATH etc. are not supported

I'd be willing to add a build triggerred regression report that
lists missing/emulated functionality -- for starters it could be
a small C program that #ifndef's critical macros and lists them at the end of 
the build
--
#ifdef __linux__
#if !O_SEARCH
        printf("package: panic: *** O_SEARCH should be defined in 
<ast_fcntl.h>\n");
#endif
#endif
--

_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to