This is the mail archive of the cygwin-patches mailing list for the Cygwin 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: [PATCH] make <sys/sysmacros.h> compatible with glibc


On Mon, 2011-04-04 at 01:19 -0400, Christopher Faylor wrote:
> There is a __INSIDE_CYGWIN_NET__ which I apparently added ten years ago
> but my ideas about naming have changed.  I also added
> USE_SYS_TYPES_FD_SET which is closer to what I now prefer but it should
> have had some leading underscores.

I could just manually define __NO_INLINE__; there's no net effect on the
resulting object file.

I suppose YA alternative would be to define these as cygwin_dev_* and
then export them in cygwin.din as gnu_dev_*, but that does seem to be an
overkill.

> Maybe the functions were added to gcc before it had the ability to force
> inlining.

Not AFAICS; originally they were simple macros like we currently have,
but for glibc-2.3.3 (Sept 2003), they were changed, adding both inline
and exported functions simultaneously[1].

Of course, this is not unprecedented: note ntohl and friends, for which
we also provide both inline and exported.

But as I've mentioned before, that where a function is expected,
providing a macro or inline function by itself is inadequate; an
autoconf AC_CHECK_FUNC or cmake CheckFunctionExists call will result in
a false negative if a real function is not present as well.  (Although I
do concede that is seems unlikely in this particular case.)


Yaakov

[1] http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=9a276f8



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