From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 27 19:56:25 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 725181065673 for ; Sun, 27 Mar 2011 19:56:25 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 45F938FC1F for ; Sun, 27 Mar 2011 19:56:25 +0000 (UTC) Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 1C7BF208B5 for ; Sun, 27 Mar 2011 15:37:10 -0400 (EDT) Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 27 Mar 2011 15:37:10 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=date:from:to:subject:message-id:mime-version:content-type:content-transfer-encoding; s=smtpout; bh=tIlYOtGh9EnmHopoBtoHly+xHFQ=; b=E3F344V09iy5Q1XD/3JuKB6aSR6Z+9WDdcFOROyCS1uLL4pI7eytE+0lBBjQoajbxplMfCwumQOyVYgnrKq7sM//1qgRgufo0WFUWkghpYWyT+pFfyIosqHjYfJmu7PDdlm4X1EatBFY8wS8F2YjiKuv48QLic+P5/CQKwuZ85I= X-Sasl-enc: Bc1TvyYkkb6yk1RJIXb9DYUc/6Cs8glgTbgPD9SJ6mES 1301254629 Received: from localhost (222-154-136-33.jetstream.xtra.co.nz [222.154.136.33]) by mail.messagingengine.com (Postfix) with ESMTPA id 28CBF44809B for ; Sun, 27 Mar 2011 15:37:08 -0400 (EDT) Date: Mon, 28 Mar 2011 08:36:57 +1300 From: Andrew Turner To: freebsd-hackers@freebsd.org Message-ID: <20110328083657.35507caf@fubar.geek.nz> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; i386-portbld-freebsd8.0) X-Pirate: Arrrr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Unsigned wchar_t X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2011 19:56:25 -0000 Hello hackers@ I'm working on getting FreeBSD working with the ARM EABI. As part of this the Procedure Call Standard for the ARM Architecture (AAPCS) defines wchar_t as an unsigned int. Looking at sys/sys/_types.h rune_t, wchar_t and wint_t are of type __ct_rune_t which is an int. Furthermore as per the comment above the typedef rune_t must be signed to hold EOF of -1 and wchar_t must be the same type as rune_t. Because wchar_t is defined as an unsigned int would there be any issues with moving the typedef for __wchar_t to and changing it from __ct_rune_t to int with the exception of the ARM EABI case? Along with this WCHAR_MIN and WCHAR_MAX are defined both in and . I would like to remove the copy from wchar.h and add an include to machine/_stdint.h. Would there be any problems with either of these or is there a better place to put the __wchar_t typedef and define WCHAR_MIN and WCHAR_MAX? Andrew