Advertisement
joelmaxuel

fatal error: error in backend: Cannot select: 0x4c45d70

Oct 22nd, 2017
933
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 258.83 KB | None | 0 0
  1. # 1 "<built-in>"
  2. # 1 "packages/apps/Gallery2/jni/filters/edge.c"
  3. /*
  4.  * Copyright (C) 2012 The Android Open Source Project
  5.  *
  6.  * Licensed under the Apache License, Version 2.0 (the "License");
  7.  * you may not use this file except in compliance with the License.
  8.  * You may obtain a copy of the License at
  9.  *
  10.  *      http://www.apache.org/licenses/LICENSE-2.0
  11.  *
  12.  * Unless required by applicable law or agreed to in writing, software
  13.  * distributed under the License is distributed on an "AS IS" BASIS,
  14.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15.  * See the License for the specific language governing permissions and
  16.  * limitations under the License.
  17.  */
  18.  
  19. #if 0 /* expanded by -frewrite-includes */
  20. #include <math.h>
  21. #endif /* expanded by -frewrite-includes */
  22. # 17 "packages/apps/Gallery2/jni/filters/edge.c"
  23. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 1 3
  24. /*
  25.  * ====================================================
  26.  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
  27.  *
  28.  * Developed at SunPro, a Sun Microsystems, Inc. business.
  29.  * Permission to use, copy, modify, and distribute this
  30.  * software is freely granted, provided that this notice
  31.  * is preserved.
  32.  * ====================================================
  33.  */
  34.  
  35. /*
  36.  * from: @(#)fdlibm.h 5.1 93/09/24
  37.  * $FreeBSD$
  38.  */
  39.  
  40. #ifndef _MATH_H_
  41. #define _MATH_H_
  42.  
  43. #if 0 /* expanded by -frewrite-includes */
  44. #include <sys/cdefs.h>
  45. #endif /* expanded by -frewrite-includes */
  46. # 20 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  47. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 1 3
  48. /*  $NetBSD: cdefs.h,v 1.58 2004/12/11 05:59:00 christos Exp $  */
  49.  
  50. /*
  51.  * Copyright (c) 1991, 1993
  52.  *  The Regents of the University of California.  All rights reserved.
  53.  *
  54.  * This code is derived from software contributed to Berkeley by
  55.  * Berkeley Software Design, Inc.
  56.  *
  57.  * Redistribution and use in source and binary forms, with or without
  58.  * modification, are permitted provided that the following conditions
  59.  * are met:
  60.  * 1. Redistributions of source code must retain the above copyright
  61.  *    notice, this list of conditions and the following disclaimer.
  62.  * 2. Redistributions in binary form must reproduce the above copyright
  63.  *    notice, this list of conditions and the following disclaimer in the
  64.  *    documentation and/or other materials provided with the distribution.
  65.  * 3. Neither the name of the University nor the names of its contributors
  66.  *    may be used to endorse or promote products derived from this software
  67.  *    without specific prior written permission.
  68.  *
  69.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  70.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  71.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  72.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  73.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  74.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  75.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  76.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  77.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  78.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  79.  * SUCH DAMAGE.
  80.  *
  81.  *  @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  82.  */
  83.  
  84. #ifndef _SYS_CDEFS_H_
  85. #define _SYS_CDEFS_H_
  86.  
  87. /*
  88.  * Testing against Clang-specific extensions.
  89.  */
  90. #ifndef __has_extension
  91. #define __has_extension         __has_feature
  92. #endif
  93. # 46 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  94. #ifndef __has_feature
  95. #define __has_feature(x)        0
  96. #endif
  97. # 49 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  98. #ifndef __has_include
  99. #define __has_include(x)        0
  100. #endif
  101. # 52 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  102. #ifndef __has_builtin
  103. #define __has_builtin(x)        0
  104. #endif
  105. # 55 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  106. #ifndef __has_attribute
  107. #define __has_attribute(x)      0
  108. #endif
  109. # 58 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  110.  
  111. #define __strong_alias(alias, sym) \
  112.     __asm__(".global " #alias "\n" \
  113.             #alias " = " #sym);
  114.  
  115. #if defined(__cplusplus)
  116. #define __BEGIN_DECLS extern "C" {
  117. #define __END_DECLS }
  118. #else
  119. # 67 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  120. #define __BEGIN_DECLS
  121. #define __END_DECLS
  122. #endif
  123. # 70 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  124.  
  125. #if defined(__cplusplus)
  126. #define __BIONIC_CAST(_k,_t,_v) (_k<_t>(_v))
  127. #else
  128. # 74 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  129. #define __BIONIC_CAST(_k,_t,_v) ((_t) (_v))
  130. #endif
  131. # 76 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  132.  
  133. /*
  134.  * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  135.  * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  136.  * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  137.  * in between its arguments.  __CONCAT can also concatenate double-quoted
  138.  * strings produced by the __STRING macro, but this only works with ANSI C.
  139.  */
  140.  
  141. #define ___STRING(x)    __STRING(x)
  142. #define ___CONCAT(x,y)  __CONCAT(x,y)
  143.  
  144. #if defined(__STDC__) || defined(__cplusplus)
  145. #define __P(protos) protos      /* full-blown ANSI C */
  146. #define __CONCAT(x,y)   x ## y
  147. #define __STRING(x) #x
  148.  
  149. #if defined(__cplusplus)
  150. #define __inline    inline      /* convert to C++ keyword */
  151. #endif /* !__cplusplus */
  152. # 96 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  153.  
  154. #else   /* !(__STDC__ || __cplusplus) */
  155. # 98 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  156. #define __P(protos) ()      /* traditional C preprocessor */
  157. #define __CONCAT(x,y)   x/**/y
  158. #define __STRING(x) "x"
  159.  
  160. #endif  /* !(__STDC__ || __cplusplus) */
  161. # 103 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  162.  
  163. #define __always_inline __attribute__((__always_inline__))
  164. #define __attribute_const__ __attribute__((__const__))
  165. #define __attribute_pure__ __attribute__((__pure__))
  166. #define __dead __attribute__((__noreturn__))
  167. #define __noreturn __attribute__((__noreturn__))
  168. #define __mallocfunc  __attribute__((__malloc__))
  169. #define __packed __attribute__((__packed__))
  170. #define __unused __attribute__((__unused__))
  171. #define __used __attribute__((__used__))
  172.  
  173. /*
  174.  * _Nonnull is similar to the nonnull attribute in that it will instruct
  175.  * compilers to warn the user if it can prove that a null argument is being
  176.  * passed. Unlike the nonnull attribute, this annotation indicated that a value
  177.  * *should not* be null, not that it *cannot* be null, or even that the behavior
  178.  * is undefined. The important distinction is that the optimizer will perform
  179.  * surprising optimizations like the following:
  180.  *
  181.  *     void foo(void*) __attribute__(nonnull, 1);
  182.  *
  183.  *     int bar(int* p) {
  184.  *       foo(p);
  185.  *
  186.  *       // The following null check will be elided because nonnull attribute
  187.  *       // means that, since we call foo with p, p can be assumed to not be
  188.  *       // null. Thus this will crash if we are called with a null pointer.
  189.  *       if (p != NULL) {
  190.  *         return *p;
  191.  *       }
  192.  *       return 0;
  193.  *     }
  194.  *
  195.  *     int main() {
  196.  *       return bar(NULL);
  197.  *     }
  198.  *
  199.  * http://clang.llvm.org/docs/AttributeReference.html#nonnull
  200.  */
  201. #if !(defined(__clang__) && __has_feature(nullability))
  202. #define _Nonnull
  203. #define _Nullable
  204. #endif
  205. # 146 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  206.  
  207. #define __printflike(x, y) __attribute__((__format__(printf, x, y)))
  208. #define __scanflike(x, y) __attribute__((__format__(scanf, x, y)))
  209.  
  210. /*
  211.  * GNU C version 2.96 added explicit branch prediction so that
  212.  * the CPU back-end can hint the processor and also so that
  213.  * code blocks can be reordered such that the predicted path
  214.  * sees a more linear flow, thus improving cache behavior, etc.
  215.  *
  216.  * The following two macros provide us with a way to use this
  217.  * compiler feature.  Use __predict_true() if you expect the expression
  218.  * to evaluate to true, and __predict_false() if you expect the
  219.  * expression to evaluate to false.
  220.  *
  221.  * A few notes about usage:
  222.  *
  223.  *  * Generally, __predict_false() error condition checks (unless
  224.  *    you have some _strong_ reason to do otherwise, in which case
  225.  *    document it), and/or __predict_true() `no-error' condition
  226.  *    checks, assuming you want to optimize for the no-error case.
  227.  *
  228.  *  * Other than that, if you don't know the likelihood of a test
  229.  *    succeeding from empirical or other `hard' evidence, don't
  230.  *    make predictions.
  231.  *
  232.  *  * These are meant to be used in places that are run `a lot'.
  233.  *    It is wasteful to make predictions in code that is run
  234.  *    seldomly (e.g. at subsystem initialization time) as the
  235.  *    basic block reordering that this affects can often generate
  236.  *    larger code.
  237.  */
  238. #define __predict_true(exp) __builtin_expect((exp) != 0, 1)
  239. #define __predict_false(exp)    __builtin_expect((exp) != 0, 0)
  240.  
  241. #define __wur __attribute__((__warn_unused_result__))
  242.  
  243. #ifdef __clang__
  244. #  define __errorattr(msg) __attribute__((unavailable(msg)))
  245. #  define __warnattr(msg) __attribute__((deprecated(msg)))
  246. #  define __warnattr_real(msg) __attribute__((deprecated(msg)))
  247. #  define __enable_if(cond, msg) __attribute__((enable_if(cond, msg)))
  248. #else
  249. # 189 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  250. #  define __errorattr(msg) __attribute__((__error__(msg)))
  251. #  define __warnattr(msg) __attribute__((__warning__(msg)))
  252. #  define __warnattr_real __warnattr
  253. /* enable_if doesn't exist on other compilers; give an error if it's used. */
  254.  
  255. /* errordecls really don't work as well in clang as they do in GCC. */
  256. #  define __errordecl(name, msg) extern void name(void) __errorattr(msg)
  257. #endif
  258. # 197 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  259.  
  260. #if defined(ANDROID_STRICT)
  261. /*
  262.  * For things that are sketchy, but not necessarily an error. FIXME: Enable
  263.  * this.
  264.  */
  265. #  define __warnattr_strict(msg) /* __warnattr(msg) */
  266. #else
  267. # 205 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  268. #  define __warnattr_strict(msg)
  269. #endif
  270. # 207 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  271.  
  272. /*
  273.  * Some BSD source needs these macros.
  274.  * Originally they embedded the rcs versions of each source file
  275.  * in the generated binary. We strip strings during build anyway,.
  276.  */
  277. #define __IDSTRING(_prefix,_s) /* nothing */
  278. #define __COPYRIGHT(_s) /* nothing */
  279. #define __FBSDID(_s) /* nothing */
  280. #define __RCSID(_s) /* nothing */
  281. #define __SCCSID(_s) /* nothing */
  282.  
  283. /*
  284.  * With bionic, you always get all C and POSIX API.
  285.  *
  286.  * If you want BSD and/or GNU extensions, _BSD_SOURCE and/or _GNU_SOURCE are
  287.  * expected to be defined by callers before *any* standard header file is
  288.  * included.
  289.  *
  290.  * In our header files we test against __USE_BSD and __USE_GNU.
  291.  */
  292. #if defined(_GNU_SOURCE)
  293. # define __USE_BSD 1
  294. # define __USE_GNU 1
  295. #endif
  296. # 232 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  297.  
  298. #if defined(_BSD_SOURCE)
  299. # define __USE_BSD 1
  300. #endif
  301. # 236 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  302.  
  303. /* _FILE_OFFSET_BITS 64 support. */
  304. #if !defined(__LP64__) && defined(_FILE_OFFSET_BITS)
  305. #if _FILE_OFFSET_BITS == 64
  306. #define __USE_FILE_OFFSET64 1
  307. #endif
  308. # 242 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  309. #endif
  310. # 243 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  311.  
  312. #define  __BIONIC__   1
  313. #if 0 /* expanded by -frewrite-includes */
  314. #include <android/api-level.h>
  315. #endif /* expanded by -frewrite-includes */
  316. # 245 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  317. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/api-level.h" 1 3
  318. /*
  319.  * Copyright (C) 2008 The Android Open Source Project
  320.  * All rights reserved.
  321.  *
  322.  * Redistribution and use in source and binary forms, with or without
  323.  * modification, are permitted provided that the following conditions
  324.  * are met:
  325.  *  * Redistributions of source code must retain the above copyright
  326.  *    notice, this list of conditions and the following disclaimer.
  327.  *  * Redistributions in binary form must reproduce the above copyright
  328.  *    notice, this list of conditions and the following disclaimer in
  329.  *    the documentation and/or other materials provided with the
  330.  *    distribution.
  331.  *
  332.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  333.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  334.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  335.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  336.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  337.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  338.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  339.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  340.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  341.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  342.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  343.  * SUCH DAMAGE.
  344.  */
  345.  
  346. #ifndef ANDROID_API_LEVEL_H
  347. #define ANDROID_API_LEVEL_H
  348.  
  349. #if 0 /* expanded by -frewrite-includes */
  350. #include <sys/cdefs.h>
  351. #endif /* expanded by -frewrite-includes */
  352. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/api-level.h" 3
  353. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 1 3
  354. /*  $NetBSD: cdefs.h,v 1.58 2004/12/11 05:59:00 christos Exp $  */
  355.  
  356. /*
  357.  * Copyright (c) 1991, 1993
  358.  *  The Regents of the University of California.  All rights reserved.
  359.  *
  360.  * This code is derived from software contributed to Berkeley by
  361.  * Berkeley Software Design, Inc.
  362.  *
  363.  * Redistribution and use in source and binary forms, with or without
  364.  * modification, are permitted provided that the following conditions
  365.  * are met:
  366.  * 1. Redistributions of source code must retain the above copyright
  367.  *    notice, this list of conditions and the following disclaimer.
  368.  * 2. Redistributions in binary form must reproduce the above copyright
  369.  *    notice, this list of conditions and the following disclaimer in the
  370.  *    documentation and/or other materials provided with the distribution.
  371.  * 3. Neither the name of the University nor the names of its contributors
  372.  *    may be used to endorse or promote products derived from this software
  373.  *    without specific prior written permission.
  374.  *
  375.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  376.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  377.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  378.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  379.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  380.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  381.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  382.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  383.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  384.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  385.  * SUCH DAMAGE.
  386.  *
  387.  *  @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  388.  */
  389.  
  390. #ifndef _SYS_CDEFS_H_
  391. #define _SYS_CDEFS_H_
  392.  
  393. /*
  394.  * Testing against Clang-specific extensions.
  395.  */
  396. #ifndef __has_extension
  397. #define __has_extension         __has_feature
  398. #endif
  399. # 46 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  400. #ifndef __has_feature
  401. #define __has_feature(x)        0
  402. #endif
  403. # 49 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  404. #ifndef __has_include
  405. #define __has_include(x)        0
  406. #endif
  407. # 52 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  408. #ifndef __has_builtin
  409. #define __has_builtin(x)        0
  410. #endif
  411. # 55 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  412. #ifndef __has_attribute
  413. #define __has_attribute(x)      0
  414. #endif
  415. # 58 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  416.  
  417. #define __strong_alias(alias, sym) \
  418.     __asm__(".global " #alias "\n" \
  419.             #alias " = " #sym);
  420.  
  421. #if defined(__cplusplus)
  422. #define __BEGIN_DECLS extern "C" {
  423. #define __END_DECLS }
  424. #else
  425. # 67 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  426. #define __BEGIN_DECLS
  427. #define __END_DECLS
  428. #endif
  429. # 70 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  430.  
  431. #if defined(__cplusplus)
  432. #define __BIONIC_CAST(_k,_t,_v) (_k<_t>(_v))
  433. #else
  434. # 74 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  435. #define __BIONIC_CAST(_k,_t,_v) ((_t) (_v))
  436. #endif
  437. # 76 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  438.  
  439. /*
  440.  * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  441.  * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  442.  * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  443.  * in between its arguments.  __CONCAT can also concatenate double-quoted
  444.  * strings produced by the __STRING macro, but this only works with ANSI C.
  445.  */
  446.  
  447. #define ___STRING(x)    __STRING(x)
  448. #define ___CONCAT(x,y)  __CONCAT(x,y)
  449.  
  450. #if defined(__STDC__) || defined(__cplusplus)
  451. #define __P(protos) protos      /* full-blown ANSI C */
  452. #define __CONCAT(x,y)   x ## y
  453. #define __STRING(x) #x
  454.  
  455. #if defined(__cplusplus)
  456. #define __inline    inline      /* convert to C++ keyword */
  457. #endif /* !__cplusplus */
  458. # 96 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  459.  
  460. #else   /* !(__STDC__ || __cplusplus) */
  461. # 98 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  462. #define __P(protos) ()      /* traditional C preprocessor */
  463. #define __CONCAT(x,y)   x/**/y
  464. #define __STRING(x) "x"
  465.  
  466. #endif  /* !(__STDC__ || __cplusplus) */
  467. # 103 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  468.  
  469. #define __always_inline __attribute__((__always_inline__))
  470. #define __attribute_const__ __attribute__((__const__))
  471. #define __attribute_pure__ __attribute__((__pure__))
  472. #define __dead __attribute__((__noreturn__))
  473. #define __noreturn __attribute__((__noreturn__))
  474. #define __mallocfunc  __attribute__((__malloc__))
  475. #define __packed __attribute__((__packed__))
  476. #define __unused __attribute__((__unused__))
  477. #define __used __attribute__((__used__))
  478.  
  479. /*
  480.  * _Nonnull is similar to the nonnull attribute in that it will instruct
  481.  * compilers to warn the user if it can prove that a null argument is being
  482.  * passed. Unlike the nonnull attribute, this annotation indicated that a value
  483.  * *should not* be null, not that it *cannot* be null, or even that the behavior
  484.  * is undefined. The important distinction is that the optimizer will perform
  485.  * surprising optimizations like the following:
  486.  *
  487.  *     void foo(void*) __attribute__(nonnull, 1);
  488.  *
  489.  *     int bar(int* p) {
  490.  *       foo(p);
  491.  *
  492.  *       // The following null check will be elided because nonnull attribute
  493.  *       // means that, since we call foo with p, p can be assumed to not be
  494.  *       // null. Thus this will crash if we are called with a null pointer.
  495.  *       if (p != NULL) {
  496.  *         return *p;
  497.  *       }
  498.  *       return 0;
  499.  *     }
  500.  *
  501.  *     int main() {
  502.  *       return bar(NULL);
  503.  *     }
  504.  *
  505.  * http://clang.llvm.org/docs/AttributeReference.html#nonnull
  506.  */
  507. #if !(defined(__clang__) && __has_feature(nullability))
  508. #define _Nonnull
  509. #define _Nullable
  510. #endif
  511. # 146 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  512.  
  513. #define __printflike(x, y) __attribute__((__format__(printf, x, y)))
  514. #define __scanflike(x, y) __attribute__((__format__(scanf, x, y)))
  515.  
  516. /*
  517.  * GNU C version 2.96 added explicit branch prediction so that
  518.  * the CPU back-end can hint the processor and also so that
  519.  * code blocks can be reordered such that the predicted path
  520.  * sees a more linear flow, thus improving cache behavior, etc.
  521.  *
  522.  * The following two macros provide us with a way to use this
  523.  * compiler feature.  Use __predict_true() if you expect the expression
  524.  * to evaluate to true, and __predict_false() if you expect the
  525.  * expression to evaluate to false.
  526.  *
  527.  * A few notes about usage:
  528.  *
  529.  *  * Generally, __predict_false() error condition checks (unless
  530.  *    you have some _strong_ reason to do otherwise, in which case
  531.  *    document it), and/or __predict_true() `no-error' condition
  532.  *    checks, assuming you want to optimize for the no-error case.
  533.  *
  534.  *  * Other than that, if you don't know the likelihood of a test
  535.  *    succeeding from empirical or other `hard' evidence, don't
  536.  *    make predictions.
  537.  *
  538.  *  * These are meant to be used in places that are run `a lot'.
  539.  *    It is wasteful to make predictions in code that is run
  540.  *    seldomly (e.g. at subsystem initialization time) as the
  541.  *    basic block reordering that this affects can often generate
  542.  *    larger code.
  543.  */
  544. #define __predict_true(exp) __builtin_expect((exp) != 0, 1)
  545. #define __predict_false(exp)    __builtin_expect((exp) != 0, 0)
  546.  
  547. #define __wur __attribute__((__warn_unused_result__))
  548.  
  549. #ifdef __clang__
  550. #  define __errorattr(msg) __attribute__((unavailable(msg)))
  551. #  define __warnattr(msg) __attribute__((deprecated(msg)))
  552. #  define __warnattr_real(msg) __attribute__((deprecated(msg)))
  553. #  define __enable_if(cond, msg) __attribute__((enable_if(cond, msg)))
  554. #else
  555. # 189 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  556. #  define __errorattr(msg) __attribute__((__error__(msg)))
  557. #  define __warnattr(msg) __attribute__((__warning__(msg)))
  558. #  define __warnattr_real __warnattr
  559. /* enable_if doesn't exist on other compilers; give an error if it's used. */
  560.  
  561. /* errordecls really don't work as well in clang as they do in GCC. */
  562. #  define __errordecl(name, msg) extern void name(void) __errorattr(msg)
  563. #endif
  564. # 197 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  565.  
  566. #if defined(ANDROID_STRICT)
  567. /*
  568.  * For things that are sketchy, but not necessarily an error. FIXME: Enable
  569.  * this.
  570.  */
  571. #  define __warnattr_strict(msg) /* __warnattr(msg) */
  572. #else
  573. # 205 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  574. #  define __warnattr_strict(msg)
  575. #endif
  576. # 207 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  577.  
  578. /*
  579.  * Some BSD source needs these macros.
  580.  * Originally they embedded the rcs versions of each source file
  581.  * in the generated binary. We strip strings during build anyway,.
  582.  */
  583. #define __IDSTRING(_prefix,_s) /* nothing */
  584. #define __COPYRIGHT(_s) /* nothing */
  585. #define __FBSDID(_s) /* nothing */
  586. #define __RCSID(_s) /* nothing */
  587. #define __SCCSID(_s) /* nothing */
  588.  
  589. /*
  590.  * With bionic, you always get all C and POSIX API.
  591.  *
  592.  * If you want BSD and/or GNU extensions, _BSD_SOURCE and/or _GNU_SOURCE are
  593.  * expected to be defined by callers before *any* standard header file is
  594.  * included.
  595.  *
  596.  * In our header files we test against __USE_BSD and __USE_GNU.
  597.  */
  598. #if defined(_GNU_SOURCE)
  599. # define __USE_BSD 1
  600. # define __USE_GNU 1
  601. #endif
  602. # 232 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  603.  
  604. #if defined(_BSD_SOURCE)
  605. # define __USE_BSD 1
  606. #endif
  607. # 236 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  608.  
  609. /* _FILE_OFFSET_BITS 64 support. */
  610. #if !defined(__LP64__) && defined(_FILE_OFFSET_BITS)
  611. #if _FILE_OFFSET_BITS == 64
  612. #define __USE_FILE_OFFSET64 1
  613. #endif
  614. # 242 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  615. #endif
  616. # 243 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  617.  
  618. #define  __BIONIC__   1
  619. #if 0 /* expanded by -frewrite-includes */
  620. #include <android/api-level.h>
  621. #endif /* expanded by -frewrite-includes */
  622. # 245 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  623. # 246 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  624.  
  625. /* glibc compatibility. */
  626. #if defined(__LP64__)
  627. #define __WORDSIZE 64
  628. #else
  629. # 251 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  630. #define __WORDSIZE 32
  631. #endif
  632. # 253 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  633.  
  634. /*
  635.  * When _FORTIFY_SOURCE is defined, automatic bounds checking is
  636.  * added to commonly used libc functions. If a buffer overrun is
  637.  * detected, the program is safely aborted.
  638.  *
  639.  * See
  640.  * http://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html for details.
  641.  */
  642.  
  643. #define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1)
  644.  
  645. #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
  646. #  define __BIONIC_FORTIFY 1
  647. #  if _FORTIFY_SOURCE == 2
  648. #    define __bos_level 1
  649. #  else
  650. # 270 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  651. #    define __bos_level 0
  652. #  endif
  653. # 272 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  654. #  define __bosn(s, n) __builtin_object_size((s), (n))
  655. #  define __bos(s) __bosn((s), __bos_level)
  656. #  define __bos0(s) __bosn((s), 0)
  657. #  if defined(__clang__)
  658. #    define __pass_object_size_n(n) __attribute__((pass_object_size(n)))
  659. /*
  660.  * FORTIFY'ed functions all have either enable_if or pass_object_size, which
  661.  * makes taking their address impossible. Saying (&read)(foo, bar, baz); will
  662.  * therefore call the unFORTIFYed version of read.
  663.  */
  664. #    define __call_bypassing_fortify(fn) (&fn)
  665. /*
  666.  * Because clang-FORTIFY uses overloads, we can't mark functions as `extern
  667.  * inline` without making them available externally.
  668.  */
  669. #    define __BIONIC_FORTIFY_INLINE static __inline__ __always_inline
  670. /* Error functions don't have bodies, so they can just be static. */
  671. #    define __BIONIC_ERROR_FUNCTION_VISIBILITY static
  672. #  else
  673. # 291 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  674. /*
  675.  * Where they can, GCC and clang-style FORTIFY share implementations.
  676.  * So, make these nops in GCC.
  677.  */
  678. #    define __pass_object_size_n(n)
  679. #    define __call_bypassing_fortify(fn) (fn)
  680. /* __BIONIC_FORTIFY_NONSTATIC_INLINE is pointless in GCC's FORTIFY */
  681. #    define __BIONIC_FORTIFY_INLINE extern __inline__ __always_inline __attribute__((gnu_inline)) __attribute__((__artificial__))
  682. #  endif
  683. # 300 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  684. #  define __pass_object_size __pass_object_size_n(__bos_level)
  685. #  define __pass_object_size0 __pass_object_size_n(0)
  686. #endif
  687. # 303 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  688.  
  689. /* Used to support clangisms with FORTIFY. This isn't in the FORTIFY section
  690.  * because these change how symbols are emitted. The linker must be kept happy.
  691.  */
  692. #ifdef __clang__
  693. #  define __overloadable __attribute__((overloadable))
  694. // Don't use __RENAME directly because on gcc, this could result in a number of
  695. // unnecessary renames.
  696. #  define __RENAME_CLANG(x) __RENAME(x)
  697. #else
  698. # 313 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  699. #  define __overloadable
  700. #  define __RENAME_CLANG(x)
  701. #endif
  702. # 316 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  703.  
  704. /* Used to tag non-static symbols that are private and never exposed by the shared library. */
  705. #define __LIBC_HIDDEN__ __attribute__((visibility("hidden")))
  706.  
  707. /*
  708.  * Used to tag symbols that should be hidden for 64-bit,
  709.  * but visible to preserve binary compatibility for LP32.
  710.  */
  711. #ifdef __LP64__
  712. #define __LIBC32_LEGACY_PUBLIC__ __attribute__((visibility("hidden")))
  713. #else
  714. # 327 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  715. #define __LIBC32_LEGACY_PUBLIC__ __attribute__((visibility("default")))
  716. #endif
  717. # 329 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  718.  
  719. /* Used to rename functions so that the compiler emits a call to 'x' rather than the function this was applied to. */
  720. #define __RENAME(x) __asm__(#x)
  721.  
  722. #if 0 /* expanded by -frewrite-includes */
  723. #include <android/versioning.h>
  724. #endif /* expanded by -frewrite-includes */
  725. # 333 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  726. # 334 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  727.  
  728. #if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5
  729. #if defined(__LP64__)
  730. #define __size_mul_overflow(a, b, result) __builtin_umull_overflow(a, b, result)
  731. #else
  732. # 339 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  733. #define __size_mul_overflow(a, b, result) __builtin_umul_overflow(a, b, result)
  734. #endif
  735. # 341 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  736. #else
  737. # 342 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  738. extern __inline__ __always_inline __attribute__((gnu_inline))
  739. int __size_mul_overflow(__SIZE_TYPE__ a, __SIZE_TYPE__ b, __SIZE_TYPE__ *result) {
  740.     *result = a * b;
  741.     static const __SIZE_TYPE__ mul_no_overflow = 1UL << (sizeof(__SIZE_TYPE__) * 4);
  742.     return (a >= mul_no_overflow || b >= mul_no_overflow) && a > 0 && (__SIZE_TYPE__)-1 / a < b;
  743. }
  744. #endif
  745. # 349 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  746.  
  747. #if defined(__clang__)
  748. /*
  749.  * Used when we need to check for overflow when multiplying x and y. This
  750.  * should only be used where __size_mul_overflow can not work, because it makes
  751.  * assumptions that __size_mul_overflow doesn't (x and y are positive, ...),
  752.  * *and* doesn't make use of compiler intrinsics, so it's probably slower than
  753.  * __size_mul_overflow.
  754.  */
  755. #define __unsafe_check_mul_overflow(x, y) ((__SIZE_TYPE__)-1 / (x) < (y))
  756. #endif
  757. # 360 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  758.  
  759. #endif /* !_SYS_CDEFS_H_ */
  760. # 362 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  761. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/api-level.h" 2 3
  762.  
  763. /*
  764.  * Magic version number for a current development build, which has
  765.  * not yet turned into an official release.
  766.  */
  767. #ifndef __ANDROID_API_FUTURE__
  768. #define __ANDROID_API_FUTURE__ 10000
  769. #endif
  770. # 41 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/api-level.h" 3
  771.  
  772. #ifndef __ANDROID_API__
  773. #define __ANDROID_API__ __ANDROID_API_FUTURE__
  774. #endif
  775. # 45 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/api-level.h" 3
  776.  
  777. #define __ANDROID_API_G__ 9
  778. #define __ANDROID_API_I__ 14
  779. #define __ANDROID_API_J__ 16
  780. #define __ANDROID_API_J_MR1__ 17
  781. #define __ANDROID_API_J_MR2__ 18
  782. #define __ANDROID_API_K__ 19
  783. #define __ANDROID_API_L__ 21
  784. #define __ANDROID_API_L_MR1__ 22
  785. #define __ANDROID_API_M__ 23
  786. #define __ANDROID_API_N__ 24
  787. #define __ANDROID_API_N_MR1__ 25
  788. #define __ANDROID_API_O__ 26
  789.  
  790. #endif /* ANDROID_API_LEVEL_H */
  791. # 60 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/api-level.h" 3
  792. # 246 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 2 3
  793.  
  794. /* glibc compatibility. */
  795. #if defined(__LP64__)
  796. #define __WORDSIZE 64
  797. #else
  798. # 251 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  799. #define __WORDSIZE 32
  800. #endif
  801. # 253 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  802.  
  803. /*
  804.  * When _FORTIFY_SOURCE is defined, automatic bounds checking is
  805.  * added to commonly used libc functions. If a buffer overrun is
  806.  * detected, the program is safely aborted.
  807.  *
  808.  * See
  809.  * http://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html for details.
  810.  */
  811.  
  812. #define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1)
  813.  
  814. #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
  815. #  define __BIONIC_FORTIFY 1
  816. #  if _FORTIFY_SOURCE == 2
  817. #    define __bos_level 1
  818. #  else
  819. # 270 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  820. #    define __bos_level 0
  821. #  endif
  822. # 272 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  823. #  define __bosn(s, n) __builtin_object_size((s), (n))
  824. #  define __bos(s) __bosn((s), __bos_level)
  825. #  define __bos0(s) __bosn((s), 0)
  826. #  if defined(__clang__)
  827. #    define __pass_object_size_n(n) __attribute__((pass_object_size(n)))
  828. /*
  829.  * FORTIFY'ed functions all have either enable_if or pass_object_size, which
  830.  * makes taking their address impossible. Saying (&read)(foo, bar, baz); will
  831.  * therefore call the unFORTIFYed version of read.
  832.  */
  833. #    define __call_bypassing_fortify(fn) (&fn)
  834. /*
  835.  * Because clang-FORTIFY uses overloads, we can't mark functions as `extern
  836.  * inline` without making them available externally.
  837.  */
  838. #    define __BIONIC_FORTIFY_INLINE static __inline__ __always_inline
  839. /* Error functions don't have bodies, so they can just be static. */
  840. #    define __BIONIC_ERROR_FUNCTION_VISIBILITY static
  841. #  else
  842. # 291 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  843. /*
  844.  * Where they can, GCC and clang-style FORTIFY share implementations.
  845.  * So, make these nops in GCC.
  846.  */
  847. #    define __pass_object_size_n(n)
  848. #    define __call_bypassing_fortify(fn) (fn)
  849. /* __BIONIC_FORTIFY_NONSTATIC_INLINE is pointless in GCC's FORTIFY */
  850. #    define __BIONIC_FORTIFY_INLINE extern __inline__ __always_inline __attribute__((gnu_inline)) __attribute__((__artificial__))
  851. #  endif
  852. # 300 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  853. #  define __pass_object_size __pass_object_size_n(__bos_level)
  854. #  define __pass_object_size0 __pass_object_size_n(0)
  855. #endif
  856. # 303 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  857.  
  858. /* Used to support clangisms with FORTIFY. This isn't in the FORTIFY section
  859.  * because these change how symbols are emitted. The linker must be kept happy.
  860.  */
  861. #ifdef __clang__
  862. #  define __overloadable __attribute__((overloadable))
  863. // Don't use __RENAME directly because on gcc, this could result in a number of
  864. // unnecessary renames.
  865. #  define __RENAME_CLANG(x) __RENAME(x)
  866. #else
  867. # 313 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  868. #  define __overloadable
  869. #  define __RENAME_CLANG(x)
  870. #endif
  871. # 316 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  872.  
  873. /* Used to tag non-static symbols that are private and never exposed by the shared library. */
  874. #define __LIBC_HIDDEN__ __attribute__((visibility("hidden")))
  875.  
  876. /*
  877.  * Used to tag symbols that should be hidden for 64-bit,
  878.  * but visible to preserve binary compatibility for LP32.
  879.  */
  880. #ifdef __LP64__
  881. #define __LIBC32_LEGACY_PUBLIC__ __attribute__((visibility("hidden")))
  882. #else
  883. # 327 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  884. #define __LIBC32_LEGACY_PUBLIC__ __attribute__((visibility("default")))
  885. #endif
  886. # 329 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  887.  
  888. /* Used to rename functions so that the compiler emits a call to 'x' rather than the function this was applied to. */
  889. #define __RENAME(x) __asm__(#x)
  890.  
  891. #if 0 /* expanded by -frewrite-includes */
  892. #include <android/versioning.h>
  893. #endif /* expanded by -frewrite-includes */
  894. # 333 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  895. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/versioning.h" 1 3
  896. /*
  897.  * Copyright (C) 2016 The Android Open Source Project
  898.  *
  899.  * Licensed under the Apache License, Version 2.0 (the "License");
  900.  * you may not use this file except in compliance with the License.
  901.  * You may obtain a copy of the License at
  902.  *
  903.  *      http://www.apache.org/licenses/LICENSE-2.0
  904.  *
  905.  * Unless required by applicable law or agreed to in writing, software
  906.  * distributed under the License is distributed on an "AS IS" BASIS,
  907.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  908.  * See the License for the specific language governing permissions and
  909.  * limitations under the License.
  910.  */
  911.  
  912. #ifndef ANDROID_VERSIONING_H
  913. #define ANDROID_VERSIONING_H
  914.  
  915. #define __INTRODUCED_IN(api_level) __attribute__((annotate("introduced_in=" #api_level)))
  916. #define __INTRODUCED_IN_FUTURE __attribute__((annotate("introduced_in_future")))
  917. #define __DEPRECATED_IN(api_level) __attribute__((annotate("deprecated_in=" #api_level)))
  918. #define __REMOVED_IN(api_level) __attribute__((annotate("obsoleted_in=" #api_level)))
  919. #define __INTRODUCED_IN_32(api_level) __attribute__((annotate("introduced_in_32=" #api_level)))
  920. #define __INTRODUCED_IN_64(api_level) __attribute__((annotate("introduced_in_64=" #api_level)))
  921. #define __INTRODUCED_IN_ARM(api_level) __attribute__((annotate("introduced_in_arm=" #api_level)))
  922. #define __INTRODUCED_IN_X86(api_level) __attribute__((annotate("introduced_in_x86=" #api_level)))
  923. #define __INTRODUCED_IN_MIPS(api_level) __attribute__((annotate("introduced_in_mips=" #api_level)))
  924.  
  925. #define __VERSIONER_NO_GUARD __attribute__((annotate("versioner_no_guard")))
  926.  
  927. #endif /* ANDROID_VERSIONING_H */
  928. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/versioning.h" 3
  929. # 334 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 2 3
  930.  
  931. #if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5
  932. #if defined(__LP64__)
  933. #define __size_mul_overflow(a, b, result) __builtin_umull_overflow(a, b, result)
  934. #else
  935. # 339 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  936. #define __size_mul_overflow(a, b, result) __builtin_umul_overflow(a, b, result)
  937. #endif
  938. # 341 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  939. #else
  940. # 342 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  941. extern __inline__ __always_inline __attribute__((gnu_inline))
  942. int __size_mul_overflow(__SIZE_TYPE__ a, __SIZE_TYPE__ b, __SIZE_TYPE__ *result) {
  943.     *result = a * b;
  944.     static const __SIZE_TYPE__ mul_no_overflow = 1UL << (sizeof(__SIZE_TYPE__) * 4);
  945.     return (a >= mul_no_overflow || b >= mul_no_overflow) && a > 0 && (__SIZE_TYPE__)-1 / a < b;
  946. }
  947. #endif
  948. # 349 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  949.  
  950. #if defined(__clang__)
  951. /*
  952.  * Used when we need to check for overflow when multiplying x and y. This
  953.  * should only be used where __size_mul_overflow can not work, because it makes
  954.  * assumptions that __size_mul_overflow doesn't (x and y are positive, ...),
  955.  * *and* doesn't make use of compiler intrinsics, so it's probably slower than
  956.  * __size_mul_overflow.
  957.  */
  958. #define __unsafe_check_mul_overflow(x, y) ((__SIZE_TYPE__)-1 / (x) < (y))
  959. #endif
  960. # 360 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  961.  
  962. #endif /* !_SYS_CDEFS_H_ */
  963. # 362 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/cdefs.h" 3
  964. # 21 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 2 3
  965. #if 0 /* expanded by -frewrite-includes */
  966. #include <limits.h>
  967. #endif /* expanded by -frewrite-includes */
  968. # 21 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  969. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 1 3
  970. /*  $OpenBSD: limits.h,v 1.13 2005/12/31 19:29:38 millert Exp $ */
  971. /*  $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $   */
  972.  
  973. /*
  974.  * Copyright (c) 1988 The Regents of the University of California.
  975.  * All rights reserved.
  976.  *
  977.  * Redistribution and use in source and binary forms, with or without
  978.  * modification, are permitted provided that the following conditions
  979.  * are met:
  980.  * 1. Redistributions of source code must retain the above copyright
  981.  *    notice, this list of conditions and the following disclaimer.
  982.  * 2. Redistributions in binary form must reproduce the above copyright
  983.  *    notice, this list of conditions and the following disclaimer in the
  984.  *    documentation and/or other materials provided with the distribution.
  985.  * 3. Neither the name of the University nor the names of its contributors
  986.  *    may be used to endorse or promote products derived from this software
  987.  *    without specific prior written permission.
  988.  *
  989.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  990.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  991.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  992.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  993.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  994.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  995.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  996.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  997.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  998.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  999.  * SUCH DAMAGE.
  1000.  *
  1001.  *  @(#)limits.h    5.9 (Berkeley) 4/3/91
  1002.  */
  1003.  
  1004. #ifndef _LIMITS_H_
  1005. #define _LIMITS_H_
  1006.  
  1007. #if 0 /* expanded by -frewrite-includes */
  1008. #include <sys/cdefs.h>
  1009. #endif /* expanded by -frewrite-includes */
  1010. # 38 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1011. # 39 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1012.  
  1013. /* Historically bionic exposed the content of <float.h> from <limits.h> and <sys/limits.h> too. */
  1014. #if 0 /* expanded by -frewrite-includes */
  1015. #include <float.h>
  1016. #endif /* expanded by -frewrite-includes */
  1017. # 41 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1018. # 1 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 1 3
  1019. /*===---- float.h - Characteristics of floating point types ----------------===
  1020.  *
  1021.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  1022.  * of this software and associated documentation files (the "Software"), to deal
  1023.  * in the Software without restriction, including without limitation the rights
  1024.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  1025.  * copies of the Software, and to permit persons to whom the Software is
  1026.  * furnished to do so, subject to the following conditions:
  1027.  *
  1028.  * The above copyright notice and this permission notice shall be included in
  1029.  * all copies or substantial portions of the Software.
  1030.  *
  1031.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1032.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1033.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  1034.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  1035.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  1036.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  1037.  * THE SOFTWARE.
  1038.  *
  1039.  *===-----------------------------------------------------------------------===
  1040.  */
  1041.  
  1042. #ifndef __FLOAT_H
  1043. #define __FLOAT_H
  1044.  
  1045. /* If we're on MinGW, fall back to the system's float.h, which might have
  1046.  * additional definitions provided for Windows.
  1047.  * For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
  1048.  */
  1049. #if (defined(__MINGW32__) || defined(_MSC_VER)) && __STDC_HOSTED__ && \
  1050.     (1)/*__has_include_next(<float.h>)*/
  1051. #if 0 /* expanded by -frewrite-includes */
  1052. #  include_next <float.h>
  1053. #endif /* expanded by -frewrite-includes */
  1054. # 33 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 3
  1055. # 34 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 3
  1056.  
  1057. /* Undefine anything that we'll be redefining below. */
  1058. #  undef FLT_EVAL_METHOD
  1059. #  undef FLT_ROUNDS
  1060. #  undef FLT_RADIX
  1061. #  undef FLT_MANT_DIG
  1062. #  undef DBL_MANT_DIG
  1063. #  undef LDBL_MANT_DIG
  1064. #  if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__)
  1065. #    undef DECIMAL_DIG
  1066. #  endif
  1067. # 45 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 3
  1068. #  undef FLT_DIG
  1069. #  undef DBL_DIG
  1070. #  undef LDBL_DIG
  1071. #  undef FLT_MIN_EXP
  1072. #  undef DBL_MIN_EXP
  1073. #  undef LDBL_MIN_EXP
  1074. #  undef FLT_MIN_10_EXP
  1075. #  undef DBL_MIN_10_EXP
  1076. #  undef LDBL_MIN_10_EXP
  1077. #  undef FLT_MAX_EXP
  1078. #  undef DBL_MAX_EXP
  1079. #  undef LDBL_MAX_EXP
  1080. #  undef FLT_MAX_10_EXP
  1081. #  undef DBL_MAX_10_EXP
  1082. #  undef LDBL_MAX_10_EXP
  1083. #  undef FLT_MAX
  1084. #  undef DBL_MAX
  1085. #  undef LDBL_MAX
  1086. #  undef FLT_EPSILON
  1087. #  undef DBL_EPSILON
  1088. #  undef LDBL_EPSILON
  1089. #  undef FLT_MIN
  1090. #  undef DBL_MIN
  1091. #  undef LDBL_MIN
  1092. #  if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
  1093. #    undef FLT_TRUE_MIN
  1094. #    undef DBL_TRUE_MIN
  1095. #    undef LDBL_TRUE_MIN
  1096. #    undef FLT_DECIMAL_DIG
  1097. #    undef DBL_DECIMAL_DIG
  1098. #    undef LDBL_DECIMAL_DIG
  1099. #  endif
  1100. # 77 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 3
  1101. #endif
  1102. # 78 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 3
  1103.  
  1104. /* Characteristics of floating point types, C99 5.2.4.2.2 */
  1105.  
  1106. #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
  1107. #define FLT_ROUNDS (__builtin_flt_rounds())
  1108. #define FLT_RADIX __FLT_RADIX__
  1109.  
  1110. #define FLT_MANT_DIG __FLT_MANT_DIG__
  1111. #define DBL_MANT_DIG __DBL_MANT_DIG__
  1112. #define LDBL_MANT_DIG __LDBL_MANT_DIG__
  1113.  
  1114. #if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__)
  1115. #  define DECIMAL_DIG __DECIMAL_DIG__
  1116. #endif
  1117. # 92 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 3
  1118.  
  1119. #define FLT_DIG __FLT_DIG__
  1120. #define DBL_DIG __DBL_DIG__
  1121. #define LDBL_DIG __LDBL_DIG__
  1122.  
  1123. #define FLT_MIN_EXP __FLT_MIN_EXP__
  1124. #define DBL_MIN_EXP __DBL_MIN_EXP__
  1125. #define LDBL_MIN_EXP __LDBL_MIN_EXP__
  1126.  
  1127. #define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
  1128. #define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
  1129. #define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
  1130.  
  1131. #define FLT_MAX_EXP __FLT_MAX_EXP__
  1132. #define DBL_MAX_EXP __DBL_MAX_EXP__
  1133. #define LDBL_MAX_EXP __LDBL_MAX_EXP__
  1134.  
  1135. #define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
  1136. #define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
  1137. #define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
  1138.  
  1139. #define FLT_MAX __FLT_MAX__
  1140. #define DBL_MAX __DBL_MAX__
  1141. #define LDBL_MAX __LDBL_MAX__
  1142.  
  1143. #define FLT_EPSILON __FLT_EPSILON__
  1144. #define DBL_EPSILON __DBL_EPSILON__
  1145. #define LDBL_EPSILON __LDBL_EPSILON__
  1146.  
  1147. #define FLT_MIN __FLT_MIN__
  1148. #define DBL_MIN __DBL_MIN__
  1149. #define LDBL_MIN __LDBL_MIN__
  1150.  
  1151. #if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
  1152. #  define FLT_TRUE_MIN __FLT_DENORM_MIN__
  1153. #  define DBL_TRUE_MIN __DBL_DENORM_MIN__
  1154. #  define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
  1155. #  define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
  1156. #  define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
  1157. #  define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
  1158. #endif
  1159. # 133 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 3
  1160.  
  1161. #endif /* __FLOAT_H */
  1162. # 135 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/float.h" 3
  1163. # 42 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 2 3
  1164.  
  1165. #if 0 /* expanded by -frewrite-includes */
  1166. #include <linux/limits.h>
  1167. #endif /* expanded by -frewrite-includes */
  1168. # 43 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1169. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/limits.h" 1 3
  1170. /****************************************************************************
  1171.  ****************************************************************************
  1172.  ***
  1173.  ***   This header was automatically generated from a Linux kernel header
  1174.  ***   of the same name, to make information necessary for userspace to
  1175.  ***   call into the kernel available to libc.  It contains only constants,
  1176.  ***   structures, and macros generated from the original header, and thus,
  1177.  ***   contains no copyrightable information.
  1178.  ***
  1179.  ***   To edit the content of this header, modify the corresponding
  1180.  ***   source file (e.g. under external/kernel-headers/original/) then
  1181.  ***   run bionic/libc/kernel/tools/update_all.py
  1182.  ***
  1183.  ***   Any manual change here will be lost the next time this script will
  1184.  ***   be run. You've been warned!
  1185.  ***
  1186.  ****************************************************************************
  1187.  ****************************************************************************/
  1188. #ifndef _LINUX_LIMITS_H
  1189. #define _LINUX_LIMITS_H
  1190. #define NR_OPEN 1024
  1191. #define NGROUPS_MAX 65536
  1192. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  1193. #define _KERNEL_ARG_MAX 131072
  1194. #define LINK_MAX 127
  1195. #define MAX_CANON 255
  1196. #define MAX_INPUT 255
  1197. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  1198. #define NAME_MAX 255
  1199. #define PATH_MAX 4096
  1200. #define PIPE_BUF 4096
  1201. #define XATTR_NAME_MAX 255
  1202. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  1203. #define XATTR_SIZE_MAX 65536
  1204. #define XATTR_LIST_MAX 65536
  1205. #define RTSIG_MAX 32
  1206. #endif
  1207. # 38 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/limits.h" 3
  1208. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  1209. # 44 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 2 3
  1210.  
  1211. #define PASS_MAX        128 /* _PASSWORD_LEN from <pwd.h> */
  1212.  
  1213. #define NL_ARGMAX       9
  1214. #define NL_LANGMAX      14
  1215. #define NL_MSGMAX       32767
  1216. #define NL_NMAX         1
  1217. #define NL_SETMAX       255
  1218. #define NL_TEXTMAX      255
  1219.  
  1220. #define TMP_MAX                 308915776
  1221.  
  1222. /* TODO: get all these from the compiler's <limits.h>? */
  1223.  
  1224. #define CHAR_BIT 8
  1225. #ifdef __LP64__
  1226. # define LONG_BIT 64
  1227. #else
  1228. # 62 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1229. # define LONG_BIT 32
  1230. #endif
  1231. # 64 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1232.  
  1233. #define SCHAR_MAX   0x7f        /* max value for a signed char */
  1234. #define SCHAR_MIN   (-0x7f-1)   /* min value for a signed char */
  1235.  
  1236. #define UCHAR_MAX   0xffU       /* max value for an unsigned char */
  1237. #ifdef __CHAR_UNSIGNED__
  1238. # define CHAR_MIN   0       /* min value for a char */
  1239. # define CHAR_MAX   0xff        /* max value for a char */
  1240. #else
  1241. # 73 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1242. # define CHAR_MAX   0x7f
  1243. # define CHAR_MIN   (-0x7f-1)
  1244. #endif
  1245. # 76 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1246.  
  1247. #define USHRT_MAX   0xffffU     /* max value for an unsigned short */
  1248. #define SHRT_MAX    0x7fff      /* max value for a short */
  1249. #define SHRT_MIN        (-0x7fff-1)     /* min value for a short */
  1250.  
  1251. #define UINT_MAX    0xffffffffU /* max value for an unsigned int */
  1252. #define INT_MAX     0x7fffffff  /* max value for an int */
  1253. #define INT_MIN     (-0x7fffffff-1) /* min value for an int */
  1254.  
  1255. #ifdef __LP64__
  1256. # define ULONG_MAX  0xffffffffffffffffUL     /* max value for unsigned long */
  1257. # define LONG_MAX   0x7fffffffffffffffL      /* max value for a signed long */
  1258. # define LONG_MIN   (-0x7fffffffffffffffL-1) /* min value for a signed long */
  1259. #else
  1260. # 90 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1261. # define ULONG_MAX  0xffffffffUL    /* max value for an unsigned long */
  1262. # define LONG_MAX   0x7fffffffL /* max value for a long */
  1263. # define LONG_MIN   (-0x7fffffffL-1)/* min value for a long */
  1264. #endif
  1265. # 94 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1266.  
  1267. # define ULLONG_MAX 0xffffffffffffffffULL     /* max value for unsigned long long */
  1268. # define LLONG_MAX  0x7fffffffffffffffLL      /* max value for a signed long long */
  1269. # define LLONG_MIN  (-0x7fffffffffffffffLL-1) /* min value for a signed long long */
  1270.  
  1271. /* GLibc compatibility definitions.
  1272.    Note that these are defined by GCC's <limits.h>
  1273.    only when __GNU_LIBRARY__ is defined, i.e. when
  1274.    targetting GLibc. */
  1275. #ifndef LONG_LONG_MIN
  1276. #define LONG_LONG_MIN  LLONG_MIN
  1277. #endif
  1278. # 106 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1279.  
  1280. #ifndef LONG_LONG_MAX
  1281. #define LONG_LONG_MAX  LLONG_MAX
  1282. #endif
  1283. # 110 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1284.  
  1285. #ifndef ULONG_LONG_MAX
  1286. #define ULONG_LONG_MAX  ULLONG_MAX
  1287. #endif
  1288. # 114 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1289.  
  1290. #if defined(__USE_BSD) || defined(__BIONIC__) /* Historically bionic exposed these. */
  1291. # define UID_MAX    UINT_MAX    /* max value for a uid_t */
  1292. # define GID_MAX    UINT_MAX    /* max value for a gid_t */
  1293. #if defined(__LP64__)
  1294. #define SIZE_T_MAX ULONG_MAX
  1295. #else
  1296. # 121 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1297. #define SIZE_T_MAX UINT_MAX
  1298. #endif
  1299. # 123 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1300. #endif
  1301. # 124 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1302.  
  1303. #if defined(__LP64__)
  1304. #define SSIZE_MAX LONG_MAX
  1305. #else
  1306. # 128 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1307. #define SSIZE_MAX INT_MAX
  1308. #endif
  1309. # 130 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1310.  
  1311. #define MB_LEN_MAX 4
  1312.  
  1313. #define IOV_MAX 1024
  1314. #define SEM_VALUE_MAX 0x3fffffff
  1315.  
  1316. /* POSIX says these belong in <unistd.h> but BSD has some in <limits.h>. */
  1317. #if 0 /* expanded by -frewrite-includes */
  1318. #include <bits/posix_limits.h>
  1319. #endif /* expanded by -frewrite-includes */
  1320. # 137 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1321. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/posix_limits.h" 1 3
  1322. /*
  1323.  * Copyright (C) 2014 The Android Open Source Project
  1324.  * All rights reserved.
  1325.  *
  1326.  * Redistribution and use in source and binary forms, with or without
  1327.  * modification, are permitted provided that the following conditions
  1328.  * are met:
  1329.  *  * Redistributions of source code must retain the above copyright
  1330.  *    notice, this list of conditions and the following disclaimer.
  1331.  *  * Redistributions in binary form must reproduce the above copyright
  1332.  *    notice, this list of conditions and the following disclaimer in
  1333.  *    the documentation and/or other materials provided with the
  1334.  *    distribution.
  1335.  *
  1336.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  1337.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  1338.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  1339.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  1340.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  1341.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  1342.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  1343.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  1344.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  1345.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  1346.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1347.  * SUCH DAMAGE.
  1348.  */
  1349.  
  1350. #ifndef _BITS_POSIX_LIMITS_H_
  1351. #define _BITS_POSIX_LIMITS_H_
  1352.  
  1353. #if 0 /* expanded by -frewrite-includes */
  1354. #include <sys/cdefs.h>
  1355. #endif /* expanded by -frewrite-includes */
  1356. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/posix_limits.h" 3
  1357. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/posix_limits.h" 3
  1358.  
  1359. #define __BIONIC_POSIX_FEATURE_SINCE(level) (((__ANDROID_API__) >= level) ? 200809L : -1)
  1360.  
  1361. /* Any constant values here other than -1 or 200809L are explicitly specified by POSIX.1-2008. */
  1362. /* Keep this list sorted by name. */
  1363. #define _POSIX_ADVISORY_INFO __BIONIC_POSIX_FEATURE_SINCE(23) /* posix_memadvise arrived late. */
  1364. #define _POSIX_AIO_LISTIO_MAX       2
  1365. #define _POSIX_AIO_MAX              1
  1366. #define _POSIX_ARG_MAX              4096
  1367. #define _POSIX_ASYNCHRONOUS_IO      -1  /* not implemented */
  1368. #define _POSIX_BARRIERS __BIONIC_POSIX_FEATURE_SINCE(24)
  1369. #define _POSIX_CHILD_MAX            25
  1370. #define _POSIX_CHOWN_RESTRICTED     1  /* yes, chown requires appropriate privileges */
  1371. #define _POSIX_CLOCK_SELECTION      200809L
  1372. #define _POSIX_CPUTIME              0  /* Use sysconf to detect support at runtime. */
  1373. #define _POSIX_DELAYTIMER_MAX       32
  1374. #define _POSIX_FSYNC 200809L
  1375. #define _POSIX_HOST_NAME_MAX        255
  1376. #define _POSIX_IPV6                 200809L
  1377. #define _POSIX_JOB_CONTROL          1  /* job control is a Linux feature */
  1378. #define _POSIX_LINK_MAX             8
  1379. #define _POSIX_LOGIN_NAME_MAX       9  /* includes trailing NUL */
  1380. #define _POSIX_MAPPED_FILES         200809L  /* mmap-ed files supported */
  1381. #define _POSIX_MAX_CANON            255
  1382. #define _POSIX_MAX_INPUT            255
  1383. #define _POSIX_MEMLOCK __BIONIC_POSIX_FEATURE_SINCE(17) /* mlockall. */
  1384. #define _POSIX_MEMLOCK_RANGE        200809L /* mlock. */
  1385. #define _POSIX_MEMORY_PROTECTION    200809L
  1386. #define _POSIX_MESSAGE_PASSING      -1  /* not implemented */
  1387. #define _POSIX_MONOTONIC_CLOCK      0  /* the monotonic clock may be available; ask sysconf */
  1388. #define _POSIX_MQ_OPEN_MAX          8
  1389. #define _POSIX_MQ_PRIO_MAX          32
  1390. #define _POSIX_NAME_MAX             14
  1391. #define _POSIX_NGROUPS_MAX          8
  1392. #define _POSIX_NO_TRUNC             1  /* very long pathnames generate an error */
  1393. #define _POSIX_OPEN_MAX             20
  1394. #define _POSIX_PATH_MAX             256
  1395. #define _POSIX_PIPE_BUF             512
  1396. #define _POSIX_PRIORITY_SCHEDULING  200809L  /* priority scheduling is a Linux feature */
  1397. #define _POSIX_PRIORITIZED_IO       -1  /* not implemented */
  1398. #define _POSIX_RAW_SOCKETS          200809L
  1399. #define _POSIX_READER_WRITER_LOCKS  200809L
  1400. #define _POSIX_REALTIME_SIGNALS     200809L
  1401. #define _POSIX_REGEXP               1
  1402. #define _POSIX_RE_DUP_MAX           255
  1403. #define _POSIX_SAVED_IDS            1  /* saved user ids is a Linux feature */
  1404. #define _POSIX_SEMAPHORES           200809L
  1405. #define _POSIX_SEM_NSEMS_MAX        256
  1406. #define _POSIX_SEM_VALUE_MAX        32767
  1407. #define _POSIX_SHARED_MEMORY_OBJECTS  -1  /* shm_open()/shm_unlink() not implemented */
  1408. #define _POSIX_SHELL                1   /* system() supported */
  1409. #define _POSIX_SIGQUEUE_MAX         32
  1410. #define _POSIX_SPAWN                -1  /* not implemented */
  1411. #define _POSIX_SPIN_LOCKS __BIONIC_POSIX_FEATURE_SINCE(24)
  1412. #define _POSIX_SPORADIC_SERVER      -1  /* not implemented */
  1413. #define _POSIX_SSIZE_MAX            32767
  1414. #define _POSIX_STREAM_MAX           8
  1415. #define _POSIX_SYMLINK_MAX          255
  1416. #define _POSIX_SYMLOOP_MAX          8
  1417. #define _POSIX_SYNCHRONIZED_IO      200809L  /* synchronized i/o supported */
  1418. #define _POSIX_THREADS              200809L  /* we support threads */
  1419. #define _POSIX_THREAD_ATTR_STACKADDR  200809L
  1420. #define _POSIX_THREAD_ATTR_STACKSIZE  200809L
  1421. #define _POSIX_THREAD_CPUTIME       0  /* Use sysconf to detect support at runtime. */
  1422. #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  1423. #define _POSIX_THREAD_KEYS_MAX      128
  1424. #define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
  1425. #define _POSIX_THREAD_PRIO_INHERIT -1  /* not implemented */
  1426. #define _POSIX_THREAD_PRIO_PROTECT -1  /* not implemented */
  1427. #define _POSIX_THREAD_PROCESS_SHARED  -1  /* not implemented */
  1428. #define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1  /* not implemented */
  1429. #define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1  /* not implemented */
  1430. #define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
  1431. #define _POSIX_THREAD_SPORADIC_SERVER -1  /* not implemented */
  1432. #define _POSIX_THREAD_THREADS_MAX   64
  1433. #define _POSIX_TIMEOUTS __BIONIC_POSIX_FEATURE_SINCE(21) /* pthread_mutex_timedlock arrived late. */
  1434. #define _POSIX_TIMERS               200809L  /* Posix timers are supported */
  1435. #define _POSIX_TIMER_MAX            32
  1436. #define _POSIX_TRACE                -1  /* not implemented */
  1437. #define _POSIX_TRACE_EVENT_FILTER   -1  /* not implemented */
  1438. #define _POSIX_TRACE_INHERIT        -1  /* not implemented */
  1439. #define _POSIX_TRACE_LOG            -1  /* not implemented */
  1440. #define _POSIX_TRACE_NAME_MAX       8
  1441. #define _POSIX_TRACE_SYS_MAX        8
  1442. #define _POSIX_TRACE_USER_EVENT_MAX 32
  1443. #define _POSIX_TTY_NAME_MAX         9  /* includes trailing NUL */
  1444. #define _POSIX_TYPED_MEMORY_OBJECTS -1  /* not implemented */
  1445. #define _POSIX_TZNAME_MAX           6
  1446. #define _POSIX_VDISABLE             '\0'
  1447.  
  1448. #if defined(__LP64__)
  1449. #define _POSIX_V7_ILP32_OFF32       -1
  1450. #define _POSIX_V7_ILP32_OFFBIG      -1
  1451. #define _POSIX_V7_LP64_OFF64         1
  1452. #define _POSIX_V7_LPBIG_OFFBIG       1
  1453. #else
  1454. # 129 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/posix_limits.h" 3
  1455. #define _POSIX_V7_ILP32_OFF32        1
  1456. #define _POSIX_V7_ILP32_OFFBIG      -1
  1457. #define _POSIX_V7_LP64_OFF64        -1
  1458. #define _POSIX_V7_LPBIG_OFFBIG      -1
  1459. #endif
  1460. # 134 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/posix_limits.h" 3
  1461.  
  1462. #define _POSIX2_BC_BASE_MAX         99
  1463. #define _POSIX2_BC_DIM_MAX          2048
  1464. #define _POSIX2_BC_SCALE_MAX        99
  1465. #define _POSIX2_BC_STRING_MAX       1000
  1466. #define _POSIX2_CHARCLASS_NAME_MAX  14
  1467. #define _POSIX2_CHAR_TERM           -1  /* not implemented */
  1468. #define _POSIX2_COLL_WEIGHTS_MAX    2
  1469. #define _POSIX2_C_BIND              _POSIX_VERSION
  1470. #define _POSIX2_C_DEV               -1  /* c dev utilities not implemented */
  1471. #define _POSIX2_EXPR_NEST_MAX       32
  1472. #define _POSIX2_LINE_MAX            2048
  1473. #define _POSIX2_LOCALEDEF           -1  /* localedef utilitiy not implemented */
  1474. #define _POSIX2_RE_DUP_MAX          _POSIX_RE_DUP_MAX
  1475. #define _POSIX2_SW_DEV              -1  /* software dev utilities not implemented */
  1476. #define _POSIX2_UPE                 -1  /* user portability utilities not implemented */
  1477.  
  1478. #define _XOPEN_ENH_I18N             -1  /* we don't support internationalization in the C library */
  1479. #define _XOPEN_CRYPT                -1  /* don't support X/Open Encryption */
  1480. #define _XOPEN_IOV_MAX              16
  1481. #define _XOPEN_LEGACY               -1  /* not support all */
  1482. #define _XOPEN_REALTIME             -1 /* we don't support all these functions */
  1483. #define _XOPEN_REALTIME_THREADS     -1  /* same here */
  1484. #define _XOPEN_SHM                  -1
  1485. #define _XOPEN_UNIX                 1
  1486.  
  1487. #endif
  1488. # 161 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/posix_limits.h" 3
  1489. # 138 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 2 3
  1490.  
  1491. #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
  1492.  
  1493. #define  _POSIX_VERSION             200809L   /* Posix C language bindings version */
  1494. #define  _POSIX2_VERSION            -1        /* we don't support Posix command-line tools */
  1495. #define  _XOPEN_VERSION             700       /* by Posix definition */
  1496.  
  1497. /* >= _POSIX_THREAD_DESTRUCTOR_ITERATIONS */
  1498. #define PTHREAD_DESTRUCTOR_ITERATIONS 4
  1499. /* >= _POSIX_THREAD_KEYS_MAX */
  1500. #define PTHREAD_KEYS_MAX 128
  1501. /* bionic has no specific limit */
  1502. #undef PTHREAD_THREADS_MAX
  1503.  
  1504. #endif /* !_LIMITS_H_ */
  1505. # 153 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/limits.h" 3
  1506. # 22 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 2 3
  1507.  
  1508. __BEGIN_DECLS
  1509.  
  1510. #define HUGE_VAL    __builtin_huge_val()
  1511.  
  1512. #define FP_ILOGB0   (-INT_MAX)
  1513. #define FP_ILOGBNAN INT_MAX
  1514.  
  1515. #define HUGE_VALF   __builtin_huge_valf()
  1516. #define HUGE_VALL   __builtin_huge_vall()
  1517. #define INFINITY    __builtin_inff()
  1518. #define NAN     __builtin_nanf("")
  1519.  
  1520. #define MATH_ERRNO  1
  1521. #define MATH_ERREXCEPT  2
  1522. #define math_errhandling    MATH_ERREXCEPT
  1523.  
  1524. #if defined(__FP_FAST_FMA)
  1525. #define FP_FAST_FMA 1
  1526. #endif
  1527. # 42 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1528. #if defined(__FP_FAST_FMAF)
  1529. #define FP_FAST_FMAF 1
  1530. #endif
  1531. # 45 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1532. #if defined(__FP_FAST_FMAL)
  1533. #define FP_FAST_FMAL 1
  1534. #endif
  1535. # 48 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1536.  
  1537. /* Symbolic constants to classify floating point numbers. */
  1538. #define FP_INFINITE 0x01
  1539. #define FP_NAN      0x02
  1540. #define FP_NORMAL   0x04
  1541. #define FP_SUBNORMAL    0x08
  1542. #define FP_ZERO     0x10
  1543. #define fpclassify(x) \
  1544.     __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
  1545.  
  1546. #define isfinite(x) __builtin_isfinite(x)
  1547. #define isinf(x) __builtin_isinf(x)
  1548. #define isnan(x) __builtin_isnan(x)
  1549. #define isnormal(x) __builtin_isnormal(x)
  1550.  
  1551. #define isgreater(x, y) __builtin_isgreater((x), (y))
  1552. #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
  1553. #define isless(x, y) __builtin_isless((x), (y))
  1554. #define islessequal(x, y) __builtin_islessequal((x), (y))
  1555. #define islessgreater(x, y) __builtin_islessgreater((x), (y))
  1556. #define isunordered(x, y) __builtin_isunordered((x), (y))
  1557.  
  1558. #define signbit(x) \
  1559.     ((sizeof(x) == sizeof(float)) ? __builtin_signbitf(x) \
  1560.     : (sizeof(x) == sizeof(double)) ? __builtin_signbit(x) \
  1561.     : __builtin_signbitl(x))
  1562.  
  1563. typedef double __double_t;
  1564. typedef __double_t double_t;
  1565. typedef float __float_t;
  1566. typedef __float_t float_t;
  1567.  
  1568. #if defined(__USE_BSD)
  1569. #define HUGE MAXFLOAT
  1570. #endif
  1571. # 83 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1572.  
  1573. extern int signgam;
  1574.  
  1575. /*
  1576.  * Most of these functions depend on the rounding mode and have the side
  1577.  * effect of raising floating-point exceptions, so they are not declared
  1578.  * as __attribute_const__. In C99, FENV_ACCESS affects the purity of these functions.
  1579.  */
  1580.  
  1581. int __fpclassifyd(double) __attribute_const__;
  1582. int __fpclassifyf(float) __attribute_const__;
  1583. int __fpclassifyl(long double) __attribute_const__;
  1584. int __isfinitef(float) __attribute_const__;
  1585. int __isfinite(double) __attribute_const__;
  1586. int __isfinitel(long double) __attribute_const__;
  1587. int __isinff(float) __attribute_const__;
  1588. int __isinfl(long double) __attribute_const__;
  1589.  
  1590. #if __ANDROID_API__ >= 21
  1591. int __isnanf(float) __attribute_const__ __INTRODUCED_IN(21);
  1592. #endif /* __ANDROID_API__ >= 21 */
  1593. # 104 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1594.  
  1595. int __isnanl(long double) __attribute_const__;
  1596. int __isnormalf(float) __attribute_const__;
  1597. int __isnormal(double) __attribute_const__;
  1598. int __isnormall(long double) __attribute_const__;
  1599. int __signbit(double) __attribute_const__;
  1600. int __signbitf(float) __attribute_const__;
  1601. int __signbitl(long double) __attribute_const__;
  1602.  
  1603. double  acos(double);
  1604. double  asin(double);
  1605. double  atan(double);
  1606. double  atan2(double, double);
  1607. double  cos(double);
  1608. double  sin(double);
  1609. double  tan(double);
  1610.  
  1611. double  cosh(double);
  1612. double  sinh(double);
  1613. double  tanh(double);
  1614.  
  1615. double  exp(double);
  1616. double  frexp(double, int *);   /* fundamentally !__attribute_const__ */
  1617. double  ldexp(double, int);
  1618. double  log(double);
  1619. double  log10(double);
  1620. double  modf(double, double *); /* fundamentally !__attribute_const__ */
  1621.  
  1622. double  pow(double, double);
  1623. double  sqrt(double);
  1624.  
  1625. double  ceil(double);
  1626. double  fabs(double) __attribute_const__;
  1627. double  floor(double);
  1628. double  fmod(double, double);
  1629.  
  1630. double  acosh(double);
  1631. double  asinh(double);
  1632. double  atanh(double);
  1633. double  cbrt(double);
  1634. double  erf(double);
  1635. double  erfc(double);
  1636. double  exp2(double);
  1637. double  expm1(double);
  1638. double  fma(double, double, double);
  1639. double  hypot(double, double);
  1640. int ilogb(double) __attribute_const__;
  1641. double  lgamma(double);
  1642. long long llrint(double);
  1643. long long llround(double);
  1644. double  log1p(double);
  1645.  
  1646. #if __ANDROID_API__ >= 18
  1647. double log2(double) __INTRODUCED_IN(18);
  1648. #endif /* __ANDROID_API__ >= 18 */
  1649. # 159 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1650.  
  1651. double  logb(double);
  1652. long    lrint(double);
  1653. long    lround(double);
  1654.  
  1655.  
  1656. #if (defined(__LP64__)) || (defined(__arm__) && __ANDROID_API__ >= 13) || (defined(__mips__) && !defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__i386__))
  1657. double nan(const char*) __attribute_const__ __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_MIPS(13)
  1658.     __INTRODUCED_IN_X86(9);
  1659. #endif /* (defined(__LP64__)) || (defined(__arm__) && __ANDROID_API__ >= 13) || (defined(__mips__) && !defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__i386__)) */
  1660. # 169 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1661.  
  1662.  
  1663. double  nextafter(double, double);
  1664. double  remainder(double, double);
  1665. double  remquo(double, double, int*);
  1666. double  rint(double);
  1667.  
  1668. double  copysign(double, double) __attribute_const__;
  1669. double  fdim(double, double);
  1670. double  fmax(double, double) __attribute_const__;
  1671. double  fmin(double, double) __attribute_const__;
  1672. double  nearbyint(double);
  1673. double  round(double);
  1674. double scalbln(double, long) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
  1675. double scalbn(double, int);
  1676. double  tgamma(double);
  1677. double  trunc(double);
  1678.  
  1679. float   acosf(float);
  1680. float   asinf(float);
  1681. float   atanf(float);
  1682. float   atan2f(float, float);
  1683. float   cosf(float);
  1684. float   sinf(float);
  1685. float   tanf(float);
  1686.  
  1687. float   coshf(float);
  1688. float   sinhf(float);
  1689. float   tanhf(float);
  1690.  
  1691. float   exp2f(float);
  1692. float   expf(float);
  1693. float   expm1f(float);
  1694. float   frexpf(float, int *);   /* fundamentally !__attribute_const__ */
  1695. int ilogbf(float) __attribute_const__;
  1696. float   ldexpf(float, int);
  1697. float   log10f(float);
  1698. float   log1pf(float);
  1699.  
  1700. #if __ANDROID_API__ >= 18
  1701. float log2f(float) __INTRODUCED_IN(18);
  1702. #endif /* __ANDROID_API__ >= 18 */
  1703. # 211 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1704.  
  1705. float   logf(float);
  1706. float   modff(float, float *);  /* fundamentally !__attribute_const__ */
  1707.  
  1708. float   powf(float, float);
  1709. float   sqrtf(float);
  1710.  
  1711. float   ceilf(float);
  1712. float   fabsf(float) __attribute_const__;
  1713. float   floorf(float);
  1714. float   fmodf(float, float);
  1715. float   roundf(float);
  1716.  
  1717. float   erff(float);
  1718. float   erfcf(float);
  1719. float   hypotf(float, float);
  1720. float   lgammaf(float);
  1721.  
  1722. #if (defined(__LP64__)) || (defined(__arm__) && __ANDROID_API__ >= 13) || (defined(__mips__) && !defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__i386__))
  1723. float tgammaf(float) __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_MIPS(13) __INTRODUCED_IN_X86(9);
  1724. #endif /* (defined(__LP64__)) || (defined(__arm__) && __ANDROID_API__ >= 13) || (defined(__mips__) && !defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__i386__)) */
  1725. # 232 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1726.  
  1727.  
  1728. float   acoshf(float);
  1729. float   asinhf(float);
  1730. float   atanhf(float);
  1731. float   cbrtf(float);
  1732. float   logbf(float);
  1733. float   copysignf(float, float) __attribute_const__;
  1734. long long llrintf(float);
  1735. long long llroundf(float);
  1736. long    lrintf(float);
  1737. long    lroundf(float);
  1738.  
  1739. #if (defined(__LP64__)) || (defined(__arm__) && __ANDROID_API__ >= 13) || (defined(__mips__) && !defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__i386__))
  1740. float nanf(const char*) __attribute_const__ __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_MIPS(13)
  1741.     __INTRODUCED_IN_X86(9);
  1742. #endif /* (defined(__LP64__)) || (defined(__arm__) && __ANDROID_API__ >= 13) || (defined(__mips__) && !defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__i386__)) */
  1743. # 249 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1744.  
  1745. float   nearbyintf(float);
  1746. float   nextafterf(float, float);
  1747. float   remainderf(float, float);
  1748. float   remquof(float, float, int *);
  1749. float   rintf(float);
  1750. float   scalblnf(float, long) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
  1751. float scalbnf(float, int);
  1752. float   truncf(float);
  1753.  
  1754. float   fdimf(float, float);
  1755. float   fmaf(float, float, float);
  1756. float   fmaxf(float, float) __attribute_const__;
  1757. float   fminf(float, float) __attribute_const__;
  1758.  
  1759.  
  1760. #if __ANDROID_API__ >= 21
  1761. long double acoshl(long double) __INTRODUCED_IN(21);
  1762. long double acosl(long double) __INTRODUCED_IN(21);
  1763. long double asinhl(long double) __INTRODUCED_IN(21);
  1764. long double asinl(long double) __INTRODUCED_IN(21);
  1765. long double atan2l(long double, long double) __INTRODUCED_IN(21);
  1766. long double atanhl(long double) __INTRODUCED_IN(21);
  1767. long double atanl(long double) __INTRODUCED_IN(21);
  1768. long double cbrtl(long double) __INTRODUCED_IN(21);
  1769. #endif /* __ANDROID_API__ >= 21 */
  1770. # 275 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1771.  
  1772. long double ceill(long double);
  1773. long double copysignl(long double, long double) __attribute_const__;
  1774.  
  1775. #if __ANDROID_API__ >= 21
  1776. long double coshl(long double) __INTRODUCED_IN(21);
  1777. long double cosl(long double) __INTRODUCED_IN(21);
  1778. long double erfcl(long double) __INTRODUCED_IN(21);
  1779. long double erfl(long double) __INTRODUCED_IN(21);
  1780. long double exp2l(long double) __INTRODUCED_IN(21);
  1781. long double expl(long double) __INTRODUCED_IN(21);
  1782. long double expm1l(long double) __INTRODUCED_IN(21);
  1783. #endif /* __ANDROID_API__ >= 21 */
  1784. # 288 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1785.  
  1786. long double fabsl(long double) __attribute_const__;
  1787. long double fdiml(long double, long double);
  1788. long double floorl(long double);
  1789. long double fmal(long double, long double, long double) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
  1790. long double fmaxl(long double, long double) __attribute_const__;
  1791. long double fminl(long double, long double) __attribute_const__;
  1792.  
  1793. #if __ANDROID_API__ >= 21
  1794. long double fmodl(long double, long double) __INTRODUCED_IN(21);
  1795. #endif /* __ANDROID_API__ >= 21 */
  1796. # 299 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1797.  
  1798. long double frexpl(long double value, int*)
  1799.     __INTRODUCED_IN(21) __VERSIONER_NO_GUARD; /* fundamentally !__attribute_const__ */
  1800.  
  1801. #if __ANDROID_API__ >= 21
  1802. long double hypotl(long double, long double) __INTRODUCED_IN(21);
  1803. #endif /* __ANDROID_API__ >= 21 */
  1804. # 306 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1805.  
  1806. int ilogbl(long double) __attribute_const__;
  1807. long double ldexpl(long double, int);
  1808.  
  1809. #if __ANDROID_API__ >= 21
  1810. long double lgammal(long double) __INTRODUCED_IN(21);
  1811. long long llrintl(long double) __INTRODUCED_IN(21);
  1812. #endif /* __ANDROID_API__ >= 21 */
  1813. # 314 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1814.  
  1815. long long llroundl(long double);
  1816.  
  1817. #if __ANDROID_API__ >= 21
  1818. long double log10l(long double) __INTRODUCED_IN(21);
  1819. long double log1pl(long double) __INTRODUCED_IN(21);
  1820. #endif /* __ANDROID_API__ >= 21 */
  1821. # 321 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1822.  
  1823.  
  1824. #if __ANDROID_API__ >= 18
  1825. long double log2l(long double) __INTRODUCED_IN(18);
  1826. long double logbl(long double) __INTRODUCED_IN(18);
  1827. #endif /* __ANDROID_API__ >= 18 */
  1828. # 327 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1829.  
  1830.  
  1831. #if __ANDROID_API__ >= 21
  1832. long double logl(long double) __INTRODUCED_IN(21);
  1833. long lrintl(long double) __INTRODUCED_IN(21);
  1834. #endif /* __ANDROID_API__ >= 21 */
  1835. # 333 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1836.  
  1837. long lroundl(long double);
  1838.  
  1839. #if __ANDROID_API__ >= 21
  1840. long double modfl(long double, long double*) __INTRODUCED_IN(21);
  1841. #endif /* __ANDROID_API__ >= 21 */
  1842. # 339 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1843.  /* fundamentally !__attribute_const__ */
  1844.  
  1845. #if __ANDROID_API__ >= 13
  1846. long double nanl(const char*) __attribute_const__ __INTRODUCED_IN(13);
  1847. #endif /* __ANDROID_API__ >= 13 */
  1848. # 344 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1849.  
  1850.  
  1851. #if __ANDROID_API__ >= 21
  1852. long double nearbyintl(long double) __INTRODUCED_IN(21);
  1853. #endif /* __ANDROID_API__ >= 21 */
  1854. # 349 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1855.  
  1856. long double nextafterl(long double, long double) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
  1857. double nexttoward(double, long double) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
  1858. float nexttowardf(float, long double);
  1859. long double nexttowardl(long double, long double) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
  1860.  
  1861. #if __ANDROID_API__ >= 21
  1862. long double powl(long double, long double) __INTRODUCED_IN(21);
  1863. long double remainderl(long double, long double) __INTRODUCED_IN(21);
  1864. long double remquol(long double, long double, int*) __INTRODUCED_IN(21);
  1865. long double rintl(long double) __INTRODUCED_IN(21);
  1866. #endif /* __ANDROID_API__ >= 21 */
  1867. # 361 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1868.  
  1869. long double roundl(long double);
  1870. long double scalblnl(long double, long) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
  1871. long double scalbnl(long double, int);
  1872.  
  1873. #if __ANDROID_API__ >= 21
  1874. long double sinhl(long double) __INTRODUCED_IN(21);
  1875. long double sinl(long double) __INTRODUCED_IN(21);
  1876. long double sqrtl(long double) __INTRODUCED_IN(21);
  1877. long double tanhl(long double) __INTRODUCED_IN(21);
  1878. long double tanl(long double) __INTRODUCED_IN(21);
  1879. long double tgammal(long double) __INTRODUCED_IN(21);
  1880. #endif /* __ANDROID_API__ >= 21 */
  1881. # 374 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1882.  
  1883. long double truncl(long double);
  1884.  
  1885. double j0(double);
  1886. double j1(double);
  1887. double jn(int, double);
  1888. double y0(double);
  1889. double y1(double);
  1890. double yn(int, double);
  1891.  
  1892. #define M_E     2.7182818284590452354   /* e */
  1893. #define M_LOG2E     1.4426950408889634074   /* log 2e */
  1894. #define M_LOG10E    0.43429448190325182765  /* log 10e */
  1895. #define M_LN2       0.69314718055994530942  /* log e2 */
  1896. #define M_LN10      2.30258509299404568402  /* log e10 */
  1897. #define M_PI        3.14159265358979323846  /* pi */
  1898. #define M_PI_2      1.57079632679489661923  /* pi/2 */
  1899. #define M_PI_4      0.78539816339744830962  /* pi/4 */
  1900. #define M_1_PI      0.31830988618379067154  /* 1/pi */
  1901. #define M_2_PI      0.63661977236758134308  /* 2/pi */
  1902. #define M_2_SQRTPI  1.12837916709551257390  /* 2/sqrt(pi) */
  1903. #define M_SQRT2     1.41421356237309504880  /* sqrt(2) */
  1904. #define M_SQRT1_2   0.70710678118654752440  /* 1/sqrt(2) */
  1905.  
  1906. #define MAXFLOAT    ((float)3.40282346638528860e+38)
  1907.  
  1908. #if defined(__USE_BSD) || defined(__USE_GNU)
  1909. double gamma(double);
  1910. double scalb(double, double);
  1911. double drem(double, double);
  1912. int finite(double) __attribute_const__;
  1913. int isnanf(float) __attribute_const__;
  1914. double gamma_r(double, int*);
  1915. double lgamma_r(double, int*);
  1916. double significand(double);
  1917.  
  1918. #if __ANDROID_API__ >= 23
  1919. long double lgammal_r(long double, int*) __INTRODUCED_IN(23);
  1920. #endif /* __ANDROID_API__ >= 23 */
  1921. # 413 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1922.  
  1923.  
  1924. #if __ANDROID_API__ >= 21
  1925. long double significandl(long double) __INTRODUCED_IN(21);
  1926. #endif /* __ANDROID_API__ >= 21 */
  1927. # 418 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1928.  
  1929. float dremf(float, float);
  1930. int finitef(float) __attribute_const__;
  1931. float gammaf(float);
  1932. float j0f(float);
  1933. float j1f(float);
  1934. float jnf(int, float);
  1935. float scalbf(float, float);
  1936. float y0f(float);
  1937. float y1f(float);
  1938. float ynf(int, float);
  1939. float gammaf_r(float, int *);
  1940. float lgammaf_r(float, int *);
  1941. float significandf(float);
  1942. #endif
  1943. # 433 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1944.  
  1945. #if defined(__USE_GNU)
  1946. #define M_El            2.718281828459045235360287471352662498L /* e */
  1947. #define M_LOG2El        1.442695040888963407359924681001892137L /* log 2e */
  1948. #define M_LOG10El       0.434294481903251827651128918916605082L /* log 10e */
  1949. #define M_LN2l          0.693147180559945309417232121458176568L /* log e2 */
  1950. #define M_LN10l         2.302585092994045684017991454684364208L /* log e10 */
  1951. #define M_PIl           3.141592653589793238462643383279502884L /* pi */
  1952. #define M_PI_2l         1.570796326794896619231321691639751442L /* pi/2 */
  1953. #define M_PI_4l         0.785398163397448309615660845819875721L /* pi/4 */
  1954. #define M_1_PIl         0.318309886183790671537767526745028724L /* 1/pi */
  1955. #define M_2_PIl         0.636619772367581343075535053490057448L /* 2/pi */
  1956. #define M_2_SQRTPIl     1.128379167095512573896158903121545172L /* 2/sqrt(pi) */
  1957. #define M_SQRT2l        1.414213562373095048801688724209698079L /* sqrt(2) */
  1958. #define M_SQRT1_2l      0.707106781186547524400844362104849039L /* 1/sqrt(2) */
  1959. void sincos(double, double*, double*);
  1960. void sincosf(float, float*, float*);
  1961. void sincosl(long double, long double*, long double*);
  1962. #endif
  1963. # 452 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1964.  
  1965. __END_DECLS
  1966.  
  1967. #endif /* !_MATH_H_ */
  1968. # 456 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/math.h" 3
  1969. # 18 "packages/apps/Gallery2/jni/filters/edge.c" 2
  1970. #if 0 /* expanded by -frewrite-includes */
  1971. #include "filters.h"
  1972. #endif /* expanded by -frewrite-includes */
  1973. # 18 "packages/apps/Gallery2/jni/filters/edge.c"
  1974. # 1 "packages/apps/Gallery2/jni/filters/filters.h" 1
  1975. /*
  1976.  * Copyright (C) 2012 The Android Open Source Project
  1977.  *
  1978.  * Licensed under the Apache License, Version 2.0 (the "License");
  1979.  * you may not use this file except in compliance with the License.
  1980.  * You may obtain a copy of the License at
  1981.  *
  1982.  *      http://www.apache.org/licenses/LICENSE-2.0
  1983.  *
  1984.  * Unless required by applicable law or agreed to in writing, software
  1985.  * distributed under the License is distributed on an "AS IS" BASIS,
  1986.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1987.  * See the License for the specific language governing permissions and
  1988.  * limitations under the License.
  1989.  */
  1990.  
  1991. #ifndef FILTERS_H
  1992. #define FILTERS_H
  1993.  
  1994. #if 0 /* expanded by -frewrite-includes */
  1995. #include <jni.h>
  1996. #endif /* expanded by -frewrite-includes */
  1997. # 20 "packages/apps/Gallery2/jni/filters/filters.h"
  1998. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 1 3
  1999. /*
  2000.  * Copyright (C) 2006 The Android Open Source Project
  2001.  *
  2002.  * Licensed under the Apache License, Version 2.0 (the "License");
  2003.  * you may not use this file except in compliance with the License.
  2004.  * You may obtain a copy of the License at
  2005.  *
  2006.  *      http://www.apache.org/licenses/LICENSE-2.0
  2007.  *
  2008.  * Unless required by applicable law or agreed to in writing, software
  2009.  * distributed under the License is distributed on an "AS IS" BASIS,
  2010.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  2011.  * See the License for the specific language governing permissions and
  2012.  * limitations under the License.
  2013.  */
  2014.  
  2015. /*
  2016.  * JNI specification, as defined by Sun:
  2017.  * http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html
  2018.  *
  2019.  * Everything here is expected to be VM-neutral.
  2020.  */
  2021.  
  2022. #ifndef JNI_H_
  2023. #define JNI_H_
  2024.  
  2025. #if 0 /* expanded by -frewrite-includes */
  2026. #include <stdarg.h>
  2027. #endif /* expanded by -frewrite-includes */
  2028. # 27 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  2029. # 1 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stdarg.h" 1 3
  2030. /*===---- stdarg.h - Variable argument handling ----------------------------===
  2031.  *
  2032.  * Copyright (c) 2008 Eli Friedman
  2033.  *
  2034.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  2035.  * of this software and associated documentation files (the "Software"), to deal
  2036.  * in the Software without restriction, including without limitation the rights
  2037.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  2038.  * copies of the Software, and to permit persons to whom the Software is
  2039.  * furnished to do so, subject to the following conditions:
  2040.  *
  2041.  * The above copyright notice and this permission notice shall be included in
  2042.  * all copies or substantial portions of the Software.
  2043.  *
  2044.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  2045.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  2046.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  2047.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  2048.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  2049.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  2050.  * THE SOFTWARE.
  2051.  *
  2052.  *===-----------------------------------------------------------------------===
  2053.  */
  2054.  
  2055. #ifndef __STDARG_H
  2056. #define __STDARG_H
  2057.  
  2058. #ifndef _VA_LIST
  2059. typedef __builtin_va_list va_list;
  2060. #define _VA_LIST
  2061. #endif
  2062. # 33 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stdarg.h" 3
  2063. #define va_start(ap, param) __builtin_va_start(ap, param)
  2064. #define va_end(ap)          __builtin_va_end(ap)
  2065. #define va_arg(ap, type)    __builtin_va_arg(ap, type)
  2066.  
  2067. /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode
  2068.  * or -ansi is not specified, since it was not part of C90.
  2069.  */
  2070. #define __va_copy(d,s) __builtin_va_copy(d,s)
  2071.  
  2072. #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__)
  2073. #define va_copy(dest, src)  __builtin_va_copy(dest, src)
  2074. #endif
  2075. # 45 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stdarg.h" 3
  2076.  
  2077. /* Hack required to make standard headers work, at least on Ubuntu */
  2078. #ifndef __GNUC_VA_LIST
  2079. #define __GNUC_VA_LIST 1
  2080. #endif
  2081. # 50 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stdarg.h" 3
  2082. typedef __builtin_va_list __gnuc_va_list;
  2083.  
  2084. #endif /* __STDARG_H */
  2085. # 53 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stdarg.h" 3
  2086. # 28 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 2 3
  2087. #if 0 /* expanded by -frewrite-includes */
  2088. #include <stdint.h>
  2089. #endif /* expanded by -frewrite-includes */
  2090. # 28 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  2091. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 1 3
  2092. /*
  2093.  * Copyright (C) 2008 The Android Open Source Project
  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.  *  * Redistributions of source code must retain the above copyright
  2100.  *    notice, this list of conditions and the following disclaimer.
  2101.  *  * Redistributions in binary form must reproduce the above copyright
  2102.  *    notice, this list of conditions and the following disclaimer in
  2103.  *    the documentation and/or other materials provided with the
  2104.  *    distribution.
  2105.  *
  2106.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  2107.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  2108.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  2109.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  2110.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  2111.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  2112.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  2113.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  2114.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  2115.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  2116.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2117.  * SUCH DAMAGE.
  2118.  */
  2119.  
  2120. #ifndef _STDINT_H
  2121. #define _STDINT_H
  2122.  
  2123. #if 0 /* expanded by -frewrite-includes */
  2124. #include <bits/wchar_limits.h>
  2125. #endif /* expanded by -frewrite-includes */
  2126. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2127. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/wchar_limits.h" 1 3
  2128. /*
  2129.  * Copyright (C) 2014 The Android Open Source Project
  2130.  * All rights reserved.
  2131.  *
  2132.  * Redistribution and use in source and binary forms, with or without
  2133.  * modification, are permitted provided that the following conditions
  2134.  * are met:
  2135.  *  * Redistributions of source code must retain the above copyright
  2136.  *    notice, this list of conditions and the following disclaimer.
  2137.  *  * Redistributions in binary form must reproduce the above copyright
  2138.  *    notice, this list of conditions and the following disclaimer in
  2139.  *    the documentation and/or other materials provided with the
  2140.  *    distribution.
  2141.  *
  2142.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  2143.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  2144.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  2145.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  2146.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  2147.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  2148.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  2149.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  2150.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  2151.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  2152.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2153.  * SUCH DAMAGE.
  2154.  */
  2155.  
  2156. #ifndef _BITS_WCHAR_LIMITS_H_
  2157. #define _BITS_WCHAR_LIMITS_H_
  2158.  
  2159. #if 0 /* expanded by -frewrite-includes */
  2160. #include <sys/cdefs.h>
  2161. #endif /* expanded by -frewrite-includes */
  2162. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/wchar_limits.h" 3
  2163. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/wchar_limits.h" 3
  2164.  
  2165. /* Both GCC and clang define __WCHAR_MAX__. */
  2166. #define WCHAR_MAX __WCHAR_MAX__
  2167.  
  2168. /* As of 3.4, clang still doesn't define __WCHAR_MIN__. */
  2169. #if defined(__WCHAR_UNSIGNED__)
  2170. #  define WCHAR_MIN L'\0'
  2171. #else
  2172. # 41 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/wchar_limits.h" 3
  2173. #  define WCHAR_MIN (-(WCHAR_MAX) - 1)
  2174. #endif
  2175. # 43 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/wchar_limits.h" 3
  2176.  
  2177. #endif
  2178. # 45 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/wchar_limits.h" 3
  2179. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 2 3
  2180. #if 0 /* expanded by -frewrite-includes */
  2181. #include <stddef.h>
  2182. #endif /* expanded by -frewrite-includes */
  2183. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2184. # 1 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 1 3
  2185. /*===---- stddef.h - Basic type definitions --------------------------------===
  2186.  *
  2187.  * Copyright (c) 2008 Eli Friedman
  2188.  *
  2189.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  2190.  * of this software and associated documentation files (the "Software"), to deal
  2191.  * in the Software without restriction, including without limitation the rights
  2192.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  2193.  * copies of the Software, and to permit persons to whom the Software is
  2194.  * furnished to do so, subject to the following conditions:
  2195.  *
  2196.  * The above copyright notice and this permission notice shall be included in
  2197.  * all copies or substantial portions of the Software.
  2198.  *
  2199.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  2200.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  2201.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  2202.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  2203.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  2204.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  2205.  * THE SOFTWARE.
  2206.  *
  2207.  *===-----------------------------------------------------------------------===
  2208.  */
  2209.  
  2210. #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) ||                       \
  2211.     defined(__need_size_t) || defined(__need_wchar_t) ||                       \
  2212.     defined(__need_NULL) || defined(__need_wint_t)
  2213.  
  2214. #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) &&                   \
  2215.     !defined(__need_wchar_t) && !defined(__need_NULL) &&                       \
  2216.     !defined(__need_wint_t)
  2217. /* Always define miscellaneous pieces when modules are available. */
  2218. #if !__has_feature(modules)
  2219. #define __STDDEF_H
  2220. #endif
  2221. # 37 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2222. #define __need_ptrdiff_t
  2223. #define __need_size_t
  2224. #define __need_wchar_t
  2225. #define __need_NULL
  2226. #define __need_STDDEF_H_misc
  2227. /* __need_wint_t is intentionally not defined here. */
  2228. #endif
  2229. # 44 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2230.  
  2231. #if defined(__need_ptrdiff_t)
  2232. #if !defined(_PTRDIFF_T) || __has_feature(modules)
  2233. /* Always define ptrdiff_t when modules are available. */
  2234. #if !__has_feature(modules)
  2235. #define _PTRDIFF_T
  2236. #endif
  2237. # 51 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2238. typedef __PTRDIFF_TYPE__ ptrdiff_t;
  2239. #endif
  2240. # 53 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2241. #undef __need_ptrdiff_t
  2242. #endif /* defined(__need_ptrdiff_t) */
  2243. # 55 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2244.  
  2245. #if defined(__need_size_t)
  2246. #if !defined(_SIZE_T) || __has_feature(modules)
  2247. /* Always define size_t when modules are available. */
  2248. #if !__has_feature(modules)
  2249. #define _SIZE_T
  2250. #endif
  2251. # 62 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2252. typedef __SIZE_TYPE__ size_t;
  2253. #endif
  2254. # 64 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2255. #undef __need_size_t
  2256. #endif /*defined(__need_size_t) */
  2257. # 66 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2258.  
  2259. #if defined(__need_STDDEF_H_misc)
  2260. /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
  2261.  * enabled. */
  2262. #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
  2263.      !defined(_RSIZE_T)) || __has_feature(modules)
  2264. /* Always define rsize_t when modules are available. */
  2265. #if !__has_feature(modules)
  2266. #define _RSIZE_T
  2267. #endif
  2268. # 76 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2269. typedef __SIZE_TYPE__ rsize_t;
  2270. #endif
  2271. # 78 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2272. #endif /* defined(__need_STDDEF_H_misc) */
  2273. # 79 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2274.  
  2275. #if defined(__need_wchar_t)
  2276. #ifndef __cplusplus
  2277. /* Always define wchar_t when modules are available. */
  2278. #if !defined(_WCHAR_T) || __has_feature(modules)
  2279. #if !__has_feature(modules)
  2280. #define _WCHAR_T
  2281. #if defined(_MSC_EXTENSIONS)
  2282. #define _WCHAR_T_DEFINED
  2283. #endif
  2284. # 89 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2285. #endif
  2286. # 90 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2287. typedef __WCHAR_TYPE__ wchar_t;
  2288. #endif
  2289. # 92 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2290. #endif
  2291. # 93 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2292. #undef __need_wchar_t
  2293. #endif /* defined(__need_wchar_t) */
  2294. # 95 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2295.  
  2296. #if defined(__need_NULL)
  2297. #undef NULL
  2298. #ifdef __cplusplus
  2299. #  if !defined(__MINGW32__) && !defined(_MSC_VER)
  2300. #    define NULL __null
  2301. #  else
  2302. # 102 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2303. #    define NULL 0
  2304. #  endif
  2305. # 104 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2306. #else
  2307. # 105 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2308. #  define NULL ((void*)0)
  2309. #endif
  2310. # 107 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2311. #ifdef __cplusplus
  2312. #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
  2313. namespace std { typedef decltype(nullptr) nullptr_t; }
  2314. using ::std::nullptr_t;
  2315. #endif
  2316. # 112 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2317. #endif
  2318. # 113 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2319. #undef __need_NULL
  2320. #endif /* defined(__need_NULL) */
  2321. # 115 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2322.  
  2323. #if defined(__need_STDDEF_H_misc)
  2324. #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
  2325. #if 0 /* expanded by -frewrite-includes */
  2326. #include "__stddef_max_align_t.h"
  2327. #endif /* expanded by -frewrite-includes */
  2328. # 118 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2329. # 119 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2330. #endif
  2331. # 120 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2332. #define offsetof(t, d) __builtin_offsetof(t, d)
  2333. #undef __need_STDDEF_H_misc
  2334. #endif  /* defined(__need_STDDEF_H_misc) */
  2335. # 123 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2336.  
  2337. /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
  2338. __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
  2339. #if defined(__need_wint_t)
  2340. /* Always define wint_t when modules are available. */
  2341. #if !defined(_WINT_T) || __has_feature(modules)
  2342. #if !__has_feature(modules)
  2343. #define _WINT_T
  2344. #endif
  2345. # 132 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2346. typedef __WINT_TYPE__ wint_t;
  2347. #endif
  2348. # 134 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2349. #undef __need_wint_t
  2350. #endif /* __need_wint_t */
  2351. # 136 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2352.  
  2353. #endif
  2354. # 138 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  2355. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 2 3
  2356. #if 0 /* expanded by -frewrite-includes */
  2357. #include <sys/cdefs.h>
  2358. #endif /* expanded by -frewrite-includes */
  2359. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2360. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2361.  
  2362. typedef signed char __int8_t;
  2363. typedef unsigned char __uint8_t;
  2364. typedef short __int16_t;
  2365. typedef unsigned short __uint16_t;
  2366. typedef int __int32_t;
  2367. typedef unsigned int __uint32_t;
  2368. #if defined(__LP64__)
  2369. typedef long __int64_t;
  2370. typedef unsigned long __uint64_t;
  2371. #else
  2372. # 46 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2373. typedef long long __int64_t;
  2374. typedef unsigned long long __uint64_t;
  2375. #endif
  2376. # 49 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2377.  
  2378. #if defined(__LP64__)
  2379. typedef long __intptr_t;
  2380. typedef unsigned long __uintptr_t;
  2381. #else
  2382. # 54 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2383. typedef int __intptr_t;
  2384. typedef unsigned int __uintptr_t;
  2385. #endif
  2386. # 57 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2387.  
  2388. typedef __int8_t      int8_t;
  2389. typedef __uint8_t     uint8_t;
  2390.  
  2391. typedef __int16_t     int16_t;
  2392. typedef __uint16_t    uint16_t;
  2393.  
  2394. typedef __int32_t     int32_t;
  2395. typedef __uint32_t    uint32_t;
  2396.  
  2397. typedef __int64_t     int64_t;
  2398. typedef __uint64_t    uint64_t;
  2399.  
  2400. typedef __intptr_t    intptr_t;
  2401. typedef __uintptr_t   uintptr_t;
  2402.  
  2403. typedef int8_t        int_least8_t;
  2404. typedef uint8_t       uint_least8_t;
  2405.  
  2406. typedef int16_t       int_least16_t;
  2407. typedef uint16_t      uint_least16_t;
  2408.  
  2409. typedef int32_t       int_least32_t;
  2410. typedef uint32_t      uint_least32_t;
  2411.  
  2412. typedef int64_t       int_least64_t;
  2413. typedef uint64_t      uint_least64_t;
  2414.  
  2415. typedef int8_t        int_fast8_t;
  2416. typedef uint8_t       uint_fast8_t;
  2417.  
  2418. typedef int64_t       int_fast64_t;
  2419. typedef uint64_t      uint_fast64_t;
  2420.  
  2421. #if defined(__LP64__)
  2422. typedef int64_t       int_fast16_t;
  2423. typedef uint64_t      uint_fast16_t;
  2424. typedef int64_t       int_fast32_t;
  2425. typedef uint64_t      uint_fast32_t;
  2426. #else
  2427. # 97 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2428. typedef int32_t       int_fast16_t;
  2429. typedef uint32_t      uint_fast16_t;
  2430. typedef int32_t       int_fast32_t;
  2431. typedef uint32_t      uint_fast32_t;
  2432. #endif
  2433. # 102 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2434.  
  2435. typedef uint64_t      uintmax_t;
  2436. typedef int64_t       intmax_t;
  2437.  
  2438. /* Keep the kernel from trying to define these types... */
  2439. #define __BIT_TYPES_DEFINED__
  2440.  
  2441. #define INT8_C(c)         c
  2442. #define INT_LEAST8_C(c)   INT8_C(c)
  2443. #define INT_FAST8_C(c)    INT8_C(c)
  2444.  
  2445. #define UINT8_C(c)        c
  2446. #define UINT_LEAST8_C(c)  UINT8_C(c)
  2447. #define UINT_FAST8_C(c)   UINT8_C(c)
  2448.  
  2449. #define INT16_C(c)        c
  2450. #define INT_LEAST16_C(c)  INT16_C(c)
  2451. #define INT_FAST16_C(c)   INT32_C(c)
  2452.  
  2453. #define UINT16_C(c)       c
  2454. #define UINT_LEAST16_C(c) UINT16_C(c)
  2455. #define UINT_FAST16_C(c)  UINT32_C(c)
  2456. #define INT32_C(c)        c
  2457. #define INT_LEAST32_C(c)  INT32_C(c)
  2458. #define INT_FAST32_C(c)   INT32_C(c)
  2459.  
  2460. #define UINT32_C(c)       c ## U
  2461. #define UINT_LEAST32_C(c) UINT32_C(c)
  2462. #define UINT_FAST32_C(c)  UINT32_C(c)
  2463. #define INT_LEAST64_C(c)  INT64_C(c)
  2464. #define INT_FAST64_C(c)   INT64_C(c)
  2465.  
  2466. #define UINT_LEAST64_C(c) UINT64_C(c)
  2467. #define UINT_FAST64_C(c)  UINT64_C(c)
  2468.  
  2469. #define INTMAX_C(c)       INT64_C(c)
  2470. #define UINTMAX_C(c)      UINT64_C(c)
  2471.  
  2472. #if defined(__LP64__)
  2473. #  define INT64_C(c)      c ## L
  2474. #  define UINT64_C(c)     c ## UL
  2475. #  define INTPTR_C(c)     INT64_C(c)
  2476. #  define UINTPTR_C(c)    UINT64_C(c)
  2477. #  define PTRDIFF_C(c)    INT64_C(c)
  2478. #else
  2479. # 147 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2480. #  define INT64_C(c)      c ## LL
  2481. #  define UINT64_C(c)     c ## ULL
  2482. #  define INTPTR_C(c)     INT32_C(c)
  2483. #  define UINTPTR_C(c)    UINT32_C(c)
  2484. #  define PTRDIFF_C(c)    INT32_C(c)
  2485. #endif
  2486. # 153 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2487.  
  2488. #define INT8_MIN         (-128)
  2489. #define INT8_MAX         (127)
  2490. #define INT_LEAST8_MIN   INT8_MIN
  2491. #define INT_LEAST8_MAX   INT8_MAX
  2492. #define INT_FAST8_MIN    INT8_MIN
  2493. #define INT_FAST8_MAX    INT8_MAX
  2494.  
  2495. #define UINT8_MAX        (255)
  2496. #define UINT_LEAST8_MAX  UINT8_MAX
  2497. #define UINT_FAST8_MAX   UINT8_MAX
  2498.  
  2499. #define INT16_MIN        (-32768)
  2500. #define INT16_MAX        (32767)
  2501. #define INT_LEAST16_MIN  INT16_MIN
  2502. #define INT_LEAST16_MAX  INT16_MAX
  2503. #define INT_FAST16_MIN   INT32_MIN
  2504. #define INT_FAST16_MAX   INT32_MAX
  2505.  
  2506. #define UINT16_MAX       (65535)
  2507. #define UINT_LEAST16_MAX UINT16_MAX
  2508. #define UINT_FAST16_MAX  UINT32_MAX
  2509.  
  2510. #define INT32_MIN        (-2147483647-1)
  2511. #define INT32_MAX        (2147483647)
  2512. #define INT_LEAST32_MIN  INT32_MIN
  2513. #define INT_LEAST32_MAX  INT32_MAX
  2514. #define INT_FAST32_MIN   INT32_MIN
  2515. #define INT_FAST32_MAX   INT32_MAX
  2516.  
  2517. #define UINT32_MAX       (4294967295U)
  2518. #define UINT_LEAST32_MAX UINT32_MAX
  2519. #define UINT_FAST32_MAX  UINT32_MAX
  2520.  
  2521. #define INT64_MIN        (INT64_C(-9223372036854775807)-1)
  2522. #define INT64_MAX        (INT64_C(9223372036854775807))
  2523. #define INT_LEAST64_MIN  INT64_MIN
  2524. #define INT_LEAST64_MAX  INT64_MAX
  2525. #define INT_FAST64_MIN   INT64_MIN
  2526. #define INT_FAST64_MAX   INT64_MAX
  2527. #define UINT64_MAX       (UINT64_C(18446744073709551615))
  2528.  
  2529. #define UINT_LEAST64_MAX UINT64_MAX
  2530. #define UINT_FAST64_MAX  UINT64_MAX
  2531.  
  2532. #define INTMAX_MIN       INT64_MIN
  2533. #define INTMAX_MAX       INT64_MAX
  2534. #define UINTMAX_MAX      UINT64_MAX
  2535.  
  2536. #define SIG_ATOMIC_MAX   INT32_MAX
  2537. #define SIG_ATOMIC_MIN   INT32_MIN
  2538.  
  2539. #if defined(__WINT_UNSIGNED__)
  2540. #  define WINT_MAX       UINT32_MAX
  2541. #  define WINT_MIN       0
  2542. #else
  2543. # 209 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2544. #  define WINT_MAX       INT32_MAX
  2545. #  define WINT_MIN       INT32_MIN
  2546. #endif
  2547. # 212 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2548.  
  2549. #if defined(__LP64__)
  2550. #  define INTPTR_MIN     INT64_MIN
  2551. #  define INTPTR_MAX     INT64_MAX
  2552. #  define UINTPTR_MAX    UINT64_MAX
  2553. #  define PTRDIFF_MIN    INT64_MIN
  2554. #  define PTRDIFF_MAX    INT64_MAX
  2555. #  define SIZE_MAX       UINT64_MAX
  2556. #else
  2557. # 221 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2558. #  define INTPTR_MIN     INT32_MIN
  2559. #  define INTPTR_MAX     INT32_MAX
  2560. #  define UINTPTR_MAX    UINT32_MAX
  2561. #  define PTRDIFF_MIN    INT32_MIN
  2562. #  define PTRDIFF_MAX    INT32_MAX
  2563. #  define SIZE_MAX       UINT32_MAX
  2564. #endif
  2565. # 228 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2566.  
  2567. #endif /* _STDINT_H */
  2568. # 230 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/stdint.h" 3
  2569. # 29 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 2 3
  2570.  
  2571. /* Primitive types that match up with Java equivalents. */
  2572. typedef uint8_t  jboolean; /* unsigned 8 bits */
  2573. typedef int8_t   jbyte;    /* signed 8 bits */
  2574. typedef uint16_t jchar;    /* unsigned 16 bits */
  2575. typedef int16_t  jshort;   /* signed 16 bits */
  2576. typedef int32_t  jint;     /* signed 32 bits */
  2577. typedef int64_t  jlong;    /* signed 64 bits */
  2578. typedef float    jfloat;   /* 32-bit IEEE 754 */
  2579. typedef double   jdouble;  /* 64-bit IEEE 754 */
  2580.  
  2581. /* "cardinal indices and sizes" */
  2582. typedef jint     jsize;
  2583.  
  2584. #ifdef __cplusplus
  2585. /*
  2586.  * Reference types, in C++
  2587.  */
  2588. class _jobject {};
  2589. class _jclass : public _jobject {};
  2590. class _jstring : public _jobject {};
  2591. class _jarray : public _jobject {};
  2592. class _jobjectArray : public _jarray {};
  2593. class _jbooleanArray : public _jarray {};
  2594. class _jbyteArray : public _jarray {};
  2595. class _jcharArray : public _jarray {};
  2596. class _jshortArray : public _jarray {};
  2597. class _jintArray : public _jarray {};
  2598. class _jlongArray : public _jarray {};
  2599. class _jfloatArray : public _jarray {};
  2600. class _jdoubleArray : public _jarray {};
  2601. class _jthrowable : public _jobject {};
  2602.  
  2603. typedef _jobject*       jobject;
  2604. typedef _jclass*        jclass;
  2605. typedef _jstring*       jstring;
  2606. typedef _jarray*        jarray;
  2607. typedef _jobjectArray*  jobjectArray;
  2608. typedef _jbooleanArray* jbooleanArray;
  2609. typedef _jbyteArray*    jbyteArray;
  2610. typedef _jcharArray*    jcharArray;
  2611. typedef _jshortArray*   jshortArray;
  2612. typedef _jintArray*     jintArray;
  2613. typedef _jlongArray*    jlongArray;
  2614. typedef _jfloatArray*   jfloatArray;
  2615. typedef _jdoubleArray*  jdoubleArray;
  2616. typedef _jthrowable*    jthrowable;
  2617. typedef _jobject*       jweak;
  2618.  
  2619.  
  2620. #else /* not __cplusplus */
  2621. # 80 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  2622.  
  2623. /*
  2624.  * Reference types, in C.
  2625.  */
  2626. typedef void*           jobject;
  2627. typedef jobject         jclass;
  2628. typedef jobject         jstring;
  2629. typedef jobject         jarray;
  2630. typedef jarray          jobjectArray;
  2631. typedef jarray          jbooleanArray;
  2632. typedef jarray          jbyteArray;
  2633. typedef jarray          jcharArray;
  2634. typedef jarray          jshortArray;
  2635. typedef jarray          jintArray;
  2636. typedef jarray          jlongArray;
  2637. typedef jarray          jfloatArray;
  2638. typedef jarray          jdoubleArray;
  2639. typedef jobject         jthrowable;
  2640. typedef jobject         jweak;
  2641.  
  2642. #endif /* not __cplusplus */
  2643. # 101 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  2644.  
  2645. struct _jfieldID;                       /* opaque structure */
  2646. typedef struct _jfieldID* jfieldID;     /* field IDs */
  2647.  
  2648. struct _jmethodID;                      /* opaque structure */
  2649. typedef struct _jmethodID* jmethodID;   /* method IDs */
  2650.  
  2651. struct JNIInvokeInterface;
  2652.  
  2653. typedef union jvalue {
  2654.     jboolean    z;
  2655.     jbyte       b;
  2656.     jchar       c;
  2657.     jshort      s;
  2658.     jint        i;
  2659.     jlong       j;
  2660.     jfloat      f;
  2661.     jdouble     d;
  2662.     jobject     l;
  2663. } jvalue;
  2664.  
  2665. typedef enum jobjectRefType {
  2666.     JNIInvalidRefType = 0,
  2667.     JNILocalRefType = 1,
  2668.     JNIGlobalRefType = 2,
  2669.     JNIWeakGlobalRefType = 3
  2670. } jobjectRefType;
  2671.  
  2672. typedef struct {
  2673.     const char* name;
  2674.     const char* signature;
  2675.     void*       fnPtr;
  2676. } JNINativeMethod;
  2677.  
  2678. struct _JNIEnv;
  2679. struct _JavaVM;
  2680. typedef const struct JNINativeInterface* C_JNIEnv;
  2681.  
  2682. #if defined(__cplusplus)
  2683. typedef _JNIEnv JNIEnv;
  2684. typedef _JavaVM JavaVM;
  2685. #else
  2686. # 143 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  2687. typedef const struct JNINativeInterface* JNIEnv;
  2688. typedef const struct JNIInvokeInterface* JavaVM;
  2689. #endif
  2690. # 146 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  2691.  
  2692. /*
  2693.  * Table of interface function pointers.
  2694.  */
  2695. struct JNINativeInterface {
  2696.     void*       reserved0;
  2697.     void*       reserved1;
  2698.     void*       reserved2;
  2699.     void*       reserved3;
  2700.  
  2701.     jint        (*GetVersion)(JNIEnv *);
  2702.  
  2703.     jclass      (*DefineClass)(JNIEnv*, const char*, jobject, const jbyte*,
  2704.                         jsize);
  2705.     jclass      (*FindClass)(JNIEnv*, const char*);
  2706.  
  2707.     jmethodID   (*FromReflectedMethod)(JNIEnv*, jobject);
  2708.     jfieldID    (*FromReflectedField)(JNIEnv*, jobject);
  2709.     /* spec doesn't show jboolean parameter */
  2710.     jobject     (*ToReflectedMethod)(JNIEnv*, jclass, jmethodID, jboolean);
  2711.  
  2712.     jclass      (*GetSuperclass)(JNIEnv*, jclass);
  2713.     jboolean    (*IsAssignableFrom)(JNIEnv*, jclass, jclass);
  2714.  
  2715.     /* spec doesn't show jboolean parameter */
  2716.     jobject     (*ToReflectedField)(JNIEnv*, jclass, jfieldID, jboolean);
  2717.  
  2718.     jint        (*Throw)(JNIEnv*, jthrowable);
  2719.     jint        (*ThrowNew)(JNIEnv *, jclass, const char *);
  2720.     jthrowable  (*ExceptionOccurred)(JNIEnv*);
  2721.     void        (*ExceptionDescribe)(JNIEnv*);
  2722.     void        (*ExceptionClear)(JNIEnv*);
  2723.     void        (*FatalError)(JNIEnv*, const char*);
  2724.  
  2725.     jint        (*PushLocalFrame)(JNIEnv*, jint);
  2726.     jobject     (*PopLocalFrame)(JNIEnv*, jobject);
  2727.  
  2728.     jobject     (*NewGlobalRef)(JNIEnv*, jobject);
  2729.     void        (*DeleteGlobalRef)(JNIEnv*, jobject);
  2730.     void        (*DeleteLocalRef)(JNIEnv*, jobject);
  2731.     jboolean    (*IsSameObject)(JNIEnv*, jobject, jobject);
  2732.  
  2733.     jobject     (*NewLocalRef)(JNIEnv*, jobject);
  2734.     jint        (*EnsureLocalCapacity)(JNIEnv*, jint);
  2735.  
  2736.     jobject     (*AllocObject)(JNIEnv*, jclass);
  2737.     jobject     (*NewObject)(JNIEnv*, jclass, jmethodID, ...);
  2738.     jobject     (*NewObjectV)(JNIEnv*, jclass, jmethodID, va_list);
  2739.     jobject     (*NewObjectA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2740.  
  2741.     jclass      (*GetObjectClass)(JNIEnv*, jobject);
  2742.     jboolean    (*IsInstanceOf)(JNIEnv*, jobject, jclass);
  2743.     jmethodID   (*GetMethodID)(JNIEnv*, jclass, const char*, const char*);
  2744.  
  2745.     jobject     (*CallObjectMethod)(JNIEnv*, jobject, jmethodID, ...);
  2746.     jobject     (*CallObjectMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2747.     jobject     (*CallObjectMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2748.     jboolean    (*CallBooleanMethod)(JNIEnv*, jobject, jmethodID, ...);
  2749.     jboolean    (*CallBooleanMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2750.     jboolean    (*CallBooleanMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2751.     jbyte       (*CallByteMethod)(JNIEnv*, jobject, jmethodID, ...);
  2752.     jbyte       (*CallByteMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2753.     jbyte       (*CallByteMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2754.     jchar       (*CallCharMethod)(JNIEnv*, jobject, jmethodID, ...);
  2755.     jchar       (*CallCharMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2756.     jchar       (*CallCharMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2757.     jshort      (*CallShortMethod)(JNIEnv*, jobject, jmethodID, ...);
  2758.     jshort      (*CallShortMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2759.     jshort      (*CallShortMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2760.     jint        (*CallIntMethod)(JNIEnv*, jobject, jmethodID, ...);
  2761.     jint        (*CallIntMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2762.     jint        (*CallIntMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2763.     jlong       (*CallLongMethod)(JNIEnv*, jobject, jmethodID, ...);
  2764.     jlong       (*CallLongMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2765.     jlong       (*CallLongMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2766.     jfloat      (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...);
  2767.     jfloat      (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2768.     jfloat      (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2769.     jdouble     (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...);
  2770.     jdouble     (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2771.     jdouble     (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2772.     void        (*CallVoidMethod)(JNIEnv*, jobject, jmethodID, ...);
  2773.     void        (*CallVoidMethodV)(JNIEnv*, jobject, jmethodID, va_list);
  2774.     void        (*CallVoidMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
  2775.  
  2776.     jobject     (*CallNonvirtualObjectMethod)(JNIEnv*, jobject, jclass,
  2777.                         jmethodID, ...);
  2778.     jobject     (*CallNonvirtualObjectMethodV)(JNIEnv*, jobject, jclass,
  2779.                         jmethodID, va_list);
  2780.     jobject     (*CallNonvirtualObjectMethodA)(JNIEnv*, jobject, jclass,
  2781.                         jmethodID, jvalue*);
  2782.     jboolean    (*CallNonvirtualBooleanMethod)(JNIEnv*, jobject, jclass,
  2783.                         jmethodID, ...);
  2784.     jboolean    (*CallNonvirtualBooleanMethodV)(JNIEnv*, jobject, jclass,
  2785.                          jmethodID, va_list);
  2786.     jboolean    (*CallNonvirtualBooleanMethodA)(JNIEnv*, jobject, jclass,
  2787.                          jmethodID, jvalue*);
  2788.     jbyte       (*CallNonvirtualByteMethod)(JNIEnv*, jobject, jclass,
  2789.                         jmethodID, ...);
  2790.     jbyte       (*CallNonvirtualByteMethodV)(JNIEnv*, jobject, jclass,
  2791.                         jmethodID, va_list);
  2792.     jbyte       (*CallNonvirtualByteMethodA)(JNIEnv*, jobject, jclass,
  2793.                         jmethodID, jvalue*);
  2794.     jchar       (*CallNonvirtualCharMethod)(JNIEnv*, jobject, jclass,
  2795.                         jmethodID, ...);
  2796.     jchar       (*CallNonvirtualCharMethodV)(JNIEnv*, jobject, jclass,
  2797.                         jmethodID, va_list);
  2798.     jchar       (*CallNonvirtualCharMethodA)(JNIEnv*, jobject, jclass,
  2799.                         jmethodID, jvalue*);
  2800.     jshort      (*CallNonvirtualShortMethod)(JNIEnv*, jobject, jclass,
  2801.                         jmethodID, ...);
  2802.     jshort      (*CallNonvirtualShortMethodV)(JNIEnv*, jobject, jclass,
  2803.                         jmethodID, va_list);
  2804.     jshort      (*CallNonvirtualShortMethodA)(JNIEnv*, jobject, jclass,
  2805.                         jmethodID, jvalue*);
  2806.     jint        (*CallNonvirtualIntMethod)(JNIEnv*, jobject, jclass,
  2807.                         jmethodID, ...);
  2808.     jint        (*CallNonvirtualIntMethodV)(JNIEnv*, jobject, jclass,
  2809.                         jmethodID, va_list);
  2810.     jint        (*CallNonvirtualIntMethodA)(JNIEnv*, jobject, jclass,
  2811.                         jmethodID, jvalue*);
  2812.     jlong       (*CallNonvirtualLongMethod)(JNIEnv*, jobject, jclass,
  2813.                         jmethodID, ...);
  2814.     jlong       (*CallNonvirtualLongMethodV)(JNIEnv*, jobject, jclass,
  2815.                         jmethodID, va_list);
  2816.     jlong       (*CallNonvirtualLongMethodA)(JNIEnv*, jobject, jclass,
  2817.                         jmethodID, jvalue*);
  2818.     jfloat      (*CallNonvirtualFloatMethod)(JNIEnv*, jobject, jclass,
  2819.                         jmethodID, ...);
  2820.     jfloat      (*CallNonvirtualFloatMethodV)(JNIEnv*, jobject, jclass,
  2821.                         jmethodID, va_list);
  2822.     jfloat      (*CallNonvirtualFloatMethodA)(JNIEnv*, jobject, jclass,
  2823.                         jmethodID, jvalue*);
  2824.     jdouble     (*CallNonvirtualDoubleMethod)(JNIEnv*, jobject, jclass,
  2825.                         jmethodID, ...);
  2826.     jdouble     (*CallNonvirtualDoubleMethodV)(JNIEnv*, jobject, jclass,
  2827.                         jmethodID, va_list);
  2828.     jdouble     (*CallNonvirtualDoubleMethodA)(JNIEnv*, jobject, jclass,
  2829.                         jmethodID, jvalue*);
  2830.     void        (*CallNonvirtualVoidMethod)(JNIEnv*, jobject, jclass,
  2831.                         jmethodID, ...);
  2832.     void        (*CallNonvirtualVoidMethodV)(JNIEnv*, jobject, jclass,
  2833.                         jmethodID, va_list);
  2834.     void        (*CallNonvirtualVoidMethodA)(JNIEnv*, jobject, jclass,
  2835.                         jmethodID, jvalue*);
  2836.  
  2837.     jfieldID    (*GetFieldID)(JNIEnv*, jclass, const char*, const char*);
  2838.  
  2839.     jobject     (*GetObjectField)(JNIEnv*, jobject, jfieldID);
  2840.     jboolean    (*GetBooleanField)(JNIEnv*, jobject, jfieldID);
  2841.     jbyte       (*GetByteField)(JNIEnv*, jobject, jfieldID);
  2842.     jchar       (*GetCharField)(JNIEnv*, jobject, jfieldID);
  2843.     jshort      (*GetShortField)(JNIEnv*, jobject, jfieldID);
  2844.     jint        (*GetIntField)(JNIEnv*, jobject, jfieldID);
  2845.     jlong       (*GetLongField)(JNIEnv*, jobject, jfieldID);
  2846.     jfloat      (*GetFloatField)(JNIEnv*, jobject, jfieldID);
  2847.     jdouble     (*GetDoubleField)(JNIEnv*, jobject, jfieldID);
  2848.  
  2849.     void        (*SetObjectField)(JNIEnv*, jobject, jfieldID, jobject);
  2850.     void        (*SetBooleanField)(JNIEnv*, jobject, jfieldID, jboolean);
  2851.     void        (*SetByteField)(JNIEnv*, jobject, jfieldID, jbyte);
  2852.     void        (*SetCharField)(JNIEnv*, jobject, jfieldID, jchar);
  2853.     void        (*SetShortField)(JNIEnv*, jobject, jfieldID, jshort);
  2854.     void        (*SetIntField)(JNIEnv*, jobject, jfieldID, jint);
  2855.     void        (*SetLongField)(JNIEnv*, jobject, jfieldID, jlong);
  2856.     void        (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat);
  2857.     void        (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble);
  2858.  
  2859.     jmethodID   (*GetStaticMethodID)(JNIEnv*, jclass, const char*, const char*);
  2860.  
  2861.     jobject     (*CallStaticObjectMethod)(JNIEnv*, jclass, jmethodID, ...);
  2862.     jobject     (*CallStaticObjectMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2863.     jobject     (*CallStaticObjectMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2864.     jboolean    (*CallStaticBooleanMethod)(JNIEnv*, jclass, jmethodID, ...);
  2865.     jboolean    (*CallStaticBooleanMethodV)(JNIEnv*, jclass, jmethodID,
  2866.                         va_list);
  2867.     jboolean    (*CallStaticBooleanMethodA)(JNIEnv*, jclass, jmethodID,
  2868.                         jvalue*);
  2869.     jbyte       (*CallStaticByteMethod)(JNIEnv*, jclass, jmethodID, ...);
  2870.     jbyte       (*CallStaticByteMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2871.     jbyte       (*CallStaticByteMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2872.     jchar       (*CallStaticCharMethod)(JNIEnv*, jclass, jmethodID, ...);
  2873.     jchar       (*CallStaticCharMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2874.     jchar       (*CallStaticCharMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2875.     jshort      (*CallStaticShortMethod)(JNIEnv*, jclass, jmethodID, ...);
  2876.     jshort      (*CallStaticShortMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2877.     jshort      (*CallStaticShortMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2878.     jint        (*CallStaticIntMethod)(JNIEnv*, jclass, jmethodID, ...);
  2879.     jint        (*CallStaticIntMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2880.     jint        (*CallStaticIntMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2881.     jlong       (*CallStaticLongMethod)(JNIEnv*, jclass, jmethodID, ...);
  2882.     jlong       (*CallStaticLongMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2883.     jlong       (*CallStaticLongMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2884.     jfloat      (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...);
  2885.     jfloat      (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2886.     jfloat      (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2887.     jdouble     (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...);
  2888.     jdouble     (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2889.     jdouble     (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2890.     void        (*CallStaticVoidMethod)(JNIEnv*, jclass, jmethodID, ...);
  2891.     void        (*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list);
  2892.     void        (*CallStaticVoidMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
  2893.  
  2894.     jfieldID    (*GetStaticFieldID)(JNIEnv*, jclass, const char*,
  2895.                         const char*);
  2896.  
  2897.     jobject     (*GetStaticObjectField)(JNIEnv*, jclass, jfieldID);
  2898.     jboolean    (*GetStaticBooleanField)(JNIEnv*, jclass, jfieldID);
  2899.     jbyte       (*GetStaticByteField)(JNIEnv*, jclass, jfieldID);
  2900.     jchar       (*GetStaticCharField)(JNIEnv*, jclass, jfieldID);
  2901.     jshort      (*GetStaticShortField)(JNIEnv*, jclass, jfieldID);
  2902.     jint        (*GetStaticIntField)(JNIEnv*, jclass, jfieldID);
  2903.     jlong       (*GetStaticLongField)(JNIEnv*, jclass, jfieldID);
  2904.     jfloat      (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID);
  2905.     jdouble     (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID);
  2906.  
  2907.     void        (*SetStaticObjectField)(JNIEnv*, jclass, jfieldID, jobject);
  2908.     void        (*SetStaticBooleanField)(JNIEnv*, jclass, jfieldID, jboolean);
  2909.     void        (*SetStaticByteField)(JNIEnv*, jclass, jfieldID, jbyte);
  2910.     void        (*SetStaticCharField)(JNIEnv*, jclass, jfieldID, jchar);
  2911.     void        (*SetStaticShortField)(JNIEnv*, jclass, jfieldID, jshort);
  2912.     void        (*SetStaticIntField)(JNIEnv*, jclass, jfieldID, jint);
  2913.     void        (*SetStaticLongField)(JNIEnv*, jclass, jfieldID, jlong);
  2914.     void        (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat);
  2915.     void        (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble);
  2916.  
  2917.     jstring     (*NewString)(JNIEnv*, const jchar*, jsize);
  2918.     jsize       (*GetStringLength)(JNIEnv*, jstring);
  2919.     const jchar* (*GetStringChars)(JNIEnv*, jstring, jboolean*);
  2920.     void        (*ReleaseStringChars)(JNIEnv*, jstring, const jchar*);
  2921.     jstring     (*NewStringUTF)(JNIEnv*, const char*);
  2922.     jsize       (*GetStringUTFLength)(JNIEnv*, jstring);
  2923.     /* JNI spec says this returns const jbyte*, but that's inconsistent */
  2924.     const char* (*GetStringUTFChars)(JNIEnv*, jstring, jboolean*);
  2925.     void        (*ReleaseStringUTFChars)(JNIEnv*, jstring, const char*);
  2926.     jsize       (*GetArrayLength)(JNIEnv*, jarray);
  2927.     jobjectArray (*NewObjectArray)(JNIEnv*, jsize, jclass, jobject);
  2928.     jobject     (*GetObjectArrayElement)(JNIEnv*, jobjectArray, jsize);
  2929.     void        (*SetObjectArrayElement)(JNIEnv*, jobjectArray, jsize, jobject);
  2930.  
  2931.     jbooleanArray (*NewBooleanArray)(JNIEnv*, jsize);
  2932.     jbyteArray    (*NewByteArray)(JNIEnv*, jsize);
  2933.     jcharArray    (*NewCharArray)(JNIEnv*, jsize);
  2934.     jshortArray   (*NewShortArray)(JNIEnv*, jsize);
  2935.     jintArray     (*NewIntArray)(JNIEnv*, jsize);
  2936.     jlongArray    (*NewLongArray)(JNIEnv*, jsize);
  2937.     jfloatArray   (*NewFloatArray)(JNIEnv*, jsize);
  2938.     jdoubleArray  (*NewDoubleArray)(JNIEnv*, jsize);
  2939.  
  2940.     jboolean*   (*GetBooleanArrayElements)(JNIEnv*, jbooleanArray, jboolean*);
  2941.     jbyte*      (*GetByteArrayElements)(JNIEnv*, jbyteArray, jboolean*);
  2942.     jchar*      (*GetCharArrayElements)(JNIEnv*, jcharArray, jboolean*);
  2943.     jshort*     (*GetShortArrayElements)(JNIEnv*, jshortArray, jboolean*);
  2944.     jint*       (*GetIntArrayElements)(JNIEnv*, jintArray, jboolean*);
  2945.     jlong*      (*GetLongArrayElements)(JNIEnv*, jlongArray, jboolean*);
  2946.     jfloat*     (*GetFloatArrayElements)(JNIEnv*, jfloatArray, jboolean*);
  2947.     jdouble*    (*GetDoubleArrayElements)(JNIEnv*, jdoubleArray, jboolean*);
  2948.  
  2949.     void        (*ReleaseBooleanArrayElements)(JNIEnv*, jbooleanArray,
  2950.                         jboolean*, jint);
  2951.     void        (*ReleaseByteArrayElements)(JNIEnv*, jbyteArray,
  2952.                         jbyte*, jint);
  2953.     void        (*ReleaseCharArrayElements)(JNIEnv*, jcharArray,
  2954.                         jchar*, jint);
  2955.     void        (*ReleaseShortArrayElements)(JNIEnv*, jshortArray,
  2956.                         jshort*, jint);
  2957.     void        (*ReleaseIntArrayElements)(JNIEnv*, jintArray,
  2958.                         jint*, jint);
  2959.     void        (*ReleaseLongArrayElements)(JNIEnv*, jlongArray,
  2960.                         jlong*, jint);
  2961.     void        (*ReleaseFloatArrayElements)(JNIEnv*, jfloatArray,
  2962.                         jfloat*, jint);
  2963.     void        (*ReleaseDoubleArrayElements)(JNIEnv*, jdoubleArray,
  2964.                         jdouble*, jint);
  2965.  
  2966.     void        (*GetBooleanArrayRegion)(JNIEnv*, jbooleanArray,
  2967.                         jsize, jsize, jboolean*);
  2968.     void        (*GetByteArrayRegion)(JNIEnv*, jbyteArray,
  2969.                         jsize, jsize, jbyte*);
  2970.     void        (*GetCharArrayRegion)(JNIEnv*, jcharArray,
  2971.                         jsize, jsize, jchar*);
  2972.     void        (*GetShortArrayRegion)(JNIEnv*, jshortArray,
  2973.                         jsize, jsize, jshort*);
  2974.     void        (*GetIntArrayRegion)(JNIEnv*, jintArray,
  2975.                         jsize, jsize, jint*);
  2976.     void        (*GetLongArrayRegion)(JNIEnv*, jlongArray,
  2977.                         jsize, jsize, jlong*);
  2978.     void        (*GetFloatArrayRegion)(JNIEnv*, jfloatArray,
  2979.                         jsize, jsize, jfloat*);
  2980.     void        (*GetDoubleArrayRegion)(JNIEnv*, jdoubleArray,
  2981.                         jsize, jsize, jdouble*);
  2982.  
  2983.     /* spec shows these without const; some jni.h do, some don't */
  2984.     void        (*SetBooleanArrayRegion)(JNIEnv*, jbooleanArray,
  2985.                         jsize, jsize, const jboolean*);
  2986.     void        (*SetByteArrayRegion)(JNIEnv*, jbyteArray,
  2987.                         jsize, jsize, const jbyte*);
  2988.     void        (*SetCharArrayRegion)(JNIEnv*, jcharArray,
  2989.                         jsize, jsize, const jchar*);
  2990.     void        (*SetShortArrayRegion)(JNIEnv*, jshortArray,
  2991.                         jsize, jsize, const jshort*);
  2992.     void        (*SetIntArrayRegion)(JNIEnv*, jintArray,
  2993.                         jsize, jsize, const jint*);
  2994.     void        (*SetLongArrayRegion)(JNIEnv*, jlongArray,
  2995.                         jsize, jsize, const jlong*);
  2996.     void        (*SetFloatArrayRegion)(JNIEnv*, jfloatArray,
  2997.                         jsize, jsize, const jfloat*);
  2998.     void        (*SetDoubleArrayRegion)(JNIEnv*, jdoubleArray,
  2999.                         jsize, jsize, const jdouble*);
  3000.  
  3001.     jint        (*RegisterNatives)(JNIEnv*, jclass, const JNINativeMethod*,
  3002.                         jint);
  3003.     jint        (*UnregisterNatives)(JNIEnv*, jclass);
  3004.     jint        (*MonitorEnter)(JNIEnv*, jobject);
  3005.     jint        (*MonitorExit)(JNIEnv*, jobject);
  3006.     jint        (*GetJavaVM)(JNIEnv*, JavaVM**);
  3007.  
  3008.     void        (*GetStringRegion)(JNIEnv*, jstring, jsize, jsize, jchar*);
  3009.     void        (*GetStringUTFRegion)(JNIEnv*, jstring, jsize, jsize, char*);
  3010.  
  3011.     void*       (*GetPrimitiveArrayCritical)(JNIEnv*, jarray, jboolean*);
  3012.     void        (*ReleasePrimitiveArrayCritical)(JNIEnv*, jarray, void*, jint);
  3013.  
  3014.     const jchar* (*GetStringCritical)(JNIEnv*, jstring, jboolean*);
  3015.     void        (*ReleaseStringCritical)(JNIEnv*, jstring, const jchar*);
  3016.  
  3017.     jweak       (*NewWeakGlobalRef)(JNIEnv*, jobject);
  3018.     void        (*DeleteWeakGlobalRef)(JNIEnv*, jweak);
  3019.  
  3020.     jboolean    (*ExceptionCheck)(JNIEnv*);
  3021.  
  3022.     jobject     (*NewDirectByteBuffer)(JNIEnv*, void*, jlong);
  3023.     void*       (*GetDirectBufferAddress)(JNIEnv*, jobject);
  3024.     jlong       (*GetDirectBufferCapacity)(JNIEnv*, jobject);
  3025.  
  3026.     /* added in JNI 1.6 */
  3027.     jobjectRefType (*GetObjectRefType)(JNIEnv*, jobject);
  3028. };
  3029.  
  3030. /*
  3031.  * C++ object wrapper.
  3032.  *
  3033.  * This is usually overlaid on a C struct whose first element is a
  3034.  * JNINativeInterface*.  We rely somewhat on compiler behavior.
  3035.  */
  3036. struct _JNIEnv {
  3037.     /* do not rename this; it does not seem to be entirely opaque */
  3038.     const struct JNINativeInterface* functions;
  3039.  
  3040. #if defined(__cplusplus)
  3041.  
  3042.     jint GetVersion()
  3043.     { return functions->GetVersion(this); }
  3044.  
  3045.     jclass DefineClass(const char *name, jobject loader, const jbyte* buf,
  3046.         jsize bufLen)
  3047.     { return functions->DefineClass(this, name, loader, buf, bufLen); }
  3048.  
  3049.     jclass FindClass(const char* name)
  3050.     { return functions->FindClass(this, name); }
  3051.  
  3052.     jmethodID FromReflectedMethod(jobject method)
  3053.     { return functions->FromReflectedMethod(this, method); }
  3054.  
  3055.     jfieldID FromReflectedField(jobject field)
  3056.     { return functions->FromReflectedField(this, field); }
  3057.  
  3058.     jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic)
  3059.     { return functions->ToReflectedMethod(this, cls, methodID, isStatic); }
  3060.  
  3061.     jclass GetSuperclass(jclass clazz)
  3062.     { return functions->GetSuperclass(this, clazz); }
  3063.  
  3064.     jboolean IsAssignableFrom(jclass clazz1, jclass clazz2)
  3065.     { return functions->IsAssignableFrom(this, clazz1, clazz2); }
  3066.  
  3067.     jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic)
  3068.     { return functions->ToReflectedField(this, cls, fieldID, isStatic); }
  3069.  
  3070.     jint Throw(jthrowable obj)
  3071.     { return functions->Throw(this, obj); }
  3072.  
  3073.     jint ThrowNew(jclass clazz, const char* message)
  3074.     { return functions->ThrowNew(this, clazz, message); }
  3075.  
  3076.     jthrowable ExceptionOccurred()
  3077.     { return functions->ExceptionOccurred(this); }
  3078.  
  3079.     void ExceptionDescribe()
  3080.     { functions->ExceptionDescribe(this); }
  3081.  
  3082.     void ExceptionClear()
  3083.     { functions->ExceptionClear(this); }
  3084.  
  3085.     void FatalError(const char* msg)
  3086.     { functions->FatalError(this, msg); }
  3087.  
  3088.     jint PushLocalFrame(jint capacity)
  3089.     { return functions->PushLocalFrame(this, capacity); }
  3090.  
  3091.     jobject PopLocalFrame(jobject result)
  3092.     { return functions->PopLocalFrame(this, result); }
  3093.  
  3094.     jobject NewGlobalRef(jobject obj)
  3095.     { return functions->NewGlobalRef(this, obj); }
  3096.  
  3097.     void DeleteGlobalRef(jobject globalRef)
  3098.     { functions->DeleteGlobalRef(this, globalRef); }
  3099.  
  3100.     void DeleteLocalRef(jobject localRef)
  3101.     { functions->DeleteLocalRef(this, localRef); }
  3102.  
  3103.     jboolean IsSameObject(jobject ref1, jobject ref2)
  3104.     { return functions->IsSameObject(this, ref1, ref2); }
  3105.  
  3106.     jobject NewLocalRef(jobject ref)
  3107.     { return functions->NewLocalRef(this, ref); }
  3108.  
  3109.     jint EnsureLocalCapacity(jint capacity)
  3110.     { return functions->EnsureLocalCapacity(this, capacity); }
  3111.  
  3112.     jobject AllocObject(jclass clazz)
  3113.     { return functions->AllocObject(this, clazz); }
  3114.  
  3115.     jobject NewObject(jclass clazz, jmethodID methodID, ...)
  3116.     {
  3117.         va_list args;
  3118.         va_start(args, methodID);
  3119.         jobject result = functions->NewObjectV(this, clazz, methodID, args);
  3120.         va_end(args);
  3121.         return result;
  3122.     }
  3123.  
  3124.     jobject NewObjectV(jclass clazz, jmethodID methodID, va_list args)
  3125.     { return functions->NewObjectV(this, clazz, methodID, args); }
  3126.  
  3127.     jobject NewObjectA(jclass clazz, jmethodID methodID, jvalue* args)
  3128.     { return functions->NewObjectA(this, clazz, methodID, args); }
  3129.  
  3130.     jclass GetObjectClass(jobject obj)
  3131.     { return functions->GetObjectClass(this, obj); }
  3132.  
  3133.     jboolean IsInstanceOf(jobject obj, jclass clazz)
  3134.     { return functions->IsInstanceOf(this, obj, clazz); }
  3135.  
  3136.     jmethodID GetMethodID(jclass clazz, const char* name, const char* sig)
  3137.     { return functions->GetMethodID(this, clazz, name, sig); }
  3138.  
  3139. #define CALL_TYPE_METHOD(_jtype, _jname)                                    \
  3140.     _jtype Call##_jname##Method(jobject obj, jmethodID methodID, ...)       \
  3141.     {                                                                       \
  3142.         _jtype result;                                                      \
  3143.         va_list args;                                                       \
  3144.         va_start(args, methodID);                                           \
  3145.         result = functions->Call##_jname##MethodV(this, obj, methodID,      \
  3146.                     args);                                                  \
  3147.         va_end(args);                                                       \
  3148.         return result;                                                      \
  3149.     }
  3150. #define CALL_TYPE_METHODV(_jtype, _jname)                                   \
  3151.     _jtype Call##_jname##MethodV(jobject obj, jmethodID methodID,           \
  3152.         va_list args)                                                       \
  3153.     { return functions->Call##_jname##MethodV(this, obj, methodID, args); }
  3154. #define CALL_TYPE_METHODA(_jtype, _jname)                                   \
  3155.     _jtype Call##_jname##MethodA(jobject obj, jmethodID methodID,           \
  3156.         jvalue* args)                                                       \
  3157.     { return functions->Call##_jname##MethodA(this, obj, methodID, args); }
  3158.  
  3159. #define CALL_TYPE(_jtype, _jname)                                           \
  3160.     CALL_TYPE_METHOD(_jtype, _jname)                                        \
  3161.     CALL_TYPE_METHODV(_jtype, _jname)                                       \
  3162.     CALL_TYPE_METHODA(_jtype, _jname)
  3163.  
  3164.     CALL_TYPE(jobject, Object)
  3165.     CALL_TYPE(jboolean, Boolean)
  3166.     CALL_TYPE(jbyte, Byte)
  3167.     CALL_TYPE(jchar, Char)
  3168.     CALL_TYPE(jshort, Short)
  3169.     CALL_TYPE(jint, Int)
  3170.     CALL_TYPE(jlong, Long)
  3171.     CALL_TYPE(jfloat, Float)
  3172.     CALL_TYPE(jdouble, Double)
  3173.  
  3174.     void CallVoidMethod(jobject obj, jmethodID methodID, ...)
  3175.     {
  3176.         va_list args;
  3177.         va_start(args, methodID);
  3178.         functions->CallVoidMethodV(this, obj, methodID, args);
  3179.         va_end(args);
  3180.     }
  3181.     void CallVoidMethodV(jobject obj, jmethodID methodID, va_list args)
  3182.     { functions->CallVoidMethodV(this, obj, methodID, args); }
  3183.     void CallVoidMethodA(jobject obj, jmethodID methodID, jvalue* args)
  3184.     { functions->CallVoidMethodA(this, obj, methodID, args); }
  3185.  
  3186. #define CALL_NONVIRT_TYPE_METHOD(_jtype, _jname)                            \
  3187.     _jtype CallNonvirtual##_jname##Method(jobject obj, jclass clazz,        \
  3188.         jmethodID methodID, ...)                                            \
  3189.     {                                                                       \
  3190.         _jtype result;                                                      \
  3191.         va_list args;                                                       \
  3192.         va_start(args, methodID);                                           \
  3193.         result = functions->CallNonvirtual##_jname##MethodV(this, obj,      \
  3194.                     clazz, methodID, args);                                 \
  3195.         va_end(args);                                                       \
  3196.         return result;                                                      \
  3197.     }
  3198. #define CALL_NONVIRT_TYPE_METHODV(_jtype, _jname)                           \
  3199.     _jtype CallNonvirtual##_jname##MethodV(jobject obj, jclass clazz,       \
  3200.         jmethodID methodID, va_list args)                                   \
  3201.     { return functions->CallNonvirtual##_jname##MethodV(this, obj, clazz,   \
  3202.         methodID, args); }
  3203. #define CALL_NONVIRT_TYPE_METHODA(_jtype, _jname)                           \
  3204.     _jtype CallNonvirtual##_jname##MethodA(jobject obj, jclass clazz,       \
  3205.         jmethodID methodID, jvalue* args)                                   \
  3206.     { return functions->CallNonvirtual##_jname##MethodA(this, obj, clazz,   \
  3207.         methodID, args); }
  3208.  
  3209. #define CALL_NONVIRT_TYPE(_jtype, _jname)                                   \
  3210.     CALL_NONVIRT_TYPE_METHOD(_jtype, _jname)                                \
  3211.     CALL_NONVIRT_TYPE_METHODV(_jtype, _jname)                               \
  3212.     CALL_NONVIRT_TYPE_METHODA(_jtype, _jname)
  3213.  
  3214.     CALL_NONVIRT_TYPE(jobject, Object)
  3215.     CALL_NONVIRT_TYPE(jboolean, Boolean)
  3216.     CALL_NONVIRT_TYPE(jbyte, Byte)
  3217.     CALL_NONVIRT_TYPE(jchar, Char)
  3218.     CALL_NONVIRT_TYPE(jshort, Short)
  3219.     CALL_NONVIRT_TYPE(jint, Int)
  3220.     CALL_NONVIRT_TYPE(jlong, Long)
  3221.     CALL_NONVIRT_TYPE(jfloat, Float)
  3222.     CALL_NONVIRT_TYPE(jdouble, Double)
  3223.  
  3224.     void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
  3225.         jmethodID methodID, ...)
  3226.     {
  3227.         va_list args;
  3228.         va_start(args, methodID);
  3229.         functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args);
  3230.         va_end(args);
  3231.     }
  3232.     void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
  3233.         jmethodID methodID, va_list args)
  3234.     { functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args); }
  3235.     void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
  3236.         jmethodID methodID, jvalue* args)
  3237.     { functions->CallNonvirtualVoidMethodA(this, obj, clazz, methodID, args); }
  3238.  
  3239.     jfieldID GetFieldID(jclass clazz, const char* name, const char* sig)
  3240.     { return functions->GetFieldID(this, clazz, name, sig); }
  3241.  
  3242.     jobject GetObjectField(jobject obj, jfieldID fieldID)
  3243.     { return functions->GetObjectField(this, obj, fieldID); }
  3244.     jboolean GetBooleanField(jobject obj, jfieldID fieldID)
  3245.     { return functions->GetBooleanField(this, obj, fieldID); }
  3246.     jbyte GetByteField(jobject obj, jfieldID fieldID)
  3247.     { return functions->GetByteField(this, obj, fieldID); }
  3248.     jchar GetCharField(jobject obj, jfieldID fieldID)
  3249.     { return functions->GetCharField(this, obj, fieldID); }
  3250.     jshort GetShortField(jobject obj, jfieldID fieldID)
  3251.     { return functions->GetShortField(this, obj, fieldID); }
  3252.     jint GetIntField(jobject obj, jfieldID fieldID)
  3253.     { return functions->GetIntField(this, obj, fieldID); }
  3254.     jlong GetLongField(jobject obj, jfieldID fieldID)
  3255.     { return functions->GetLongField(this, obj, fieldID); }
  3256.     jfloat GetFloatField(jobject obj, jfieldID fieldID)
  3257.     { return functions->GetFloatField(this, obj, fieldID); }
  3258.     jdouble GetDoubleField(jobject obj, jfieldID fieldID)
  3259.     { return functions->GetDoubleField(this, obj, fieldID); }
  3260.  
  3261.     void SetObjectField(jobject obj, jfieldID fieldID, jobject value)
  3262.     { functions->SetObjectField(this, obj, fieldID, value); }
  3263.     void SetBooleanField(jobject obj, jfieldID fieldID, jboolean value)
  3264.     { functions->SetBooleanField(this, obj, fieldID, value); }
  3265.     void SetByteField(jobject obj, jfieldID fieldID, jbyte value)
  3266.     { functions->SetByteField(this, obj, fieldID, value); }
  3267.     void SetCharField(jobject obj, jfieldID fieldID, jchar value)
  3268.     { functions->SetCharField(this, obj, fieldID, value); }
  3269.     void SetShortField(jobject obj, jfieldID fieldID, jshort value)
  3270.     { functions->SetShortField(this, obj, fieldID, value); }
  3271.     void SetIntField(jobject obj, jfieldID fieldID, jint value)
  3272.     { functions->SetIntField(this, obj, fieldID, value); }
  3273.     void SetLongField(jobject obj, jfieldID fieldID, jlong value)
  3274.     { functions->SetLongField(this, obj, fieldID, value); }
  3275.     void SetFloatField(jobject obj, jfieldID fieldID, jfloat value)
  3276.     { functions->SetFloatField(this, obj, fieldID, value); }
  3277.     void SetDoubleField(jobject obj, jfieldID fieldID, jdouble value)
  3278.     { functions->SetDoubleField(this, obj, fieldID, value); }
  3279.  
  3280.     jmethodID GetStaticMethodID(jclass clazz, const char* name, const char* sig)
  3281.     { return functions->GetStaticMethodID(this, clazz, name, sig); }
  3282.  
  3283. #define CALL_STATIC_TYPE_METHOD(_jtype, _jname)                             \
  3284.     _jtype CallStatic##_jname##Method(jclass clazz, jmethodID methodID,     \
  3285.         ...)                                                                \
  3286.     {                                                                       \
  3287.         _jtype result;                                                      \
  3288.         va_list args;                                                       \
  3289.         va_start(args, methodID);                                           \
  3290.         result = functions->CallStatic##_jname##MethodV(this, clazz,        \
  3291.                     methodID, args);                                        \
  3292.         va_end(args);                                                       \
  3293.         return result;                                                      \
  3294.     }
  3295. #define CALL_STATIC_TYPE_METHODV(_jtype, _jname)                            \
  3296.     _jtype CallStatic##_jname##MethodV(jclass clazz, jmethodID methodID,    \
  3297.         va_list args)                                                       \
  3298.     { return functions->CallStatic##_jname##MethodV(this, clazz, methodID,  \
  3299.         args); }
  3300. #define CALL_STATIC_TYPE_METHODA(_jtype, _jname)                            \
  3301.     _jtype CallStatic##_jname##MethodA(jclass clazz, jmethodID methodID,    \
  3302.         jvalue* args)                                                       \
  3303.     { return functions->CallStatic##_jname##MethodA(this, clazz, methodID,  \
  3304.         args); }
  3305.  
  3306. #define CALL_STATIC_TYPE(_jtype, _jname)                                    \
  3307.     CALL_STATIC_TYPE_METHOD(_jtype, _jname)                                 \
  3308.     CALL_STATIC_TYPE_METHODV(_jtype, _jname)                                \
  3309.     CALL_STATIC_TYPE_METHODA(_jtype, _jname)
  3310.  
  3311.     CALL_STATIC_TYPE(jobject, Object)
  3312.     CALL_STATIC_TYPE(jboolean, Boolean)
  3313.     CALL_STATIC_TYPE(jbyte, Byte)
  3314.     CALL_STATIC_TYPE(jchar, Char)
  3315.     CALL_STATIC_TYPE(jshort, Short)
  3316.     CALL_STATIC_TYPE(jint, Int)
  3317.     CALL_STATIC_TYPE(jlong, Long)
  3318.     CALL_STATIC_TYPE(jfloat, Float)
  3319.     CALL_STATIC_TYPE(jdouble, Double)
  3320.  
  3321.     void CallStaticVoidMethod(jclass clazz, jmethodID methodID, ...)
  3322.     {
  3323.         va_list args;
  3324.         va_start(args, methodID);
  3325.         functions->CallStaticVoidMethodV(this, clazz, methodID, args);
  3326.         va_end(args);
  3327.     }
  3328.     void CallStaticVoidMethodV(jclass clazz, jmethodID methodID, va_list args)
  3329.     { functions->CallStaticVoidMethodV(this, clazz, methodID, args); }
  3330.     void CallStaticVoidMethodA(jclass clazz, jmethodID methodID, jvalue* args)
  3331.     { functions->CallStaticVoidMethodA(this, clazz, methodID, args); }
  3332.  
  3333.     jfieldID GetStaticFieldID(jclass clazz, const char* name, const char* sig)
  3334.     { return functions->GetStaticFieldID(this, clazz, name, sig); }
  3335.  
  3336.     jobject GetStaticObjectField(jclass clazz, jfieldID fieldID)
  3337.     { return functions->GetStaticObjectField(this, clazz, fieldID); }
  3338.     jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID)
  3339.     { return functions->GetStaticBooleanField(this, clazz, fieldID); }
  3340.     jbyte GetStaticByteField(jclass clazz, jfieldID fieldID)
  3341.     { return functions->GetStaticByteField(this, clazz, fieldID); }
  3342.     jchar GetStaticCharField(jclass clazz, jfieldID fieldID)
  3343.     { return functions->GetStaticCharField(this, clazz, fieldID); }
  3344.     jshort GetStaticShortField(jclass clazz, jfieldID fieldID)
  3345.     { return functions->GetStaticShortField(this, clazz, fieldID); }
  3346.     jint GetStaticIntField(jclass clazz, jfieldID fieldID)
  3347.     { return functions->GetStaticIntField(this, clazz, fieldID); }
  3348.     jlong GetStaticLongField(jclass clazz, jfieldID fieldID)
  3349.     { return functions->GetStaticLongField(this, clazz, fieldID); }
  3350.     jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID)
  3351.     { return functions->GetStaticFloatField(this, clazz, fieldID); }
  3352.     jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID)
  3353.     { return functions->GetStaticDoubleField(this, clazz, fieldID); }
  3354.  
  3355.     void SetStaticObjectField(jclass clazz, jfieldID fieldID, jobject value)
  3356.     { functions->SetStaticObjectField(this, clazz, fieldID, value); }
  3357.     void SetStaticBooleanField(jclass clazz, jfieldID fieldID, jboolean value)
  3358.     { functions->SetStaticBooleanField(this, clazz, fieldID, value); }
  3359.     void SetStaticByteField(jclass clazz, jfieldID fieldID, jbyte value)
  3360.     { functions->SetStaticByteField(this, clazz, fieldID, value); }
  3361.     void SetStaticCharField(jclass clazz, jfieldID fieldID, jchar value)
  3362.     { functions->SetStaticCharField(this, clazz, fieldID, value); }
  3363.     void SetStaticShortField(jclass clazz, jfieldID fieldID, jshort value)
  3364.     { functions->SetStaticShortField(this, clazz, fieldID, value); }
  3365.     void SetStaticIntField(jclass clazz, jfieldID fieldID, jint value)
  3366.     { functions->SetStaticIntField(this, clazz, fieldID, value); }
  3367.     void SetStaticLongField(jclass clazz, jfieldID fieldID, jlong value)
  3368.     { functions->SetStaticLongField(this, clazz, fieldID, value); }
  3369.     void SetStaticFloatField(jclass clazz, jfieldID fieldID, jfloat value)
  3370.     { functions->SetStaticFloatField(this, clazz, fieldID, value); }
  3371.     void SetStaticDoubleField(jclass clazz, jfieldID fieldID, jdouble value)
  3372.     { functions->SetStaticDoubleField(this, clazz, fieldID, value); }
  3373.  
  3374.     jstring NewString(const jchar* unicodeChars, jsize len)
  3375.     { return functions->NewString(this, unicodeChars, len); }
  3376.  
  3377.     jsize GetStringLength(jstring string)
  3378.     { return functions->GetStringLength(this, string); }
  3379.  
  3380.     const jchar* GetStringChars(jstring string, jboolean* isCopy)
  3381.     { return functions->GetStringChars(this, string, isCopy); }
  3382.  
  3383.     void ReleaseStringChars(jstring string, const jchar* chars)
  3384.     { functions->ReleaseStringChars(this, string, chars); }
  3385.  
  3386.     jstring NewStringUTF(const char* bytes)
  3387.     { return functions->NewStringUTF(this, bytes); }
  3388.  
  3389.     jsize GetStringUTFLength(jstring string)
  3390.     { return functions->GetStringUTFLength(this, string); }
  3391.  
  3392.     const char* GetStringUTFChars(jstring string, jboolean* isCopy)
  3393.     { return functions->GetStringUTFChars(this, string, isCopy); }
  3394.  
  3395.     void ReleaseStringUTFChars(jstring string, const char* utf)
  3396.     { functions->ReleaseStringUTFChars(this, string, utf); }
  3397.  
  3398.     jsize GetArrayLength(jarray array)
  3399.     { return functions->GetArrayLength(this, array); }
  3400.  
  3401.     jobjectArray NewObjectArray(jsize length, jclass elementClass,
  3402.         jobject initialElement)
  3403.     { return functions->NewObjectArray(this, length, elementClass,
  3404.         initialElement); }
  3405.  
  3406.     jobject GetObjectArrayElement(jobjectArray array, jsize index)
  3407.     { return functions->GetObjectArrayElement(this, array, index); }
  3408.  
  3409.     void SetObjectArrayElement(jobjectArray array, jsize index, jobject value)
  3410.     { functions->SetObjectArrayElement(this, array, index, value); }
  3411.  
  3412.     jbooleanArray NewBooleanArray(jsize length)
  3413.     { return functions->NewBooleanArray(this, length); }
  3414.     jbyteArray NewByteArray(jsize length)
  3415.     { return functions->NewByteArray(this, length); }
  3416.     jcharArray NewCharArray(jsize length)
  3417.     { return functions->NewCharArray(this, length); }
  3418.     jshortArray NewShortArray(jsize length)
  3419.     { return functions->NewShortArray(this, length); }
  3420.     jintArray NewIntArray(jsize length)
  3421.     { return functions->NewIntArray(this, length); }
  3422.     jlongArray NewLongArray(jsize length)
  3423.     { return functions->NewLongArray(this, length); }
  3424.     jfloatArray NewFloatArray(jsize length)
  3425.     { return functions->NewFloatArray(this, length); }
  3426.     jdoubleArray NewDoubleArray(jsize length)
  3427.     { return functions->NewDoubleArray(this, length); }
  3428.  
  3429.     jboolean* GetBooleanArrayElements(jbooleanArray array, jboolean* isCopy)
  3430.     { return functions->GetBooleanArrayElements(this, array, isCopy); }
  3431.     jbyte* GetByteArrayElements(jbyteArray array, jboolean* isCopy)
  3432.     { return functions->GetByteArrayElements(this, array, isCopy); }
  3433.     jchar* GetCharArrayElements(jcharArray array, jboolean* isCopy)
  3434.     { return functions->GetCharArrayElements(this, array, isCopy); }
  3435.     jshort* GetShortArrayElements(jshortArray array, jboolean* isCopy)
  3436.     { return functions->GetShortArrayElements(this, array, isCopy); }
  3437.     jint* GetIntArrayElements(jintArray array, jboolean* isCopy)
  3438.     { return functions->GetIntArrayElements(this, array, isCopy); }
  3439.     jlong* GetLongArrayElements(jlongArray array, jboolean* isCopy)
  3440.     { return functions->GetLongArrayElements(this, array, isCopy); }
  3441.     jfloat* GetFloatArrayElements(jfloatArray array, jboolean* isCopy)
  3442.     { return functions->GetFloatArrayElements(this, array, isCopy); }
  3443.     jdouble* GetDoubleArrayElements(jdoubleArray array, jboolean* isCopy)
  3444.     { return functions->GetDoubleArrayElements(this, array, isCopy); }
  3445.  
  3446.     void ReleaseBooleanArrayElements(jbooleanArray array, jboolean* elems,
  3447.         jint mode)
  3448.     { functions->ReleaseBooleanArrayElements(this, array, elems, mode); }
  3449.     void ReleaseByteArrayElements(jbyteArray array, jbyte* elems,
  3450.         jint mode)
  3451.     { functions->ReleaseByteArrayElements(this, array, elems, mode); }
  3452.     void ReleaseCharArrayElements(jcharArray array, jchar* elems,
  3453.         jint mode)
  3454.     { functions->ReleaseCharArrayElements(this, array, elems, mode); }
  3455.     void ReleaseShortArrayElements(jshortArray array, jshort* elems,
  3456.         jint mode)
  3457.     { functions->ReleaseShortArrayElements(this, array, elems, mode); }
  3458.     void ReleaseIntArrayElements(jintArray array, jint* elems,
  3459.         jint mode)
  3460.     { functions->ReleaseIntArrayElements(this, array, elems, mode); }
  3461.     void ReleaseLongArrayElements(jlongArray array, jlong* elems,
  3462.         jint mode)
  3463.     { functions->ReleaseLongArrayElements(this, array, elems, mode); }
  3464.     void ReleaseFloatArrayElements(jfloatArray array, jfloat* elems,
  3465.         jint mode)
  3466.     { functions->ReleaseFloatArrayElements(this, array, elems, mode); }
  3467.     void ReleaseDoubleArrayElements(jdoubleArray array, jdouble* elems,
  3468.         jint mode)
  3469.     { functions->ReleaseDoubleArrayElements(this, array, elems, mode); }
  3470.  
  3471.     void GetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
  3472.         jboolean* buf)
  3473.     { functions->GetBooleanArrayRegion(this, array, start, len, buf); }
  3474.     void GetByteArrayRegion(jbyteArray array, jsize start, jsize len,
  3475.         jbyte* buf)
  3476.     { functions->GetByteArrayRegion(this, array, start, len, buf); }
  3477.     void GetCharArrayRegion(jcharArray array, jsize start, jsize len,
  3478.         jchar* buf)
  3479.     { functions->GetCharArrayRegion(this, array, start, len, buf); }
  3480.     void GetShortArrayRegion(jshortArray array, jsize start, jsize len,
  3481.         jshort* buf)
  3482.     { functions->GetShortArrayRegion(this, array, start, len, buf); }
  3483.     void GetIntArrayRegion(jintArray array, jsize start, jsize len,
  3484.         jint* buf)
  3485.     { functions->GetIntArrayRegion(this, array, start, len, buf); }
  3486.     void GetLongArrayRegion(jlongArray array, jsize start, jsize len,
  3487.         jlong* buf)
  3488.     { functions->GetLongArrayRegion(this, array, start, len, buf); }
  3489.     void GetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
  3490.         jfloat* buf)
  3491.     { functions->GetFloatArrayRegion(this, array, start, len, buf); }
  3492.     void GetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
  3493.         jdouble* buf)
  3494.     { functions->GetDoubleArrayRegion(this, array, start, len, buf); }
  3495.  
  3496.     void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
  3497.         const jboolean* buf)
  3498.     { functions->SetBooleanArrayRegion(this, array, start, len, buf); }
  3499.     void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
  3500.         const jbyte* buf)
  3501.     { functions->SetByteArrayRegion(this, array, start, len, buf); }
  3502.     void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
  3503.         const jchar* buf)
  3504.     { functions->SetCharArrayRegion(this, array, start, len, buf); }
  3505.     void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
  3506.         const jshort* buf)
  3507.     { functions->SetShortArrayRegion(this, array, start, len, buf); }
  3508.     void SetIntArrayRegion(jintArray array, jsize start, jsize len,
  3509.         const jint* buf)
  3510.     { functions->SetIntArrayRegion(this, array, start, len, buf); }
  3511.     void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
  3512.         const jlong* buf)
  3513.     { functions->SetLongArrayRegion(this, array, start, len, buf); }
  3514.     void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
  3515.         const jfloat* buf)
  3516.     { functions->SetFloatArrayRegion(this, array, start, len, buf); }
  3517.     void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
  3518.         const jdouble* buf)
  3519.     { functions->SetDoubleArrayRegion(this, array, start, len, buf); }
  3520.  
  3521.     jint RegisterNatives(jclass clazz, const JNINativeMethod* methods,
  3522.         jint nMethods)
  3523.     { return functions->RegisterNatives(this, clazz, methods, nMethods); }
  3524.  
  3525.     jint UnregisterNatives(jclass clazz)
  3526.     { return functions->UnregisterNatives(this, clazz); }
  3527.  
  3528.     jint MonitorEnter(jobject obj)
  3529.     { return functions->MonitorEnter(this, obj); }
  3530.  
  3531.     jint MonitorExit(jobject obj)
  3532.     { return functions->MonitorExit(this, obj); }
  3533.  
  3534.     jint GetJavaVM(JavaVM** vm)
  3535.     { return functions->GetJavaVM(this, vm); }
  3536.  
  3537.     void GetStringRegion(jstring str, jsize start, jsize len, jchar* buf)
  3538.     { functions->GetStringRegion(this, str, start, len, buf); }
  3539.  
  3540.     void GetStringUTFRegion(jstring str, jsize start, jsize len, char* buf)
  3541.     { return functions->GetStringUTFRegion(this, str, start, len, buf); }
  3542.  
  3543.     void* GetPrimitiveArrayCritical(jarray array, jboolean* isCopy)
  3544.     { return functions->GetPrimitiveArrayCritical(this, array, isCopy); }
  3545.  
  3546.     void ReleasePrimitiveArrayCritical(jarray array, void* carray, jint mode)
  3547.     { functions->ReleasePrimitiveArrayCritical(this, array, carray, mode); }
  3548.  
  3549.     const jchar* GetStringCritical(jstring string, jboolean* isCopy)
  3550.     { return functions->GetStringCritical(this, string, isCopy); }
  3551.  
  3552.     void ReleaseStringCritical(jstring string, const jchar* carray)
  3553.     { functions->ReleaseStringCritical(this, string, carray); }
  3554.  
  3555.     jweak NewWeakGlobalRef(jobject obj)
  3556.     { return functions->NewWeakGlobalRef(this, obj); }
  3557.  
  3558.     void DeleteWeakGlobalRef(jweak obj)
  3559.     { functions->DeleteWeakGlobalRef(this, obj); }
  3560.  
  3561.     jboolean ExceptionCheck()
  3562.     { return functions->ExceptionCheck(this); }
  3563.  
  3564.     jobject NewDirectByteBuffer(void* address, jlong capacity)
  3565.     { return functions->NewDirectByteBuffer(this, address, capacity); }
  3566.  
  3567.     void* GetDirectBufferAddress(jobject buf)
  3568.     { return functions->GetDirectBufferAddress(this, buf); }
  3569.  
  3570.     jlong GetDirectBufferCapacity(jobject buf)
  3571.     { return functions->GetDirectBufferCapacity(this, buf); }
  3572.  
  3573.     /* added in JNI 1.6 */
  3574.     jobjectRefType GetObjectRefType(jobject obj)
  3575.     { return functions->GetObjectRefType(this, obj); }
  3576. #endif /*__cplusplus*/
  3577. # 1032 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  3578. };
  3579.  
  3580.  
  3581. /*
  3582.  * JNI invocation interface.
  3583.  */
  3584. struct JNIInvokeInterface {
  3585.     void*       reserved0;
  3586.     void*       reserved1;
  3587.     void*       reserved2;
  3588.  
  3589.     jint        (*DestroyJavaVM)(JavaVM*);
  3590.     jint        (*AttachCurrentThread)(JavaVM*, JNIEnv**, void*);
  3591.     jint        (*DetachCurrentThread)(JavaVM*);
  3592.     jint        (*GetEnv)(JavaVM*, void**, jint);
  3593.     jint        (*AttachCurrentThreadAsDaemon)(JavaVM*, JNIEnv**, void*);
  3594. };
  3595.  
  3596. /*
  3597.  * C++ version.
  3598.  */
  3599. struct _JavaVM {
  3600.     const struct JNIInvokeInterface* functions;
  3601.  
  3602. #if defined(__cplusplus)
  3603.     jint DestroyJavaVM()
  3604.     { return functions->DestroyJavaVM(this); }
  3605.     jint AttachCurrentThread(JNIEnv** p_env, void* thr_args)
  3606.     { return functions->AttachCurrentThread(this, p_env, thr_args); }
  3607.     jint DetachCurrentThread()
  3608.     { return functions->DetachCurrentThread(this); }
  3609.     jint GetEnv(void** env, jint version)
  3610.     { return functions->GetEnv(this, env, version); }
  3611.     jint AttachCurrentThreadAsDaemon(JNIEnv** p_env, void* thr_args)
  3612.     { return functions->AttachCurrentThreadAsDaemon(this, p_env, thr_args); }
  3613. #endif /*__cplusplus*/
  3614. # 1068 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  3615. };
  3616.  
  3617. struct JavaVMAttachArgs {
  3618.     jint        version;    /* must be >= JNI_VERSION_1_2 */
  3619.     const char* name;       /* NULL or name of thread as modified UTF-8 str */
  3620.     jobject     group;      /* global ref of a ThreadGroup object, or NULL */
  3621. };
  3622. typedef struct JavaVMAttachArgs JavaVMAttachArgs;
  3623.  
  3624. /*
  3625.  * JNI 1.2+ initialization.  (As of 1.6, the pre-1.2 structures are no
  3626.  * longer supported.)
  3627.  */
  3628. typedef struct JavaVMOption {
  3629.     const char* optionString;
  3630.     void*       extraInfo;
  3631. } JavaVMOption;
  3632.  
  3633. typedef struct JavaVMInitArgs {
  3634.     jint        version;    /* use JNI_VERSION_1_2 or later */
  3635.  
  3636.     jint        nOptions;
  3637.     JavaVMOption* options;
  3638.     jboolean    ignoreUnrecognized;
  3639. } JavaVMInitArgs;
  3640.  
  3641. #ifdef __cplusplus
  3642. extern "C" {
  3643. #endif
  3644. # 1097 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  3645. /*
  3646.  * VM initialization functions.
  3647.  *
  3648.  * Note these are the only symbols exported for JNI by the VM.
  3649.  */
  3650. jint JNI_GetDefaultJavaVMInitArgs(void*);
  3651. jint JNI_CreateJavaVM(JavaVM**, JNIEnv**, void*);
  3652. jint JNI_GetCreatedJavaVMs(JavaVM**, jsize, jsize*);
  3653.  
  3654. #define JNIIMPORT
  3655. #define JNIEXPORT  __attribute__ ((visibility ("default")))
  3656. #define JNICALL
  3657.  
  3658. /*
  3659.  * Prototypes for functions exported by loadable shared libs.  These are
  3660.  * called by JNI, not provided by JNI.
  3661.  */
  3662. JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved);
  3663. JNIEXPORT void JNI_OnUnload(JavaVM* vm, void* reserved);
  3664.  
  3665. #ifdef __cplusplus
  3666. }
  3667. #endif
  3668. # 1120 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  3669.  
  3670.  
  3671. /*
  3672.  * Manifest constants.
  3673.  */
  3674. #define JNI_FALSE   0
  3675. #define JNI_TRUE    1
  3676.  
  3677. #define JNI_VERSION_1_1 0x00010001
  3678. #define JNI_VERSION_1_2 0x00010002
  3679. #define JNI_VERSION_1_4 0x00010004
  3680. #define JNI_VERSION_1_6 0x00010006
  3681.  
  3682. #define JNI_OK          (0)         /* no error */
  3683. #define JNI_ERR         (-1)        /* generic error */
  3684. #define JNI_EDETACHED   (-2)        /* thread detached from the VM */
  3685. #define JNI_EVERSION    (-3)        /* JNI version error */
  3686.  
  3687. #define JNI_COMMIT      1           /* copy content, do not free buffer */
  3688. #define JNI_ABORT       2           /* free buffer w/o copying back */
  3689.  
  3690. #endif  /* JNI_H_ */
  3691. # 1142 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/jni.h" 3
  3692. # 21 "packages/apps/Gallery2/jni/filters/filters.h" 2
  3693. #if 0 /* expanded by -frewrite-includes */
  3694. #include <string.h>
  3695. #endif /* expanded by -frewrite-includes */
  3696. # 21 "packages/apps/Gallery2/jni/filters/filters.h"
  3697. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 1 3
  3698. /*
  3699.  * Copyright (C) 2008 The Android Open Source Project
  3700.  * All rights reserved.
  3701.  *
  3702.  * Redistribution and use in source and binary forms, with or without
  3703.  * modification, are permitted provided that the following conditions
  3704.  * are met:
  3705.  *  * Redistributions of source code must retain the above copyright
  3706.  *    notice, this list of conditions and the following disclaimer.
  3707.  *  * Redistributions in binary form must reproduce the above copyright
  3708.  *    notice, this list of conditions and the following disclaimer in
  3709.  *    the documentation and/or other materials provided with the
  3710.  *    distribution.
  3711.  *
  3712.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  3713.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  3714.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  3715.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  3716.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  3717.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  3718.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  3719.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  3720.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  3721.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  3722.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3723.  * SUCH DAMAGE.
  3724.  */
  3725.  
  3726. #ifndef _STRING_H
  3727. #define _STRING_H
  3728.  
  3729. #if 0 /* expanded by -frewrite-includes */
  3730. #include <sys/cdefs.h>
  3731. #endif /* expanded by -frewrite-includes */
  3732. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  3733. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  3734. #if 0 /* expanded by -frewrite-includes */
  3735. #include <stddef.h>
  3736. #endif /* expanded by -frewrite-includes */
  3737. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  3738. # 1 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 1 3
  3739. /*===---- stddef.h - Basic type definitions --------------------------------===
  3740.  *
  3741.  * Copyright (c) 2008 Eli Friedman
  3742.  *
  3743.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  3744.  * of this software and associated documentation files (the "Software"), to deal
  3745.  * in the Software without restriction, including without limitation the rights
  3746.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  3747.  * copies of the Software, and to permit persons to whom the Software is
  3748.  * furnished to do so, subject to the following conditions:
  3749.  *
  3750.  * The above copyright notice and this permission notice shall be included in
  3751.  * all copies or substantial portions of the Software.
  3752.  *
  3753.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  3754.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  3755.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  3756.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  3757.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  3758.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  3759.  * THE SOFTWARE.
  3760.  *
  3761.  *===-----------------------------------------------------------------------===
  3762.  */
  3763.  
  3764. #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) ||                       \
  3765.     defined(__need_size_t) || defined(__need_wchar_t) ||                       \
  3766.     defined(__need_NULL) || defined(__need_wint_t)
  3767.  
  3768. #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) &&                   \
  3769.     !defined(__need_wchar_t) && !defined(__need_NULL) &&                       \
  3770.     !defined(__need_wint_t)
  3771. /* Always define miscellaneous pieces when modules are available. */
  3772. #if !__has_feature(modules)
  3773. #define __STDDEF_H
  3774. #endif
  3775. # 37 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3776. #define __need_ptrdiff_t
  3777. #define __need_size_t
  3778. #define __need_wchar_t
  3779. #define __need_NULL
  3780. #define __need_STDDEF_H_misc
  3781. /* __need_wint_t is intentionally not defined here. */
  3782. #endif
  3783. # 44 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3784.  
  3785. #if defined(__need_ptrdiff_t)
  3786. #if !defined(_PTRDIFF_T) || __has_feature(modules)
  3787. /* Always define ptrdiff_t when modules are available. */
  3788. #if !__has_feature(modules)
  3789. #define _PTRDIFF_T
  3790. #endif
  3791. # 51 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3792. typedef __PTRDIFF_TYPE__ ptrdiff_t;
  3793. #endif
  3794. # 53 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3795. #undef __need_ptrdiff_t
  3796. #endif /* defined(__need_ptrdiff_t) */
  3797. # 55 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3798.  
  3799. #if defined(__need_size_t)
  3800. #if !defined(_SIZE_T) || __has_feature(modules)
  3801. /* Always define size_t when modules are available. */
  3802. #if !__has_feature(modules)
  3803. #define _SIZE_T
  3804. #endif
  3805. # 62 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3806. typedef __SIZE_TYPE__ size_t;
  3807. #endif
  3808. # 64 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3809. #undef __need_size_t
  3810. #endif /*defined(__need_size_t) */
  3811. # 66 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3812.  
  3813. #if defined(__need_STDDEF_H_misc)
  3814. /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
  3815.  * enabled. */
  3816. #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
  3817.      !defined(_RSIZE_T)) || __has_feature(modules)
  3818. /* Always define rsize_t when modules are available. */
  3819. #if !__has_feature(modules)
  3820. #define _RSIZE_T
  3821. #endif
  3822. # 76 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3823. typedef __SIZE_TYPE__ rsize_t;
  3824. #endif
  3825. # 78 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3826. #endif /* defined(__need_STDDEF_H_misc) */
  3827. # 79 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3828.  
  3829. #if defined(__need_wchar_t)
  3830. #ifndef __cplusplus
  3831. /* Always define wchar_t when modules are available. */
  3832. #if !defined(_WCHAR_T) || __has_feature(modules)
  3833. #if !__has_feature(modules)
  3834. #define _WCHAR_T
  3835. #if defined(_MSC_EXTENSIONS)
  3836. #define _WCHAR_T_DEFINED
  3837. #endif
  3838. # 89 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3839. #endif
  3840. # 90 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3841. typedef __WCHAR_TYPE__ wchar_t;
  3842. #endif
  3843. # 92 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3844. #endif
  3845. # 93 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3846. #undef __need_wchar_t
  3847. #endif /* defined(__need_wchar_t) */
  3848. # 95 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3849.  
  3850. #if defined(__need_NULL)
  3851. #undef NULL
  3852. #ifdef __cplusplus
  3853. #  if !defined(__MINGW32__) && !defined(_MSC_VER)
  3854. #    define NULL __null
  3855. #  else
  3856. # 102 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3857. #    define NULL 0
  3858. #  endif
  3859. # 104 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3860. #else
  3861. # 105 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3862. #  define NULL ((void*)0)
  3863. #endif
  3864. # 107 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3865. #ifdef __cplusplus
  3866. #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
  3867. namespace std { typedef decltype(nullptr) nullptr_t; }
  3868. using ::std::nullptr_t;
  3869. #endif
  3870. # 112 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3871. #endif
  3872. # 113 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3873. #undef __need_NULL
  3874. #endif /* defined(__need_NULL) */
  3875. # 115 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3876.  
  3877. #if defined(__need_STDDEF_H_misc)
  3878. #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
  3879. #if 0 /* expanded by -frewrite-includes */
  3880. #include "__stddef_max_align_t.h"
  3881. #endif /* expanded by -frewrite-includes */
  3882. # 118 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3883. # 119 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3884. #endif
  3885. # 120 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3886. #define offsetof(t, d) __builtin_offsetof(t, d)
  3887. #undef __need_STDDEF_H_misc
  3888. #endif  /* defined(__need_STDDEF_H_misc) */
  3889. # 123 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3890.  
  3891. /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
  3892. __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
  3893. #if defined(__need_wint_t)
  3894. /* Always define wint_t when modules are available. */
  3895. #if !defined(_WINT_T) || __has_feature(modules)
  3896. #if !__has_feature(modules)
  3897. #define _WINT_T
  3898. #endif
  3899. # 132 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3900. typedef __WINT_TYPE__ wint_t;
  3901. #endif
  3902. # 134 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3903. #undef __need_wint_t
  3904. #endif /* __need_wint_t */
  3905. # 136 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3906.  
  3907. #endif
  3908. # 138 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  3909. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 2 3
  3910. #if 0 /* expanded by -frewrite-includes */
  3911. #include <xlocale.h>
  3912. #endif /* expanded by -frewrite-includes */
  3913. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  3914. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/xlocale.h" 1 3
  3915. /*
  3916.  * Copyright (C) 2014 The Android Open Source Project
  3917.  * All rights reserved.
  3918.  *
  3919.  * Redistribution and use in source and binary forms, with or without
  3920.  * modification, are permitted provided that the following conditions
  3921.  * are met:
  3922.  *  * Redistributions of source code must retain the above copyright
  3923.  *    notice, this list of conditions and the following disclaimer.
  3924.  *  * Redistributions in binary form must reproduce the above copyright
  3925.  *    notice, this list of conditions and the following disclaimer in
  3926.  *    the documentation and/or other materials provided with the
  3927.  *    distribution.
  3928.  *
  3929.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  3930.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  3931.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  3932.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  3933.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  3934.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  3935.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  3936.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  3937.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  3938.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  3939.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3940.  * SUCH DAMAGE.
  3941.  */
  3942.  
  3943. #ifndef _XLOCALE_H_
  3944. #define _XLOCALE_H_
  3945.  
  3946. #if 0 /* expanded by -frewrite-includes */
  3947. #include <sys/cdefs.h>
  3948. #endif /* expanded by -frewrite-includes */
  3949. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/xlocale.h" 3
  3950. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/xlocale.h" 3
  3951.  
  3952. /* If we just use void* here, GCC exposes that in error messages. */
  3953. struct __locale_t;
  3954. typedef struct __locale_t* locale_t;
  3955.  
  3956. #endif /* _XLOCALE_H_ */
  3957. # 39 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/xlocale.h" 3
  3958. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 2 3
  3959.  
  3960. #if 0 /* expanded by -frewrite-includes */
  3961. #include <bits/strcasecmp.h>
  3962. #endif /* expanded by -frewrite-includes */
  3963. # 36 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  3964. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 1 3
  3965. /*
  3966.  * Copyright (C) 2016 The Android Open Source Project
  3967.  * All rights reserved.
  3968.  *
  3969.  * Redistribution and use in source and binary forms, with or without
  3970.  * modification, are permitted provided that the following conditions
  3971.  * are met:
  3972.  *  * Redistributions of source code must retain the above copyright
  3973.  *    notice, this list of conditions and the following disclaimer.
  3974.  *  * Redistributions in binary form must reproduce the above copyright
  3975.  *    notice, this list of conditions and the following disclaimer in
  3976.  *    the documentation and/or other materials provided with the
  3977.  *    distribution.
  3978.  *
  3979.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  3980.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  3981.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  3982.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  3983.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  3984.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  3985.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  3986.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  3987.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  3988.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  3989.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3990.  * SUCH DAMAGE.
  3991.  */
  3992.  
  3993. #ifndef _BITS_STRCASECMP_H_
  3994. #define _BITS_STRCASECMP_H_
  3995.  
  3996. #if 0 /* expanded by -frewrite-includes */
  3997. #include <sys/cdefs.h>
  3998. #endif /* expanded by -frewrite-includes */
  3999. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 3
  4000. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 3
  4001. #if 0 /* expanded by -frewrite-includes */
  4002. #include <sys/types.h>
  4003. #endif /* expanded by -frewrite-includes */
  4004. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 3
  4005. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 1 3
  4006. /*
  4007.  * Copyright (C) 2008 The Android Open Source Project
  4008.  * All rights reserved.
  4009.  *
  4010.  * Redistribution and use in source and binary forms, with or without
  4011.  * modification, are permitted provided that the following conditions
  4012.  * are met:
  4013.  *  * Redistributions of source code must retain the above copyright
  4014.  *    notice, this list of conditions and the following disclaimer.
  4015.  *  * Redistributions in binary form must reproduce the above copyright
  4016.  *    notice, this list of conditions and the following disclaimer in
  4017.  *    the documentation and/or other materials provided with the
  4018.  *    distribution.
  4019.  *
  4020.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  4021.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  4022.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  4023.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  4024.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  4025.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  4026.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  4027.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  4028.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  4029.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  4030.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4031.  * SUCH DAMAGE.
  4032.  */
  4033.  
  4034. #ifndef _SYS_TYPES_H_
  4035. #define _SYS_TYPES_H_
  4036.  
  4037. #if 0 /* expanded by -frewrite-includes */
  4038. #include <stddef.h>
  4039. #endif /* expanded by -frewrite-includes */
  4040. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4041. # 1 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 1 3
  4042. /*===---- stddef.h - Basic type definitions --------------------------------===
  4043.  *
  4044.  * Copyright (c) 2008 Eli Friedman
  4045.  *
  4046.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  4047.  * of this software and associated documentation files (the "Software"), to deal
  4048.  * in the Software without restriction, including without limitation the rights
  4049.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  4050.  * copies of the Software, and to permit persons to whom the Software is
  4051.  * furnished to do so, subject to the following conditions:
  4052.  *
  4053.  * The above copyright notice and this permission notice shall be included in
  4054.  * all copies or substantial portions of the Software.
  4055.  *
  4056.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  4057.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  4058.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  4059.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  4060.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  4061.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  4062.  * THE SOFTWARE.
  4063.  *
  4064.  *===-----------------------------------------------------------------------===
  4065.  */
  4066.  
  4067. #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) ||                       \
  4068.     defined(__need_size_t) || defined(__need_wchar_t) ||                       \
  4069.     defined(__need_NULL) || defined(__need_wint_t)
  4070.  
  4071. #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) &&                   \
  4072.     !defined(__need_wchar_t) && !defined(__need_NULL) &&                       \
  4073.     !defined(__need_wint_t)
  4074. /* Always define miscellaneous pieces when modules are available. */
  4075. #if !__has_feature(modules)
  4076. #define __STDDEF_H
  4077. #endif
  4078. # 37 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4079. #define __need_ptrdiff_t
  4080. #define __need_size_t
  4081. #define __need_wchar_t
  4082. #define __need_NULL
  4083. #define __need_STDDEF_H_misc
  4084. /* __need_wint_t is intentionally not defined here. */
  4085. #endif
  4086. # 44 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4087.  
  4088. #if defined(__need_ptrdiff_t)
  4089. #if !defined(_PTRDIFF_T) || __has_feature(modules)
  4090. /* Always define ptrdiff_t when modules are available. */
  4091. #if !__has_feature(modules)
  4092. #define _PTRDIFF_T
  4093. #endif
  4094. # 51 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4095. typedef __PTRDIFF_TYPE__ ptrdiff_t;
  4096. #endif
  4097. # 53 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4098. #undef __need_ptrdiff_t
  4099. #endif /* defined(__need_ptrdiff_t) */
  4100. # 55 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4101.  
  4102. #if defined(__need_size_t)
  4103. #if !defined(_SIZE_T) || __has_feature(modules)
  4104. /* Always define size_t when modules are available. */
  4105. #if !__has_feature(modules)
  4106. #define _SIZE_T
  4107. #endif
  4108. # 62 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4109. typedef __SIZE_TYPE__ size_t;
  4110. #endif
  4111. # 64 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4112. #undef __need_size_t
  4113. #endif /*defined(__need_size_t) */
  4114. # 66 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4115.  
  4116. #if defined(__need_STDDEF_H_misc)
  4117. /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
  4118.  * enabled. */
  4119. #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
  4120.      !defined(_RSIZE_T)) || __has_feature(modules)
  4121. /* Always define rsize_t when modules are available. */
  4122. #if !__has_feature(modules)
  4123. #define _RSIZE_T
  4124. #endif
  4125. # 76 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4126. typedef __SIZE_TYPE__ rsize_t;
  4127. #endif
  4128. # 78 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4129. #endif /* defined(__need_STDDEF_H_misc) */
  4130. # 79 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4131.  
  4132. #if defined(__need_wchar_t)
  4133. #ifndef __cplusplus
  4134. /* Always define wchar_t when modules are available. */
  4135. #if !defined(_WCHAR_T) || __has_feature(modules)
  4136. #if !__has_feature(modules)
  4137. #define _WCHAR_T
  4138. #if defined(_MSC_EXTENSIONS)
  4139. #define _WCHAR_T_DEFINED
  4140. #endif
  4141. # 89 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4142. #endif
  4143. # 90 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4144. typedef __WCHAR_TYPE__ wchar_t;
  4145. #endif
  4146. # 92 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4147. #endif
  4148. # 93 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4149. #undef __need_wchar_t
  4150. #endif /* defined(__need_wchar_t) */
  4151. # 95 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4152.  
  4153. #if defined(__need_NULL)
  4154. #undef NULL
  4155. #ifdef __cplusplus
  4156. #  if !defined(__MINGW32__) && !defined(_MSC_VER)
  4157. #    define NULL __null
  4158. #  else
  4159. # 102 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4160. #    define NULL 0
  4161. #  endif
  4162. # 104 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4163. #else
  4164. # 105 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4165. #  define NULL ((void*)0)
  4166. #endif
  4167. # 107 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4168. #ifdef __cplusplus
  4169. #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
  4170. namespace std { typedef decltype(nullptr) nullptr_t; }
  4171. using ::std::nullptr_t;
  4172. #endif
  4173. # 112 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4174. #endif
  4175. # 113 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4176. #undef __need_NULL
  4177. #endif /* defined(__need_NULL) */
  4178. # 115 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4179.  
  4180. #if defined(__need_STDDEF_H_misc)
  4181. #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
  4182. #if 0 /* expanded by -frewrite-includes */
  4183. #include "__stddef_max_align_t.h"
  4184. #endif /* expanded by -frewrite-includes */
  4185. # 118 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4186. # 119 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4187. #endif
  4188. # 120 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4189. #define offsetof(t, d) __builtin_offsetof(t, d)
  4190. #undef __need_STDDEF_H_misc
  4191. #endif  /* defined(__need_STDDEF_H_misc) */
  4192. # 123 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4193.  
  4194. /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
  4195. __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
  4196. #if defined(__need_wint_t)
  4197. /* Always define wint_t when modules are available. */
  4198. #if !defined(_WINT_T) || __has_feature(modules)
  4199. #if !__has_feature(modules)
  4200. #define _WINT_T
  4201. #endif
  4202. # 132 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4203. typedef __WINT_TYPE__ wint_t;
  4204. #endif
  4205. # 134 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4206. #undef __need_wint_t
  4207. #endif /* __need_wint_t */
  4208. # 136 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4209.  
  4210. #endif
  4211. # 138 "/home/android/carbon/prebuilts/clang/host/linux-x86/clang-3859424/bin/../lib64/clang/4.0.285906/include/stddef.h" 3
  4212. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 2 3
  4213. #if 0 /* expanded by -frewrite-includes */
  4214. #include <stdint.h>
  4215. #endif /* expanded by -frewrite-includes */
  4216. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4217. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4218. #if 0 /* expanded by -frewrite-includes */
  4219. #include <sys/cdefs.h>
  4220. #endif /* expanded by -frewrite-includes */
  4221. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4222. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4223.  
  4224. #if 0 /* expanded by -frewrite-includes */
  4225. #include <linux/types.h>
  4226. #endif /* expanded by -frewrite-includes */
  4227. # 36 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4228. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/types.h" 1 3
  4229. /****************************************************************************
  4230.  ****************************************************************************
  4231.  ***
  4232.  ***   This header was automatically generated from a Linux kernel header
  4233.  ***   of the same name, to make information necessary for userspace to
  4234.  ***   call into the kernel available to libc.  It contains only constants,
  4235.  ***   structures, and macros generated from the original header, and thus,
  4236.  ***   contains no copyrightable information.
  4237.  ***
  4238.  ***   To edit the content of this header, modify the corresponding
  4239.  ***   source file (e.g. under external/kernel-headers/original/) then
  4240.  ***   run bionic/libc/kernel/tools/update_all.py
  4241.  ***
  4242.  ***   Any manual change here will be lost the next time this script will
  4243.  ***   be run. You've been warned!
  4244.  ***
  4245.  ****************************************************************************
  4246.  ****************************************************************************/
  4247. #ifndef _UAPI_LINUX_TYPES_H
  4248. #define _UAPI_LINUX_TYPES_H
  4249. #if 0 /* expanded by -frewrite-includes */
  4250. #include <asm/types.h>
  4251. #endif /* expanded by -frewrite-includes */
  4252. # 21 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/types.h" 3
  4253. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/types.h" 1 3
  4254. /****************************************************************************
  4255.  ****************************************************************************
  4256.  ***
  4257.  ***   This header was automatically generated from a Linux kernel header
  4258.  ***   of the same name, to make information necessary for userspace to
  4259.  ***   call into the kernel available to libc.  It contains only constants,
  4260.  ***   structures, and macros generated from the original header, and thus,
  4261.  ***   contains no copyrightable information.
  4262.  ***
  4263.  ***   To edit the content of this header, modify the corresponding
  4264.  ***   source file (e.g. under external/kernel-headers/original/) then
  4265.  ***   run bionic/libc/kernel/tools/update_all.py
  4266.  ***
  4267.  ***   Any manual change here will be lost the next time this script will
  4268.  ***   be run. You've been warned!
  4269.  ***
  4270.  ****************************************************************************
  4271.  ****************************************************************************/
  4272. #ifndef _ASM_GENERIC_TYPES_H
  4273. #define _ASM_GENERIC_TYPES_H
  4274. #if 0 /* expanded by -frewrite-includes */
  4275. #include <asm-generic/int-ll64.h>
  4276. #endif /* expanded by -frewrite-includes */
  4277. # 21 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/types.h" 3
  4278. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/int-ll64.h" 1 3
  4279. /****************************************************************************
  4280.  ****************************************************************************
  4281.  ***
  4282.  ***   This header was automatically generated from a Linux kernel header
  4283.  ***   of the same name, to make information necessary for userspace to
  4284.  ***   call into the kernel available to libc.  It contains only constants,
  4285.  ***   structures, and macros generated from the original header, and thus,
  4286.  ***   contains no copyrightable information.
  4287.  ***
  4288.  ***   To edit the content of this header, modify the corresponding
  4289.  ***   source file (e.g. under external/kernel-headers/original/) then
  4290.  ***   run bionic/libc/kernel/tools/update_all.py
  4291.  ***
  4292.  ***   Any manual change here will be lost the next time this script will
  4293.  ***   be run. You've been warned!
  4294.  ***
  4295.  ****************************************************************************
  4296.  ****************************************************************************/
  4297. #ifndef _UAPI_ASM_GENERIC_INT_LL64_H
  4298. #define _UAPI_ASM_GENERIC_INT_LL64_H
  4299. #if 0 /* expanded by -frewrite-includes */
  4300. #include <asm/bitsperlong.h>
  4301. #endif /* expanded by -frewrite-includes */
  4302. # 21 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/int-ll64.h" 3
  4303. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/bitsperlong.h" 1 3
  4304. /****************************************************************************
  4305.  ****************************************************************************
  4306.  ***
  4307.  ***   This header was automatically generated from a Linux kernel header
  4308.  ***   of the same name, to make information necessary for userspace to
  4309.  ***   call into the kernel available to libc.  It contains only constants,
  4310.  ***   structures, and macros generated from the original header, and thus,
  4311.  ***   contains no copyrightable information.
  4312.  ***
  4313.  ***   To edit the content of this header, modify the corresponding
  4314.  ***   source file (e.g. under external/kernel-headers/original/) then
  4315.  ***   run bionic/libc/kernel/tools/update_all.py
  4316.  ***
  4317.  ***   Any manual change here will be lost the next time this script will
  4318.  ***   be run. You've been warned!
  4319.  ***
  4320.  ****************************************************************************
  4321.  ****************************************************************************/
  4322. #if 0 /* expanded by -frewrite-includes */
  4323. #include <asm-generic/bitsperlong.h>
  4324. #endif /* expanded by -frewrite-includes */
  4325. # 19 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/bitsperlong.h" 3
  4326. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/bitsperlong.h" 1 3
  4327. /****************************************************************************
  4328.  ****************************************************************************
  4329.  ***
  4330.  ***   This header was automatically generated from a Linux kernel header
  4331.  ***   of the same name, to make information necessary for userspace to
  4332.  ***   call into the kernel available to libc.  It contains only constants,
  4333.  ***   structures, and macros generated from the original header, and thus,
  4334.  ***   contains no copyrightable information.
  4335.  ***
  4336.  ***   To edit the content of this header, modify the corresponding
  4337.  ***   source file (e.g. under external/kernel-headers/original/) then
  4338.  ***   run bionic/libc/kernel/tools/update_all.py
  4339.  ***
  4340.  ***   Any manual change here will be lost the next time this script will
  4341.  ***   be run. You've been warned!
  4342.  ***
  4343.  ****************************************************************************
  4344.  ****************************************************************************/
  4345. #ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG
  4346. #define _UAPI__ASM_GENERIC_BITS_PER_LONG
  4347. #ifndef __BITS_PER_LONG
  4348. #define __BITS_PER_LONG 32
  4349. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4350. #endif
  4351. # 25 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/bitsperlong.h" 3
  4352. #endif
  4353. # 26 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/bitsperlong.h" 3
  4354. # 20 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/bitsperlong.h" 2 3
  4355. # 22 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/int-ll64.h" 2 3
  4356. #ifndef __ASSEMBLY__
  4357. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4358. typedef __signed__ char __s8;
  4359. typedef unsigned char __u8;
  4360. typedef __signed__ short __s16;
  4361. typedef unsigned short __u16;
  4362. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4363. typedef __signed__ int __s32;
  4364. typedef unsigned int __u32;
  4365. #ifdef __GNUC__
  4366. __extension__ typedef __signed__ long long __s64;
  4367. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4368. __extension__ typedef unsigned long long __u64;
  4369. #else
  4370. # 36 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/int-ll64.h" 3
  4371. typedef __signed__ long long __s64;
  4372. typedef unsigned long long __u64;
  4373. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4374. #endif
  4375. # 40 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/int-ll64.h" 3
  4376. #endif
  4377. # 41 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/int-ll64.h" 3
  4378. #endif
  4379. # 42 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/int-ll64.h" 3
  4380. # 22 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/types.h" 2 3
  4381. #endif
  4382. # 23 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/types.h" 3
  4383. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4384. # 22 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/types.h" 2 3
  4385. #ifndef __ASSEMBLY__
  4386. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4387. #if 0 /* expanded by -frewrite-includes */
  4388. #include <linux/posix_types.h>
  4389. #endif /* expanded by -frewrite-includes */
  4390. # 24 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/types.h" 3
  4391. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/posix_types.h" 1 3
  4392. /****************************************************************************
  4393.  ****************************************************************************
  4394.  ***
  4395.  ***   This header was automatically generated from a Linux kernel header
  4396.  ***   of the same name, to make information necessary for userspace to
  4397.  ***   call into the kernel available to libc.  It contains only constants,
  4398.  ***   structures, and macros generated from the original header, and thus,
  4399.  ***   contains no copyrightable information.
  4400.  ***
  4401.  ***   To edit the content of this header, modify the corresponding
  4402.  ***   source file (e.g. under external/kernel-headers/original/) then
  4403.  ***   run bionic/libc/kernel/tools/update_all.py
  4404.  ***
  4405.  ***   Any manual change here will be lost the next time this script will
  4406.  ***   be run. You've been warned!
  4407.  ***
  4408.  ****************************************************************************
  4409.  ****************************************************************************/
  4410. #ifndef _LINUX_POSIX_TYPES_H
  4411. #define _LINUX_POSIX_TYPES_H
  4412. #if 0 /* expanded by -frewrite-includes */
  4413. #include <linux/stddef.h>
  4414. #endif /* expanded by -frewrite-includes */
  4415. # 21 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/posix_types.h" 3
  4416. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/stddef.h" 1 3
  4417. /****************************************************************************
  4418.  ****************************************************************************
  4419.  ***
  4420.  ***   This header was automatically generated from a Linux kernel header
  4421.  ***   of the same name, to make information necessary for userspace to
  4422.  ***   call into the kernel available to libc.  It contains only constants,
  4423.  ***   structures, and macros generated from the original header, and thus,
  4424.  ***   contains no copyrightable information.
  4425.  ***
  4426.  ***   To edit the content of this header, modify the corresponding
  4427.  ***   source file (e.g. under external/kernel-headers/original/) then
  4428.  ***   run bionic/libc/kernel/tools/update_all.py
  4429.  ***
  4430.  ***   Any manual change here will be lost the next time this script will
  4431.  ***   be run. You've been warned!
  4432.  ***
  4433.  ****************************************************************************
  4434.  ****************************************************************************/
  4435. #if 0 /* expanded by -frewrite-includes */
  4436. #include <linux/compiler.h>
  4437. #endif /* expanded by -frewrite-includes */
  4438. # 19 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/stddef.h" 3
  4439. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/compiler.h" 1 3
  4440. #ifndef _UAPI_LINUX_COMPILER_H
  4441. #define _UAPI_LINUX_COMPILER_H
  4442.  
  4443. /*
  4444.  * This file is not currently in the Linux kernel tree.
  4445.  * Upstream uapi headers refer to <linux/compiler.h> but there is
  4446.  * no such uapi file. We've sent this upstream, and are optimistically
  4447.  * adding it to bionic in the meantime. This should be replaced by
  4448.  * a scrubbed header from external/kernel-headers when possible.
  4449.  *
  4450.  * An alternative to this file is to check in a symbolic link to the
  4451.  * non-uapi <linux/compiler.h>. That's fine for building bionic too.
  4452.  */
  4453.  
  4454. #define __user
  4455. #define __force
  4456.  
  4457. #endif /* _UAPI_LINUX_COMPILER_H */
  4458. # 19 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/compiler.h" 3
  4459. # 20 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/stddef.h" 2 3
  4460. #ifndef __always_inline
  4461. #define __always_inline inline
  4462. #endif
  4463. # 23 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/stddef.h" 3
  4464. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4465. # 22 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/posix_types.h" 2 3
  4466. #undef __FD_SETSIZE
  4467. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4468. #define __FD_SETSIZE 1024
  4469. typedef struct {
  4470.   unsigned long fds_bits[__FD_SETSIZE / (8 * sizeof(long))];
  4471. } __kernel_fd_set;
  4472. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4473. typedef void(* __kernel_sighandler_t) (int);
  4474. typedef int __kernel_key_t;
  4475. typedef int __kernel_mqd_t;
  4476. #if 0 /* expanded by -frewrite-includes */
  4477. #include <asm/posix_types.h>
  4478. #endif /* expanded by -frewrite-includes */
  4479. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/posix_types.h" 3
  4480. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/posix_types.h" 1 3
  4481. /****************************************************************************
  4482.  ****************************************************************************
  4483.  ***
  4484.  ***   This header was automatically generated from a Linux kernel header
  4485.  ***   of the same name, to make information necessary for userspace to
  4486.  ***   call into the kernel available to libc.  It contains only constants,
  4487.  ***   structures, and macros generated from the original header, and thus,
  4488.  ***   contains no copyrightable information.
  4489.  ***
  4490.  ***   To edit the content of this header, modify the corresponding
  4491.  ***   source file (e.g. under external/kernel-headers/original/) then
  4492.  ***   run bionic/libc/kernel/tools/update_all.py
  4493.  ***
  4494.  ***   Any manual change here will be lost the next time this script will
  4495.  ***   be run. You've been warned!
  4496.  ***
  4497.  ****************************************************************************
  4498.  ****************************************************************************/
  4499. #ifndef __ARCH_ARM_POSIX_TYPES_H
  4500. #define __ARCH_ARM_POSIX_TYPES_H
  4501. typedef unsigned short __kernel_mode_t;
  4502. #define __kernel_mode_t __kernel_mode_t
  4503. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4504. typedef unsigned short __kernel_ipc_pid_t;
  4505. #define __kernel_ipc_pid_t __kernel_ipc_pid_t
  4506. typedef unsigned short __kernel_uid_t;
  4507. typedef unsigned short __kernel_gid_t;
  4508. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4509. #define __kernel_uid_t __kernel_uid_t
  4510. typedef unsigned short __kernel_old_dev_t;
  4511. #define __kernel_old_dev_t __kernel_old_dev_t
  4512. #if 0 /* expanded by -frewrite-includes */
  4513. #include <asm-generic/posix_types.h>
  4514. #endif /* expanded by -frewrite-includes */
  4515. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/posix_types.h" 3
  4516. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 1 3
  4517. /****************************************************************************
  4518.  ****************************************************************************
  4519.  ***
  4520.  ***   This header was automatically generated from a Linux kernel header
  4521.  ***   of the same name, to make information necessary for userspace to
  4522.  ***   call into the kernel available to libc.  It contains only constants,
  4523.  ***   structures, and macros generated from the original header, and thus,
  4524.  ***   contains no copyrightable information.
  4525.  ***
  4526.  ***   To edit the content of this header, modify the corresponding
  4527.  ***   source file (e.g. under external/kernel-headers/original/) then
  4528.  ***   run bionic/libc/kernel/tools/update_all.py
  4529.  ***
  4530.  ***   Any manual change here will be lost the next time this script will
  4531.  ***   be run. You've been warned!
  4532.  ***
  4533.  ****************************************************************************
  4534.  ****************************************************************************/
  4535. #ifndef __ASM_GENERIC_POSIX_TYPES_H
  4536. #define __ASM_GENERIC_POSIX_TYPES_H
  4537. #if 0 /* expanded by -frewrite-includes */
  4538. #include <asm/bitsperlong.h>
  4539. #endif /* expanded by -frewrite-includes */
  4540. # 21 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4541. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/bitsperlong.h" 1 3
  4542. /****************************************************************************
  4543.  ****************************************************************************
  4544.  ***
  4545.  ***   This header was automatically generated from a Linux kernel header
  4546.  ***   of the same name, to make information necessary for userspace to
  4547.  ***   call into the kernel available to libc.  It contains only constants,
  4548.  ***   structures, and macros generated from the original header, and thus,
  4549.  ***   contains no copyrightable information.
  4550.  ***
  4551.  ***   To edit the content of this header, modify the corresponding
  4552.  ***   source file (e.g. under external/kernel-headers/original/) then
  4553.  ***   run bionic/libc/kernel/tools/update_all.py
  4554.  ***
  4555.  ***   Any manual change here will be lost the next time this script will
  4556.  ***   be run. You've been warned!
  4557.  ***
  4558.  ****************************************************************************
  4559.  ****************************************************************************/
  4560. #if 0 /* expanded by -frewrite-includes */
  4561. #include <asm-generic/bitsperlong.h>
  4562. #endif /* expanded by -frewrite-includes */
  4563. # 19 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/bitsperlong.h" 3
  4564. # 20 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/bitsperlong.h" 3
  4565. # 22 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 2 3
  4566. #ifndef __kernel_long_t
  4567. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4568. typedef long __kernel_long_t;
  4569. typedef unsigned long __kernel_ulong_t;
  4570. #endif
  4571. # 27 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4572. #ifndef __kernel_ino_t
  4573. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4574. typedef __kernel_ulong_t __kernel_ino_t;
  4575. #endif
  4576. # 31 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4577. #ifndef __kernel_mode_t
  4578. typedef unsigned int __kernel_mode_t;
  4579. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4580. #endif
  4581. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4582. #ifndef __kernel_pid_t
  4583. typedef int __kernel_pid_t;
  4584. #endif
  4585. # 38 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4586. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4587. #ifndef __kernel_ipc_pid_t
  4588. typedef int __kernel_ipc_pid_t;
  4589. #endif
  4590. # 42 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4591. #ifndef __kernel_uid_t
  4592. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4593. typedef unsigned int __kernel_uid_t;
  4594. typedef unsigned int __kernel_gid_t;
  4595. #endif
  4596. # 47 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4597. #ifndef __kernel_suseconds_t
  4598. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4599. typedef __kernel_long_t __kernel_suseconds_t;
  4600. #endif
  4601. # 51 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4602. #ifndef __kernel_daddr_t
  4603. typedef int __kernel_daddr_t;
  4604. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4605. #endif
  4606. # 55 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4607. #ifndef __kernel_uid32_t
  4608. typedef unsigned int __kernel_uid32_t;
  4609. typedef unsigned int __kernel_gid32_t;
  4610. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4611. #endif
  4612. # 60 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4613. #ifndef __kernel_old_uid_t
  4614. typedef __kernel_uid_t __kernel_old_uid_t;
  4615. typedef __kernel_gid_t __kernel_old_gid_t;
  4616. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4617. #endif
  4618. # 65 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4619. #ifndef __kernel_old_dev_t
  4620. typedef unsigned int __kernel_old_dev_t;
  4621. #endif
  4622. # 68 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4623. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4624. #ifndef __kernel_size_t
  4625. #if __BITS_PER_LONG != 64
  4626. typedef unsigned int __kernel_size_t;
  4627. typedef int __kernel_ssize_t;
  4628. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4629. typedef int __kernel_ptrdiff_t;
  4630. #else
  4631. # 76 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4632. typedef __kernel_ulong_t __kernel_size_t;
  4633. typedef __kernel_long_t __kernel_ssize_t;
  4634. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4635. typedef __kernel_long_t __kernel_ptrdiff_t;
  4636. #endif
  4637. # 81 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4638. #endif
  4639. # 82 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4640. #ifndef __kernel_fsid_t
  4641. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4642. typedef struct {
  4643.   int val[2];
  4644. } __kernel_fsid_t;
  4645. #endif
  4646. # 88 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4647. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4648. typedef __kernel_long_t __kernel_off_t;
  4649. typedef long long __kernel_loff_t;
  4650. typedef __kernel_long_t __kernel_time_t;
  4651. typedef __kernel_long_t __kernel_clock_t;
  4652. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4653. typedef int __kernel_timer_t;
  4654. typedef int __kernel_clockid_t;
  4655. typedef char * __kernel_caddr_t;
  4656. typedef unsigned short __kernel_uid16_t;
  4657. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4658. typedef unsigned short __kernel_gid16_t;
  4659. #endif
  4660. # 101 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/asm-generic/posix_types.h" 3
  4661. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/posix_types.h" 2 3
  4662. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4663. #endif
  4664. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/arm-linux-androideabi/asm/posix_types.h" 3
  4665. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/posix_types.h" 2 3
  4666. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4667. #endif
  4668. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/posix_types.h" 3
  4669. # 25 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/types.h" 2 3
  4670. #define __bitwise__
  4671. #define __bitwise __bitwise__
  4672. typedef __u16 __bitwise __le16;
  4673. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4674. typedef __u16 __bitwise __be16;
  4675. typedef __u32 __bitwise __le32;
  4676. typedef __u32 __bitwise __be32;
  4677. typedef __u64 __bitwise __le64;
  4678. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4679. typedef __u64 __bitwise __be64;
  4680. typedef __u16 __bitwise __sum16;
  4681. typedef __u32 __bitwise __wsum;
  4682. #define __aligned_u64 __u64 __attribute__((aligned(8)))
  4683. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4684. #define __aligned_be64 __be64 __attribute__((aligned(8)))
  4685. #define __aligned_le64 __le64 __attribute__((aligned(8)))
  4686. #endif
  4687. # 42 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/types.h" 3
  4688. #endif
  4689. # 43 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/linux/types.h" 3
  4690. /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  4691. # 37 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 2 3
  4692. #if 0 /* expanded by -frewrite-includes */
  4693. #include <linux/posix_types.h>
  4694. #endif /* expanded by -frewrite-includes */
  4695. # 37 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4696. # 38 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4697.  
  4698. #if 0 /* expanded by -frewrite-includes */
  4699. #include <bits/pthread_types.h>
  4700. #endif /* expanded by -frewrite-includes */
  4701. # 39 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4702. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 1 3
  4703. /*
  4704.  * Copyright (C) 2008 The Android Open Source Project
  4705.  * All rights reserved.
  4706.  *
  4707.  * Redistribution and use in source and binary forms, with or without
  4708.  * modification, are permitted provided that the following conditions
  4709.  * are met:
  4710.  *  * Redistributions of source code must retain the above copyright
  4711.  *    notice, this list of conditions and the following disclaimer.
  4712.  *  * Redistributions in binary form must reproduce the above copyright
  4713.  *    notice, this list of conditions and the following disclaimer in
  4714.  *    the documentation and/or other materials provided with the
  4715.  *    distribution.
  4716.  *
  4717.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  4718.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  4719.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  4720.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  4721.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  4722.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  4723.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  4724.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  4725.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  4726.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  4727.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4728.  * SUCH DAMAGE.
  4729.  */
  4730.  
  4731. #ifndef _BITS_PTHREAD_TYPES_H_
  4732. #define _BITS_PTHREAD_TYPES_H_
  4733.  
  4734. #if 0 /* expanded by -frewrite-includes */
  4735. #include <sys/cdefs.h>
  4736. #endif /* expanded by -frewrite-includes */
  4737. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4738. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4739. #if 0 /* expanded by -frewrite-includes */
  4740. #include <sys/types.h>
  4741. #endif /* expanded by -frewrite-includes */
  4742. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4743. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 1 3
  4744. /*
  4745.  * Copyright (C) 2008 The Android Open Source Project
  4746.  * All rights reserved.
  4747.  *
  4748.  * Redistribution and use in source and binary forms, with or without
  4749.  * modification, are permitted provided that the following conditions
  4750.  * are met:
  4751.  *  * Redistributions of source code must retain the above copyright
  4752.  *    notice, this list of conditions and the following disclaimer.
  4753.  *  * Redistributions in binary form must reproduce the above copyright
  4754.  *    notice, this list of conditions and the following disclaimer in
  4755.  *    the documentation and/or other materials provided with the
  4756.  *    distribution.
  4757.  *
  4758.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  4759.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  4760.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  4761.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  4762.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  4763.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  4764.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  4765.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  4766.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  4767.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  4768.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4769.  * SUCH DAMAGE.
  4770.  */
  4771.  
  4772. #ifndef _SYS_TYPES_H_
  4773. #define _SYS_TYPES_H_
  4774.  
  4775. #if 0 /* expanded by -frewrite-includes */
  4776. #include <stddef.h>
  4777. #endif /* expanded by -frewrite-includes */
  4778. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4779. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4780. #if 0 /* expanded by -frewrite-includes */
  4781. #include <stdint.h>
  4782. #endif /* expanded by -frewrite-includes */
  4783. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4784. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4785. #if 0 /* expanded by -frewrite-includes */
  4786. #include <sys/cdefs.h>
  4787. #endif /* expanded by -frewrite-includes */
  4788. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4789. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4790.  
  4791. #if 0 /* expanded by -frewrite-includes */
  4792. #include <linux/types.h>
  4793. #endif /* expanded by -frewrite-includes */
  4794. # 36 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4795. # 37 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4796. #if 0 /* expanded by -frewrite-includes */
  4797. #include <linux/posix_types.h>
  4798. #endif /* expanded by -frewrite-includes */
  4799. # 37 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4800. # 38 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4801.  
  4802. #if 0 /* expanded by -frewrite-includes */
  4803. #include <bits/pthread_types.h>
  4804. #endif /* expanded by -frewrite-includes */
  4805. # 39 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4806. # 40 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4807.  
  4808. /* gids, uids, and pids are all 32-bit. */
  4809. typedef __kernel_gid32_t __gid_t;
  4810. typedef __gid_t gid_t;
  4811. typedef __kernel_uid32_t __uid_t;
  4812. typedef __uid_t uid_t;
  4813. typedef __kernel_pid_t __pid_t;
  4814. typedef __pid_t pid_t;
  4815. typedef uint32_t __id_t;
  4816. typedef __id_t id_t;
  4817.  
  4818. typedef unsigned long blkcnt_t;
  4819. typedef unsigned long blksize_t;
  4820. typedef __kernel_caddr_t caddr_t;
  4821. typedef __kernel_clock_t clock_t;
  4822.  
  4823. typedef __kernel_clockid_t __clockid_t;
  4824. typedef __clockid_t clockid_t;
  4825.  
  4826. typedef __kernel_daddr_t daddr_t;
  4827. typedef unsigned long fsblkcnt_t;
  4828. typedef unsigned long fsfilcnt_t;
  4829.  
  4830. typedef __kernel_mode_t __mode_t;
  4831. typedef __mode_t mode_t;
  4832.  
  4833. typedef __kernel_key_t __key_t;
  4834. typedef __key_t key_t;
  4835.  
  4836. typedef __kernel_ino_t __ino_t;
  4837. typedef __ino_t ino_t;
  4838.  
  4839. typedef uint64_t ino64_t;
  4840.  
  4841. typedef uint32_t __nlink_t;
  4842. typedef __nlink_t nlink_t;
  4843.  
  4844. typedef void* __timer_t;
  4845. typedef __timer_t timer_t;
  4846.  
  4847. typedef __kernel_suseconds_t __suseconds_t;
  4848. typedef __suseconds_t suseconds_t;
  4849.  
  4850. /* useconds_t is 32-bit on both LP32 and LP64. */
  4851. typedef uint32_t __useconds_t;
  4852. typedef __useconds_t useconds_t;
  4853.  
  4854. #if !defined(__LP64__)
  4855. /* This historical accident means that we had a 32-bit dev_t on 32-bit architectures. */
  4856. typedef uint32_t dev_t;
  4857. #else
  4858. # 91 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4859. typedef uint64_t dev_t;
  4860. #endif
  4861. # 93 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4862.  
  4863. /* This historical accident means that we had a 32-bit time_t on 32-bit architectures. */
  4864. typedef __kernel_time_t __time_t;
  4865. typedef __time_t time_t;
  4866.  
  4867. #if defined(__USE_FILE_OFFSET64) || defined(__LP64__)
  4868. typedef int64_t off_t;
  4869. typedef off_t loff_t;
  4870. typedef loff_t off64_t;
  4871. #else
  4872. # 103 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4873. /* This historical accident means that we had a 32-bit off_t on 32-bit architectures. */
  4874. typedef __kernel_off_t off_t;
  4875. typedef __kernel_loff_t loff_t;
  4876. typedef loff_t off64_t;
  4877. #endif
  4878. # 108 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4879.  
  4880. #if !defined(__LP64__)
  4881. /* This historical accident means that we had a signed socklen_t on 32-bit architectures. */
  4882. typedef int32_t __socklen_t;
  4883. #else
  4884. # 113 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4885. /* LP64 still has a 32-bit socklen_t. */
  4886. typedef uint32_t __socklen_t;
  4887. #endif
  4888. # 116 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4889. typedef __socklen_t socklen_t;
  4890.  
  4891. typedef __builtin_va_list __va_list;
  4892.  
  4893. #ifndef _SSIZE_T_DEFINED_
  4894. #define _SSIZE_T_DEFINED_
  4895. /* Traditionally, bionic's ssize_t was "long int". This caused GCC to emit warnings when you
  4896.  * pass a ssize_t to a printf-style function. The correct type is __kernel_ssize_t, which is
  4897.  * "int", which isn't an ABI change for C code (because they're the same size) but is an ABI
  4898.  * change for C++ because "int" and "long int" mangle to "i" and "l" respectively. So until
  4899.  * we can fix the ABI, this change should not be propagated to the NDK. http://b/8253769. */
  4900. typedef __kernel_ssize_t ssize_t;
  4901. #endif
  4902. # 129 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4903.  
  4904. typedef unsigned int        uint_t;
  4905. typedef unsigned int        uint;
  4906.  
  4907. #if defined(__USE_BSD) || defined(__BIONIC__) /* Historically bionic exposed these. */
  4908. #if 0 /* expanded by -frewrite-includes */
  4909. #include <sys/sysmacros.h>
  4910. #endif /* expanded by -frewrite-includes */
  4911. # 134 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4912. # 135 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4913.  
  4914. typedef unsigned char  u_char;
  4915. typedef unsigned short u_short;
  4916. typedef unsigned int   u_int;
  4917. typedef unsigned long  u_long;
  4918.  
  4919. typedef uint32_t u_int32_t;
  4920. typedef uint16_t u_int16_t;
  4921. typedef uint8_t  u_int8_t;
  4922. typedef uint64_t u_int64_t;
  4923. #endif
  4924. # 146 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4925.  
  4926. #endif
  4927. # 148 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  4928. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 2 3
  4929.  
  4930. typedef struct {
  4931.   uint32_t flags;
  4932.   void* stack_base;
  4933.   size_t stack_size;
  4934.   size_t guard_size;
  4935.   int32_t sched_policy;
  4936.   int32_t sched_priority;
  4937. #ifdef __LP64__
  4938.   char __reserved[16];
  4939. #endif
  4940. # 45 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4941. } pthread_attr_t;
  4942.  
  4943. #if __ANDROID_API__ >= __ANDROID_API_N__
  4944. typedef struct {
  4945. #if defined(__LP64__)
  4946.   int64_t __private[4];
  4947. #else
  4948. # 52 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4949.   int32_t __private[8];
  4950. #endif
  4951. # 54 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4952. } pthread_barrier_t;
  4953. #endif
  4954. # 56 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4955.  
  4956. #if __ANDROID_API__ >= __ANDROID_API_N__
  4957. typedef int pthread_barrierattr_t;
  4958. #endif
  4959. # 60 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4960.  
  4961. typedef struct {
  4962. #if defined(__LP64__)
  4963.   int32_t __private[12];
  4964. #else
  4965. # 65 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4966.   int32_t __private[1];
  4967. #endif
  4968. # 67 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4969. } pthread_cond_t;
  4970.  
  4971. typedef long pthread_condattr_t;
  4972.  
  4973. typedef int pthread_key_t;
  4974.  
  4975. typedef struct {
  4976. #if defined(__LP64__)
  4977.   int32_t __private[10];
  4978. #else
  4979. # 77 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4980.   int32_t __private[1];
  4981. #endif
  4982. # 79 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4983. } pthread_mutex_t;
  4984.  
  4985. typedef long pthread_mutexattr_t;
  4986.  
  4987. typedef int pthread_once_t;
  4988.  
  4989. typedef struct {
  4990. #if defined(__LP64__)
  4991.   int32_t __private[14];
  4992. #else
  4993. # 89 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4994.   int32_t __private[10];
  4995. #endif
  4996. # 91 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  4997. } pthread_rwlock_t;
  4998.  
  4999. typedef long pthread_rwlockattr_t;
  5000.  
  5001. #if __ANDROID_API__ >= __ANDROID_API_N__
  5002. typedef struct {
  5003. #if defined(__LP64__)
  5004.   int64_t __private;
  5005. #else
  5006. # 100 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  5007.   int32_t __private[2];
  5008. #endif
  5009. # 102 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  5010. } pthread_spinlock_t;
  5011. #endif
  5012. # 104 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  5013.  
  5014. typedef long pthread_t;
  5015.  
  5016. #endif
  5017. # 108 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/pthread_types.h" 3
  5018. # 40 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 2 3
  5019.  
  5020. /* gids, uids, and pids are all 32-bit. */
  5021. typedef __kernel_gid32_t __gid_t;
  5022. typedef __gid_t gid_t;
  5023. typedef __kernel_uid32_t __uid_t;
  5024. typedef __uid_t uid_t;
  5025. typedef __kernel_pid_t __pid_t;
  5026. typedef __pid_t pid_t;
  5027. typedef uint32_t __id_t;
  5028. typedef __id_t id_t;
  5029.  
  5030. typedef unsigned long blkcnt_t;
  5031. typedef unsigned long blksize_t;
  5032. typedef __kernel_caddr_t caddr_t;
  5033. typedef __kernel_clock_t clock_t;
  5034.  
  5035. typedef __kernel_clockid_t __clockid_t;
  5036. typedef __clockid_t clockid_t;
  5037.  
  5038. typedef __kernel_daddr_t daddr_t;
  5039. typedef unsigned long fsblkcnt_t;
  5040. typedef unsigned long fsfilcnt_t;
  5041.  
  5042. typedef __kernel_mode_t __mode_t;
  5043. typedef __mode_t mode_t;
  5044.  
  5045. typedef __kernel_key_t __key_t;
  5046. typedef __key_t key_t;
  5047.  
  5048. typedef __kernel_ino_t __ino_t;
  5049. typedef __ino_t ino_t;
  5050.  
  5051. typedef uint64_t ino64_t;
  5052.  
  5053. typedef uint32_t __nlink_t;
  5054. typedef __nlink_t nlink_t;
  5055.  
  5056. typedef void* __timer_t;
  5057. typedef __timer_t timer_t;
  5058.  
  5059. typedef __kernel_suseconds_t __suseconds_t;
  5060. typedef __suseconds_t suseconds_t;
  5061.  
  5062. /* useconds_t is 32-bit on both LP32 and LP64. */
  5063. typedef uint32_t __useconds_t;
  5064. typedef __useconds_t useconds_t;
  5065.  
  5066. #if !defined(__LP64__)
  5067. /* This historical accident means that we had a 32-bit dev_t on 32-bit architectures. */
  5068. typedef uint32_t dev_t;
  5069. #else
  5070. # 91 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5071. typedef uint64_t dev_t;
  5072. #endif
  5073. # 93 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5074.  
  5075. /* This historical accident means that we had a 32-bit time_t on 32-bit architectures. */
  5076. typedef __kernel_time_t __time_t;
  5077. typedef __time_t time_t;
  5078.  
  5079. #if defined(__USE_FILE_OFFSET64) || defined(__LP64__)
  5080. typedef int64_t off_t;
  5081. typedef off_t loff_t;
  5082. typedef loff_t off64_t;
  5083. #else
  5084. # 103 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5085. /* This historical accident means that we had a 32-bit off_t on 32-bit architectures. */
  5086. typedef __kernel_off_t off_t;
  5087. typedef __kernel_loff_t loff_t;
  5088. typedef loff_t off64_t;
  5089. #endif
  5090. # 108 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5091.  
  5092. #if !defined(__LP64__)
  5093. /* This historical accident means that we had a signed socklen_t on 32-bit architectures. */
  5094. typedef int32_t __socklen_t;
  5095. #else
  5096. # 113 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5097. /* LP64 still has a 32-bit socklen_t. */
  5098. typedef uint32_t __socklen_t;
  5099. #endif
  5100. # 116 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5101. typedef __socklen_t socklen_t;
  5102.  
  5103. typedef __builtin_va_list __va_list;
  5104.  
  5105. #ifndef _SSIZE_T_DEFINED_
  5106. #define _SSIZE_T_DEFINED_
  5107. /* Traditionally, bionic's ssize_t was "long int". This caused GCC to emit warnings when you
  5108.  * pass a ssize_t to a printf-style function. The correct type is __kernel_ssize_t, which is
  5109.  * "int", which isn't an ABI change for C code (because they're the same size) but is an ABI
  5110.  * change for C++ because "int" and "long int" mangle to "i" and "l" respectively. So until
  5111.  * we can fix the ABI, this change should not be propagated to the NDK. http://b/8253769. */
  5112. typedef __kernel_ssize_t ssize_t;
  5113. #endif
  5114. # 129 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5115.  
  5116. typedef unsigned int        uint_t;
  5117. typedef unsigned int        uint;
  5118.  
  5119. #if defined(__USE_BSD) || defined(__BIONIC__) /* Historically bionic exposed these. */
  5120. #if 0 /* expanded by -frewrite-includes */
  5121. #include <sys/sysmacros.h>
  5122. #endif /* expanded by -frewrite-includes */
  5123. # 134 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5124. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/sysmacros.h" 1 3
  5125. /*
  5126.  * Copyright (C) 2008 The Android Open Source Project
  5127.  * All rights reserved.
  5128.  *
  5129.  * Redistribution and use in source and binary forms, with or without
  5130.  * modification, are permitted provided that the following conditions
  5131.  * are met:
  5132.  *  * Redistributions of source code must retain the above copyright
  5133.  *    notice, this list of conditions and the following disclaimer.
  5134.  *  * Redistributions in binary form must reproduce the above copyright
  5135.  *    notice, this list of conditions and the following disclaimer in
  5136.  *    the documentation and/or other materials provided with the
  5137.  *    distribution.
  5138.  *
  5139.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  5140.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  5141.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  5142.  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  5143.  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  5144.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  5145.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  5146.  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  5147.  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  5148.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  5149.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  5150.  * SUCH DAMAGE.
  5151.  */
  5152.  
  5153. #ifndef _SYS_SYSMACROS_H_
  5154. #define _SYS_SYSMACROS_H_
  5155.  
  5156. #if 0 /* expanded by -frewrite-includes */
  5157. #include <sys/cdefs.h>
  5158. #endif /* expanded by -frewrite-includes */
  5159. # 32 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/sysmacros.h" 3
  5160. # 33 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/sysmacros.h" 3
  5161.  
  5162. #define makedev(__major, __minor) \
  5163.   ( \
  5164.     (((__major) & 0xfffff000ULL) << 32) | (((__major) & 0xfffULL) << 8) | \
  5165.     (((__minor) & 0xffffff00ULL) << 12) | (((__minor) & 0xffULL)) \
  5166.   )
  5167.  
  5168. #define major(__dev) \
  5169.   ((unsigned) ((((unsigned long long) (__dev) >> 32) & 0xfffff000) | (((__dev) >> 8) & 0xfff)))
  5170.  
  5171. #define minor(__dev) \
  5172.   ((unsigned) ((((__dev) >> 12) & 0xffffff00) | ((__dev) & 0xff)))
  5173.  
  5174. #endif /* _SYS_SYSMACROS_H_ */
  5175. # 47 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/sysmacros.h" 3
  5176. # 135 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 2 3
  5177.  
  5178. typedef unsigned char  u_char;
  5179. typedef unsigned short u_short;
  5180. typedef unsigned int   u_int;
  5181. typedef unsigned long  u_long;
  5182.  
  5183. typedef uint32_t u_int32_t;
  5184. typedef uint16_t u_int16_t;
  5185. typedef uint8_t  u_int8_t;
  5186. typedef uint64_t u_int64_t;
  5187. #endif
  5188. # 146 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5189.  
  5190. #endif
  5191. # 148 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/sys/types.h" 3
  5192. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 2 3
  5193. #if 0 /* expanded by -frewrite-includes */
  5194. #include <xlocale.h>
  5195. #endif /* expanded by -frewrite-includes */
  5196. # 34 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 3
  5197. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 3
  5198.  
  5199. __BEGIN_DECLS
  5200.  
  5201. int strcasecmp(const char*, const char*) __attribute_pure__;
  5202.  
  5203. #if __ANDROID_API__ >= 23
  5204. int strcasecmp_l(const char*, const char*, locale_t) __attribute_pure__ __INTRODUCED_IN(23);
  5205. #endif /* __ANDROID_API__ >= 23 */
  5206. # 43 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 3
  5207.  
  5208. int strncasecmp(const char*, const char*, size_t) __attribute_pure__;
  5209.  
  5210. #if __ANDROID_API__ >= 23
  5211. int strncasecmp_l(const char*, const char*, size_t, locale_t) __attribute_pure__ __INTRODUCED_IN(23);
  5212. #endif /* __ANDROID_API__ >= 23 */
  5213. # 49 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 3
  5214.  
  5215.  
  5216. __END_DECLS
  5217.  
  5218. #endif
  5219. # 54 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/bits/strcasecmp.h" 3
  5220. # 37 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 2 3
  5221.  
  5222. __BEGIN_DECLS
  5223.  
  5224. #if defined(__clang__)
  5225. #pragma clang diagnostic push
  5226. #pragma clang diagnostic ignored "-Wnullability-completeness"
  5227. #endif
  5228. # 44 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5229.  
  5230. #if defined(__USE_BSD)
  5231. #if 0 /* expanded by -frewrite-includes */
  5232. #include <strings.h>
  5233. #endif /* expanded by -frewrite-includes */
  5234. # 46 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5235. # 47 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5236. #endif
  5237. # 48 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5238.  
  5239. void* memccpy(void* _Nonnull __restrict, const void* _Nonnull __restrict, int, size_t);
  5240. void* memchr(const void* _Nonnull, int, size_t) __attribute_pure__ __overloadable
  5241.         __RENAME_CLANG(memchr);
  5242. void* memrchr(const void* _Nonnull, int, size_t) __attribute_pure__ __overloadable
  5243.         __RENAME_CLANG(memrchr);
  5244. int memcmp(const void* _Nonnull, const void* _Nonnull, size_t) __attribute_pure__;
  5245. void* memcpy(void* _Nonnull __restrict, const void* _Nonnull __restrict, size_t)
  5246.         __overloadable __RENAME_CLANG(memcpy);
  5247. #if defined(__USE_GNU)
  5248.  
  5249. #if __ANDROID_API__ >= 23
  5250. void* mempcpy(void* _Nonnull __restrict, const void* _Nonnull __restrict, size_t) __INTRODUCED_IN(23);
  5251. #endif /* __ANDROID_API__ >= 23 */
  5252. # 62 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5253.  
  5254. #endif
  5255. # 64 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5256. void* memmove(void* _Nonnull, const void* _Nonnull, size_t) __overloadable
  5257.         __RENAME_CLANG(memmove);
  5258. void* memset(void* _Nonnull, int, size_t) __overloadable __RENAME_CLANG(memset);
  5259. void* memmem(const void* _Nonnull, size_t, const void* _Nonnull, size_t) __attribute_pure__;
  5260.  
  5261. char* strchr(const char* _Nonnull, int) __attribute_pure__ __overloadable
  5262.         __RENAME_CLANG(strchr);
  5263.  
  5264. #if __ANDROID_API__ >= 18
  5265. char* __strchr_chk(const char* _Nonnull, int, size_t) __INTRODUCED_IN(18);
  5266. #endif /* __ANDROID_API__ >= 18 */
  5267. # 75 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5268.  
  5269. #if defined(__USE_GNU)
  5270. #if defined(__cplusplus)
  5271. extern "C++" char* strchrnul(char* _Nonnull, int) __RENAME(strchrnul) __attribute_pure__;
  5272. extern "C++" const char* strchrnul(const char* _Nonnull, int) __RENAME(strchrnul) __attribute_pure__;
  5273. #else
  5274. # 81 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5275.  
  5276. #if __ANDROID_API__ >= 24
  5277. char* strchrnul(const char* _Nonnull, int) __attribute_pure__ __INTRODUCED_IN(24);
  5278. #endif /* __ANDROID_API__ >= 24 */
  5279. # 85 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5280.  
  5281. #endif
  5282. # 87 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5283. #endif
  5284. # 88 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5285.  
  5286. char* strrchr(const char* _Nonnull, int) __attribute_pure__ __overloadable
  5287.         __RENAME_CLANG(strrchr);
  5288.  
  5289. #if __ANDROID_API__ >= 18
  5290. char* __strrchr_chk(const char* _Nonnull, int, size_t) __INTRODUCED_IN(18);
  5291. #endif /* __ANDROID_API__ >= 18 */
  5292. # 95 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5293.  
  5294.  
  5295. size_t strlen(const char* _Nonnull) __attribute_pure__ __overloadable
  5296.         __RENAME_CLANG(strlen);
  5297.  
  5298. #if __ANDROID_API__ >= 17
  5299. size_t __strlen_chk(const char* _Nonnull, size_t) __INTRODUCED_IN(17);
  5300. #endif /* __ANDROID_API__ >= 17 */
  5301. # 103 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5302.  
  5303.  
  5304. int strcmp(const char* _Nonnull, const char* _Nonnull) __attribute_pure__;
  5305.  
  5306. #if __ANDROID_API__ >= 21
  5307. char* stpcpy(char* _Nonnull __restrict, const char* _Nonnull __restrict)
  5308.         __overloadable __RENAME_CLANG(stpcpy) __INTRODUCED_IN(21);
  5309. #endif /* __ANDROID_API__ >= 21 */
  5310. # 111 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5311.  
  5312. char* strcpy(char* _Nonnull __restrict, const char* _Nonnull __restrict)
  5313.         __overloadable __RENAME_CLANG(strcpy);
  5314. char* strcat(char* _Nonnull __restrict, const char* _Nonnull __restrict)
  5315.         __overloadable __RENAME_CLANG(strcat);
  5316. char* strdup(const char* _Nonnull);
  5317.  
  5318. char* strstr(const char* _Nonnull, const char* _Nonnull) __attribute_pure__;
  5319. char* strcasestr(const char* _Nonnull, const char* _Nonnull) __attribute_pure__;
  5320. char* strtok(char* __restrict, const char* _Nonnull __restrict);
  5321. char* strtok_r(char* __restrict, const char* _Nonnull __restrict, char** _Nonnull __restrict);
  5322.  
  5323. char* strerror(int);
  5324.  
  5325. #if __ANDROID_API__ >= 23
  5326. char* strerror_l(int, locale_t) __INTRODUCED_IN(23);
  5327. #endif /* __ANDROID_API__ >= 23 */
  5328. # 128 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5329.  
  5330. #if defined(__USE_GNU) && __ANDROID_API__ >= 23
  5331. char* strerror_r(int, char*, size_t) __RENAME(__gnu_strerror_r) __INTRODUCED_IN(23);
  5332. #else /* POSIX */
  5333. # 132 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5334. int strerror_r(int, char*, size_t);
  5335. #endif
  5336. # 134 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5337.  
  5338. size_t strnlen(const char* _Nonnull, size_t) __attribute_pure__;
  5339. char* strncat(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t)
  5340.         __overloadable __RENAME_CLANG(strncat);
  5341. char* strndup(const char* _Nonnull, size_t);
  5342. int strncmp(const char* _Nonnull, const char* _Nonnull, size_t) __attribute_pure__;
  5343.  
  5344. #if __ANDROID_API__ >= 21
  5345. char* stpncpy(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t)
  5346.         __overloadable __RENAME_CLANG(stpncpy) __INTRODUCED_IN(21);
  5347. #endif /* __ANDROID_API__ >= 21 */
  5348. # 145 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5349.  
  5350. char* strncpy(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t)
  5351.         __overloadable __RENAME_CLANG(strncpy);
  5352.  
  5353. size_t strlcat(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t)
  5354.         __overloadable __RENAME_CLANG(strlcat);
  5355. size_t strlcpy(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t)
  5356.         __overloadable __RENAME_CLANG(strlcpy);
  5357.  
  5358. size_t strcspn(const char* _Nonnull, const char* _Nonnull) __attribute_pure__;
  5359. char* strpbrk(const char* _Nonnull, const char* _Nonnull) __attribute_pure__;
  5360. char* strsep(char** _Nonnull __restrict, const char* _Nonnull __restrict);
  5361. size_t strspn(const char* _Nonnull, const char* _Nonnull);
  5362.  
  5363. char* strsignal(int);
  5364.  
  5365. int strcoll(const char* _Nonnull, const char* _Nonnull) __attribute_pure__;
  5366. size_t strxfrm(char* __restrict, const char* _Nonnull __restrict, size_t);
  5367.  
  5368. #if __ANDROID_API__ >= __ANDROID_API_L__
  5369. int strcoll_l(const char* _Nonnull, const char* _Nonnull, locale_t) __attribute_pure__ __INTRODUCED_IN(21);
  5370. size_t strxfrm_l(char* __restrict, const char* _Nonnull __restrict, size_t, locale_t) __INTRODUCED_IN(21);
  5371. #else
  5372. # 168 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5373. // Implemented as static inlines before 21.
  5374. #endif
  5375. # 170 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5376.  
  5377. #if defined(__USE_GNU) && !defined(basename)
  5378. /*
  5379.  * glibc has a basename in <string.h> that's different to the POSIX one in <libgen.h>.
  5380.  * It doesn't modify its argument, and in C++ it's const-correct.
  5381.  */
  5382. #if defined(__cplusplus)
  5383. extern "C++" char* basename(char* _Nonnull) __RENAME(__gnu_basename);
  5384. extern "C++" const char* basename(const char* _Nonnull) __RENAME(__gnu_basename);
  5385. #else
  5386. # 180 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5387.  
  5388. #if __ANDROID_API__ >= 23
  5389. char* basename(const char* _Nonnull) __RENAME(__gnu_basename) __INTRODUCED_IN(23);
  5390. #endif /* __ANDROID_API__ >= 23 */
  5391. # 184 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5392.  
  5393. #endif
  5394. # 186 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5395. #endif
  5396. # 187 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5397.  
  5398.  
  5399. #if __ANDROID_API__ >= 23
  5400. void* __memchr_chk(const void* _Nonnull, int, size_t, size_t) __INTRODUCED_IN(23);
  5401. void* __memrchr_chk(const void* _Nonnull, int, size_t, size_t) __INTRODUCED_IN(23);
  5402. #endif /* __ANDROID_API__ >= 23 */
  5403. # 193 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5404.  
  5405.  
  5406. #if __ANDROID_API__ >= 21
  5407. char* __stpncpy_chk2(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t, size_t, size_t)
  5408.   __INTRODUCED_IN(21);
  5409. char* __strncpy_chk2(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t, size_t, size_t)
  5410.   __INTRODUCED_IN(21);
  5411. #endif /* __ANDROID_API__ >= 21 */
  5412. # 201 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5413.  
  5414.  
  5415. #if __ANDROID_API__ >= 17
  5416. size_t __strlcpy_chk(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t, size_t) __INTRODUCED_IN(17);
  5417. size_t __strlcat_chk(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t, size_t) __INTRODUCED_IN(17);
  5418. #endif /* __ANDROID_API__ >= 17 */
  5419. # 207 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5420.  
  5421.  
  5422. /* Only used with FORTIFY, but some headers that need it undef FORTIFY, so we
  5423.  * have the definition out here.
  5424.  */
  5425. struct __bionic_zero_size_is_okay_t {};
  5426.  
  5427. #if defined(__BIONIC_FORTIFY)
  5428. // These can share their implementation between gcc and clang with minimal
  5429. // trickery...
  5430. #if __ANDROID_API__ >= __ANDROID_API_J_MR1__
  5431. __BIONIC_FORTIFY_INLINE
  5432. void* memcpy(void* _Nonnull __restrict const dst __pass_object_size0,
  5433.         const void* _Nonnull __restrict src, size_t copy_amount) __overloadable {
  5434.     return __builtin___memcpy_chk(dst, src, copy_amount, __bos0(dst));
  5435. }
  5436.  
  5437. __BIONIC_FORTIFY_INLINE
  5438. void* memmove(void* const _Nonnull dst __pass_object_size0,
  5439.         const void* _Nonnull src, size_t len) __overloadable {
  5440.     return __builtin___memmove_chk(dst, src, len, __bos0(dst));
  5441. }
  5442. #endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
  5443. # 230 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5444.  
  5445. #if __ANDROID_API__ >= __ANDROID_API_L__
  5446. __BIONIC_FORTIFY_INLINE
  5447. char* stpcpy(char* _Nonnull __restrict const dst __pass_object_size,
  5448.         const char* _Nonnull __restrict src) __overloadable {
  5449.     return __builtin___stpcpy_chk(dst, src, __bos(dst));
  5450. }
  5451. #endif /* __ANDROID_API__ >= __ANDROID_API_L__ */
  5452. # 238 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5453.  
  5454. #if __ANDROID_API__ >= __ANDROID_API_J_MR1__
  5455. __BIONIC_FORTIFY_INLINE
  5456. char* strcpy(char* _Nonnull __restrict const dst __pass_object_size,
  5457.         const char* _Nonnull __restrict src) __overloadable {
  5458.     return __builtin___strcpy_chk(dst, src, __bos(dst));
  5459. }
  5460.  
  5461. __BIONIC_FORTIFY_INLINE
  5462. char* strcat(char* _Nonnull __restrict const dst __pass_object_size,
  5463.         const char* _Nonnull __restrict src) __overloadable {
  5464.     return __builtin___strcat_chk(dst, src, __bos(dst));
  5465. }
  5466.  
  5467. __BIONIC_FORTIFY_INLINE
  5468. char* strncat(char* const _Nonnull __restrict dst __pass_object_size,
  5469.         const char* _Nonnull __restrict src, size_t n) __overloadable {
  5470.     return __builtin___strncat_chk(dst, src, n, __bos(dst));
  5471. }
  5472.  
  5473. __BIONIC_FORTIFY_INLINE
  5474. void* memset(void* const _Nonnull s __pass_object_size0, int c, size_t n)
  5475.         __overloadable {
  5476.     return __builtin___memset_chk(s, c, n, __bos0(s));
  5477. }
  5478. #endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
  5479. # 264 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5480.  
  5481.  
  5482. #if defined(__clang__)
  5483.  
  5484. #define __error_if_overflows_dst(name, dst, n, what) \
  5485.     __enable_if(__bos0(dst) != __BIONIC_FORTIFY_UNKNOWN_SIZE && \
  5486.                 __bos0(dst) < (n), "selected when the buffer is too small") \
  5487.     __errorattr(#name " called with " what " bigger than buffer")
  5488.  
  5489. /*
  5490.  * N.B. _Nonnull isn't necessary on params, since these functions just emit
  5491.  * errors.
  5492.  */
  5493. __BIONIC_ERROR_FUNCTION_VISIBILITY
  5494. void* memcpy(void* dst, const void* src, size_t copy_amount) __overloadable
  5495.         __error_if_overflows_dst(memcpy, dst, copy_amount, "size");
  5496.  
  5497. __BIONIC_ERROR_FUNCTION_VISIBILITY
  5498. void* memmove(void *dst, const void* src, size_t len) __overloadable
  5499.         __error_if_overflows_dst(memmove, dst, len, "size");
  5500.  
  5501. __BIONIC_ERROR_FUNCTION_VISIBILITY
  5502. void* memset(void* s, int c, size_t n) __overloadable
  5503.         __error_if_overflows_dst(memset, s, n, "size");
  5504.  
  5505. __BIONIC_ERROR_FUNCTION_VISIBILITY
  5506. char* stpcpy(char* dst, const char* src) __overloadable
  5507.         __error_if_overflows_dst(stpcpy, dst, __builtin_strlen(src), "string");
  5508.  
  5509. __BIONIC_ERROR_FUNCTION_VISIBILITY
  5510. char* strcpy(char* dst, const char* src) __overloadable
  5511.         __error_if_overflows_dst(strcpy, dst, __builtin_strlen(src), "string");
  5512.  
  5513. #if __ANDROID_API__ >= __ANDROID_API_M__
  5514. __BIONIC_FORTIFY_INLINE
  5515. void* memchr(const void* const _Nonnull s __pass_object_size, int c, size_t n)
  5516.         __overloadable {
  5517.     size_t bos = __bos(s);
  5518.  
  5519.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5520.         return __builtin_memchr(s, c, n);
  5521.     }
  5522.  
  5523.     return __memchr_chk(s, c, n, bos);
  5524. }
  5525.  
  5526. __BIONIC_FORTIFY_INLINE
  5527. void* memrchr(const void* const _Nonnull s __pass_object_size, int c, size_t n)
  5528.         __overloadable {
  5529.     size_t bos = __bos(s);
  5530.  
  5531.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5532.         return __call_bypassing_fortify(memrchr)(s, c, n);
  5533.     }
  5534.  
  5535.     return __memrchr_chk(s, c, n, bos);
  5536. }
  5537. #endif /* __ANDROID_API__ >= __ANDROID_API_M__ */
  5538. # 322 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5539.  
  5540. #if __ANDROID_API__ >= __ANDROID_API_L__
  5541. __BIONIC_FORTIFY_INLINE
  5542. char* stpncpy(char* __restrict const _Nonnull dst __pass_object_size,
  5543.         const char* __restrict const _Nonnull src __pass_object_size,
  5544.         size_t n) __overloadable {
  5545.     size_t bos_dst = __bos(dst);
  5546.     size_t bos_src = __bos(src);
  5547.  
  5548.     /* Ignore dst size checks; they're handled in strncpy_chk */
  5549.     if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5550.         return __builtin___stpncpy_chk(dst, src, n, bos_dst);
  5551.     }
  5552.  
  5553.     return __stpncpy_chk2(dst, src, n, bos_dst, bos_src);
  5554. }
  5555.  
  5556. __BIONIC_FORTIFY_INLINE
  5557. char* strncpy(char* __restrict const _Nonnull dst __pass_object_size,
  5558.         const char* __restrict const _Nonnull src __pass_object_size,
  5559.         size_t n) __overloadable {
  5560.     size_t bos_dst = __bos(dst);
  5561.     size_t bos_src = __bos(src);
  5562.  
  5563.     /* Ignore dst size checks; they're handled in strncpy_chk */
  5564.     if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5565.         return __builtin___strncpy_chk(dst, src, n, bos_dst);
  5566.     }
  5567.  
  5568.     return __strncpy_chk2(dst, src, n, bos_dst, bos_src);
  5569. }
  5570. #endif /* __ANDROID_API__ >= __ANDROID_API_L__ */
  5571. # 354 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5572.  
  5573. #if __ANDROID_API__ >= __ANDROID_API_J_MR1__
  5574. __BIONIC_FORTIFY_INLINE
  5575. size_t strlcpy(char* const _Nonnull __restrict dst __pass_object_size,
  5576.         const char *_Nonnull __restrict src, size_t size) __overloadable {
  5577.     size_t bos = __bos(dst);
  5578.  
  5579.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5580.         return __call_bypassing_fortify(strlcpy)(dst, src, size);
  5581.     }
  5582.  
  5583.     return __strlcpy_chk(dst, src, size, bos);
  5584. }
  5585.  
  5586. __BIONIC_FORTIFY_INLINE
  5587. size_t strlcat(char* const _Nonnull __restrict dst __pass_object_size,
  5588.         const char* _Nonnull __restrict src, size_t size) __overloadable {
  5589.     size_t bos = __bos(dst);
  5590.  
  5591.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5592.         return __call_bypassing_fortify(strlcat)(dst, src, size);
  5593.     }
  5594.  
  5595.     return __strlcat_chk(dst, src, size, bos);
  5596. }
  5597.  
  5598. /*
  5599.  * If we can evaluate the size of s at compile-time, just call __builtin_strlen
  5600.  * on it directly. This makes it way easier for compilers to fold things like
  5601.  * strlen("Foo") into a constant, as users would expect. -1ULL is chosen simply
  5602.  * because it's large.
  5603.  */
  5604. __BIONIC_FORTIFY_INLINE
  5605. size_t strlen(const char* const _Nonnull s __pass_object_size)
  5606.         __overloadable __enable_if(__builtin_strlen(s) != -1ULL,
  5607.                                    "enabled if s is a known good string.") {
  5608.     return __builtin_strlen(s);
  5609. }
  5610.  
  5611. __BIONIC_FORTIFY_INLINE
  5612. size_t strlen(const char* const _Nonnull s __pass_object_size0)
  5613.         __overloadable {
  5614.     size_t bos = __bos0(s);
  5615.  
  5616.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5617.         return __builtin_strlen(s);
  5618.     }
  5619.  
  5620.     // return __builtin_strlen(s);
  5621.     return __strlen_chk(s, bos);
  5622. }
  5623. #endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
  5624. # 406 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5625.  
  5626. #if  __ANDROID_API__ >= __ANDROID_API_J_MR2__
  5627. __BIONIC_FORTIFY_INLINE
  5628. char* strchr(const char* const _Nonnull s __pass_object_size0, int c)
  5629.         __overloadable {
  5630.     size_t bos = __bos0(s);
  5631.  
  5632.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5633.         return __builtin_strchr(s, c);
  5634.     }
  5635.  
  5636.     // return __builtin_strchr(s, c);
  5637.     return __strchr_chk(s, c, bos);
  5638. }
  5639.  
  5640. __BIONIC_FORTIFY_INLINE
  5641. char* strrchr(const char* const _Nonnull s __pass_object_size, int c)
  5642.         __overloadable {
  5643.     size_t bos = __bos(s);
  5644.  
  5645.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5646.         return __builtin_strrchr(s, c);
  5647.     }
  5648.  
  5649.     return __strrchr_chk(s, c, bos);
  5650. }
  5651. #endif /* __ANDROID_API__ >= __ANDROID_API_J_MR2__ */
  5652. # 433 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5653.  
  5654. #if __ANDROID_API__ >= __ANDROID_API_J_MR1__
  5655. /* In *many* cases, memset(foo, sizeof(foo), 0) is a mistake where the user has
  5656.  * flipped the size + value arguments. However, there may be cases (e.g. with
  5657.  * macros) where it's okay for the size to fold to zero. We should warn on this,
  5658.  * but we should also provide a FORTIFY'ed escape hatch.
  5659.  */
  5660. __BIONIC_ERROR_FUNCTION_VISIBILITY
  5661. void* memset(void* _Nonnull s, int c, size_t n,
  5662.              struct __bionic_zero_size_is_okay_t ok)
  5663.         __overloadable
  5664.         __error_if_overflows_dst(memset, s, n, "size");
  5665.  
  5666. __BIONIC_FORTIFY_INLINE
  5667. void* memset(void* const _Nonnull s __pass_object_size0, int c, size_t n,
  5668.              struct __bionic_zero_size_is_okay_t ok __attribute__((unused)))
  5669.         __overloadable {
  5670.     return __builtin___memset_chk(s, c, n, __bos0(s));
  5671. }
  5672.  
  5673. extern struct __bionic_zero_size_is_okay_t __bionic_zero_size_is_okay;
  5674. /* We verify that `c` is non-zero, because as pointless as memset(foo, 0, 0) is,
  5675.  * flipping size + count will do nothing.
  5676.  */
  5677. __BIONIC_ERROR_FUNCTION_VISIBILITY
  5678. void* memset(void* _Nonnull s, int c, size_t n) __overloadable
  5679.         __enable_if(c && !n, "selected when we'll set zero bytes")
  5680.         __RENAME_CLANG(memset)
  5681.         __warnattr_real("will set 0 bytes; maybe the arguments got flipped? "
  5682.                         "(Add __bionic_zero_size_is_okay as a fourth argument "
  5683.                         "to silence this.)");
  5684. #endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
  5685. # 465 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5686.  
  5687. #undef __error_zero_size
  5688. #undef __error_if_overflows_dst
  5689. #else // defined(__clang__)
  5690. # 469 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5691. extern char* __strncpy_real(char* __restrict, const char*, size_t) __RENAME(strncpy);
  5692. extern void* __memrchr_real(const void*, int, size_t) __RENAME(memrchr);
  5693. extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t)
  5694.     __RENAME(strlcpy);
  5695. extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t)
  5696.     __RENAME(strlcat);
  5697.  
  5698. __errordecl(__memchr_buf_size_error, "memchr called with size bigger than buffer");
  5699. __errordecl(__memrchr_buf_size_error, "memrchr called with size bigger than buffer");
  5700.  
  5701. #if __ANDROID_API__ >= __ANDROID_API_M__
  5702. __BIONIC_FORTIFY_INLINE
  5703. void* memchr(const void *_Nonnull s __pass_object_size, int c, size_t n) {
  5704.     size_t bos = __bos(s);
  5705.  
  5706.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5707.         return __builtin_memchr(s, c, n);
  5708.     }
  5709.  
  5710.     if (__builtin_constant_p(n) && (n > bos)) {
  5711.         __memchr_buf_size_error();
  5712.     }
  5713.  
  5714.     if (__builtin_constant_p(n) && (n <= bos)) {
  5715.         return __builtin_memchr(s, c, n);
  5716.     }
  5717.  
  5718.     return __memchr_chk(s, c, n, bos);
  5719. }
  5720.  
  5721. __BIONIC_FORTIFY_INLINE
  5722. void* memrchr(const void* s, int c, size_t n) {
  5723.     size_t bos = __bos(s);
  5724.  
  5725.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5726.         return __memrchr_real(s, c, n);
  5727.     }
  5728.  
  5729.     if (__builtin_constant_p(n) && (n > bos)) {
  5730.         __memrchr_buf_size_error();
  5731.     }
  5732.  
  5733.     if (__builtin_constant_p(n) && (n <= bos)) {
  5734.         return __memrchr_real(s, c, n);
  5735.     }
  5736.  
  5737.     return __memrchr_chk(s, c, n, bos);
  5738. }
  5739. #endif /* __ANDROID_API__ >= __ANDROID_API_M__ */
  5740. # 518 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5741.  
  5742. #if __ANDROID_API__ >= __ANDROID_API_L__
  5743. __BIONIC_FORTIFY_INLINE
  5744. char* stpncpy(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src, size_t n) {
  5745.     size_t bos_dst = __bos(dst);
  5746.     size_t bos_src = __bos(src);
  5747.  
  5748.     if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5749.         return __builtin___stpncpy_chk(dst, src, n, bos_dst);
  5750.     }
  5751.  
  5752.     if (__builtin_constant_p(n) && (n <= bos_src)) {
  5753.         return __builtin___stpncpy_chk(dst, src, n, bos_dst);
  5754.     }
  5755.  
  5756.     size_t slen = __builtin_strlen(src);
  5757.     if (__builtin_constant_p(slen)) {
  5758.         return __builtin___stpncpy_chk(dst, src, n, bos_dst);
  5759.     }
  5760.  
  5761.     return __stpncpy_chk2(dst, src, n, bos_dst, bos_src);
  5762. }
  5763.  
  5764. __BIONIC_FORTIFY_INLINE
  5765. char* strncpy(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src, size_t n) {
  5766.     size_t bos_dst = __bos(dst);
  5767.     size_t bos_src = __bos(src);
  5768.  
  5769.     if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5770.         return __strncpy_real(dst, src, n);
  5771.     }
  5772.  
  5773.     if (__builtin_constant_p(n) && (n <= bos_src)) {
  5774.         return __builtin___strncpy_chk(dst, src, n, bos_dst);
  5775.     }
  5776.  
  5777.     size_t slen = __builtin_strlen(src);
  5778.     if (__builtin_constant_p(slen)) {
  5779.         return __builtin___strncpy_chk(dst, src, n, bos_dst);
  5780.     }
  5781.  
  5782.     return __strncpy_chk2(dst, src, n, bos_dst, bos_src);
  5783. }
  5784. #endif /* __ANDROID_API__ >= __ANDROID_API_L__ */
  5785. # 562 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5786.  
  5787. #if __ANDROID_API__ >= __ANDROID_API_J_MR1__
  5788. __BIONIC_FORTIFY_INLINE
  5789. size_t strlcpy(char* _Nonnull __restrict dst __pass_object_size,
  5790.         const char* _Nonnull __restrict src, size_t size) {
  5791.     size_t bos = __bos(dst);
  5792.  
  5793.     // Compiler doesn't know destination size. Don't call __strlcpy_chk
  5794.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5795.         return __strlcpy_real(dst, src, size);
  5796.     }
  5797.  
  5798.     // Compiler can prove, at compile time, that the passed in size
  5799.     // is always <= the actual object size. Don't call __strlcpy_chk
  5800.     if (__builtin_constant_p(size) && (size <= bos)) {
  5801.         return __strlcpy_real(dst, src, size);
  5802.     }
  5803.  
  5804.     return __strlcpy_chk(dst, src, size, bos);
  5805. }
  5806.  
  5807. __BIONIC_FORTIFY_INLINE
  5808. size_t strlcat(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src, size_t size) {
  5809.     size_t bos = __bos(dst);
  5810.  
  5811.     // Compiler doesn't know destination size. Don't call __strlcat_chk
  5812.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5813.         return __strlcat_real(dst, src, size);
  5814.     }
  5815.  
  5816.     // Compiler can prove, at compile time, that the passed in size
  5817.     // is always <= the actual object size. Don't call __strlcat_chk
  5818.     if (__builtin_constant_p(size) && (size <= bos)) {
  5819.         return __strlcat_real(dst, src, size);
  5820.     }
  5821.  
  5822.     return __strlcat_chk(dst, src, size, bos);
  5823. }
  5824.  
  5825. __BIONIC_FORTIFY_INLINE
  5826. size_t strlen(const char* _Nonnull s) __overloadable {
  5827.     size_t bos = __bos(s);
  5828.  
  5829.     // Compiler doesn't know destination size. Don't call __strlen_chk
  5830.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5831.         return __builtin_strlen(s);
  5832.     }
  5833.  
  5834.     size_t slen = __builtin_strlen(s);
  5835.     if (__builtin_constant_p(slen)) {
  5836.         return slen;
  5837.     }
  5838.  
  5839.     return __strlen_chk(s, bos);
  5840. }
  5841. #endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
  5842. # 618 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5843.  
  5844. #if  __ANDROID_API__ >= __ANDROID_API_J_MR2__
  5845. __BIONIC_FORTIFY_INLINE
  5846. char* strchr(const char* _Nonnull s, int c) {
  5847.     size_t bos = __bos(s);
  5848.  
  5849.     // Compiler doesn't know destination size. Don't call __strchr_chk
  5850.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5851.         return __builtin_strchr(s, c);
  5852.     }
  5853.  
  5854.     size_t slen = __builtin_strlen(s);
  5855.     if (__builtin_constant_p(slen) && (slen < bos)) {
  5856.         return __builtin_strchr(s, c);
  5857.     }
  5858.  
  5859.     return __strchr_chk(s, c, bos);
  5860. }
  5861.  
  5862. __BIONIC_FORTIFY_INLINE
  5863. char* strrchr(const char* _Nonnull s, int c) {
  5864.     size_t bos = __bos(s);
  5865.  
  5866.     // Compiler doesn't know destination size. Don't call __strrchr_chk
  5867.     if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
  5868.         return __builtin_strrchr(s, c);
  5869.     }
  5870.  
  5871.     size_t slen = __builtin_strlen(s);
  5872.     if (__builtin_constant_p(slen) && (slen < bos)) {
  5873.         return __builtin_strrchr(s, c);
  5874.     }
  5875.  
  5876.     return __strrchr_chk(s, c, bos);
  5877. }
  5878. #endif /* __ANDROID_API__ >= __ANDROID_API_J_MR2__ */
  5879. # 654 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5880. #endif /* defined(__clang__) */
  5881. # 655 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5882. #endif /* defined(__BIONIC_FORTIFY) */
  5883. # 656 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5884.  
  5885. #if defined(__clang__)
  5886. #pragma clang diagnostic pop
  5887. #endif
  5888. # 660 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5889.  
  5890. __END_DECLS
  5891.  
  5892. #endif /* _STRING_H */
  5893. # 664 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/string.h" 3
  5894. # 22 "packages/apps/Gallery2/jni/filters/filters.h" 2
  5895. #if 0 /* expanded by -frewrite-includes */
  5896. #include <android/log.h>
  5897. #endif /* expanded by -frewrite-includes */
  5898. # 22 "packages/apps/Gallery2/jni/filters/filters.h"
  5899. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 1 3
  5900. /*
  5901.  * Copyright (C) 2009 The Android Open Source Project
  5902.  *
  5903.  * Licensed under the Apache License, Version 2.0 (the "License");
  5904.  * you may not use this file except in compliance with the License.
  5905.  * You may obtain a copy of the License at
  5906.  *
  5907.  *      http://www.apache.org/licenses/LICENSE-2.0
  5908.  *
  5909.  * Unless required by applicable law or agreed to in writing, software
  5910.  * distributed under the License is distributed on an "AS IS" BASIS,
  5911.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5912.  * See the License for the specific language governing permissions and
  5913.  * limitations under the License.
  5914.  */
  5915.  
  5916. #ifndef _ANDROID_LOG_H
  5917. #define _ANDROID_LOG_H
  5918.  
  5919. /******************************************************************
  5920.  *
  5921.  * IMPORTANT NOTICE:
  5922.  *
  5923.  *   This file is part of Android's set of stable system headers
  5924.  *   exposed by the Android NDK (Native Development Kit) since
  5925.  *   platform release 1.5
  5926.  *
  5927.  *   Third-party source AND binary code relies on the definitions
  5928.  *   here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
  5929.  *
  5930.  *   - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
  5931.  *   - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
  5932.  *   - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
  5933.  *   - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
  5934.  */
  5935.  
  5936. /*
  5937.  * Support routines to send messages to the Android in-kernel log buffer,
  5938.  * which can later be accessed through the 'logcat' utility.
  5939.  *
  5940.  * Each log message must have
  5941.  *   - a priority
  5942.  *   - a log tag
  5943.  *   - some text
  5944.  *
  5945.  * The tag normally corresponds to the component that emits the log message,
  5946.  * and should be reasonably small.
  5947.  *
  5948.  * Log message text may be truncated to less than an implementation-specific
  5949.  * limit (e.g. 1023 characters max).
  5950.  *
  5951.  * Note that a newline character ("\n") will be appended automatically to your
  5952.  * log message, if not already there. It is not possible to send several
  5953.  * messages and have them appear on a single line in logcat.
  5954.  *
  5955.  * PLEASE USE LOGS WITH MODERATION:
  5956.  *
  5957.  *  - Sending log messages eats CPU and slow down your application and the
  5958.  *    system.
  5959.  *
  5960.  *  - The circular log buffer is pretty small (<64KB), sending many messages
  5961.  *    might push off other important log messages from the rest of the system.
  5962.  *
  5963.  *  - In release builds, only send log messages to account for exceptional
  5964.  *    conditions.
  5965.  *
  5966.  * NOTE: These functions MUST be implemented by /system/lib/liblog.so
  5967.  */
  5968.  
  5969. #if 0 /* expanded by -frewrite-includes */
  5970. #include <stdarg.h>
  5971. #endif /* expanded by -frewrite-includes */
  5972. # 70 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  5973. # 71 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  5974.  
  5975. #ifdef __cplusplus
  5976. extern "C" {
  5977. #endif
  5978. # 75 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  5979.  
  5980. /*
  5981.  * Android log priority values, in ascending priority order.
  5982.  */
  5983. typedef enum android_LogPriority {
  5984.   ANDROID_LOG_UNKNOWN = 0,
  5985.   ANDROID_LOG_DEFAULT, /* only for SetMinPriority() */
  5986.   ANDROID_LOG_VERBOSE,
  5987.   ANDROID_LOG_DEBUG,
  5988.   ANDROID_LOG_INFO,
  5989.   ANDROID_LOG_WARN,
  5990.   ANDROID_LOG_ERROR,
  5991.   ANDROID_LOG_FATAL,
  5992.   ANDROID_LOG_SILENT, /* only for SetMinPriority(); must be last */
  5993. } android_LogPriority;
  5994.  
  5995. /*
  5996.  * Send a simple string to the log.
  5997.  */
  5998. int __android_log_write(int prio, const char* tag, const char* text);
  5999.  
  6000. /*
  6001.  * Send a formatted string to the log, used like printf(fmt,...)
  6002.  */
  6003. int __android_log_print(int prio, const char* tag, const char* fmt, ...)
  6004. #if defined(__GNUC__)
  6005. #ifdef __USE_MINGW_ANSI_STDIO
  6006. #if __USE_MINGW_ANSI_STDIO
  6007.     __attribute__((__format__(gnu_printf, 3, 4)))
  6008. #else
  6009. # 105 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6010.     __attribute__((__format__(printf, 3, 4)))
  6011. #endif
  6012. # 107 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6013. #else
  6014. # 108 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6015.     __attribute__((__format__(printf, 3, 4)))
  6016. #endif
  6017. # 110 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6018. #endif
  6019. # 111 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6020.     ;
  6021.  
  6022. /*
  6023.  * A variant of __android_log_print() that takes a va_list to list
  6024.  * additional parameters.
  6025.  */
  6026. int __android_log_vprint(int prio, const char* tag, const char* fmt, va_list ap)
  6027. #if defined(__GNUC__)
  6028. #ifdef __USE_MINGW_ANSI_STDIO
  6029. #if __USE_MINGW_ANSI_STDIO
  6030.     __attribute__((__format__(gnu_printf, 3, 0)))
  6031. #else
  6032. # 123 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6033.     __attribute__((__format__(printf, 3, 0)))
  6034. #endif
  6035. # 125 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6036. #else
  6037. # 126 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6038.     __attribute__((__format__(printf, 3, 0)))
  6039. #endif
  6040. # 128 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6041. #endif
  6042. # 129 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6043.     ;
  6044.  
  6045. /*
  6046.  * Log an assertion failure and abort the process to have a chance
  6047.  * to inspect it if a debugger is attached. This uses the FATAL priority.
  6048.  */
  6049. void __android_log_assert(const char* cond, const char* tag, const char* fmt,
  6050.                           ...)
  6051. #if defined(__GNUC__)
  6052.     __attribute__((__noreturn__))
  6053. #ifdef __USE_MINGW_ANSI_STDIO
  6054. #if __USE_MINGW_ANSI_STDIO
  6055.     __attribute__((__format__(gnu_printf, 3, 4)))
  6056. #else
  6057. # 143 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6058.     __attribute__((__format__(printf, 3, 4)))
  6059. #endif
  6060. # 145 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6061. #else
  6062. # 146 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6063.     __attribute__((__format__(printf, 3, 4)))
  6064. #endif
  6065. # 148 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6066. #endif
  6067. # 149 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6068.     ;
  6069.  
  6070. #ifdef __cplusplus
  6071. }
  6072. #endif
  6073. # 154 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6074.  
  6075. #endif /* _ANDROID_LOG_H */
  6076. # 156 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/log.h" 3
  6077. # 23 "packages/apps/Gallery2/jni/filters/filters.h" 2
  6078. #if 0 /* expanded by -frewrite-includes */
  6079. #include <android/bitmap.h>
  6080. #endif /* expanded by -frewrite-includes */
  6081. # 23 "packages/apps/Gallery2/jni/filters/filters.h"
  6082. # 1 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/bitmap.h" 1 3
  6083. /*
  6084.  * Copyright (C) 2009 The Android Open Source Project
  6085.  *
  6086.  * Licensed under the Apache License, Version 2.0 (the "License");
  6087.  * you may not use this file except in compliance with the License.
  6088.  * You may obtain a copy of the License at
  6089.  *
  6090.  *      http://www.apache.org/licenses/LICENSE-2.0
  6091.  *
  6092.  * Unless required by applicable law or agreed to in writing, software
  6093.  * distributed under the License is distributed on an "AS IS" BASIS,
  6094.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  6095.  * See the License for the specific language governing permissions and
  6096.  * limitations under the License.
  6097.  */
  6098.  
  6099. /**
  6100.  * @addtogroup Bitmap
  6101.  * @{
  6102.  */
  6103.  
  6104. /**
  6105.  * @file bitmap.h
  6106.  */
  6107.  
  6108. #ifndef ANDROID_BITMAP_H
  6109. #define ANDROID_BITMAP_H
  6110.  
  6111. #if 0 /* expanded by -frewrite-includes */
  6112. #include <stdint.h>
  6113. #endif /* expanded by -frewrite-includes */
  6114. # 29 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/bitmap.h" 3
  6115. # 30 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/bitmap.h" 3
  6116. #if 0 /* expanded by -frewrite-includes */
  6117. #include <jni.h>
  6118. #endif /* expanded by -frewrite-includes */
  6119. # 30 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/bitmap.h" 3
  6120. # 31 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/bitmap.h" 3
  6121.  
  6122. #ifdef __cplusplus
  6123. extern "C" {
  6124. #endif
  6125. # 35 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/bitmap.h" 3
  6126.  
  6127. /** AndroidBitmap functions result code. */
  6128. enum {
  6129.     /** Operation was successful. */
  6130.     ANDROID_BITMAP_RESULT_SUCCESS           = 0,
  6131.     /** Bad parameter. */
  6132.     ANDROID_BITMAP_RESULT_BAD_PARAMETER     = -1,
  6133.     /** JNI exception occured. */
  6134.     ANDROID_BITMAP_RESULT_JNI_EXCEPTION     = -2,
  6135.     /** Allocation failed. */
  6136.     ANDROID_BITMAP_RESULT_ALLOCATION_FAILED = -3,
  6137. };
  6138.  
  6139. /** Backward compatibility: this macro used to be misspelled. */
  6140. #define ANDROID_BITMAP_RESUT_SUCCESS ANDROID_BITMAP_RESULT_SUCCESS
  6141.  
  6142. /** Bitmap pixel format. */
  6143. enum AndroidBitmapFormat {
  6144.     /** No format. */
  6145.     ANDROID_BITMAP_FORMAT_NONE      = 0,
  6146.     /** Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. **/
  6147.     ANDROID_BITMAP_FORMAT_RGBA_8888 = 1,
  6148.     /** Red: 5 bits, Green: 6 bits, Blue: 5 bits. **/
  6149.     ANDROID_BITMAP_FORMAT_RGB_565   = 4,
  6150.     /** Deprecated in API level 13. Because of the poor quality of this configuration, it is advised to use ARGB_8888 instead. **/
  6151.     ANDROID_BITMAP_FORMAT_RGBA_4444 = 7,
  6152.     /** Alpha: 8 bits. */
  6153.     ANDROID_BITMAP_FORMAT_A_8       = 8,
  6154. };
  6155.  
  6156. /** Bitmap info, see AndroidBitmap_getInfo(). */
  6157. typedef struct {
  6158.     /** The bitmap width in pixels. */
  6159.     uint32_t    width;
  6160.     /** The bitmap height in pixels. */
  6161.     uint32_t    height;
  6162.     /** The number of byte per row. */
  6163.     uint32_t    stride;
  6164.     /** The bitmap pixel format. See {@link AndroidBitmapFormat} */
  6165.     int32_t     format;
  6166.     /** Unused. */
  6167.     uint32_t    flags;      // 0 for now
  6168. } AndroidBitmapInfo;
  6169.  
  6170. /**
  6171.  * Given a java bitmap object, fill out the AndroidBitmapInfo struct for it.
  6172.  * If the call fails, the info parameter will be ignored.
  6173.  */
  6174. int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
  6175.                           AndroidBitmapInfo* info);
  6176.  
  6177. /**
  6178.  * Given a java bitmap object, attempt to lock the pixel address.
  6179.  * Locking will ensure that the memory for the pixels will not move
  6180.  * until the unlockPixels call, and ensure that, if the pixels had been
  6181.  * previously purged, they will have been restored.
  6182.  *
  6183.  * If this call succeeds, it must be balanced by a call to
  6184.  * AndroidBitmap_unlockPixels, after which time the address of the pixels should
  6185.  * no longer be used.
  6186.  *
  6187.  * If this succeeds, *addrPtr will be set to the pixel address. If the call
  6188.  * fails, addrPtr will be ignored.
  6189.  */
  6190. int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr);
  6191.  
  6192. /**
  6193.  * Call this to balance a successful call to AndroidBitmap_lockPixels.
  6194.  */
  6195. int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap);
  6196.  
  6197. #ifdef __cplusplus
  6198. }
  6199. #endif
  6200. # 109 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/bitmap.h" 3
  6201.  
  6202. #endif
  6203. # 111 "../../speed/rom-out/carbon/soong/ndk/sysroot/usr/include/android/bitmap.h" 3
  6204.  
  6205. /** @} */
  6206. # 24 "packages/apps/Gallery2/jni/filters/filters.h" 2
  6207.  
  6208. typedef unsigned int Color;
  6209.  
  6210. #define SetColor(a, r, g, b) (((a) << 24) | ((b) << 16) | ((g) << 8) | ((r) << 0));
  6211. #define GetA(color) (((color) >> 24) & 0xFF)
  6212. #define GetB(color) (((color) >> 16) & 0xFF)
  6213. #define GetG(color) (((color) >> 8) & 0xFF)
  6214. #define GetR(color) (((color) >> 0) & 0xFF)
  6215.  
  6216. #define MIN(a, b) ((a) < (b) ? (a) : (b))
  6217. #define MAX(a, b) ((a) > (b) ? (a) : (b))
  6218.  
  6219. #define LOG(msg...) __android_log_print(ANDROID_LOG_VERBOSE, "NativeFilters", msg)
  6220.  
  6221. #define JNIFUNCF(cls, name, vars...) Java_com_android_gallery3d_filtershow_filters_ ## cls ## _ ## name(JNIEnv* env, jobject obj, vars)
  6222.  
  6223. #define RED i
  6224. #define GREEN (i+1)
  6225. #define BLUE (i+2)
  6226. #define ALPHA (i+3)
  6227. #define CLAMP(c) (MAX(0, MIN(255, c)))
  6228.  
  6229. extern unsigned char  clamp(int c);
  6230. extern int clampMax(int c,int max);
  6231.  
  6232. extern void rgb2hsv( unsigned char *rgb,int rgbOff,unsigned short *hsv,int hsvOff);
  6233. extern void hsv2rgb(unsigned short *hsv,int hsvOff,unsigned char  *rgb,int rgbOff);
  6234. extern void filterRedEye(unsigned char *src, unsigned char *dest, int iw, int ih, short *rect);
  6235. extern double fastevalPoly(double *poly,int n, double x);
  6236. #endif // FILTERS_H
  6237. # 54 "packages/apps/Gallery2/jni/filters/filters.h"
  6238. # 19 "packages/apps/Gallery2/jni/filters/edge.c" 2
  6239.  
  6240. void JNIFUNCF(ImageFilterEdge, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat p)
  6241. {
  6242.     char* destination = 0;
  6243.     AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
  6244.  
  6245.     // using contrast function:
  6246.     // f(v) = exp(-alpha * v^beta)
  6247.     // use beta ~ 1
  6248.  
  6249.     float const alpha = 5.0f;
  6250.     float const beta = p;
  6251.     float const c_min = 100.0f;
  6252.     float const c_max = 500.0f;
  6253.  
  6254.     // pixels must be 4 bytes
  6255.     char * dst = destination;
  6256.  
  6257.     int j, k;
  6258.     char * ptr = destination;
  6259.     int row_stride = 4 * width;
  6260.  
  6261.     // set 2 row buffer (avoids bitmap copy)
  6262.     int buf_len = 2 * row_stride;
  6263.     char buf[buf_len];
  6264.     int buf_row_ring = 0;
  6265.  
  6266.     // set initial buffer to black
  6267.     memset(buf, 0, buf_len * sizeof(char));
  6268.     for (j = 3; j < buf_len; j+=4) {
  6269.         *(buf + j) = 255;  // set initial alphas
  6270.     }
  6271.  
  6272.     // apply sobel filter
  6273.     for (j = 1; j < height - 1; j++) {
  6274.  
  6275.         for (k = 1; k < width - 1; k++){
  6276.             int loc = j * row_stride + k * 4;
  6277.  
  6278.             float bestx = 0.0f;
  6279.             int l;
  6280.             for (l = 0; l < 3; l++) {
  6281.                 float tmp = 0.0f;
  6282.                 tmp += *(ptr + (loc - row_stride + 4 + l));
  6283.                 tmp += *(ptr + (loc + 4 + l)) * 2.0f;
  6284.                 tmp += *(ptr + (loc + row_stride + 4 + l));
  6285.                 tmp -= *(ptr + (loc - row_stride - 4 + l));
  6286.                 tmp -= *(ptr + (loc - 4 + l)) * 2.0f;
  6287.                 tmp -= *(ptr + (loc + row_stride - 4 + l));
  6288.                 if (fabs(tmp) > fabs(bestx)) {
  6289.                     bestx = tmp;
  6290.                 }
  6291.             }
  6292.  
  6293.             float besty = 0.0f;
  6294.             for (l = 0; l < 3; l++) {
  6295.                 float tmp = 0.0f;
  6296.                 tmp -= *(ptr + (loc - row_stride - 4 + l));
  6297.                 tmp -= *(ptr + (loc - row_stride + l)) * 2.0f;
  6298.                 tmp -= *(ptr + (loc - row_stride + 4 + l));
  6299.                 tmp += *(ptr + (loc + row_stride - 4 + l));
  6300.                 tmp += *(ptr + (loc + row_stride + l)) * 2.0f;
  6301.                 tmp += *(ptr + (loc + row_stride + 4 + l));
  6302.                 if (fabs(tmp) > fabs(besty)) {
  6303.                     besty = tmp;
  6304.                 }
  6305.             }
  6306.  
  6307.             // compute gradient magnitude
  6308.             float mag = sqrt(bestx * bestx + besty * besty);
  6309.  
  6310.             // clamp
  6311.             mag = MIN(MAX(c_min, mag), c_max);
  6312.  
  6313.             // scale to [0, 1]
  6314.             mag = (mag - c_min) / (c_max - c_min);
  6315.  
  6316.             float ret = 1.0f - exp (- alpha * pow(mag, beta));
  6317.             ret = 255 * ret;
  6318.  
  6319.             int off = k * 4;
  6320.             *(buf + buf_row_ring + off) = ret;
  6321.             *(buf + buf_row_ring + off + 1) = ret;
  6322.             *(buf + buf_row_ring + off + 2) = ret;
  6323.             *(buf + buf_row_ring + off + 3) = *(ptr + loc + 3);
  6324.         }
  6325.  
  6326.         buf_row_ring += row_stride;
  6327.         buf_row_ring %= buf_len;
  6328.  
  6329.         if (j - 1 >= 0) {
  6330.             memcpy((dst + row_stride * (j - 1)), (buf + buf_row_ring), row_stride * sizeof(char));
  6331.         }
  6332.  
  6333.     }
  6334.     buf_row_ring += row_stride;
  6335.     buf_row_ring %= buf_len;
  6336.     int second_last_row = row_stride * (height - 2);
  6337.     memcpy((dst + second_last_row), (buf + buf_row_ring), row_stride * sizeof(char));
  6338.  
  6339.     // set last row to black
  6340.     int last_row = row_stride * (height - 1);
  6341.     memset((dst + last_row), 0, row_stride * sizeof(char));
  6342.     for (j = 3; j < row_stride; j+=4) {
  6343.         *(dst + last_row + j) = 255;  // set alphas
  6344.     }
  6345.     AndroidBitmap_unlockPixels(env, bitmap);
  6346. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement