From owner-cvs-src@FreeBSD.ORG Tue Aug 19 14:32:52 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE2F516A4BF; Tue, 19 Aug 2003 14:32:52 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED3C543FA3; Tue, 19 Aug 2003 14:32:51 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost.nic.fr [IPv6:::1] (may be forged)) by khavrinen.lcs.mit.edu (8.12.9/8.12.9) with ESMTP id h7JLWn6X035755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK CN=khavrinen.lcs.mit.edu issuer=SSL+20Client+20CA); Tue, 19 Aug 2003 17:32:50 -0400 (EDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.9/8.12.9/Submit) id h7JLWnZk035752; Tue, 19 Aug 2003 17:32:49 -0400 (EDT) (envelope-from wollman) Date: Tue, 19 Aug 2003 17:32:49 -0400 (EDT) From: Garrett Wollman Message-Id: <200308192132.h7JLWnZk035752@khavrinen.lcs.mit.edu> To: Marcel Moolenaar In-Reply-To: <20030819210421.GA28597@athlon.pn.xcllnt.net> References: <200308192039.h7JKdni9081097@repoman.freebsd.org> <20030819210421.GA28597@athlon.pn.xcllnt.net> X-Spam-Score: -19.8 () IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/include unistd.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2003 21:32:53 -0000 < said: > Changing the type of the namelen argument from int to size_t in > at least the implementation of the function breaks the ABI on > 64-bit platforms. The problem is that sign-extension is moved > from the callee to the caller and previously compiled code will > not have said sign-extension. Hmmm. I hadn't thought of that, but you're absolutely right. Suggestions as to the best way to deal? (I want the type to be correct going forward.) It wouldn't be too hard to support both, at least in the short run. It would look like this in the header file: int gethostname(char *, int); int __gethostname(char *, size_t); #define gethostname __gethostname ...and then there would be trampoline in libc that took care of the rest. -GAWollman