🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Roland McGrath Mon, 23 Jul 1990 22:07
_POSIX_VDISABLE
#391
Author: Roland McGrath
Date: Mon, 23 Jul 1990 22:07
29 lines
1686 bytes
From:  mcgrath%tully.Berkeley.EDU@ucbvax.Berkeley.EDU (Roland McGrath)


>From 1003.1 2.10.4 it seems that if _POSIX_VDISABLE is defined as -1 in
<unistd.h>, it is supposed to mean there is no VDISABLE value for any file.
This precludes the value being -1.  Was this the intent?

Similarly, 5.7.1.3 says:

If the variable corresponding to NAME has no limit for the path or file
descriptor, the pathconf() and fpathconf() functions shall return -1 without
changing `errno'.

Though in the case of NAME == _PC_VDISABLE, the value in question is not a
"limit", this seems to imply that if pathconf("file", _PC_VDISABLE) returns -1
without changing `errno', then there is no VDISABLE for value for "file".

The problem is that the wording of the standard and the sysconf, pathconf, and
fpathconf functions were designed for boolean options and for limits which are
required to be positive integers.  In these cases, -1 is a reasonable
out-of-range value.  But _POSIX_VDISABLE is a character value, not restricted
to any specific range, and doesn't fit in right.
--
	Roland McGrath
	Free Software Foundation, Inc.
roland@ai.mit.edu, uunet!ai.mit.edu!roland


Volume-Number: Volume 20, Number 139
Re: _POSIX_VDISABLE
#395
Author: Karl Heuer
Date: Tue, 24 Jul 1990 22:03
16 lines
1315 bytes
In article <10462@cs.utexas.edu>:
>From: mcgrath%tully.Berkeley.EDU@ucbvax.Berkeley.EDU (Roland McGrath)
>The problem is that the wording of the standard and the sysconf, pathconf, and
>fpathconf functions were designed for boolean options and for limits which are
>required to be positive integers.  In these cases, -1 is a reasonable
>out-of-range value.  But _POSIX_VDISABLE is a character value, not restricted
>to any specific range, and doesn't fit in right.

The documented use of _POSIX_VDISABLE is to store it in an object of type
cc_t.  This is defined in 7.1.2.1 to be an unsigned integral type; hence -1
is indeed out-of-band.  Unless you're trying to make cc_t an unsigned long and
have _POSIX_VDISABLE be ULONG_MAX, you should be okay.

Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint

Volume-Number: Volume 20, Number 143
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads