delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2026/09/09/13:04:31

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 689H4P6V2104140
Authentication-Results: delorie.com; dmarc=none (p=none dis=none) header.from=delorie.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=delorie.com
X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 689H4OgX2104123
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=gnu.org
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=gnu.org
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 689H4OgX2104123
Authentication-Results: delorie.com;
dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=VhoqNccg
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
Date; bh=5cvgX6cTGUHsibC3Sn/C5FDSjRMgU9/lvPygqq05IjU=; b=VhoqNccgMEM0gj6qzfVH
OKXZtVeaxVS3/Zxus/0dPWeh4874aExXIUPeJXKdIP7wnWys+Y8dCKNt1oLX+dqHfuJbNTmyaznG+
o0p03SrZ/3q2Fvdx0RQOI/EL8KVhkgXgTxuukqSWkOtJbtGqUR/b7L70cyNLlgoBINLcCxe24sF97
+UyiJJnQzEyS/3cQk8+KySWbb4+BVFQixeUYtv00MHwNMEN7JSngbSDmZqRRNmg+tGDOonO5nQnC6
pAM6TSTxZY8D0tcNcV+cCFmJk0qvieAWfX/bW+qfzyKB3pQoFEfTyMDKIUczquyn9pi9FExTpeoJK
4CjX08zTKDNewA==;
Date: Wed, 09 Sep 2026 20:04:19 +0300
Message-Id: <8633vi73vw.fsf@gnu.org>
From: "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
To: djgpp AT delorie DOT com
In-Reply-To: <f4f9a047-cd76-4dac-97ce-ad718b0bc41a@gmail.com>
(djgpp AT delorie DOT com)
Subject: Re: _go32_dpmi_meminfo libc reference errata?
References: <f4f9a047-cd76-4dac-97ce-ad718b0bc41a AT gmail DOT com>
MIME-version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Wed, 9 Sep 2026 12:27:27 -0400
> From: "Frank Sapone (emoaddict15 AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
> 
> I was running some code with -Wall -Wextra and I was using the example 
> phys_mem_left() code in your documentaiton for _go32_dpmi_meminfo 
> located at http://www.delorie.com/djgpp/doc/libc/libc_438.html
> 
> In here it mentions "The only field that is guaranteed to have useful 
> data is available_memory. Any unavailable field has -1 in it.".  The 
> compiler complained on this line from example code: if 
> (info.available_physical_pages != -1)
> 
> This makes sense because they are u_long's so therefore they cannot have 
> negative values in them.  I imagine that you want to check != 0 or is 
> the example completely incorrect?

No, the example is correct.  If the compiler complains, cast -1 to
u_long.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2026   by DJ Delorie     Updated Sep 20 2026