Changeset 3927


Ignore:
Timestamp:
Oct 26, 2014, 3:15:37 AM (11 years ago)
Author:
bird
Message:

trunk,0.6: syslimits.h,param.h: Lowered ARG_MAX/NCARGS by 32-bytes just to be on the safe side of the 32KB limit imposed by DosExecPgm. Corrected the comments.

Location:
trunk/libc/include/sys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/include/sys/param.h

    r3897 r3927  
    8181#ifndef NCARGS
    8282/** Max argument size for an exec function.
    83  * OS2: Assuming at least 4KB of environment gives us 0xf000 at the very best.
    84  *      However we set it to 32KB which should be a safe max. */
     83 * OS2: DosExecPgm does not accept more than 32KB of command line arguments
     84 *      (ditto for environment). So, we keep the limit a few bytes short of
     85 *      this to avoid rounding errors on the user side. */
    8586#define NCARGS          ARG_MAX
    8687#endif
  • trunk/libc/include/sys/syslimits.h

    r3897 r3927  
    1515#ifndef ARG_MAX
    1616/** Max argument size for an exec function.
    17  * OS2: Assuming at least 4KB of environment gives us 0xf000 at the very best.
    18  *      However we set it to 32KB which should be a safe max. */
    19 #define ARG_MAX         0x8000
     17 * OS2: DosExecPgm does not accept more than 32KB of command line arguments
     18 *      (ditto for environment). So, we keep the limit a few bytes short of
     19 *      this to avoid rounding errors on the user side. */
     20#define ARG_MAX         0x7fe0
    2021#endif
    2122
Note: See TracChangeset for help on using the changeset viewer.