This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pragma change breaks build


Mike Frysinger wrote:
why can't __GNUC_PREREQ be used as Joseph suggested ?

The #pragma should precede all code and macro definitions so that it applies uniformly across the entire compilation unit. (We tried using the pragma more selectively, but that didn't work.) So the pragma should appear before __GNUC_PREREQ is defined, just as it should appear before the other macro defn mentioned in the comment.

Possibly we could get away with including <errno.h>, then using __GNUC_PREREQ around the #pragma (this is because <errno.h> is fairly limited), but then we'd have to add another two or three lines to that comment and it's bad enough as it is.

I should mention that I also don't like all this futzing-around with pragmas, and would prefer the IF_LINT approach used in Gnulib and in GNU utilities (see <https://sourceware.org/ml/libc-alpha/2014-11/msg00611.html>). However, that got shot down (see <https://sourceware.org/ml/libc-alpha/2014-11/msg00635.html>) by an argument similar to my satirical "Horrors!" comment earlier in this thread.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]