<p>On Fedora Core 7, I'm writing some code that relies on <code>ARG_MAX</code>.  However, even if I <code>#include &lt;limits.h&gt;</code>, the constant is still not defined.  My investigations show that it's present in <code>&lt;sys/linux/limits.h&gt;</code>, but this is supposed to be portable across Win32/Mac/Linux, so directly including it isn't an option.  What's going on here?</p>

The reason it's not in limits.h is that it's not a quantity giving the limits of the value range of an integral type based on bit width on the current architecture.  That's the role assigned to limits.h by the ISO standard.
The value in which you're interested is not hardware-bound in practice and can vary from platform to platform and perhaps system build to system build.
The correct thing to do is to call
```
sysconf
```
and ask it for "ARG_MAX" or "_POSIX_ARG_MAX".  I
think
that's the POSIX-compliant solution anyway.
Acc. to my documentation, you include one or both of unistd.h or limits.h based on what values you're requesting.
One other point:  many implementations of the exec family of functions return E2BIG or a similar value if you try to call them with an oversized environment.  This is one of the defined conditions under which exec can actually return.