🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.netbsd.tech.userlevel
Article #3

Re: intptr_t, kqueue: history/rationale of type change

#3
From: Martin Husemann
Date: Thu, 08 Oct 2026 13:03
16 lines
1736 bytes
On Thu, Oct 08, 2026 at 08:54:08AM -0400, Greg Troxel wrote:
> I now think that intptr_t is "pointer stored in an int", not a pointer
> to an int.

intptr_t is a signed integer type that can hold the value of a "void*"
without data loss. The C standard says you can convert the value of a
void * to intptr_t, convert that back to void* and compare the result
with the original void* and the comparision is required to come up equal.

uintptr_t is an unsigned integer type with the same property.

Martin

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <aseUqRs8NxEqAd0I@big-apple.aprisoft.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <rmijynsuzdb.fsf@s1.lexort.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Martin Husemann <martin@duskware.de>
Newsgroups: muc.lists.netbsd.tech.userlevel
Subject: Re: intptr_t, kqueue: history/rationale of type change
Date: Thu, 8 Oct 2026 15:03:37 +0200
Organization: Newsgate at muc.de e.V.
Sender: tech-userlevel-owner@NetBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <aseUqRs8NxEqAd0I@big-apple.aprisoft.de>
References: <rmijynsuzdb.fsf@s1.lexort.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="42215"; mail-complaints-to="news-admin@muc.de"
Content-Disposition: inline
In-Reply-To: <rmijynsuzdb.fsf@s1.lexort.com>
Precedence: bulk
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes