delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4C654584.9090305@redhat.com> |
Date: | Fri, 13 Aug 2010 07:15:48 -0600 |
From: | Eric Blake <eblake AT redhat DOT com> |
User-Agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.1.1 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: diff /usr/include/endian.orig.h /usr/include/endian.h > endian.h.diff |
References: | <AANLkTimQfeALLK=x_UvJYLjusd6ygCtjUKDrdA91e7Ej AT mail DOT gmail DOT com> <20100812225838 DOT GB15724 AT ednor DOT casa DOT cgf DOT cx> <4C647D32 DOT 1090907 AT redhat DOT com> <AANLkTikCc0gdoVTWfhp=xoNY_m=Up4XQiApLmm9K9da+@mail.gmail.com> <AANLkTin_VGPC-qfVROBhyFqcU0DBD5B8RAxLCF9RsNDC AT mail DOT gmail DOT com> |
In-Reply-To: | <AANLkTin_VGPC-qfVROBhyFqcU0DBD5B8RAxLCF9RsNDC@mail.gmail.com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
--------------enigEB10707FFD1EE312EA3D1213 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/12/2010 06:35 PM, Pedro Izecksohn wrote: > --- I wrote: >> Defines macros for to convert the endianness of 16, 32 and 64 bits >> integer types. >> >> diff -c /usr/include/endian.orig.h /usr/include/endian.h >=20 > My previous diff is wrong. The right one follows: OK, that documents _what_ your changes are, but not _why_ you are making them. Mentioning that you are adding macros that are present in a Linux installation's endian.h would have been nice (for example, that you made your changes by reading 'man htobe16' on Linux). > + #ifdef _BSD_SOURCE > + > + #include <byteswap.h> > + > + #if __BYTE_ORDER =3D=3D __LITTLE_ENDIAN Umm - did you copy straight from glibc's endian.h? That's a no-no; cygwin generally doesn't want to borrow LGPL sources to avoid any licensing questions (borrowing from BSD is okay, on the other hand). You would have to implement things from scratch from a documentation page, or copy from a less-questionable source, rather than using glibc's implementation. I'm stopping right here, so I don't risk tainting myself. How about you instead describe which macros you are missing, so someone can do a clean-room implementation of those macros. --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigEB10707FFD1EE312EA3D1213 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJMZUWJAAoJEKeha0olJ0NqXVQH/RHcqGGYoU40R1Ba6MEkDf2D zpLWuab9nWrLc9/cSrOBFQwN0Z9Xv1WFx+0xd7okm+Q2VI15TZfEjsBxItgcrf5T 3ASvit/Ns3YhOku/GEQqXbCMWrISdd7zbqcQUO+lBoDMT01awZpcsOxWbe04ohtu DVxgnuPM4XAx98pMPpcPZCUwwjEWk+v34oO8R2//9HWccxOcyXxkT7GZiQXCKFtd sC4c9oOfz2Mmx0El83v4jHsv1XRzwOgCU6YP69rDr85lR+atfopxthG8N+WKqjyv kOn6mioAUftEFWBTOpWyKTPuRCPVhCSdj4BzJHH11EYNHHAk3+DIIiOLgQdKX7w= =Id8i -----END PGP SIGNATURE----- --------------enigEB10707FFD1EE312EA3D1213--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |