X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..c3c9b80d004dbbfdf763edeb97968c6997e3b45b:/bsd/sys/syslimits.h diff --git a/bsd/sys/syslimits.h b/bsd/sys/syslimits.h index 28424700f..c43ab4730 100644 --- a/bsd/sys/syslimits.h +++ b/bsd/sys/syslimits.h @@ -68,11 +68,27 @@ #include #if !defined(_ANSI_SOURCE) + +/* max bytes for an exec function */ +#ifdef XNU_KERNEL_PRIVATE +#if defined(XNU_TARGET_OS_OSX) +#define ARG_MAX (1024 * 1024) +#else +#define ARG_MAX (256 * 1024) +#endif +#else /* XNU_KERNEL_PRIVATE */ +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) +#define ARG_MAX (1024 * 1024) +#else +#define ARG_MAX (256 * 1024) +#endif +#endif /* XNU_KERNEL_PRIVATE */ + /* * Note: CHILD_MAX *must* be less than hard_maxproc, which is set at * compile time; you *cannot* set it higher than the hard limit!! */ -#define ARG_MAX (256 * 1024) /* max bytes for an exec function */ + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) #define CHILD_MAX 266 /* max simultaneous processes */ #define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */