Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14413.48379.598269.956062@lasker.666.com>
Date: Tue, 7 Dec 1999 18:05:47 -0800 (PST)
From: Martin Buchholz <martin@xemacs.org>
To: Chris Faylor <cgf@cygnus.com>
Cc: cygwin@sourceware.cygnus.com, XEmacs NT <xemacs-nt@xemacs.org>,
        Eric Christopher <echristo@cygnus.com>
Subject: Re: cygwin-1999-12-01: Prototypes in system headers not standard-compliant
In-Reply-To: <19991207193739.A723@cygnus.com>
References: <14408.38135.146580.963528@lasker.666.com>
	<19991207193739.A723@cygnus.com>
X-Mailer: VM 6.72 under 21.2  (beta22) "Mercedes" XEmacs Lucid
Reply-To: martin@xemacs.org

>>>>> "Chris" == Chris Faylor <cgf@cygnus.com> writes:

Chris> On Fri, Dec 03, 1999 at 08:13:43PM -0800, Martin Buchholz wrote:
>> The prototype for read() and write() in Unix98 don't match those in
>> the Cygwin header files.
>> 
>> http://www.opengroup.org/onlinepubs/007908799/xsh/read.html
>> http://www.opengroup.org/onlinepubs/007908799/xsh/write.html
>> 
>> The standard return type for these functions is `ssize_t'.  
>> The traditional return type for these functions is `int'.
>> The return type in Cygwin is `int'.
>> 
>> On 32-bit platforms, like Cygwin, the best choice is probably to use
>> `ssize_t' in the prototypes (they are standard, after all, right?),
>> but to then have
>> 
>> typedef int ssize_t;
>> 
>> This is effectively what Linux does.

Chris> We're discussing this now.  It's not a simple issue since the "newlib"
Chris> code used by cygwin is also used by other Cygnus products so we have
Chris> to make sure that we don't break anything just to benefit Cygwin's
Chris> portability.

Chris> I do agree with this change, however, and hope to things fixed soon.

I understand that there may be engineering issues associated with the
transition, but the change has to be made sometime soon.  You just
don't have a choice when it comes to standards.  Besides, Cygwin's
primary purpose is to make standard Unix code run on Windows.

Like this (untested) line of code:

ssize_t (*my_read) (int, void *, size_t) = read;

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

