17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 530da79d5Sraf * Common Development and Distribution License (the "License"). 630da79d5Sraf * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 2130da79d5Sraf 227c478bd9Sstevel@tonic-gate /* 230a1278f2SGary Mills * Copyright (c) 2013 Gary Mills 249c0752acSAndrew Stormont * Copyright 2017 RackTop Systems. 250a1278f2SGary Mills * 2630da79d5Sraf * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 277c478bd9Sstevel@tonic-gate * Use is subject to license terms. 28*8e935259SBryan Cantrill * Copyright 2015 Joyent, Inc. All rights reserved. 297c478bd9Sstevel@tonic-gate */ 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */ 32b4203d75SMarcel Telka /* All Rights Reserved */ 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate #ifndef _LIMITS_H 367c478bd9Sstevel@tonic-gate #define _LIMITS_H 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate #include <sys/feature_tests.h> 397c478bd9Sstevel@tonic-gate #include <sys/isa_defs.h> 407c478bd9Sstevel@tonic-gate #include <iso/limits_iso.h> 41*8e935259SBryan Cantrill #include <sys/limits.h> 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate /* 447c478bd9Sstevel@tonic-gate * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C 457c478bd9Sstevel@tonic-gate * committee's working draft for the revision of the current ISO C standard, 467c478bd9Sstevel@tonic-gate * ISO/IEC 9899:1990 Programming language - C. These are not currently 477c478bd9Sstevel@tonic-gate * required by any standard but constitute a useful, general purpose set 487c478bd9Sstevel@tonic-gate * of type definitions and limits which is namespace clean with respect to 497c478bd9Sstevel@tonic-gate * all standards. 507c478bd9Sstevel@tonic-gate */ 517c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \ 527c478bd9Sstevel@tonic-gate defined(__XOPEN_OR_POSIX) 537c478bd9Sstevel@tonic-gate #include <sys/int_limits.h> 547c478bd9Sstevel@tonic-gate #endif 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate #ifdef __cplusplus 577c478bd9Sstevel@tonic-gate extern "C" { 587c478bd9Sstevel@tonic-gate #endif 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \ 617c478bd9Sstevel@tonic-gate defined(__XOPEN_OR_POSIX) 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate #define SSIZE_MAX LONG_MAX /* max value of an "ssize_t" */ 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate /* 667c478bd9Sstevel@tonic-gate * ARG_MAX is calculated as follows: 677c478bd9Sstevel@tonic-gate * NCARGS - space for other stuff on initial stack 687c478bd9Sstevel@tonic-gate * like aux vectors, saved registers, etc.. 697c478bd9Sstevel@tonic-gate */ 707c478bd9Sstevel@tonic-gate #define _ARG_MAX32 1048320 /* max length of args to exec 32-bit program */ 717c478bd9Sstevel@tonic-gate #define _ARG_MAX64 2096640 /* max length of args to exec 64-bit program */ 727c478bd9Sstevel@tonic-gate #ifdef _LP64 737c478bd9Sstevel@tonic-gate #define ARG_MAX _ARG_MAX64 /* max length of arguments to exec */ 747c478bd9Sstevel@tonic-gate #else /* _LP64 */ 757c478bd9Sstevel@tonic-gate #define ARG_MAX _ARG_MAX32 /* max length of arguments to exec */ 767c478bd9Sstevel@tonic-gate #endif /* _LP64 */ 777c478bd9Sstevel@tonic-gate 782463e920SRichard Lowe 792463e920SRichard Lowe /* 802463e920SRichard Lowe * These two symbols have their historical values, the actual buffer is 812463e920SRichard Lowe * larger. 822463e920SRichard Lowe */ 837c478bd9Sstevel@tonic-gate #ifndef MAX_CANON 847c478bd9Sstevel@tonic-gate #define MAX_CANON 256 /* max bytes in line for canonical processing */ 857c478bd9Sstevel@tonic-gate #endif 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate #ifndef MAX_INPUT 887c478bd9Sstevel@tonic-gate #define MAX_INPUT 512 /* max size of a char input buffer */ 897c478bd9Sstevel@tonic-gate #endif 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate #define NGROUPS_MAX 16 /* max number of groups for a user */ 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate #ifndef PATH_MAX 947c478bd9Sstevel@tonic-gate #define PATH_MAX 1024 /* max # of characters in a path name */ 957c478bd9Sstevel@tonic-gate #endif 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate #define SYMLINK_MAX 1024 /* max # of characters a symlink can contain */ 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gate #define PIPE_BUF 5120 /* max # bytes atomic in write to a pipe */ 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate #ifndef TMP_MAX 1027c478bd9Sstevel@tonic-gate #define TMP_MAX 17576 /* 26 * 26 * 26 */ 1037c478bd9Sstevel@tonic-gate #endif 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate /* 1067c478bd9Sstevel@tonic-gate * POSIX conformant definitions - An implementation may define 1077c478bd9Sstevel@tonic-gate * other symbols which reflect the actual implementation. Alternate 1087c478bd9Sstevel@tonic-gate * definitions may not be as restrictive as the POSIX definitions. 1097c478bd9Sstevel@tonic-gate */ 1107c478bd9Sstevel@tonic-gate #define _POSIX_AIO_LISTIO_MAX 2 1117c478bd9Sstevel@tonic-gate #define _POSIX_AIO_MAX 1 1127c478bd9Sstevel@tonic-gate #define _POSIX_ARG_MAX 4096 1137c478bd9Sstevel@tonic-gate #ifdef _XPG6 1147c478bd9Sstevel@tonic-gate #define _POSIX_CHILD_MAX 25 1157c478bd9Sstevel@tonic-gate #else 1167c478bd9Sstevel@tonic-gate #define _POSIX_CHILD_MAX 6 /* POSIX.1-1990 default */ 1177c478bd9Sstevel@tonic-gate #endif 1187c478bd9Sstevel@tonic-gate #define _POSIX_CLOCKRES_MIN 20000000 1197c478bd9Sstevel@tonic-gate #define _POSIX_DELAYTIMER_MAX 32 1207c478bd9Sstevel@tonic-gate #define _POSIX_LINK_MAX 8 1217c478bd9Sstevel@tonic-gate #define _POSIX_MAX_CANON 255 1227c478bd9Sstevel@tonic-gate #define _POSIX_MAX_INPUT 255 1237c478bd9Sstevel@tonic-gate #define _POSIX_MQ_OPEN_MAX 8 1247c478bd9Sstevel@tonic-gate #define _POSIX_MQ_PRIO_MAX 32 1257c478bd9Sstevel@tonic-gate #define _POSIX_NAME_MAX 14 1267c478bd9Sstevel@tonic-gate #ifdef _XPG6 1277c478bd9Sstevel@tonic-gate #define _POSIX_NGROUPS_MAX 8 1287c478bd9Sstevel@tonic-gate #define _POSIX_OPEN_MAX 20 1297c478bd9Sstevel@tonic-gate #define _POSIX_PATH_MAX 256 1307c478bd9Sstevel@tonic-gate #else /* POSIX.1-1990 defaults */ 1317c478bd9Sstevel@tonic-gate #define _POSIX_NGROUPS_MAX 0 1327c478bd9Sstevel@tonic-gate #define _POSIX_OPEN_MAX 16 1337c478bd9Sstevel@tonic-gate #define _POSIX_PATH_MAX 255 1347c478bd9Sstevel@tonic-gate #endif 1357c478bd9Sstevel@tonic-gate #define _POSIX_PIPE_BUF 512 1367c478bd9Sstevel@tonic-gate #define _POSIX_RTSIG_MAX 8 1377c478bd9Sstevel@tonic-gate #define _POSIX_SEM_NSEMS_MAX 256 1387c478bd9Sstevel@tonic-gate #define _POSIX_SEM_VALUE_MAX 32767 1397c478bd9Sstevel@tonic-gate #define _POSIX_SIGQUEUE_MAX 32 1407c478bd9Sstevel@tonic-gate #define _POSIX_SSIZE_MAX 32767 1417c478bd9Sstevel@tonic-gate #define _POSIX_STREAM_MAX 8 1427c478bd9Sstevel@tonic-gate #define _POSIX_TIMER_MAX 32 1437c478bd9Sstevel@tonic-gate #ifdef _XPG6 1447c478bd9Sstevel@tonic-gate #define _POSIX_TZNAME_MAX 6 1457c478bd9Sstevel@tonic-gate #else 1467c478bd9Sstevel@tonic-gate #define _POSIX_TZNAME_MAX 3 /* POSIX.1-1990 default */ 1477c478bd9Sstevel@tonic-gate #endif 1487c478bd9Sstevel@tonic-gate /* POSIX.1c conformant */ 1497c478bd9Sstevel@tonic-gate #define _POSIX_LOGIN_NAME_MAX 9 1507c478bd9Sstevel@tonic-gate #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 1517c478bd9Sstevel@tonic-gate #define _POSIX_THREAD_KEYS_MAX 128 1527c478bd9Sstevel@tonic-gate #define _POSIX_THREAD_THREADS_MAX 64 1537c478bd9Sstevel@tonic-gate #define _POSIX_TTY_NAME_MAX 9 1547c478bd9Sstevel@tonic-gate /* UNIX 03 conformant */ 1557c478bd9Sstevel@tonic-gate #define _POSIX_HOST_NAME_MAX 255 1567c478bd9Sstevel@tonic-gate #define _POSIX_RE_DUP_MAX 255 1577c478bd9Sstevel@tonic-gate #define _POSIX_SYMLINK_MAX 255 1587c478bd9Sstevel@tonic-gate #define _POSIX_SYMLOOP_MAX 8 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate /* 1617c478bd9Sstevel@tonic-gate * POSIX.2 and XPG4-XSH4 conformant definitions 1627c478bd9Sstevel@tonic-gate */ 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate #define _POSIX2_BC_BASE_MAX 99 1657c478bd9Sstevel@tonic-gate #define _POSIX2_BC_DIM_MAX 2048 1667c478bd9Sstevel@tonic-gate #define _POSIX2_BC_SCALE_MAX 99 1677c478bd9Sstevel@tonic-gate #define _POSIX2_BC_STRING_MAX 1000 1687c478bd9Sstevel@tonic-gate #define _POSIX2_COLL_WEIGHTS_MAX 2 1697c478bd9Sstevel@tonic-gate #define _POSIX2_EXPR_NEST_MAX 32 1707c478bd9Sstevel@tonic-gate #define _POSIX2_LINE_MAX 2048 1717c478bd9Sstevel@tonic-gate #define _POSIX2_RE_DUP_MAX 255 1727c478bd9Sstevel@tonic-gate /* UNIX 03 conformant */ 1737c478bd9Sstevel@tonic-gate #define _POSIX2_CHARCLASS_NAME_MAX 14 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate #define BC_BASE_MAX _POSIX2_BC_BASE_MAX 1767c478bd9Sstevel@tonic-gate #define BC_DIM_MAX _POSIX2_BC_DIM_MAX 1777c478bd9Sstevel@tonic-gate #define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX 1787c478bd9Sstevel@tonic-gate #define BC_STRING_MAX _POSIX2_BC_STRING_MAX 1797c478bd9Sstevel@tonic-gate #define COLL_WEIGHTS_MAX 10 1807c478bd9Sstevel@tonic-gate #define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX 1817c478bd9Sstevel@tonic-gate #define LINE_MAX _POSIX2_LINE_MAX 1827c478bd9Sstevel@tonic-gate #if !defined(_XPG6) 1837c478bd9Sstevel@tonic-gate #define RE_DUP_MAX _POSIX2_RE_DUP_MAX 1847c478bd9Sstevel@tonic-gate #else 1857c478bd9Sstevel@tonic-gate #define RE_DUP_MAX _POSIX_RE_DUP_MAX 1867c478bd9Sstevel@tonic-gate #endif /* !defined(_XPG6) */ 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */ 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 1917c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \ 1927c478bd9Sstevel@tonic-gate defined(_XOPEN_SOURCE) 1937c478bd9Sstevel@tonic-gate 1947c478bd9Sstevel@tonic-gate /* 1957c478bd9Sstevel@tonic-gate * For dual definitions for PASS_MAX and sysconf.c 1967c478bd9Sstevel@tonic-gate */ 1977c478bd9Sstevel@tonic-gate #define _PASS_MAX_XPG 8 /* old standards PASS_MAX */ 1987c478bd9Sstevel@tonic-gate #define _PASS_MAX 256 /* modern Solaris PASS_MAX */ 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gate #if defined(_XPG3) && !defined(_XPG6) 2017c478bd9Sstevel@tonic-gate #define PASS_MAX _PASS_MAX_XPG /* max # of characters in a password */ 2027c478bd9Sstevel@tonic-gate #else /* XPG6 or just Solaris */ 2037c478bd9Sstevel@tonic-gate #define PASS_MAX _PASS_MAX /* max # of characters in a password */ 2047c478bd9Sstevel@tonic-gate #endif /* defined(_XPG3) && !defined(_XPG6) */ 2057c478bd9Sstevel@tonic-gate 2067c478bd9Sstevel@tonic-gate #define CHARCLASS_NAME_MAX _POSIX2_CHARCLASS_NAME_MAX 2077c478bd9Sstevel@tonic-gate 2087c478bd9Sstevel@tonic-gate #define NL_ARGMAX 9 /* max value of "digit" in calls to the */ 2097c478bd9Sstevel@tonic-gate /* NLS printf() and scanf() */ 2107c478bd9Sstevel@tonic-gate #define NL_LANGMAX 14 /* max # of bytes in a LANG name */ 2117c478bd9Sstevel@tonic-gate #define NL_MSGMAX 32767 /* max message number */ 2127c478bd9Sstevel@tonic-gate #define NL_NMAX 1 /* max # bytes in N-to-1 mapping characters */ 2137c478bd9Sstevel@tonic-gate #define NL_SETMAX 255 /* max set number */ 2147c478bd9Sstevel@tonic-gate #define NL_TEXTMAX 2048 /* max set number */ 2157c478bd9Sstevel@tonic-gate #define NZERO 20 /* default process priority */ 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate #define WORD_BIT 32 /* # of bits in a "word" or "int" */ 2187c478bd9Sstevel@tonic-gate #if defined(_LP64) 2197c478bd9Sstevel@tonic-gate #define LONG_BIT 64 /* # of bits in a "long" */ 2207c478bd9Sstevel@tonic-gate #else /* _ILP32 */ 2217c478bd9Sstevel@tonic-gate #define LONG_BIT 32 /* # of bits in a "long" */ 2227c478bd9Sstevel@tonic-gate #endif 2237c478bd9Sstevel@tonic-gate 2247c478bd9Sstevel@tonic-gate /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */ 2257c478bd9Sstevel@tonic-gate #ifndef _XPG6 2267c478bd9Sstevel@tonic-gate #define DBL_DIG 15 /* digits of precision of a "double" */ 2277c478bd9Sstevel@tonic-gate #define DBL_MAX 1.7976931348623157081452E+308 /* max decimal value */ 2287c478bd9Sstevel@tonic-gate /* of a double */ 2297c478bd9Sstevel@tonic-gate #define FLT_DIG 6 /* digits of precision of a "float" */ 2307c478bd9Sstevel@tonic-gate #define FLT_MAX 3.4028234663852885981170E+38F /* max decimal value */ 2317c478bd9Sstevel@tonic-gate /* of a "float" */ 2327c478bd9Sstevel@tonic-gate #endif 2337c478bd9Sstevel@tonic-gate 2347c478bd9Sstevel@tonic-gate /* Marked as LEGACY in SUSv1 and removed in SUSv2 */ 2357c478bd9Sstevel@tonic-gate #ifndef _XPG5 2367c478bd9Sstevel@tonic-gate #define DBL_MIN 2.2250738585072013830903E-308 /* min decimal value */ 2377c478bd9Sstevel@tonic-gate /* of a double */ 2387c478bd9Sstevel@tonic-gate #define FLT_MIN 1.1754943508222875079688E-38F /* min decimal value */ 2397c478bd9Sstevel@tonic-gate /* of a float */ 2407c478bd9Sstevel@tonic-gate #endif 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) ... */ 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gate #define _XOPEN_IOV_MAX 16 /* max # iovec/process with readv()/writev() */ 2457c478bd9Sstevel@tonic-gate #define _XOPEN_NAME_MAX 255 /* max # bytes in filename excluding null */ 2467c478bd9Sstevel@tonic-gate #define _XOPEN_PATH_MAX 1024 /* max # bytes in a pathname */ 2477c478bd9Sstevel@tonic-gate 2487c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 2497c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) 2507c478bd9Sstevel@tonic-gate 2517c478bd9Sstevel@tonic-gate #define FCHR_MAX 1048576 /* max size of a file in bytes */ 2527c478bd9Sstevel@tonic-gate #define PID_MAX 999999 /* max value for a process ID */ 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate /* 2557c478bd9Sstevel@tonic-gate * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the 2567c478bd9Sstevel@tonic-gate * related text states: 2577c478bd9Sstevel@tonic-gate * 2587c478bd9Sstevel@tonic-gate * A definition of one of the values from Table 2-5 shall be omitted from the 2597c478bd9Sstevel@tonic-gate * <limits.h> on specific implementations where the corresponding value is 2607c478bd9Sstevel@tonic-gate * equal to or greater than the stated minimum, but where the value can vary 2617c478bd9Sstevel@tonic-gate * depending on the file to which it is applied. The actual value supported for 2627c478bd9Sstevel@tonic-gate * a specific pathname shall be provided by the pathconf() (5.7.1) function. 2637c478bd9Sstevel@tonic-gate * 2647c478bd9Sstevel@tonic-gate * This is clear that any machine supporting multiple file system types 2659c0752acSAndrew Stormont * and/or a network should not include this define, regardless of protection 2669c0752acSAndrew Stormont * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags. We chose to ignore that 2679c0752acSAndrew Stormont * and provide it anyway for compatibility with other platforms that don't 2689c0752acSAndrew Stormont * follow the spec as precisely as they should. Its usage is discouraged. 2697c478bd9Sstevel@tonic-gate */ 2709c0752acSAndrew Stormont #define NAME_MAX 255 2717c478bd9Sstevel@tonic-gate 2727c478bd9Sstevel@tonic-gate #define CHILD_MAX 25 /* max # of processes per user id */ 2737c478bd9Sstevel@tonic-gate #ifndef OPEN_MAX 2747c478bd9Sstevel@tonic-gate #define OPEN_MAX 256 /* max # of files a process can have open */ 2757c478bd9Sstevel@tonic-gate #endif 2767c478bd9Sstevel@tonic-gate 2777c478bd9Sstevel@tonic-gate #define PIPE_MAX 5120 /* max # bytes written to a pipe in a write */ 2787c478bd9Sstevel@tonic-gate 2797c478bd9Sstevel@tonic-gate #define STD_BLK 1024 /* # bytes in a physical I/O block */ 2807c478bd9Sstevel@tonic-gate #define UID_MAX 2147483647 /* max value for a user or group ID */ 2817c478bd9Sstevel@tonic-gate #define USI_MAX 4294967295 /* max decimal value of an "unsigned" */ 2827c478bd9Sstevel@tonic-gate #define SYSPID_MAX 1 /* max pid of system processes */ 2837c478bd9Sstevel@tonic-gate 2847c478bd9Sstevel@tonic-gate #ifndef SYS_NMLN /* also defined in sys/utsname.h */ 2857c478bd9Sstevel@tonic-gate #define SYS_NMLN 257 /* 4.0 size of utsname elements */ 2867c478bd9Sstevel@tonic-gate #endif 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gate #ifndef CLK_TCK 2897c478bd9Sstevel@tonic-gate 2907c478bd9Sstevel@tonic-gate #if !defined(_CLOCK_T) || __cplusplus >= 199711L 2917c478bd9Sstevel@tonic-gate #define _CLOCK_T 2927c478bd9Sstevel@tonic-gate typedef long clock_t; 2937c478bd9Sstevel@tonic-gate #endif /* !_CLOCK_T */ 2947c478bd9Sstevel@tonic-gate 2957c478bd9Sstevel@tonic-gate extern long _sysconf(int); /* System Private interface to sysconf() */ 2967c478bd9Sstevel@tonic-gate #define CLK_TCK ((clock_t)_sysconf(3)) /* 3 is _SC_CLK_TCK */ 2977c478bd9Sstevel@tonic-gate 2987c478bd9Sstevel@tonic-gate #endif /* CLK_TCK */ 2997c478bd9Sstevel@tonic-gate 3000a1278f2SGary Mills #ifdef __USE_LEGACY_LOGNAME__ 3017c478bd9Sstevel@tonic-gate #define LOGNAME_MAX 8 /* max # of characters in a login name */ 3020a1278f2SGary Mills #else /* __USE_LEGACY_LOGNAME__ */ 3030a1278f2SGary Mills #define LOGNAME_MAX 32 /* max # of characters in a login name */ 3040a1278f2SGary Mills /* Increased for illumos */ 3050a1278f2SGary Mills #endif /* __USE_LEGACY_LOGNAME__ */ 3060a1278f2SGary Mills #define LOGIN_NAME_MAX (LOGNAME_MAX + 1) /* max buffer size */ 3070a1278f2SGary Mills #define LOGNAME_MAX_TRAD 8 /* traditional length */ 3080a1278f2SGary Mills #define LOGIN_NAME_MAX_TRAD (LOGNAME_MAX_TRAD + 1) /* and size */ 3090a1278f2SGary Mills 3107c478bd9Sstevel@tonic-gate #define TTYNAME_MAX 128 /* max # of characters in a tty name */ 3117c478bd9Sstevel@tonic-gate 3127c478bd9Sstevel@tonic-gate #endif /* if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) ... */ 3137c478bd9Sstevel@tonic-gate 3147c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || (_POSIX_C_SOURCE >= 199506L) 3157c478bd9Sstevel@tonic-gate #include <sys/unistd.h> 3167c478bd9Sstevel@tonic-gate 3177c478bd9Sstevel@tonic-gate #if !defined(_SIZE_T) || __cplusplus >= 199711L 3187c478bd9Sstevel@tonic-gate #define _SIZE_T 3197c478bd9Sstevel@tonic-gate #if defined(_LP64) || defined(_I32LPx) 3207c478bd9Sstevel@tonic-gate typedef unsigned long size_t; /* size of something in bytes */ 3217c478bd9Sstevel@tonic-gate #else 3227c478bd9Sstevel@tonic-gate typedef unsigned int size_t; /* (historical version) */ 3237c478bd9Sstevel@tonic-gate #endif 3247c478bd9Sstevel@tonic-gate #endif /* _SIZE_T */ 3257c478bd9Sstevel@tonic-gate 3267c478bd9Sstevel@tonic-gate extern long _sysconf(int); /* System Private interface to sysconf() */ 3277c478bd9Sstevel@tonic-gate 3287c478bd9Sstevel@tonic-gate #define PTHREAD_STACK_MIN ((size_t)_sysconf(_SC_THREAD_STACK_MIN)) 3297c478bd9Sstevel@tonic-gate /* Added for UNIX98 conformance */ 3307c478bd9Sstevel@tonic-gate #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS 3317c478bd9Sstevel@tonic-gate #define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX 3327c478bd9Sstevel@tonic-gate #define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX 3337c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || (_POSIX_C_SOURCE >= 199506L) */ 3347c478bd9Sstevel@tonic-gate 3357c478bd9Sstevel@tonic-gate #ifdef __cplusplus 3367c478bd9Sstevel@tonic-gate } 3377c478bd9Sstevel@tonic-gate #endif 3387c478bd9Sstevel@tonic-gate 3397c478bd9Sstevel@tonic-gate #endif /* _LIMITS_H */ 340