From owner-freebsd-sparc Sun Sep 22 14:34:41 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D8E937B401 for ; Sun, 22 Sep 2002 14:34:40 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48A0043E3B for ; Sun, 22 Sep 2002 14:34:40 -0700 (PDT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 3D092AE162; Sun, 22 Sep 2002 14:34:40 -0700 (PDT) Date: Sun, 22 Sep 2002 14:34:40 -0700 From: Maxime Henrion To: "Peter J. Blok" Cc: freebsd-sparc@freebsd.org Subject: Re: cast void * to int Message-ID: <20020922213440.GA4530@elvis.mu.org> References: <200209222310.38552.Peter.Blok@inter.NL.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200209222310.38552.Peter.Blok@inter.NL.net> User-Agent: Mutt/1.4i Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Peter J. Blok wrote: > Hi, > > I am trying to port some modules to the sparc64 port, but I am getting > warnings on places where void * is used to store an int. > > For example the void * private, sometimes point towards something. On other > places it is used to store a 32 bit int. > > What is the nicest way to get around this? I mean when porting to a 64-bit > architecture, lots of times this must have happened. What is the "best - > freebsd" way to handle it? I can come up with a union, but that means lots of > changes. Use the C99 type intptr_t. Cheers, Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message