Re: [PATCH] Port to 12 other Platforms.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Boyd Lynn Gerber <gerberb@xxxxxxxxx> writes:

> So the patch should be
> ...

Thanks.

I'll apply, but I'd reword the part on _XOPEN_SOURCE like this:

    Looking at the the various platform headers, I see around line 450:

            #if defined(_KERNEL) || !defined(_POSIX_SOURCE) \
                 && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)

    which hides u_short and other typedefs that other header files on these
    platforms depend on.  With _XOPEN_SOURCE defined, sources that include
    system header files that depend on the typedefs such as u_short cannot be
    compiled on these platforms.

Honestly, I'd have to say that such platform header files are buggy ;-)

If they want to use u_short and other custom types for their internal use,
that is understandable and perfectly fine, and if they want to hide these
names when _POSIX or _XOPEN is defined because you are not supposed to
contaminate the namespace, that is also sensible, but at the same time you
(not you, Boyd, but whoever developed the system header files) should have
taken an alternate measure (perhaps by using __u_short or something) not
to break the features they declare in the other header files of their own.

And not defining _XOPEN nor _POSIX would be a reasonable workaround to
the problem on such systems.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux