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