OPEN_MAX and other constants - are they desireable?

Moderator, John Quarterman std-unix at ut-sally.UUCP
Thu Nov 14 14:17:05 AEST 1985


Date: Wed, 13 Nov 85 17:02:39 est
From: Kee Hinckley <harvard!wanginst!apollo!nazgul>

In article <3430 at ut-sally.UUCP> you write:
> Date: 06 Oct 85 18:36:07 +1000 (Sun)
> >From: Robert Elz <munnari!kre at seismo.CSS.GOV>
...
> I suggest deleting all of the constants, and instead specifying
> a library routine, which when handed a name defined in <limits.h>
> will return the associated constant.
> 

One problem with this is that a piece of code may want to #if off of
particular constants.  For instance, if I discover that the amount
of memory I have is too small, and I don't have virtual memory then
I might want to use temporary files.  This could be all handled 
automatically by using #if's in the code if I could reference a
constant, but it would not work out nearly as well if I had to
make that kind of decision at runtime.  I tend to agree with the
other responses.  The problems that are introduced by limits.h
almost all relate to binary portability, and binary portability
is not a concern for the standard.

                                       Kee Hinckley
                                       User Environment
                                       Apollo Computer
                                       ...decvax!wanginst!apollo!nazgul

Volume-Number: Volume 3, Number 17



More information about the Mod.std.unix mailing list