From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: oops? read/write vs type of length parameter Date: Mon, 11 Apr 2011 20:40:54 +0900 Message-ID: <87hba5yq0p.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87wrj1jhfc.fsf@rho.meyering.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1302523200 2048 80.91.229.12 (11 Apr 2011 12:00:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2011 12:00:00 +0000 (UTC) Cc: Jim Meyering , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 11 13:59:53 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9FmZ-0008Pt-24 for ged-emacs-devel@m.gmane.org; Mon, 11 Apr 2011 13:59:51 +0200 Original-Received: from localhost ([127.0.0.1]:55888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q9FmX-0000ZM-SN for ged-emacs-devel@m.gmane.org; Mon, 11 Apr 2011 07:59:49 -0400 Original-Received: from [140.186.70.92] (port=53085 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q9FmF-0000X0-UP for emacs-devel@gnu.org; Mon, 11 Apr 2011 07:59:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9FmE-0003H5-K5 for emacs-devel@gnu.org; Mon, 11 Apr 2011 07:59:31 -0400 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:54859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9FmC-0003El-VY; Mon, 11 Apr 2011 07:59:29 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id 4E9339706BF; Mon, 11 Apr 2011 20:35:11 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 9C03C1A27A8; Mon, 11 Apr 2011 20:40:54 +0900 (JST) In-Reply-To: X-Mailer: VM 8.1.93a under 21.5 (beta29) "garbanzo" eac2e6bd5b2c+ XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.224 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138385 Archived-At: Eli Zaretskii writes: > > However, did you really intend to make the buffer length parameters signed? > > I would have expected those to be of type size_t, not ssize_t. > > We call these functions with an argument of type EMACS_INT, If you're going to do that, why not declare it as an EMACS_INT? The problem with using external standard types is that some developers will proceed to "correct" them, and the compiler won't tell you about it. Of course if you happen to be paying attention (which is most of the time to be sure), the patch will get rejected, but it seems to me using EMACS_INT will forestall that.