delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/13/18:11:21

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4C654584.9090305@redhat.com>
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> <4C654584 DOT 9090305 AT redhat DOT com>
Date: Fri, 13 Aug 2010 19:11:08 -0300
Message-ID: <AANLkTinqy5Smt4HjrkMGKywNmihjhx8vn-vbNM6+Wu0h@mail.gmail.com>
Subject: Re: diff /usr/include/endian.orig.h /usr/include/endian.h > endian.h.diff
From: Pedro Izecksohn <pedro DOT izecksohn AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

> Umm - did you copy straight from glibc's endian.h? =C2=A0That'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. =C2=A0How about=
 you
> instead describe which macros you are missing, so someone can do a
> clean-room implementation of those macros.

  After sleep I remembered the error that I posted first, that proves
that I did not copy from glibc:

+ #ifdef _BSD_SOURCE
+ #if __BYTE_ORDER =3D=3D __LITTLE_ENDIAN
+
+ #include <byteswap.h>

  If I would have copied from glibc this out-of-order code would be as
it must be.

  And regarding the many (x) I can explain them: I could use any
acceptable character, but I chose x for 2 reasons:

1) I, and probably most of you, learned equations at school using x
and y, to draw the points along the axes;
2) The x glyph represents the different ways to represent the same number:

  As a child, I once asked an Unix sysadmin that used a real TTY:
"-You are telling me that are two different ways to order the 4 bytes
of a number. But I can imagine many more ways to represent the same
number. For example: 1324 or 1423. ?"

  I thought to use (i) of integer, but its glyph does not remember the
proverb about Rome.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019