Author: Not specified Language: c
Description: Not specified Timestamp: 2016-03-25 04:19:35 +0000
View raw paste Reply
  1. # 1 "<built-in>"
  2. # 1 "/usr/src/lib/libc/gen/fnmatch.c"
  3. /*
  4.  * Copyright (c) 1989, 1993, 1994
  5.  *      The Regents of the University of California.  All rights reserved.
  6.  *
  7.  * This code is derived from software contributed to Berkeley by
  8.  * Guido van Rossum.
  9.  *
  10.  * Copyright (c) 2011 The FreeBSD Foundation
  11.  * All rights reserved.
  12.  * Portions of this software were developed by David Chisnall
  13.  * under sponsorship from the FreeBSD Foundation.
  14.  *
  15.  * Redistribution and use in source and binary forms, with or without
  16.  * modification, are permitted provided that the following conditions
  17.  * are met:
  18.  * 1. Redistributions of source code must retain the above copyright
  19.  *    notice, this list of conditions and the following disclaimer.
  20.  * 2. Redistributions in binary form must reproduce the above copyright
  21.  *    notice, this list of conditions and the following disclaimer in the
  22.  *    documentation and/or other materials provided with the distribution.
  23.  * 4. Neither the name of the University nor the names of its contributors
  24.  *    may be used to endorse or promote products derived from this software
  25.  *    without specific prior written permission.
  26.  *
  27.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  28.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  29.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  30.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  31.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  32.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  33.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  34.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  35.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  36.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  37.  * SUCH DAMAGE.
  38.  */
  39.  
  40. #if defined(LIBC_SCCS) && !defined(lint)
  41. static char sccsid[] = "@(#)fnmatch.c   8.2 (Berkeley) 4/16/94";
  42. #endif /* LIBC_SCCS and not lint */
  43. # 41 "/usr/src/lib/libc/gen/fnmatch.c"
  44. #if 0 /* expanded by -frewrite-includes */
  45. #include <sys/cdefs.h>
  46. #endif /* expanded by -frewrite-includes */
  47. # 41 "/usr/src/lib/libc/gen/fnmatch.c"
  48. # 1 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 1 3
  49. /*-
  50.  * Copyright (c) 1991, 1993
  51.  *      The Regents of the University of California.  All rights reserved.
  52.  *
  53.  * This code is derived from software contributed to Berkeley by
  54.  * Berkeley Software Design, Inc.
  55.  *
  56.  * Redistribution and use in source and binary forms, with or without
  57.  * modification, are permitted provided that the following conditions
  58.  * are met:
  59.  * 1. Redistributions of source code must retain the above copyright
  60.  *    notice, this list of conditions and the following disclaimer.
  61.  * 2. Redistributions in binary form must reproduce the above copyright
  62.  *    notice, this list of conditions and the following disclaimer in the
  63.  *    documentation and/or other materials provided with the distribution.
  64.  * 4. Neither the name of the University nor the names of its contributors
  65.  *    may be used to endorse or promote products derived from this software
  66.  *    without specific prior written permission.
  67.  *
  68.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  69.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  70.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  71.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  72.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  73.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  74.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  75.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  76.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  77.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  78.  * SUCH DAMAGE.
  79.  *
  80.  *      @(#)cdefs.h     8.8 (Berkeley) 1/9/95
  81.  * $FreeBSD: head/sys/sys/cdefs.h 295041 2016-01-29 15:12:31Z br $
  82.  */
  83.  
  84. #ifndef _SYS_CDEFS_H_
  85. #define _SYS_CDEFS_H_
  86.  
  87. /*
  88.  * Testing against Clang-specific extensions.
  89.  */
  90. #ifndef __has_attribute
  91. #define __has_attribute(x)      0
  92. #endif
  93. # 45 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  94. #ifndef __has_extension
  95. #define __has_extension         __has_feature
  96. #endif
  97. # 48 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  98. #ifndef __has_feature
  99. #define __has_feature(x)        0
  100. #endif
  101. # 51 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  102. #ifndef __has_include
  103. #define __has_include(x)        0
  104. #endif
  105. # 54 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  106. #ifndef __has_builtin
  107. #define __has_builtin(x)        0
  108. #endif
  109. # 57 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  110.  
  111. #if defined(__cplusplus)
  112. #define __BEGIN_DECLS   extern "C" {
  113. #define __END_DECLS     }
  114. #else
  115. # 62 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  116. #define __BEGIN_DECLS
  117. #define __END_DECLS
  118. #endif
  119. # 65 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  120.  
  121. /*
  122.  * This code has been put in place to help reduce the addition of
  123.  * compiler specific defines in FreeBSD code.  It helps to aid in
  124.  * having a compiler-agnostic source tree.
  125.  */
  126.  
  127. #if defined(__GNUC__) || defined(__INTEL_COMPILER)
  128.  
  129. #if __GNUC__ >= 3 || defined(__INTEL_COMPILER)
  130. #define __GNUCLIKE_ASM 3
  131. #define __GNUCLIKE_MATH_BUILTIN_CONSTANTS
  132. #else
  133. # 78 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  134. #define __GNUCLIKE_ASM 2
  135. #endif
  136. # 80 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  137. #define __GNUCLIKE___TYPEOF 1
  138. #define __GNUCLIKE___OFFSETOF 1
  139. #define __GNUCLIKE___SECTION 1
  140.  
  141. #ifndef __INTEL_COMPILER
  142. #define __GNUCLIKE_CTOR_SECTION_HANDLING 1
  143. #endif
  144. # 87 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  145.  
  146. #define __GNUCLIKE_BUILTIN_CONSTANT_P 1
  147. #if defined(__INTEL_COMPILER) && defined(__cplusplus) && \
  148.    __INTEL_COMPILER < 800
  149. #undef __GNUCLIKE_BUILTIN_CONSTANT_P
  150. #endif
  151. # 93 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  152.  
  153. #if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3)
  154. #define __GNUCLIKE_BUILTIN_VARARGS 1
  155. #define __GNUCLIKE_BUILTIN_STDARG 1
  156. #define __GNUCLIKE_BUILTIN_VAALIST 1
  157. #endif
  158. # 99 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  159.  
  160. #if defined(__GNUC__)
  161. #define __GNUC_VA_LIST_COMPATIBILITY 1
  162. #endif
  163. # 103 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  164.  
  165. /*
  166.  * Compiler memory barriers, specific to gcc and clang.
  167.  */
  168. #if defined(__GNUC__)
  169. #define __compiler_membar()     __asm __volatile(" " : : : "memory")
  170. #endif
  171. # 110 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  172.  
  173. #ifndef __INTEL_COMPILER
  174. #define __GNUCLIKE_BUILTIN_NEXT_ARG 1
  175. #define __GNUCLIKE_MATH_BUILTIN_RELOPS
  176. #endif
  177. # 115 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  178.  
  179. #define __GNUCLIKE_BUILTIN_MEMCPY 1
  180.  
  181. /* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */
  182. #define __CC_SUPPORTS_INLINE 1
  183. #define __CC_SUPPORTS___INLINE 1
  184. #define __CC_SUPPORTS___INLINE__ 1
  185.  
  186. #define __CC_SUPPORTS___FUNC__ 1
  187. #define __CC_SUPPORTS_WARNING 1
  188.  
  189. #define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */
  190.  
  191. #define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1
  192.  
  193. #endif /* __GNUC__ || __INTEL_COMPILER */
  194. # 131 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  195.  
  196. /*
  197.  * Macro to test if we're using a specific version of gcc or later.
  198.  */
  199. #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
  200. #define __GNUC_PREREQ__(ma, mi) \
  201.         (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
  202. #else
  203. # 139 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  204. #define __GNUC_PREREQ__(ma, mi) 0
  205. #endif
  206. # 141 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  207.  
  208. /*
  209.  * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  210.  * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  211.  * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
  212.  * mode -- there must be no spaces between its arguments, and for nested
  213.  * __CONCAT's, all the __CONCAT's must be at the left.  __CONCAT can also
  214.  * concatenate double-quoted strings produced by the __STRING macro, but
  215.  * this only works with ANSI C.
  216.  *
  217.  * __XSTRING is like __STRING, but it expands any macros in its argument
  218.  * first.  It is only available with ANSI C.
  219.  */
  220. #if defined(__STDC__) || defined(__cplusplus)
  221. #define __P(protos)     protos          /* full-blown ANSI C */
  222. #define __CONCAT1(x,y)  x ## y
  223. #define __CONCAT(x,y)   __CONCAT1(x,y)
  224. #define __STRING(x)     #x              /* stringify without expanding x */
  225. #define __XSTRING(x)    __STRING(x)     /* expand x, then stringify */
  226.  
  227. #define __const         const           /* define reserved names to standard */
  228. #define __signed        signed
  229. #define __volatile      volatile
  230. #if defined(__cplusplus)
  231. #define __inline        inline          /* convert to C++ keyword */
  232. #else
  233. # 167 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  234. #if !(defined(__CC_SUPPORTS___INLINE))
  235. #define __inline                        /* delete GCC keyword */
  236. #endif /* ! __CC_SUPPORTS___INLINE */
  237. # 170 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  238. #endif /* !__cplusplus */
  239. # 171 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  240.  
  241. #else   /* !(__STDC__ || __cplusplus) */
  242. # 173 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  243. #define __P(protos)     ()              /* traditional C preprocessor */
  244. #define __CONCAT(x,y)   x/**/y
  245. #define __STRING(x)     "x"
  246.  
  247. #if !defined(__CC_SUPPORTS___INLINE)
  248. #define __const                         /* delete pseudo-ANSI C keywords */
  249. #define __inline
  250. #define __signed
  251. #define __volatile
  252. /*
  253.  * In non-ANSI C environments, new programs will want ANSI-only C keywords
  254.  * deleted from the program and old programs will want them left alone.
  255.  * When using a compiler other than gcc, programs using the ANSI C keywords
  256.  * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
  257.  * When using "gcc -traditional", we assume that this is the intent; if
  258.  * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
  259.  */
  260. #ifndef NO_ANSI_KEYWORDS
  261. #define const                           /* delete ANSI C keywords */
  262. #define inline
  263. #define signed
  264. #define volatile
  265. #endif  /* !NO_ANSI_KEYWORDS */
  266. # 196 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  267. #endif  /* !__CC_SUPPORTS___INLINE */
  268. # 197 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  269. #endif  /* !(__STDC__ || __cplusplus) */
  270. # 198 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  271.  
  272. /*
  273.  * Compiler-dependent macros to help declare dead (non-returning) and
  274.  * pure (no side effects) functions, and unused variables.  They are
  275.  * null except for versions of gcc that are known to support the features
  276.  * properly (old versions of gcc-2 supported the dead and pure features
  277.  * in a different (wrong) way).  If we do not provide an implementation
  278.  * for a given compiler, let the compile fail if it is told to use
  279.  * a feature that we cannot live without.
  280.  */
  281. #ifdef lint
  282. #define __dead2
  283. #define __pure2
  284. #define __unused
  285. #define __packed
  286. #define __aligned(x)
  287. #define __alloc_align(x)
  288. #define __alloc_size(x)
  289. #define __section(x)
  290. #define __weak_symbol
  291. #else
  292. # 219 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  293. #define __weak_symbol   __attribute__((__weak__))
  294. #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
  295. #define __dead2
  296. #define __pure2
  297. #define __unused
  298. #endif
  299. # 225 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  300. #if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER)
  301. #define __dead2         __attribute__((__noreturn__))
  302. #define __pure2         __attribute__((__const__))
  303. #define __unused
  304. /* XXX Find out what to do for __packed, __aligned and __section */
  305. #endif
  306. # 231 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  307. #if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER)
  308. #define __dead2         __attribute__((__noreturn__))
  309. #define __pure2         __attribute__((__const__))
  310. #define __unused        __attribute__((__unused__))
  311. #define __used          __attribute__((__used__))
  312. #define __packed        __attribute__((__packed__))
  313. #define __aligned(x)    __attribute__((__aligned__(x)))
  314. #define __section(x)    __attribute__((__section__(x)))
  315. #endif
  316. # 240 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  317. #if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__)
  318. #define __alloc_size(x) __attribute__((__alloc_size__(x)))
  319. #else
  320. # 243 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  321. #define __alloc_size(x)
  322. #endif
  323. # 245 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  324. #if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__)
  325. #define __alloc_align(x)        __attribute__((__alloc_align__(x)))
  326. #else
  327. # 248 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  328. #define __alloc_align(x)
  329. #endif
  330. # 250 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  331. #endif /* lint */
  332. # 251 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  333.  
  334. #if !__GNUC_PREREQ__(2, 95)
  335. #define __alignof(x)    __offsetof(struct { char __a; x __b; }, __b)
  336. #endif
  337. # 255 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  338.  
  339. /*
  340.  * Keywords added in C11.
  341.  */
  342.  
  343. #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint)
  344.  
  345. #if !__has_extension(c_alignas)
  346. #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
  347.     __has_extension(cxx_alignas)
  348. #define _Alignas(x)             alignas(x)
  349. #else
  350. # 267 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  351. /* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */
  352. #define _Alignas(x)             __aligned(x)
  353. #endif
  354. # 270 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  355. #endif
  356. # 271 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  357.  
  358. #if defined(__cplusplus) && __cplusplus >= 201103L
  359. #define _Alignof(x)             alignof(x)
  360. #else
  361. # 275 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  362. #define _Alignof(x)             __alignof(x)
  363. #endif
  364. # 277 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  365.  
  366. #if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
  367. /*
  368.  * No native support for _Atomic(). Place object in structure to prevent
  369.  * most forms of direct non-atomic access.
  370.  */
  371. #define _Atomic(T)              struct { T volatile __val; }
  372. #endif
  373. # 285 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  374.  
  375. #if defined(__cplusplus) && __cplusplus >= 201103L
  376. #define _Noreturn               [[noreturn]]
  377. #else
  378. # 289 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  379. #define _Noreturn               __dead2
  380. #endif
  381. # 291 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  382.  
  383. #if !__has_extension(c_static_assert)
  384. #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
  385.     __has_extension(cxx_static_assert)
  386. #define _Static_assert(x, y)    static_assert(x, y)
  387. #elif __GNUC_PREREQ__(4,6)
  388. # 297 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  389. /* Nothing, gcc 4.6 and higher has _Static_assert built-in */
  390. #elif defined(__COUNTER__)
  391. # 299 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  392. #define _Static_assert(x, y)    __Static_assert(x, __COUNTER__)
  393. #define __Static_assert(x, y)   ___Static_assert(x, y)
  394. #define ___Static_assert(x, y)  typedef char __assert_ ## y[(x) ? 1 : -1] \
  395.                                 __unused
  396. #else
  397. # 304 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  398. #define _Static_assert(x, y)    struct __hack
  399. #endif
  400. # 306 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  401. #endif
  402. # 307 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  403.  
  404. #if !__has_extension(c_thread_local)
  405. /*
  406.  * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode
  407.  * without actually supporting the thread_local keyword. Don't check for
  408.  * the presence of C++11 when defining _Thread_local.
  409.  */
  410. #if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \
  411.     __has_extension(cxx_thread_local)
  412. #define _Thread_local           thread_local
  413. #else
  414. # 318 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  415. #define _Thread_local           __thread
  416. #endif
  417. # 320 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  418. #endif
  419. # 321 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  420.  
  421. #endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */
  422. # 323 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  423.  
  424. /*
  425.  * Emulation of C11 _Generic().  Unlike the previously defined C11
  426.  * keywords, it is not possible to implement this using exactly the same
  427.  * syntax.  Therefore implement something similar under the name
  428.  * __generic().  Unlike _Generic(), this macro can only distinguish
  429.  * between a single type, so it requires nested invocations to
  430.  * distinguish multiple cases.
  431.  */
  432.  
  433. #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
  434.     __has_extension(c_generic_selections)
  435. #define __generic(expr, t, yes, no)                                     \
  436.         _Generic(expr, t: yes, default: no)
  437. #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
  438. # 338 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  439. #define __generic(expr, t, yes, no)                                     \
  440.         __builtin_choose_expr(                                          \
  441.             __builtin_types_compatible_p(__typeof(expr), t), yes, no)
  442. #endif
  443. # 342 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  444.  
  445. #if __GNUC_PREREQ__(2, 96)
  446. #define __malloc_like   __attribute__((__malloc__))
  447. #define __pure          __attribute__((__pure__))
  448. #else
  449. # 347 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  450. #define __malloc_like
  451. #define __pure
  452. #endif
  453. # 350 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  454.  
  455. #if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
  456. #define __always_inline __attribute__((__always_inline__))
  457. #else
  458. # 354 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  459. #define __always_inline
  460. #endif
  461. # 356 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  462.  
  463. #if __GNUC_PREREQ__(3, 1)
  464. #define __noinline      __attribute__ ((__noinline__))
  465. #else
  466. # 360 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  467. #define __noinline
  468. #endif
  469. # 362 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  470.  
  471. #if __GNUC_PREREQ__(3, 3)
  472. #define __nonnull(x)    __attribute__((__nonnull__(x)))
  473. #define __nonnull_all   __attribute__((__nonnull__))
  474. #else
  475. # 367 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  476. #define __nonnull(x)
  477. #define __nonnull_all
  478. #endif
  479. # 370 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  480.  
  481. #if __GNUC_PREREQ__(3, 4)
  482. #define __fastcall      __attribute__((__fastcall__))
  483. #define __result_use_check      __attribute__((__warn_unused_result__))
  484. #else
  485. # 375 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  486. #define __fastcall
  487. #define __result_use_check
  488. #endif
  489. # 378 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  490.  
  491. #if __GNUC_PREREQ__(4, 1)
  492. #define __returns_twice __attribute__((__returns_twice__))
  493. #else
  494. # 382 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  495. #define __returns_twice
  496. #endif
  497. # 384 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  498.  
  499. #if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable)
  500. #define __unreachable() __builtin_unreachable()
  501. #else
  502. # 388 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  503. #define __unreachable() ((void)0)
  504. #endif
  505. # 390 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  506.  
  507. /* XXX: should use `#if __STDC_VERSION__ < 199901'. */
  508. #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
  509. #define __func__        NULL
  510. #endif
  511. # 395 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  512.  
  513. #if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
  514. #define __LONG_LONG_SUPPORTED
  515. #endif
  516. # 399 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  517.  
  518. /* C++11 exposes a load of C99 stuff */
  519. #if defined(__cplusplus) && __cplusplus >= 201103L
  520. #define __LONG_LONG_SUPPORTED
  521. #ifndef __STDC_LIMIT_MACROS
  522. #define __STDC_LIMIT_MACROS
  523. #endif
  524. # 406 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  525. #ifndef __STDC_CONSTANT_MACROS
  526. #define __STDC_CONSTANT_MACROS
  527. #endif
  528. # 409 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  529. #endif
  530. # 410 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  531.  
  532. /*
  533.  * GCC 2.95 provides `__restrict' as an extension to C90 to support the
  534.  * C99-specific `restrict' type qualifier.  We happen to use `__restrict' as
  535.  * a way to define the `restrict' type qualifier without disturbing older
  536.  * software that is unaware of C99 keywords.
  537.  */
  538. #if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95)
  539. #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint)
  540. #define __restrict
  541. #else
  542. # 421 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  543. #define __restrict      restrict
  544. #endif
  545. # 423 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  546. #endif
  547. # 424 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  548.  
  549. /*
  550.  * GNU C version 2.96 adds explicit branch prediction so that
  551.  * the CPU back-end can hint the processor and also so that
  552.  * code blocks can be reordered such that the predicted path
  553.  * sees a more linear flow, thus improving cache behavior, etc.
  554.  *
  555.  * The following two macros provide us with a way to utilize this
  556.  * compiler feature.  Use __predict_true() if you expect the expression
  557.  * to evaluate to true, and __predict_false() if you expect the
  558.  * expression to evaluate to false.
  559.  *
  560.  * A few notes about usage:
  561.  *
  562.  *      * Generally, __predict_false() error condition checks (unless
  563.  *        you have some _strong_ reason to do otherwise, in which case
  564.  *        document it), and/or __predict_true() `no-error' condition
  565.  *        checks, assuming you want to optimize for the no-error case.
  566.  *
  567.  *      * Other than that, if you don't know the likelihood of a test
  568.  *        succeeding from empirical or other `hard' evidence, don't
  569.  *        make predictions.
  570.  *
  571.  *      * These are meant to be used in places that are run `a lot'.
  572.  *        It is wasteful to make predictions in code that is run
  573.  *        seldomly (e.g. at subsystem initialization time) as the
  574.  *        basic block reordering that this affects can often generate
  575.  *        larger code.
  576.  */
  577. #if __GNUC_PREREQ__(2, 96)
  578. #define __predict_true(exp)     __builtin_expect((exp), 1)
  579. #define __predict_false(exp)    __builtin_expect((exp), 0)
  580. #else
  581. # 457 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  582. #define __predict_true(exp)     (exp)
  583. #define __predict_false(exp)    (exp)
  584. #endif
  585. # 460 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  586.  
  587. #if __GNUC_PREREQ__(4, 0)
  588. #define __null_sentinel __attribute__((__sentinel__))
  589. #define __exported      __attribute__((__visibility__("default")))
  590. #define __hidden        __attribute__((__visibility__("hidden")))
  591. #else
  592. # 466 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  593. #define __null_sentinel
  594. #define __exported
  595. #define __hidden
  596. #endif
  597. # 470 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  598.  
  599. /*
  600.  * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
  601.  * require it.
  602.  */
  603. #if __GNUC_PREREQ__(4, 1)
  604. #define __offsetof(type, field)  __builtin_offsetof(type, field)
  605. #else
  606. # 478 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  607. #ifndef __cplusplus
  608. #define __offsetof(type, field) \
  609.         ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field))
  610. #else
  611. # 482 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  612. #define __offsetof(type, field)                                 \
  613.   (__offsetof__ (reinterpret_cast <__size_t>                    \
  614.                  (&reinterpret_cast <const volatile char &>     \
  615.                   (static_cast<type *> (0)->field))))
  616. #endif
  617. # 487 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  618. #endif
  619. # 488 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  620. #define __rangeof(type, start, end) \
  621.         (__offsetof(type, end) - __offsetof(type, start))
  622.  
  623. /*
  624.  * Given the pointer x to the member m of the struct s, return
  625.  * a pointer to the containing structure.  When using GCC, we first
  626.  * assign pointer x to a local variable, to check that its type is
  627.  * compatible with member m.
  628.  */
  629. #if __GNUC_PREREQ__(3, 1)
  630. #define __containerof(x, s, m) ({                                       \
  631.         const volatile __typeof(((s *)0)->m) *__x = (x);                \
  632.         __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\
  633. })
  634. #else
  635. # 503 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  636. #define __containerof(x, s, m)                                          \
  637.         __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m))
  638. #endif
  639. # 506 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  640.  
  641. /*
  642.  * Compiler-dependent macros to declare that functions take printf-like
  643.  * or scanf-like arguments.  They are null except for versions of gcc
  644.  * that are known to support the features properly (old versions of gcc-2
  645.  * didn't permit keeping the keywords out of the application namespace).
  646.  */
  647. #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
  648. #define __printflike(fmtarg, firstvararg)
  649. #define __scanflike(fmtarg, firstvararg)
  650. #define __format_arg(fmtarg)
  651. #define __strfmonlike(fmtarg, firstvararg)
  652. #define __strftimelike(fmtarg, firstvararg)
  653. #else
  654. # 520 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  655. #define __printflike(fmtarg, firstvararg) \
  656.             __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
  657. #define __scanflike(fmtarg, firstvararg) \
  658.             __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
  659. #define __format_arg(fmtarg)    __attribute__((__format_arg__ (fmtarg)))
  660. #define __strfmonlike(fmtarg, firstvararg) \
  661.             __attribute__((__format__ (__strfmon__, fmtarg, firstvararg)))
  662. #define __strftimelike(fmtarg, firstvararg) \
  663.             __attribute__((__format__ (__strftime__, fmtarg, firstvararg)))
  664. #endif
  665. # 530 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  666.  
  667. /*
  668.  * FORTIFY_SOURCE, and perhaps other compiler-specific features, require
  669.  * the use of non-standard inlining.  In general we should try to avoid
  670.  * using these but GCC-compatible compilers tend to support the extensions
  671.  * well enough to use them in limited cases.
  672.  */
  673. #if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__)
  674. #if __GNUC_PREREQ__(4, 3) || __has_attribute(__artificial__)
  675. #define __gnu_inline    __attribute__((__gnu_inline__, __artificial__))
  676. #else
  677. # 541 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  678. #define __gnu_inline    __attribute__((__gnu_inline__))
  679. #endif /* artificial */
  680. # 543 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  681. #else
  682. # 544 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  683. #define __gnu_inline
  684. #endif
  685. # 546 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  686.  
  687. /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */
  688. #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \
  689.     defined(__GNUC__) && !defined(__INTEL_COMPILER)
  690. #define __printf0like(fmtarg, firstvararg) \
  691.             __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
  692. #else
  693. # 553 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  694. #define __printf0like(fmtarg, firstvararg)
  695. #endif
  696. # 555 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  697.  
  698. #if defined(__GNUC__) || defined(__INTEL_COMPILER)
  699. #ifndef __INTEL_COMPILER
  700. #define __strong_reference(sym,aliassym)        \
  701.         extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
  702. #endif
  703. # 561 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  704. #ifdef __STDC__
  705. #define __weak_reference(sym,alias)     \
  706.         __asm__(".weak " #alias);       \
  707.         __asm__(".equ "  #alias ", " #sym)
  708. #define __warn_references(sym,msg)      \
  709.         __asm__(".section .gnu.warning." #sym); \
  710.         __asm__(".asciz \"" msg "\"");  \
  711.         __asm__(".previous")
  712. #define __sym_compat(sym,impl,verid)    \
  713.         __asm__(".symver " #impl ", " #sym "@" #verid)
  714. #define __sym_default(sym,impl,verid)   \
  715.         __asm__(".symver " #impl ", " #sym "@@" #verid)
  716. #else
  717. # 574 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  718. #define __weak_reference(sym,alias)     \
  719.         __asm__(".weak alias");         \
  720.         __asm__(".equ alias, sym")
  721. #define __warn_references(sym,msg)      \
  722.         __asm__(".section .gnu.warning.sym"); \
  723.         __asm__(".asciz \"msg\"");      \
  724.         __asm__(".previous")
  725. #define __sym_compat(sym,impl,verid)    \
  726.         __asm__(".symver impl, sym@verid")
  727. #define __sym_default(impl,sym,verid)   \
  728.         __asm__(".symver impl, sym@@verid")
  729. #endif  /* __STDC__ */
  730. # 586 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  731. #endif  /* __GNUC__ || __INTEL_COMPILER */
  732. # 587 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  733.  
  734. #define __GLOBL1(sym)   __asm__(".globl " #sym)
  735. #define __GLOBL(sym)    __GLOBL1(sym)
  736.  
  737. #if defined(__GNUC__) || defined(__INTEL_COMPILER)
  738. #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
  739. #else
  740. # 594 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  741. /*
  742.  * The following definition might not work well if used in header files,
  743.  * but it should be better than nothing.  If you want a "do nothing"
  744.  * version, then it should generate some harmless declaration, such as:
  745.  *    #define   __IDSTRING(name,string) struct __hack
  746.  */
  747. #define __IDSTRING(name,string) static const char name[] __unused = string
  748. #endif
  749. # 602 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  750.  
  751. /*
  752.  * Embed the rcs id of a source file in the resulting library.  Note that in
  753.  * more recent ELF binutils, we use .ident allowing the ID to be stripped.
  754.  * Usage:
  755.  *      __FBSDID("$FreeBSD: head/sys/sys/cdefs.h 295041 2016-01-29 15:12:31Z br $");
  756.  */
  757. #ifndef __FBSDID
  758. #if !defined(lint) && !defined(STRIP_FBSDID)
  759. #define __FBSDID(s)     __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
  760. #else
  761. # 613 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  762. #define __FBSDID(s)     struct __hack
  763. #endif
  764. # 615 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  765. #endif
  766. # 616 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  767.  
  768. #ifndef __RCSID
  769. #ifndef NO__RCSID
  770. #define __RCSID(s)      __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
  771. #else
  772. # 621 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  773. #define __RCSID(s)      struct __hack
  774. #endif
  775. # 623 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  776. #endif
  777. # 624 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  778.  
  779. #ifndef __RCSID_SOURCE
  780. #ifndef NO__RCSID_SOURCE
  781. #define __RCSID_SOURCE(s)       __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s)
  782. #else
  783. # 629 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  784. #define __RCSID_SOURCE(s)       struct __hack
  785. #endif
  786. # 631 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  787. #endif
  788. # 632 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  789.  
  790. #ifndef __SCCSID
  791. #ifndef NO__SCCSID
  792. #define __SCCSID(s)     __IDSTRING(__CONCAT(__sccsid_,__LINE__),s)
  793. #else
  794. # 637 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  795. #define __SCCSID(s)     struct __hack
  796. #endif
  797. # 639 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  798. #endif
  799. # 640 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  800.  
  801. #ifndef __COPYRIGHT
  802. #ifndef NO__COPYRIGHT
  803. #define __COPYRIGHT(s)  __IDSTRING(__CONCAT(__copyright_,__LINE__),s)
  804. #else
  805. # 645 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  806. #define __COPYRIGHT(s)  struct __hack
  807. #endif
  808. # 647 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  809. #endif
  810. # 648 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  811.  
  812. #ifndef __DECONST
  813. #define __DECONST(type, var)    ((type)(__uintptr_t)(const void *)(var))
  814. #endif
  815. # 652 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  816.  
  817. #ifndef __DEVOLATILE
  818. #define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var))
  819. #endif
  820. # 656 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  821.  
  822. #ifndef __DEQUALIFY
  823. #define __DEQUALIFY(type, var)  ((type)(__uintptr_t)(const volatile void *)(var))
  824. #endif
  825. # 660 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  826.  
  827. /*-
  828.  * The following definitions are an extension of the behavior originally
  829.  * implemented in <sys/_posix.h>, but with a different level of granularity.
  830.  * POSIX.1 requires that the macros we test be defined before any standard
  831.  * header file is included.
  832.  *
  833.  * Here's a quick run-down of the versions:
  834.  *  defined(_POSIX_SOURCE)              1003.1-1988
  835.  *  _POSIX_C_SOURCE == 1                1003.1-1990
  836.  *  _POSIX_C_SOURCE == 2                1003.2-1992 C Language Binding Option
  837.  *  _POSIX_C_SOURCE == 199309           1003.1b-1993
  838.  *  _POSIX_C_SOURCE == 199506           1003.1c-1995, 1003.1i-1995,
  839.  *                                      and the omnibus ISO/IEC 9945-1: 1996
  840.  *  _POSIX_C_SOURCE == 200112           1003.1-2001
  841.  *  _POSIX_C_SOURCE == 200809           1003.1-2008
  842.  *
  843.  * In addition, the X/Open Portability Guide, which is now the Single UNIX
  844.  * Specification, defines a feature-test macro which indicates the version of
  845.  * that specification, and which subsumes _POSIX_C_SOURCE.
  846.  *
  847.  * Our macros begin with two underscores to avoid namespace screwage.
  848.  */
  849.  
  850. /* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
  851. #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
  852. #undef _POSIX_C_SOURCE          /* Probably illegal, but beyond caring now. */
  853. #define _POSIX_C_SOURCE         199009
  854. #endif
  855. # 689 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  856.  
  857. /* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
  858. #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
  859. #undef _POSIX_C_SOURCE
  860. #define _POSIX_C_SOURCE         199209
  861. #endif
  862. # 695 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  863.  
  864. /* Deal with various X/Open Portability Guides and Single UNIX Spec. */
  865. #ifdef _XOPEN_SOURCE
  866. #if _XOPEN_SOURCE - 0 >= 700
  867. #define __XSI_VISIBLE           700
  868. #undef _POSIX_C_SOURCE
  869. #define _POSIX_C_SOURCE         200809
  870. #elif _XOPEN_SOURCE - 0 >= 600
  871. # 703 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  872. #define __XSI_VISIBLE           600
  873. #undef _POSIX_C_SOURCE
  874. #define _POSIX_C_SOURCE         200112
  875. #elif _XOPEN_SOURCE - 0 >= 500
  876. # 707 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  877. #define __XSI_VISIBLE           500
  878. #undef _POSIX_C_SOURCE
  879. #define _POSIX_C_SOURCE         199506
  880. #endif
  881. # 711 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  882. #endif
  883. # 712 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  884.  
  885. /*
  886.  * Deal with all versions of POSIX.  The ordering relative to the tests above is
  887.  * important.
  888.  */
  889. #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
  890. #define _POSIX_C_SOURCE         198808
  891. #endif
  892. # 720 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  893. #ifdef _POSIX_C_SOURCE
  894. #if _POSIX_C_SOURCE >= 200809
  895. #define __POSIX_VISIBLE         200809
  896. #define __ISO_C_VISIBLE         1999
  897. #elif _POSIX_C_SOURCE >= 200112
  898. # 725 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  899. #define __POSIX_VISIBLE         200112
  900. #define __ISO_C_VISIBLE         1999
  901. #elif _POSIX_C_SOURCE >= 199506
  902. # 728 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  903. #define __POSIX_VISIBLE         199506
  904. #define __ISO_C_VISIBLE         1990
  905. #elif _POSIX_C_SOURCE >= 199309
  906. # 731 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  907. #define __POSIX_VISIBLE         199309
  908. #define __ISO_C_VISIBLE         1990
  909. #elif _POSIX_C_SOURCE >= 199209
  910. # 734 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  911. #define __POSIX_VISIBLE         199209
  912. #define __ISO_C_VISIBLE         1990
  913. #elif _POSIX_C_SOURCE >= 199009
  914. # 737 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  915. #define __POSIX_VISIBLE         199009
  916. #define __ISO_C_VISIBLE         1990
  917. #else
  918. # 740 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  919. #define __POSIX_VISIBLE         198808
  920. #define __ISO_C_VISIBLE         0
  921. #endif /* _POSIX_C_SOURCE */
  922. # 743 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  923. #else
  924. # 744 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  925. /*-
  926.  * Deal with _ANSI_SOURCE:
  927.  * If it is defined, and no other compilation environment is explicitly
  928.  * requested, then define our internal feature-test macros to zero.  This
  929.  * makes no difference to the preprocessor (undefined symbols in preprocessing
  930.  * expressions are defined to have value zero), but makes it more convenient for
  931.  * a test program to print out the values.
  932.  *
  933.  * If a program mistakenly defines _ANSI_SOURCE and some other macro such as
  934.  * _POSIX_C_SOURCE, we will assume that it wants the broader compilation
  935.  * environment (and in fact we will never get here).
  936.  */
  937. #if defined(_ANSI_SOURCE)       /* Hide almost everything. */
  938. #define __POSIX_VISIBLE         0
  939. #define __XSI_VISIBLE           0
  940. #define __BSD_VISIBLE           0
  941. #define __ISO_C_VISIBLE         1990
  942. #elif defined(_C99_SOURCE)      /* Localism to specify strict C99 env. */
  943. # 762 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  944. #define __POSIX_VISIBLE         0
  945. #define __XSI_VISIBLE           0
  946. #define __BSD_VISIBLE           0
  947. #define __ISO_C_VISIBLE         1999
  948. #elif defined(_C11_SOURCE)      /* Localism to specify strict C11 env. */
  949. # 767 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  950. #define __POSIX_VISIBLE         0
  951. #define __XSI_VISIBLE           0
  952. #define __BSD_VISIBLE           0
  953. #define __ISO_C_VISIBLE         2011
  954. #else                           /* Default environment: show everything. */
  955. # 772 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  956. #define __POSIX_VISIBLE         200809
  957. #define __XSI_VISIBLE           700
  958. #define __BSD_VISIBLE           1
  959. #define __ISO_C_VISIBLE         2011
  960. #endif
  961. # 777 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  962. #endif
  963. # 778 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  964.  
  965. #if defined(__mips) || defined(__powerpc64__) || defined(__riscv__)
  966. #define __NO_TLS 1
  967. #endif
  968. # 782 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  969.  
  970. /*
  971.  * Type Safety Checking
  972.  *
  973.  * Clang provides additional attributes to enable checking type safety
  974.  * properties that cannot be enforced by the C type system.
  975.  */
  976.  
  977. #if __has_attribute(__argument_with_type_tag__) && \
  978.     __has_attribute(__type_tag_for_datatype__) && !defined(lint)
  979. #define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \
  980.             __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx)))
  981. #define __datatype_type_tag(kind, type) \
  982.             __attribute__((__type_tag_for_datatype__(kind, type)))
  983. #else
  984. # 797 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  985. #define __arg_type_tag(arg_kind, arg_idx, type_tag_idx)
  986. #define __datatype_type_tag(kind, type)
  987. #endif
  988. # 800 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  989.  
  990. /*
  991.  * Lock annotations.
  992.  *
  993.  * Clang provides support for doing basic thread-safety tests at
  994.  * compile-time, by marking which locks will/should be held when
  995.  * entering/leaving a functions.
  996.  *
  997.  * Furthermore, it is also possible to annotate variables and structure
  998.  * members to enforce that they are only accessed when certain locks are
  999.  * held.
  1000.  */
  1001.  
  1002. #if __has_extension(c_thread_safety_attributes)
  1003. #define __lock_annotate(x)      __attribute__((x))
  1004. #else
  1005. # 816 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  1006. #define __lock_annotate(x)
  1007. #endif
  1008. # 818 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  1009.  
  1010. /* Structure implements a lock. */
  1011. #define __lockable              __lock_annotate(lockable)
  1012.  
  1013. /* Function acquires an exclusive or shared lock. */
  1014. #define __locks_exclusive(...) \
  1015.         __lock_annotate(exclusive_lock_function(__VA_ARGS__))
  1016. #define __locks_shared(...) \
  1017.         __lock_annotate(shared_lock_function(__VA_ARGS__))
  1018.  
  1019. /* Function attempts to acquire an exclusive or shared lock. */
  1020. #define __trylocks_exclusive(...) \
  1021.         __lock_annotate(exclusive_trylock_function(__VA_ARGS__))
  1022. #define __trylocks_shared(...) \
  1023.         __lock_annotate(shared_trylock_function(__VA_ARGS__))
  1024.  
  1025. /* Function releases a lock. */
  1026. #define __unlocks(...)          __lock_annotate(unlock_function(__VA_ARGS__))
  1027.  
  1028. /* Function asserts that an exclusive or shared lock is held. */
  1029. #define __asserts_exclusive(...) \
  1030.         __lock_annotate(assert_exclusive_lock(__VA_ARGS__))
  1031. #define __asserts_shared(...) \
  1032.         __lock_annotate(assert_shared_lock(__VA_ARGS__))
  1033.  
  1034. /* Function requires that an exclusive or shared lock is or is not held. */
  1035. #define __requires_exclusive(...) \
  1036.         __lock_annotate(exclusive_locks_required(__VA_ARGS__))
  1037. #define __requires_shared(...) \
  1038.         __lock_annotate(shared_locks_required(__VA_ARGS__))
  1039. #define __requires_unlocked(...) \
  1040.         __lock_annotate(locks_excluded(__VA_ARGS__))
  1041.  
  1042. /* Function should not be analyzed. */
  1043. #define __no_lock_analysis      __lock_annotate(no_thread_safety_analysis)
  1044.  
  1045. /* Guard variables and structure members by lock. */
  1046. #define __guarded_by(x)         __lock_annotate(guarded_by(x))
  1047. #define __pt_guarded_by(x)      __lock_annotate(pt_guarded_by(x))
  1048.  
  1049. #endif /* !_SYS_CDEFS_H_ */
  1050. # 859 "/usr/obj/usr/src/lib32/usr/include/sys/cdefs.h" 3
  1051. # 42 "/usr/src/lib/libc/gen/fnmatch.c" 2
  1052. __FBSDID("$FreeBSD: head/lib/libc/gen/fnmatch.c 288309 2015-09-27 12:52:18Z jilles $");
  1053.  
  1054. /*
  1055.  * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
  1056.  * Compares a filename or pathname to a pattern.
  1057.  */
  1058.  
  1059. /*
  1060.  * Some notes on multibyte character support:
  1061.  * 1. Patterns with illegal byte sequences match nothing.
  1062.  * 2. Illegal byte sequences in the "string" argument are handled by treating
  1063.  *    them as single-byte characters with a value of the first byte of the
  1064.  *    sequence cast to wchar_t.
  1065.  * 3. Multibyte conversion state objects (mbstate_t) are passed around and
  1066.  *    used for most, but not all, conversions. Further work will be required
  1067.  *    to support state-dependent encodings.
  1068.  */
  1069.  
  1070. #if 0 /* expanded by -frewrite-includes */
  1071. #include <fnmatch.h>
  1072. #endif /* expanded by -frewrite-includes */
  1073. # 60 "/usr/src/lib/libc/gen/fnmatch.c"
  1074. # 1 "/usr/src/lib/libc/../../include/fnmatch.h" 1
  1075. /*-
  1076.  * Copyright (c) 1992, 1993
  1077.  *      The Regents of the University of California.  All rights reserved.
  1078.  *
  1079.  * Redistribution and use in source and binary forms, with or without
  1080.  * modification, are permitted provided that the following conditions
  1081.  * are met:
  1082.  * 1. Redistributions of source code must retain the above copyright
  1083.  *    notice, this list of conditions and the following disclaimer.
  1084.  * 2. Redistributions in binary form must reproduce the above copyright
  1085.  *    notice, this list of conditions and the following disclaimer in the
  1086.  *    documentation and/or other materials provided with the distribution.
  1087.  * 3. Neither the name of the University nor the names of its contributors
  1088.  *    may be used to endorse or promote products derived from this software
  1089.  *    without specific prior written permission.
  1090.  *
  1091.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1092.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1093.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1094.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1095.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1096.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1097.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1098.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1099.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1100.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1101.  * SUCH DAMAGE.
  1102.  *
  1103.  * $FreeBSD: head/include/fnmatch.h 203964 2010-02-16 19:39:50Z imp $
  1104.  *      @(#)fnmatch.h   8.1 (Berkeley) 6/2/93
  1105.  */
  1106.  
  1107. #ifndef _FNMATCH_H_
  1108. #define _FNMATCH_H_
  1109.  
  1110. #if 0 /* expanded by -frewrite-includes */
  1111. #include <sys/cdefs.h>
  1112. #endif /* expanded by -frewrite-includes */
  1113. # 36 "/usr/src/lib/libc/../../include/fnmatch.h"
  1114. # 37 "/usr/src/lib/libc/../../include/fnmatch.h"
  1115.  
  1116. #define FNM_NOMATCH     1       /* Match failed. */
  1117.  
  1118. #define FNM_NOESCAPE    0x01    /* Disable backslash escaping. */
  1119. #define FNM_PATHNAME    0x02    /* Slash must be matched by slash. */
  1120. #define FNM_PERIOD      0x04    /* Period must be matched by period. */
  1121.  
  1122. #if __XSI_VISIBLE
  1123. #define FNM_NOSYS       (-1)    /* Reserved. */
  1124. #endif
  1125. # 47 "/usr/src/lib/libc/../../include/fnmatch.h"
  1126.  
  1127. #if __BSD_VISIBLE
  1128. #define FNM_LEADING_DIR 0x08    /* Ignore /<tail> after Imatch. */
  1129. #define FNM_CASEFOLD    0x10    /* Case insensitive search. */
  1130. #define FNM_IGNORECASE  FNM_CASEFOLD
  1131. #define FNM_FILE_NAME   FNM_PATHNAME
  1132. #endif
  1133. # 54 "/usr/src/lib/libc/../../include/fnmatch.h"
  1134.  
  1135. __BEGIN_DECLS
  1136. int      fnmatch(const char *, const char *, int);
  1137. __END_DECLS
  1138.  
  1139. #endif /* !_FNMATCH_H_ */
  1140. # 60 "/usr/src/lib/libc/../../include/fnmatch.h"
  1141. # 61 "/usr/src/lib/libc/gen/fnmatch.c" 2
  1142. #if 0 /* expanded by -frewrite-includes */
  1143. #include <limits.h>
  1144. #endif /* expanded by -frewrite-includes */
  1145. # 61 "/usr/src/lib/libc/gen/fnmatch.c"
  1146. # 1 "/usr/src/lib/libc/../../include/limits.h" 1
  1147. /*-
  1148.  * Copyright (c) 1988, 1993
  1149.  *      The Regents of the University of California.  All rights reserved.
  1150.  *
  1151.  * Redistribution and use in source and binary forms, with or without
  1152.  * modification, are permitted provided that the following conditions
  1153.  * are met:
  1154.  * 1. Redistributions of source code must retain the above copyright
  1155.  *    notice, this list of conditions and the following disclaimer.
  1156.  * 2. Redistributions in binary form must reproduce the above copyright
  1157.  *    notice, this list of conditions and the following disclaimer in the
  1158.  *    documentation and/or other materials provided with the distribution.
  1159.  * 3. Neither the name of the University nor the names of its contributors
  1160.  *    may be used to endorse or promote products derived from this software
  1161.  *    without specific prior written permission.
  1162.  *
  1163.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1164.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1165.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1166.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1167.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1168.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1169.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1170.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1171.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1172.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1173.  * SUCH DAMAGE.
  1174.  *
  1175.  *      @(#)limits.h    8.2 (Berkeley) 1/4/94
  1176.  * $FreeBSD: head/include/limits.h 293491 2016-01-09 14:53:23Z kevlo $
  1177.  */
  1178.  
  1179. #ifndef _LIMITS_H_
  1180. #define _LIMITS_H_
  1181.  
  1182. #if 0 /* expanded by -frewrite-includes */
  1183. #include <sys/cdefs.h>
  1184. #endif /* expanded by -frewrite-includes */
  1185. # 36 "/usr/src/lib/libc/../../include/limits.h"
  1186. # 37 "/usr/src/lib/libc/../../include/limits.h"
  1187.  
  1188. #if __POSIX_VISIBLE
  1189. #define _POSIX_ARG_MAX          4096
  1190. #define _POSIX_LINK_MAX         8
  1191. #define _POSIX_MAX_CANON        255
  1192. #define _POSIX_MAX_INPUT        255
  1193. #define _POSIX_NAME_MAX         14
  1194. #define _POSIX_PIPE_BUF         512
  1195. #define _POSIX_SSIZE_MAX        32767
  1196. #define _POSIX_STREAM_MAX       8
  1197.  
  1198. #if __POSIX_VISIBLE >= 200112
  1199. #define _POSIX_CHILD_MAX        25
  1200. #define _POSIX_NGROUPS_MAX      8
  1201. #define _POSIX_OPEN_MAX         20
  1202. #define _POSIX_PATH_MAX         256
  1203. #define _POSIX_TZNAME_MAX       6
  1204. #else
  1205. # 55 "/usr/src/lib/libc/../../include/limits.h"
  1206. #define _POSIX_CHILD_MAX        6
  1207. #define _POSIX_NGROUPS_MAX      0
  1208. #define _POSIX_OPEN_MAX         16
  1209. #define _POSIX_PATH_MAX         255
  1210. #define _POSIX_TZNAME_MAX       3
  1211. #endif
  1212. # 61 "/usr/src/lib/libc/../../include/limits.h"
  1213.  
  1214. #if __POSIX_VISIBLE >= 200112
  1215. #define BC_BASE_MAX                99   /* max ibase/obase values in bc(1) */
  1216. #define BC_DIM_MAX               2048   /* max array elements in bc(1) */
  1217. #define BC_SCALE_MAX               99   /* max scale value in bc(1) */
  1218. #define BC_STRING_MAX            1000   /* max const string length in bc(1) */
  1219. #define CHARCLASS_NAME_MAX         14   /* max character class name size */
  1220. #define COLL_WEIGHTS_MAX           10   /* max weights for order keyword */
  1221. #define EXPR_NEST_MAX              32   /* max expressions nested in expr(1) */
  1222. #define LINE_MAX                 2048   /* max bytes in an input line */
  1223. #define RE_DUP_MAX                255   /* max RE's in interval notation */
  1224.  
  1225. #define _POSIX2_BC_BASE_MAX     99
  1226. #define _POSIX2_BC_DIM_MAX      2048
  1227. #define _POSIX2_BC_SCALE_MAX    99
  1228. #define _POSIX2_BC_STRING_MAX   1000
  1229. #define _POSIX2_CHARCLASS_NAME_MAX 14
  1230. #define _POSIX2_COLL_WEIGHTS_MAX 2
  1231. #define _POSIX2_EQUIV_CLASS_MAX 2
  1232. #define _POSIX2_EXPR_NEST_MAX   32
  1233. #define _POSIX2_LINE_MAX        2048
  1234. #define _POSIX2_RE_DUP_MAX      255
  1235. #endif
  1236. # 84 "/usr/src/lib/libc/../../include/limits.h"
  1237. #endif
  1238. # 85 "/usr/src/lib/libc/../../include/limits.h"
  1239.  
  1240. #if __POSIX_VISIBLE >= 199309
  1241. #define _POSIX_AIO_LISTIO_MAX   2
  1242. #define _POSIX_AIO_MAX          1
  1243. #define _POSIX_DELAYTIMER_MAX   32
  1244. #define _POSIX_MQ_OPEN_MAX      8
  1245. #define _POSIX_MQ_PRIO_MAX      32
  1246. #define _POSIX_RTSIG_MAX        8
  1247. #define _POSIX_SEM_NSEMS_MAX    256
  1248. #define _POSIX_SEM_VALUE_MAX    32767
  1249. #define _POSIX_SIGQUEUE_MAX     32
  1250. #define _POSIX_TIMER_MAX        32
  1251.  
  1252. #define _POSIX_CLOCKRES_MIN     20000000
  1253. #endif
  1254. # 100 "/usr/src/lib/libc/../../include/limits.h"
  1255.  
  1256. #if __POSIX_VISIBLE >= 199506
  1257. #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  1258. #define _POSIX_THREAD_KEYS_MAX  128
  1259. #define _POSIX_THREAD_THREADS_MAX 64
  1260. #endif
  1261. # 106 "/usr/src/lib/libc/../../include/limits.h"
  1262.  
  1263. #if __POSIX_VISIBLE >= 200112
  1264. #define _POSIX_HOST_NAME_MAX    255
  1265. #define _POSIX_LOGIN_NAME_MAX   9
  1266. #define _POSIX_SS_REPL_MAX      4
  1267. #define _POSIX_SYMLINK_MAX      255
  1268. #define _POSIX_SYMLOOP_MAX      8
  1269. #define _POSIX_TRACE_EVENT_NAME_MAX 30
  1270. #define _POSIX_TRACE_NAME_MAX   8
  1271. #define _POSIX_TRACE_SYS_MAX    8
  1272. #define _POSIX_TRACE_USER_EVENT_MAX 32
  1273. #define _POSIX_TTY_NAME_MAX     9
  1274.  
  1275. #define _POSIX_RE_DUP_MAX       _POSIX2_RE_DUP_MAX
  1276. #endif
  1277. # 121 "/usr/src/lib/libc/../../include/limits.h"
  1278.  
  1279. #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
  1280. #define NL_ARGMAX               99      /* max # of position args for printf */
  1281. #define NL_MSGMAX               32767
  1282. #define NL_SETMAX               255
  1283. #define NL_TEXTMAX              2048
  1284. #endif
  1285. # 128 "/usr/src/lib/libc/../../include/limits.h"
  1286.  
  1287. #if __XSI_VISIBLE
  1288. #define _XOPEN_IOV_MAX          16
  1289. #define _XOPEN_NAME_MAX         255
  1290. #define _XOPEN_PATH_MAX         1024
  1291. #define PASS_MAX                128     /* _PASSWORD_LEN from <pwd.h> */
  1292.  
  1293. #define NL_LANGMAX              31      /* max LANG name length */
  1294. #define NL_NMAX                 1
  1295. #endif
  1296. # 138 "/usr/src/lib/libc/../../include/limits.h"
  1297.  
  1298. #define MB_LEN_MAX              6       /* 31-bit UTF-8 */
  1299.  
  1300. #if 0 /* expanded by -frewrite-includes */
  1301. #include <sys/limits.h>
  1302. #endif /* expanded by -frewrite-includes */
  1303. # 141 "/usr/src/lib/libc/../../include/limits.h"
  1304. # 1 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 1 3
  1305. /*-
  1306.  * Copyright (c) 1988, 1993
  1307.  *      The Regents of the University of California.  All rights reserved.
  1308.  *
  1309.  * Redistribution and use in source and binary forms, with or without
  1310.  * modification, are permitted provided that the following conditions
  1311.  * are met:
  1312.  * 1. Redistributions of source code must retain the above copyright
  1313.  *    notice, this list of conditions and the following disclaimer.
  1314.  * 2. Redistributions in binary form must reproduce the above copyright
  1315.  *    notice, this list of conditions and the following disclaimer in the
  1316.  *    documentation and/or other materials provided with the distribution.
  1317.  * 4. Neither the name of the University nor the names of its contributors
  1318.  *    may be used to endorse or promote products derived from this software
  1319.  *    without specific prior written permission.
  1320.  *
  1321.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1322.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1323.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1324.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1325.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1326.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1327.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1328.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1329.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1330.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1331.  * SUCH DAMAGE.
  1332.  *
  1333.  * $FreeBSD: head/sys/sys/limits.h 219271 2011-03-04 19:28:27Z jilles $
  1334.  */
  1335.  
  1336. #ifndef _SYS_LIMITS_H_
  1337. #define _SYS_LIMITS_H_
  1338.  
  1339. #if 0 /* expanded by -frewrite-includes */
  1340. #include <sys/cdefs.h>
  1341. #endif /* expanded by -frewrite-includes */
  1342. # 35 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1343. # 36 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1344. #if 0 /* expanded by -frewrite-includes */
  1345. #include <machine/_limits.h>
  1346. #endif /* expanded by -frewrite-includes */
  1347. # 36 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1348. # 1 "/usr/obj/usr/src/lib32/usr/include/machine/_limits.h" 1 3
  1349. /*-
  1350.  * This file is in the public domain.
  1351.  */
  1352. /* $FreeBSD: head/sys/i386/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */
  1353.  
  1354. #if 0 /* expanded by -frewrite-includes */
  1355. #include <x86/_limits.h>
  1356. #endif /* expanded by -frewrite-includes */
  1357. # 6 "/usr/obj/usr/src/lib32/usr/include/machine/_limits.h" 3
  1358. # 1 "/usr/obj/usr/src/lib32/usr/include/x86/_limits.h" 1 3
  1359. /*-
  1360.  * Copyright (c) 1988, 1993
  1361.  *      The Regents of the University of California.  All rights reserved.
  1362.  *
  1363.  * Redistribution and use in source and binary forms, with or without
  1364.  * modification, are permitted provided that the following conditions
  1365.  * are met:
  1366.  * 1. Redistributions of source code must retain the above copyright
  1367.  *    notice, this list of conditions and the following disclaimer.
  1368.  * 2. Redistributions in binary form must reproduce the above copyright
  1369.  *    notice, this list of conditions and the following disclaimer in the
  1370.  *    documentation and/or other materials provided with the distribution.
  1371.  * 4. Neither the name of the University nor the names of its contributors
  1372.  *    may be used to endorse or promote products derived from this software
  1373.  *    without specific prior written permission.
  1374.  *
  1375.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1376.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1377.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1378.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1379.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1380.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1381.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1382.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1383.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1384.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1385.  * SUCH DAMAGE.
  1386.  *
  1387.  *      @(#)limits.h    8.3 (Berkeley) 1/4/94
  1388.  * $FreeBSD: head/sys/x86/include/_limits.h 235939 2012-05-24 21:44:46Z obrien $
  1389.  */
  1390.  
  1391. #ifndef _MACHINE__LIMITS_H_
  1392. #define _MACHINE__LIMITS_H_
  1393.  
  1394. /*
  1395.  * According to ANSI (section 2.2.4.2), the values below must be usable by
  1396.  * #if preprocessing directives.  Additionally, the expression must have the
  1397.  * same type as would an expression that is an object of the corresponding
  1398.  * type converted according to the integral promotions.  The subtraction for
  1399.  * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
  1400.  * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
  1401.  */
  1402.  
  1403. #define __CHAR_BIT      8               /* number of bits in a char */
  1404.  
  1405. #define __SCHAR_MAX     0x7f            /* max value for a signed char */
  1406. #define __SCHAR_MIN     (-0x7f - 1)     /* min value for a signed char */
  1407.  
  1408. #define __UCHAR_MAX     0xff            /* max value for an unsigned char */
  1409.  
  1410. #define __USHRT_MAX     0xffff          /* max value for an unsigned short */
  1411. #define __SHRT_MAX      0x7fff          /* max value for a short */
  1412. #define __SHRT_MIN      (-0x7fff - 1)   /* min value for a short */
  1413.  
  1414. #define __UINT_MAX      0xffffffff      /* max value for an unsigned int */
  1415. #define __INT_MAX       0x7fffffff      /* max value for an int */
  1416. #define __INT_MIN       (-0x7fffffff - 1)       /* min value for an int */
  1417.  
  1418. #ifdef  __LP64__
  1419. #define __ULONG_MAX     0xffffffffffffffff      /* max for an unsigned long */
  1420. #define __LONG_MAX      0x7fffffffffffffff      /* max for a long */
  1421. #define __LONG_MIN      (-0x7fffffffffffffff - 1) /* min for a long */
  1422. #else
  1423. # 65 "/usr/obj/usr/src/lib32/usr/include/x86/_limits.h" 3
  1424. #define __ULONG_MAX     0xffffffffUL
  1425. #define __LONG_MAX      0x7fffffffL
  1426. #define __LONG_MIN      (-0x7fffffffL - 1)
  1427. #endif
  1428. # 69 "/usr/obj/usr/src/lib32/usr/include/x86/_limits.h" 3
  1429.  
  1430.                         /* max value for an unsigned long long */
  1431. #define __ULLONG_MAX    0xffffffffffffffffULL
  1432. #define __LLONG_MAX     0x7fffffffffffffffLL    /* max value for a long long */
  1433. #define __LLONG_MIN     (-0x7fffffffffffffffLL - 1)  /* min for a long long */
  1434.  
  1435. #ifdef  __LP64__
  1436. #define __SSIZE_MAX     __LONG_MAX      /* max value for a ssize_t */
  1437. #define __SIZE_T_MAX    __ULONG_MAX     /* max value for a size_t */
  1438. #define __OFF_MAX       __LONG_MAX      /* max value for an off_t */
  1439. #define __OFF_MIN       __LONG_MIN      /* min value for an off_t */
  1440. /* Quads and longs are the same on the amd64.  Ensure they stay in sync. */
  1441. #define __UQUAD_MAX     __ULONG_MAX     /* max value for a uquad_t */
  1442. #define __QUAD_MAX      __LONG_MAX      /* max value for a quad_t */
  1443. #define __QUAD_MIN      __LONG_MIN      /* min value for a quad_t */
  1444. #define __LONG_BIT      64
  1445. #else
  1446. # 86 "/usr/obj/usr/src/lib32/usr/include/x86/_limits.h" 3
  1447. #define __SSIZE_MAX     __INT_MAX
  1448. #define __SIZE_T_MAX    __UINT_MAX
  1449. #define __OFF_MAX       __LLONG_MAX
  1450. #define __OFF_MIN       __LLONG_MIN
  1451. #define __UQUAD_MAX     __ULLONG_MAX
  1452. #define __QUAD_MAX      __LLONG_MAX
  1453. #define __QUAD_MIN      __LLONG_MIN
  1454. #define __LONG_BIT      32
  1455. #endif
  1456. # 95 "/usr/obj/usr/src/lib32/usr/include/x86/_limits.h" 3
  1457.  
  1458. #define __WORD_BIT      32
  1459.  
  1460. /* Minimum signal stack size. */
  1461. #define __MINSIGSTKSZ   (512 * 4)
  1462.  
  1463. #endif /* !_MACHINE__LIMITS_H_ */
  1464. # 102 "/usr/obj/usr/src/lib32/usr/include/x86/_limits.h" 3
  1465. # 7 "/usr/obj/usr/src/lib32/usr/include/machine/_limits.h" 2 3
  1466. # 37 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 2 3
  1467.  
  1468. #define CHAR_BIT        __CHAR_BIT      /* number of bits in a char */
  1469.  
  1470. #define SCHAR_MAX       __SCHAR_MAX     /* max value for a signed char */
  1471. #define SCHAR_MIN       __SCHAR_MIN     /* min value for a signed char */
  1472.  
  1473. #define UCHAR_MAX       __UCHAR_MAX     /* max value for an unsigned char */
  1474.  
  1475. #ifdef __CHAR_UNSIGNED__
  1476. #define CHAR_MAX        UCHAR_MAX       /* max value for a char */
  1477. #define CHAR_MIN        0               /* min value for a char */
  1478. #else
  1479. # 49 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1480. #define CHAR_MAX        SCHAR_MAX
  1481. #define CHAR_MIN        SCHAR_MIN
  1482. #endif
  1483. # 52 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1484.  
  1485. #define USHRT_MAX       __USHRT_MAX     /* max value for an unsigned short */
  1486. #define SHRT_MAX        __SHRT_MAX      /* max value for a short */
  1487. #define SHRT_MIN        __SHRT_MIN      /* min value for a short */
  1488.  
  1489. #define UINT_MAX        __UINT_MAX      /* max value for an unsigned int */
  1490. #define INT_MAX         __INT_MAX       /* max value for an int */
  1491. #define INT_MIN         __INT_MIN       /* min value for an int */
  1492.  
  1493. #define ULONG_MAX       __ULONG_MAX     /* max for an unsigned long */
  1494. #define LONG_MAX        __LONG_MAX      /* max for a long */
  1495. #define LONG_MIN        __LONG_MIN      /* min for a long */
  1496.  
  1497. #ifdef __LONG_LONG_SUPPORTED
  1498. #define ULLONG_MAX      __ULLONG_MAX    /* max for an unsigned long long */
  1499. #define LLONG_MAX       __LLONG_MAX     /* max for a long long */
  1500. #define LLONG_MIN       __LLONG_MIN     /* min for a long long */
  1501. #endif
  1502. # 70 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1503.  
  1504. #if __POSIX_VISIBLE || __XSI_VISIBLE
  1505. #define SSIZE_MAX       __SSIZE_MAX     /* max value for an ssize_t */
  1506. #endif
  1507. # 74 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1508.  
  1509. #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
  1510. #define SIZE_T_MAX      __SIZE_T_MAX    /* max value for a size_t */
  1511.  
  1512. #define OFF_MAX         __OFF_MAX       /* max value for an off_t */
  1513. #define OFF_MIN         __OFF_MIN       /* min value for an off_t */
  1514. #endif
  1515. # 81 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1516.  
  1517. #if __BSD_VISIBLE
  1518. #define GID_MAX         UINT_MAX        /* max value for a gid_t */
  1519. #define UID_MAX         UINT_MAX        /* max value for a uid_t */
  1520.  
  1521. #define UQUAD_MAX       (__UQUAD_MAX)   /* max value for a uquad_t */
  1522. #define QUAD_MAX        (__QUAD_MAX)    /* max value for a quad_t */
  1523. #define QUAD_MIN        (__QUAD_MIN)    /* min value for a quad_t */
  1524. #endif
  1525. # 90 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1526.  
  1527. #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
  1528. #define LONG_BIT        __LONG_BIT
  1529. #define WORD_BIT        __WORD_BIT
  1530. #endif
  1531. # 95 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1532.  
  1533. #if __POSIX_VISIBLE
  1534. #define MQ_PRIO_MAX     64
  1535. #endif
  1536. # 99 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1537.  
  1538. #endif /* !_SYS_LIMITS_H_ */
  1539. # 101 "/usr/obj/usr/src/lib32/usr/include/sys/limits.h" 3
  1540. # 142 "/usr/src/lib/libc/../../include/limits.h" 2
  1541.  
  1542. #if __POSIX_VISIBLE
  1543. #if 0 /* expanded by -frewrite-includes */
  1544. #include <sys/syslimits.h>
  1545. #endif /* expanded by -frewrite-includes */
  1546. # 144 "/usr/src/lib/libc/../../include/limits.h"
  1547. # 1 "/usr/obj/usr/src/lib32/usr/include/sys/syslimits.h" 1 3
  1548. /*-
  1549.  * Copyright (c) 1988, 1993
  1550.  *      The Regents of the University of California.  All rights reserved.
  1551.  *
  1552.  * Redistribution and use in source and binary forms, with or without
  1553.  * modification, are permitted provided that the following conditions
  1554.  * are met:
  1555.  * 1. Redistributions of source code must retain the above copyright
  1556.  *    notice, this list of conditions and the following disclaimer.
  1557.  * 2. Redistributions in binary form must reproduce the above copyright
  1558.  *    notice, this list of conditions and the following disclaimer in the
  1559.  *    documentation and/or other materials provided with the distribution.
  1560.  * 4. Neither the name of the University nor the names of its contributors
  1561.  *    may be used to endorse or promote products derived from this software
  1562.  *    without specific prior written permission.
  1563.  *
  1564.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1565.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1566.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1567.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1568.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1569.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1570.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1571.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1572.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1573.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1574.  * SUCH DAMAGE.
  1575.  *
  1576.  *      @(#)syslimits.h 8.1 (Berkeley) 6/2/93
  1577.  * $FreeBSD: head/sys/sys/syslimits.h 194498 2009-06-19 17:10:35Z brooks $
  1578.  */
  1579.  
  1580. #ifndef _SYS_SYSLIMITS_H_
  1581. #define _SYS_SYSLIMITS_H_
  1582.  
  1583. #if !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_)
  1584. #ifndef _SYS_CDEFS_H_
  1585. #error this file needs sys/cdefs.h as a prerequisite
  1586. #endif
  1587. # 40 "/usr/obj/usr/src/lib32/usr/include/sys/syslimits.h" 3
  1588. #ifdef __CC_SUPPORTS_WARNING
  1589. #warning "No user-serviceable parts inside."
  1590. #endif
  1591. # 43 "/usr/obj/usr/src/lib32/usr/include/sys/syslimits.h" 3
  1592. #endif
  1593. # 44 "/usr/obj/usr/src/lib32/usr/include/sys/syslimits.h" 3
  1594.  
  1595. /*
  1596.  * Do not add any new variables here.  (See the comment at the end of
  1597.  * the file for why.)
  1598.  */
  1599. #define ARG_MAX                 262144  /* max bytes for an exec function */
  1600. #ifndef CHILD_MAX
  1601. #define CHILD_MAX                  40   /* max simultaneous processes */
  1602. #endif
  1603. # 53 "/usr/obj/usr/src/lib32/usr/include/sys/syslimits.h" 3
  1604. #define LINK_MAX                32767   /* max file link count */
  1605. #define MAX_CANON                 255   /* max bytes in term canon input line */
  1606. #define MAX_INPUT                 255   /* max bytes in terminal input */
  1607. #define NAME_MAX                  255   /* max bytes in a file name */
  1608. #ifndef NGROUPS_MAX
  1609. #define NGROUPS_MAX              1023   /* max supplemental group id's */
  1610. #endif
  1611. # 60 "/usr/obj/usr/src/lib32/usr/include/sys/syslimits.h" 3
  1612. #ifndef OPEN_MAX
  1613. #define OPEN_MAX                   64   /* max open files per process */
  1614. #endif
  1615. # 63 "/usr/obj/usr/src/lib32/usr/include/sys/syslimits.h" 3
  1616. #define PATH_MAX                 1024   /* max bytes in pathname */
  1617. #define PIPE_BUF                  512   /* max bytes for atomic pipe writes */
  1618. #define IOV_MAX                  1024   /* max elements in i/o vector */
  1619.  
  1620. /*
  1621.  * We leave the following values undefined to force applications to either
  1622.  * assume conservative values or call sysconf() to get the current value.
  1623.  *
  1624.  * HOST_NAME_MAX
  1625.  *
  1626.  * (We should do this for most of the values currently defined here,
  1627.  * but many programs are not prepared to deal with this yet.)
  1628.  */
  1629. #endif
  1630. # 77 "/usr/obj/usr/src/lib32/usr/include/sys/syslimits.h" 3
  1631. # 145 "/usr/src/lib/libc/../../include/limits.h" 2
  1632. #endif
  1633. # 146 "/usr/src/lib/libc/../../include/limits.h"
  1634.  
  1635. #endif /* !_LIMITS_H_ */
  1636. # 148 "/usr/src/lib/libc/../../include/limits.h"
  1637. # 62 "/usr/src/lib/libc/gen/fnmatch.c" 2
  1638. #if 0 /* expanded by -frewrite-includes */
  1639. #include <string.h>
  1640. #endif /* expanded by -frewrite-includes */
  1641. # 62 "/usr/src/lib/libc/gen/fnmatch.c"
  1642. # 1 "/usr/src/lib/libc/../../include/string.h" 1
  1643. /*-
  1644.  * Copyright (c) 1990, 1993
  1645.  *      The Regents of the University of California.  All rights reserved.
  1646.  *
  1647.  * Redistribution and use in source and binary forms, with or without
  1648.  * modification, are permitted provided that the following conditions
  1649.  * are met:
  1650.  * 1. Redistributions of source code must retain the above copyright
  1651.  *    notice, this list of conditions and the following disclaimer.
  1652.  * 2. Redistributions in binary form must reproduce the above copyright
  1653.  *    notice, this list of conditions and the following disclaimer in the
  1654.  *    documentation and/or other materials provided with the distribution.
  1655.  * 3. Neither the name of the University nor the names of its contributors
  1656.  *    may be used to endorse or promote products derived from this software
  1657.  *    without specific prior written permission.
  1658.  *
  1659.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1660.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1661.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1662.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1663.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1664.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1665.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1666.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1667.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1668.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1669.  * SUCH DAMAGE.
  1670.  *
  1671.  *      @(#)string.h    8.1 (Berkeley) 6/2/93
  1672.  * $FreeBSD: head/include/string.h 265878 2014-05-11 13:48:21Z jilles $
  1673.  */
  1674.  
  1675. #ifndef _STRING_H_
  1676. #define _STRING_H_
  1677.  
  1678. #if 0 /* expanded by -frewrite-includes */
  1679. #include <sys/cdefs.h>
  1680. #endif /* expanded by -frewrite-includes */
  1681. # 36 "/usr/src/lib/libc/../../include/string.h"
  1682. # 37 "/usr/src/lib/libc/../../include/string.h"
  1683. #if 0 /* expanded by -frewrite-includes */
  1684. #include <sys/_null.h>
  1685. #endif /* expanded by -frewrite-includes */
  1686. # 37 "/usr/src/lib/libc/../../include/string.h"
  1687. # 1 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 1 3
  1688. /*-
  1689.  * Copyright (c) 2003 Marcel Moolenaar
  1690.  * All rights reserved.
  1691.  *
  1692.  * Redistribution and use in source and binary forms, with or without
  1693.  * modification, are permitted provided that the following conditions
  1694.  * are met:
  1695.  *
  1696.  * 1. Redistributions of source code must retain the above copyright
  1697.  *    notice, this list of conditions and the following disclaimer.
  1698.  * 2. Redistributions in binary form must reproduce the above copyright
  1699.  *    notice, this list of conditions and the following disclaimer in the
  1700.  *    documentation and/or other materials provided with the distribution.
  1701.  *
  1702.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  1703.  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  1704.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  1705.  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  1706.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  1707.  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1708.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1709.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1710.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  1711.  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1712.  *
  1713.  * $FreeBSD: head/sys/sys/_null.h 228918 2011-12-27 21:36:31Z theraven $
  1714.  */
  1715.  
  1716. #ifndef NULL
  1717.  
  1718. #if !defined(__cplusplus)
  1719. #define NULL    ((void *)0)
  1720. #else
  1721. # 34 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 3
  1722. #if __cplusplus >= 201103L
  1723. #define NULL    nullptr
  1724. #elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
  1725. # 37 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 3
  1726. #define NULL    __null
  1727. #else
  1728. # 39 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 3
  1729. #if defined(__LP64__)
  1730. #define NULL    (0L)
  1731. #else
  1732. # 42 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 3
  1733. #define NULL    0
  1734. #endif  /* __LP64__ */
  1735. # 44 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 3
  1736. #endif  /* __GNUG__ */
  1737. # 45 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 3
  1738. #endif  /* !__cplusplus */
  1739. # 46 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 3
  1740.  
  1741. #endif
  1742. # 48 "/usr/obj/usr/src/lib32/usr/include/sys/_null.h" 3
  1743. # 38 "/usr/src/lib/libc/../../include/string.h" 2
  1744. #if 0 /* expanded by -frewrite-includes */
  1745. #include <sys/_types.h>
  1746. #endif /* expanded by -frewrite-includes */
  1747. # 38 "/usr/src/lib/libc/../../include/string.h"
  1748. # 1 "/usr/obj/usr/src/lib32/usr/include/sys/_types.h" 1 3
  1749. /*-
  1750.  * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  1751.  * All rights reserved.
  1752.  *
  1753.  * Redistribution and use in source and binary forms, with or without
  1754.  * modification, are permitted provided that the following conditions
  1755.  * are met:
  1756.  * 1. Redistributions of source code must retain the above copyright
  1757.  *    notice, this list of conditions and the following disclaimer.
  1758.  * 2. Redistributions in binary form must reproduce the above copyright
  1759.  *    notice, this list of conditions and the following disclaimer in the
  1760.  *    documentation and/or other materials provided with the distribution.
  1761.  *
  1762.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  1763.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1764.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1765.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  1766.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1767.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1768.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1769.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1770.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1771.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1772.  * SUCH DAMAGE.
  1773.  *
  1774.  * $FreeBSD: head/sys/sys/_types.h 297000 2016-03-18 01:28:41Z jhibbits $
  1775.  */
  1776.  
  1777. #ifndef _SYS__TYPES_H_
  1778. #define _SYS__TYPES_H_
  1779.  
  1780. #if 0 /* expanded by -frewrite-includes */
  1781. #include <sys/cdefs.h>
  1782. #endif /* expanded by -frewrite-includes */
  1783. # 32 "/usr/obj/usr/src/lib32/usr/include/sys/_types.h" 3
  1784. # 33 "/usr/obj/usr/src/lib32/usr/include/sys/_types.h" 3
  1785. #if 0 /* expanded by -frewrite-includes */
  1786. #include <machine/_types.h>
  1787. #endif /* expanded by -frewrite-includes */
  1788. # 33 "/usr/obj/usr/src/lib32/usr/include/sys/_types.h" 3
  1789. # 1 "/usr/obj/usr/src/lib32/usr/include/machine/_types.h" 1 3
  1790. /*-
  1791.  * This file is in the public domain.
  1792.  */
  1793. /* $FreeBSD: head/sys/i386/include/_types.h 232261 2012-02-28 18:15:28Z tijl $ */
  1794.  
  1795. #if 0 /* expanded by -frewrite-includes */
  1796. #include <x86/_types.h>
  1797. #endif /* expanded by -frewrite-includes */
  1798. # 6 "/usr/obj/usr/src/lib32/usr/include/machine/_types.h" 3
  1799. # 1 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 1 3
  1800. /*-
  1801.  * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  1802.  * Copyright (c) 1990, 1993
  1803.  *      The Regents of the University of California.  All rights reserved.
  1804.  *
  1805.  * Redistribution and use in source and binary forms, with or without
  1806.  * modification, are permitted provided that the following conditions
  1807.  * are met:
  1808.  * 1. Redistributions of source code must retain the above copyright
  1809.  *    notice, this list of conditions and the following disclaimer.
  1810.  * 2. Redistributions in binary form must reproduce the above copyright
  1811.  *    notice, this list of conditions and the following disclaimer in the
  1812.  *    documentation and/or other materials provided with the distribution.
  1813.  * 3. All advertising materials mentioning features or use of this software
  1814.  *    must display the following acknowledgement:
  1815.  *      This product includes software developed by the University of
  1816.  *      California, Berkeley and its contributors.
  1817.  * 4. Neither the name of the University nor the names of its contributors
  1818.  *    may be used to endorse or promote products derived from this software
  1819.  *    without specific prior written permission.
  1820.  *
  1821.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1822.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1823.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1824.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1825.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1826.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1827.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1828.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1829.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1830.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1831.  * SUCH DAMAGE.
  1832.  *
  1833.  *      From: @(#)ansi.h        8.2 (Berkeley) 1/4/94
  1834.  *      From: @(#)types.h       8.3 (Berkeley) 1/5/94
  1835.  * $FreeBSD: head/sys/x86/include/_types.h 286328 2015-08-05 17:21:42Z jkim $
  1836.  */
  1837.  
  1838. #ifndef _MACHINE__TYPES_H_
  1839. #define _MACHINE__TYPES_H_
  1840.  
  1841. #ifndef _SYS_CDEFS_H_
  1842. #error this file needs sys/cdefs.h as a prerequisite
  1843. #endif
  1844. # 45 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1845.  
  1846. #define __NO_STRICT_ALIGNMENT
  1847.  
  1848. /*
  1849.  * Basic types upon which most other types are built.
  1850.  */
  1851. typedef signed char             __int8_t;
  1852. typedef unsigned char           __uint8_t;
  1853. typedef short                   __int16_t;
  1854. typedef unsigned short          __uint16_t;
  1855. typedef int                     __int32_t;
  1856. typedef unsigned int            __uint32_t;
  1857. #ifdef  __LP64__
  1858. typedef long                    __int64_t;
  1859. typedef unsigned long           __uint64_t;
  1860. #else
  1861. # 61 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1862. #ifndef lint
  1863. __extension__
  1864. #endif
  1865. # 64 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1866. /* LONGLONG */
  1867. typedef long long               __int64_t;
  1868. #ifndef lint
  1869. __extension__
  1870. #endif
  1871. # 69 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1872. /* LONGLONG */
  1873. typedef unsigned long long      __uint64_t;
  1874. #endif
  1875. # 72 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1876.  
  1877. /*
  1878.  * Standard type definitions.
  1879.  */
  1880. #ifdef  __LP64__
  1881. typedef __int32_t       __clock_t;              /* clock()... */
  1882. typedef __int64_t       __critical_t;
  1883. typedef double          __double_t;
  1884. typedef float           __float_t;
  1885. typedef __int64_t       __intfptr_t;
  1886. typedef __int64_t       __intptr_t;
  1887. #else
  1888. # 84 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1889. typedef unsigned long   __clock_t;
  1890. typedef __int32_t       __critical_t;
  1891. typedef long double     __double_t;
  1892. typedef long double     __float_t;
  1893. typedef __int32_t       __intfptr_t;
  1894. typedef __int32_t       __intptr_t;
  1895. #endif
  1896. # 91 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1897. typedef __int64_t       __intmax_t;
  1898. typedef __int32_t       __int_fast8_t;
  1899. typedef __int32_t       __int_fast16_t;
  1900. typedef __int32_t       __int_fast32_t;
  1901. typedef __int64_t       __int_fast64_t;
  1902. typedef __int8_t        __int_least8_t;
  1903. typedef __int16_t       __int_least16_t;
  1904. typedef __int32_t       __int_least32_t;
  1905. typedef __int64_t       __int_least64_t;
  1906. #ifdef  __LP64__
  1907. typedef __int64_t       __ptrdiff_t;            /* ptr1 - ptr2 */
  1908. typedef __int64_t       __register_t;
  1909. typedef __int64_t       __segsz_t;              /* segment size (in pages) */
  1910. typedef __uint64_t      __size_t;               /* sizeof() */
  1911. typedef __int64_t       __ssize_t;              /* byte count or error */
  1912. typedef __int64_t       __time_t;               /* time()... */
  1913. typedef __uint64_t      __uintfptr_t;
  1914. typedef __uint64_t      __uintptr_t;
  1915. #else
  1916. # 110 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1917. typedef __int32_t       __ptrdiff_t;
  1918. typedef __int32_t       __register_t;
  1919. typedef __int32_t       __segsz_t;
  1920. typedef __uint32_t      __size_t;
  1921. typedef __int32_t       __ssize_t;
  1922. typedef __int32_t       __time_t;
  1923. typedef __uint32_t      __uintfptr_t;
  1924. typedef __uint32_t      __uintptr_t;
  1925. #endif
  1926. # 119 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1927. typedef __uint64_t      __uintmax_t;
  1928. typedef __uint32_t      __uint_fast8_t;
  1929. typedef __uint32_t      __uint_fast16_t;
  1930. typedef __uint32_t      __uint_fast32_t;
  1931. typedef __uint64_t      __uint_fast64_t;
  1932. typedef __uint8_t       __uint_least8_t;
  1933. typedef __uint16_t      __uint_least16_t;
  1934. typedef __uint32_t      __uint_least32_t;
  1935. typedef __uint64_t      __uint_least64_t;
  1936. #ifdef  __LP64__
  1937. typedef __uint64_t      __u_register_t;
  1938. typedef __uint64_t      __vm_offset_t;
  1939. typedef __uint64_t      __vm_paddr_t;
  1940. typedef __uint64_t      __vm_size_t;
  1941. #else
  1942. # 134 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1943. typedef __uint32_t      __u_register_t;
  1944. typedef __uint32_t      __vm_offset_t;
  1945. #ifdef PAE
  1946. typedef __uint64_t      __vm_paddr_t;
  1947. #else
  1948. # 139 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1949. typedef __uint32_t      __vm_paddr_t;
  1950. #endif
  1951. # 141 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1952. typedef __uint32_t      __vm_size_t;
  1953. #endif
  1954. # 143 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1955. typedef __int64_t       __vm_ooffset_t;
  1956. typedef __uint64_t      __vm_pindex_t;
  1957. typedef int             ___wchar_t;
  1958.  
  1959. #define __WCHAR_MIN     __INT_MIN       /* min value for a wchar_t */
  1960. #define __WCHAR_MAX     __INT_MAX       /* max value for a wchar_t */
  1961.  
  1962. /*
  1963.  * Unusual type definitions.
  1964.  */
  1965. #ifdef __GNUCLIKE_BUILTIN_VARARGS
  1966. typedef __builtin_va_list       __va_list;      /* internally known to gcc */
  1967. #else
  1968. # 156 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1969. #ifdef __LP64__
  1970. struct __s_va_list {
  1971.         __uint32_t      _pad1[2];       /* gp_offset, fp_offset */
  1972.         __uint64_t      _pad2[2];       /* overflow_arg_area, reg_save_area */
  1973. };
  1974. typedef struct __s_va_list      __va_list;
  1975. #else
  1976. # 163 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1977. typedef char *                  __va_list;
  1978. #endif
  1979. # 165 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1980. #endif
  1981. # 166 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1982. #if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \
  1983.     && !defined(__NO_GNUC_VA_LIST)
  1984. #define __GNUC_VA_LIST
  1985. typedef __va_list               __gnuc_va_list; /* compatibility w/GNU headers*/
  1986. #endif
  1987. # 171 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1988.  
  1989. #endif /* !_MACHINE__TYPES_H_ */
  1990. # 173 "/usr/obj/usr/src/lib32/usr/include/x86/_types.h" 3
  1991. # 7 "/usr/obj/usr/src/lib32/usr/include/machine/_types.h" 2 3
  1992. # 34 "/usr/obj/usr/src/lib32/usr/include/sys/_types.h" 2 3
  1993.  
  1994. /*
  1995.  * Standard type definitions.
  1996.  */
  1997. typedef __int32_t       __blksize_t;    /* file block size */
  1998. typedef __int64_t       __blkcnt_t;     /* file block count */
  1999. typedef __int32_t       __clockid_t;    /* clock_gettime()... */
  2000. typedef __uint32_t      __fflags_t;     /* file flags */
  2001. typedef __uint64_t      __fsblkcnt_t;
  2002. typedef __uint64_t      __fsfilcnt_t;
  2003. typedef __uint32_t      __gid_t;
  2004. typedef __int64_t       __id_t;         /* can hold a gid_t, pid_t, or uid_t */
  2005. typedef __uint32_t      __ino_t;        /* inode number */
  2006. typedef long            __key_t;        /* IPC key (for Sys V IPC) */
  2007. typedef __int32_t       __lwpid_t;      /* Thread ID (a.k.a. LWP) */
  2008. typedef __uint16_t      __mode_t;       /* permissions */
  2009. typedef int             __accmode_t;    /* access permissions */
  2010. typedef int             __nl_item;
  2011. typedef __uint16_t      __nlink_t;      /* link count */
  2012. typedef __int64_t       __off_t;        /* file offset */
  2013. typedef __int32_t       __pid_t;        /* process [group] */
  2014. typedef __int64_t       __rlim_t;       /* resource limit - intentionally */
  2015.                                         /* signed, because of legacy code */
  2016.                                         /* that uses -1 for RLIM_INFINITY */
  2017. typedef __uint8_t       __sa_family_t;
  2018. typedef __uint32_t      __socklen_t;
  2019. typedef long            __suseconds_t;  /* microseconds (signed) */
  2020. typedef struct __timer  *__timer_t;     /* timer_gettime()... */
  2021. typedef struct __mq     *__mqd_t;       /* mq_open()... */
  2022. typedef __uint32_t      __uid_t;
  2023. typedef unsigned int    __useconds_t;   /* microseconds (unsigned) */
  2024. typedef int             __cpuwhich_t;   /* which parameter for cpuset. */
  2025. typedef int             __cpulevel_t;   /* level parameter for cpuset. */
  2026. typedef int             __cpusetid_t;   /* cpuset identifier. */
  2027.  
  2028. /*
  2029.  * Unusual type definitions.
  2030.  */
  2031. /*
  2032.  * rune_t is declared to be an ``int'' instead of the more natural
  2033.  * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
  2034.  * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
  2035.  * it looks like 10646 will be a 31 bit standard.  This means that if your
  2036.  * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
  2037.  * chosen over a long is that the is*() and to*() routines take ints (says
  2038.  * ANSI C), but they use __ct_rune_t instead of int.
  2039.  *
  2040.  * NOTE: rune_t is not covered by ANSI nor other standards, and should not
  2041.  * be instantiated outside of lib/libc/locale.  Use wchar_t.  wint_t and
  2042.  * rune_t must be the same type.  Also, wint_t should be able to hold all
  2043.  * members of the largest character set plus one extra value (WEOF), and
  2044.  * must be at least 16 bits.
  2045.  */
  2046. typedef int             __ct_rune_t;    /* arg type for ctype funcs */
  2047. typedef __ct_rune_t     __rune_t;       /* rune_t (see above) */
  2048. typedef __ct_rune_t     __wint_t;       /* wint_t (see above) */
  2049.  
  2050. /* Clang already provides these types as built-ins, but only in C++ mode. */
  2051. #if !defined(__clang__) || !defined(__cplusplus)
  2052. typedef __uint_least16_t __char16_t;
  2053. typedef __uint_least32_t __char32_t;
  2054. #endif
  2055. # 96 "/usr/obj/usr/src/lib32/usr/include/sys/_types.h" 3
  2056. /* In C++11, char16_t and char32_t are built-in types. */
  2057. #if defined(__cplusplus) && __cplusplus >= 201103L
  2058. #define _CHAR16_T_DECLARED
  2059. #define _CHAR32_T_DECLARED
  2060. #endif
  2061. # 101 "/usr/obj/usr/src/lib32/usr/include/sys/_types.h" 3
  2062.  
  2063. typedef __uint32_t      __dev_t;        /* device number */
  2064.  
  2065. typedef __uint32_t      __fixpt_t;      /* fixed point number */
  2066.  
  2067. /*
  2068.  * mbstate_t is an opaque object to keep conversion state during multibyte
  2069.  * stream conversions.
  2070.  */
  2071. typedef union {
  2072.         char            __mbstate8[128];
  2073.         __int64_t       _mbstateL;      /* for alignment */
  2074. } __mbstate_t;
  2075.  
  2076. typedef __uintmax_t     __rman_res_t;
  2077.  
  2078. #endif /* !_SYS__TYPES_H_ */
  2079. # 118 "/usr/obj/usr/src/lib32/usr/include/sys/_types.h" 3
  2080. # 39 "/usr/src/lib/libc/../../include/string.h" 2
  2081.  
  2082. /*
  2083.  * Prototype functions which were historically defined in <string.h>, but
  2084.  * are required by POSIX to be prototyped in <strings.h>.
  2085.  */
  2086. #if __BSD_VISIBLE
  2087. #if 0 /* expanded by -frewrite-includes */
  2088. #include <strings.h>
  2089. #endif /* expanded by -frewrite-includes */
  2090. # 45 "/usr/src/lib/libc/../../include/string.h"
  2091. # 1 "/usr/src/lib/libc/../../include/strings.h" 1
  2092. /*-
  2093.  * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2094.  * All rights reserved.
  2095.  *
  2096.  * Redistribution and use in source and binary forms, with or without
  2097.  * modification, are permitted provided that the following conditions
  2098.  * are met:
  2099.  * 1. Redistributions of source code must retain the above copyright
  2100.  *    notice, this list of conditions and the following disclaimer.
  2101.  * 2. Redistributions in binary form must reproduce the above copyright
  2102.  *    notice, this list of conditions and the following disclaimer in the
  2103.  *    documentation and/or other materials provided with the distribution.
  2104.  *
  2105.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2106.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2107.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2108.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2109.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2110.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2111.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2112.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2113.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2114.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2115.  * SUCH DAMAGE.
  2116.  *
  2117.  * $FreeBSD: head/include/strings.h 272673 2014-10-07 04:54:11Z delphij $
  2118.  */
  2119.  
  2120. #ifndef _STRINGS_H_
  2121. #define _STRINGS_H_
  2122.  
  2123. #if 0 /* expanded by -frewrite-includes */
  2124. #include <sys/cdefs.h>
  2125. #endif /* expanded by -frewrite-includes */
  2126. # 32 "/usr/src/lib/libc/../../include/strings.h"
  2127. # 33 "/usr/src/lib/libc/../../include/strings.h"
  2128. #if 0 /* expanded by -frewrite-includes */
  2129. #include <sys/_types.h>
  2130. #endif /* expanded by -frewrite-includes */
  2131. # 33 "/usr/src/lib/libc/../../include/strings.h"
  2132. # 34 "/usr/src/lib/libc/../../include/strings.h"
  2133.  
  2134. #ifndef _SIZE_T_DECLARED
  2135. typedef __size_t        size_t;
  2136. #define _SIZE_T_DECLARED
  2137. #endif
  2138. # 39 "/usr/src/lib/libc/../../include/strings.h"
  2139.  
  2140. __BEGIN_DECLS
  2141. #if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
  2142. int      bcmp(const void *, const void *, size_t) __pure;       /* LEGACY */
  2143. void     bcopy(const void *, void *, size_t);                   /* LEGACY */
  2144. void     bzero(void *, size_t);                                 /* LEGACY */
  2145. #endif
  2146. # 46 "/usr/src/lib/libc/../../include/strings.h"
  2147. #if __BSD_VISIBLE
  2148. void     explicit_bzero(void *, size_t);
  2149. #endif
  2150. # 49 "/usr/src/lib/libc/../../include/strings.h"
  2151. #if __XSI_VISIBLE
  2152. int      ffs(int) __pure2;
  2153. #endif
  2154. # 52 "/usr/src/lib/libc/../../include/strings.h"
  2155. #if __BSD_VISIBLE
  2156. int      ffsl(long) __pure2;
  2157. int      ffsll(long long) __pure2;
  2158. int      fls(int) __pure2;
  2159. int      flsl(long) __pure2;
  2160. int      flsll(long long) __pure2;
  2161. #endif
  2162. # 59 "/usr/src/lib/libc/../../include/strings.h"
  2163. #if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
  2164. char    *index(const char *, int) __pure;                       /* LEGACY */
  2165. char    *rindex(const char *, int) __pure;                      /* LEGACY */
  2166. #endif
  2167. # 63 "/usr/src/lib/libc/../../include/strings.h"
  2168. int      strcasecmp(const char *, const char *) __pure;
  2169. int      strncasecmp(const char *, const char *, size_t) __pure;
  2170.  
  2171. #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
  2172. #if 0 /* expanded by -frewrite-includes */
  2173. #include <xlocale/_strings.h>
  2174. #endif /* expanded by -frewrite-includes */
  2175. # 67 "/usr/src/lib/libc/../../include/strings.h"
  2176. # 1 "/usr/src/lib/libc/../../include/xlocale/_strings.h" 1
  2177. /*-
  2178.  * Copyright (c) 2011, 2012 The FreeBSD Foundation
  2179.  * All rights reserved.
  2180.  *
  2181.  * Redistribution and use in source and binary forms, with or without
  2182.  * modification, are permitted provided that the following conditions
  2183.  * are met:
  2184.  * 1. Redistributions of source code must retain the above copyright
  2185.  *    notice, this list of conditions and the following disclaimer.
  2186.  * 2. Redistributions in binary form must reproduce the above copyright
  2187.  *    notice, this list of conditions and the following disclaimer in the
  2188.  *    documentation and/or other materials provided with the distribution.
  2189.  *
  2190.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2191.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2192.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2193.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2194.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2195.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2196.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2197.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2198.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2199.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2200.  * SUCH DAMAGE.
  2201.  *
  2202.  * $FreeBSD: head/include/xlocale/_strings.h 266865 2014-05-30 01:09:07Z pfg $
  2203.  */
  2204.  
  2205. #ifndef _LOCALE_T_DEFINED
  2206. #define _LOCALE_T_DEFINED
  2207. typedef struct  _xlocale *locale_t;
  2208. #endif
  2209. # 33 "/usr/src/lib/libc/../../include/xlocale/_strings.h"
  2210.  
  2211. /*
  2212.  * This file is included from both strings.h and xlocale.h.  We need to expose
  2213.  * the declarations unconditionally if we are included from xlocale.h, but only
  2214.  * if we are in POSIX2008 mode if included from string.h.
  2215.  */
  2216.  
  2217. #ifndef _XLOCALE_STRINGS1_H
  2218. #define _XLOCALE_STRINGS1_H
  2219.  
  2220. /*
  2221.  * POSIX2008 functions
  2222.  */
  2223. int      strcasecmp_l(const char *, const char *, locale_t);
  2224. int      strncasecmp_l(const char *, const char *, size_t, locale_t);
  2225. #endif /* _XLOCALE_STRINGS1_H */
  2226. # 49 "/usr/src/lib/libc/../../include/xlocale/_strings.h"
  2227. # 68 "/usr/src/lib/libc/../../include/strings.h" 2
  2228. #endif
  2229. # 69 "/usr/src/lib/libc/../../include/strings.h"
  2230. __END_DECLS
  2231.  
  2232. #endif /* _STRINGS_H_ */
  2233. # 72 "/usr/src/lib/libc/../../include/strings.h"
  2234. # 46 "/usr/src/lib/libc/../../include/string.h" 2
  2235. #endif
  2236. # 47 "/usr/src/lib/libc/../../include/string.h"
  2237.  
  2238. #ifndef _SIZE_T_DECLARED
  2239. typedef __size_t        size_t;
  2240. #define _SIZE_T_DECLARED
  2241. #endif
  2242. # 52 "/usr/src/lib/libc/../../include/string.h"
  2243.  
  2244. __BEGIN_DECLS
  2245. #if __XSI_VISIBLE >= 600
  2246. void    *memccpy(void * __restrict, const void * __restrict, int, size_t);
  2247. #endif
  2248. # 57 "/usr/src/lib/libc/../../include/string.h"
  2249. void    *memchr(const void *, int, size_t) __pure;
  2250. #if __BSD_VISIBLE
  2251. void    *memrchr(const void *, int, size_t) __pure;
  2252. #endif
  2253. # 61 "/usr/src/lib/libc/../../include/string.h"
  2254. int      memcmp(const void *, const void *, size_t) __pure;
  2255. void    *memcpy(void * __restrict, const void * __restrict, size_t);
  2256. #if __BSD_VISIBLE
  2257. void    *memmem(const void *, size_t, const void *, size_t) __pure;
  2258. #endif
  2259. # 66 "/usr/src/lib/libc/../../include/string.h"
  2260. void    *memmove(void *, const void *, size_t);
  2261. void    *memset(void *, int, size_t);
  2262. #if __POSIX_VISIBLE >= 200809
  2263. char    *stpcpy(char * __restrict, const char * __restrict);
  2264. char    *stpncpy(char * __restrict, const char * __restrict, size_t);
  2265. #endif
  2266. # 72 "/usr/src/lib/libc/../../include/string.h"
  2267. #if __BSD_VISIBLE
  2268. char    *strcasestr(const char *, const char *) __pure;
  2269. #endif
  2270. # 75 "/usr/src/lib/libc/../../include/string.h"
  2271. char    *strcat(char * __restrict, const char * __restrict);
  2272. char    *strchr(const char *, int) __pure;
  2273. #if __BSD_VISIBLE
  2274. char    *strchrnul(const char*, int) __pure;
  2275. #endif
  2276. # 80 "/usr/src/lib/libc/../../include/string.h"
  2277. int      strcmp(const char *, const char *) __pure;
  2278. int      strcoll(const char *, const char *);
  2279. char    *strcpy(char * __restrict, const char * __restrict);
  2280. size_t   strcspn(const char *, const char *) __pure;
  2281. #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
  2282. char    *strdup(const char *) __malloc_like;
  2283. #endif
  2284. # 87 "/usr/src/lib/libc/../../include/string.h"
  2285. char    *strerror(int);
  2286. #if __POSIX_VISIBLE >= 200112
  2287. int      strerror_r(int, char *, size_t);
  2288. #endif
  2289. # 91 "/usr/src/lib/libc/../../include/string.h"
  2290. #if __BSD_VISIBLE
  2291. size_t   strlcat(char * __restrict, const char * __restrict, size_t);
  2292. size_t   strlcpy(char * __restrict, const char * __restrict, size_t);
  2293. #endif
  2294. # 95 "/usr/src/lib/libc/../../include/string.h"
  2295. size_t   strlen(const char *) __pure;
  2296. #if __BSD_VISIBLE
  2297. void     strmode(int, char *);
  2298. #endif
  2299. # 99 "/usr/src/lib/libc/../../include/string.h"
  2300. char    *strncat(char * __restrict, const char * __restrict, size_t);
  2301. int      strncmp(const char *, const char *, size_t) __pure;
  2302. char    *strncpy(char * __restrict, const char * __restrict, size_t);
  2303. #if __POSIX_VISIBLE >= 200809
  2304. char    *strndup(const char *, size_t) __malloc_like;
  2305. size_t   strnlen(const char *, size_t) __pure;
  2306. #endif
  2307. # 106 "/usr/src/lib/libc/../../include/string.h"
  2308. #if __BSD_VISIBLE
  2309. char    *strnstr(const char *, const char *, size_t) __pure;
  2310. #endif
  2311. # 109 "/usr/src/lib/libc/../../include/string.h"
  2312. char    *strpbrk(const char *, const char *) __pure;
  2313. char    *strrchr(const char *, int) __pure;
  2314. #if __BSD_VISIBLE
  2315. char    *strsep(char **, const char *);
  2316. #endif
  2317. # 114 "/usr/src/lib/libc/../../include/string.h"
  2318. #if __POSIX_VISIBLE >= 200809
  2319. char    *strsignal(int);
  2320. #endif
  2321. # 117 "/usr/src/lib/libc/../../include/string.h"
  2322. size_t   strspn(const char *, const char *) __pure;
  2323. char    *strstr(const char *, const char *) __pure;
  2324. char    *strtok(char * __restrict, const char * __restrict);
  2325. #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500
  2326. char    *strtok_r(char *, const char *, char **);
  2327. #endif
  2328. # 123 "/usr/src/lib/libc/../../include/string.h"
  2329. size_t   strxfrm(char * __restrict, const char * __restrict, size_t);
  2330. #if __BSD_VISIBLE
  2331.  
  2332. #ifndef _SWAB_DECLARED
  2333. #define _SWAB_DECLARED
  2334.  
  2335. #ifndef _SSIZE_T_DECLARED
  2336. typedef __ssize_t       ssize_t;
  2337. #define _SSIZE_T_DECLARED
  2338. #endif /* _SIZE_T_DECLARED */
  2339. # 133 "/usr/src/lib/libc/../../include/string.h"
  2340.  
  2341. void     swab(const void * __restrict, void * __restrict, ssize_t);
  2342. #endif /* _SWAB_DECLARED */
  2343. # 136 "/usr/src/lib/libc/../../include/string.h"
  2344.  
  2345. #endif /* __BSD_VISIBLE */
  2346. # 138 "/usr/src/lib/libc/../../include/string.h"
  2347.  
  2348. #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
  2349. #if 0 /* expanded by -frewrite-includes */
  2350. #include <xlocale/_string.h>
  2351. #endif /* expanded by -frewrite-includes */
  2352. # 140 "/usr/src/lib/libc/../../include/string.h"
  2353. # 1 "/usr/src/lib/libc/../../include/xlocale/_string.h" 1
  2354. /*-
  2355.  * Copyright (c) 2011, 2012 The FreeBSD Foundation
  2356.  * All rights reserved.
  2357.  *
  2358.  * Redistribution and use in source and binary forms, with or without
  2359.  * modification, are permitted provided that the following conditions
  2360.  * are met:
  2361.  * 1. Redistributions of source code must retain the above copyright
  2362.  *    notice, this list of conditions and the following disclaimer.
  2363.  * 2. Redistributions in binary form must reproduce the above copyright
  2364.  *    notice, this list of conditions and the following disclaimer in the
  2365.  *    documentation and/or other materials provided with the distribution.
  2366.  *
  2367.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2368.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2369.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2370.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2371.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2372.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2373.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2374.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2375.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2376.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2377.  * SUCH DAMAGE.
  2378.  *
  2379.  * $FreeBSD: head/include/xlocale/_string.h 266865 2014-05-30 01:09:07Z pfg $
  2380.  */
  2381.  
  2382. #ifndef _LOCALE_T_DEFINED
  2383. #define _LOCALE_T_DEFINED
  2384. typedef struct  _xlocale *locale_t;
  2385. #endif
  2386. # 33 "/usr/src/lib/libc/../../include/xlocale/_string.h"
  2387.  
  2388. /*
  2389.  * This file is included from both string.h and xlocale.h.  We need to expose
  2390.  * the declarations unconditionally if we are included from xlocale.h, but only
  2391.  * if we are in POSIX2008 mode if included from string.h.
  2392.  */
  2393.  
  2394. #ifndef _XLOCALE_STRING1_H
  2395. #define _XLOCALE_STRING1_H
  2396.  
  2397. /*
  2398.  * POSIX2008 functions
  2399.  */
  2400. int      strcoll_l(const char *, const char *, locale_t);
  2401. size_t   strxfrm_l(char *, const char *, size_t, locale_t);
  2402. #endif /* _XLOCALE_STRING1_H */
  2403. # 49 "/usr/src/lib/libc/../../include/xlocale/_string.h"
  2404.  
  2405. /*
  2406.  * xlocale extensions
  2407.  */
  2408. #ifdef _XLOCALE_H_
  2409. #ifndef _XLOCALE_STRING2_H
  2410. #define _XLOCALE_STRING2_H
  2411. char    *strcasestr_l(const char *, const char *, locale_t);
  2412.  
  2413. #endif /* _XLOCALE_STRING2_H */
  2414. # 59 "/usr/src/lib/libc/../../include/xlocale/_string.h"
  2415. #endif /* _XLOCALE_H_ */
  2416. # 60 "/usr/src/lib/libc/../../include/xlocale/_string.h"
  2417. # 141 "/usr/src/lib/libc/../../include/string.h" 2
  2418. #endif
  2419. # 142 "/usr/src/lib/libc/../../include/string.h"
  2420. __END_DECLS
  2421.  
  2422. #endif /* _STRING_H_ */
  2423. # 145 "/usr/src/lib/libc/../../include/string.h"
  2424. # 63 "/usr/src/lib/libc/gen/fnmatch.c" 2
  2425. #if 0 /* expanded by -frewrite-includes */
  2426. #include <wchar.h>
  2427. #endif /* expanded by -frewrite-includes */
  2428. # 63 "/usr/src/lib/libc/gen/fnmatch.c"
  2429. # 1 "/usr/src/lib/libc/../../include/wchar.h" 1
  2430. /*-
  2431.  * Copyright (c)1999 Citrus Project,
  2432.  * All rights reserved.
  2433.  *
  2434.  * Redistribution and use in source and binary forms, with or without
  2435.  * modification, are permitted provided that the following conditions
  2436.  * are met:
  2437.  * 1. Redistributions of source code must retain the above copyright
  2438.  *    notice, this list of conditions and the following disclaimer.
  2439.  * 2. Redistributions in binary form must reproduce the above copyright
  2440.  *    notice, this list of conditions and the following disclaimer in the
  2441.  *    documentation and/or other materials provided with the distribution.
  2442.  *
  2443.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2444.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2445.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2446.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2447.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2448.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2449.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2450.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2451.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2452.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2453.  * SUCH DAMAGE.
  2454.  *
  2455.  * $FreeBSD: head/include/wchar.h 265878 2014-05-11 13:48:21Z jilles $
  2456.  */
  2457.  
  2458. /*-
  2459.  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
  2460.  * All rights reserved.
  2461.  *
  2462.  * This code is derived from software contributed to The NetBSD Foundation
  2463.  * by Julian Coleman.
  2464.  *
  2465.  * Redistribution and use in source and binary forms, with or without
  2466.  * modification, are permitted provided that the following conditions
  2467.  * are met:
  2468.  * 1. Redistributions of source code must retain the above copyright
  2469.  *    notice, this list of conditions and the following disclaimer.
  2470.  * 2. Redistributions in binary form must reproduce the above copyright
  2471.  *    notice, this list of conditions and the following disclaimer in the
  2472.  *    documentation and/or other materials provided with the distribution.
  2473.  *
  2474.  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  2475.  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  2476.  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  2477.  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  2478.  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  2479.  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  2480.  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  2481.  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  2482.  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  2483.  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  2484.  * POSSIBILITY OF SUCH DAMAGE.
  2485.  *
  2486.  *      $NetBSD: wchar.h,v 1.8 2000/12/22 05:31:42 itojun Exp $
  2487.  */
  2488.  
  2489. #ifndef _WCHAR_H_
  2490. #define _WCHAR_H_
  2491.  
  2492. #if 0 /* expanded by -frewrite-includes */
  2493. #include <sys/cdefs.h>
  2494. #endif /* expanded by -frewrite-includes */
  2495. # 63 "/usr/src/lib/libc/../../include/wchar.h"
  2496. # 64 "/usr/src/lib/libc/../../include/wchar.h"
  2497. #if 0 /* expanded by -frewrite-includes */
  2498. #include <sys/_null.h>
  2499. #endif /* expanded by -frewrite-includes */
  2500. # 64 "/usr/src/lib/libc/../../include/wchar.h"
  2501. # 65 "/usr/src/lib/libc/../../include/wchar.h"
  2502. #if 0 /* expanded by -frewrite-includes */
  2503. #include <sys/_types.h>
  2504. #endif /* expanded by -frewrite-includes */
  2505. # 65 "/usr/src/lib/libc/../../include/wchar.h"
  2506. # 66 "/usr/src/lib/libc/../../include/wchar.h"
  2507. #if 0 /* expanded by -frewrite-includes */
  2508. #include <machine/_limits.h>
  2509. #endif /* expanded by -frewrite-includes */
  2510. # 66 "/usr/src/lib/libc/../../include/wchar.h"
  2511. # 1 "/usr/obj/usr/src/lib32/usr/include/machine/_limits.h" 1 3
  2512. /*-
  2513.  * This file is in the public domain.
  2514.  */
  2515. /* $FreeBSD: head/sys/i386/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */
  2516.  
  2517. #if 0 /* expanded by -frewrite-includes */
  2518. #include <x86/_limits.h>
  2519. #endif /* expanded by -frewrite-includes */
  2520. # 6 "/usr/obj/usr/src/lib32/usr/include/machine/_limits.h" 3
  2521. # 7 "/usr/obj/usr/src/lib32/usr/include/machine/_limits.h" 3
  2522. # 67 "/usr/src/lib/libc/../../include/wchar.h" 2
  2523. #if 0 /* expanded by -frewrite-includes */
  2524. #include <_ctype.h>
  2525. #endif /* expanded by -frewrite-includes */
  2526. # 67 "/usr/src/lib/libc/../../include/wchar.h"
  2527. # 1 "/usr/src/lib/libc/../../include/_ctype.h" 1
  2528. /*
  2529.  * Copyright (c) 1989, 1993
  2530.  *      The Regents of the University of California.  All rights reserved.
  2531.  * (c) UNIX System Laboratories, Inc.
  2532.  * All or some portions of this file are derived from material licensed
  2533.  * to the University of California by American Telephone and Telegraph
  2534.  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  2535.  * the permission of UNIX System Laboratories, Inc.
  2536.  *
  2537.  * This code is derived from software contributed to Berkeley by
  2538.  * Paul Borman at Krystal Technologies.
  2539.  *
  2540.  * Redistribution and use in source and binary forms, with or without
  2541.  * modification, are permitted provided that the following conditions
  2542.  * are met:
  2543.  * 1. Redistributions of source code must retain the above copyright
  2544.  *    notice, this list of conditions and the following disclaimer.
  2545.  * 2. Redistributions in binary form must reproduce the above copyright
  2546.  *    notice, this list of conditions and the following disclaimer in the
  2547.  *    documentation and/or other materials provided with the distribution.
  2548.  * 3. Neither the name of the University nor the names of its contributors
  2549.  *    may be used to endorse or promote products derived from this software
  2550.  *    without specific prior written permission.
  2551.  *
  2552.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2553.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2554.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2555.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2556.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2557.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2558.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2559.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2560.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2561.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2562.  * SUCH DAMAGE.
  2563.  *
  2564.  * From @(#)ctype.h     8.4 (Berkeley) 1/21/94
  2565.  * From FreeBSD: src/include/ctype.h,v 1.27 2004/06/23 07:11:39 tjr Exp
  2566.  * $FreeBSD: head/include/_ctype.h 290494 2015-11-07 12:43:35Z bapt $
  2567.  */
  2568.  
  2569. #ifndef __CTYPE_H_
  2570. #define __CTYPE_H_
  2571.  
  2572. #if 0 /* expanded by -frewrite-includes */
  2573. #include <sys/cdefs.h>
  2574. #endif /* expanded by -frewrite-includes */
  2575. # 45 "/usr/src/lib/libc/../../include/_ctype.h"
  2576. # 46 "/usr/src/lib/libc/../../include/_ctype.h"
  2577. #if 0 /* expanded by -frewrite-includes */
  2578. #include <sys/_types.h>
  2579. #endif /* expanded by -frewrite-includes */
  2580. # 46 "/usr/src/lib/libc/../../include/_ctype.h"
  2581. # 47 "/usr/src/lib/libc/../../include/_ctype.h"
  2582.  
  2583. #define _CTYPE_A        0x00000100L             /* Alpha */
  2584. #define _CTYPE_C        0x00000200L             /* Control */
  2585. #define _CTYPE_D        0x00000400L             /* Digit */
  2586. #define _CTYPE_G        0x00000800L             /* Graph */
  2587. #define _CTYPE_L        0x00001000L             /* Lower */
  2588. #define _CTYPE_P        0x00002000L             /* Punct */
  2589. #define _CTYPE_S        0x00004000L             /* Space */
  2590. #define _CTYPE_U        0x00008000L             /* Upper */
  2591. #define _CTYPE_X        0x00010000L             /* X digit */
  2592. #define _CTYPE_B        0x00020000L             /* Blank */
  2593. #define _CTYPE_R        0x00040000L             /* Print */
  2594. #define _CTYPE_I        0x00080000L             /* Ideogram */
  2595. #define _CTYPE_T        0x00100000L             /* Special */
  2596. #define _CTYPE_Q        0x00200000L             /* Phonogram */
  2597. #define _CTYPE_N        0x00400000L             /* Number (superset of digit) */
  2598. #define _CTYPE_SW0      0x20000000L             /* 0 width character */
  2599. #define _CTYPE_SW1      0x40000000L             /* 1 width character */
  2600. #define _CTYPE_SW2      0x80000000L             /* 2 width character */
  2601. #define _CTYPE_SW3      0xc0000000L             /* 3 width character */
  2602. #define _CTYPE_SWM      0xe0000000L             /* Mask for screen width data */
  2603. #define _CTYPE_SWS      30                      /* Bits to shift to get width */
  2604.  
  2605. /* See comments in <sys/_types.h> about __ct_rune_t. */
  2606. __BEGIN_DECLS
  2607. unsigned long   ___runetype(__ct_rune_t) __pure;
  2608. __ct_rune_t     ___tolower(__ct_rune_t) __pure;
  2609. __ct_rune_t     ___toupper(__ct_rune_t) __pure;
  2610. __END_DECLS
  2611.  
  2612. /*
  2613.  * _EXTERNALIZE_CTYPE_INLINES_ is defined in locale/nomacros.c to tell us
  2614.  * to generate code for extern versions of all our inline functions.
  2615.  */
  2616. #ifdef _EXTERNALIZE_CTYPE_INLINES_
  2617. #define _USE_CTYPE_INLINE_
  2618. #define static
  2619. #define __inline
  2620. #endif
  2621. # 86 "/usr/src/lib/libc/../../include/_ctype.h"
  2622.  
  2623. extern int __mb_sb_limit;
  2624.  
  2625. /*
  2626.  * Use inline functions if we are allowed to and the compiler supports them.
  2627.  */
  2628. #if !defined(_DONT_USE_CTYPE_INLINE_) && \
  2629.     (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
  2630.  
  2631. #if 0 /* expanded by -frewrite-includes */
  2632. #include <runetype.h>
  2633. #endif /* expanded by -frewrite-includes */
  2634. # 95 "/usr/src/lib/libc/../../include/_ctype.h"
  2635. # 1 "/usr/src/lib/libc/../../include/runetype.h" 1
  2636. /*-
  2637.  * Copyright (c) 1993
  2638.  *      The Regents of the University of California.  All rights reserved.
  2639.  *
  2640.  * This code is derived from software contributed to Berkeley by
  2641.  * Paul Borman at Krystal Technologies.
  2642.  *
  2643.  * Redistribution and use in source and binary forms, with or without
  2644.  * modification, are permitted provided that the following conditions
  2645.  * are met:
  2646.  * 1. Redistributions of source code must retain the above copyright
  2647.  *    notice, this list of conditions and the following disclaimer.
  2648.  * 2. Redistributions in binary form must reproduce the above copyright
  2649.  *    notice, this list of conditions and the following disclaimer in the
  2650.  *    documentation and/or other materials provided with the distribution.
  2651.  * 3. Neither the name of the University nor the names of its contributors
  2652.  *    may be used to endorse or promote products derived from this software
  2653.  *    without specific prior written permission.
  2654.  *
  2655.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2656.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2657.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2658.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2659.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2660.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2661.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2662.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2663.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2664.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2665.  * SUCH DAMAGE.
  2666.  *
  2667.  *      @(#)runetype.h  8.1 (Berkeley) 6/2/93
  2668.  * $FreeBSD: head/include/runetype.h 232620 2012-03-06 20:15:23Z dim $
  2669.  */
  2670.  
  2671. #ifndef _RUNETYPE_H_
  2672. #define _RUNETYPE_H_
  2673.  
  2674. #if 0 /* expanded by -frewrite-includes */
  2675. #include <sys/cdefs.h>
  2676. #endif /* expanded by -frewrite-includes */
  2677. # 39 "/usr/src/lib/libc/../../include/runetype.h"
  2678. # 40 "/usr/src/lib/libc/../../include/runetype.h"
  2679. #if 0 /* expanded by -frewrite-includes */
  2680. #include <sys/_types.h>
  2681. #endif /* expanded by -frewrite-includes */
  2682. # 40 "/usr/src/lib/libc/../../include/runetype.h"
  2683. # 41 "/usr/src/lib/libc/../../include/runetype.h"
  2684.  
  2685. #define _CACHED_RUNES   (1 <<8 )        /* Must be a power of 2 */
  2686. #define _CRMASK         (~(_CACHED_RUNES - 1))
  2687.  
  2688. /*
  2689.  * The lower 8 bits of runetype[] contain the digit value of the rune.
  2690.  */
  2691. typedef struct {
  2692.         __rune_t        __min;          /* First rune of the range */
  2693.         __rune_t        __max;          /* Last rune (inclusive) of the range */
  2694.         __rune_t        __map;          /* What first maps to in maps */
  2695.         unsigned long   *__types;       /* Array of types in range */
  2696. } _RuneEntry;
  2697.  
  2698. typedef struct {
  2699.         int             __nranges;      /* Number of ranges stored */
  2700.         _RuneEntry      *__ranges;      /* Pointer to the ranges */
  2701. } _RuneRange;
  2702.  
  2703. typedef struct {
  2704.         char            __magic[8];     /* Magic saying what version we are */
  2705.         char            __encoding[32]; /* ASCII name of this encoding */
  2706.  
  2707.         __rune_t        (*__sgetrune)(const char *, __size_t, char const **);
  2708.         int             (*__sputrune)(__rune_t, char *, __size_t, char **);
  2709.         __rune_t        __invalid_rune;
  2710.  
  2711.         unsigned long   __runetype[_CACHED_RUNES];
  2712.         __rune_t        __maplower[_CACHED_RUNES];
  2713.         __rune_t        __mapupper[_CACHED_RUNES];
  2714.  
  2715.         /*
  2716.          * The following are to deal with Runes larger than _CACHED_RUNES - 1.
  2717.          * Their data is actually contiguous with this structure so as to make
  2718.          * it easier to read/write from/to disk.
  2719.          */
  2720.         _RuneRange      __runetype_ext;
  2721.         _RuneRange      __maplower_ext;
  2722.         _RuneRange      __mapupper_ext;
  2723.  
  2724.         void            *__variable;    /* Data which depends on the encoding */
  2725.         int             __variable_len; /* how long that data is */
  2726. } _RuneLocale;
  2727.  
  2728. #define _RUNE_MAGIC_1   "RuneMagi"      /* Indicates version 0 of RuneLocale */
  2729. __BEGIN_DECLS
  2730. extern const _RuneLocale _DefaultRuneLocale;
  2731. extern const _RuneLocale *_CurrentRuneLocale;
  2732. #if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL)
  2733. extern const _RuneLocale *__getCurrentRuneLocale(void);
  2734. #else
  2735. # 92 "/usr/src/lib/libc/../../include/runetype.h"
  2736. extern _Thread_local const _RuneLocale *_ThreadRuneLocale;
  2737. static __inline const _RuneLocale *__getCurrentRuneLocale(void)
  2738. {
  2739.  
  2740.         if (_ThreadRuneLocale)
  2741.                 return _ThreadRuneLocale;
  2742.         if (_CurrentRuneLocale)
  2743.                 return _CurrentRuneLocale;
  2744.         return &_DefaultRuneLocale;
  2745. }
  2746. #endif /* __NO_TLS || __RUNETYPE_INTERNAL */
  2747. # 103 "/usr/src/lib/libc/../../include/runetype.h"
  2748. #define _CurrentRuneLocale (__getCurrentRuneLocale())
  2749. __END_DECLS
  2750.  
  2751. #endif  /* !_RUNETYPE_H_ */
  2752. # 107 "/usr/src/lib/libc/../../include/runetype.h"
  2753. # 96 "/usr/src/lib/libc/../../include/_ctype.h" 2
  2754.  
  2755. static __inline int
  2756. __maskrune(__ct_rune_t _c, unsigned long _f)
  2757. {
  2758.         return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) :
  2759.                 _CurrentRuneLocale->__runetype[_c]) & _f;
  2760. }
  2761.  
  2762. static __inline int
  2763. __sbmaskrune(__ct_rune_t _c, unsigned long _f)
  2764. {
  2765.         return (_c < 0 || _c >= __mb_sb_limit) ? 0 :
  2766.                _CurrentRuneLocale->__runetype[_c] & _f;
  2767. }
  2768.  
  2769. static __inline int
  2770. __istype(__ct_rune_t _c, unsigned long _f)
  2771. {
  2772.         return (!!__maskrune(_c, _f));
  2773. }
  2774.  
  2775. static __inline int
  2776. __sbistype(__ct_rune_t _c, unsigned long _f)
  2777. {
  2778.         return (!!__sbmaskrune(_c, _f));
  2779. }
  2780.  
  2781. static __inline int
  2782. __isctype(__ct_rune_t _c, unsigned long _f)
  2783. {
  2784.         return (_c < 0 || _c >= 128) ? 0 :
  2785.                !!(_DefaultRuneLocale.__runetype[_c] & _f);
  2786. }
  2787.  
  2788. static __inline __ct_rune_t
  2789. __toupper(__ct_rune_t _c)
  2790. {
  2791.         return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) :
  2792.                _CurrentRuneLocale->__mapupper[_c];
  2793. }
  2794.  
  2795. static __inline __ct_rune_t
  2796. __sbtoupper(__ct_rune_t _c)
  2797. {
  2798.         return (_c < 0 || _c >= __mb_sb_limit) ? _c :
  2799.                _CurrentRuneLocale->__mapupper[_c];
  2800. }
  2801.  
  2802. static __inline __ct_rune_t
  2803. __tolower(__ct_rune_t _c)
  2804. {
  2805.         return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) :
  2806.                _CurrentRuneLocale->__maplower[_c];
  2807. }
  2808.  
  2809. static __inline __ct_rune_t
  2810. __sbtolower(__ct_rune_t _c)
  2811. {
  2812.         return (_c < 0 || _c >= __mb_sb_limit) ? _c :
  2813.                _CurrentRuneLocale->__maplower[_c];
  2814. }
  2815.  
  2816. static __inline int
  2817. __wcwidth(__ct_rune_t _c)
  2818. {
  2819.         unsigned int _x;
  2820.  
  2821.         if (_c == 0)
  2822.                 return (0);
  2823.         _x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R);
  2824.         if ((_x & _CTYPE_SWM) != 0)
  2825.                 return ((_x & _CTYPE_SWM) >> _CTYPE_SWS);
  2826.         return ((_x & _CTYPE_R) != 0 ? 1 : -1);
  2827. }
  2828.  
  2829. #else /* not using inlines */
  2830. # 172 "/usr/src/lib/libc/../../include/_ctype.h"
  2831.  
  2832. __BEGIN_DECLS
  2833. int             __maskrune(__ct_rune_t, unsigned long);
  2834. int             __sbmaskrune(__ct_rune_t, unsigned long);
  2835. int             __istype(__ct_rune_t, unsigned long);
  2836. int             __sbistype(__ct_rune_t, unsigned long);
  2837. int             __isctype(__ct_rune_t, unsigned long);
  2838. __ct_rune_t     __toupper(__ct_rune_t);
  2839. __ct_rune_t     __sbtoupper(__ct_rune_t);
  2840. __ct_rune_t     __tolower(__ct_rune_t);
  2841. __ct_rune_t     __sbtolower(__ct_rune_t);
  2842. int             __wcwidth(__ct_rune_t);
  2843. __END_DECLS
  2844. #endif /* using inlines */
  2845. # 186 "/usr/src/lib/libc/../../include/_ctype.h"
  2846.  
  2847. #endif /* !__CTYPE_H_ */
  2848. # 188 "/usr/src/lib/libc/../../include/_ctype.h"
  2849. # 68 "/usr/src/lib/libc/../../include/wchar.h" 2
  2850.  
  2851. #ifndef _MBSTATE_T_DECLARED
  2852. typedef __mbstate_t     mbstate_t;
  2853. #define _MBSTATE_T_DECLARED
  2854. #endif
  2855. # 73 "/usr/src/lib/libc/../../include/wchar.h"
  2856.  
  2857. #ifndef _SIZE_T_DECLARED
  2858. typedef __size_t        size_t;
  2859. #define _SIZE_T_DECLARED
  2860. #endif
  2861. # 78 "/usr/src/lib/libc/../../include/wchar.h"
  2862.  
  2863. #ifndef __cplusplus
  2864. #ifndef _WCHAR_T_DECLARED
  2865. typedef ___wchar_t      wchar_t;
  2866. #define _WCHAR_T_DECLARED
  2867. #endif
  2868. # 84 "/usr/src/lib/libc/../../include/wchar.h"
  2869. #endif
  2870. # 85 "/usr/src/lib/libc/../../include/wchar.h"
  2871.  
  2872. #ifndef _WINT_T_DECLARED
  2873. typedef __wint_t        wint_t;
  2874. #define _WINT_T_DECLARED
  2875. #endif
  2876. # 90 "/usr/src/lib/libc/../../include/wchar.h"
  2877.  
  2878. #define WCHAR_MIN       __WCHAR_MIN
  2879. #define WCHAR_MAX       __WCHAR_MAX
  2880.  
  2881. #ifndef WEOF
  2882. #define WEOF    ((wint_t)-1)
  2883. #endif
  2884. # 97 "/usr/src/lib/libc/../../include/wchar.h"
  2885.  
  2886. #ifndef _STDFILE_DECLARED
  2887. #define _STDFILE_DECLARED
  2888. typedef struct __sFILE FILE;
  2889. #endif
  2890. # 102 "/usr/src/lib/libc/../../include/wchar.h"
  2891. struct tm;
  2892.  
  2893. __BEGIN_DECLS
  2894. wint_t  btowc(int);
  2895. wint_t  fgetwc(FILE *);
  2896. wchar_t *
  2897.         fgetws(wchar_t * __restrict, int, FILE * __restrict);
  2898. wint_t  fputwc(wchar_t, FILE *);
  2899. int     fputws(const wchar_t * __restrict, FILE * __restrict);
  2900. int     fwide(FILE *, int);
  2901. int     fwprintf(FILE * __restrict, const wchar_t * __restrict, ...);
  2902. int     fwscanf(FILE * __restrict, const wchar_t * __restrict, ...);
  2903. wint_t  getwc(FILE *);
  2904. wint_t  getwchar(void);
  2905. size_t  mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
  2906. size_t  mbrtowc(wchar_t * __restrict, const char * __restrict, size_t,
  2907.             mbstate_t * __restrict);
  2908. int     mbsinit(const mbstate_t *);
  2909. size_t  mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
  2910.             mbstate_t * __restrict);
  2911. wint_t  putwc(wchar_t, FILE *);
  2912. wint_t  putwchar(wchar_t);
  2913. int     swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
  2914.             ...);
  2915. int     swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...);
  2916. wint_t  ungetwc(wint_t, FILE *);
  2917. int     vfwprintf(FILE * __restrict, const wchar_t * __restrict,
  2918.             __va_list);
  2919. int     vswprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
  2920.             __va_list);
  2921. int     vwprintf(const wchar_t * __restrict, __va_list);
  2922. size_t  wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict);
  2923. wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict);
  2924. wchar_t *wcschr(const wchar_t *, wchar_t) __pure;
  2925. int     wcscmp(const wchar_t *, const wchar_t *) __pure;
  2926. int     wcscoll(const wchar_t *, const wchar_t *);
  2927. wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict);
  2928. size_t  wcscspn(const wchar_t *, const wchar_t *) __pure;
  2929. size_t  wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict,
  2930.             const struct tm * __restrict);
  2931. size_t  wcslen(const wchar_t *) __pure;
  2932. wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict,
  2933.             size_t);
  2934. int     wcsncmp(const wchar_t *, const wchar_t *, size_t) __pure;
  2935. wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t);
  2936. wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __pure;
  2937. wchar_t *wcsrchr(const wchar_t *, wchar_t) __pure;
  2938. size_t  wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
  2939.             mbstate_t * __restrict);
  2940. size_t  wcsspn(const wchar_t *, const wchar_t *) __pure;
  2941. wchar_t *wcsstr(const wchar_t * __restrict, const wchar_t * __restrict)
  2942.             __pure;
  2943. size_t  wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t);
  2944. int     wctob(wint_t);
  2945. double  wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
  2946. wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict,
  2947.             wchar_t ** __restrict);
  2948. long     wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int);
  2949. unsigned long
  2950.          wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int);
  2951. wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __pure;
  2952. int     wmemcmp(const wchar_t *, const wchar_t *, size_t) __pure;
  2953. wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
  2954. wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
  2955. wchar_t *wmemset(wchar_t *, wchar_t, size_t);
  2956. int     wprintf(const wchar_t * __restrict, ...);
  2957. int     wscanf(const wchar_t * __restrict, ...);
  2958.  
  2959. #ifndef _STDSTREAM_DECLARED
  2960. extern FILE *__stdinp;
  2961. extern FILE *__stdoutp;
  2962. extern FILE *__stderrp;
  2963. #define _STDSTREAM_DECLARED
  2964. #endif
  2965. # 176 "/usr/src/lib/libc/../../include/wchar.h"
  2966.  
  2967. #define getwc(fp)       fgetwc(fp)
  2968. #define getwchar()      fgetwc(__stdinp)
  2969. #define putwc(wc, fp)   fputwc(wc, fp)
  2970. #define putwchar(wc)    fputwc(wc, __stdoutp)
  2971.  
  2972. #if __ISO_C_VISIBLE >= 1999
  2973. int     vfwscanf(FILE * __restrict, const wchar_t * __restrict,
  2974.             __va_list);
  2975. int     vswscanf(const wchar_t * __restrict, const wchar_t * __restrict,
  2976.             __va_list);
  2977. int     vwscanf(const wchar_t * __restrict, __va_list);
  2978. float   wcstof(const wchar_t * __restrict, wchar_t ** __restrict);
  2979. long double
  2980.         wcstold(const wchar_t * __restrict, wchar_t ** __restrict);
  2981. #ifdef __LONG_LONG_SUPPORTED
  2982. /* LONGLONG */
  2983. long long
  2984.         wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int);
  2985. /* LONGLONG */
  2986. unsigned long long
  2987.          wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int);
  2988. #endif
  2989. # 199 "/usr/src/lib/libc/../../include/wchar.h"
  2990. #endif  /* __ISO_C_VISIBLE >= 1999 */
  2991. # 200 "/usr/src/lib/libc/../../include/wchar.h"
  2992.  
  2993. #if __XSI_VISIBLE
  2994. int     wcswidth(const wchar_t *, size_t);
  2995. int     wcwidth(wchar_t);
  2996. #define wcwidth(_c)     __wcwidth(_c)
  2997. #endif
  2998. # 206 "/usr/src/lib/libc/../../include/wchar.h"
  2999.  
  3000. #if __POSIX_VISIBLE >= 200809
  3001. size_t  mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
  3002.             size_t, mbstate_t * __restrict);
  3003. FILE    *open_wmemstream(wchar_t **, size_t *);
  3004. wchar_t *wcpcpy(wchar_t * __restrict, const wchar_t * __restrict);
  3005. wchar_t *wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
  3006. wchar_t *wcsdup(const wchar_t *) __malloc_like;
  3007. int     wcscasecmp(const wchar_t *, const wchar_t *);
  3008. int     wcsncasecmp(const wchar_t *, const wchar_t *, size_t n);
  3009. size_t  wcsnlen(const wchar_t *, size_t) __pure;
  3010. size_t  wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
  3011.             size_t, mbstate_t * __restrict);
  3012. #endif
  3013. # 220 "/usr/src/lib/libc/../../include/wchar.h"
  3014.  
  3015. #if __BSD_VISIBLE
  3016. wchar_t *fgetwln(FILE * __restrict, size_t * __restrict);
  3017. size_t  wcslcat(wchar_t *, const wchar_t *, size_t);
  3018. size_t  wcslcpy(wchar_t *, const wchar_t *, size_t);
  3019. #endif
  3020. # 226 "/usr/src/lib/libc/../../include/wchar.h"
  3021.  
  3022. #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
  3023. #if 0 /* expanded by -frewrite-includes */
  3024. #include <xlocale/_wchar.h>
  3025. #endif /* expanded by -frewrite-includes */
  3026. # 228 "/usr/src/lib/libc/../../include/wchar.h"
  3027. # 1 "/usr/src/lib/libc/../../include/xlocale/_wchar.h" 1
  3028. /*-
  3029.  * Copyright (c) 2011, 2012 The FreeBSD Foundation
  3030.  * All rights reserved.
  3031.  *
  3032.  * This software was developed by David Chisnall under sponsorship from
  3033.  * the FreeBSD Foundation.
  3034.  *
  3035.  * Redistribution and use in source and binary forms, with or without
  3036.  * modification, are permitted provided that the following conditions
  3037.  * are met:
  3038.  * 1. Redistributions of source code must retain the above copyright
  3039.  *    notice, this list of conditions and the following disclaimer.
  3040.  * 2. Redistributions in binary form must reproduce the above copyright
  3041.  *    notice, this list of conditions and the following disclaimer in the
  3042.  *    documentation and/or other materials provided with the distribution.
  3043.  *
  3044.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  3045.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3046.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3047.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  3048.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3049.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3050.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3051.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3052.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3053.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3054.  * SUCH DAMAGE.
  3055.  *
  3056.  * $FreeBSD: head/include/xlocale/_wchar.h 231673 2012-02-14 12:03:23Z theraven $
  3057.  */
  3058.  
  3059. #ifndef _LOCALE_T_DEFINED
  3060. #define _LOCALE_T_DEFINED
  3061. typedef struct  _xlocale *locale_t;
  3062. #endif
  3063. # 36 "/usr/src/lib/libc/../../include/xlocale/_wchar.h"
  3064.  
  3065. #ifndef _XLOCALE_WCHAR1_H
  3066. #define _XLOCALE_WCHAR1_H
  3067. int                      wcscasecmp_l(const wchar_t *, const wchar_t *,
  3068.                            locale_t);
  3069. int                      wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t,
  3070.                            locale_t);
  3071. int                      wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
  3072. size_t                   wcsxfrm_l(wchar_t * __restrict,
  3073.                            const wchar_t * __restrict, size_t, locale_t);
  3074.  
  3075. #endif /* _XLOCALE_WCHAR1_H */
  3076. # 48 "/usr/src/lib/libc/../../include/xlocale/_wchar.h"
  3077.  
  3078. /*
  3079.  * Only declare the non-POSIX functions if we're included from xlocale.h.
  3080.  */
  3081.  
  3082. #ifdef _XLOCALE_H_
  3083. #ifndef _XLOCALE_WCHAR2_H
  3084. #define _XLOCALE_WCHAR2_H
  3085.  
  3086. wint_t                   btowc_l(int, locale_t);
  3087. wint_t                   fgetwc_l(FILE *, locale_t);
  3088. wchar_t                 *fgetws_l(wchar_t * __restrict, int, FILE * __restrict,
  3089.                             locale_t);
  3090. wint_t                   fputwc_l(wchar_t, FILE *, locale_t);
  3091. int                      fputws_l(const wchar_t * __restrict, FILE * __restrict,
  3092.                            locale_t);
  3093. int                      fwprintf_l(FILE * __restrict, locale_t,
  3094.                             const wchar_t * __restrict, ...);
  3095. int                      fwscanf_l(FILE * __restrict, locale_t,
  3096.                             const wchar_t * __restrict, ...);
  3097. wint_t                   getwc_l(FILE *, locale_t);
  3098. wint_t                   getwchar_l(locale_t);
  3099. size_t                   mbrlen_l(const char * __restrict, size_t,
  3100.                            mbstate_t * __restrict, locale_t);
  3101. size_t                   mbrtowc_l(wchar_t * __restrict,
  3102.                             const char * __restrict, size_t,
  3103.                             mbstate_t * __restrict, locale_t);
  3104. int                      mbsinit_l(const mbstate_t *, locale_t);
  3105. size_t                   mbsrtowcs_l(wchar_t * __restrict,
  3106.                             const char ** __restrict, size_t,
  3107.                             mbstate_t * __restrict, locale_t);
  3108. wint_t                   putwc_l(wchar_t, FILE *, locale_t);
  3109. wint_t                   putwchar_l(wchar_t, locale_t);
  3110. int                      swprintf_l(wchar_t * __restrict, size_t n, locale_t,
  3111.                             const wchar_t * __restrict, ...);
  3112. int                      swscanf_l(const wchar_t * __restrict, locale_t,
  3113.                            const wchar_t * __restrict, ...);
  3114. wint_t                   ungetwc_l(wint_t, FILE *, locale_t);
  3115. int                      vfwprintf_l(FILE * __restrict, locale_t,
  3116.                             const wchar_t * __restrict, __va_list);
  3117. int                      vswprintf_l(wchar_t * __restrict, size_t n, locale_t,
  3118.                             const wchar_t * __restrict, __va_list);
  3119. int                      vwprintf_l(locale_t, const wchar_t * __restrict,
  3120.                             __va_list);
  3121. size_t                   wcrtomb_l(char * __restrict, wchar_t,
  3122.                             mbstate_t * __restrict, locale_t);
  3123. size_t                   wcsftime_l(wchar_t * __restrict, size_t,
  3124.                             const wchar_t * __restrict,
  3125.                             const struct tm * __restrict, locale_t);
  3126. size_t                   wcsrtombs_l(char * __restrict,
  3127.                             const wchar_t ** __restrict, size_t,
  3128.                             mbstate_t * __restrict, locale_t);
  3129. double                   wcstod_l(const wchar_t * __restrict,
  3130.                             wchar_t ** __restrict, locale_t);
  3131. long                     wcstol_l(const wchar_t * __restrict,
  3132.                             wchar_t ** __restrict, int, locale_t);
  3133. unsigned long            wcstoul_l(const wchar_t * __restrict,
  3134.                             wchar_t ** __restrict, int, locale_t);
  3135. int                      wcswidth_l(const wchar_t *, size_t, locale_t);
  3136. int                      wctob_l(wint_t, locale_t);
  3137. int                      wcwidth_l(wchar_t, locale_t);
  3138. int                      wprintf_l(locale_t, const wchar_t * __restrict, ...);
  3139. int                      wscanf_l(locale_t, const wchar_t * __restrict, ...);
  3140. int                      vfwscanf_l(FILE * __restrict, locale_t,
  3141.                             const wchar_t * __restrict, __va_list);
  3142. int                      vswscanf_l(const wchar_t * __restrict, locale_t,
  3143.                             const wchar_t *__restrict, __va_list);
  3144. int                      vwscanf_l(locale_t, const wchar_t * __restrict,
  3145.                             __va_list);
  3146. float                    wcstof_l(const wchar_t * __restrict,
  3147.                             wchar_t ** __restrict, locale_t);
  3148. long double              wcstold_l(const wchar_t * __restrict,
  3149.                             wchar_t ** __restrict, locale_t);
  3150. long long                wcstoll_l(const wchar_t * __restrict,
  3151.                             wchar_t ** __restrict, int, locale_t);
  3152. unsigned long long       wcstoull_l(const wchar_t * __restrict,
  3153.                             wchar_t ** __restrict, int, locale_t);
  3154. size_t                   mbsnrtowcs_l(wchar_t * __restrict,
  3155.                             const char ** __restrict, size_t, size_t,
  3156.                             mbstate_t * __restrict, locale_t);
  3157. size_t                   wcsnrtombs_l(char * __restrict,
  3158.                             const wchar_t ** __restrict, size_t, size_t,
  3159.                             mbstate_t * __restrict, locale_t);
  3160.  
  3161. #endif /* _XLOCALE_WCHAR_H */
  3162. # 133 "/usr/src/lib/libc/../../include/xlocale/_wchar.h"
  3163. #endif /* _XLOCALE_H_ */
  3164. # 134 "/usr/src/lib/libc/../../include/xlocale/_wchar.h"
  3165. # 229 "/usr/src/lib/libc/../../include/wchar.h" 2
  3166. #endif
  3167. # 230 "/usr/src/lib/libc/../../include/wchar.h"
  3168. __END_DECLS
  3169.  
  3170. #endif /* !_WCHAR_H_ */
  3171. # 233 "/usr/src/lib/libc/../../include/wchar.h"
  3172. # 64 "/usr/src/lib/libc/gen/fnmatch.c" 2
  3173. #if 0 /* expanded by -frewrite-includes */
  3174. #include <wctype.h>
  3175. #endif /* expanded by -frewrite-includes */
  3176. # 64 "/usr/src/lib/libc/gen/fnmatch.c"
  3177. # 1 "/usr/src/lib/libc/../../include/wctype.h" 1
  3178. /*-
  3179.  * Copyright (c)1999 Citrus Project,
  3180.  * All rights reserved.
  3181.  *
  3182.  * Redistribution and use in source and binary forms, with or without
  3183.  * modification, are permitted provided that the following conditions
  3184.  * are met:
  3185.  * 1. Redistributions of source code must retain the above copyright
  3186.  *    notice, this list of conditions and the following disclaimer.
  3187.  * 2. Redistributions in binary form must reproduce the above copyright
  3188.  *    notice, this list of conditions and the following disclaimer in the
  3189.  *    documentation and/or other materials provided with the distribution.
  3190.  *
  3191.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  3192.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3193.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3194.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  3195.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3196.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3197.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3198.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3199.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3200.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3201.  * SUCH DAMAGE.
  3202.  *
  3203.  *      citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp
  3204.  *      $NetBSD: wctype.h,v 1.3 2000/12/22 14:16:16 itojun Exp $
  3205.  * $FreeBSD: head/include/wctype.h 290494 2015-11-07 12:43:35Z bapt $
  3206.  */
  3207.  
  3208. #ifndef _WCTYPE_H_
  3209. #define _WCTYPE_H_
  3210.  
  3211. #if 0 /* expanded by -frewrite-includes */
  3212. #include <sys/cdefs.h>
  3213. #endif /* expanded by -frewrite-includes */
  3214. # 34 "/usr/src/lib/libc/../../include/wctype.h"
  3215. # 35 "/usr/src/lib/libc/../../include/wctype.h"
  3216. #if 0 /* expanded by -frewrite-includes */
  3217. #include <sys/_types.h>
  3218. #endif /* expanded by -frewrite-includes */
  3219. # 35 "/usr/src/lib/libc/../../include/wctype.h"
  3220. # 36 "/usr/src/lib/libc/../../include/wctype.h"
  3221.  
  3222. #if 0 /* expanded by -frewrite-includes */
  3223. #include <_ctype.h>
  3224. #endif /* expanded by -frewrite-includes */
  3225. # 37 "/usr/src/lib/libc/../../include/wctype.h"
  3226. # 38 "/usr/src/lib/libc/../../include/wctype.h"
  3227.  
  3228. #ifndef _WCTRANS_T
  3229. typedef int     wctrans_t;
  3230. #define _WCTRANS_T
  3231. #endif
  3232. # 43 "/usr/src/lib/libc/../../include/wctype.h"
  3233.  
  3234. #ifndef _WCTYPE_T
  3235. typedef unsigned long   wctype_t;
  3236. #define _WCTYPE_T
  3237. #endif
  3238. # 48 "/usr/src/lib/libc/../../include/wctype.h"
  3239.  
  3240. #ifndef _WINT_T_DECLARED
  3241. typedef __wint_t        wint_t;
  3242. #define _WINT_T_DECLARED
  3243. #endif
  3244. # 53 "/usr/src/lib/libc/../../include/wctype.h"
  3245.  
  3246. #ifndef WEOF
  3247. #define WEOF    ((wint_t)-1)
  3248. #endif
  3249. # 57 "/usr/src/lib/libc/../../include/wctype.h"
  3250.  
  3251. __BEGIN_DECLS
  3252. int     iswalnum(wint_t);
  3253. int     iswalpha(wint_t);
  3254. int     iswblank(wint_t);
  3255. int     iswcntrl(wint_t);
  3256. int     iswctype(wint_t, wctype_t);
  3257. int     iswdigit(wint_t);
  3258. int     iswgraph(wint_t);
  3259. int     iswlower(wint_t);
  3260. int     iswprint(wint_t);
  3261. int     iswpunct(wint_t);
  3262. int     iswspace(wint_t);
  3263. int     iswupper(wint_t);
  3264. int     iswxdigit(wint_t);
  3265. wint_t  towctrans(wint_t, wctrans_t);
  3266. wint_t  towlower(wint_t);
  3267. wint_t  towupper(wint_t);
  3268. wctrans_t
  3269.         wctrans(const char *);
  3270. wctype_t
  3271.         wctype(const char *);
  3272.  
  3273. #if __BSD_VISIBLE
  3274. wint_t  iswascii(wint_t);
  3275. wint_t  iswhexnumber(wint_t);
  3276. wint_t  iswideogram(wint_t);
  3277. wint_t  iswnumber(wint_t);
  3278. wint_t  iswphonogram(wint_t);
  3279. wint_t  iswrune(wint_t);
  3280. wint_t  iswspecial(wint_t);
  3281. wint_t  nextwctype(wint_t, wctype_t);
  3282. #endif
  3283. # 90 "/usr/src/lib/libc/../../include/wctype.h"
  3284.  
  3285. #if __POSIX_VISIBLE >= 200809
  3286. #define _XLOCALE_WCTYPES 1
  3287. #if 0 /* expanded by -frewrite-includes */
  3288. #include <xlocale/_ctype.h>
  3289. #endif /* expanded by -frewrite-includes */
  3290. # 93 "/usr/src/lib/libc/../../include/wctype.h"
  3291. # 1 "/usr/src/lib/libc/../../include/xlocale/_ctype.h" 1
  3292. /*-
  3293.  * Copyright (c) 2011 The FreeBSD Foundation
  3294.  * All rights reserved.
  3295.  *
  3296.  * This software was developed by David Chisnall under sponsorship from
  3297.  * the FreeBSD Foundation.
  3298.  *
  3299.  * Redistribution and use in source and binary forms, with or without
  3300.  * modification, are permitted provided that the following conditions
  3301.  * are met:
  3302.  * 1. Redistributions of source code must retain the above copyright
  3303.  *    notice, this list of conditions and the following disclaimer.
  3304.  * 2. Redistributions in binary form must reproduce the above copyright
  3305.  *    notice, this list of conditions and the following disclaimer in the
  3306.  *    documentation and/or other materials provided with the distribution.
  3307.  *
  3308.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  3309.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3310.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3311.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  3312.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3313.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3314.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3315.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3316.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3317.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3318.  * SUCH DAMAGE.
  3319.  *
  3320.  * $FreeBSD: head/include/xlocale/_ctype.h 290494 2015-11-07 12:43:35Z bapt $
  3321.  */
  3322.  
  3323.  
  3324. #if     (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \
  3325.         (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H))
  3326.  
  3327. #ifdef _XLOCALE_WCTYPES
  3328. #define _XLOCALE_WCTYPE_H
  3329. #else
  3330. # 39 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3331. #define _XLOCALE_CTYPE_H
  3332. #endif
  3333. # 41 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3334.  
  3335. #ifndef _LOCALE_T_DEFINED
  3336. #define _LOCALE_T_DEFINED
  3337. typedef struct  _xlocale *locale_t;
  3338. #endif
  3339. # 46 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3340.  
  3341. #ifndef _XLOCALE_RUN_FUNCTIONS_DEFINED
  3342. #define _XLOCALE_RUN_FUNCTIONS_DEFINED 1
  3343. unsigned long    ___runetype_l(__ct_rune_t, locale_t) __pure;
  3344. __ct_rune_t      ___tolower_l(__ct_rune_t, locale_t) __pure;
  3345. __ct_rune_t      ___toupper_l(__ct_rune_t, locale_t) __pure;
  3346. _RuneLocale     *__runes_for_locale(locale_t, int*);
  3347. #endif
  3348. # 54 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3349.  
  3350. #ifndef _XLOCALE_INLINE
  3351. #if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
  3352. /* GNU89 inline has nonstandard semantics. */
  3353. #define _XLOCALE_INLINE extern __inline
  3354. #else
  3355. # 60 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3356. /* Hack to work around people who define inline away */
  3357. #ifdef inline
  3358. #define _XLOCALE_INLINE static __inline
  3359. #else
  3360. # 64 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3361. /* Define with C++ / C99 compatible semantics */
  3362. #define _XLOCALE_INLINE inline
  3363. #endif
  3364. # 67 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3365. #endif
  3366. # 68 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3367. #endif /* _XLOCALE_INLINE */
  3368. # 69 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3369.  
  3370. #ifdef _XLOCALE_WCTYPES
  3371. _XLOCALE_INLINE int
  3372. __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc);
  3373. _XLOCALE_INLINE int
  3374. __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc);
  3375.  
  3376. _XLOCALE_INLINE int
  3377. __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc)
  3378. {
  3379.         int __limit;
  3380.         _RuneLocale *runes = __runes_for_locale(__loc, &__limit);
  3381.         return ((__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) :
  3382.                 runes->__runetype[__c]) & __f;
  3383. }
  3384.  
  3385. _XLOCALE_INLINE int
  3386. __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc)
  3387. {
  3388.         return (!!__maskrune_l(__c, __f, __loc));
  3389. }
  3390.  
  3391. #define XLOCALE_ISCTYPE(fname, cat) \
  3392.                 _XLOCALE_INLINE int isw##fname##_l(int, locale_t);\
  3393.                 _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\
  3394.                 { return __istype_l(__c, cat, __l); }
  3395. #else
  3396. # 96 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3397. _XLOCALE_INLINE int
  3398. __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc);
  3399. _XLOCALE_INLINE int
  3400. __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc);
  3401.  
  3402. _XLOCALE_INLINE int
  3403. __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc)
  3404. {
  3405.         int __limit;
  3406.         _RuneLocale *runes = __runes_for_locale(__loc, &__limit);
  3407.         return (__c < 0 || __c >= __limit) ? 0 :
  3408.                runes->__runetype[__c] & __f;
  3409. }
  3410.  
  3411. _XLOCALE_INLINE int
  3412. __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc)
  3413. {
  3414.         return (!!__sbmaskrune_l(__c, __f, __loc));
  3415. }
  3416.  
  3417. #define XLOCALE_ISCTYPE(__fname, __cat) \
  3418.                 _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \
  3419.                 _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\
  3420.                 { return __sbistype_l(__c, __cat, __l); }
  3421. #endif
  3422. # 121 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3423.  
  3424. XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D|_CTYPE_N)
  3425. XLOCALE_ISCTYPE(alpha, _CTYPE_A)
  3426. XLOCALE_ISCTYPE(blank, _CTYPE_B)
  3427. XLOCALE_ISCTYPE(cntrl, _CTYPE_C)
  3428. XLOCALE_ISCTYPE(digit, _CTYPE_D)
  3429. XLOCALE_ISCTYPE(graph, _CTYPE_G)
  3430. XLOCALE_ISCTYPE(hexnumber, _CTYPE_X)
  3431. XLOCALE_ISCTYPE(ideogram, _CTYPE_I)
  3432. XLOCALE_ISCTYPE(lower, _CTYPE_L)
  3433. XLOCALE_ISCTYPE(number, _CTYPE_D|_CTYPE_N)
  3434. XLOCALE_ISCTYPE(phonogram, _CTYPE_Q)
  3435. XLOCALE_ISCTYPE(print, _CTYPE_R)
  3436. XLOCALE_ISCTYPE(punct, _CTYPE_P)
  3437. XLOCALE_ISCTYPE(rune, 0xFFFFFF00L)
  3438. XLOCALE_ISCTYPE(space, _CTYPE_S)
  3439. XLOCALE_ISCTYPE(special, _CTYPE_T)
  3440. XLOCALE_ISCTYPE(upper, _CTYPE_U)
  3441. XLOCALE_ISCTYPE(xdigit, _CTYPE_X)
  3442. #undef XLOCALE_ISCTYPE
  3443.  
  3444. #ifdef _XLOCALE_WCTYPES
  3445. _XLOCALE_INLINE int towlower_l(int, locale_t);
  3446. _XLOCALE_INLINE int __wcwidth_l(__ct_rune_t, locale_t);
  3447. _XLOCALE_INLINE int towupper_l(int, locale_t);
  3448.  
  3449. _XLOCALE_INLINE int towlower_l(int __c, locale_t __l)
  3450. {
  3451.         int __limit;
  3452.         _RuneLocale *__runes = __runes_for_locale(__l, &__limit);
  3453.         return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) :
  3454.                __runes->__maplower[__c];
  3455. }
  3456. _XLOCALE_INLINE int towupper_l(int __c, locale_t __l)
  3457. {
  3458.         int __limit;
  3459.         _RuneLocale *__runes = __runes_for_locale(__l, &__limit);
  3460.         return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) :
  3461.                __runes->__mapupper[__c];
  3462. }
  3463. _XLOCALE_INLINE int
  3464. __wcwidth_l(__ct_rune_t _c, locale_t __l)
  3465. {
  3466.         unsigned int _x;
  3467.  
  3468.         if (_c == 0)
  3469.                 return (0);
  3470.         _x = (unsigned int)__maskrune_l(_c, _CTYPE_SWM|_CTYPE_R, __l);
  3471.         if ((_x & _CTYPE_SWM) != 0)
  3472.                 return ((_x & _CTYPE_SWM) >> _CTYPE_SWS);
  3473.         return ((_x & _CTYPE_R) != 0 ? 1 : -1);
  3474. }
  3475. int iswctype_l(wint_t __wc, wctype_t __charclass, locale_t __l);
  3476. wctype_t wctype_l(const char *property, locale_t __l);
  3477. wint_t towctrans_l(wint_t __wc, wctrans_t desc, locale_t __l);
  3478. wint_t nextwctype_l(wint_t __wc, wctype_t wct, locale_t __l);
  3479. wctrans_t wctrans_l(const char *__charclass, locale_t __l);
  3480. #undef _XLOCALE_WCTYPES
  3481. #else
  3482. # 180 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3483. _XLOCALE_INLINE int digittoint_l(int, locale_t);
  3484. _XLOCALE_INLINE int tolower_l(int, locale_t);
  3485. _XLOCALE_INLINE int toupper_l(int, locale_t);
  3486.  
  3487. _XLOCALE_INLINE int digittoint_l(int __c, locale_t __l)
  3488. { return __sbmaskrune_l((__c), 0xFF, __l); }
  3489.  
  3490. _XLOCALE_INLINE int tolower_l(int __c, locale_t __l)
  3491. {
  3492.         int __limit;
  3493.         _RuneLocale *__runes = __runes_for_locale(__l, &__limit);
  3494.         return (__c < 0 || __c >= __limit) ? __c :
  3495.                __runes->__maplower[__c];
  3496. }
  3497. _XLOCALE_INLINE int toupper_l(int __c, locale_t __l)
  3498. {
  3499.         int __limit;
  3500.         _RuneLocale *__runes = __runes_for_locale(__l, &__limit);
  3501.         return (__c < 0 || __c >= __limit) ? __c :
  3502.                __runes->__mapupper[__c];
  3503. }
  3504. #endif
  3505. # 202 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3506. #endif /* (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \
  3507.         (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) */
  3508. # 204 "/usr/src/lib/libc/../../include/xlocale/_ctype.h"
  3509. # 94 "/usr/src/lib/libc/../../include/wctype.h" 2
  3510. #endif /* __POSIX_VISIBLE >= 200809 */
  3511. # 95 "/usr/src/lib/libc/../../include/wctype.h"
  3512. __END_DECLS
  3513.  
  3514. #ifndef __cplusplus
  3515. #define iswalnum(wc)            __istype((wc), _CTYPE_A|_CTYPE_D|_CTYPE_N)
  3516. #define iswalpha(wc)            __istype((wc), _CTYPE_A)
  3517. #define iswblank(wc)            __istype((wc), _CTYPE_B)
  3518. #define iswcntrl(wc)            __istype((wc), _CTYPE_C)
  3519. #define iswctype(wc, charclass) __istype((wc), (charclass))
  3520. #define iswdigit(wc)            __istype((wc), _CTYPE_D)
  3521. #define iswgraph(wc)            __istype((wc), _CTYPE_G)
  3522. #define iswlower(wc)            __istype((wc), _CTYPE_L)
  3523. #define iswprint(wc)            __istype((wc), _CTYPE_R)
  3524. #define iswpunct(wc)            __istype((wc), _CTYPE_P)
  3525. #define iswspace(wc)            __istype((wc), _CTYPE_S)
  3526. #define iswupper(wc)            __istype((wc), _CTYPE_U)
  3527. #define iswxdigit(wc)           __istype((wc), _CTYPE_X)
  3528. #define towlower(wc)            __tolower(wc)
  3529. #define towupper(wc)            __toupper(wc)
  3530.  
  3531. #if __BSD_VISIBLE
  3532. #define iswascii(wc)            (((wc) & ~0x7F) == 0)
  3533. #define iswhexnumber(wc)        __istype((wc), _CTYPE_X) /* alias of iswxdigit */
  3534. #define iswideogram(wc)         __istype((wc), _CTYPE_I)
  3535. #define iswnumber(wc)           __istype((wc), _CTYPE_D|_CTYPE_N)
  3536. #define iswphonogram(wc)        __istype((wc), _CTYPE_Q)
  3537. #define iswrune(wc)             __istype((wc), 0xFFFFFF00L)
  3538. #define iswspecial(wc)          __istype((wc), _CTYPE_T)
  3539. #endif /* __BSD_VISIBLE */
  3540. # 123 "/usr/src/lib/libc/../../include/wctype.h"
  3541. #endif /* __cplusplus */
  3542. # 124 "/usr/src/lib/libc/../../include/wctype.h"
  3543.  
  3544. #endif          /* _WCTYPE_H_ */
  3545. # 126 "/usr/src/lib/libc/../../include/wctype.h"
  3546. # 65 "/usr/src/lib/libc/gen/fnmatch.c" 2
  3547.  
  3548. #if 0 /* expanded by -frewrite-includes */
  3549. #include "collate.h"
  3550. #endif /* expanded by -frewrite-includes */
  3551. # 66 "/usr/src/lib/libc/gen/fnmatch.c"
  3552. # 1 "/usr/src/lib/libc/locale/collate.h" 1
  3553. /*-
  3554.  * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
  3555.  * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
  3556.  *              at Electronni Visti IA, Kiev, Ukraine.
  3557.  *                      All rights reserved.
  3558.  *
  3559.  * Copyright (c) 2011 The FreeBSD Foundation
  3560.  * All rights reserved.
  3561.  * Portions of this software were developed by David Chisnall
  3562.  * under sponsorship from the FreeBSD Foundation.
  3563.  *
  3564.  * Redistribution and use in source and binary forms, with or without
  3565.  * modification, are permitted provided that the following conditions
  3566.  * are met:
  3567.  * 1. Redistributions of source code must retain the above copyright
  3568.  *    notice, this list of conditions and the following disclaimer.
  3569.  * 2. Redistributions in binary form must reproduce the above copyright
  3570.  *    notice, this list of conditions and the following disclaimer in the
  3571.  *    documentation and/or other materials provided with the distribution.
  3572.  *
  3573.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
  3574.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3575.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3576.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
  3577.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3578.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3579.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3580.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3581.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3582.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3583.  * SUCH DAMAGE.
  3584.  *
  3585.  * $FreeBSD: head/lib/libc/locale/collate.h 290494 2015-11-07 12:43:35Z bapt $
  3586.  */
  3587.  
  3588. #ifndef _COLLATE_H_
  3589. #define _COLLATE_H_
  3590.  
  3591. #if 0 /* expanded by -frewrite-includes */
  3592. #include <sys/cdefs.h>
  3593. #endif /* expanded by -frewrite-includes */
  3594. # 39 "/usr/src/lib/libc/locale/collate.h"
  3595. # 40 "/usr/src/lib/libc/locale/collate.h"
  3596. #if 0 /* expanded by -frewrite-includes */
  3597. #include <sys/types.h>
  3598. #endif /* expanded by -frewrite-includes */
  3599. # 40 "/usr/src/lib/libc/locale/collate.h"
  3600. # 1 "/usr/obj/usr/src/lib32/usr/include/sys/types.h" 1 3
  3601. /*-
  3602.  * Copyright (c) 1982, 1986, 1991, 1993, 1994
  3603.  *      The Regents of the University of California.  All rights reserved.
  3604.  * (c) UNIX System Laboratories, Inc.
  3605.  * All or some portions of this file are derived from material licensed
  3606.  * to the University of California by American Telephone and Telegraph
  3607.  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  3608.  * the permission of UNIX System Laboratories, Inc.
  3609.  *
  3610.  * Redistribution and use in source and binary forms, with or without
  3611.  * modification, are permitted provided that the following conditions
  3612.  * are met:
  3613.  * 1. Redistributions of source code must retain the above copyright
  3614.  *    notice, this list of conditions and the following disclaimer.
  3615.  * 2. Redistributions in binary form must reproduce the above copyright
  3616.  *    notice, this list of conditions and the following disclaimer in the
  3617.  *    documentation and/or other materials provided with the distribution.
  3618.  * 4. Neither the name of the University nor the names of its contributors
  3619.  *    may be used to endorse or promote products derived from this software
  3620.  *    without specific prior written permission.
  3621.  *
  3622.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  3623.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3624.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3625.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  3626.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3627.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3628.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3629.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3630.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3631.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3632.  * SUCH DAMAGE.
  3633.  *
  3634.  *      @(#)types.h     8.6 (Berkeley) 2/19/95
  3635.  * $FreeBSD: head/sys/sys/types.h 294883 2016-01-27 02:23:54Z jhibbits $
  3636.  */
  3637.  
  3638. #ifndef _SYS_TYPES_H_
  3639. #define _SYS_TYPES_H_
  3640.  
  3641. #if 0 /* expanded by -frewrite-includes */
  3642. #include <sys/cdefs.h>
  3643. #endif /* expanded by -frewrite-includes */
  3644. # 41 "/usr/obj/usr/src/lib32/usr/include/sys/types.h" 3
  3645. # 42 "/usr/obj/usr/src/lib32/usr/include/sys/types.h" 3
  3646.  
  3647. /* Machine type dependent parameters. */
  3648. #if 0 /* expanded by -frewrite-includes */
  3649. #include <machine/endian.h>
  3650. #endif /* expanded by -frewrite-includes */
  3651. # 44 "/usr/obj/usr/src/lib32/usr/include/sys/types.h" 3
  3652. # 1 "/usr/obj/usr/src/lib32/usr/include/machine/endian.h" 1 3
  3653. /*-
  3654.  * This file is in the public domain.
  3655.  */
  3656. /* $FreeBSD: head/sys/i386/include/endian.h 232266 2012-02-28 19:39:54Z tijl $ */
  3657.  
  3658. #if 0 /* expanded by -frewrite-includes */
  3659. #include <x86/endian.h>
  3660. #endif /* expanded by -frewrite-includes */
  3661. # 6 "/usr/obj/usr/src/lib32/usr/include/machine/endian.h" 3
  3662. # 1 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 1 3
  3663. /*-
  3664.  * Copyright (c) 1987, 1991 Regents of the University of California.
  3665.  * All rights reserved.
  3666.  *
  3667.  * Redistribution and use in source and binary forms, with or without
  3668.  * modification, are permitted provided that the following conditions
  3669.  * are met:
  3670.  * 1. Redistributions of source code must retain the above copyright
  3671.  *    notice, this list of conditions and the following disclaimer.
  3672.  * 2. Redistributions in binary form must reproduce the above copyright
  3673.  *    notice, this list of conditions and the following disclaimer in the
  3674.  *    documentation and/or other materials provided with the distribution.
  3675.  * 4. Neither the name of the University nor the names of its contributors
  3676.  *    may be used to endorse or promote products derived from this software
  3677.  *    without specific prior written permission.
  3678.  *
  3679.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  3680.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3681.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3682.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  3683.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3684.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3685.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3686.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3687.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3688.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3689.  * SUCH DAMAGE.
  3690.  *
  3691.  *      @(#)endian.h    7.8 (Berkeley) 4/3/91
  3692.  * $FreeBSD: head/sys/x86/include/endian.h 233684 2012-03-29 23:31:48Z dim $
  3693.  */
  3694.  
  3695. #ifndef _MACHINE_ENDIAN_H_
  3696. #define _MACHINE_ENDIAN_H_
  3697.  
  3698. #if 0 /* expanded by -frewrite-includes */
  3699. #include <sys/cdefs.h>
  3700. #endif /* expanded by -frewrite-includes */
  3701. # 36 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3702. # 37 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3703. #if 0 /* expanded by -frewrite-includes */
  3704. #include <sys/_types.h>
  3705. #endif /* expanded by -frewrite-includes */
  3706. # 37 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3707. # 38 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3708.  
  3709. /*
  3710.  * Define the order of 32-bit words in 64-bit words.
  3711.  */
  3712. #define _QUAD_HIGHWORD 1
  3713. #define _QUAD_LOWWORD 0
  3714.  
  3715. /*
  3716.  * Definitions for byte order, according to byte significance from low
  3717.  * address to high.
  3718.  */
  3719. #define _LITTLE_ENDIAN  1234    /* LSB first: i386, vax */
  3720. #define _BIG_ENDIAN     4321    /* MSB first: 68000, ibm, net */
  3721. #define _PDP_ENDIAN     3412    /* LSB first in word, MSW first in long */
  3722.  
  3723. #define _BYTE_ORDER     _LITTLE_ENDIAN
  3724.  
  3725. /*
  3726.  * Deprecated variants that don't have enough underscores to be useful in more
  3727.  * strict namespaces.
  3728.  */
  3729. #if __BSD_VISIBLE
  3730. #define LITTLE_ENDIAN   _LITTLE_ENDIAN
  3731. #define BIG_ENDIAN      _BIG_ENDIAN
  3732. #define PDP_ENDIAN      _PDP_ENDIAN
  3733. #define BYTE_ORDER      _BYTE_ORDER
  3734. #endif
  3735. # 65 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3736.  
  3737. #define __bswap16_gen(x)        (__uint16_t)((x) << 8 | (x) >> 8)
  3738. #define __bswap32_gen(x)                \
  3739.         (((__uint32_t)__bswap16((x) & 0xffff) << 16) | __bswap16((x) >> 16))
  3740. #define __bswap64_gen(x)                \
  3741.         (((__uint64_t)__bswap32((x) & 0xffffffff) << 32) | __bswap32((x) >> 32))
  3742.  
  3743. #ifdef __GNUCLIKE_BUILTIN_CONSTANT_P
  3744. #define __bswap16(x)                            \
  3745.         ((__uint16_t)(__builtin_constant_p(x) ? \
  3746.             __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x)))
  3747. #define __bswap32(x)                    \
  3748.         (__builtin_constant_p(x) ?      \
  3749.             __bswap32_gen((__uint32_t)(x)) : __bswap32_var(x))
  3750. #define __bswap64(x)                    \
  3751.         (__builtin_constant_p(x) ?      \
  3752.             __bswap64_gen((__uint64_t)(x)) : __bswap64_var(x))
  3753. #else
  3754. # 83 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3755. /* XXX these are broken for use in static initializers. */
  3756. #define __bswap16(x)    __bswap16_var(x)
  3757. #define __bswap32(x)    __bswap32_var(x)
  3758. #define __bswap64(x)    __bswap64_var(x)
  3759. #endif
  3760. # 88 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3761.  
  3762. /* These are defined as functions to avoid multiple evaluation of x. */
  3763.  
  3764. static __inline __uint16_t
  3765. __bswap16_var(__uint16_t _x)
  3766. {
  3767.  
  3768.         return (__bswap16_gen(_x));
  3769. }
  3770.  
  3771. static __inline __uint32_t
  3772. __bswap32_var(__uint32_t _x)
  3773. {
  3774.  
  3775. #ifdef __GNUCLIKE_ASM
  3776.         __asm("bswap %0" : "+r" (_x));
  3777.         return (_x);
  3778. #else
  3779. # 106 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3780.         return (__bswap32_gen(_x));
  3781. #endif
  3782. # 108 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3783. }
  3784.  
  3785. static __inline __uint64_t
  3786. __bswap64_var(__uint64_t _x)
  3787. {
  3788.  
  3789. #if defined(__amd64__) && defined(__GNUCLIKE_ASM)
  3790.         __asm("bswap %0" : "+r" (_x));
  3791.         return (_x);
  3792. #else
  3793. # 118 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3794.         /*
  3795.          * It is important for the optimizations that the following is not
  3796.          * really generic, but expands to 2 __bswap32_var()'s.
  3797.          */
  3798.         return (__bswap64_gen(_x));
  3799. #endif
  3800. # 124 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3801. }
  3802.  
  3803. #define __htonl(x)      __bswap32(x)
  3804. #define __htons(x)      __bswap16(x)
  3805. #define __ntohl(x)      __bswap32(x)
  3806. #define __ntohs(x)      __bswap16(x)
  3807.  
  3808. #endif /* !_MACHINE_ENDIAN_H_ */
  3809. # 132 "/usr/obj/usr/src/lib32/usr/include/x86/endian.h" 3
  3810. # 7 "/usr/obj/usr/src/lib32/usr/include/machine/endian.h" 2 3
  3811. # 45 "/usr/obj/usr/src/lib32/usr/include/sys/types.h" 2 3
  3812. #if 0 /* expanded by -frewrite-includes */
  3813. #include <sys/_types.h>
  3814. #endif /* expanded by -frewrite-includes */
  3815. # 45 "/usr/obj/usr/src/lib32/usr/include/sys/types.h" 3
  3816. # 46 "/usr/obj/usr/src/lib32/usr/include/sys/types.h" 3
  3817.  
  3818. #if 0 /* expanded by -frewrite-includes */
  3819. #include <sys/_pthreadtypes.h>
  3820. #endif /* expanded by -frewrite-includes */
  3821. # 47 "/usr/obj/usr/src/lib32/usr/include/sys/types.h" 3
  3822. # 1 "/usr/obj/usr/src/lib32/usr/include/sys/_pthreadtypes.h" 1 3
  3823. /*
  3824.  * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
  3825.  * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au>
  3826.  * All rights reserved.
  3827.  *
  3828.  * Redistribution and use in source and binary forms, with or without
  3829.  * modification, are permitted provided that the following conditions
  3830.  * are met:
  3831.  * 1. Redistributions of source code must retain the above copyright
  3832.  *    notice, this list of conditions and the following disclaimer.
  3833.  * 2. Redistributions in binary form must reproduce the above copyright
  3834.  *    notice, this list of conditions and the following disclaimer in the
  3835.  *    documentation and/or other materials provided with the distribution.
  3836.  * 3. All advertising materials mentioning features or use of this software
  3837.  *    must display the following acknowledgement:
  3838.  *  This product includes software developed by Chris Provenzano.
  3839.  * 4. The name of Chris Provenzano may not be used to endorse or promote
  3840.  *        products derived from this software without specific prior written
  3841.  *        permission.
  3842.  *
  3843.  * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND