delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/10/13/05:00:35

Sender: vheyndri AT rug DOT ac DOT be
Message-Id: <3441E2D9.3846@rug.ac.be>
Date: Mon, 13 Oct 1997 10:59:05 +0200
From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
Mime-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp-workers AT delorie DOT com
Subject: Re: Should off_t become unsigned?
References: <Pine DOT SUN DOT 3 DOT 91 DOT 971012143341 DOT 8447b-100000 AT is>

Eli Zaretskii wrote:
 
> Since FAT32 drives are here and reportedly are even supported in plain
> DOS, maybe v2.02 should make off_t to be unsigned?  (Some of the library
> functions will need to be fixed as well, but that's another problem; I
> hope to be able to do that, with some help from a guy who has FAT32 drive
> on his machine).
> 
> Are there any adverse effects of making off_t unsigned?

I haven't anything against the idea of changing whatever naturally
positive type to unsigned or unsigned long, on the contrary. But the
choices that were made in the past, notably by an ANSI committe, for
those types, make it now almost impossible to portably alter this. 
Another example of these bad choices is the need for an unconst macro.

The adverse  effects I can thing of is that many programs check for an
error situation by comparing an off_t type value against 0. They
consider all negative values an error. As a consequence we wouldn't have
any errors anymore (hurray?).

-- 
+----------------+
| Vik Heyndrickx |
+----------------+

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019