1
0

posix2_lim.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //
  2. // Copyright 2026 Aarav Ravindra Kharade
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. /* Copyright (C) 1991-2026 Free Software Foundation, Inc.
  17. This file is part of the GNU C Library.
  18. The GNU C Library is free software; you can redistribute it and/or
  19. modify it under the terms of the GNU Lesser General Public
  20. License as published by the Free Software Foundation; either
  21. version 2.1 of the License, or (at your option) any later version.
  22. The GNU C Library is distributed in the hope that it will be useful,
  23. but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  25. Lesser General Public License for more details.
  26. You should have received a copy of the GNU Lesser General Public
  27. License along with the GNU C Library; if not, see
  28. <https://www.gnu.org/licenses/>. */
  29. /*
  30. * Never include this file directly; include <limits.h> instead.
  31. */
  32. #ifndef _BITS_POSIX2_LIM_H
  33. #define _BITS_POSIX2_LIM_H 1
  34. /* The maximum `ibase' and `obase' values allowed by the `bc' utility. */
  35. #define _POSIX2_BC_BASE_MAX 99
  36. /* The maximum number of elements allowed in an array by the `bc' utility. */
  37. #define _POSIX2_BC_DIM_MAX 2048
  38. /* The maximum `scale' value allowed by the `bc' utility. */
  39. #define _POSIX2_BC_SCALE_MAX 99
  40. /* The maximum length of a string constant accepted by the `bc' utility. */
  41. #define _POSIX2_BC_STRING_MAX 1000
  42. /* The maximum number of weights that can be assigned to an entry of
  43. the LC_COLLATE `order' keyword in the locale definition file. */
  44. #define _POSIX2_COLL_WEIGHTS_MAX 2
  45. /* The maximum number of expressions that can be nested
  46. within parentheses by the `expr' utility. */
  47. #define _POSIX2_EXPR_NEST_MAX 32
  48. /* The maximum length, in bytes, of an input line. */
  49. #define _POSIX2_LINE_MAX 2048
  50. /* The maximum number of repeated occurrences of a regular expression
  51. permitted when using the interval notation `\{M,N\}'. */
  52. #define _POSIX2_RE_DUP_MAX 255
  53. /* The maximum number of bytes in a character class name. We have no
  54. fixed limit, 2048 is a high number. */
  55. #define _POSIX2_CHARCLASS_NAME_MAX 14
  56. /* These values are implementation-specific,
  57. and may vary within the implementation.
  58. Their precise values can be obtained from sysconf. */
  59. #ifndef BC_BASE_MAX
  60. #define BC_BASE_MAX _POSIX2_BC_BASE_MAX
  61. #endif
  62. #ifndef BC_DIM_MAX
  63. #define BC_DIM_MAX _POSIX2_BC_DIM_MAX
  64. #endif
  65. #ifndef BC_SCALE_MAX
  66. #define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
  67. #endif
  68. #ifndef BC_STRING_MAX
  69. #define BC_STRING_MAX _POSIX2_BC_STRING_MAX
  70. #endif
  71. #ifndef COLL_WEIGHTS_MAX
  72. #define COLL_WEIGHTS_MAX 255
  73. #endif
  74. #ifndef EXPR_NEST_MAX
  75. #define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
  76. #endif
  77. #ifndef LINE_MAX
  78. #define LINE_MAX _POSIX2_LINE_MAX
  79. #endif
  80. #ifndef CHARCLASS_NAME_MAX
  81. #define CHARCLASS_NAME_MAX 2048
  82. #endif
  83. /* This value is defined like this in regex.h. */
  84. #define RE_DUP_MAX (0x7fff)
  85. #endif /* bits/posix2_lim.h */