# 1 "" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" /* * transupp.c * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1997-2019, Thomas G. Lane, Guido Vollbeding. * libjpeg-turbo Modifications: * Copyright (C) 2010, 2017, 2021-2022, 2024, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file contains image transformation routines and other utility code * used by the jpegtran sample application. These are NOT part of the core * JPEG library. But we keep these routines separate from jpegtran.c to * ease the task of maintaining jpegtran-like programs that have other user * interfaces. */ /* Although this file really shouldn't have access to the library internals, * it's helpful to let it call jround_up() and jcopy_block_row(). */ #define JPEG_INTERNALS #if defined(__CLANG_REWRITTEN_INCLUDES) /* jinclude.h expanded by -frewrite-includes */ #include "jinclude.h" #else /* jinclude.h expanded by -frewrite-includes */ # 23 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" 1 /* * jinclude.h * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1994, Thomas G. Lane. * libjpeg-turbo Modifications: * Copyright (C) 2022-2023, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file exists to provide a single place to fix any problems with * including the wrong system include files. (Common problems are taken * care of by the standard jconfig symbols, but on really weird systems * you may have to edit this file.) * * NOTE: this file is NOT intended to be included by applications using the * JPEG library. Most applications need only include jpeglib.h. */ #ifndef __JINCLUDE_H__ #define __JINCLUDE_H__ /* Include auto-config file to find out which system include files we need. */ #if defined(__CLANG_REWRITTEN_INCLUDES) /* jconfig.h expanded by -frewrite-includes */ #include "jconfig.h" /* auto configuration options */ #else /* jconfig.h expanded by -frewrite-includes */ # 25 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfig.h" 1 /* Version ID for the JPEG library. * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". */ #define JPEG_LIB_VERSION 80 /* libjpeg-turbo version */ #define LIBJPEG_TURBO_VERSION 3.0.91 /* libjpeg-turbo version in integer form */ #define LIBJPEG_TURBO_VERSION_NUMBER 3000091 /* Support arithmetic encoding when using 8-bit samples */ #define C_ARITH_CODING_SUPPORTED 1 /* Support arithmetic decoding when using 8-bit samples */ #define D_ARITH_CODING_SUPPORTED 1 /* Support in-memory source/destination managers */ #define MEM_SRCDST_SUPPORTED 1 /* Use accelerated SIMD routines when using 8-bit samples */ #define WITH_SIMD 1 /* This version of libjpeg-turbo supports run-time selection of data precision, * so BITS_IN_JSAMPLE is no longer used to specify the data precision at build * time. However, some downstream software expects the macro to be defined. * Since 12-bit data precision is an opt-in feature that requires explicitly * calling 12-bit-specific libjpeg API functions and using 12-bit-specific data * types, the unmodified portion of the libjpeg API still behaves as if it were * built for 8-bit precision, and JSAMPLE is still literally an 8-bit data * type. Thus, it is correct to define BITS_IN_JSAMPLE to 8 here. */ #ifndef BITS_IN_JSAMPLE #define BITS_IN_JSAMPLE 8 #endif # 36 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfig.h" #ifdef _WIN32 #undef RIGHT_SHIFT_IS_UNSIGNED /* Define "boolean" as unsigned char, not int, per Windows custom */ #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ typedef unsigned char boolean; #endif # 45 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfig.h" #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ /* Define "INT32" as int, not long, per Windows custom */ #if 0 /* disabled by -frewrite-includes */ #if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 49 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfig.h" typedef short INT16; typedef signed int INT32; #endif # 52 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfig.h" #define XMD_H /* prevent jmorecfg.h from redefining it */ #else # 55 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfig.h" /* Define if your (broken) compiler shifts signed values as if they were unsigned. */ /* #undef RIGHT_SHIFT_IS_UNSIGNED */ #endif # 61 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfig.h" #endif /* jconfig.h expanded by -frewrite-includes */ # 26 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) /* jconfigint.h expanded by -frewrite-includes */ #include "jconfigint.h" #else /* jconfigint.h expanded by -frewrite-includes */ # 26 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" 1 /* libjpeg-turbo build number */ #define BUILD "20241127" /* How to hide global symbols. */ #define HIDDEN __attribute__((visibility("hidden"))) /* Compiler's inline keyword */ #undef inline /* How to obtain function inlining. */ #define INLINE __inline__ __attribute__((always_inline)) /* How to obtain thread-local storage */ #define THREAD_LOCAL __thread /* Define to the full name of this package. */ #define PACKAGE_NAME "libjpeg-turbo" /* Version number of package */ #define VERSION "3.0.91" /* The size of `size_t', as computed by sizeof. */ #define SIZEOF_SIZE_T 8 /* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */ #define HAVE_BUILTIN_CTZL /* Define to 1 if you have the header file. */ /* #undef HAVE_INTRIN_H */ #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_VER) && defined(HAVE_INTRIN_H) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 32 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #if 0 /* disabled by -frewrite-includes */ #if (SIZEOF_SIZE_T == 8) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #define HAVE_BITSCANFORWARD64 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif (SIZEOF_SIZE_T == 4) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 35 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #define HAVE_BITSCANFORWARD #endif # 37 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #endif # 38 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #if 0 /* disabled by -frewrite-includes */ #if defined(__has_attribute) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 40 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #if 0 /* disabled by -frewrite-includes */ #if __has_attribute(fallthrough) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #define FALLTHROUGH __attribute__((fallthrough)); #else # 43 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #define FALLTHROUGH #endif # 45 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #else # 46 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #define FALLTHROUGH #endif # 48 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" /* * Define BITS_IN_JSAMPLE as either * 8 for 8-bit sample values (the usual setting) * 12 for 12-bit sample values * Only 8 and 12 are legal data precisions for lossy JPEG according to the * JPEG standard, and the IJG code does not support anything else! */ #ifndef BITS_IN_JSAMPLE #define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ #endif # 60 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #undef C_ARITH_CODING_SUPPORTED #undef D_ARITH_CODING_SUPPORTED #undef WITH_SIMD #if 0 /* disabled by -frewrite-includes */ #if BITS_IN_JSAMPLE == 8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 66 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" /* Support arithmetic encoding */ #define C_ARITH_CODING_SUPPORTED 1 /* Support arithmetic decoding */ #define D_ARITH_CODING_SUPPORTED 1 /* Use accelerated SIMD routines. */ #define WITH_SIMD 1 #endif # 77 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/_build/jconfigint.h" #endif /* jconfigint.h expanded by -frewrite-includes */ # 27 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" 2 #define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ /* * Note that the core JPEG library does not require ; * only the default error handler and data source/destination modules do. * But we must pull it in because of the references to FILE in jpeglib.h. * You can remove those references if you want to compile without . */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */ #include #else /* stddef.h expanded by -frewrite-includes */ # 36 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" # 1 "/usr/lib/clang/20/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stddef.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__MVS__) && __has_include_next() #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/lib/clang/20/include/stddef.h" 3 #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t #undef __need_wchar_t #undef __need_NULL #undef __need_nullptr_t #undef __need_unreachable #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/lib/clang/20/include/stddef.h" 3 # 34 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 34 "/usr/lib/clang/20/include/stddef.h" 3 # 35 "/usr/lib/clang/20/include/stddef.h" 3 #else # 37 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_rsize_t) && !defined(__need_wchar_t) && \ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 43 "/usr/lib/clang/20/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/lib/clang/20/include/stddef.h" 3 #define __need_rsize_t #endif # 50 "/usr/lib/clang/20/include/stddef.h" 3 #define __need_wchar_t #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/clang/20/include/stddef.h" 3 /* * __stddef_null.h is special when building without modules: if __need_NULL is * set, then it will unconditionally redefine NULL. To avoid stepping on client * definitions of NULL, __need_NULL should only be set the first time this * header is included, that is when __STDDEF_H is not defined. However, when * building with modules, this header is a textual header and needs to * unconditionally include __stdef_null.h to support multiple submodules * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. * When SM.B builds, the definition from SM.A will leak when building without * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't * export NULL as expected. When building with modules, always include * __stddef_null.h so that everything works as expected. */ #define __need_NULL #endif # 69 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/clang/20/include/stddef.h" 3 #define __need_nullptr_t #endif # 73 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 74 "/usr/lib/clang/20/include/stddef.h" 3 #define __need_unreachable #endif # 76 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 78 "/usr/lib/clang/20/include/stddef.h" 3 #define __need_max_align_t #endif # 80 "/usr/lib/clang/20/include/stddef.h" 3 #define __need_offsetof /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_header_macro.h expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #else /* __stddef_header_macro.h expanded by -frewrite-includes */ # 84 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_header_macro.h" 1 3 /*===---- __stddef_header_macro.h ------------------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __STDDEF_H #define __STDDEF_H #endif # 13 "/usr/lib/clang/20/include/__stddef_header_macro.h" 3 #endif /* __stddef_header_macro.h expanded by -frewrite-includes */ # 85 "/usr/lib/clang/20/include/stddef.h" 2 3 #endif # 86 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_ptrdiff_t.h expanded by -frewrite-includes */ #include <__stddef_ptrdiff_t.h> #else /* __stddef_ptrdiff_t.h expanded by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_ptrdiff_t.h" 1 3 /*===---- __stddef_ptrdiff_t.h - Definition of ptrdiff_t -------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_ptrdiff_t.h" 3 #define _PTRDIFF_T typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 21 "/usr/lib/clang/20/include/__stddef_ptrdiff_t.h" 3 #endif /* __stddef_ptrdiff_t.h expanded by -frewrite-includes */ # 89 "/usr/lib/clang/20/include/stddef.h" 2 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 91 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_size_t.h expanded by -frewrite-includes */ #include <__stddef_size_t.h> #else /* __stddef_size_t.h expanded by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_size_t.h" 1 3 /*===---- __stddef_size_t.h - Definition of size_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 #define _SIZE_T typedef __SIZE_TYPE__ size_t; #endif # 21 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 #endif /* __stddef_size_t.h expanded by -frewrite-includes */ # 94 "/usr/lib/clang/20/include/stddef.h" 2 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 96 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_rsize_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_rsize_t.h> #endif /* expanded by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 # 99 "/usr/lib/clang/20/include/stddef.h" 3 #undef __need_rsize_t #endif /* defined(__need_rsize_t) */ # 101 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_wchar_t.h expanded by -frewrite-includes */ #include <__stddef_wchar_t.h> #else /* __stddef_wchar_t.h expanded by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 1 3 /*===---- __stddef_wchar.h - Definition of wchar_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) || (defined(_MSC_VER) && !_NATIVE_WCHAR_T_DEFINED) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 11 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 18 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 #define _WCHAR_T #ifdef _MSC_EXTENSIONS #define _WCHAR_T_DEFINED #endif # 23 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 27 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 #endif # 29 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 #endif /* __stddef_wchar_t.h expanded by -frewrite-includes */ # 104 "/usr/lib/clang/20/include/stddef.h" 2 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 106 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_null.h expanded by -frewrite-includes */ #include <__stddef_null.h> #else /* __stddef_null.h expanded by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_null.h" 1 3 /*===---- __stddef_null.h - Definition of NULL -----------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(NULL) || !__building_module(_Builtin_stddef) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 11 "/usr/lib/clang/20/include/__stddef_null.h" 3 /* linux/stddef.h will define NULL to 0. glibc (and other) headers then define * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. * Modules don't support redefining macros like that, but support that pattern * in the non-modules case. */ #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 21 "/usr/lib/clang/20/include/__stddef_null.h" 3 #define NULL __null #else # 23 "/usr/lib/clang/20/include/__stddef_null.h" 3 #define NULL 0 #endif # 25 "/usr/lib/clang/20/include/__stddef_null.h" 3 #else # 26 "/usr/lib/clang/20/include/__stddef_null.h" 3 #define NULL ((void*)0) #endif # 28 "/usr/lib/clang/20/include/__stddef_null.h" 3 #endif # 30 "/usr/lib/clang/20/include/__stddef_null.h" 3 #endif /* __stddef_null.h expanded by -frewrite-includes */ # 109 "/usr/lib/clang/20/include/stddef.h" 2 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 111 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_nullptr_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_nullptr_t.h expanded by -frewrite-includes */ #include <__stddef_nullptr_t.h> #else /* __stddef_nullptr_t.h expanded by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_nullptr_t.h" 1 3 /*===---- __stddef_nullptr_t.h - Definition of nullptr_t -------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_NULLPTR_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_nullptr_t.h" 3 #define _NULLPTR_T #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/lib/clang/20/include/__stddef_nullptr_t.h" 3 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 25 "/usr/lib/clang/20/include/__stddef_nullptr_t.h" 3 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 26 "/usr/lib/clang/20/include/__stddef_nullptr_t.h" 3 typedef typeof(nullptr) nullptr_t; #endif # 28 "/usr/lib/clang/20/include/__stddef_nullptr_t.h" 3 #endif # 30 "/usr/lib/clang/20/include/__stddef_nullptr_t.h" 3 #endif /* __stddef_nullptr_t.h expanded by -frewrite-includes */ # 114 "/usr/lib/clang/20/include/stddef.h" 2 3 #undef __need_nullptr_t #endif /* defined(__need_nullptr_t) */ # 116 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_unreachable) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_unreachable.h expanded by -frewrite-includes */ #include <__stddef_unreachable.h> #else /* __stddef_unreachable.h expanded by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_unreachable.h" 1 3 /*===---- __stddef_unreachable.h - Definition of unreachable ---------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __cplusplus /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(unreachable) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 18 "/usr/lib/clang/20/include/__stddef_unreachable.h" 3 #define unreachable() __builtin_unreachable() #endif # 20 "/usr/lib/clang/20/include/__stddef_unreachable.h" 3 #endif # 22 "/usr/lib/clang/20/include/__stddef_unreachable.h" 3 #endif /* __stddef_unreachable.h expanded by -frewrite-includes */ # 119 "/usr/lib/clang/20/include/stddef.h" 2 3 #undef __need_unreachable #endif /* defined(__need_unreachable) */ # 121 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_max_align_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_max_align_t.h expanded by -frewrite-includes */ #include <__stddef_max_align_t.h> #else /* __stddef_max_align_t.h expanded by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_max_align_t.h" 1 3 /*===---- __stddef_max_align_t.h - Definition of max_align_t ---------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __CLANG_MAX_ALIGN_T_DEFINED #define __CLANG_MAX_ALIGN_T_DEFINED #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 14 "/usr/lib/clang/20/include/__stddef_max_align_t.h" 3 typedef double max_align_t; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__APPLE__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_max_align_t.h" 3 typedef long double max_align_t; #else # 18 "/usr/lib/clang/20/include/__stddef_max_align_t.h" 3 // Define 'max_align_t' to match the GCC definition. typedef struct { long long __clang_max_align_nonce1 __attribute__((__aligned__(__alignof__(long long)))); long double __clang_max_align_nonce2 __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; #endif # 26 "/usr/lib/clang/20/include/__stddef_max_align_t.h" 3 #endif # 28 "/usr/lib/clang/20/include/__stddef_max_align_t.h" 3 #endif /* __stddef_max_align_t.h expanded by -frewrite-includes */ # 124 "/usr/lib/clang/20/include/stddef.h" 2 3 #undef __need_max_align_t #endif /* defined(__need_max_align_t) */ # 126 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_offsetof) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_offsetof.h expanded by -frewrite-includes */ #include <__stddef_offsetof.h> #else /* __stddef_offsetof.h expanded by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 # 1 "/usr/lib/clang/20/include/__stddef_offsetof.h" 1 3 /*===---- __stddef_offsetof.h - Definition of offsetof ---------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(offsetof) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_offsetof.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #endif # 18 "/usr/lib/clang/20/include/__stddef_offsetof.h" 3 #endif /* __stddef_offsetof.h expanded by -frewrite-includes */ # 129 "/usr/lib/clang/20/include/stddef.h" 2 3 #undef __need_offsetof #endif /* defined(__need_offsetof) */ # 131 "/usr/lib/clang/20/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wint_t.h> #endif /* expanded by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 # 136 "/usr/lib/clang/20/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 138 "/usr/lib/clang/20/include/stddef.h" 3 #endif /* __MVS__ */ # 140 "/usr/lib/clang/20/include/stddef.h" 3 #endif /* stddef.h expanded by -frewrite-includes */ # 37 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib.h expanded by -frewrite-includes */ #include #else /* stdlib.h expanded by -frewrite-includes */ # 37 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" # 1 "/usr/include/stdlib.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.20 General utilities */ #ifndef _STDLIB_H #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* libc-header-start.h expanded by -frewrite-includes */ #include #else /* libc-header-start.h expanded by -frewrite-includes */ # 26 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION # error "Never include directly." #endif # 30 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* features.h expanded by -frewrite-includes */ #include #else /* features.h expanded by -frewrite-includes */ # 33 "/usr/include/bits/libc-header-start.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FEATURES_H #define _FEATURES_H 1 /* These are defined by the user (or the compiler) to specify the desired environment: __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. _ISOC23_SOURCE Extensions to ISO C99 from ISO C23. _ISOC2X_SOURCE Old name for _ISOC23_SOURCE. __STDC_WANT_LIB_EXT2__ Extensions to ISO C99 from TR 27431-2:2010. __STDC_WANT_IEC_60559_BFP_EXT__ Extensions to ISO C11 from TS 18661-1:2014. __STDC_WANT_IEC_60559_FUNCS_EXT__ Extensions to ISO C11 from TS 18661-4:2015. __STDC_WANT_IEC_60559_TYPES_EXT__ Extensions to ISO C11 from TS 18661-3:2015. __STDC_WANT_IEC_60559_EXT__ ISO C23 interfaces defined only in Annex F. _POSIX_SOURCE IEEE Std 1003.1. _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; if >=199309L, add IEEE Std 1003.1b-1993; if >=199506L, add IEEE Std 1003.1c-1995; if >=200112L, all of IEEE 1003.1-2004 if >=200809L, all of IEEE 1003.1-2008 _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if Single Unix conformance is wanted, to 600 for the sixth revision, to 700 for the seventh revision. _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. _LARGEFILE_SOURCE Some more functions for correct standard I/O. _LARGEFILE64_SOURCE Additional functionality from LFS for large files. _FILE_OFFSET_BITS=N Select default filesystem interface. _ATFILE_SOURCE Additional *at interfaces. _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. _GNU_SOURCE All of the above, plus GNU extensions. _DEFAULT_SOURCE The default set of features (taking precedence over __STRICT_ANSI__). _FORTIFY_SOURCE Add security hardening to many library functions. Set to 1, 2 or 3; 3 performs stricter checks than 2, which performs stricter checks than 1. _REENTRANT, _THREAD_SAFE Obsolete; equivalent to _POSIX_C_SOURCE=199506L. The `-ansi' switch to the GNU C compiler, and standards conformance options such as `-std=c99', define __STRICT_ANSI__. If none of these are defined, or if _DEFAULT_SOURCE is defined, the default is to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 200809L, as well as enabling miscellaneous functions from BSD and SVID. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ISO C, 1003.1, and 1003.2, but nothing else. These are defined by this file and are used by the header files to decide what to declare or define: __GLIBC_USE (F) Define things from feature set F. This is defined to 1 or 0; the subsequent macros are either defined or undefined, and those tests should be moved to __GLIBC_USE. __USE_ISOC11 Define ISO C11 things. __USE_ISOC99 Define ISO C99 things. __USE_ISOC95 Define ISO C90 AMD1 (C95) things. __USE_ISOCXX11 Define ISO C++11 things. __USE_POSIX Define IEEE Std 1003.1 things. __USE_POSIX2 Define IEEE Std 1003.2 things. __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. __USE_XOPEN Define XPG things. __USE_XOPEN_EXTENDED Define X/Open Unix things. __USE_UNIX98 Define Single Unix V2 things. __USE_XOPEN2K Define XPG6 things. __USE_XOPEN2KXSI Define XPG6 XSI things. __USE_XOPEN2K8 Define XPG7 things. __USE_XOPEN2K8XSI Define XPG7 XSI things. __USE_LARGEFILE Define correct standard I/O things. __USE_LARGEFILE64 Define LFS things with separate names. __USE_FILE_OFFSET64 Define 64bit interface as default. __USE_MISC Define things from 4.3BSD or System V Unix. __USE_ATFILE Define *at interfaces and AT_* constants for them. __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. __USE_GNU Define GNU extensions. __USE_FORTIFY_LEVEL Additional security measures used, according to level. The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are defined by this file unconditionally. `__GNU_LIBRARY__' is provided only for compatibility. All new code should use the other symbols to test for features. All macros listed above as possibly being defined by this file are explicitly undefined if they are not explicitly defined. Feature-test macros that are not defined by the user or compiler but are implied by the other feature-test macros defined (or by the lack of any definitions) are defined by the file. ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included, and so they are handled in , which does not have a multiple include guard. Feature test macros that can be handled from the first system header included are handled here. */ /* Undefine everything, so we get a clean slate. */ #undef __USE_ISOC11 #undef __USE_ISOC99 #undef __USE_ISOC95 #undef __USE_ISOCXX11 #undef __USE_POSIX #undef __USE_POSIX2 #undef __USE_POSIX199309 #undef __USE_POSIX199506 #undef __USE_XOPEN #undef __USE_XOPEN_EXTENDED #undef __USE_UNIX98 #undef __USE_XOPEN2K #undef __USE_XOPEN2KXSI #undef __USE_XOPEN2K8 #undef __USE_XOPEN2K8XSI #undef __USE_LARGEFILE #undef __USE_LARGEFILE64 #undef __USE_FILE_OFFSET64 #undef __USE_MISC #undef __USE_ATFILE #undef __USE_DYNAMIC_STACK_SIZE #undef __USE_GNU #undef __USE_FORTIFY_LEVEL #undef __KERNEL_STRICT_NAMES #undef __GLIBC_USE_ISOC23 #undef __GLIBC_USE_DEPRECATED_GETS #undef __GLIBC_USE_DEPRECATED_SCANF #undef __GLIBC_USE_C23_STRTOL /* Suppress kernel-name space pollution unless user expressedly asks for it. */ #ifndef _LOOSE_KERNEL_NAMES # define __KERNEL_STRICT_NAMES #endif # 162 "/usr/include/features.h" 3 4 /* Convenience macro to test the version of gcc. Use like this: #if __GNUC_PREREQ (2,8) ... code requiring gcc 2.8 or later ... #endif Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was added in 2.0. */ #if 0 /* disabled by -frewrite-includes */ #if defined __GNUC__ && defined __GNUC_MINOR__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 171 "/usr/include/features.h" 3 4 # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else # 174 "/usr/include/features.h" 3 4 # define __GNUC_PREREQ(maj, min) 0 #endif # 176 "/usr/include/features.h" 3 4 /* Similarly for clang. Features added to GCC after version 4.2 may or may not also be available in clang, and clang's definitions of __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such features can be queried via __has_extension/__has_feature. */ #if 0 /* disabled by -frewrite-includes */ #if defined __clang_major__ && defined __clang_minor__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 182 "/usr/include/features.h" 3 4 # define __glibc_clang_prereq(maj, min) \ ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min)) #else # 185 "/usr/include/features.h" 3 4 # define __glibc_clang_prereq(maj, min) 0 #endif # 187 "/usr/include/features.h" 3 4 /* Whether to use feature set F. */ #define __GLIBC_USE(F) __GLIBC_USE_ ## F /* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not issue a warning; the expectation is that the source is being transitioned to use the new macro. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _BSD_SOURCE || defined _SVID_SOURCE) \ && !defined _DEFAULT_SOURCE #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 197 "/usr/include/features.h" 3 4 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 #endif # 201 "/usr/include/features.h" 3 4 /* Remap the old name _ISOC2X_SOURCE to _ISOC23_SOURCE. */ #ifdef _ISOC2X_SOURCE # undef _ISOC2X_SOURCE # undef _ISOC23_SOURCE # define _ISOC23_SOURCE 1 #endif # 208 "/usr/include/features.h" 3 4 /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ #ifdef _GNU_SOURCE # undef _ISOC95_SOURCE # define _ISOC95_SOURCE 1 # undef _ISOC99_SOURCE # define _ISOC99_SOURCE 1 # undef _ISOC11_SOURCE # define _ISOC11_SOURCE 1 # undef _ISOC23_SOURCE # define _ISOC23_SOURCE 1 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L # undef _XOPEN_SOURCE # define _XOPEN_SOURCE 700 # undef _XOPEN_SOURCE_EXTENDED # define _XOPEN_SOURCE_EXTENDED 1 # undef _LARGEFILE64_SOURCE # define _LARGEFILE64_SOURCE 1 # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 # undef _DYNAMIC_STACK_SIZE_SOURCE # define _DYNAMIC_STACK_SIZE_SOURCE 1 #endif # 236 "/usr/include/features.h" 3 4 /* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, define _DEFAULT_SOURCE. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _DEFAULT_SOURCE \ || (!defined __STRICT_ANSI__ \ && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \ && !defined _ISOC23_SOURCE \ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \ && !defined _XOPEN_SOURCE)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 245 "/usr/include/features.h" 3 4 # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 #endif # 248 "/usr/include/features.h" 3 4 /* This is to enable the ISO C23 extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _ISOC23_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 252 "/usr/include/features.h" 3 4 # define __GLIBC_USE_ISOC23 1 #else # 254 "/usr/include/features.h" 3 4 # define __GLIBC_USE_ISOC23 0 #endif # 256 "/usr/include/features.h" 3 4 /* This is to enable the ISO C11 extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _ISOC11_SOURCE || defined _ISOC23_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 260 "/usr/include/features.h" 3 4 # define __USE_ISOC11 1 #endif # 262 "/usr/include/features.h" 3 4 /* This is to enable the ISO C99 extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ || defined _ISOC23_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 267 "/usr/include/features.h" 3 4 # define __USE_ISOC99 1 #endif # 269 "/usr/include/features.h" 3 4 /* This is to enable the ISO C90 Amendment 1:1995 extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ || defined _ISOC23_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 274 "/usr/include/features.h" 3 4 # define __USE_ISOC95 1 #endif # 276 "/usr/include/features.h" 3 4 #ifdef __cplusplus /* This is to enable compatibility for ISO C++17. */ #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 280 "/usr/include/features.h" 3 4 # define __USE_ISOC11 1 # endif # 282 "/usr/include/features.h" 3 4 /* This is to enable compatibility for ISO C++11. Check the temporary macro for now, too. */ #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 285 "/usr/include/features.h" 3 4 # define __USE_ISOCXX11 1 # define __USE_ISOC99 1 # endif # 288 "/usr/include/features.h" 3 4 #endif # 289 "/usr/include/features.h" 3 4 /* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE is defined, use POSIX.1-2008 (or another version depending on _XOPEN_SOURCE). */ #ifdef _DEFAULT_SOURCE #if 0 /* disabled by -frewrite-includes */ # if !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 295 "/usr/include/features.h" 3 4 # define __USE_POSIX_IMPLICITLY 1 # endif # 297 "/usr/include/features.h" 3 4 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L #endif # 302 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if ((!defined __STRICT_ANSI__ \ || (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)) \ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 306 "/usr/include/features.h" 3 4 # define _POSIX_SOURCE 1 #if 0 /* disabled by -frewrite-includes */ # if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 308 "/usr/include/features.h" 3 4 # define _POSIX_C_SOURCE 2 #if 0 /* disabled by -frewrite-includes */ #if 0 # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 310 "/usr/include/features.h" 3 4 # define _POSIX_C_SOURCE 199506L #if 0 /* disabled by -frewrite-includes */ #if 0 # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 312 "/usr/include/features.h" 3 4 # define _POSIX_C_SOURCE 200112L # else # 314 "/usr/include/features.h" 3 4 # define _POSIX_C_SOURCE 200809L # endif # 316 "/usr/include/features.h" 3 4 # define __USE_POSIX_IMPLICITLY 1 #endif # 318 "/usr/include/features.h" 3 4 /* Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be defined in all multithreaded code. GNU libc has not required this for many years. We now treat them as compatibility synonyms for _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with comprehensive support for multithreaded code. Using them never lowers the selected level of POSIX conformance, only raises it. */ #if 0 /* disabled by -frewrite-includes */ #if ((!defined _POSIX_C_SOURCE || (_POSIX_C_SOURCE - 0) < 199506L) \ && (defined _REENTRANT || defined _THREAD_SAFE)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 327 "/usr/include/features.h" 3 4 # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 199506L #endif # 331 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined _POSIX_SOURCE \ || (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1) \ || defined _XOPEN_SOURCE) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 335 "/usr/include/features.h" 3 4 # define __USE_POSIX 1 #endif # 337 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 339 "/usr/include/features.h" 3 4 # define __USE_POSIX2 1 #endif # 341 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 343 "/usr/include/features.h" 3 4 # define __USE_POSIX199309 1 #endif # 345 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 347 "/usr/include/features.h" 3 4 # define __USE_POSIX199506 1 #endif # 349 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 351 "/usr/include/features.h" 3 4 # define __USE_XOPEN2K 1 # undef __USE_ISOC95 # define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 #endif # 357 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 359 "/usr/include/features.h" 3 4 # define __USE_XOPEN2K8 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 #endif # 363 "/usr/include/features.h" 3 4 #ifdef _XOPEN_SOURCE # define __USE_XOPEN 1 #if 0 /* disabled by -frewrite-includes */ # if (_XOPEN_SOURCE - 0) >= 500 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 367 "/usr/include/features.h" 3 4 # define __USE_XOPEN_EXTENDED 1 # define __USE_UNIX98 1 # undef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 #if 0 /* disabled by -frewrite-includes */ # if (_XOPEN_SOURCE - 0) >= 600 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 372 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if (_XOPEN_SOURCE - 0) >= 700 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 373 "/usr/include/features.h" 3 4 # define __USE_XOPEN2K8 1 # define __USE_XOPEN2K8XSI 1 # endif # 376 "/usr/include/features.h" 3 4 # define __USE_XOPEN2K 1 # define __USE_XOPEN2KXSI 1 # undef __USE_ISOC95 # define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 # endif # 383 "/usr/include/features.h" 3 4 # else # 384 "/usr/include/features.h" 3 4 # ifdef _XOPEN_SOURCE_EXTENDED # define __USE_XOPEN_EXTENDED 1 # endif # 387 "/usr/include/features.h" 3 4 # endif # 388 "/usr/include/features.h" 3 4 #endif # 389 "/usr/include/features.h" 3 4 #ifdef _LARGEFILE_SOURCE # define __USE_LARGEFILE 1 #endif # 393 "/usr/include/features.h" 3 4 #ifdef _LARGEFILE64_SOURCE # define __USE_LARGEFILE64 1 #endif # 397 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 399 "/usr/include/features.h" 3 4 # define __USE_FILE_OFFSET64 1 #endif # 401 "/usr/include/features.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* features-time64.h expanded by -frewrite-includes */ #include #else /* features-time64.h expanded by -frewrite-includes */ # 402 "/usr/include/features.h" 3 4 # 1 "/usr/include/features-time64.h" 1 3 4 /* Features part to handle 64-bit time_t support. Copyright (C) 2021-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* We need to know the word size in order to check the time size. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wordsize.h expanded by -frewrite-includes */ #include #else /* wordsize.h expanded by -frewrite-includes */ # 20 "/usr/include/features-time64.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE_TIME64_COMPAT32 1 #ifdef __x86_64__ /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #endif # 17 "/usr/include/bits/wordsize.h" 3 4 #endif /* wordsize.h expanded by -frewrite-includes */ # 21 "/usr/include/features-time64.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* timesize.h expanded by -frewrite-includes */ #include #else /* timesize.h expanded by -frewrite-includes */ # 21 "/usr/include/features-time64.h" 3 4 # 1 "/usr/include/bits/timesize.h" 1 3 4 /* Bit size of the time_t type at glibc build time, x86-64 and x32 case. Copyright (C) 2018-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wordsize.h expanded by -frewrite-includes */ #include #else /* wordsize.h expanded by -frewrite-includes */ # 19 "/usr/include/bits/timesize.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE_TIME64_COMPAT32 1 #ifdef __x86_64__ /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #endif # 17 "/usr/include/bits/wordsize.h" 3 4 #endif /* wordsize.h expanded by -frewrite-includes */ # 20 "/usr/include/bits/timesize.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 22 "/usr/include/bits/timesize.h" 3 4 /* For x32, time is 64-bit even though word size is 32-bit. */ # define __TIMESIZE 64 #else # 25 "/usr/include/bits/timesize.h" 3 4 /* For others, time size is word size. */ # define __TIMESIZE __WORDSIZE #endif # 28 "/usr/include/bits/timesize.h" 3 4 #endif /* timesize.h expanded by -frewrite-includes */ # 22 "/usr/include/features-time64.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _TIME_BITS #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 24 "/usr/include/features-time64.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if _TIME_BITS == 64 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 25 "/usr/include/features-time64.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 26 "/usr/include/features-time64.h" 3 4 # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" # endif # 28 "/usr/include/features-time64.h" 3 4 # define __USE_TIME_BITS64 1 #if 0 /* disabled by -frewrite-includes */ #if 0 # elif _TIME_BITS == 32 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 30 "/usr/include/features-time64.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __TIMESIZE > 32 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/include/features-time64.h" 3 4 # error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32" # endif # 33 "/usr/include/features-time64.h" 3 4 # else # 34 "/usr/include/features-time64.h" 3 4 # error Invalid _TIME_BITS value (can only be 32 or 64-bit) # endif # 36 "/usr/include/features-time64.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __TIMESIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 37 "/usr/include/features-time64.h" 3 4 # define __USE_TIME_BITS64 1 #endif # 39 "/usr/include/features-time64.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_TIME_BITS64 && __TIMESIZE == 32 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/usr/include/features-time64.h" 3 4 # define __USE_TIME64_REDIRECTS 1 #endif # 43 "/usr/include/features-time64.h" 3 4 #endif /* features-time64.h expanded by -frewrite-includes */ # 403 "/usr/include/features.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _DEFAULT_SOURCE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 405 "/usr/include/features.h" 3 4 # define __USE_MISC 1 #endif # 407 "/usr/include/features.h" 3 4 #ifdef _ATFILE_SOURCE # define __USE_ATFILE 1 #endif # 411 "/usr/include/features.h" 3 4 #ifdef _DYNAMIC_STACK_SIZE_SOURCE # define __USE_DYNAMIC_STACK_SIZE 1 #endif # 415 "/usr/include/features.h" 3 4 #ifdef _GNU_SOURCE # define __USE_GNU 1 #endif # 419 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 421 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 422 "/usr/include/features.h" 3 4 # warning _FORTIFY_SOURCE requires compiling with optimization (-O) #if 0 /* disabled by -frewrite-includes */ #if 0 # elif !__GNUC_PREREQ (4, 1) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 424 "/usr/include/features.h" 3 4 # warning _FORTIFY_SOURCE requires GCC 4.1 or later #if 0 /* disabled by -frewrite-includes */ #if 0 # elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0) \ || __GNUC_PREREQ (12, 0)) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 427 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if _FORTIFY_SOURCE > 3 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 429 "/usr/include/features.h" 3 4 # warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform # endif # 431 "/usr/include/features.h" 3 4 # define __USE_FORTIFY_LEVEL 3 #if 0 /* disabled by -frewrite-includes */ #if 0 # elif _FORTIFY_SOURCE > 1 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 433 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if _FORTIFY_SOURCE > 2 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 434 "/usr/include/features.h" 3 4 # warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform # endif # 436 "/usr/include/features.h" 3 4 # define __USE_FORTIFY_LEVEL 2 # else # 438 "/usr/include/features.h" 3 4 # define __USE_FORTIFY_LEVEL 1 # endif # 440 "/usr/include/features.h" 3 4 #endif # 441 "/usr/include/features.h" 3 4 #ifndef __USE_FORTIFY_LEVEL # define __USE_FORTIFY_LEVEL 0 #endif # 444 "/usr/include/features.h" 3 4 /* The function 'gets' existed in C89, but is impossible to use safely. It has been removed from ISO C11 and ISO C++14. Note: for compatibility with various implementations of , this test must consider only the value of __cplusplus when compiling C++. */ #if 0 /* disabled by -frewrite-includes */ #if defined __cplusplus ? __cplusplus >= 201402L : defined __USE_ISOC11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 450 "/usr/include/features.h" 3 4 # define __GLIBC_USE_DEPRECATED_GETS 0 #else # 452 "/usr/include/features.h" 3 4 # define __GLIBC_USE_DEPRECATED_GETS 1 #endif # 454 "/usr/include/features.h" 3 4 /* GNU formerly extended the scanf functions with modified format specifiers %as, %aS, and %a[...] that allocate a buffer for the input using malloc. This extension conflicts with ISO C99, which defines %a as a standalone format specifier that reads a floating- point number; moreover, POSIX.1-2008 provides the same feature using the modifier letter 'm' instead (%ms, %mS, %m[...]). We now follow C99 unless GNU extensions are active and the compiler is specifically in C89 or C++98 mode (strict or not). For instance, with GCC, -std=gnu11 will have C99-compliant scanf with or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the old extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ && (defined __cplusplus \ ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \ : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L))) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 471 "/usr/include/features.h" 3 4 # define __GLIBC_USE_DEPRECATED_SCANF 1 #else # 473 "/usr/include/features.h" 3 4 # define __GLIBC_USE_DEPRECATED_SCANF 0 #endif # 475 "/usr/include/features.h" 3 4 /* ISO C23 added support for a 0b or 0B prefix on binary constants as inputs to strtol-family functions (base 0 or 2). This macro is used to condition redirection in headers to allow that redirection to be disabled when building those functions, despite _GNU_SOURCE being defined. */ #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 482 "/usr/include/features.h" 3 4 # define __GLIBC_USE_C23_STRTOL 1 #else # 484 "/usr/include/features.h" 3 4 # define __GLIBC_USE_C23_STRTOL 0 #endif # 486 "/usr/include/features.h" 3 4 /* Get definitions of __STDC_* predefined macros, if the compiler has not preincluded this header automatically. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdc-predef.h expanded by -frewrite-includes */ #include #else /* stdc-predef.h expanded by -frewrite-includes */ # 489 "/usr/include/features.h" 3 4 # 1 "/usr/include/stdc-predef.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDC_PREDEF_H #define _STDC_PREDEF_H 1 /* This header is separate from features.h so that the compiler can include it implicitly at the start of every compilation. It must not itself include or any other header that includes because the implicit include comes before any feature test macros that may be defined in a source file before it first explicitly includes a system header. GCC knows the name of this header in order to preinclude it. */ /* glibc's intent is to support the IEC 559 math functionality, real and complex. If the GCC (4.9 and later) predefined macros specifying compiler intent are available, use them to determine whether the overall intent is to support these features; otherwise, presume an older compiler has intent to support these features and define these macros by default. */ #ifdef __GCC_IEC_559 #if 0 /* disabled by -frewrite-includes */ # if __GCC_IEC_559 > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 38 "/usr/include/stdc-predef.h" 3 4 # define __STDC_IEC_559__ 1 # define __STDC_IEC_60559_BFP__ 201404L # endif # 41 "/usr/include/stdc-predef.h" 3 4 #else # 42 "/usr/include/stdc-predef.h" 3 4 # define __STDC_IEC_559__ 1 # define __STDC_IEC_60559_BFP__ 201404L #endif # 45 "/usr/include/stdc-predef.h" 3 4 #ifdef __GCC_IEC_559_COMPLEX #if 0 /* disabled by -frewrite-includes */ # if __GCC_IEC_559_COMPLEX > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/include/stdc-predef.h" 3 4 # define __STDC_IEC_559_COMPLEX__ 1 # define __STDC_IEC_60559_COMPLEX__ 201404L # endif # 51 "/usr/include/stdc-predef.h" 3 4 #else # 52 "/usr/include/stdc-predef.h" 3 4 # define __STDC_IEC_559_COMPLEX__ 1 # define __STDC_IEC_60559_COMPLEX__ 201404L #endif # 55 "/usr/include/stdc-predef.h" 3 4 /* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is synchronized with ISO/IEC 10646:2017, fifth edition, plus the following additions from Amendment 1 to the fifth edition: - 56 emoji characters - 285 hentaigana - 3 additional Zanabazar Square characters */ #define __STDC_ISO_10646__ 201706L #endif # 65 "/usr/include/stdc-predef.h" 3 4 #endif /* stdc-predef.h expanded by -frewrite-includes */ # 490 "/usr/include/features.h" 2 3 4 /* This macro indicates that the installed library is the GNU C Library. For historic reasons the value now is 6 and this will stay from now on. The use of this variable is deprecated. Use __GLIBC__ and __GLIBC_MINOR__ now (see below) when you want to test for a specific GNU C library version and use the values in to get the sonames of the shared libraries. */ #undef __GNU_LIBRARY__ #define __GNU_LIBRARY__ 6 /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #define __GLIBC__ 2 #define __GLIBC_MINOR__ 40 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) /* This is here only because every header file already includes this one. */ #ifndef __ASSEMBLER__ # ifndef _SYS_CDEFS_H #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cdefs.h expanded by -frewrite-includes */ # include #else /* cdefs.h expanded by -frewrite-includes */ # 511 "/usr/include/features.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 /* Copyright (C) 1992-2024 Free Software Foundation, Inc. Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_CDEFS_H #define _SYS_CDEFS_H 1 /* We are almost always included from features.h. */ #ifndef _FEATURES_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 24 "/usr/include/sys/cdefs.h" 3 4 # 25 "/usr/include/sys/cdefs.h" 3 4 #endif # 26 "/usr/include/sys/cdefs.h" 3 4 /* The GNU libc does not support any K&R compilers or the traditional mode of ISO C compilers anymore. Check for some of the combinations not supported anymore. */ #if 0 /* disabled by -frewrite-includes */ #if defined __GNUC__ && !defined __STDC__ && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/include/sys/cdefs.h" 3 4 # error "You need a ISO C or C++ conforming compiler to use the glibc headers" #endif # 33 "/usr/include/sys/cdefs.h" 3 4 /* Some user header file might have defined this before. */ #undef __P #undef __PMT /* Compilers that lack __has_attribute may object to #if defined __has_attribute && __has_attribute (...) even though they do not need to evaluate the right-hand side of the &&. Similarly for __has_builtin, etc. */ #if 0 /* disabled by -frewrite-includes */ #if (defined __has_attribute \ && (!defined __clang_minor__ \ || 3 < __clang_major__ + (5 <= __clang_minor__))) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 45 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_has_attribute(attr) __has_attribute (attr) #else # 47 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_has_attribute(attr) 0 #endif # 49 "/usr/include/sys/cdefs.h" 3 4 #ifdef __has_builtin # define __glibc_has_builtin(name) __has_builtin (name) #else # 52 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_has_builtin(name) 0 #endif # 54 "/usr/include/sys/cdefs.h" 3 4 #ifdef __has_extension # define __glibc_has_extension(ext) __has_extension (ext) #else # 57 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_has_extension(ext) 0 #endif # 59 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __GNUC__ || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 61 "/usr/include/sys/cdefs.h" 3 4 /* All functions, except those with callbacks or those that synchronize memory, are leaf functions. */ #if 0 /* disabled by -frewrite-includes */ # if __GNUC_PREREQ (4, 6) && !defined _LIBC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 65 "/usr/include/sys/cdefs.h" 3 4 # define __LEAF , __leaf__ # define __LEAF_ATTR __attribute__ ((__leaf__)) # else # 68 "/usr/include/sys/cdefs.h" 3 4 # define __LEAF # define __LEAF_ATTR # endif # 71 "/usr/include/sys/cdefs.h" 3 4 /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this only works with gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions as non-throwing using a function attribute since programs can use the -fexceptions options for C code as well. */ #if 0 /* disabled by -frewrite-includes */ # if !defined __cplusplus \ && (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 79 "/usr/include/sys/cdefs.h" 3 4 # define __THROW __attribute__ ((__nothrow__ __LEAF)) # define __THROWNL __attribute__ ((__nothrow__)) # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct # else # 84 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 85 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 86 "/usr/include/sys/cdefs.h" 3 4 # define __THROW noexcept (true) # else # 88 "/usr/include/sys/cdefs.h" 3 4 # define __THROW throw () # endif # 90 "/usr/include/sys/cdefs.h" 3 4 # define __THROWNL __THROW # define __NTH(fct) __LEAF_ATTR fct __THROW # define __NTHNL(fct) fct __THROW # else # 94 "/usr/include/sys/cdefs.h" 3 4 # define __THROW # define __THROWNL # define __NTH(fct) fct # define __NTHNL(fct) fct # endif # 99 "/usr/include/sys/cdefs.h" 3 4 # endif # 100 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __GNUC_PREREQ (4, 3) || __glibc_has_attribute (__cold__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 102 "/usr/include/sys/cdefs.h" 3 4 # define __COLD __attribute__ ((__cold__)) # else # 104 "/usr/include/sys/cdefs.h" 3 4 # define __COLD # endif # 106 "/usr/include/sys/cdefs.h" 3 4 #else /* Not GCC or clang. */ # 108 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if (defined __cplusplus \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/include/sys/cdefs.h" 3 4 # define __inline inline # else # 113 "/usr/include/sys/cdefs.h" 3 4 # define __inline /* No inline functions. */ # endif # 115 "/usr/include/sys/cdefs.h" 3 4 # define __THROW # define __THROWNL # define __NTH(fct) fct # define __COLD #endif /* GCC || clang. */ # 122 "/usr/include/sys/cdefs.h" 3 4 /* These two macros are not used in glibc anymore. They are kept here only because some other projects expect the macros to be defined. */ #define __P(args) args #define __PMT(args) args /* For these things, GCC behaves the ANSI way normally, and the non-ANSI way under -traditional. */ #define __CONCAT(x,y) x ## y #define __STRING(x) #x /* This is not a typedef so `const __ptr_t' does the right thing. */ #define __ptr_t void * /* C++ needs to know that types and declarations are C, not C++. */ #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # 143 "/usr/include/sys/cdefs.h" 3 4 # define __BEGIN_DECLS # define __END_DECLS #endif # 146 "/usr/include/sys/cdefs.h" 3 4 /* The overloadable attribute was added on clang 2.6. */ #if 0 /* disabled by -frewrite-includes */ #if defined __clang_major__ \ && (__clang_major__ + (__clang_minor__ >= 6) > 2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 151 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_overloadable__ __attribute__((__overloadable__)) #else # 153 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_overloadable__ #endif # 155 "/usr/include/sys/cdefs.h" 3 4 /* Fortify support. */ #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) /* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */ #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \ || __GNUC_PREREQ (12, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 163 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0) # define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1) #else # 166 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_objsize0(__o) __bos0 (__o) # define __glibc_objsize(__o) __bos (__o) #endif # 169 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 171 "/usr/include/sys/cdefs.h" 3 4 /* Compile time conditions to choose between the regular, _chk and _chk_warn variants. These conditions should get evaluated to constant and optimized away. */ #define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s)) #define __glibc_unsigned_or_positive(__l) \ ((__typeof (__l)) 0 < (__typeof (__l)) -1 \ || (__builtin_constant_p (__l) && (__l) > 0)) /* Length is known to be safe at compile time if the __L * __S <= __OBJSZ condition can be folded to a constant and if it is true, or unknown (-1) */ #define __glibc_safe_or_unknown_len(__l, __s, __osz) \ ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1) \ || (__glibc_unsigned_or_positive (__l) \ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ (__s), (__osz))) \ && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz)))) /* Conversely, we know at compile time that the length is unsafe if the __L * __S <= __OBJSZ condition can be folded to a constant and if it is false. */ #define __glibc_unsafe_len(__l, __s, __osz) \ (__glibc_unsigned_or_positive (__l) \ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ __s, __osz)) \ && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) /* To correctly instrument the fortify wrapper clang requires the pass_object_size attribute, and the attribute has the restriction that the argument needs to be 'const'. Furthermore, to make it usable with C interfaces, clang provides the overload attribute, which provides a C++ like function overload support. The overloaded fortify wrapper with the pass_object_size attribute has precedence over the default symbol. Also, clang does not support __va_arg_pack, so variadic functions are expanded to issue va_arg implementations. The error function must not have bodies (address takes are expanded to nonfortified calls), and with __fortify_function compiler might still create a body with the C++ mangling name (due to the overload attribute). In this case, the function is defined with __fortify_function_error_function macro instead. The argument size check is also done with a clang-only attribute, __attribute__ ((__diagnose_if__ (...))), different than gcc which calls symbol_chk_warn alias with uses __warnattr attribute. The pass_object_size was added on clang 4.0, __diagnose_if__ on 5.0, and pass_dynamic_object_size on 9.0. */ #if 0 /* disabled by -frewrite-includes */ #if defined __clang_major__ && __clang_major__ >= 5 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 219 "/usr/include/sys/cdefs.h" 3 4 # define __fortify_use_clang 1 # define __fortify_function_error_function static __attribute__((__unused__)) # define __fortify_clang_pass_object_size_n(n) \ __attribute__ ((__pass_object_size__ (n))) # define __fortify_clang_pass_object_size0 \ __fortify_clang_pass_object_size_n (0) # define __fortify_clang_pass_object_size \ __fortify_clang_pass_object_size_n (__USE_FORTIFY_LEVEL > 1) #if 0 /* disabled by -frewrite-includes */ # if __clang_major__ >= 9 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 231 "/usr/include/sys/cdefs.h" 3 4 # define __fortify_clang_pass_dynamic_object_size_n(n) \ __attribute__ ((__pass_dynamic_object_size__ (n))) # define __fortify_clang_pass_dynamic_object_size0 \ __fortify_clang_pass_dynamic_object_size_n (0) # define __fortify_clang_pass_dynamic_object_size \ __fortify_clang_pass_dynamic_object_size_n (1) # else # 238 "/usr/include/sys/cdefs.h" 3 4 # define __fortify_clang_pass_dynamic_object_size_n(n) # define __fortify_clang_pass_dynamic_object_size0 # define __fortify_clang_pass_dynamic_object_size # endif # 242 "/usr/include/sys/cdefs.h" 3 4 # define __fortify_clang_bos_static_lt_impl(bos_val, n, s) \ ((bos_val) != -1ULL && (n) > (bos_val) / (s)) # define __fortify_clang_bos_static_lt2(__n, __e, __s) \ __fortify_clang_bos_static_lt_impl (__bos (__e), __n, __s) # define __fortify_clang_bos_static_lt(__n, __e) \ __fortify_clang_bos_static_lt2 (__n, __e, 1) # define __fortify_clang_bos0_static_lt2(__n, __e, __s) \ __fortify_clang_bos_static_lt_impl (__bos0 (__e), __n, __s) # define __fortify_clang_bos0_static_lt(__n, __e) \ __fortify_clang_bos0_static_lt2 (__n, __e, 1) # define __fortify_clang_bosn_args(bos_fn, n, buf, div, complaint) \ (__fortify_clang_bos_static_lt_impl (bos_fn (buf), n, div)), (complaint), \ "warning" # define __fortify_clang_warning(__c, __msg) \ __attribute__ ((__diagnose_if__ ((__c), (__msg), "warning"))) # define __fortify_clang_error(__c, __msg) \ __attribute__ ((__diagnose_if__ ((__c), (__msg), "error"))) # define __fortify_clang_warning_only_if_bos0_lt(n, buf, complaint) \ __attribute__ ((__diagnose_if__ \ (__fortify_clang_bosn_args (__bos0, n, buf, 1, complaint)))) # define __fortify_clang_warning_only_if_bos0_lt2(n, buf, div, complaint) \ __attribute__ ((__diagnose_if__ \ (__fortify_clang_bosn_args (__bos0, n, buf, div, complaint)))) # define __fortify_clang_warning_only_if_bos_lt(n, buf, complaint) \ __attribute__ ((__diagnose_if__ \ (__fortify_clang_bosn_args (__bos, n, buf, 1, complaint)))) # define __fortify_clang_warning_only_if_bos_lt2(n, buf, div, complaint) \ __attribute__ ((__diagnose_if__ \ (__fortify_clang_bosn_args (__bos, n, buf, div, complaint)))) # define __fortify_clang_prefer_this_overload \ __attribute__ ((enable_if (1, ""))) # define __fortify_clang_unavailable(__msg) \ __attribute__ ((unavailable(__msg))) #if 0 /* disabled by -frewrite-includes */ # if __USE_FORTIFY_LEVEL == 3 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 281 "/usr/include/sys/cdefs.h" 3 4 # define __fortify_clang_overload_arg(__type, __attr, __name) \ __type __attr const __fortify_clang_pass_dynamic_object_size __name # define __fortify_clang_overload_arg0(__type, __attr, __name) \ __type __attr const __fortify_clang_pass_dynamic_object_size0 __name # else # 286 "/usr/include/sys/cdefs.h" 3 4 # define __fortify_clang_overload_arg(__type, __attr, __name) \ __type __attr const __fortify_clang_pass_object_size __name # define __fortify_clang_overload_arg0(__type, __attr, __name) \ __type __attr const __fortify_clang_pass_object_size0 __name # endif # 291 "/usr/include/sys/cdefs.h" 3 4 # define __fortify_clang_mul_may_overflow(size, n) \ ((size | n) >= (((size_t)1) << (8 * sizeof (size_t) / 2))) # define __fortify_clang_size_too_small(__bos, __dest, __len) \ (__bos (__dest) != (size_t) -1 && __bos (__dest) < __len) # define __fortify_clang_warn_if_src_too_large(__dest, __src) \ __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize, \ __dest, \ __builtin_strlen (__src) + 1), \ "destination buffer will always be overflown by source") # define __fortify_clang_warn_if_dest_too_small(__dest, __len) \ __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize, \ __dest, \ __len), \ "function called with bigger length than the destination buffer") # define __fortify_clang_warn_if_dest_too_small0(__dest, __len) \ __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize0, \ __dest, \ __len), \ "function called with bigger length than the destination buffer") #else # 313 "/usr/include/sys/cdefs.h" 3 4 # define __fortify_use_clang 0 # define __fortify_clang_warning(__c, __msg) # define __fortify_clang_warning_only_if_bos0_lt(__n, __buf, __complaint) # define __fortify_clang_warning_only_if_bos0_lt2(__n, __buf, __div, complaint) # define __fortify_clang_warning_only_if_bos_lt(__n, __buf, __complaint) # define __fortify_clang_warning_only_if_bos_lt2(__n, __buf, div, __complaint) # define __fortify_clang_overload_arg(__type, __attr, __name) \ __type __attr __name # define __fortify_clang_overload_arg0(__type, __attr, __name) \ __fortify_clang_overload_arg (__type, __attr, __name) # define __fortify_clang_warn_if_src_too_large(__dest, __src) # define __fortify_clang_warn_if_dest_too_small(__dest, __len) # define __fortify_clang_warn_if_dest_too_small0(__dest, __len) #endif # 327 "/usr/include/sys/cdefs.h" 3 4 /* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be declared. */ #if 0 /* disabled by -frewrite-includes */ #if !__fortify_use_clang #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 333 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_fortify(f, __l, __s, __osz, ...) \ (__glibc_safe_or_unknown_len (__l, __s, __osz) \ ? __ ## f ## _alias (__VA_ARGS__) \ : (__glibc_unsafe_len (__l, __s, __osz) \ ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \ : __ ## f ## _chk (__VA_ARGS__, __osz))) #else # 340 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_fortify(f, __l, __s, __osz, ...) \ (__osz == (__SIZE_TYPE__) -1) \ ? __ ## f ## _alias (__VA_ARGS__) \ : __ ## f ## _chk (__VA_ARGS__, __osz) #endif # 345 "/usr/include/sys/cdefs.h" 3 4 /* Fortify function f, where object size argument passed to f is the number of elements and not total size. */ #if 0 /* disabled by -frewrite-includes */ #if !__fortify_use_clang #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 350 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_fortify_n(f, __l, __s, __osz, ...) \ (__glibc_safe_or_unknown_len (__l, __s, __osz) \ ? __ ## f ## _alias (__VA_ARGS__) \ : (__glibc_unsafe_len (__l, __s, __osz) \ ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \ : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) # else # 357 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_fortify_n(f, __l, __s, __osz, ...) \ (__osz == (__SIZE_TYPE__) -1) \ ? __ ## f ## _alias (__VA_ARGS__) \ : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)) #endif # 362 "/usr/include/sys/cdefs.h" 3 4 #endif /* __USE_FORTIFY_LEVEL > 0 */ # 364 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 366 "/usr/include/sys/cdefs.h" 3 4 # define __warnattr(msg) __attribute__((__warning__ (msg))) # define __errordecl(name, msg) \ extern void name (void) __attribute__((__error__ (msg))) #else # 370 "/usr/include/sys/cdefs.h" 3 4 # define __warnattr(msg) # define __errordecl(name, msg) extern void name (void) #endif # 373 "/usr/include/sys/cdefs.h" 3 4 /* Support for flexible arrays. Headers that should use flexible arrays only if they're "real" (e.g. only if they won't affect sizeof()) should test #if __glibc_c99_flexarr_available. */ #if 0 /* disabled by -frewrite-includes */ #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 379 "/usr/include/sys/cdefs.h" 3 4 # define __flexarr [] # define __glibc_c99_flexarr_available 1 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __GNUC_PREREQ (2,97) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 382 "/usr/include/sys/cdefs.h" 3 4 /* GCC 2.97 and clang support C99 flexible array members as an extension, even when in C89 mode or compiling C++ (any version). */ # define __flexarr [] # define __glibc_c99_flexarr_available 1 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined __GNUC__ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 387 "/usr/include/sys/cdefs.h" 3 4 /* Pre-2.97 GCC did not support C99 flexible arrays but did have an equivalent extension with slightly different notation. */ # define __flexarr [0] # define __glibc_c99_flexarr_available 1 #else # 392 "/usr/include/sys/cdefs.h" 3 4 /* Some other non-C99 compiler. Approximate with [1]. */ # define __flexarr [1] # define __glibc_c99_flexarr_available 0 #endif # 396 "/usr/include/sys/cdefs.h" 3 4 /* __asm__ ("xyz") is used throughout the headers to rename functions at the assembly language level. This is wrapped by the __REDIRECT macro, in order to support compilers that can do this some other way. When compilers don't support asm-names at all, we have to do preprocessor tricks instead (which don't have exactly the right semantics, but it's the best we can do). Example: int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ #if 0 /* disabled by -frewrite-includes */ #if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 409 "/usr/include/sys/cdefs.h" 3 4 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) # ifdef __cplusplus # define __REDIRECT_NTH(name, proto, alias) \ name proto __THROW __asm__ (__ASMNAME (#alias)) # define __REDIRECT_NTHNL(name, proto, alias) \ name proto __THROWNL __asm__ (__ASMNAME (#alias)) # else # 417 "/usr/include/sys/cdefs.h" 3 4 # define __REDIRECT_NTH(name, proto, alias) \ name proto __asm__ (__ASMNAME (#alias)) __THROW # define __REDIRECT_NTHNL(name, proto, alias) \ name proto __asm__ (__ASMNAME (#alias)) __THROWNL # endif # 422 "/usr/include/sys/cdefs.h" 3 4 # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) # define __ASMNAME2(prefix, cname) __STRING (prefix) cname #ifndef __REDIRECT_FORTIFY #define __REDIRECT_FORTIFY __REDIRECT #endif # 428 "/usr/include/sys/cdefs.h" 3 4 #ifndef __REDIRECT_FORTIFY_NTH #define __REDIRECT_FORTIFY_NTH __REDIRECT_NTH #endif # 432 "/usr/include/sys/cdefs.h" 3 4 /* #elif __SOME_OTHER_COMPILER__ # define __REDIRECT(name, proto, alias) name proto; \ _Pragma("let " #name " = " #alias) */ #endif # 440 "/usr/include/sys/cdefs.h" 3 4 /* GCC and clang have various useful declarations that can be made with the '__attribute__' syntax. All of the ways we use this do fine if they are omitted for compilers that don't understand it. */ #if 0 /* disabled by -frewrite-includes */ #if !(defined __GNUC__ || defined __clang__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 445 "/usr/include/sys/cdefs.h" 3 4 # define __attribute__(xyz) /* Ignore */ #endif # 447 "/usr/include/sys/cdefs.h" 3 4 /* At some point during the gcc 2.96 development the `malloc' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__malloc__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 452 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_malloc__ __attribute__ ((__malloc__)) #else # 454 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_malloc__ /* Ignore */ #endif # 456 "/usr/include/sys/cdefs.h" 3 4 /* Tell the compiler which arguments to an allocation function indicate the size of the allocation. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 460 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_alloc_size__(params) \ __attribute__ ((__alloc_size__ params)) #else # 463 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_alloc_size__(params) /* Ignore. */ #endif # 465 "/usr/include/sys/cdefs.h" 3 4 /* Tell the compiler which argument to an allocation function indicates the alignment of the allocation. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__alloc_align__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 469 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_alloc_align__(param) \ __attribute__ ((__alloc_align__ param)) #else # 472 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_alloc_align__(param) /* Ignore. */ #endif # 474 "/usr/include/sys/cdefs.h" 3 4 /* At some point during the gcc 2.96 development the `pure' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__pure__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 479 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_pure__ __attribute__ ((__pure__)) #else # 481 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_pure__ /* Ignore */ #endif # 483 "/usr/include/sys/cdefs.h" 3 4 /* This declaration tells the compiler that the value is constant. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 486 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_const__ __attribute__ ((__const__)) #else # 488 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_const__ /* Ignore */ #endif # 490 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 492 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_maybe_unused__ __attribute__ ((__unused__)) #else # 494 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_maybe_unused__ /* Ignore */ #endif # 496 "/usr/include/sys/cdefs.h" 3 4 /* At some point during the gcc 3.1 development the `used' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 501 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_used__ __attribute__ ((__used__)) # define __attribute_noinline__ __attribute__ ((__noinline__)) #else # 504 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_used__ __attribute__ ((__unused__)) # define __attribute_noinline__ /* Ignore */ #endif # 507 "/usr/include/sys/cdefs.h" 3 4 /* Since version 3.2, gcc allows marking deprecated functions. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 510 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_deprecated__ __attribute__ ((__deprecated__)) #else # 512 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_deprecated__ /* Ignore */ #endif # 514 "/usr/include/sys/cdefs.h" 3 4 /* Since version 4.5, gcc also allows one to specify the message printed when a deprecated function is used. clang claims to be gcc 4.2, but may also support this feature. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,5) \ || __glibc_has_extension (__attribute_deprecated_with_message__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 520 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_deprecated_msg__(msg) \ __attribute__ ((__deprecated__ (msg))) #else # 523 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_deprecated_msg__(msg) __attribute_deprecated__ #endif # 525 "/usr/include/sys/cdefs.h" 3 4 /* At some point during the gcc 2.8 development the `format_arg' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. If several `format_arg' attributes are given for the same function, in gcc-3.0 and older, all but the last one are ignored. In newer gccs, all designated arguments are considered. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 533 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) #else # 535 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_format_arg__(x) /* Ignore */ #endif # 537 "/usr/include/sys/cdefs.h" 3 4 /* At some point during the gcc 2.97 development the `strfmon' format attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 543 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_format_strfmon__(a,b) \ __attribute__ ((__format__ (__strfmon__, a, b))) #else # 546 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_format_strfmon__(a,b) /* Ignore */ #endif # 548 "/usr/include/sys/cdefs.h" 3 4 /* The nonnull function attribute marks pointer parameters that must not be NULL. This has the name __nonnull in glibc, and __attribute_nonnull__ in files shared with Gnulib to avoid collision with a different __nonnull in DragonFlyBSD 5.9. */ #ifndef __attribute_nonnull__ #if 0 /* disabled by -frewrite-includes */ # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 555 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params)) # else # 557 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_nonnull__(params) # endif # 559 "/usr/include/sys/cdefs.h" 3 4 #endif # 560 "/usr/include/sys/cdefs.h" 3 4 #ifndef __nonnull # define __nonnull(params) __attribute_nonnull__ (params) #endif # 563 "/usr/include/sys/cdefs.h" 3 4 /* The returns_nonnull function attribute marks the return type of the function as always being non-null. */ #ifndef __returns_nonnull #if 0 /* disabled by -frewrite-includes */ # if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__returns_nonnull__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 568 "/usr/include/sys/cdefs.h" 3 4 # define __returns_nonnull __attribute__ ((__returns_nonnull__)) # else # 570 "/usr/include/sys/cdefs.h" 3 4 # define __returns_nonnull # endif # 572 "/usr/include/sys/cdefs.h" 3 4 #endif # 573 "/usr/include/sys/cdefs.h" 3 4 /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 577 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #if 0 /* disabled by -frewrite-includes */ # if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 580 "/usr/include/sys/cdefs.h" 3 4 # define __wur __attribute_warn_unused_result__ # endif # 582 "/usr/include/sys/cdefs.h" 3 4 #else # 583 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_warn_unused_result__ /* empty */ #endif # 585 "/usr/include/sys/cdefs.h" 3 4 #ifndef __wur # define __wur /* Ignore */ #endif # 588 "/usr/include/sys/cdefs.h" 3 4 /* Forces a function to be always inlined. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 591 "/usr/include/sys/cdefs.h" 3 4 /* The Linux kernel defines __always_inline in stddef.h (283d7573), and it conflicts with this definition. Therefore undefine it first to allow either header to be included first. */ # undef __always_inline # define __always_inline __inline __attribute__ ((__always_inline__)) #else # 597 "/usr/include/sys/cdefs.h" 3 4 # undef __always_inline # define __always_inline __inline #endif # 600 "/usr/include/sys/cdefs.h" 3 4 /* Associate error messages with the source location of the call site rather than with the source location inside the function. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 604 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_artificial__ __attribute__ ((__artificial__)) #else # 606 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_artificial__ /* Ignore */ #endif # 608 "/usr/include/sys/cdefs.h" 3 4 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions older than 4.3 may define these macros and still not guarantee GNU inlining semantics. clang++ identifies itself as gcc-4.2, but has support for GNU inlining semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and __GNUC_GNU_INLINE__ macro definitions. */ #if 0 /* disabled by -frewrite-includes */ #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ || defined __GNUC_GNU_INLINE__))) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 621 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __GNUC_STDC_INLINE__ || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 622 "/usr/include/sys/cdefs.h" 3 4 # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) # define __extern_always_inline \ extern __always_inline __attribute__ ((__gnu_inline__)) # else # 626 "/usr/include/sys/cdefs.h" 3 4 # define __extern_inline extern __inline # define __extern_always_inline extern __always_inline # endif # 629 "/usr/include/sys/cdefs.h" 3 4 #endif # 630 "/usr/include/sys/cdefs.h" 3 4 #ifdef __extern_always_inline # define __fortify_function __extern_always_inline __attribute_artificial__ #endif # 634 "/usr/include/sys/cdefs.h" 3 4 /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,3) && !defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 638 "/usr/include/sys/cdefs.h" 3 4 # define __va_arg_pack() __builtin_va_arg_pack () # define __va_arg_pack_len() __builtin_va_arg_pack_len () #endif # 641 "/usr/include/sys/cdefs.h" 3 4 /* It is possible to compile containing GCC extensions even if GCC is run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before version 2.8. */ #if 0 /* disabled by -frewrite-includes */ #if !(__GNUC_PREREQ (2,8) || defined __clang__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 647 "/usr/include/sys/cdefs.h" 3 4 # define __extension__ /* Ignore */ #endif # 649 "/usr/include/sys/cdefs.h" 3 4 /* __restrict is known in EGCS 1.2 and above, and in clang. It works also in C++ mode (outside of arrays), but only when spelled as '__restrict', not 'restrict'. */ #if 0 /* disabled by -frewrite-includes */ #if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 654 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 655 "/usr/include/sys/cdefs.h" 3 4 # define __restrict restrict # else # 657 "/usr/include/sys/cdefs.h" 3 4 # define __restrict /* Ignore */ # endif # 659 "/usr/include/sys/cdefs.h" 3 4 #endif # 660 "/usr/include/sys/cdefs.h" 3 4 /* ISO C99 also allows to declare arrays as non-overlapping. The syntax is array_name[restrict] GCC 3.1 and clang support this. This syntax is not usable in C++ mode. */ #if 0 /* disabled by -frewrite-includes */ #if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 666 "/usr/include/sys/cdefs.h" 3 4 # define __restrict_arr __restrict #else # 668 "/usr/include/sys/cdefs.h" 3 4 # ifdef __GNUC__ # define __restrict_arr /* Not supported in old GCC. */ # else # 671 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 672 "/usr/include/sys/cdefs.h" 3 4 # define __restrict_arr restrict # else # 674 "/usr/include/sys/cdefs.h" 3 4 /* Some other non-C99 compiler. */ # define __restrict_arr /* Not supported. */ # endif # 677 "/usr/include/sys/cdefs.h" 3 4 # endif # 678 "/usr/include/sys/cdefs.h" 3 4 #endif # 679 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 681 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # define __glibc_likely(cond) __builtin_expect ((cond), 1) #else # 684 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_unlikely(cond) (cond) # define __glibc_likely(cond) (cond) #endif # 687 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (!defined _Noreturn \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && !(__GNUC_PREREQ (4,7) \ || (3 < __clang_major__ + (5 <= __clang_minor__)))) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 692 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __GNUC_PREREQ (2,8) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 693 "/usr/include/sys/cdefs.h" 3 4 # define _Noreturn __attribute__ ((__noreturn__)) # else # 695 "/usr/include/sys/cdefs.h" 3 4 # define _Noreturn # endif # 697 "/usr/include/sys/cdefs.h" 3 4 #endif # 698 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (8, 0) && !defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 700 "/usr/include/sys/cdefs.h" 3 4 /* Describes a char array whose address can safely be passed as the first argument to strncpy and strncat, as the char array is not necessarily a NUL-terminated string. */ # define __attribute_nonstring__ __attribute__ ((__nonstring__)) #else # 705 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_nonstring__ #endif # 707 "/usr/include/sys/cdefs.h" 3 4 /* Undefine (also defined in libc-symbols.h). */ #undef __attribute_copy__ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (9, 0) && !defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 711 "/usr/include/sys/cdefs.h" 3 4 /* Copies attributes from the declaration or type referenced by the argument. */ # define __attribute_copy__(arg) __attribute__ ((__copy__ (arg))) #else # 715 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_copy__(arg) #endif # 717 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (!defined _Static_assert && !defined __cplusplus \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \ || defined __STRICT_ANSI__)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 722 "/usr/include/sys/cdefs.h" 3 4 # define _Static_assert(expr, diagnostic) \ extern int (*__Static_assert_function (void)) \ [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] #endif # 726 "/usr/include/sys/cdefs.h" 3 4 /* Gnulib avoids including these, as they don't work on non-glibc or older glibc platforms. */ #ifndef __GNULIB_CDEFS #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wordsize.h expanded by -frewrite-includes */ # include #else /* wordsize.h expanded by -frewrite-includes */ # 730 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE_TIME64_COMPAT32 1 #ifdef __x86_64__ /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #endif # 17 "/usr/include/bits/wordsize.h" 3 4 #endif /* wordsize.h expanded by -frewrite-includes */ # 731 "/usr/include/sys/cdefs.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* long-double.h expanded by -frewrite-includes */ # include #else /* long-double.h expanded by -frewrite-includes */ # 731 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/long-double.h" 1 3 4 /* Properties of long double type. ldbl-96 version. Copyright (C) 2016-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* long double is distinct from double, so there is nothing to define here. */ #define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 #endif /* long-double.h expanded by -frewrite-includes */ # 732 "/usr/include/sys/cdefs.h" 2 3 4 #endif # 733 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 735 "/usr/include/sys/cdefs.h" 3 4 # ifdef __REDIRECT /* Alias name defined automatically. */ # define __LDBL_REDIR(name, proto) ... unused__ldbl_redir # define __LDBL_REDIR_DECL(name) \ extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128")); # define __REDIRECT_LDBL(name, proto, alias) \ name proto __asm (__ASMNAME ("__" #alias "ieee128")) /* Alias name defined automatically, with leading underscores. */ # define __LDBL_REDIR2_DECL(name) \ extern __typeof (__##name) __##name \ __asm (__ASMNAME ("__" #name "ieee128")); /* Alias name defined manually. */ # define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1 # define __LDBL_REDIR1_DECL(name, alias) \ extern __typeof (name) name __asm (__ASMNAME (#alias)); # define __LDBL_REDIR1_NTH(name, proto, alias) \ __REDIRECT_NTH (name, proto, alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128) /* Unused. */ # define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth # else # 763 "/usr/include/sys/cdefs.h" 3 4 _Static_assert (0, "IEEE 128-bits long double requires redirection on this platform"); # endif # 765 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 766 "/usr/include/sys/cdefs.h" 3 4 # define __LDBL_COMPAT 1 # ifdef __REDIRECT # define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) # define __LDBL_REDIR(name, proto) \ __LDBL_REDIR1 (name, proto, __nldbl_##name) # define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) # define __LDBL_REDIR_NTH(name, proto) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##name) # define __LDBL_REDIR2_DECL(name) \ extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name)); # define __LDBL_REDIR1_DECL(name, alias) \ extern __typeof (name) name __asm (__ASMNAME (#alias)); # define __LDBL_REDIR_DECL(name) \ extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name)); # define __REDIRECT_LDBL(name, proto, alias) \ __LDBL_REDIR1 (name, proto, __nldbl_##alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) # endif # 785 "/usr/include/sys/cdefs.h" 3 4 #endif # 786 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \ || !defined __REDIRECT #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 788 "/usr/include/sys/cdefs.h" 3 4 # define __LDBL_REDIR1(name, proto, alias) name proto # define __LDBL_REDIR(name, proto) name proto # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW # define __LDBL_REDIR_NTH(name, proto) name proto __THROW # define __LDBL_REDIR2_DECL(name) # define __LDBL_REDIR_DECL(name) # ifdef __REDIRECT # define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __REDIRECT_NTH (name, proto, alias) # endif # 799 "/usr/include/sys/cdefs.h" 3 4 #endif # 800 "/usr/include/sys/cdefs.h" 3 4 /* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is intended for use in preprocessor macros. Note: MESSAGE must be a _single_ string; concatenation of string literals is not supported. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 807 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_macro_warning1(message) _Pragma (#message) # define __glibc_macro_warning(message) \ __glibc_macro_warning1 (GCC warning message) #else # 811 "/usr/include/sys/cdefs.h" 3 4 # define __glibc_macro_warning(msg) #endif # 813 "/usr/include/sys/cdefs.h" 3 4 /* Generic selection (ISO C11) is a C-only feature, available in GCC since version 4.9. Previous versions do not provide generic selection, even though they might set __STDC_VERSION__ to 201112L, when in -std=c11 mode. Thus, we must check for !defined __GNUC__ when testing __STDC_VERSION__ for generic selection support. On the other hand, Clang also defines __GNUC__, so a clang-specific check is required to enable the use of generic selection. */ #if 0 /* disabled by -frewrite-includes */ #if !defined __cplusplus \ && (__GNUC_PREREQ (4, 9) \ || __glibc_has_extension (c_generic_selections) \ || (!defined __GNUC__ && defined __STDC_VERSION__ \ && __STDC_VERSION__ >= 201112L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 826 "/usr/include/sys/cdefs.h" 3 4 # define __HAVE_GENERIC_SELECTION 1 #else # 828 "/usr/include/sys/cdefs.h" 3 4 # define __HAVE_GENERIC_SELECTION 0 #endif # 830 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (10, 0) && !defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 832 "/usr/include/sys/cdefs.h" 3 4 /* Designates a 1-based positional argument ref-index of pointer type that can be used to access size-index elements of the pointed-to array according to access mode, or at least one element when size-index is not provided: access (access-mode, [, ]) */ # define __attr_access(x) __attribute__ ((__access__ x)) /* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may use the access attribute to get object sizes from function definition arguments, so we can't use them on functions we fortify. Drop the access attribute for such functions. */ #if 0 /* disabled by -frewrite-includes */ # if __USE_FORTIFY_LEVEL == 3 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 843 "/usr/include/sys/cdefs.h" 3 4 # define __fortified_attr_access(a, o, s) # else # 845 "/usr/include/sys/cdefs.h" 3 4 # define __fortified_attr_access(a, o, s) __attr_access ((a, o, s)) # endif # 847 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __GNUC_PREREQ (11, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 848 "/usr/include/sys/cdefs.h" 3 4 # define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno))) # else # 850 "/usr/include/sys/cdefs.h" 3 4 # define __attr_access_none(argno) # endif # 852 "/usr/include/sys/cdefs.h" 3 4 #else # 853 "/usr/include/sys/cdefs.h" 3 4 # define __fortified_attr_access(a, o, s) # define __attr_access(x) # define __attr_access_none(argno) #endif # 857 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (11, 0) && !defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 859 "/usr/include/sys/cdefs.h" 3 4 /* Designates dealloc as a function to call to deallocate objects allocated by the declared function. */ # define __attr_dealloc(dealloc, argno) \ __attribute__ ((__malloc__ (dealloc, argno))) # define __attr_dealloc_free __attr_dealloc (__builtin_free, 1) #else # 865 "/usr/include/sys/cdefs.h" 3 4 # define __attr_dealloc(dealloc, argno) # define __attr_dealloc_free #endif # 868 "/usr/include/sys/cdefs.h" 3 4 /* Specify that a function such as setjmp or vfork may return twice. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 1) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 872 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_returns_twice__ __attribute__ ((__returns_twice__)) #else # 874 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_returns_twice__ /* Ignore. */ #endif # 876 "/usr/include/sys/cdefs.h" 3 4 /* Mark struct types as aliasable. Restricted to compilers that support forward declarations of structs in the presence of the attribute. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (7, 1) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 881 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_struct_may_alias__ __attribute__ ((__may_alias__)) #else # 883 "/usr/include/sys/cdefs.h" 3 4 # define __attribute_struct_may_alias__ #endif # 885 "/usr/include/sys/cdefs.h" 3 4 #endif /* sys/cdefs.h */ # 887 "/usr/include/sys/cdefs.h" 3 4 #endif /* cdefs.h expanded by -frewrite-includes */ # 512 "/usr/include/features.h" 2 3 4 # endif # 513 "/usr/include/features.h" 3 4 /* If we don't have __REDIRECT, prototypes will be missing if __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ #if 0 /* disabled by -frewrite-includes */ # if defined __USE_FILE_OFFSET64 && !defined __REDIRECT #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 517 "/usr/include/features.h" 3 4 # define __USE_LARGEFILE 1 # define __USE_LARGEFILE64 1 # endif # 520 "/usr/include/features.h" 3 4 #endif /* !ASSEMBLER */ # 522 "/usr/include/features.h" 3 4 /* Decide whether we can define 'extern inline' functions in headers. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \ && defined __extern_inline #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 527 "/usr/include/features.h" 3 4 # define __USE_EXTERN_INLINES 1 #endif # 529 "/usr/include/features.h" 3 4 /* This is here only because every header file already includes this one. Get the definitions of all the appropriate `__stub_FUNCTION' symbols. contains `#define __stub_FUNCTION' when FUNCTION is a stub that will always return failure (and set errno to ENOSYS). */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stubs.h expanded by -frewrite-includes */ #include #else /* stubs.h expanded by -frewrite-includes */ # 535 "/usr/include/features.h" 3 4 # 1 "/usr/include/gnu/stubs.h" 1 3 4 /* This file is automatically generated. This file selects the right generated file of `__stub_FUNCTION' macros based on the architecture being compiled for. */ #if 0 /* disabled by -frewrite-includes */ #if !defined __x86_64__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 7 "/usr/include/gnu/stubs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 7 "/usr/include/gnu/stubs.h" 3 4 # 8 "/usr/include/gnu/stubs.h" 3 4 #endif # 9 "/usr/include/gnu/stubs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __LP64__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 10 "/usr/include/gnu/stubs.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stubs-64.h expanded by -frewrite-includes */ # include #else /* stubs-64.h expanded by -frewrite-includes */ # 10 "/usr/include/gnu/stubs.h" 3 4 # 1 "/usr/include/gnu/stubs-64.h" 1 3 4 /* This file is automatically generated. It defines a symbol `__stub_FUNCTION' for each function in the C library which is a stub, meaning it will fail every time called, usually setting errno to ENOSYS. */ #ifdef _LIBC #error Applications may not define the macro _LIBC #endif # 9 "/usr/include/gnu/stubs-64.h" 3 4 #define __stub___compat_bdflush #define __stub_chflags #define __stub_fchflags #define __stub_gtty #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn #define __stub_stty #endif /* stubs-64.h expanded by -frewrite-includes */ # 11 "/usr/include/gnu/stubs.h" 2 3 4 #endif # 12 "/usr/include/gnu/stubs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 13 "/usr/include/gnu/stubs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 13 "/usr/include/gnu/stubs.h" 3 4 # 14 "/usr/include/gnu/stubs.h" 3 4 #endif # 15 "/usr/include/gnu/stubs.h" 3 4 #endif /* stubs.h expanded by -frewrite-includes */ # 536 "/usr/include/features.h" 2 3 4 #endif /* features.h */ # 539 "/usr/include/features.h" 3 4 #endif /* features.h expanded by -frewrite-includes */ # 34 "/usr/include/bits/libc-header-start.h" 2 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ #undef __GLIBC_USE_LIB_EXT2 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 40 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 1 #else # 42 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 0 #endif # 44 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. Most but not all symbols enabled by that macro in TS 18661-1 are enabled unconditionally in C23. In C23, the symbols in Annex F still require a new feature test macro __STDC_WANT_IEC_60559_EXT__ instead (C23 does not define __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS 18661-1 are not included in C23 (and thus should depend on __STDC_WANT_IEC_60559_BFP_EXT__ even when C23 features are enabled). __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS 18661-1 not included in C23. __GLIBC_USE (IEC_60559_BFP_EXT_C23) controls those features from TS 18661-1 that are also included in C23 (with no feature test macro required in C23). __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1 that are included in C23 but conditional on __STDC_WANT_IEC_60559_EXT__. (There are currently no features conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS 18661-1.) */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # 71 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif # 73 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_BFP_EXT_C23 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C23 1 #else # 77 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C23 0 #endif # 79 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_EXT #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_EXT 1 #else # 83 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_EXT 0 #endif # 85 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction functions, the symbols from this TS are enabled unconditionally in C23. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 92 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # 94 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif # 96 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 98 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 1 #else # 100 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 0 #endif # 102 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_TYPES_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 107 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # 109 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 #endif # 111 "/usr/include/bits/libc-header-start.h" 3 4 #endif /* libc-header-start.h expanded by -frewrite-includes */ # 27 "/usr/include/stdlib.h" 2 3 4 /* Get size_t, wchar_t and NULL from . */ #define __need_size_t #define __need_wchar_t #define __need_NULL #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */ #include #else /* stddef.h expanded by -frewrite-includes */ # 32 "/usr/include/stdlib.h" 3 4 # 1 "/usr/lib/clang/20/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stddef.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__MVS__) && __has_include_next() #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t #undef __need_wchar_t #undef __need_NULL #undef __need_nullptr_t #undef __need_unreachable #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/lib/clang/20/include/stddef.h" 3 4 # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 # 35 "/usr/lib/clang/20/include/stddef.h" 3 4 #else # 37 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_rsize_t) && !defined(__need_wchar_t) && \ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 43 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_rsize_t #endif # 50 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_wchar_t #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/clang/20/include/stddef.h" 3 4 /* * __stddef_null.h is special when building without modules: if __need_NULL is * set, then it will unconditionally redefine NULL. To avoid stepping on client * definitions of NULL, __need_NULL should only be set the first time this * header is included, that is when __STDDEF_H is not defined. However, when * building with modules, this header is a textual header and needs to * unconditionally include __stdef_null.h to support multiple submodules * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. * When SM.B builds, the definition from SM.A will leak when building without * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't * export NULL as expected. When building with modules, always include * __stddef_null.h so that everything works as expected. */ #define __need_NULL #endif # 69 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_nullptr_t #endif # 73 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 74 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_unreachable #endif # 76 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 78 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_max_align_t #endif # 80 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_offsetof /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 84 "/usr/lib/clang/20/include/stddef.h" 3 4 # 85 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif # 86 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_ptrdiff_t.h> #endif /* expanded by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 # 89 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 91 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_size_t.h expanded by -frewrite-includes */ #include <__stddef_size_t.h> #else /* __stddef_size_t.h expanded by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_size_t.h" 1 3 4 /*===---- __stddef_size_t.h - Definition of size_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #define _SIZE_T typedef __SIZE_TYPE__ size_t; #endif # 21 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #endif /* __stddef_size_t.h expanded by -frewrite-includes */ # 94 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 96 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_rsize_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_rsize_t.h> #endif /* expanded by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 # 99 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_rsize_t #endif /* defined(__need_rsize_t) */ # 101 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_wchar_t.h expanded by -frewrite-includes */ #include <__stddef_wchar_t.h> #else /* __stddef_wchar_t.h expanded by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 1 3 4 /*===---- __stddef_wchar.h - Definition of wchar_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) || (defined(_MSC_VER) && !_NATIVE_WCHAR_T_DEFINED) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 11 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 4 /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 18 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 4 #define _WCHAR_T #ifdef _MSC_EXTENSIONS #define _WCHAR_T_DEFINED #endif # 23 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 27 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 4 #endif # 29 "/usr/lib/clang/20/include/__stddef_wchar_t.h" 3 4 #endif /* __stddef_wchar_t.h expanded by -frewrite-includes */ # 104 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 106 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_null.h expanded by -frewrite-includes */ #include <__stddef_null.h> #else /* __stddef_null.h expanded by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_null.h" 1 3 4 /*===---- __stddef_null.h - Definition of NULL -----------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(NULL) || !__building_module(_Builtin_stddef) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 11 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 /* linux/stddef.h will define NULL to 0. glibc (and other) headers then define * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. * Modules don't support redefining macros like that, but support that pattern * in the non-modules case. */ #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 21 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL __null #else # 23 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL 0 #endif # 25 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #else # 26 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL ((void*)0) #endif # 28 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #endif # 30 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #endif /* __stddef_null.h expanded by -frewrite-includes */ # 109 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 111 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_nullptr_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_nullptr_t.h> #endif /* expanded by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 # 114 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_nullptr_t #endif /* defined(__need_nullptr_t) */ # 116 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_unreachable) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_unreachable.h> #endif /* expanded by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 # 119 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_unreachable #endif /* defined(__need_unreachable) */ # 121 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_max_align_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_max_align_t.h> #endif /* expanded by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 # 124 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_max_align_t #endif /* defined(__need_max_align_t) */ # 126 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_offsetof) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_offsetof.h> #endif /* expanded by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 # 129 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_offsetof #endif /* defined(__need_offsetof) */ # 131 "/usr/lib/clang/20/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wint_t.h> #endif /* expanded by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 # 136 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 138 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* __MVS__ */ # 140 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* stddef.h expanded by -frewrite-includes */ # 33 "/usr/include/stdlib.h" 2 3 4 __BEGIN_DECLS #define _STDLIB_H 1 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 39 "/usr/include/stdlib.h" 3 4 /* XPG requires a few symbols from being defined. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* waitflags.h expanded by -frewrite-includes */ # include #else /* waitflags.h expanded by -frewrite-includes */ # 40 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/bits/waitflags.h" 1 3 4 /* Definitions of flag bits for `waitpid' et al. Copyright (C) 1992-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if 0 /* disabled by -frewrite-includes */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/bits/waitflags.h" 3 4 # error "Never include directly; use instead." #endif # 22 "/usr/include/bits/waitflags.h" 3 4 /* Bits in the third argument to `waitpid'. */ #define WNOHANG 1 /* Don't block waiting. */ #define WUNTRACED 2 /* Report status of stopped children. */ /* Bits in the fourth argument to `waitid'. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 30 "/usr/include/bits/waitflags.h" 3 4 # define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */ # define WEXITED 4 /* Report dead child. */ # define WCONTINUED 8 /* Report continued child. */ # define WNOWAIT 0x01000000 /* Don't reap, just poll status. */ #endif # 35 "/usr/include/bits/waitflags.h" 3 4 #define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */ #define __WALL 0x40000000 /* Wait for any child. */ #define __WCLONE 0x80000000 /* Wait for cloned process. */ #endif /* waitflags.h expanded by -frewrite-includes */ # 41 "/usr/include/stdlib.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* waitstatus.h expanded by -frewrite-includes */ # include #else /* waitstatus.h expanded by -frewrite-includes */ # 41 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/bits/waitstatus.h" 1 3 4 /* Definitions of status bits for `wait' et al. Copyright (C) 1992-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if 0 /* disabled by -frewrite-includes */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/bits/waitstatus.h" 3 4 # error "Never include directly; use instead." #endif # 22 "/usr/include/bits/waitstatus.h" 3 4 /* Everything extant so far uses these same bits. */ /* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) /* If WIFSIGNALED(STATUS), the terminating signal. */ #define __WTERMSIG(status) ((status) & 0x7f) /* If WIFSTOPPED(STATUS), the signal that stopped the child. */ #define __WSTOPSIG(status) __WEXITSTATUS(status) /* Nonzero if STATUS indicates normal termination. */ #define __WIFEXITED(status) (__WTERMSIG(status) == 0) /* Nonzero if STATUS indicates termination by a signal. */ #define __WIFSIGNALED(status) \ (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) /* Nonzero if STATUS indicates the child is stopped. */ #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) /* Nonzero if STATUS indicates the child continued after a stop. We only define this if provides the WCONTINUED flag bit. */ #ifdef WCONTINUED # define __WIFCONTINUED(status) ((status) == __W_CONTINUED) #endif # 51 "/usr/include/bits/waitstatus.h" 3 4 /* Nonzero if STATUS indicates the child dumped core. */ #define __WCOREDUMP(status) ((status) & __WCOREFLAG) /* Macros for constructing status values. */ #define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) #define __W_CONTINUED 0xffff #define __WCOREFLAG 0x80 #endif /* waitstatus.h expanded by -frewrite-includes */ # 42 "/usr/include/stdlib.h" 2 3 4 /* Define the macros also would define this way. */ # define WEXITSTATUS(status) __WEXITSTATUS (status) # define WTERMSIG(status) __WTERMSIG (status) # define WSTOPSIG(status) __WSTOPSIG (status) # define WIFEXITED(status) __WIFEXITED (status) # define WIFSIGNALED(status) __WIFSIGNALED (status) # define WIFSTOPPED(status) __WIFSTOPPED (status) # ifdef __WIFCONTINUED # define WIFCONTINUED(status) __WIFCONTINUED (status) # endif # 53 "/usr/include/stdlib.h" 3 4 #endif /* X/Open or XPG7 and not included. */ # 54 "/usr/include/stdlib.h" 3 4 /* _FloatN API tests for enablement. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* floatn.h expanded by -frewrite-includes */ #include #else /* floatn.h expanded by -frewrite-includes */ # 56 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/bits/floatn.h" 1 3 4 /* Macros to control TS 18661-3 glibc features on x86. Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/bits/floatn.h" 3 4 # 23 "/usr/include/bits/floatn.h" 3 4 /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc includes corresponding *f128 interfaces for it. The required libgcc support was added some time after the basic compiler support, for x86_64 and x86. */ #if 0 /* disabled by -frewrite-includes */ #if (defined __x86_64__ \ ? __GNUC_PREREQ (4, 3) \ : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 32 "/usr/include/bits/floatn.h" 3 4 # define __HAVE_FLOAT128 1 #else # 34 "/usr/include/bits/floatn.h" 3 4 # define __HAVE_FLOAT128 0 #endif # 36 "/usr/include/bits/floatn.h" 3 4 /* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct from the default float, double and long double types in this glibc. */ #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 40 "/usr/include/bits/floatn.h" 3 4 # define __HAVE_DISTINCT_FLOAT128 1 #else # 42 "/usr/include/bits/floatn.h" 3 4 # define __HAVE_DISTINCT_FLOAT128 0 #endif # 44 "/usr/include/bits/floatn.h" 3 4 /* Defined to 1 if the current compiler invocation provides a floating-point type with the right format for _Float64x, and this glibc includes corresponding *f64x interfaces for it. */ #define __HAVE_FLOAT64X 1 /* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has the format of _Float128, which must be different from that of long double. */ #define __HAVE_FLOAT64X_LONG_DOUBLE 1 #ifndef __ASSEMBLER__ /* Defined to concatenate the literal suffix to be used with _Float128 types, if __HAVE_FLOAT128 is 1. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 61 "/usr/include/bits/floatn.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 62 "/usr/include/bits/floatn.h" 3 4 /* The literal suffix f128 exists only since GCC 7.0. */ # define __f128(x) x##q # else # 65 "/usr/include/bits/floatn.h" 3 4 # define __f128(x) x##f128 # endif # 67 "/usr/include/bits/floatn.h" 3 4 # endif # 68 "/usr/include/bits/floatn.h" 3 4 /* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 71 "/usr/include/bits/floatn.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 72 "/usr/include/bits/floatn.h" 3 4 /* Add a typedef for older GCC compilers which don't natively support _Complex _Float128. */ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); # define __CFLOAT128 __cfloat128 # else # 77 "/usr/include/bits/floatn.h" 3 4 # define __CFLOAT128 _Complex _Float128 # endif # 79 "/usr/include/bits/floatn.h" 3 4 # endif # 80 "/usr/include/bits/floatn.h" 3 4 /* The remaining of this file provides support for older compilers. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 83 "/usr/include/bits/floatn.h" 3 4 /* The type _Float128 exists only since GCC 7.0. */ #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 86 "/usr/include/bits/floatn.h" 3 4 typedef __float128 _Float128; # endif # 88 "/usr/include/bits/floatn.h" 3 4 /* __builtin_huge_valf128 doesn't exist before GCC 7.0. */ #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 91 "/usr/include/bits/floatn.h" 3 4 # define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ()) # endif # 93 "/usr/include/bits/floatn.h" 3 4 /* Older GCC has only a subset of built-in functions for _Float128 on x86, and __builtin_infq is not usable in static initializers. Converting a narrower sNaN to _Float128 produces a quiet NaN, so attempts to use _Float128 sNaNs will not work properly with older compilers. */ #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 100 "/usr/include/bits/floatn.h" 3 4 # define __builtin_copysignf128 __builtin_copysignq # define __builtin_fabsf128 __builtin_fabsq # define __builtin_inff128() ((_Float128) __builtin_inf ()) # define __builtin_nanf128(x) ((_Float128) __builtin_nan (x)) # define __builtin_nansf128(x) ((_Float128) __builtin_nans (x)) # endif # 106 "/usr/include/bits/floatn.h" 3 4 /* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, e.g.: __builtin_signbitf128, before GCC 6. However, there has never been a __builtin_signbitf128 in GCC and the type-generic builtin is only available since GCC 6. */ #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (6, 0) || defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 112 "/usr/include/bits/floatn.h" 3 4 # define __builtin_signbitf128 __signbitf128 # endif # 114 "/usr/include/bits/floatn.h" 3 4 # endif # 116 "/usr/include/bits/floatn.h" 3 4 #endif /* !__ASSEMBLER__. */ # 118 "/usr/include/bits/floatn.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* floatn-common.h expanded by -frewrite-includes */ #include #else /* floatn-common.h expanded by -frewrite-includes */ # 119 "/usr/include/bits/floatn.h" 3 4 # 1 "/usr/include/bits/floatn-common.h" 1 3 4 /* Macros to control TS 18661-3 glibc features where the same definitions are appropriate for all platforms. Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_FLOATN_COMMON_H #define _BITS_FLOATN_COMMON_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/usr/include/bits/floatn-common.h" 3 4 # 24 "/usr/include/bits/floatn-common.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* long-double.h expanded by -frewrite-includes */ #include #else /* long-double.h expanded by -frewrite-includes */ # 24 "/usr/include/bits/floatn-common.h" 3 4 # 1 "/usr/include/bits/long-double.h" 1 3 4 /* Properties of long double type. ldbl-96 version. Copyright (C) 2016-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* long double is distinct from double, so there is nothing to define here. */ #define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 #endif /* long-double.h expanded by -frewrite-includes */ # 25 "/usr/include/bits/floatn-common.h" 2 3 4 /* This header should be included at the bottom of each bits/floatn.h. It defines the following macros for each _FloatN and _FloatNx type, where the same definitions, or definitions based only on the macros in bits/floatn.h, are appropriate for all glibc configurations. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the right format for this type, and this glibc includes corresponding *fN or *fNx interfaces for it. */ #define __HAVE_FLOAT16 0 #define __HAVE_FLOAT32 1 #define __HAVE_FLOAT64 1 #define __HAVE_FLOAT32X 1 #define __HAVE_FLOAT128X 0 /* Defined to 1 if the corresponding __HAVE_ macro is 1 and the type is the first with its format in the sequence of (the default choices for) float, double, long double, _Float16, _Float32, _Float64, _Float128, _Float32x, _Float64x, _Float128x for this glibc; that is, if functions present once per floating-point format rather than once per type are present for this type. All configurations supported by glibc have _Float32 the same format as float, _Float64 and _Float32x the same format as double, the _Float64x the same format as either long double or _Float128. No configurations support _Float128x or, as of GCC 7, have compiler support for a type meeting the requirements for _Float128x. */ #define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16 #define __HAVE_DISTINCT_FLOAT32 0 #define __HAVE_DISTINCT_FLOAT64 0 #define __HAVE_DISTINCT_FLOAT32X 0 #define __HAVE_DISTINCT_FLOAT64X 0 #define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X /* Defined to 1 if the corresponding _FloatN type is not binary compatible with the corresponding ISO C type in the current compilation unit as opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built in glibc. */ #define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 \ && __LDBL_MANT_DIG__ != 113) /* Defined to 1 if any _FloatN or _FloatNx types that are not ABI-distinct are however distinct types at the C language level (so for the purposes of __builtin_types_compatible_p and _Generic). */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (7, 0) && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 70 "/usr/include/bits/floatn-common.h" 3 4 # define __HAVE_FLOATN_NOT_TYPEDEF 1 #else # 72 "/usr/include/bits/floatn-common.h" 3 4 # define __HAVE_FLOATN_NOT_TYPEDEF 0 #endif # 74 "/usr/include/bits/floatn-common.h" 3 4 #ifndef __ASSEMBLER__ /* Defined to concatenate the literal suffix to be used with _FloatN or _FloatNx types, if __HAVE_ is 1. The corresponding literal suffixes exist since GCC 7, for C only. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 82 "/usr/include/bits/floatn-common.h" 3 4 /* No corresponding suffix available for this type. */ # define __f16(x) ((_Float16) x##f) # else # 85 "/usr/include/bits/floatn-common.h" 3 4 # define __f16(x) x##f16 # endif # 87 "/usr/include/bits/floatn-common.h" 3 4 # endif # 88 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 90 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 91 "/usr/include/bits/floatn-common.h" 3 4 # define __f32(x) x##f # else # 93 "/usr/include/bits/floatn-common.h" 3 4 # define __f32(x) x##f32 # endif # 95 "/usr/include/bits/floatn-common.h" 3 4 # endif # 96 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 98 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 99 "/usr/include/bits/floatn-common.h" 3 4 # ifdef __NO_LONG_DOUBLE_MATH # define __f64(x) x##l # else # 102 "/usr/include/bits/floatn-common.h" 3 4 # define __f64(x) x # endif # 104 "/usr/include/bits/floatn-common.h" 3 4 # else # 105 "/usr/include/bits/floatn-common.h" 3 4 # define __f64(x) x##f64 # endif # 107 "/usr/include/bits/floatn-common.h" 3 4 # endif # 108 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 110 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/include/bits/floatn-common.h" 3 4 # define __f32x(x) x # else # 113 "/usr/include/bits/floatn-common.h" 3 4 # define __f32x(x) x##f32x # endif # 115 "/usr/include/bits/floatn-common.h" 3 4 # endif # 116 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 118 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 119 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X_LONG_DOUBLE #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 120 "/usr/include/bits/floatn-common.h" 3 4 # define __f64x(x) x##l # else # 122 "/usr/include/bits/floatn-common.h" 3 4 # define __f64x(x) __f128 (x) # endif # 124 "/usr/include/bits/floatn-common.h" 3 4 # else # 125 "/usr/include/bits/floatn-common.h" 3 4 # define __f64x(x) x##f64x # endif # 127 "/usr/include/bits/floatn-common.h" 3 4 # endif # 128 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 130 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 131 "/usr/include/bits/floatn-common.h" 3 4 # error "_Float128X supported but no constant suffix" # else # 133 "/usr/include/bits/floatn-common.h" 3 4 # define __f128x(x) x##f128x # endif # 135 "/usr/include/bits/floatn-common.h" 3 4 # endif # 136 "/usr/include/bits/floatn-common.h" 3 4 /* Defined to a complex type if __HAVE_ is 1. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 139 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 140 "/usr/include/bits/floatn-common.h" 3 4 typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # define __CFLOAT16 __cfloat16 # else # 143 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT16 _Complex _Float16 # endif # 145 "/usr/include/bits/floatn-common.h" 3 4 # endif # 146 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 148 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 149 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT32 _Complex float # else # 151 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT32 _Complex _Float32 # endif # 153 "/usr/include/bits/floatn-common.h" 3 4 # endif # 154 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 156 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 157 "/usr/include/bits/floatn-common.h" 3 4 # ifdef __NO_LONG_DOUBLE_MATH # define __CFLOAT64 _Complex long double # else # 160 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT64 _Complex double # endif # 162 "/usr/include/bits/floatn-common.h" 3 4 # else # 163 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT64 _Complex _Float64 # endif # 165 "/usr/include/bits/floatn-common.h" 3 4 # endif # 166 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 168 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 169 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT32X _Complex double # else # 171 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT32X _Complex _Float32x # endif # 173 "/usr/include/bits/floatn-common.h" 3 4 # endif # 174 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 176 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 177 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X_LONG_DOUBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 178 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT64X _Complex long double # else # 180 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT64X __CFLOAT128 # endif # 182 "/usr/include/bits/floatn-common.h" 3 4 # else # 183 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT64X _Complex _Float64x # endif # 185 "/usr/include/bits/floatn-common.h" 3 4 # endif # 186 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 188 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 189 "/usr/include/bits/floatn-common.h" 3 4 # error "_Float128X supported but no complex type" # else # 191 "/usr/include/bits/floatn-common.h" 3 4 # define __CFLOAT128X _Complex _Float128x # endif # 193 "/usr/include/bits/floatn-common.h" 3 4 # endif # 194 "/usr/include/bits/floatn-common.h" 3 4 /* The remaining of this file provides support for older compilers. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 197 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 199 "/usr/include/bits/floatn-common.h" 3 4 typedef float _Float16 __attribute__ ((__mode__ (__HF__))); # endif # 201 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 203 "/usr/include/bits/floatn-common.h" 3 4 # define __builtin_huge_valf16() ((_Float16) __builtin_huge_val ()) # define __builtin_inff16() ((_Float16) __builtin_inf ()) # define __builtin_nanf16(x) ((_Float16) __builtin_nan (x)) # define __builtin_nansf16(x) ((_Float16) __builtin_nans (x)) # endif # 208 "/usr/include/bits/floatn-common.h" 3 4 # endif # 210 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 212 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 214 "/usr/include/bits/floatn-common.h" 3 4 typedef float _Float32; # endif # 216 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 218 "/usr/include/bits/floatn-common.h" 3 4 # define __builtin_huge_valf32() (__builtin_huge_valf ()) # define __builtin_inff32() (__builtin_inff ()) # define __builtin_nanf32(x) (__builtin_nanf (x)) # define __builtin_nansf32(x) (__builtin_nansf (x)) # endif # 223 "/usr/include/bits/floatn-common.h" 3 4 # endif # 225 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 227 "/usr/include/bits/floatn-common.h" 3 4 /* If double, long double and _Float64 all have the same set of values, TS 18661-3 requires the usual arithmetic conversions on long double and _Float64 to produce _Float64. For this to be the case when building with a compiler without a distinct _Float64 type, _Float64 must be a typedef for long double, not for double. */ # ifdef __NO_LONG_DOUBLE_MATH #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 238 "/usr/include/bits/floatn-common.h" 3 4 typedef long double _Float64; # endif # 240 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 242 "/usr/include/bits/floatn-common.h" 3 4 # define __builtin_huge_valf64() (__builtin_huge_vall ()) # define __builtin_inff64() (__builtin_infl ()) # define __builtin_nanf64(x) (__builtin_nanl (x)) # define __builtin_nansf64(x) (__builtin_nansl (x)) # endif # 247 "/usr/include/bits/floatn-common.h" 3 4 # else # 249 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 251 "/usr/include/bits/floatn-common.h" 3 4 typedef double _Float64; # endif # 253 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 255 "/usr/include/bits/floatn-common.h" 3 4 # define __builtin_huge_valf64() (__builtin_huge_val ()) # define __builtin_inff64() (__builtin_inf ()) # define __builtin_nanf64(x) (__builtin_nan (x)) # define __builtin_nansf64(x) (__builtin_nans (x)) # endif # 260 "/usr/include/bits/floatn-common.h" 3 4 # endif # 262 "/usr/include/bits/floatn-common.h" 3 4 # endif # 264 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 266 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 268 "/usr/include/bits/floatn-common.h" 3 4 typedef double _Float32x; # endif # 270 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 272 "/usr/include/bits/floatn-common.h" 3 4 # define __builtin_huge_valf32x() (__builtin_huge_val ()) # define __builtin_inff32x() (__builtin_inf ()) # define __builtin_nanf32x(x) (__builtin_nan (x)) # define __builtin_nansf32x(x) (__builtin_nans (x)) # endif # 277 "/usr/include/bits/floatn-common.h" 3 4 # endif # 279 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 281 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X_LONG_DOUBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 283 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 285 "/usr/include/bits/floatn-common.h" 3 4 typedef long double _Float64x; # endif # 287 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 289 "/usr/include/bits/floatn-common.h" 3 4 # define __builtin_huge_valf64x() (__builtin_huge_vall ()) # define __builtin_inff64x() (__builtin_infl ()) # define __builtin_nanf64x(x) (__builtin_nanl (x)) # define __builtin_nansf64x(x) (__builtin_nansl (x)) # endif # 294 "/usr/include/bits/floatn-common.h" 3 4 # else # 296 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 298 "/usr/include/bits/floatn-common.h" 3 4 typedef _Float128 _Float64x; # endif # 300 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 302 "/usr/include/bits/floatn-common.h" 3 4 # define __builtin_huge_valf64x() (__builtin_huge_valf128 ()) # define __builtin_inff64x() (__builtin_inff128 ()) # define __builtin_nanf64x(x) (__builtin_nanf128 (x)) # define __builtin_nansf64x(x) (__builtin_nansf128 (x)) # endif # 307 "/usr/include/bits/floatn-common.h" 3 4 # endif # 309 "/usr/include/bits/floatn-common.h" 3 4 # endif # 311 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 313 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 315 "/usr/include/bits/floatn-common.h" 3 4 # error "_Float128x supported but no type" # endif # 317 "/usr/include/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __clang__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 319 "/usr/include/bits/floatn-common.h" 3 4 # define __builtin_huge_valf128x() ((_Float128x) __builtin_huge_val ()) # define __builtin_inff128x() ((_Float128x) __builtin_inf ()) # define __builtin_nanf128x(x) ((_Float128x) __builtin_nan (x)) # define __builtin_nansf128x(x) ((_Float128x) __builtin_nans (x)) # endif # 324 "/usr/include/bits/floatn-common.h" 3 4 # endif # 326 "/usr/include/bits/floatn-common.h" 3 4 #endif /* !__ASSEMBLER__. */ # 328 "/usr/include/bits/floatn-common.h" 3 4 #endif /* _BITS_FLOATN_COMMON_H */ # 330 "/usr/include/bits/floatn-common.h" 3 4 #endif /* floatn-common.h expanded by -frewrite-includes */ # 120 "/usr/include/bits/floatn.h" 2 3 4 #endif /* _BITS_FLOATN_H */ # 122 "/usr/include/bits/floatn.h" 3 4 #endif /* floatn.h expanded by -frewrite-includes */ # 57 "/usr/include/stdlib.h" 2 3 4 /* Returned by `div'. */ typedef struct { int quot; /* Quotient. */ int rem; /* Remainder. */ } div_t; /* Returned by `ldiv'. */ #ifndef __ldiv_t_defined typedef struct { long int quot; /* Quotient. */ long int rem; /* Remainder. */ } ldiv_t; # define __ldiv_t_defined 1 #endif # 74 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC99 && !defined __lldiv_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 76 "/usr/include/stdlib.h" 3 4 /* Returned by `lldiv'. */ __extension__ typedef struct { long long int quot; /* Quotient. */ long long int rem; /* Remainder. */ } lldiv_t; # define __lldiv_t_defined 1 #endif # 84 "/usr/include/stdlib.h" 3 4 /* The largest number rand will return (same as INT_MAX). */ #define RAND_MAX 2147483647 /* We define these the same for all machines. Changes from this to the outside world should be done in `_exit'. */ #define EXIT_FAILURE 1 /* Failing exit status. */ #define EXIT_SUCCESS 0 /* Successful exit status. */ /* Maximum length of a multibyte character in the current locale. */ #define MB_CUR_MAX (__ctype_get_mb_cur_max ()) extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; /* Convert a string to a floating-point number. */ extern double atof (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; /* Convert a string to an integer. */ extern int atoi (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; /* Convert a string to a long integer. */ extern long int atol (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; #ifdef __USE_ISOC99 /* Convert a string to a long long integer. */ __extension__ extern long long int atoll (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; #endif # 116 "/usr/include/stdlib.h" 3 4 /* Convert a string to a floating-point number. */ extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #ifdef __USE_ISOC99 /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 131 "/usr/include/stdlib.h" 3 4 /* Likewise for '_FloatN' and '_FloatNx'. */ #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 135 "/usr/include/stdlib.h" 3 4 extern _Float16 strtof16 (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 139 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 141 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32 (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 145 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 147 "/usr/include/stdlib.h" 3 4 extern _Float64 strtof64 (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 151 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 153 "/usr/include/stdlib.h" 3 4 extern _Float128 strtof128 (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 157 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 159 "/usr/include/stdlib.h" 3 4 extern _Float32x strtof32x (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 163 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 165 "/usr/include/stdlib.h" 3 4 extern _Float64x strtof64x (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 169 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 171 "/usr/include/stdlib.h" 3 4 extern _Float128x strtof128x (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 175 "/usr/include/stdlib.h" 3 4 /* Convert a string to a long integer. */ extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned long integer. */ extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); #ifdef __USE_MISC /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned quadword integer. */ __extension__ extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); #endif /* Use misc. */ # 197 "/usr/include/stdlib.h" 3 4 #ifdef __USE_ISOC99 /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned quadword integer. */ __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); #endif /* ISO C99 or use MISC. */ # 210 "/usr/include/stdlib.h" 3 4 /* Versions of the above functions that handle '0b' and '0B' prefixes in base 0 or 2. */ #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (C23_STRTOL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 214 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern long int __REDIRECT_NTH (strtol, (const char *__restrict __nptr, char **__restrict __endptr, int __base), __isoc23_strtol) __nonnull ((1)); extern unsigned long int __REDIRECT_NTH (strtoul, (const char *__restrict __nptr, char **__restrict __endptr, int __base), __isoc23_strtoul) __nonnull ((1)); # ifdef __USE_MISC __extension__ extern long long int __REDIRECT_NTH (strtoq, (const char *__restrict __nptr, char **__restrict __endptr, int __base), __isoc23_strtoll) __nonnull ((1)); __extension__ extern unsigned long long int __REDIRECT_NTH (strtouq, (const char *__restrict __nptr, char **__restrict __endptr, int __base), __isoc23_strtoull) __nonnull ((1)); # endif # 237 "/usr/include/stdlib.h" 3 4 __extension__ extern long long int __REDIRECT_NTH (strtoll, (const char *__restrict __nptr, char **__restrict __endptr, int __base), __isoc23_strtoll) __nonnull ((1)); __extension__ extern unsigned long long int __REDIRECT_NTH (strtoull, (const char *__restrict __nptr, char **__restrict __endptr, int __base), __isoc23_strtoull) __nonnull ((1)); # else # 249 "/usr/include/stdlib.h" 3 4 extern long int __isoc23_strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); extern unsigned long int __isoc23_strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); __extension__ extern long long int __isoc23_strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); __extension__ extern unsigned long long int __isoc23_strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); # define strtol __isoc23_strtol # define strtoul __isoc23_strtoul # ifdef __USE_MISC # define strtoq __isoc23_strtoll # define strtouq __isoc23_strtoull # endif # 271 "/usr/include/stdlib.h" 3 4 # define strtoll __isoc23_strtoll # define strtoull __isoc23_strtoull # endif # 274 "/usr/include/stdlib.h" 3 4 #endif # 275 "/usr/include/stdlib.h" 3 4 /* Convert a floating-point number to a string. */ #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT_C23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 278 "/usr/include/stdlib.h" 3 4 extern int strfromd (char *__dest, size_t __size, const char *__format, double __f) __THROW __nonnull ((3)); extern int strfromf (char *__dest, size_t __size, const char *__format, float __f) __THROW __nonnull ((3)); extern int strfroml (char *__dest, size_t __size, const char *__format, long double __f) __THROW __nonnull ((3)); #endif # 290 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 292 "/usr/include/stdlib.h" 3 4 extern int strfromf16 (char *__dest, size_t __size, const char * __format, _Float16 __f) __THROW __nonnull ((3)); #endif # 296 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 298 "/usr/include/stdlib.h" 3 4 extern int strfromf32 (char *__dest, size_t __size, const char * __format, _Float32 __f) __THROW __nonnull ((3)); #endif # 302 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 304 "/usr/include/stdlib.h" 3 4 extern int strfromf64 (char *__dest, size_t __size, const char * __format, _Float64 __f) __THROW __nonnull ((3)); #endif # 308 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 310 "/usr/include/stdlib.h" 3 4 extern int strfromf128 (char *__dest, size_t __size, const char * __format, _Float128 __f) __THROW __nonnull ((3)); #endif # 314 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 316 "/usr/include/stdlib.h" 3 4 extern int strfromf32x (char *__dest, size_t __size, const char * __format, _Float32x __f) __THROW __nonnull ((3)); #endif # 320 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 322 "/usr/include/stdlib.h" 3 4 extern int strfromf64x (char *__dest, size_t __size, const char * __format, _Float64x __f) __THROW __nonnull ((3)); #endif # 326 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 328 "/usr/include/stdlib.h" 3 4 extern int strfromf128x (char *__dest, size_t __size, const char * __format, _Float128x __f) __THROW __nonnull ((3)); #endif # 332 "/usr/include/stdlib.h" 3 4 #ifdef __USE_GNU /* Parallel versions of the functions above which take the locale to use as an additional parameter. These are GNU extensions inspired by the POSIX.1-2008 extended locale API. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 338 "/usr/include/stdlib.h" 3 4 # 339 "/usr/include/stdlib.h" 3 4 extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); __extension__ extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); __extension__ extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); /* Versions of the above functions that handle '0b' and '0B' prefixes in base 0 or 2. */ #if 0 /* disabled by -frewrite-includes */ # if __GLIBC_USE (C23_STRTOL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 364 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern long int __REDIRECT_NTH (strtol_l, (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc), __isoc23_strtol_l) __nonnull ((1, 4)); extern unsigned long int __REDIRECT_NTH (strtoul_l, (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc), __isoc23_strtoul_l) __nonnull ((1, 4)); __extension__ extern long long int __REDIRECT_NTH (strtoll_l, (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc), __isoc23_strtoll_l) __nonnull ((1, 4)); __extension__ extern unsigned long long int __REDIRECT_NTH (strtoull_l, (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc), __isoc23_strtoull_l) __nonnull ((1, 4)); # else # 391 "/usr/include/stdlib.h" 3 4 extern long int __isoc23_strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); extern unsigned long int __isoc23_strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); __extension__ extern long long int __isoc23_strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); __extension__ extern unsigned long long int __isoc23_strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); # define strtol_l __isoc23_strtol_l # define strtoul_l __isoc23_strtoul_l # define strtoll_l __isoc23_strtoll_l # define strtoull_l __isoc23_strtoull_l # endif # 413 "/usr/include/stdlib.h" 3 4 # endif # 414 "/usr/include/stdlib.h" 3 4 extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); extern float strtof_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); extern long double strtold_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 429 "/usr/include/stdlib.h" 3 4 extern _Float16 strtof16_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 434 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 436 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 441 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 443 "/usr/include/stdlib.h" 3 4 extern _Float64 strtof64_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 448 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 450 "/usr/include/stdlib.h" 3 4 extern _Float128 strtof128_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 455 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 457 "/usr/include/stdlib.h" 3 4 extern _Float32x strtof32x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 462 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 464 "/usr/include/stdlib.h" 3 4 extern _Float64x strtof64x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 469 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 471 "/usr/include/stdlib.h" 3 4 extern _Float128x strtof128x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 476 "/usr/include/stdlib.h" 3 4 #endif /* GNU */ # 477 "/usr/include/stdlib.h" 3 4 #ifdef __USE_EXTERN_INLINES __extern_inline int __NTH (atoi (const char *__nptr)) { return (int) strtol (__nptr, (char **) NULL, 10); } __extern_inline long int __NTH (atol (const char *__nptr)) { return strtol (__nptr, (char **) NULL, 10); } # ifdef __USE_ISOC99 __extension__ __extern_inline long long int __NTH (atoll (const char *__nptr)) { return strtoll (__nptr, (char **) NULL, 10); } # endif # 498 "/usr/include/stdlib.h" 3 4 #endif /* Optimizing and Inlining. */ # 499 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 502 "/usr/include/stdlib.h" 3 4 /* Convert N to base 64 using the digits "./0-9A-Za-z", least-significant digit first. Returns a pointer to static storage overwritten by the next call. */ extern char *l64a (long int __n) __THROW __wur; /* Read a number from a string S in base 64 as above. */ extern long int a64l (const char *__s) __THROW __attribute_pure__ __nonnull ((1)) __wur; #endif /* Use misc || extended X/Open. */ # 512 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 514 "/usr/include/stdlib.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* types.h expanded by -frewrite-includes */ # include /* we need int32_t... */ #else /* types.h expanded by -frewrite-includes */ # 514 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/sys/types.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ #ifndef _SYS_TYPES_H #define _SYS_TYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/sys/types.h" 3 4 # 26 "/usr/include/sys/types.h" 3 4 __BEGIN_DECLS #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* types.h expanded by -frewrite-includes */ #include #else /* types.h expanded by -frewrite-includes */ # 29 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ #ifndef _BITS_TYPES_H #define _BITS_TYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/bits/types.h" 3 4 # 27 "/usr/include/bits/types.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wordsize.h expanded by -frewrite-includes */ #include #else /* wordsize.h expanded by -frewrite-includes */ # 27 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE_TIME64_COMPAT32 1 #ifdef __x86_64__ /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #endif # 17 "/usr/include/bits/wordsize.h" 3 4 #endif /* wordsize.h expanded by -frewrite-includes */ # 28 "/usr/include/bits/types.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* timesize.h expanded by -frewrite-includes */ #include #else /* timesize.h expanded by -frewrite-includes */ # 28 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/timesize.h" 1 3 4 /* Bit size of the time_t type at glibc build time, x86-64 and x32 case. Copyright (C) 2018-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wordsize.h expanded by -frewrite-includes */ #include #else /* wordsize.h expanded by -frewrite-includes */ # 19 "/usr/include/bits/timesize.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE_TIME64_COMPAT32 1 #ifdef __x86_64__ /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #endif # 17 "/usr/include/bits/wordsize.h" 3 4 #endif /* wordsize.h expanded by -frewrite-includes */ # 20 "/usr/include/bits/timesize.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 22 "/usr/include/bits/timesize.h" 3 4 /* For x32, time is 64-bit even though word size is 32-bit. */ # define __TIMESIZE 64 #else # 25 "/usr/include/bits/timesize.h" 3 4 /* For others, time size is word size. */ # define __TIMESIZE __WORDSIZE #endif # 28 "/usr/include/bits/timesize.h" 3 4 #endif /* timesize.h expanded by -frewrite-includes */ # 29 "/usr/include/bits/types.h" 2 3 4 /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; /* Fixed-size types, underlying types depend on word size and compiler. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/include/bits/types.h" 3 4 typedef signed long int __int64_t; typedef unsigned long int __uint64_t; #else # 47 "/usr/include/bits/types.h" 3 4 __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; #endif # 50 "/usr/include/bits/types.h" 3 4 /* Smallest types with at least a given width. */ typedef __int8_t __int_least8_t; typedef __uint8_t __uint_least8_t; typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; typedef __int64_t __int_least64_t; typedef __uint64_t __uint_least64_t; /* quad_t is also 64 bits. */ #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 63 "/usr/include/bits/types.h" 3 4 typedef long int __quad_t; typedef unsigned long int __u_quad_t; #else # 66 "/usr/include/bits/types.h" 3 4 __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; #endif # 69 "/usr/include/bits/types.h" 3 4 /* Largest integral types. */ #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 72 "/usr/include/bits/types.h" 3 4 typedef long int __intmax_t; typedef unsigned long int __uintmax_t; #else # 75 "/usr/include/bits/types.h" 3 4 __extension__ typedef long long int __intmax_t; __extension__ typedef unsigned long long int __uintmax_t; #endif # 78 "/usr/include/bits/types.h" 3 4 /* The machine-dependent file defines __*_T_TYPE macros for each of the OS types we define below. The definitions of those macros must use the following macros for underlying types. We define __S_TYPE and __U_TYPE for the signed and unsigned variants of each of the following integer types on this machine. 16 -- "natural" 16-bit type (always short) 32 -- "natural" 32-bit type (always int) 64 -- "natural" 64-bit type (long or long long) LONG32 -- 32-bit type, traditionally long QUAD -- 64-bit type, traditionally long long WORD -- natural type of __WORDSIZE bits (int or long) LONGWORD -- type of __WORDSIZE bits, traditionally long We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the conventional uses of `long' or `long long' type modifiers match the types we define, even when a less-adorned type would be the same size. This matters for (somewhat) portably writing printf/scanf formats for these types, where using the appropriate l or ll format modifiers can make the typedefs and the formats match up across all GNU platforms. If we used `long' when it's 64 bits where `long long' is expected, then the compiler would warn about the formats not matching the argument types, and the programmer changing them to shut up the compiler would break the program's portability. Here we assume what is presently the case in all the GCC configurations we support: long long is always 64 bits, long is always word/address size, and int is always 32 bits. */ #define __S16_TYPE short int #define __U16_TYPE unsigned short int #define __S32_TYPE int #define __U32_TYPE unsigned int #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 32 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 116 "/usr/include/bits/types.h" 3 4 # define __SQUAD_TYPE __int64_t # define __UQUAD_TYPE __uint64_t # define __SWORD_TYPE int # define __UWORD_TYPE unsigned int # define __SLONG32_TYPE long int # define __ULONG32_TYPE unsigned long int # define __S64_TYPE __int64_t # define __U64_TYPE __uint64_t /* We want __extension__ before typedef's that use nonstandard base types such as `long long' in C89 mode. */ # define __STD_TYPE __extension__ typedef #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 128 "/usr/include/bits/types.h" 3 4 # define __SQUAD_TYPE long int # define __UQUAD_TYPE unsigned long int # define __SWORD_TYPE long int # define __UWORD_TYPE unsigned long int # define __SLONG32_TYPE int # define __ULONG32_TYPE unsigned int # define __S64_TYPE long int # define __U64_TYPE unsigned long int /* No need to mark the typedef with __extension__. */ # define __STD_TYPE typedef #else # 139 "/usr/include/bits/types.h" 3 4 # error #endif # 141 "/usr/include/bits/types.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* typesizes.h expanded by -frewrite-includes */ #include /* Defines __*_T_TYPE macros. */ #else /* typesizes.h expanded by -frewrite-includes */ # 141 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 /* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. Copyright (C) 2012-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." #endif # 22 "/usr/include/bits/typesizes.h" 3 4 #ifndef _BITS_TYPESIZES_H #define _BITS_TYPESIZES_H 1 /* See for the meaning of these macros. This file exists so that need not vary across different GNU platforms. */ /* X32 kernel interface is 64-bit. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/include/bits/typesizes.h" 3 4 # define __SYSCALL_SLONG_TYPE __SQUAD_TYPE # define __SYSCALL_ULONG_TYPE __UQUAD_TYPE #else # 34 "/usr/include/bits/typesizes.h" 3 4 # define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE # define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #endif # 37 "/usr/include/bits/typesizes.h" 3 4 #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __SYSCALL_ULONG_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #ifdef __x86_64__ # define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE # define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE #else # 48 "/usr/include/bits/typesizes.h" 3 4 # define __NLINK_T_TYPE __UWORD_TYPE # define __FSWORD_T_TYPE __SWORD_TYPE #endif # 51 "/usr/include/bits/typesizes.h" 3 4 #define __OFF_T_TYPE __SYSCALL_SLONG_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE #define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE #define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE #define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE #define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE #define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE #ifdef __x86_64__ /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ # define __OFF_T_MATCHES_OFF64_T 1 /* Same for ino_t and ino64_t. */ # define __INO_T_MATCHES_INO64_T 1 /* And for __rlim_t and __rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 /* And for getitimer, setitimer and rusage */ # define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # 95 "/usr/include/bits/typesizes.h" 3 4 # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 # define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif # 101 "/usr/include/bits/typesizes.h" 3 4 /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 #endif /* bits/typesizes.h */ # 107 "/usr/include/bits/typesizes.h" 3 4 #endif /* typesizes.h expanded by -frewrite-includes */ # 142 "/usr/include/bits/types.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* time64.h expanded by -frewrite-includes */ #include /* Defines __TIME*_T_TYPE macros. */ #else /* time64.h expanded by -frewrite-includes */ # 142 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/time64.h" 1 3 4 /* bits/time64.h -- underlying types for __time64_t. Generic version. Copyright (C) 2018-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." #endif # 22 "/usr/include/bits/time64.h" 3 4 #ifndef _BITS_TIME64_H #define _BITS_TIME64_H 1 /* Define __TIME64_T_TYPE so that it is always a 64-bit type. */ #if 0 /* disabled by -frewrite-includes */ #if __TIMESIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 29 "/usr/include/bits/time64.h" 3 4 /* If we already have 64-bit time type then use it. */ # define __TIME64_T_TYPE __TIME_T_TYPE #else # 32 "/usr/include/bits/time64.h" 3 4 /* Define a 64-bit time type alongsize the 32-bit one. */ # define __TIME64_T_TYPE __SQUAD_TYPE #endif # 35 "/usr/include/bits/time64.h" 3 4 #endif /* bits/time64.h */ # 37 "/usr/include/bits/time64.h" 3 4 #endif /* time64.h expanded by -frewrite-includes */ # 143 "/usr/include/bits/types.h" 2 3 4 __STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */ __STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */ __STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */ __STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */ __STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/ __STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */ __STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */ __STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */ __STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */ __STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */ __STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */ __STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */ __STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */ __STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */ __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */ __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */ __STD_TYPE __SUSECONDS64_T_TYPE __suseconds64_t; __STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */ __STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */ /* Clock ID used in clock and timer functions. */ __STD_TYPE __CLOCKID_T_TYPE __clockid_t; /* Timer ID returned by `timer_create'. */ __STD_TYPE __TIMER_T_TYPE __timer_t; /* Type to represent block size. */ __STD_TYPE __BLKSIZE_T_TYPE __blksize_t; /* Types from the Large File Support interface. */ /* Type to count number of disk blocks. */ __STD_TYPE __BLKCNT_T_TYPE __blkcnt_t; __STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t; /* Type to count file system blocks. */ __STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t; __STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t; /* Type to count file system nodes. */ __STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t; __STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t; /* Type of miscellaneous file system fields. */ __STD_TYPE __FSWORD_T_TYPE __fsword_t; __STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */ /* Signed long type used in system calls. */ __STD_TYPE __SYSCALL_SLONG_TYPE __syscall_slong_t; /* Unsigned long type used in system calls. */ __STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t; /* These few don't really vary by system, they always correspond to one of the other defined types. */ typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ typedef char *__caddr_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ __STD_TYPE __SWORD_TYPE __intptr_t; /* Duplicate info from sys/socket.h. */ __STD_TYPE __U32_TYPE __socklen_t; /* C99: An integer type that can be accessed as an atomic entity, even in the presence of asynchronous interrupts. It is not currently necessary for this to be machine-specific. */ typedef int __sig_atomic_t; /* Seconds since the Epoch, visible to user code when time_t is too narrow only for consistency with the old way of widening too-narrow types. User code should never use __time64_t. */ #if 0 /* disabled by -frewrite-includes */ #if __TIMESIZE == 64 && defined __LIBC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 221 "/usr/include/bits/types.h" 3 4 # define __time64_t __time_t #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __TIMESIZE != 64 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 223 "/usr/include/bits/types.h" 3 4 __STD_TYPE __TIME64_T_TYPE __time64_t; #endif # 225 "/usr/include/bits/types.h" 3 4 #undef __STD_TYPE #endif /* bits/types.h */ # 229 "/usr/include/bits/types.h" 3 4 #endif /* types.h expanded by -frewrite-includes */ # 30 "/usr/include/sys/types.h" 2 3 4 #ifdef __USE_MISC # ifndef __u_char_defined typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; # define __u_char_defined # endif # 42 "/usr/include/sys/types.h" 3 4 typedef __loff_t loff_t; #endif # 44 "/usr/include/sys/types.h" 3 4 #ifndef __ino_t_defined # ifndef __USE_FILE_OFFSET64 typedef __ino_t ino_t; # else # 49 "/usr/include/sys/types.h" 3 4 typedef __ino64_t ino_t; # endif # 51 "/usr/include/sys/types.h" 3 4 # define __ino_t_defined #endif # 53 "/usr/include/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_LARGEFILE64 && !defined __ino64_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 54 "/usr/include/sys/types.h" 3 4 typedef __ino64_t ino64_t; # define __ino64_t_defined #endif # 57 "/usr/include/sys/types.h" 3 4 #ifndef __dev_t_defined typedef __dev_t dev_t; # define __dev_t_defined #endif # 62 "/usr/include/sys/types.h" 3 4 #ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined #endif # 67 "/usr/include/sys/types.h" 3 4 #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif # 72 "/usr/include/sys/types.h" 3 4 #ifndef __nlink_t_defined typedef __nlink_t nlink_t; # define __nlink_t_defined #endif # 77 "/usr/include/sys/types.h" 3 4 #ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined #endif # 82 "/usr/include/sys/types.h" 3 4 #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 87 "/usr/include/sys/types.h" 3 4 typedef __off64_t off_t; # endif # 89 "/usr/include/sys/types.h" 3 4 # define __off_t_defined #endif # 91 "/usr/include/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_LARGEFILE64 && !defined __off64_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 92 "/usr/include/sys/types.h" 3 4 typedef __off64_t off64_t; # define __off64_t_defined #endif # 95 "/usr/include/sys/types.h" 3 4 #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif # 100 "/usr/include/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) \ && !defined __id_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 103 "/usr/include/sys/types.h" 3 4 typedef __id_t id_t; # define __id_t_defined #endif # 106 "/usr/include/sys/types.h" 3 4 #ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined #endif # 111 "/usr/include/sys/types.h" 3 4 #ifdef __USE_MISC # ifndef __daddr_t_defined typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; # define __daddr_t_defined # endif # 118 "/usr/include/sys/types.h" 3 4 #endif # 119 "/usr/include/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_MISC || defined __USE_XOPEN) && !defined __key_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 121 "/usr/include/sys/types.h" 3 4 typedef __key_t key_t; # define __key_t_defined #endif # 124 "/usr/include/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 126 "/usr/include/sys/types.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* clock_t.h expanded by -frewrite-includes */ # include #else /* clock_t.h expanded by -frewrite-includes */ # 126 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/types/clock_t.h" 1 3 4 #ifndef __clock_t_defined #define __clock_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/bits/types/clock_t.h" 3 4 # 5 "/usr/include/bits/types/clock_t.h" 3 4 /* Returned by `clock'. */ typedef __clock_t clock_t; #endif # 10 "/usr/include/bits/types/clock_t.h" 3 4 #endif /* clock_t.h expanded by -frewrite-includes */ # 127 "/usr/include/sys/types.h" 2 3 4 #endif # 128 "/usr/include/sys/types.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* clockid_t.h expanded by -frewrite-includes */ #include #else /* clockid_t.h expanded by -frewrite-includes */ # 128 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/types/clockid_t.h" 1 3 4 #ifndef __clockid_t_defined #define __clockid_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/bits/types/clockid_t.h" 3 4 # 5 "/usr/include/bits/types/clockid_t.h" 3 4 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #endif # 10 "/usr/include/bits/types/clockid_t.h" 3 4 #endif /* clockid_t.h expanded by -frewrite-includes */ # 129 "/usr/include/sys/types.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* time_t.h expanded by -frewrite-includes */ #include #else /* time_t.h expanded by -frewrite-includes */ # 129 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/types/time_t.h" 1 3 4 #ifndef __time_t_defined #define __time_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/bits/types/time_t.h" 3 4 # 5 "/usr/include/bits/types/time_t.h" 3 4 /* Returned by `time'. */ #ifdef __USE_TIME64_REDIRECTS typedef __time64_t time_t; #else # 10 "/usr/include/bits/types/time_t.h" 3 4 typedef __time_t time_t; #endif # 12 "/usr/include/bits/types/time_t.h" 3 4 #endif # 14 "/usr/include/bits/types/time_t.h" 3 4 #endif /* time_t.h expanded by -frewrite-includes */ # 130 "/usr/include/sys/types.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* timer_t.h expanded by -frewrite-includes */ #include #else /* timer_t.h expanded by -frewrite-includes */ # 130 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/types/timer_t.h" 1 3 4 #ifndef __timer_t_defined #define __timer_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/bits/types/timer_t.h" 3 4 # 5 "/usr/include/bits/types/timer_t.h" 3 4 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #endif # 10 "/usr/include/bits/types/timer_t.h" 3 4 #endif /* timer_t.h expanded by -frewrite-includes */ # 131 "/usr/include/sys/types.h" 2 3 4 #ifdef __USE_XOPEN # ifndef __useconds_t_defined typedef __useconds_t useconds_t; # define __useconds_t_defined # endif # 137 "/usr/include/sys/types.h" 3 4 # ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined # endif # 141 "/usr/include/sys/types.h" 3 4 #endif # 142 "/usr/include/sys/types.h" 3 4 #define __need_size_t #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */ #include #else /* stddef.h expanded by -frewrite-includes */ # 144 "/usr/include/sys/types.h" 3 4 # 1 "/usr/lib/clang/20/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stddef.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__MVS__) && __has_include_next() #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t #undef __need_wchar_t #undef __need_NULL #undef __need_nullptr_t #undef __need_unreachable #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/lib/clang/20/include/stddef.h" 3 4 # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 # 35 "/usr/lib/clang/20/include/stddef.h" 3 4 #else # 37 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_rsize_t) && !defined(__need_wchar_t) && \ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 43 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_rsize_t #endif # 50 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_wchar_t #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/clang/20/include/stddef.h" 3 4 /* * __stddef_null.h is special when building without modules: if __need_NULL is * set, then it will unconditionally redefine NULL. To avoid stepping on client * definitions of NULL, __need_NULL should only be set the first time this * header is included, that is when __STDDEF_H is not defined. However, when * building with modules, this header is a textual header and needs to * unconditionally include __stdef_null.h to support multiple submodules * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. * When SM.B builds, the definition from SM.A will leak when building without * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't * export NULL as expected. When building with modules, always include * __stddef_null.h so that everything works as expected. */ #define __need_NULL #endif # 69 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_nullptr_t #endif # 73 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 74 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_unreachable #endif # 76 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 78 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_max_align_t #endif # 80 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_offsetof /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 84 "/usr/lib/clang/20/include/stddef.h" 3 4 # 85 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif # 86 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_ptrdiff_t.h> #endif /* expanded by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 # 89 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 91 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_size_t.h expanded by -frewrite-includes */ #include <__stddef_size_t.h> #else /* __stddef_size_t.h expanded by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_size_t.h" 1 3 4 /*===---- __stddef_size_t.h - Definition of size_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #define _SIZE_T typedef __SIZE_TYPE__ size_t; #endif # 21 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #endif /* __stddef_size_t.h expanded by -frewrite-includes */ # 94 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 96 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_rsize_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_rsize_t.h> #endif /* expanded by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 # 99 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_rsize_t #endif /* defined(__need_rsize_t) */ # 101 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wchar_t.h> #endif /* expanded by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 # 104 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 106 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_null.h> #endif /* expanded by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 # 109 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 111 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_nullptr_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_nullptr_t.h> #endif /* expanded by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 # 114 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_nullptr_t #endif /* defined(__need_nullptr_t) */ # 116 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_unreachable) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_unreachable.h> #endif /* expanded by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 # 119 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_unreachable #endif /* defined(__need_unreachable) */ # 121 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_max_align_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_max_align_t.h> #endif /* expanded by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 # 124 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_max_align_t #endif /* defined(__need_max_align_t) */ # 126 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_offsetof) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_offsetof.h> #endif /* expanded by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 # 129 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_offsetof #endif /* defined(__need_offsetof) */ # 131 "/usr/lib/clang/20/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wint_t.h> #endif /* expanded by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 # 136 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 138 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* __MVS__ */ # 140 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* stddef.h expanded by -frewrite-includes */ # 145 "/usr/include/sys/types.h" 2 3 4 #ifdef __USE_MISC /* Old compatibility names for C types. */ typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; #endif # 152 "/usr/include/sys/types.h" 3 4 /* These size-specific names are used by some of the inet code. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdint-intn.h expanded by -frewrite-includes */ #include #else /* stdint-intn.h expanded by -frewrite-includes */ # 155 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/stdint-intn.h" 1 3 4 /* Define intN_t types. Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STDINT_INTN_H #define _BITS_STDINT_INTN_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/bits/stdint-intn.h" 3 4 # 23 "/usr/include/bits/stdint-intn.h" 3 4 typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; #endif /* bits/stdint-intn.h */ # 30 "/usr/include/bits/stdint-intn.h" 3 4 #endif /* stdint-intn.h expanded by -frewrite-includes */ # 156 "/usr/include/sys/types.h" 2 3 4 /* These were defined by ISO C without the first `_'. */ typedef __uint8_t u_int8_t; typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2, 7) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 164 "/usr/include/sys/types.h" 3 4 typedef int register_t __attribute__ ((__mode__ (__word__))); #else # 166 "/usr/include/sys/types.h" 3 4 typedef int register_t; #endif # 168 "/usr/include/sys/types.h" 3 4 /* Some code from BIND tests this macro to see if the types above are defined. */ #define __BIT_TYPES_DEFINED__ 1 #ifdef __USE_MISC /* In BSD is expected to define BYTE_ORDER. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* endian.h expanded by -frewrite-includes */ # include #else /* endian.h expanded by -frewrite-includes */ # 176 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ENDIAN_H #define _ENDIAN_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/endian.h" 3 4 # 22 "/usr/include/endian.h" 3 4 /* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* endian.h expanded by -frewrite-includes */ #include #else /* endian.h expanded by -frewrite-includes */ # 24 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/endian.h" 1 3 4 /* Endian macros for string.h functions Copyright (C) 1992-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_ENDIAN_H #define _BITS_ENDIAN_H 1 /* Definitions for byte order, according to significance of bytes, from low addresses to high addresses. The value is what you get by putting '4' in the most significant byte, '3' in the second most significant byte, '2' in the second least significant byte, and '1' in the least significant byte, and then writing down one digit for each byte, starting with the byte at the lowest address at the left, and proceeding to the byte with the highest address at the right. */ #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 /* This file defines `__BYTE_ORDER' for the particular machine. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* endianness.h expanded by -frewrite-includes */ #include #else /* endianness.h expanded by -frewrite-includes */ # 35 "/usr/include/bits/endian.h" 3 4 # 1 "/usr/include/bits/endianness.h" 1 3 4 #ifndef _BITS_ENDIANNESS_H #define _BITS_ENDIANNESS_H 1 #ifndef _BITS_ENDIAN_H # error "Never use directly; include instead." #endif # 7 "/usr/include/bits/endianness.h" 3 4 /* i386/x86_64 are little-endian. */ #define __BYTE_ORDER __LITTLE_ENDIAN #endif /* bits/endianness.h */ # 12 "/usr/include/bits/endianness.h" 3 4 #endif /* endianness.h expanded by -frewrite-includes */ # 36 "/usr/include/bits/endian.h" 2 3 4 /* Some machines may need to use a different endianness for floating point values. */ #ifndef __FLOAT_WORD_ORDER # define __FLOAT_WORD_ORDER __BYTE_ORDER #endif # 42 "/usr/include/bits/endian.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BYTE_ORDER == __LITTLE_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/include/bits/endian.h" 3 4 # define __LONG_LONG_PAIR(HI, LO) LO, HI #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __BYTE_ORDER == __BIG_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 46 "/usr/include/bits/endian.h" 3 4 # define __LONG_LONG_PAIR(HI, LO) HI, LO #endif # 48 "/usr/include/bits/endian.h" 3 4 #endif /* bits/endian.h */ # 50 "/usr/include/bits/endian.h" 3 4 #endif /* endian.h expanded by -frewrite-includes */ # 25 "/usr/include/endian.h" 2 3 4 #ifdef __USE_MISC # define LITTLE_ENDIAN __LITTLE_ENDIAN # define BIG_ENDIAN __BIG_ENDIAN # define PDP_ENDIAN __PDP_ENDIAN # define BYTE_ORDER __BYTE_ORDER #endif # 32 "/usr/include/endian.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC && !defined __ASSEMBLER__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 34 "/usr/include/endian.h" 3 4 /* Conversion interfaces. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* byteswap.h expanded by -frewrite-includes */ # include #else /* byteswap.h expanded by -frewrite-includes */ # 35 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/byteswap.h" 1 3 4 /* Macros and inline functions to swap the order of bytes in integer values. Copyright (C) 1997-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if 0 /* disabled by -frewrite-includes */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/bits/byteswap.h" 3 4 # error "Never use directly; include instead." #endif # 22 "/usr/include/bits/byteswap.h" 3 4 #ifndef _BITS_BYTESWAP_H #define _BITS_BYTESWAP_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/bits/byteswap.h" 3 4 # 27 "/usr/include/bits/byteswap.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/bits/byteswap.h" 3 4 # 28 "/usr/include/bits/byteswap.h" 3 4 /* Swap bytes in 16-bit value. */ #define __bswap_constant_16(x) \ ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) static __inline __uint16_t __bswap_16 (__uint16_t __bsx) { #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 8) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 37 "/usr/include/bits/byteswap.h" 3 4 return __builtin_bswap16 (__bsx); #else # 39 "/usr/include/bits/byteswap.h" 3 4 return __bswap_constant_16 (__bsx); #endif # 41 "/usr/include/bits/byteswap.h" 3 4 } /* Swap bytes in 32-bit value. */ #define __bswap_constant_32(x) \ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \ | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) static __inline __uint32_t __bswap_32 (__uint32_t __bsx) { #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 52 "/usr/include/bits/byteswap.h" 3 4 return __builtin_bswap32 (__bsx); #else # 54 "/usr/include/bits/byteswap.h" 3 4 return __bswap_constant_32 (__bsx); #endif # 56 "/usr/include/bits/byteswap.h" 3 4 } /* Swap bytes in 64-bit value. */ #define __bswap_constant_64(x) \ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ | (((x) & 0x0000ff0000000000ull) >> 24) \ | (((x) & 0x000000ff00000000ull) >> 8) \ | (((x) & 0x00000000ff000000ull) << 8) \ | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56)) __extension__ static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 73 "/usr/include/bits/byteswap.h" 3 4 return __builtin_bswap64 (__bsx); #else # 75 "/usr/include/bits/byteswap.h" 3 4 return __bswap_constant_64 (__bsx); #endif # 77 "/usr/include/bits/byteswap.h" 3 4 } #endif /* _BITS_BYTESWAP_H */ # 80 "/usr/include/bits/byteswap.h" 3 4 #endif /* byteswap.h expanded by -frewrite-includes */ # 36 "/usr/include/endian.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* uintn-identity.h expanded by -frewrite-includes */ # include #else /* uintn-identity.h expanded by -frewrite-includes */ # 36 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/uintn-identity.h" 1 3 4 /* Inline functions to return unsigned integer values unchanged. Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if 0 /* disabled by -frewrite-includes */ #if !defined _NETINET_IN_H && !defined _ENDIAN_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/bits/uintn-identity.h" 3 4 # error "Never use directly; include or instead." #endif # 22 "/usr/include/bits/uintn-identity.h" 3 4 #ifndef _BITS_UINTN_IDENTITY_H #define _BITS_UINTN_IDENTITY_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/bits/uintn-identity.h" 3 4 # 27 "/usr/include/bits/uintn-identity.h" 3 4 /* These inline functions are to ensure the appropriate type conversions and associated diagnostics from macros that convert to a given endianness. */ static __inline __uint16_t __uint16_identity (__uint16_t __x) { return __x; } static __inline __uint32_t __uint32_identity (__uint32_t __x) { return __x; } static __inline __uint64_t __uint64_identity (__uint64_t __x) { return __x; } #endif /* _BITS_UINTN_IDENTITY_H. */ # 51 "/usr/include/bits/uintn-identity.h" 3 4 #endif /* uintn-identity.h expanded by -frewrite-includes */ # 37 "/usr/include/endian.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ # if __BYTE_ORDER == __LITTLE_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 39 "/usr/include/endian.h" 3 4 # define htobe16(x) __bswap_16 (x) # define htole16(x) __uint16_identity (x) # define be16toh(x) __bswap_16 (x) # define le16toh(x) __uint16_identity (x) # define htobe32(x) __bswap_32 (x) # define htole32(x) __uint32_identity (x) # define be32toh(x) __bswap_32 (x) # define le32toh(x) __uint32_identity (x) # define htobe64(x) __bswap_64 (x) # define htole64(x) __uint64_identity (x) # define be64toh(x) __bswap_64 (x) # define le64toh(x) __uint64_identity (x) # else # 55 "/usr/include/endian.h" 3 4 # define htobe16(x) __uint16_identity (x) # define htole16(x) __bswap_16 (x) # define be16toh(x) __uint16_identity (x) # define le16toh(x) __bswap_16 (x) # define htobe32(x) __uint32_identity (x) # define htole32(x) __bswap_32 (x) # define be32toh(x) __uint32_identity (x) # define le32toh(x) __bswap_32 (x) # define htobe64(x) __uint64_identity (x) # define htole64(x) __bswap_64 (x) # define be64toh(x) __uint64_identity (x) # define le64toh(x) __bswap_64 (x) # endif # 70 "/usr/include/endian.h" 3 4 #endif # 71 "/usr/include/endian.h" 3 4 #endif /* endian.h */ # 73 "/usr/include/endian.h" 3 4 #endif /* endian.h expanded by -frewrite-includes */ # 177 "/usr/include/sys/types.h" 2 3 4 /* It also defines `fd_set' and the FD_* macros for `select'. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* select.h expanded by -frewrite-includes */ # include #else /* select.h expanded by -frewrite-includes */ # 179 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 /* `fd_set' type and related macros, and `select'/`pselect' declarations. Copyright (C) 1996-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets */ #ifndef _SYS_SELECT_H #define _SYS_SELECT_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/usr/include/sys/select.h" 3 4 # 25 "/usr/include/sys/select.h" 3 4 /* Get definition of needed basic types. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/sys/select.h" 3 4 # 28 "/usr/include/sys/select.h" 3 4 /* Get __FD_* definitions. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* select.h expanded by -frewrite-includes */ #include #else /* select.h expanded by -frewrite-includes */ # 30 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/select.h" 1 3 4 /* Copyright (C) 1997-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SELECT_H # error "Never use directly; include instead." #endif # 21 "/usr/include/bits/select.h" 3 4 /* We don't use `memset' because this would require a prototype and the array isn't too big. */ #define __FD_ZERO(s) \ do { \ unsigned int __i; \ fd_set *__arr = (s); \ for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ __FDS_BITS (__arr)[__i] = 0; \ } while (0) #define __FD_SET(d, s) \ ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d))) #define __FD_CLR(d, s) \ ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d))) #define __FD_ISSET(d, s) \ ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0) #endif /* select.h expanded by -frewrite-includes */ # 31 "/usr/include/sys/select.h" 2 3 4 /* Get sigset_t. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sigset_t.h expanded by -frewrite-includes */ #include #else /* sigset_t.h expanded by -frewrite-includes */ # 33 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/types/sigset_t.h" 1 3 4 #ifndef __sigset_t_defined #define __sigset_t_defined 1 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __sigset_t.h expanded by -frewrite-includes */ #include #else /* __sigset_t.h expanded by -frewrite-includes */ # 4 "/usr/include/bits/types/sigset_t.h" 3 4 # 1 "/usr/include/bits/types/__sigset_t.h" 1 3 4 #ifndef ____sigset_t_defined #define ____sigset_t_defined #define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) typedef struct { unsigned long int __val[_SIGSET_NWORDS]; } __sigset_t; #endif # 11 "/usr/include/bits/types/__sigset_t.h" 3 4 #endif /* __sigset_t.h expanded by -frewrite-includes */ # 5 "/usr/include/bits/types/sigset_t.h" 2 3 4 /* A set of signals to be blocked, unblocked, or waited for. */ typedef __sigset_t sigset_t; #endif # 10 "/usr/include/bits/types/sigset_t.h" 3 4 #endif /* sigset_t.h expanded by -frewrite-includes */ # 34 "/usr/include/sys/select.h" 2 3 4 /* Get definition of timer specification structures. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/sys/select.h" 3 4 # 37 "/usr/include/sys/select.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* struct_timeval.h expanded by -frewrite-includes */ #include #else /* struct_timeval.h expanded by -frewrite-includes */ # 37 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/types/struct_timeval.h" 1 3 4 #ifndef __timeval_defined #define __timeval_defined 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/bits/types/struct_timeval.h" 3 4 # 5 "/usr/include/bits/types/struct_timeval.h" 3 4 /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval { #ifdef __USE_TIME64_REDIRECTS __time64_t tv_sec; /* Seconds. */ __suseconds64_t tv_usec; /* Microseconds. */ #else # 14 "/usr/include/bits/types/struct_timeval.h" 3 4 __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ #endif # 17 "/usr/include/bits/types/struct_timeval.h" 3 4 }; #endif # 19 "/usr/include/bits/types/struct_timeval.h" 3 4 #endif /* struct_timeval.h expanded by -frewrite-includes */ # 38 "/usr/include/sys/select.h" 2 3 4 #ifdef __USE_XOPEN2K #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* struct_timespec.h expanded by -frewrite-includes */ # include #else /* struct_timespec.h expanded by -frewrite-includes */ # 39 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/types/struct_timespec.h" 1 3 4 /* NB: Include guard matches what uses. */ #ifndef _STRUCT_TIMESPEC #define _STRUCT_TIMESPEC 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 5 "/usr/include/bits/types/struct_timespec.h" 3 4 # 6 "/usr/include/bits/types/struct_timespec.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 6 "/usr/include/bits/types/struct_timespec.h" 3 4 # 7 "/usr/include/bits/types/struct_timespec.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 7 "/usr/include/bits/types/struct_timespec.h" 3 4 # 8 "/usr/include/bits/types/struct_timespec.h" 3 4 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { #ifdef __USE_TIME64_REDIRECTS __time64_t tv_sec; /* Seconds. */ #else # 16 "/usr/include/bits/types/struct_timespec.h" 3 4 __time_t tv_sec; /* Seconds. */ #endif # 18 "/usr/include/bits/types/struct_timespec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 \ || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \ || (__TIMESIZE == 32 && !defined __USE_TIME64_REDIRECTS) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 21 "/usr/include/bits/types/struct_timespec.h" 3 4 __syscall_slong_t tv_nsec; /* Nanoseconds. */ #else # 23 "/usr/include/bits/types/struct_timespec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __BYTE_ORDER == __BIG_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 24 "/usr/include/bits/types/struct_timespec.h" 3 4 int: 32; /* Padding. */ long int tv_nsec; /* Nanoseconds. */ # else # 27 "/usr/include/bits/types/struct_timespec.h" 3 4 long int tv_nsec; /* Nanoseconds. */ int: 32; /* Padding. */ # endif # 30 "/usr/include/bits/types/struct_timespec.h" 3 4 #endif # 31 "/usr/include/bits/types/struct_timespec.h" 3 4 }; #endif # 34 "/usr/include/bits/types/struct_timespec.h" 3 4 #endif /* struct_timespec.h expanded by -frewrite-includes */ # 40 "/usr/include/sys/select.h" 2 3 4 #endif # 41 "/usr/include/sys/select.h" 3 4 #ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined #endif # 46 "/usr/include/sys/select.h" 3 4 /* The fd_set member is required to be an array of longs. */ typedef long int __fd_mask; /* Some versions of define this macros. */ #undef __NFDBITS /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ #define __NFDBITS (8 * (int) sizeof (__fd_mask)) #define __FD_ELT(d) ((d) / __NFDBITS) #define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS))) /* fd_set for select and pselect. */ typedef struct { /* XPG4.2 requires this member name. Otherwise avoid the name from the global namespace. */ #ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->fds_bits) #else # 67 "/usr/include/sys/select.h" 3 4 __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->__fds_bits) #endif # 70 "/usr/include/sys/select.h" 3 4 } fd_set; /* Maximum number of file descriptors in `fd_set'. */ #define FD_SETSIZE __FD_SETSIZE #ifdef __USE_MISC /* Sometimes the fd_set member is assumed to have this type. */ typedef __fd_mask fd_mask; /* Number of bits per word of `fd_set' (some code assumes this is 32). */ # define NFDBITS __NFDBITS #endif # 82 "/usr/include/sys/select.h" 3 4 /* Access macros for `fd_set'. */ #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp) #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp) #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp) #define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) __BEGIN_DECLS /* Check the first NFDS descriptors each in READFDS (if not NULL) for read readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out after waiting the interval specified therein. Returns the number of ready descriptors, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_TIME64_REDIRECTS extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); #else # 107 "/usr/include/sys/select.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (select, (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout), __select64); # else # 115 "/usr/include/sys/select.h" 3 4 # define select __select64 # endif # 117 "/usr/include/sys/select.h" 3 4 #endif # 118 "/usr/include/sys/select.h" 3 4 #ifdef __USE_XOPEN2K /* Same as above only that the TIMEOUT value is given with higher resolution and a sigmask which is been set temporarily. This version should be used. This function is a cancellation point and therefore not marked with __THROW. */ # ifndef __USE_TIME64_REDIRECTS extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); # else # 133 "/usr/include/sys/select.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (pselect, (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask), __pselect64); # else # 142 "/usr/include/sys/select.h" 3 4 # define pselect __pselect64 # endif # 144 "/usr/include/sys/select.h" 3 4 # endif # 145 "/usr/include/sys/select.h" 3 4 #endif # 146 "/usr/include/sys/select.h" 3 4 /* Define some inlines helping to catch common problems. */ #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 150 "/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 150 "/usr/include/sys/select.h" 3 4 # 151 "/usr/include/sys/select.h" 3 4 #endif # 152 "/usr/include/sys/select.h" 3 4 __END_DECLS #endif /* sys/select.h */ # 156 "/usr/include/sys/select.h" 3 4 #endif /* select.h expanded by -frewrite-includes */ # 180 "/usr/include/sys/types.h" 2 3 4 #endif /* Use misc. */ # 181 "/usr/include/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_UNIX98 || defined __USE_XOPEN2K8) \ && !defined __blksize_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 185 "/usr/include/sys/types.h" 3 4 typedef __blksize_t blksize_t; # define __blksize_t_defined #endif # 188 "/usr/include/sys/types.h" 3 4 /* Types from the Large File Support interface. */ #ifndef __USE_FILE_OFFSET64 # ifndef __blkcnt_t_defined typedef __blkcnt_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # 195 "/usr/include/sys/types.h" 3 4 # ifndef __fsblkcnt_t_defined typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # 199 "/usr/include/sys/types.h" 3 4 # ifndef __fsfilcnt_t_defined typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif # 203 "/usr/include/sys/types.h" 3 4 #else # 204 "/usr/include/sys/types.h" 3 4 # ifndef __blkcnt_t_defined typedef __blkcnt64_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # 208 "/usr/include/sys/types.h" 3 4 # ifndef __fsblkcnt_t_defined typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # 212 "/usr/include/sys/types.h" 3 4 # ifndef __fsfilcnt_t_defined typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif # 216 "/usr/include/sys/types.h" 3 4 #endif # 217 "/usr/include/sys/types.h" 3 4 #ifdef __USE_LARGEFILE64 typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */ typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks. */ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */ #endif # 223 "/usr/include/sys/types.h" 3 4 /* Now add the thread types. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_POSIX199506 || defined __USE_UNIX98 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 227 "/usr/include/sys/types.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pthreadtypes.h expanded by -frewrite-includes */ # include #else /* pthreadtypes.h expanded by -frewrite-includes */ # 227 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 /* Declaration of common pthread types for all architectures. Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_PTHREADTYPES_COMMON_H # define _BITS_PTHREADTYPES_COMMON_H 1 /* For internal mutex and condition variable definitions. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* thread-shared-types.h expanded by -frewrite-includes */ #include #else /* thread-shared-types.h expanded by -frewrite-includes */ # 23 "/usr/include/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/bits/thread-shared-types.h" 1 3 4 /* Common threading primitives definitions for both POSIX and C11. Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _THREAD_SHARED_TYPES_H #define _THREAD_SHARED_TYPES_H 1 /* Arch-specific definitions. Each architecture must define the following macros to define the expected sizes of pthread data types: __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. The additional macro defines any constraint for the lock alignment inside the thread structures: __LOCK_ALIGNMENT - for internal lock/futex usage. Same idea but for the once locking primitive: __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pthreadtypes-arch.h expanded by -frewrite-includes */ #include #else /* pthreadtypes-arch.h expanded by -frewrite-includes */ # 44 "/usr/include/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/bits/pthreadtypes-arch.h" 1 3 4 /* Copyright (C) 2002-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wordsize.h expanded by -frewrite-includes */ #include #else /* wordsize.h expanded by -frewrite-includes */ # 21 "/usr/include/bits/pthreadtypes-arch.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE_TIME64_COMPAT32 1 #ifdef __x86_64__ /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #endif # 17 "/usr/include/bits/wordsize.h" 3 4 #endif /* wordsize.h expanded by -frewrite-includes */ # 22 "/usr/include/bits/pthreadtypes-arch.h" 2 3 4 #ifdef __x86_64__ #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 25 "/usr/include/bits/pthreadtypes-arch.h" 3 4 # define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_ATTR_T 56 # define __SIZEOF_PTHREAD_RWLOCK_T 56 # define __SIZEOF_PTHREAD_BARRIER_T 32 # else # 30 "/usr/include/bits/pthreadtypes-arch.h" 3 4 # define __SIZEOF_PTHREAD_MUTEX_T 32 # define __SIZEOF_PTHREAD_ATTR_T 32 # define __SIZEOF_PTHREAD_RWLOCK_T 44 # define __SIZEOF_PTHREAD_BARRIER_T 20 # endif # 35 "/usr/include/bits/pthreadtypes-arch.h" 3 4 #else # 36 "/usr/include/bits/pthreadtypes-arch.h" 3 4 # define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_ATTR_T 36 # define __SIZEOF_PTHREAD_RWLOCK_T 32 # define __SIZEOF_PTHREAD_BARRIER_T 20 #endif # 41 "/usr/include/bits/pthreadtypes-arch.h" 3 4 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 #define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_CONDATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT #ifndef __x86_64__ /* Extra attributes for the cleanup functions. */ # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) #endif # 54 "/usr/include/bits/pthreadtypes-arch.h" 3 4 #endif /* bits/pthreadtypes.h */ # 56 "/usr/include/bits/pthreadtypes-arch.h" 3 4 #endif /* pthreadtypes-arch.h expanded by -frewrite-includes */ # 45 "/usr/include/bits/thread-shared-types.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic_wide_counter.h expanded by -frewrite-includes */ #include #else /* atomic_wide_counter.h expanded by -frewrite-includes */ # 46 "/usr/include/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/bits/atomic_wide_counter.h" 1 3 4 /* Monotonically increasing wide counters (at least 62 bits). Copyright (C) 2016-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_ATOMIC_WIDE_COUNTER_H #define _BITS_ATOMIC_WIDE_COUNTER_H /* Counter that is monotonically increasing (by less than 2**31 per increment), with a single writer, and an arbitrary number of readers. */ typedef union { __extension__ unsigned long long int __value64; struct { unsigned int __low; unsigned int __high; } __value32; } __atomic_wide_counter; #endif /* _BITS_ATOMIC_WIDE_COUNTER_H */ # 36 "/usr/include/bits/atomic_wide_counter.h" 3 4 #endif /* atomic_wide_counter.h expanded by -frewrite-includes */ # 47 "/usr/include/bits/thread-shared-types.h" 2 3 4 /* Common definition of pthread_mutex_t. */ typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; /* Arch-specific mutex definitions. A generic implementation is provided by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture can override it by defining: 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t definition). It should contains at least the internal members defined in the generic version. 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with atomic operations. 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. It should initialize the mutex internal flag. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* struct_mutex.h expanded by -frewrite-includes */ #include #else /* struct_mutex.h expanded by -frewrite-includes */ # 76 "/usr/include/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/bits/struct_mutex.h" 1 3 4 /* x86 internal mutex struct definitions. Copyright (C) 2019-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _THREAD_MUTEX_INTERNAL_H #define _THREAD_MUTEX_INTERNAL_H 1 struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; #ifdef __x86_64__ unsigned int __nusers; #endif # 30 "/usr/include/bits/struct_mutex.h" 3 4 /* KIND must stay at this position in the structure to maintain binary compatibility with static initializers. */ int __kind; #ifdef __x86_64__ short __spins; short __elision; __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else # 39 "/usr/include/bits/struct_mutex.h" 3 4 unsigned int __nusers; __extension__ union { struct { short __espins; short __eelision; # define __spins __elision_data.__espins # define __elision __elision_data.__eelision } __elision_data; __pthread_slist_t __list; }; # define __PTHREAD_MUTEX_HAVE_PREV 0 #endif # 53 "/usr/include/bits/struct_mutex.h" 3 4 }; #ifdef __x86_64__ # define __PTHREAD_MUTEX_INITIALIZER(__kind) \ 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } #else # 59 "/usr/include/bits/struct_mutex.h" 3 4 # define __PTHREAD_MUTEX_INITIALIZER(__kind) \ 0, 0, 0, __kind, 0, { { 0, 0 } } #endif # 62 "/usr/include/bits/struct_mutex.h" 3 4 #endif # 64 "/usr/include/bits/struct_mutex.h" 3 4 #endif /* struct_mutex.h expanded by -frewrite-includes */ # 77 "/usr/include/bits/thread-shared-types.h" 2 3 4 /* Arch-sepecific read-write lock definitions. A generic implementation is provided by struct_rwlock.h. If required, an architecture can override it by defining: 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). It should contain at least the internal members defined in the generic version. 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. It should initialize the rwlock internal type. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* struct_rwlock.h expanded by -frewrite-includes */ #include #else /* struct_rwlock.h expanded by -frewrite-includes */ # 89 "/usr/include/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/bits/struct_rwlock.h" 1 3 4 /* x86 internal rwlock struct definitions. Copyright (C) 2019-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _RWLOCK_INTERNAL_H #define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { unsigned int __readers; unsigned int __writers; unsigned int __wrphase_futex; unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; #ifdef __x86_64__ int __cur_writer; int __shared; signed char __rwelision; # ifdef __ILP32__ unsigned char __pad1[3]; # define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } # else # 39 "/usr/include/bits/struct_rwlock.h" 3 4 unsigned char __pad1[7]; # define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } # endif # 42 "/usr/include/bits/struct_rwlock.h" 3 4 unsigned long int __pad2; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; #else /* __x86_64__ */ # 47 "/usr/include/bits/struct_rwlock.h" 3 4 /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned char __flags; unsigned char __shared; signed char __rwelision; unsigned char __pad2; int __cur_writer; #endif # 55 "/usr/include/bits/struct_rwlock.h" 3 4 }; #ifdef __x86_64__ # define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags #else # 61 "/usr/include/bits/struct_rwlock.h" 3 4 # define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 #endif # 64 "/usr/include/bits/struct_rwlock.h" 3 4 #endif # 66 "/usr/include/bits/struct_rwlock.h" 3 4 #endif /* struct_rwlock.h expanded by -frewrite-includes */ # 90 "/usr/include/bits/thread-shared-types.h" 2 3 4 /* Common definition of pthread_cond_t. */ struct __pthread_cond_s { __atomic_wide_counter __wseq; __atomic_wide_counter __g1_start; unsigned int __g_refs[2] __LOCK_ALIGNMENT; unsigned int __g_size[2]; unsigned int __g1_orig_size; unsigned int __wrefs; unsigned int __g_signals[2]; }; typedef unsigned int __tss_t; typedef unsigned long int __thrd_t; typedef struct { int __data __ONCE_ALIGNMENT; } __once_flag; #define __ONCE_FLAG_INIT { 0 } #endif /* _THREAD_SHARED_TYPES_H */ # 116 "/usr/include/bits/thread-shared-types.h" 3 4 #endif /* thread-shared-types.h expanded by -frewrite-includes */ # 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ typedef unsigned long int pthread_t; /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ typedef union { char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; int __align; } pthread_mutexattr_t; /* Data structure for condition variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union { char __size[__SIZEOF_PTHREAD_CONDATTR_T]; int __align; } pthread_condattr_t; /* Keys for thread-specific data */ typedef unsigned int pthread_key_t; /* Once-only execution */ typedef int __ONCE_ALIGNMENT pthread_once_t; union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; }; #ifndef __have_pthread_attr_t typedef union pthread_attr_t pthread_attr_t; # define __have_pthread_attr_t 1 #endif # 65 "/usr/include/bits/pthreadtypes.h" 3 4 typedef union { struct __pthread_mutex_s __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; } pthread_mutex_t; typedef union { struct __pthread_cond_s __data; char __size[__SIZEOF_PTHREAD_COND_T]; __extension__ long long int __align; } pthread_cond_t; #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/include/bits/pthreadtypes.h" 3 4 /* Data structure for reader-writer lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union { struct __pthread_rwlock_arch_t __data; char __size[__SIZEOF_PTHREAD_RWLOCK_T]; long int __align; } pthread_rwlock_t; typedef union { char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; long int __align; } pthread_rwlockattr_t; #endif # 99 "/usr/include/bits/pthreadtypes.h" 3 4 #ifdef __USE_XOPEN2K /* POSIX spinlock data type. */ typedef volatile int pthread_spinlock_t; /* POSIX barriers data type. The structure of the type is deliberately not exposed. */ typedef union { char __size[__SIZEOF_PTHREAD_BARRIER_T]; long int __align; } pthread_barrier_t; typedef union { char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; int __align; } pthread_barrierattr_t; #endif # 120 "/usr/include/bits/pthreadtypes.h" 3 4 #endif # 122 "/usr/include/bits/pthreadtypes.h" 3 4 #endif /* pthreadtypes.h expanded by -frewrite-includes */ # 228 "/usr/include/sys/types.h" 2 3 4 #endif # 229 "/usr/include/sys/types.h" 3 4 __END_DECLS #endif /* sys/types.h */ # 233 "/usr/include/sys/types.h" 3 4 #endif /* types.h expanded by -frewrite-includes */ # 515 "/usr/include/stdlib.h" 2 3 4 /* These are the functions that actually do things. The `random', `srandom', `initstate' and `setstate' functions are those from BSD Unices. The `rand' and `srand' functions are required by the ANSI standard. We provide both interfaces to the same random number generator. */ /* Return a random long integer between 0 and 2^31-1 inclusive. */ extern long int random (void) __THROW; /* Seed the random number generator with the given number. */ extern void srandom (unsigned int __seed) __THROW; /* Initialize the random number generator to use state buffer STATEBUF, of length STATELEN, and seed it with SEED. Optimal lengths are 8, 16, 32, 64, 128 and 256, the bigger the better; values less than 8 will cause an error and values greater than 256 will be rounded down. */ extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __THROW __nonnull ((2)); /* Switch the random number generator to state buffer STATEBUF, which should have been previously initialized by `initstate'. */ extern char *setstate (char *__statebuf) __THROW __nonnull ((1)); # ifdef __USE_MISC /* Reentrant versions of the `random' family of functions. These functions all use the following data structure to contain state, rather than global state variables. */ struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) __THROW __nonnull ((1, 2)); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __THROW __nonnull ((2)); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __THROW __nonnull ((2, 4)); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __THROW __nonnull ((1, 2)); # endif /* Use misc. */ # 569 "/usr/include/stdlib.h" 3 4 #endif /* Use extended X/Open || misc. */ # 570 "/usr/include/stdlib.h" 3 4 /* Return a random integer between 0 and RAND_MAX inclusive. */ extern int rand (void) __THROW; /* Seed the random number generator with the given number. */ extern void srand (unsigned int __seed) __THROW; #ifdef __USE_POSIX199506 /* Reentrant interface according to POSIX.1. */ extern int rand_r (unsigned int *__seed) __THROW; #endif # 581 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 584 "/usr/include/stdlib.h" 3 4 /* System V style 48-bit random number generator functions. */ /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern double drand48 (void) __THROW; extern double erand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Return non-negative, long integer in [0,2^31). */ extern long int lrand48 (void) __THROW; extern long int nrand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Return signed, long integers in [-2^31,2^31). */ extern long int mrand48 (void) __THROW; extern long int jrand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Seed random number generator. */ extern void srand48 (long int __seedval) __THROW; extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __THROW __nonnull ((1)); extern void lcong48 (unsigned short int __param[7]) __THROW __nonnull ((1)); # ifdef __USE_MISC /* Data structure for communication with thread safe versions. This type is to be regarded as opaque. It's only exported because users have to allocate objects of this type. */ struct drand48_data { unsigned short int __x[3]; /* Current state. */ unsigned short int __old_x[3]; /* Old state. */ unsigned short int __c; /* Additive const. in congruential formula. */ unsigned short int __init; /* Flag for initializing. */ __extension__ unsigned long long int __a; /* Factor in congruential formula. */ }; /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __THROW __nonnull ((1, 2)); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __THROW __nonnull ((1, 2)); /* Return non-negative, long integer in [0,2^31). */ extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); /* Return signed, long integers in [-2^31,2^31). */ extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); /* Seed random number generator. */ extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __THROW __nonnull ((2)); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __THROW __nonnull ((1, 2)); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __THROW __nonnull ((1, 2)); /* Return a random integer between zero and 2**32-1 (inclusive). */ extern __uint32_t arc4random (void) __THROW __wur; /* Fill the buffer with random data. */ extern void arc4random_buf (void *__buf, size_t __size) __THROW __nonnull ((1)); /* Return a random number between zero (inclusive) and the specified limit (exclusive). */ extern __uint32_t arc4random_uniform (__uint32_t __upper_bound) __THROW __wur; # endif /* Use misc. */ # 669 "/usr/include/stdlib.h" 3 4 #endif /* Use misc or X/Open. */ # 670 "/usr/include/stdlib.h" 3 4 /* Allocate SIZE bytes of memory. */ extern void *malloc (size_t __size) __THROW __attribute_malloc__ __attribute_alloc_size__ ((1)) __wur; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t __nmemb, size_t __size) __THROW __attribute_malloc__ __attribute_alloc_size__ ((1, 2)) __wur; /* Re-allocate the previously allocated block in PTR, making the new block SIZE bytes long. */ /* __attribute_malloc__ is not used, because if realloc returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *realloc (void *__ptr, size_t __size) __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2)); /* Free a block allocated by `malloc', `realloc' or `calloc'. */ extern void free (void *__ptr) __THROW; #ifdef __USE_MISC /* Re-allocate the previously allocated block in PTR, making the new block large enough for NMEMB elements of SIZE bytes each. */ /* __attribute_malloc__ is not used, because if reallocarray returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3)) __attr_dealloc_free; /* Add reallocarray as its own deallocator. */ extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __THROW __attr_dealloc (reallocarray, 1); #endif # 704 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alloca.h expanded by -frewrite-includes */ # include #else /* alloca.h expanded by -frewrite-includes */ # 706 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/alloca.h" 1 3 4 /* Copyright (C) 1992-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ALLOCA_H #define _ALLOCA_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/alloca.h" 3 4 # 22 "/usr/include/alloca.h" 3 4 #define __need_size_t #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */ #include #else /* stddef.h expanded by -frewrite-includes */ # 24 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/clang/20/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stddef.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__MVS__) && __has_include_next() #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t #undef __need_wchar_t #undef __need_NULL #undef __need_nullptr_t #undef __need_unreachable #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/lib/clang/20/include/stddef.h" 3 4 # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 # 35 "/usr/lib/clang/20/include/stddef.h" 3 4 #else # 37 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_rsize_t) && !defined(__need_wchar_t) && \ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 43 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_rsize_t #endif # 50 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_wchar_t #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/clang/20/include/stddef.h" 3 4 /* * __stddef_null.h is special when building without modules: if __need_NULL is * set, then it will unconditionally redefine NULL. To avoid stepping on client * definitions of NULL, __need_NULL should only be set the first time this * header is included, that is when __STDDEF_H is not defined. However, when * building with modules, this header is a textual header and needs to * unconditionally include __stdef_null.h to support multiple submodules * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. * When SM.B builds, the definition from SM.A will leak when building without * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't * export NULL as expected. When building with modules, always include * __stddef_null.h so that everything works as expected. */ #define __need_NULL #endif # 69 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_nullptr_t #endif # 73 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 74 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_unreachable #endif # 76 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 78 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_max_align_t #endif # 80 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_offsetof /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 84 "/usr/lib/clang/20/include/stddef.h" 3 4 # 85 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif # 86 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_ptrdiff_t.h> #endif /* expanded by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 # 89 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 91 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_size_t.h expanded by -frewrite-includes */ #include <__stddef_size_t.h> #else /* __stddef_size_t.h expanded by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_size_t.h" 1 3 4 /*===---- __stddef_size_t.h - Definition of size_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #define _SIZE_T typedef __SIZE_TYPE__ size_t; #endif # 21 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #endif /* __stddef_size_t.h expanded by -frewrite-includes */ # 94 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 96 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_rsize_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_rsize_t.h> #endif /* expanded by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 # 99 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_rsize_t #endif /* defined(__need_rsize_t) */ # 101 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wchar_t.h> #endif /* expanded by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 # 104 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 106 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_null.h> #endif /* expanded by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 # 109 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 111 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_nullptr_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_nullptr_t.h> #endif /* expanded by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 # 114 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_nullptr_t #endif /* defined(__need_nullptr_t) */ # 116 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_unreachable) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_unreachable.h> #endif /* expanded by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 # 119 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_unreachable #endif /* defined(__need_unreachable) */ # 121 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_max_align_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_max_align_t.h> #endif /* expanded by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 # 124 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_max_align_t #endif /* defined(__need_max_align_t) */ # 126 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_offsetof) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_offsetof.h> #endif /* expanded by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 # 129 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_offsetof #endif /* defined(__need_offsetof) */ # 131 "/usr/lib/clang/20/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wint_t.h> #endif /* expanded by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 # 136 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 138 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* __MVS__ */ # 140 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* stddef.h expanded by -frewrite-includes */ # 25 "/usr/include/alloca.h" 2 3 4 __BEGIN_DECLS /* Remove any previous definition. */ #undef alloca /* Allocate a block that will be freed when the calling function exits. */ extern void *alloca (size_t __size) __THROW; #ifdef __GNUC__ # define alloca(size) __builtin_alloca (size) #endif /* GCC. */ # 37 "/usr/include/alloca.h" 3 4 __END_DECLS #endif /* alloca.h */ # 41 "/usr/include/alloca.h" 3 4 #endif /* alloca.h expanded by -frewrite-includes */ # 707 "/usr/include/stdlib.h" 2 3 4 #endif /* Use misc. */ # 708 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \ || defined __USE_MISC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 711 "/usr/include/stdlib.h" 3 4 /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ extern void *valloc (size_t __size) __THROW __attribute_malloc__ __attribute_alloc_size__ ((1)) __wur; #endif # 715 "/usr/include/stdlib.h" 3 4 #ifdef __USE_XOPEN2K /* Allocate memory of SIZE bytes with an alignment of ALIGNMENT. */ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __THROW __nonnull ((1)) __wur; #endif # 721 "/usr/include/stdlib.h" 3 4 #ifdef __USE_ISOC11 /* ISO C variant of aligned allocation. */ extern void *aligned_alloc (size_t __alignment, size_t __size) __THROW __attribute_malloc__ __attribute_alloc_align__ ((1)) __attribute_alloc_size__ ((2)) __wur; #endif # 728 "/usr/include/stdlib.h" 3 4 /* Abort execution and generate a core-dump. */ extern void abort (void) __THROW __attribute__ ((__noreturn__)); /* Register a function to be called when `exit' is called. */ extern int atexit (void (*__func) (void)) __THROW __nonnull ((1)); #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC11 || defined __USE_ISOCXX11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 737 "/usr/include/stdlib.h" 3 4 /* Register a function to be called when `quick_exit' is called. */ # ifdef __cplusplus extern "C++" int at_quick_exit (void (*__func) (void)) __THROW __asm ("at_quick_exit") __nonnull ((1)); # else # 742 "/usr/include/stdlib.h" 3 4 extern int at_quick_exit (void (*__func) (void)) __THROW __nonnull ((1)); # endif # 744 "/usr/include/stdlib.h" 3 4 #endif # 745 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* Register a function to be called with the status given to `exit' and the given argument. */ extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __THROW __nonnull ((1)); #endif # 752 "/usr/include/stdlib.h" 3 4 /* Call all functions registered with `atexit' and `on_exit', in the reverse of the order in which they were registered, perform stdio cleanup, and terminate program execution with STATUS. */ extern void exit (int __status) __THROW __attribute__ ((__noreturn__)); #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC11 || defined __USE_ISOCXX11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 759 "/usr/include/stdlib.h" 3 4 /* Call all functions registered with `at_quick_exit' in the reverse of the order in which they were registered and terminate program execution with STATUS. */ extern void quick_exit (int __status) __THROW __attribute__ ((__noreturn__)); #endif # 764 "/usr/include/stdlib.h" 3 4 #ifdef __USE_ISOC99 /* Terminate the program with STATUS without calling any of the functions registered with `atexit' or `on_exit'. */ extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__)); #endif # 770 "/usr/include/stdlib.h" 3 4 /* Return the value of envariable NAME, or NULL if it doesn't exist. */ extern char *getenv (const char *__name) __THROW __nonnull ((1)) __wur; #ifdef __USE_GNU /* This function is similar to the above but returns NULL if the programs is running with SUID or SGID enabled. */ extern char *secure_getenv (const char *__name) __THROW __nonnull ((1)) __wur; #endif # 781 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 783 "/usr/include/stdlib.h" 3 4 /* The SVID says this is in , but this seems a better place. */ /* Put STRING, which is of the form "NAME=VALUE", in the environment. If there is no `=', remove NAME from the environment. */ extern int putenv (char *__string) __THROW __nonnull ((1)); #endif # 788 "/usr/include/stdlib.h" 3 4 #ifdef __USE_XOPEN2K /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ extern int setenv (const char *__name, const char *__value, int __replace) __THROW __nonnull ((2)); /* Remove the variable NAME from the environment. */ extern int unsetenv (const char *__name) __THROW __nonnull ((1)); #endif # 798 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* The `clearenv' was planned to be added to POSIX.1 but probably never made it. Nevertheless the POSIX.9 standard (POSIX bindings for Fortran 77) requires this function. */ extern int clearenv (void) __THROW; #endif # 805 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC \ || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 809 "/usr/include/stdlib.h" 3 4 /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Always returns TEMPLATE, it's either a temporary file name or a null string if it cannot get a unique file name. */ extern char *mktemp (char *__template) __THROW __nonnull ((1)); #endif # 816 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 818 "/usr/include/stdlib.h" 3 4 /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the filename unique. Returns a file descriptor open on the file for reading and writing, or -1 if it cannot create a uniquely-named file. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkstemp (char *__template) __nonnull ((1)) __wur; # else # 829 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (mkstemp, (char *__template), mkstemp64) __nonnull ((1)) __wur; # else # 833 "/usr/include/stdlib.h" 3 4 # define mkstemp mkstemp64 # endif # 835 "/usr/include/stdlib.h" 3 4 # endif # 836 "/usr/include/stdlib.h" 3 4 # ifdef __USE_LARGEFILE64 extern int mkstemp64 (char *__template) __nonnull ((1)) __wur; # endif # 839 "/usr/include/stdlib.h" 3 4 #endif # 840 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* Similar to mkstemp, but the template can have a suffix after the XXXXXX. The length of the suffix is specified in the second parameter. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkstemps (char *__template, int __suffixlen) __nonnull ((1)) __wur; # else # 851 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (mkstemps, (char *__template, int __suffixlen), mkstemps64) __nonnull ((1)) __wur; # else # 855 "/usr/include/stdlib.h" 3 4 # define mkstemps mkstemps64 # endif # 857 "/usr/include/stdlib.h" 3 4 # endif # 858 "/usr/include/stdlib.h" 3 4 # ifdef __USE_LARGEFILE64 extern int mkstemps64 (char *__template, int __suffixlen) __nonnull ((1)) __wur; # endif # 862 "/usr/include/stdlib.h" 3 4 #endif # 863 "/usr/include/stdlib.h" 3 4 #ifdef __USE_XOPEN2K8 /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur; #endif # 872 "/usr/include/stdlib.h" 3 4 #ifdef __USE_GNU /* Generate a unique temporary file name from TEMPLATE similar to mkstemp. But allow the caller to pass additional flags which are used in the open call to create the file.. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur; # else # 883 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64) __nonnull ((1)) __wur; # else # 887 "/usr/include/stdlib.h" 3 4 # define mkostemp mkostemp64 # endif # 889 "/usr/include/stdlib.h" 3 4 # endif # 890 "/usr/include/stdlib.h" 3 4 # ifdef __USE_LARGEFILE64 extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur; # endif # 893 "/usr/include/stdlib.h" 3 4 /* Similar to mkostemp, but the template can have a suffix after the XXXXXX. The length of the suffix is specified in the second parameter. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkostemps (char *__template, int __suffixlen, int __flags) __nonnull ((1)) __wur; # else # 904 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (mkostemps, (char *__template, int __suffixlen, int __flags), mkostemps64) __nonnull ((1)) __wur; # else # 909 "/usr/include/stdlib.h" 3 4 # define mkostemps mkostemps64 # endif # 911 "/usr/include/stdlib.h" 3 4 # endif # 912 "/usr/include/stdlib.h" 3 4 # ifdef __USE_LARGEFILE64 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __nonnull ((1)) __wur; # endif # 916 "/usr/include/stdlib.h" 3 4 #endif # 917 "/usr/include/stdlib.h" 3 4 /* Execute the given line as a shell command. This function is a cancellation point and therefore not marked with __THROW. */ extern int system (const char *__command) __wur; #ifdef __USE_GNU /* Return a malloc'd string containing the canonical absolute name of the existing named file. */ extern char *canonicalize_file_name (const char *__name) __THROW __nonnull ((1)) __attribute_malloc__ __attr_dealloc_free __wur; #endif # 933 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 935 "/usr/include/stdlib.h" 3 4 /* Return the canonical absolute name of file NAME. If RESOLVED is null, the result is malloc'd; otherwise, if the canonical name is PATH_MAX chars or more, returns null with `errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. */ extern char *realpath (const char *__restrict __name, char *__restrict __resolved) __THROW __wur; #endif # 943 "/usr/include/stdlib.h" 3 4 /* Shorthand for type of comparison functions. */ #ifndef __COMPAR_FN_T # define __COMPAR_FN_T typedef int (*__compar_fn_t) (const void *, const void *); # ifdef __USE_GNU typedef __compar_fn_t comparison_fn_t; # endif # 953 "/usr/include/stdlib.h" 3 4 #endif # 954 "/usr/include/stdlib.h" 3 4 #ifdef __USE_GNU typedef int (*__compar_d_fn_t) (const void *, const void *, void *); #endif # 957 "/usr/include/stdlib.h" 3 4 /* Do a binary search for KEY in BASE, which consists of NMEMB elements of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 2, 5)) __wur; #ifdef __USE_EXTERN_INLINES #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib-bsearch.h expanded by -frewrite-includes */ # include #else /* stdlib-bsearch.h expanded by -frewrite-includes */ # 965 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/bits/stdlib-bsearch.h" 1 3 4 /* Perform binary search - inline version. Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ __extern_inline void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) { size_t __l, __u, __idx; const void *__p; int __comparison; __l = 0; __u = __nmemb; while (__l < __u) { __idx = (__l + __u) / 2; __p = (const void *) (((const char *) __base) + (__idx * __size)); __comparison = (*__compar) (__key, __p); if (__comparison < 0) __u = __idx; else if (__comparison > 0) __l = __idx + 1; else { #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ(4, 6) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/include/bits/stdlib-bsearch.h" 3 4 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wcast-qual" #endif # 44 "/usr/include/bits/stdlib-bsearch.h" 3 4 return (void *) __p; #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ(4, 6) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 46 "/usr/include/bits/stdlib-bsearch.h" 3 4 # pragma GCC diagnostic pop #endif # 48 "/usr/include/bits/stdlib-bsearch.h" 3 4 } } return NULL; } #endif /* stdlib-bsearch.h expanded by -frewrite-includes */ # 966 "/usr/include/stdlib.h" 2 3 4 #endif # 967 "/usr/include/stdlib.h" 3 4 /* Sort NMEMB elements of BASE, of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 4)); #ifdef __USE_GNU extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __nonnull ((1, 4)); #endif # 977 "/usr/include/stdlib.h" 3 4 /* Return the absolute value of X. */ extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; extern long int labs (long int __x) __THROW __attribute__ ((__const__)) __wur; #ifdef __USE_ISOC99 __extension__ extern long long int llabs (long long int __x) __THROW __attribute__ ((__const__)) __wur; #endif # 987 "/usr/include/stdlib.h" 3 4 /* Return the `div_t', `ldiv_t' or `lldiv_t' representation of the value of NUMER over DENOM. */ /* GCC may have built-ins for these someday. */ extern div_t div (int __numer, int __denom) __THROW __attribute__ ((__const__)) __wur; extern ldiv_t ldiv (long int __numer, long int __denom) __THROW __attribute__ ((__const__)) __wur; #ifdef __USE_ISOC99 __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __THROW __attribute__ ((__const__)) __wur; #endif # 1002 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \ || defined __USE_MISC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1006 "/usr/include/stdlib.h" 3 4 /* Convert floating point numbers to strings. The returned values are valid only until another call to the same function. */ /* Convert VALUE to a string with NDIGIT digits and return a pointer to this. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; /* Convert VALUE to a string rounded to NDIGIT decimal digits. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; /* If possible convert VALUE to a string with NDIGIT significant digits. Otherwise use exponential representation. The resulting string will be written to BUF. */ extern char *gcvt (double __value, int __ndigit, char *__buf) __THROW __nonnull ((3)) __wur; #endif # 1027 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* Long double versions of above functions. */ extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; extern char *qgcvt (long double __value, int __ndigit, char *__buf) __THROW __nonnull ((3)) __wur; /* Reentrant version of the functions above which provide their own buffers. */ extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); #endif /* misc */ # 1058 "/usr/include/stdlib.h" 3 4 /* Return the length of the multibyte character in S, which is no longer than N. */ extern int mblen (const char *__s, size_t __n) __THROW; /* Return the length of the given multibyte character, putting its `wchar_t' representation in *PWC. */ extern int mbtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n) __THROW; /* Put the multibyte character represented by WCHAR in S, returning its length. */ extern int wctomb (char *__s, wchar_t __wchar) __THROW; /* Convert a multibyte string to a wide char string. */ extern size_t mbstowcs (wchar_t *__restrict __pwcs, const char *__restrict __s, size_t __n) __THROW __attr_access ((__read_only__, 2)); /* Convert a wide char string to multibyte string. */ extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) __THROW __fortified_attr_access (__write_only__, 1, 3) __attr_access ((__read_only__, 2)); #ifdef __USE_MISC /* Determine whether the string value of RESPONSE matches the affirmation or negative response expression as specified by the LC_MESSAGES category in the program's current locale. Returns 1 if affirmative, 0 if negative, and -1 if not matching. */ extern int rpmatch (const char *__response) __THROW __nonnull ((1)) __wur; #endif # 1090 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1093 "/usr/include/stdlib.h" 3 4 /* Parse comma separated suboption from *OPTIONP and match against strings in TOKENS. If found return index and set *VALUEP to optional value introduced by an equal sign. If the suboption is not part of TOKENS return in *VALUEP beginning of unknown suboption. On exit *OPTIONP is set to the beginning of the next token or at the terminating NUL character. */ extern int getsubopt (char **__restrict __optionp, char *const *__restrict __tokens, char **__restrict __valuep) __THROW __nonnull ((1, 2, 3)) __wur; #endif # 1104 "/usr/include/stdlib.h" 3 4 /* X/Open pseudo terminal handling. */ #ifdef __USE_XOPEN2KXSI /* Return a master pseudo-terminal handle. */ extern int posix_openpt (int __oflag) __wur; #endif # 1112 "/usr/include/stdlib.h" 3 4 #ifdef __USE_XOPEN_EXTENDED /* The next four functions all take a master pseudo-tty fd and perform an operation on the associated slave: */ /* Chown the slave to the calling user. */ extern int grantpt (int __fd) __THROW; /* Release an internal lock so the slave can be opened. Call after grantpt(). */ extern int unlockpt (int __fd) __THROW; /* Return the pathname of the pseudo terminal slave associated with the master FD is open on, or NULL on errors. The returned storage is good until the next call to this function. */ extern char *ptsname (int __fd) __THROW __wur; #endif # 1129 "/usr/include/stdlib.h" 3 4 #ifdef __USE_GNU /* Store at most BUFLEN characters of the pathname of the slave pseudo terminal associated with the master FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __THROW __nonnull ((2)) __fortified_attr_access (__write_only__, 2, 3); /* Open a master pseudo terminal and return its file descriptor. */ extern int getpt (void); #endif # 1140 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. Return the number written (never more than three, but may be less than NELEM), or -1 if an error occurred. */ extern int getloadavg (double __loadavg[], int __nelem) __THROW __nonnull ((1)); #endif # 1148 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1150 "/usr/include/stdlib.h" 3 4 /* Return the index into the active-logins file (utmp) for the controlling terminal. */ extern int ttyslot (void) __THROW; #endif # 1154 "/usr/include/stdlib.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib-float.h expanded by -frewrite-includes */ #include #else /* stdlib-float.h expanded by -frewrite-includes */ # 1155 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/bits/stdlib-float.h" 1 3 4 /* Floating-point inline functions for stdlib.h. Copyright (C) 2012-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDLIB_H # error "Never use directly; include instead." #endif # 22 "/usr/include/bits/stdlib-float.h" 3 4 #ifdef __USE_EXTERN_INLINES __extern_inline double __NTH (atof (const char *__nptr)) { return strtod (__nptr, (char **) NULL); } #endif /* Optimizing and Inlining. */ # 30 "/usr/include/bits/stdlib-float.h" 3 4 #endif /* stdlib-float.h expanded by -frewrite-includes */ # 1156 "/usr/include/stdlib.h" 2 3 4 /* Define some macros helping to catch buffer overflows. */ #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1159 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 1159 "/usr/include/stdlib.h" 3 4 # 1160 "/usr/include/stdlib.h" 3 4 #endif # 1161 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 1162 "/usr/include/stdlib.h" 3 4 # 1163 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1164 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 1164 "/usr/include/stdlib.h" 3 4 # 1165 "/usr/include/stdlib.h" 3 4 #endif # 1166 "/usr/include/stdlib.h" 3 4 __END_DECLS #endif /* stdlib.h */ # 1170 "/usr/include/stdlib.h" 3 4 #endif /* stdlib.h expanded by -frewrite-includes */ # 38 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdio.h expanded by -frewrite-includes */ #include #else /* stdio.h expanded by -frewrite-includes */ # 38 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" # 1 "/usr/include/stdio.h" 1 3 4 /* Define ISO C stdio on top of C++ iostreams. Copyright (C) 1991-2024 Free Software Foundation, Inc. Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.19 Input/output */ #ifndef _STDIO_H #define _STDIO_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* libc-header-start.h expanded by -frewrite-includes */ #include #else /* libc-header-start.h expanded by -frewrite-includes */ # 28 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION # error "Never include directly." #endif # 30 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/bits/libc-header-start.h" 3 4 # 34 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ #undef __GLIBC_USE_LIB_EXT2 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 40 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 1 #else # 42 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 0 #endif # 44 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. Most but not all symbols enabled by that macro in TS 18661-1 are enabled unconditionally in C23. In C23, the symbols in Annex F still require a new feature test macro __STDC_WANT_IEC_60559_EXT__ instead (C23 does not define __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS 18661-1 are not included in C23 (and thus should depend on __STDC_WANT_IEC_60559_BFP_EXT__ even when C23 features are enabled). __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS 18661-1 not included in C23. __GLIBC_USE (IEC_60559_BFP_EXT_C23) controls those features from TS 18661-1 that are also included in C23 (with no feature test macro required in C23). __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1 that are included in C23 but conditional on __STDC_WANT_IEC_60559_EXT__. (There are currently no features conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS 18661-1.) */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # 71 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif # 73 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_BFP_EXT_C23 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C23 1 #else # 77 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C23 0 #endif # 79 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_EXT #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_EXT 1 #else # 83 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_EXT 0 #endif # 85 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction functions, the symbols from this TS are enabled unconditionally in C23. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 92 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # 94 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif # 96 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 98 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 1 #else # 100 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 0 #endif # 102 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_TYPES_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 107 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # 109 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 #endif # 111 "/usr/include/bits/libc-header-start.h" 3 4 #endif /* libc-header-start.h expanded by -frewrite-includes */ # 29 "/usr/include/stdio.h" 2 3 4 __BEGIN_DECLS #define __need_size_t #define __need_NULL #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */ #include #else /* stddef.h expanded by -frewrite-includes */ # 34 "/usr/include/stdio.h" 3 4 # 1 "/usr/lib/clang/20/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stddef.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__MVS__) && __has_include_next() #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t #undef __need_wchar_t #undef __need_NULL #undef __need_nullptr_t #undef __need_unreachable #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/lib/clang/20/include/stddef.h" 3 4 # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 # 35 "/usr/lib/clang/20/include/stddef.h" 3 4 #else # 37 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_rsize_t) && !defined(__need_wchar_t) && \ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 43 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_rsize_t #endif # 50 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_wchar_t #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/clang/20/include/stddef.h" 3 4 /* * __stddef_null.h is special when building without modules: if __need_NULL is * set, then it will unconditionally redefine NULL. To avoid stepping on client * definitions of NULL, __need_NULL should only be set the first time this * header is included, that is when __STDDEF_H is not defined. However, when * building with modules, this header is a textual header and needs to * unconditionally include __stdef_null.h to support multiple submodules * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. * When SM.B builds, the definition from SM.A will leak when building without * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't * export NULL as expected. When building with modules, always include * __stddef_null.h so that everything works as expected. */ #define __need_NULL #endif # 69 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_nullptr_t #endif # 73 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 74 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_unreachable #endif # 76 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 78 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_max_align_t #endif # 80 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_offsetof /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 84 "/usr/lib/clang/20/include/stddef.h" 3 4 # 85 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif # 86 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_ptrdiff_t.h> #endif /* expanded by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 # 89 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 91 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_size_t.h expanded by -frewrite-includes */ #include <__stddef_size_t.h> #else /* __stddef_size_t.h expanded by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_size_t.h" 1 3 4 /*===---- __stddef_size_t.h - Definition of size_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #define _SIZE_T typedef __SIZE_TYPE__ size_t; #endif # 21 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #endif /* __stddef_size_t.h expanded by -frewrite-includes */ # 94 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 96 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_rsize_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_rsize_t.h> #endif /* expanded by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 # 99 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_rsize_t #endif /* defined(__need_rsize_t) */ # 101 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wchar_t.h> #endif /* expanded by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 # 104 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 106 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_null.h expanded by -frewrite-includes */ #include <__stddef_null.h> #else /* __stddef_null.h expanded by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_null.h" 1 3 4 /*===---- __stddef_null.h - Definition of NULL -----------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(NULL) || !__building_module(_Builtin_stddef) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 11 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 /* linux/stddef.h will define NULL to 0. glibc (and other) headers then define * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. * Modules don't support redefining macros like that, but support that pattern * in the non-modules case. */ #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 21 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL __null #else # 23 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL 0 #endif # 25 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #else # 26 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL ((void*)0) #endif # 28 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #endif # 30 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #endif /* __stddef_null.h expanded by -frewrite-includes */ # 109 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 111 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_nullptr_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_nullptr_t.h> #endif /* expanded by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 # 114 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_nullptr_t #endif /* defined(__need_nullptr_t) */ # 116 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_unreachable) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_unreachable.h> #endif /* expanded by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 # 119 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_unreachable #endif /* defined(__need_unreachable) */ # 121 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_max_align_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_max_align_t.h> #endif /* expanded by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 # 124 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_max_align_t #endif /* defined(__need_max_align_t) */ # 126 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_offsetof) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_offsetof.h> #endif /* expanded by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 # 129 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_offsetof #endif /* defined(__need_offsetof) */ # 131 "/usr/lib/clang/20/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wint_t.h> #endif /* expanded by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 # 136 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 138 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* __MVS__ */ # 140 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* stddef.h expanded by -frewrite-includes */ # 35 "/usr/include/stdio.h" 2 3 4 #define __need___va_list #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdarg.h expanded by -frewrite-includes */ #include #else /* stdarg.h expanded by -frewrite-includes */ # 37 "/usr/include/stdio.h" 3 4 # 1 "/usr/lib/clang/20/include/stdarg.h" 1 3 4 /*===---- stdarg.h - Variable argument handling ----------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stdarg.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__MVS__) && __has_include_next() #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/lib/clang/20/include/stdarg.h" 3 4 #undef __need___va_list #undef __need_va_list #undef __need_va_arg #undef __need___va_copy #undef __need_va_copy #if 0 /* expanded by -frewrite-includes */ #include <__stdarg_header_macro.h> #endif /* expanded by -frewrite-includes */ # 28 "/usr/lib/clang/20/include/stdarg.h" 3 4 # 29 "/usr/lib/clang/20/include/stdarg.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 29 "/usr/lib/clang/20/include/stdarg.h" 3 4 # 30 "/usr/lib/clang/20/include/stdarg.h" 3 4 #else # 32 "/usr/lib/clang/20/include/stdarg.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need___va_list) && !defined(__need_va_list) && \ !defined(__need_va_arg) && !defined(__need___va_copy) && \ !defined(__need_va_copy) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 35 "/usr/lib/clang/20/include/stdarg.h" 3 4 #define __need___va_list #define __need_va_list #define __need_va_arg #define __need___va_copy /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode * or -ansi is not specified, since it was not part of C90. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) || \ !defined(__STRICT_ANSI__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 45 "/usr/lib/clang/20/include/stdarg.h" 3 4 #define __need_va_copy #endif # 47 "/usr/lib/clang/20/include/stdarg.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stdarg_header_macro.h> #endif /* expanded by -frewrite-includes */ # 47 "/usr/lib/clang/20/include/stdarg.h" 3 4 # 48 "/usr/lib/clang/20/include/stdarg.h" 3 4 #endif # 49 "/usr/lib/clang/20/include/stdarg.h" 3 4 #ifdef __need___va_list #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stdarg___gnuc_va_list.h expanded by -frewrite-includes */ #include <__stdarg___gnuc_va_list.h> #else /* __stdarg___gnuc_va_list.h expanded by -frewrite-includes */ # 51 "/usr/lib/clang/20/include/stdarg.h" 3 4 # 1 "/usr/lib/clang/20/include/__stdarg___gnuc_va_list.h" 1 3 4 /*===---- __stdarg___gnuc_va_list.h - Definition of __gnuc_va_list ---------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST typedef __builtin_va_list __gnuc_va_list; #endif # 14 "/usr/lib/clang/20/include/__stdarg___gnuc_va_list.h" 3 4 #endif /* __stdarg___gnuc_va_list.h expanded by -frewrite-includes */ # 52 "/usr/lib/clang/20/include/stdarg.h" 2 3 4 #undef __need___va_list #endif /* defined(__need___va_list) */ # 54 "/usr/lib/clang/20/include/stdarg.h" 3 4 #ifdef __need_va_list #if 0 /* expanded by -frewrite-includes */ #include <__stdarg_va_list.h> #endif /* expanded by -frewrite-includes */ # 56 "/usr/lib/clang/20/include/stdarg.h" 3 4 # 57 "/usr/lib/clang/20/include/stdarg.h" 3 4 #undef __need_va_list #endif /* defined(__need_va_list) */ # 59 "/usr/lib/clang/20/include/stdarg.h" 3 4 #ifdef __need_va_arg #if 0 /* expanded by -frewrite-includes */ #include <__stdarg_va_arg.h> #endif /* expanded by -frewrite-includes */ # 61 "/usr/lib/clang/20/include/stdarg.h" 3 4 # 62 "/usr/lib/clang/20/include/stdarg.h" 3 4 #undef __need_va_arg #endif /* defined(__need_va_arg) */ # 64 "/usr/lib/clang/20/include/stdarg.h" 3 4 #ifdef __need___va_copy #if 0 /* expanded by -frewrite-includes */ #include <__stdarg___va_copy.h> #endif /* expanded by -frewrite-includes */ # 66 "/usr/lib/clang/20/include/stdarg.h" 3 4 # 67 "/usr/lib/clang/20/include/stdarg.h" 3 4 #undef __need___va_copy #endif /* defined(__need___va_copy) */ # 69 "/usr/lib/clang/20/include/stdarg.h" 3 4 #ifdef __need_va_copy #if 0 /* expanded by -frewrite-includes */ #include <__stdarg_va_copy.h> #endif /* expanded by -frewrite-includes */ # 71 "/usr/lib/clang/20/include/stdarg.h" 3 4 # 72 "/usr/lib/clang/20/include/stdarg.h" 3 4 #undef __need_va_copy #endif /* defined(__need_va_copy) */ # 74 "/usr/lib/clang/20/include/stdarg.h" 3 4 #endif /* __MVS__ */ # 76 "/usr/lib/clang/20/include/stdarg.h" 3 4 #endif /* stdarg.h expanded by -frewrite-includes */ # 38 "/usr/include/stdio.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/stdio.h" 3 4 # 40 "/usr/include/stdio.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __fpos_t.h expanded by -frewrite-includes */ #include #else /* __fpos_t.h expanded by -frewrite-includes */ # 40 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/types/__fpos_t.h" 1 3 4 #ifndef _____fpos_t_defined #define _____fpos_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/bits/types/__fpos_t.h" 3 4 # 5 "/usr/include/bits/types/__fpos_t.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __mbstate_t.h expanded by -frewrite-includes */ #include #else /* __mbstate_t.h expanded by -frewrite-includes */ # 5 "/usr/include/bits/types/__fpos_t.h" 3 4 # 1 "/usr/include/bits/types/__mbstate_t.h" 1 3 4 #ifndef ____mbstate_t_defined #define ____mbstate_t_defined 1 /* Integral type unchanged by default argument promotions that can hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ #ifndef __WINT_TYPE__ # define __WINT_TYPE__ unsigned int #endif # 11 "/usr/include/bits/types/__mbstate_t.h" 3 4 /* Conversion state information. */ typedef struct { int __count; union { __WINT_TYPE__ __wch; char __wchb[4]; } __value; /* Value so far. */ } __mbstate_t; #endif # 24 "/usr/include/bits/types/__mbstate_t.h" 3 4 #endif /* __mbstate_t.h expanded by -frewrite-includes */ # 6 "/usr/include/bits/types/__fpos_t.h" 2 3 4 /* The tag name of this struct is _G_fpos_t to preserve historic C++ mangled names for functions taking fpos_t arguments. That name should not be used in new code. */ typedef struct _G_fpos_t { __off_t __pos; __mbstate_t __state; } __fpos_t; #endif # 17 "/usr/include/bits/types/__fpos_t.h" 3 4 #endif /* __fpos_t.h expanded by -frewrite-includes */ # 41 "/usr/include/stdio.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __fpos64_t.h expanded by -frewrite-includes */ #include #else /* __fpos64_t.h expanded by -frewrite-includes */ # 41 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/types/__fpos64_t.h" 1 3 4 #ifndef _____fpos64_t_defined #define _____fpos64_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/bits/types/__fpos64_t.h" 3 4 # 5 "/usr/include/bits/types/__fpos64_t.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 5 "/usr/include/bits/types/__fpos64_t.h" 3 4 # 6 "/usr/include/bits/types/__fpos64_t.h" 3 4 /* The tag name of this struct is _G_fpos64_t to preserve historic C++ mangled names for functions taking fpos_t and/or fpos64_t arguments. That name should not be used in new code. */ typedef struct _G_fpos64_t { __off64_t __pos; __mbstate_t __state; } __fpos64_t; #endif # 17 "/usr/include/bits/types/__fpos64_t.h" 3 4 #endif /* __fpos64_t.h expanded by -frewrite-includes */ # 42 "/usr/include/stdio.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __FILE.h expanded by -frewrite-includes */ #include #else /* __FILE.h expanded by -frewrite-includes */ # 42 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/types/__FILE.h" 1 3 4 #ifndef ____FILE_defined #define ____FILE_defined 1 struct _IO_FILE; typedef struct _IO_FILE __FILE; #endif # 8 "/usr/include/bits/types/__FILE.h" 3 4 #endif /* __FILE.h expanded by -frewrite-includes */ # 43 "/usr/include/stdio.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* FILE.h expanded by -frewrite-includes */ #include #else /* FILE.h expanded by -frewrite-includes */ # 43 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/types/FILE.h" 1 3 4 #ifndef __FILE_defined #define __FILE_defined 1 struct _IO_FILE; /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; #endif # 10 "/usr/include/bits/types/FILE.h" 3 4 #endif /* FILE.h expanded by -frewrite-includes */ # 44 "/usr/include/stdio.h" 2 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* struct_FILE.h expanded by -frewrite-includes */ #include #else /* struct_FILE.h expanded by -frewrite-includes */ # 44 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/types/struct_FILE.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __struct_FILE_defined #define __struct_FILE_defined 1 /* Caution: The contents of this file are not part of the official stdio.h API. However, much of it is part of the official *binary* interface, and therefore cannot be changed. */ #if 0 /* disabled by -frewrite-includes */ #if defined _IO_USE_OLD_IO_FILE && !defined _LIBC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 26 "/usr/include/bits/types/struct_FILE.h" 3 4 # error "_IO_USE_OLD_IO_FILE should only be defined when building libc itself" #endif # 28 "/usr/include/bits/types/struct_FILE.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _IO_lock_t_defined && !defined _LIBC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/include/bits/types/struct_FILE.h" 3 4 # error "_IO_lock_t_defined should only be defined when building libc itself" #endif # 32 "/usr/include/bits/types/struct_FILE.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/bits/types/struct_FILE.h" 3 4 # 34 "/usr/include/bits/types/struct_FILE.h" 3 4 struct _IO_FILE; struct _IO_marker; struct _IO_codecvt; struct _IO_wide_data; /* During the build of glibc itself, _IO_lock_t will already have been defined by internal headers. */ #ifndef _IO_lock_t_defined typedef void _IO_lock_t; #endif # 45 "/usr/include/bits/types/struct_FILE.h" 3 4 /* The tag name of this struct is _IO_FILE to preserve historic C++ mangled names for functions taking FILE* arguments. That name should not be used in new code. */ struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ /* The following pointers correspond to the C++ streambuf protocol. */ char *_IO_read_ptr; /* Current read pointer */ char *_IO_read_end; /* End of get area. */ char *_IO_read_base; /* Start of putback+get area. */ char *_IO_write_base; /* Start of put area. */ char *_IO_write_ptr; /* Current put pointer. */ char *_IO_write_end; /* End of put area. */ char *_IO_buf_base; /* Start of reserve area. */ char *_IO_buf_end; /* End of reserve area. */ /* The following fields are used to support backing up and undo. */ char *_IO_save_base; /* Pointer to start of non-current get area. */ char *_IO_backup_base; /* Pointer to first valid character of backup area */ char *_IO_save_end; /* Pointer to end of non-current get area. */ struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; /* This used to be _offset but it's too small. */ /* 1+column number of pbase(); 0 is unknown. */ unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; #ifdef _IO_USE_OLD_IO_FILE }; struct _IO_FILE_complete { struct _IO_FILE _file; #endif # 89 "/usr/include/bits/types/struct_FILE.h" 3 4 __off64_t _offset; /* Wide character stream stuff. */ struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; struct _IO_FILE **_prevchain; int _mode; /* Make sure we don't get into trouble again. */ char _unused2[15 * sizeof (int) - 5 * sizeof (void *)]; }; /* These macros are used by bits/stdio.h and internal headers. */ #define __getc_unlocked_body(_fp) \ (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) \ ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) #define __putc_unlocked_body(_ch, _fp) \ (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \ ? __overflow (_fp, (unsigned char) (_ch)) \ : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) #define _IO_EOF_SEEN 0x0010 #define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ERR_SEEN 0x0020 #define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0) #define _IO_USER_LOCK 0x8000 /* Many more flag bits are defined internally. */ #endif # 121 "/usr/include/bits/types/struct_FILE.h" 3 4 #endif /* struct_FILE.h expanded by -frewrite-includes */ # 45 "/usr/include/stdio.h" 2 3 4 #ifdef __USE_MISC #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cookie_io_functions_t.h expanded by -frewrite-includes */ # include #else /* cookie_io_functions_t.h expanded by -frewrite-includes */ # 47 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/types/cookie_io_functions_t.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __cookie_io_functions_t_defined #define __cookie_io_functions_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/bits/types/cookie_io_functions_t.h" 3 4 # 22 "/usr/include/bits/types/cookie_io_functions_t.h" 3 4 /* Functions to do I/O and file management for a stream. */ /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, size_t __nbytes); /* Write NBYTES bytes pointed to by BUF to COOKIE. Write all NBYTES bytes unless there is an error. Return number of bytes written. If there is an error, return 0 and do not write anything. If the file has been opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, size_t __nbytes); /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), the current position (if W is SEEK_CUR), or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); /* Close COOKIE. */ typedef int cookie_close_function_t (void *__cookie); /* The structure with the cookie function pointers. The tag name of this struct is _IO_cookie_io_functions_t to preserve historic C++ mangled names for functions taking cookie_io_functions_t arguments. That name should not be used in new code. */ typedef struct _IO_cookie_io_functions_t { cookie_read_function_t *read; /* Read bytes. */ cookie_write_function_t *write; /* Write bytes. */ cookie_seek_function_t *seek; /* Seek/tell file position. */ cookie_close_function_t *close; /* Close file. */ } cookie_io_functions_t; #endif # 64 "/usr/include/bits/types/cookie_io_functions_t.h" 3 4 #endif /* cookie_io_functions_t.h expanded by -frewrite-includes */ # 48 "/usr/include/stdio.h" 2 3 4 #endif # 49 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/include/stdio.h" 3 4 # ifdef __GNUC__ # ifndef _VA_LIST_DEFINED typedef __gnuc_va_list va_list; # define _VA_LIST_DEFINED # endif # 56 "/usr/include/stdio.h" 3 4 # else # 57 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 57 "/usr/include/stdio.h" 3 4 # 58 "/usr/include/stdio.h" 3 4 # endif # 59 "/usr/include/stdio.h" 3 4 #endif # 60 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 62 "/usr/include/stdio.h" 3 4 # ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 66 "/usr/include/stdio.h" 3 4 typedef __off64_t off_t; # endif # 68 "/usr/include/stdio.h" 3 4 # define __off_t_defined # endif # 70 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __USE_LARGEFILE64 && !defined __off64_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/include/stdio.h" 3 4 typedef __off64_t off64_t; # define __off64_t_defined # endif # 74 "/usr/include/stdio.h" 3 4 #endif # 75 "/usr/include/stdio.h" 3 4 #ifdef __USE_XOPEN2K8 # ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined # endif # 81 "/usr/include/stdio.h" 3 4 #endif # 82 "/usr/include/stdio.h" 3 4 /* The type of the second argument to `fgetpos' and `fsetpos'. */ #ifndef __USE_FILE_OFFSET64 typedef __fpos_t fpos_t; #else # 87 "/usr/include/stdio.h" 3 4 typedef __fpos64_t fpos_t; #endif # 89 "/usr/include/stdio.h" 3 4 #ifdef __USE_LARGEFILE64 typedef __fpos64_t fpos64_t; #endif # 92 "/usr/include/stdio.h" 3 4 /* The possibilities for the third argument to `setvbuf'. */ #define _IOFBF 0 /* Fully buffered. */ #define _IOLBF 1 /* Line buffered. */ #define _IONBF 2 /* No buffering. */ /* Default buffer size. */ #define BUFSIZ 8192 /* The value returned by fgetc and similar functions to indicate the end of the file. */ #define EOF (-1) /* The possibilities for the third argument to `fseek'. These values should not be changed. */ #define SEEK_SET 0 /* Seek from beginning of file. */ #define SEEK_CUR 1 /* Seek from current position. */ #define SEEK_END 2 /* Seek from end of file. */ #ifdef __USE_GNU # define SEEK_DATA 3 /* Seek to next data. */ # define SEEK_HOLE 4 /* Seek to next hole. */ #endif # 117 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 120 "/usr/include/stdio.h" 3 4 /* Default path prefix for `tempnam' and `tmpnam'. */ # define P_tmpdir "/tmp" #endif # 123 "/usr/include/stdio.h" 3 4 #define L_tmpnam 20 #define TMP_MAX 238328 /* Get the values: FILENAME_MAX Maximum length of a filename. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdio_lim.h expanded by -frewrite-includes */ #include #else /* stdio_lim.h expanded by -frewrite-includes */ # 129 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 /* System specific stdio.h definitions. Linux version. Copyright (C) 2023-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STDIO_LIM_H #define _BITS_STDIO_LIM_H 1 #ifndef _STDIO_H # error "Never include directly; use instead." #endif # 25 "/usr/include/bits/stdio_lim.h" 3 4 #define FILENAME_MAX 4096 #endif /* bits/stdio_lim.h */ # 29 "/usr/include/bits/stdio_lim.h" 3 4 #endif /* stdio_lim.h expanded by -frewrite-includes */ # 130 "/usr/include/stdio.h" 2 3 4 #ifdef __USE_POSIX # define L_ctermid 9 #if 0 /* disabled by -frewrite-includes */ # if !defined __USE_XOPEN2K || defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 134 "/usr/include/stdio.h" 3 4 # define L_cuserid 9 # endif # 136 "/usr/include/stdio.h" 3 4 #endif # 137 "/usr/include/stdio.h" 3 4 #undef FOPEN_MAX #define FOPEN_MAX 16 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 143 "/usr/include/stdio.h" 3 4 /* Maximum length of printf output for a NaN. */ # define _PRINTF_NAN_LEN_MAX 4 #endif # 146 "/usr/include/stdio.h" 3 4 /* Standard streams. */ extern FILE *stdin; /* Standard input stream. */ extern FILE *stdout; /* Standard output stream. */ extern FILE *stderr; /* Standard error output stream. */ /* C89/C99 say they're macros. Make them happy. */ #define stdin stdin #define stdout stdout #define stderr stderr /* Remove file FILENAME. */ extern int remove (const char *__filename) __THROW; /* Rename file OLD to NEW. */ extern int rename (const char *__old, const char *__new) __THROW; #ifdef __USE_ATFILE /* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */ extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) __THROW; #endif # 167 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU /* Flags for renameat2. */ # define RENAME_NOREPLACE (1 << 0) # define RENAME_EXCHANGE (1 << 1) # define RENAME_WHITEOUT (1 << 2) /* Rename file OLD relative to OLDFD to NEW relative to NEWFD, with additional flags. */ extern int renameat2 (int __oldfd, const char *__old, int __newfd, const char *__new, unsigned int __flags) __THROW; #endif # 179 "/usr/include/stdio.h" 3 4 /* Close STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fclose (FILE *__stream) __nonnull ((1)); #undef __attr_dealloc_fclose #define __attr_dealloc_fclose __attr_dealloc (fclose, 1) /* Create a temporary file and open it read/write. This function is a possible cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern FILE *tmpfile (void) __attribute_malloc__ __attr_dealloc_fclose __wur; #else # 197 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __attribute_malloc__ __attr_dealloc_fclose __wur; # else # 201 "/usr/include/stdio.h" 3 4 # define tmpfile tmpfile64 # endif # 203 "/usr/include/stdio.h" 3 4 #endif # 204 "/usr/include/stdio.h" 3 4 #ifdef __USE_LARGEFILE64 extern FILE *tmpfile64 (void) __attribute_malloc__ __attr_dealloc_fclose __wur; #endif # 209 "/usr/include/stdio.h" 3 4 /* Generate a temporary filename. */ extern char *tmpnam (char[L_tmpnam]) __THROW __wur; #ifdef __USE_MISC /* This is the reentrant variant of `tmpnam'. The only difference is that it does not allow S to be NULL. */ extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur; #endif # 218 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 221 "/usr/include/stdio.h" 3 4 /* Generate a unique temporary filename using up to five characters of PFX if it is not NULL. The directory to put this file in is searched for as follows: First the environment variable "TMPDIR" is checked. If it contains the name of a writable directory, that directory is used. If not and if DIR is not NULL, that value is checked. If that fails, P_tmpdir is tried and finally "/tmp". The storage for the filename is allocated by `malloc'. */ extern char *tempnam (const char *__dir, const char *__pfx) __THROW __attribute_malloc__ __wur __attr_dealloc_free; #endif # 231 "/usr/include/stdio.h" 3 4 /* Flush STREAM, or all streams if STREAM is NULL. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fflush (FILE *__stream); #ifdef __USE_MISC /* Faster versions when locking is not required. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fflush_unlocked (FILE *__stream); #endif # 247 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU /* Close all streams. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fcloseall (void); #endif # 257 "/usr/include/stdio.h" 3 4 #ifndef __USE_FILE_OFFSET64 /* Open a file and create a new stream for it. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __attribute_malloc__ __attr_dealloc_fclose __wur; /* Open a file, replacing an existing stream with it. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __wur __nonnull ((3)); #else # 275 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern FILE *__REDIRECT (fopen, (const char *__restrict __filename, const char *__restrict __modes), fopen64) __attribute_malloc__ __attr_dealloc_fclose __wur; extern FILE *__REDIRECT (freopen, (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream), freopen64) __wur __nonnull ((3)); # else # 284 "/usr/include/stdio.h" 3 4 # define fopen fopen64 # define freopen freopen64 # endif # 287 "/usr/include/stdio.h" 3 4 #endif # 288 "/usr/include/stdio.h" 3 4 #ifdef __USE_LARGEFILE64 extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) __attribute_malloc__ __attr_dealloc_fclose __wur; extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __wur __nonnull ((3)); #endif # 296 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX /* Create a new stream that refers to an existing system file descriptor. */ extern FILE *fdopen (int __fd, const char *__modes) __THROW __attribute_malloc__ __attr_dealloc_fclose __wur; #endif # 302 "/usr/include/stdio.h" 3 4 #ifdef __USE_MISC /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, cookie_io_functions_t __io_funcs) __THROW __attribute_malloc__ __attr_dealloc_fclose __wur; #endif # 311 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 313 "/usr/include/stdio.h" 3 4 /* Create a new stream that refers to a memory buffer. */ extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) __THROW __attribute_malloc__ __attr_dealloc_fclose __wur; /* Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. */ extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __attribute_malloc__ __attr_dealloc_fclose __wur; #ifdef _WCHAR_H /* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces a wide character string. Declared here only to add attribute malloc and only if has been previously #included. */ extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW __attribute_malloc__ __attr_dealloc_fclose; # endif # 330 "/usr/include/stdio.h" 3 4 #endif # 331 "/usr/include/stdio.h" 3 4 /* If BUF is NULL, make STREAM unbuffered. Else make it use buffer BUF, of size BUFSIZ. */ extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW __nonnull ((1)); /* Make STREAM use buffering mode MODE. If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. */ extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __THROW __nonnull ((1)); #ifdef __USE_MISC /* If BUF is NULL, make STREAM unbuffered. Else make it use SIZE bytes of BUF for buffering. */ extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __THROW __nonnull ((1)); /* Make STREAM line-buffered. */ extern void setlinebuf (FILE *__stream) __THROW __nonnull ((1)); #endif # 351 "/usr/include/stdio.h" 3 4 /* Write formatted output to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...) __nonnull ((1)); /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int printf (const char *__restrict __format, ...); /* Write formatted output to S. */ extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) __THROWNL; /* Write formatted output to S from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __nonnull ((1)); /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to S from argument list ARG. */ extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROWNL; #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC99 || defined __USE_UNIX98 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 384 "/usr/include/stdio.h" 3 4 /* Maximum chars of output to write in MAXLEN. */ extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __THROWNL __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 3, 0))); #endif # 393 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined (__USE_MISC) || __GLIBC_USE (LIB_EXT2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 395 "/usr/include/stdio.h" 3 4 /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))) __wur; extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; #endif # 407 "/usr/include/stdio.h" 3 4 #ifdef __USE_XOPEN2K8 /* Write formatted output to a file descriptor. */ extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); #endif # 416 "/usr/include/stdio.h" 3 4 /* Read formatted input from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur __nonnull ((1)); /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int scanf (const char *__restrict __format, ...) __wur; /* Read formatted input from S. */ extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; /* For historical reasons, the C99-compliant versions of the scanf functions are at alternative names. When __LDBL_COMPAT or __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in bits/stdio-ldbl.h. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 437 "/usr/include/stdio.h" 3 4 # 438 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \ && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 440 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __GLIBC_USE (C23_STRTOL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 441 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (fscanf, (FILE *__restrict __stream, const char *__restrict __format, ...), __isoc23_fscanf) __wur __nonnull ((1)); extern int __REDIRECT (scanf, (const char *__restrict __format, ...), __isoc23_scanf) __wur; extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s, const char *__restrict __format, ...), __isoc23_sscanf); # else # 451 "/usr/include/stdio.h" 3 4 extern int __isoc23_fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur __nonnull ((1)); extern int __isoc23_scanf (const char *__restrict __format, ...) __wur; extern int __isoc23_sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; # define fscanf __isoc23_fscanf # define scanf __isoc23_scanf # define sscanf __isoc23_sscanf # endif # 461 "/usr/include/stdio.h" 3 4 # else # 462 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (fscanf, (FILE *__restrict __stream, const char *__restrict __format, ...), __isoc99_fscanf) __wur __nonnull ((1)); extern int __REDIRECT (scanf, (const char *__restrict __format, ...), __isoc99_scanf) __wur; extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s, const char *__restrict __format, ...), __isoc99_sscanf); # else # 472 "/usr/include/stdio.h" 3 4 extern int __isoc99_fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur __nonnull ((1)); extern int __isoc99_scanf (const char *__restrict __format, ...) __wur; extern int __isoc99_sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; # define fscanf __isoc99_fscanf # define scanf __isoc99_scanf # define sscanf __isoc99_sscanf # endif # 482 "/usr/include/stdio.h" 3 4 # endif # 483 "/usr/include/stdio.h" 3 4 #endif # 484 "/usr/include/stdio.h" 3 4 #ifdef __USE_ISOC99 /* Read formatted input from S into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) __wur __nonnull ((1)); /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; /* Read formatted input from S into argument list ARG. */ extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); /* Same redirection as above for the v*scanf family. */ #if 0 /* disabled by -frewrite-includes */ # if !__GLIBC_USE (DEPRECATED_SCANF) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 508 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __GLIBC_USE (C23_STRTOL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 509 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __REDIRECT && !defined __LDBL_COMPAT \ && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 511 "/usr/include/stdio.h" 3 4 extern int __REDIRECT (vfscanf, (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg), __isoc23_vfscanf) __attribute__ ((__format__ (__scanf__, 2, 0))) __wur __nonnull ((1)); extern int __REDIRECT (vscanf, (const char *__restrict __format, __gnuc_va_list __arg), __isoc23_vscanf) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; extern int __REDIRECT_NTH (vsscanf, (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg), __isoc23_vsscanf) __attribute__ ((__format__ (__scanf__, 2, 0))); #if 0 /* disabled by -frewrite-includes */ #if 0 # elif !defined __REDIRECT #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 525 "/usr/include/stdio.h" 3 4 extern int __isoc23_vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __wur __nonnull ((1)); extern int __isoc23_vscanf (const char *__restrict __format, __gnuc_va_list __arg) __wur; extern int __isoc23_vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROW; # define vfscanf __isoc23_vfscanf # define vscanf __isoc23_vscanf # define vsscanf __isoc23_vsscanf # endif # 537 "/usr/include/stdio.h" 3 4 # else # 538 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __REDIRECT && !defined __LDBL_COMPAT \ && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 540 "/usr/include/stdio.h" 3 4 extern int __REDIRECT (vfscanf, (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg), __isoc99_vfscanf) __attribute__ ((__format__ (__scanf__, 2, 0))) __wur __nonnull ((1)); extern int __REDIRECT (vscanf, (const char *__restrict __format, __gnuc_va_list __arg), __isoc99_vscanf) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; extern int __REDIRECT_NTH (vsscanf, (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg), __isoc99_vsscanf) __attribute__ ((__format__ (__scanf__, 2, 0))); #if 0 /* disabled by -frewrite-includes */ #if 0 # elif !defined __REDIRECT #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 554 "/usr/include/stdio.h" 3 4 extern int __isoc99_vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __wur __nonnull ((1)); extern int __isoc99_vscanf (const char *__restrict __format, __gnuc_va_list __arg) __wur; extern int __isoc99_vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROW; # define vfscanf __isoc99_vfscanf # define vscanf __isoc99_vscanf # define vsscanf __isoc99_vsscanf # endif # 566 "/usr/include/stdio.h" 3 4 # endif # 567 "/usr/include/stdio.h" 3 4 # endif # 568 "/usr/include/stdio.h" 3 4 #endif /* Use ISO C9x. */ # 569 "/usr/include/stdio.h" 3 4 /* Read a character from STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int fgetc (FILE *__stream) __nonnull ((1)); extern int getc (FILE *__stream) __nonnull ((1)); /* Read a character from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getchar (void); #ifdef __USE_POSIX199506 /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int getc_unlocked (FILE *__stream) __nonnull ((1)); extern int getchar_unlocked (void); #endif /* Use POSIX. */ # 592 "/usr/include/stdio.h" 3 4 #ifdef __USE_MISC /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fgetc_unlocked (FILE *__stream) __nonnull ((1)); #endif /* Use MISC. */ # 602 "/usr/include/stdio.h" 3 4 /* Write a character to STREAM. These functions are possible cancellation points and therefore not marked with __THROW. These functions is a possible cancellation point and therefore not marked with __THROW. */ extern int fputc (int __c, FILE *__stream) __nonnull ((2)); extern int putc (int __c, FILE *__stream) __nonnull ((2)); /* Write a character to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int putchar (int __c); #ifdef __USE_MISC /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputc_unlocked (int __c, FILE *__stream) __nonnull ((2)); #endif /* Use MISC. */ # 629 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX199506 /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int putc_unlocked (int __c, FILE *__stream) __nonnull ((2)); extern int putchar_unlocked (int __c); #endif /* Use POSIX. */ # 638 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC \ || (defined __USE_XOPEN && !defined __USE_XOPEN2K) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 642 "/usr/include/stdio.h" 3 4 /* Get a word (int) from STREAM. */ extern int getw (FILE *__stream) __nonnull ((1)); /* Write a word (int) to STREAM. */ extern int putw (int __w, FILE *__stream) __nonnull ((2)); #endif # 648 "/usr/include/stdio.h" 3 4 /* Get a newline-terminated string of finite length from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __wur __fortified_attr_access (__write_only__, 1, 2) __nonnull ((3)); #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (DEPRECATED_GETS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 658 "/usr/include/stdio.h" 3 4 /* Get a newline-terminated string from stdin, removing the newline. This function is impossible to use safely. It has been officially removed from ISO C11 and ISO C++14, and we have also removed it from the _GNU_SOURCE feature list. It remains available when explicitly using an old ISO C, Unix, or POSIX standard. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *gets (char *__s) __wur __attribute_deprecated__; #endif # 669 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU /* This function does the same as `fgets' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) __wur __fortified_attr_access (__write_only__, 1, 2) __nonnull ((3)); #endif # 681 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 684 "/usr/include/stdio.h" 3 4 /* Read up to (and including) a DELIMITER from STREAM into *LINEPTR (and null-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'd as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. */ extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __wur __nonnull ((4)); extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __wur __nonnull ((4)); /* Like `getdelim', but reads up to a newline. */ extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __wur __nonnull ((3)); #endif # 701 "/usr/include/stdio.h" 3 4 /* Write a string to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputs (const char *__restrict __s, FILE *__restrict __stream) __nonnull ((2)); /* Write a string, followed by a newline, to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int puts (const char *__s); /* Push a character back onto the input buffer of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int ungetc (int __c, FILE *__stream) __nonnull ((2)); /* Read chunks of generic data from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur __nonnull((4)); /* Write chunks of generic data to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) __nonnull((4)); #ifdef __USE_GNU /* This function does the same as `fputs' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream) __nonnull ((2)); #endif # 748 "/usr/include/stdio.h" 3 4 #ifdef __USE_MISC /* Faster versions when locking is not necessary. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur __nonnull ((4)); extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __nonnull ((4)); #endif # 763 "/usr/include/stdio.h" 3 4 /* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseek (FILE *__stream, long int __off, int __whence) __nonnull ((1)); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern long int ftell (FILE *__stream) __wur __nonnull ((1)); /* Rewind to the beginning of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void rewind (FILE *__stream) __nonnull ((1)); /* The Single Unix Specification, Version 2, specifies an alternative, more adequate interface for the two functions above which deal with file offset. `long int' is not the right type. These definitions are originally defined in the Large File Support API. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_LARGEFILE || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 788 "/usr/include/stdio.h" 3 4 # ifndef __USE_FILE_OFFSET64 /* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseeko (FILE *__stream, __off_t __off, int __whence) __nonnull ((1)); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __off_t ftello (FILE *__stream) __wur __nonnull ((1)); # else # 801 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (fseeko, (FILE *__stream, __off64_t __off, int __whence), fseeko64) __nonnull ((1)); extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64) __nonnull ((1)); # else # 808 "/usr/include/stdio.h" 3 4 # define fseeko fseeko64 # define ftello ftello64 # endif # 811 "/usr/include/stdio.h" 3 4 # endif # 812 "/usr/include/stdio.h" 3 4 #endif # 813 "/usr/include/stdio.h" 3 4 #ifndef __USE_FILE_OFFSET64 /* Get STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __nonnull ((1)); /* Set STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fsetpos (FILE *__stream, const fpos_t *__pos) __nonnull ((1)); #else # 827 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (fgetpos, (FILE *__restrict __stream, fpos_t *__restrict __pos), fgetpos64) __nonnull ((1)); extern int __REDIRECT (fsetpos, (FILE *__stream, const fpos_t *__pos), fsetpos64) __nonnull ((1)); # else # 835 "/usr/include/stdio.h" 3 4 # define fgetpos fgetpos64 # define fsetpos fsetpos64 # endif # 838 "/usr/include/stdio.h" 3 4 #endif # 839 "/usr/include/stdio.h" 3 4 #ifdef __USE_LARGEFILE64 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) __nonnull ((1)); extern __off64_t ftello64 (FILE *__stream) __wur __nonnull ((1)); extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos) __nonnull ((1)); extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos) __nonnull ((1)); #endif # 848 "/usr/include/stdio.h" 3 4 /* Clear the error and EOF indicators for STREAM. */ extern void clearerr (FILE *__stream) __THROW __nonnull ((1)); /* Return the EOF indicator for STREAM. */ extern int feof (FILE *__stream) __THROW __wur __nonnull ((1)); /* Return the error indicator for STREAM. */ extern int ferror (FILE *__stream) __THROW __wur __nonnull ((1)); #ifdef __USE_MISC /* Faster versions when locking is not required. */ extern void clearerr_unlocked (FILE *__stream) __THROW __nonnull ((1)); extern int feof_unlocked (FILE *__stream) __THROW __wur __nonnull ((1)); extern int ferror_unlocked (FILE *__stream) __THROW __wur __nonnull ((1)); #endif # 862 "/usr/include/stdio.h" 3 4 /* Print a message describing the meaning of the value of errno. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void perror (const char *__s) __COLD; #ifdef __USE_POSIX /* Return the system file descriptor for STREAM. */ extern int fileno (FILE *__stream) __THROW __wur __nonnull ((1)); #endif /* Use POSIX. */ # 875 "/usr/include/stdio.h" 3 4 #ifdef __USE_MISC /* Faster version when locking is not required. */ extern int fileno_unlocked (FILE *__stream) __THROW __wur __nonnull ((1)); #endif # 880 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX2 /* Close a stream opened by popen and return the status of its child. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int pclose (FILE *__stream) __nonnull ((1)); /* Create a new stream connected to a pipe running the given command. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *popen (const char *__command, const char *__modes) __attribute_malloc__ __attr_dealloc (pclose, 1) __wur; #endif # 897 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX /* Return the name of the controlling terminal. */ extern char *ctermid (char *__s) __THROW __attr_access ((__write_only__, 1)); #endif /* Use POSIX. */ # 904 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN && !defined __USE_XOPEN2K) || defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 907 "/usr/include/stdio.h" 3 4 /* Return the name of the current user. */ extern char *cuserid (char *__s) __attr_access ((__write_only__, 1)); #endif /* Use X/Open, but not issue 6. */ # 911 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU struct obstack; /* See . */ /* Write formatted output to an obstack. */ extern int obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __format, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, __gnuc_va_list __args) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))); #endif /* Use GNU. */ # 925 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX199506 /* These are defined in POSIX.1:1996. */ /* Acquire ownership of STREAM. */ extern void flockfile (FILE *__stream) __THROW __nonnull ((1)); /* Try to acquire ownership of STREAM but do not block if it is not possible. */ extern int ftrylockfile (FILE *__stream) __THROW __wur __nonnull ((1)); /* Relinquish the ownership granted for STREAM. */ extern void funlockfile (FILE *__stream) __THROW __nonnull ((1)); #endif /* POSIX */ # 940 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 942 "/usr/include/stdio.h" 3 4 /* X/Open Issues 1-5 required getopt to be declared in this header. It was removed in Issue 6. GNU follows Issue 6. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 944 "/usr/include/stdio.h" 3 4 # 945 "/usr/include/stdio.h" 3 4 #endif # 946 "/usr/include/stdio.h" 3 4 /* Slow-path routines used by the optimized inline functions in bits/stdio.h. */ extern int __uflow (FILE *); extern int __overflow (FILE *, int); #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 953 "/usr/include/stdio.h" 3 4 /* Declare all functions from bits/stdio2-decl.h first. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 954 "/usr/include/stdio.h" 3 4 # 955 "/usr/include/stdio.h" 3 4 #endif # 956 "/usr/include/stdio.h" 3 4 /* The following headers provide asm redirections. These redirections must appear before the first usage of these functions, e.g. in bits/stdio.h. */ #if 0 /* disabled by -frewrite-includes */ #if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 960 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 960 "/usr/include/stdio.h" 3 4 # 961 "/usr/include/stdio.h" 3 4 #endif # 962 "/usr/include/stdio.h" 3 4 /* If we are compiling with optimizing read this file. It contains several optimizing inline functions and macros. */ #ifdef __USE_EXTERN_INLINES #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdio.h expanded by -frewrite-includes */ # include #else /* stdio.h expanded by -frewrite-includes */ # 966 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio.h" 1 3 4 /* Optimizing macros and inline functions for stdio functions. Copyright (C) 1998-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STDIO_H #define _BITS_STDIO_H 1 #ifndef _STDIO_H # error "Never include directly; use instead." #endif # 25 "/usr/include/bits/stdio.h" 3 4 #ifndef __extern_inline # define __STDIO_INLINE inline #else # 29 "/usr/include/bits/stdio.h" 3 4 # define __STDIO_INLINE __extern_inline #endif # 31 "/usr/include/bits/stdio.h" 3 4 #ifdef __USE_EXTERN_INLINES /* For -D_FORTIFY_SOURCE{,=2,=3} bits/stdio2.h will define a different inline. */ #if 0 /* disabled by -frewrite-includes */ # if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 37 "/usr/include/bits/stdio.h" 3 4 /* Write formatted output to stdout from argument list ARG. */ __STDIO_INLINE int vprintf (const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } # endif # 44 "/usr/include/bits/stdio.h" 3 4 /* Read a character from stdin. */ __STDIO_INLINE int getchar (void) { return getc (stdin); } # ifdef __USE_MISC /* Faster version when locking is not necessary. */ __STDIO_INLINE int fgetc_unlocked (FILE *__fp) { return __getc_unlocked_body (__fp); } # endif /* misc */ # 61 "/usr/include/bits/stdio.h" 3 4 # ifdef __USE_POSIX199506 /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int getc_unlocked (FILE *__fp) { return __getc_unlocked_body (__fp); } /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int getchar_unlocked (void) { return __getc_unlocked_body (stdin); } # endif /* POSIX */ # 78 "/usr/include/bits/stdio.h" 3 4 /* Write a character to stdout. */ __STDIO_INLINE int putchar (int __c) { return putc (__c, stdout); } # ifdef __USE_MISC /* Faster version when locking is not necessary. */ __STDIO_INLINE int fputc_unlocked (int __c, FILE *__stream) { return __putc_unlocked_body (__c, __stream); } # endif /* misc */ # 96 "/usr/include/bits/stdio.h" 3 4 # ifdef __USE_POSIX199506 /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int putc_unlocked (int __c, FILE *__stream) { return __putc_unlocked_body (__c, __stream); } /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int putchar_unlocked (int __c) { return __putc_unlocked_body (__c, stdout); } # endif /* POSIX */ # 113 "/usr/include/bits/stdio.h" 3 4 # ifdef __USE_GNU /* Like `getdelim', but reads up to a newline. */ __STDIO_INLINE __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } # endif /* GNU */ # 123 "/usr/include/bits/stdio.h" 3 4 # ifdef __USE_MISC /* Faster versions when locking is not required. */ __STDIO_INLINE int __NTH (feof_unlocked (FILE *__stream)) { return __feof_unlocked_body (__stream); } /* Faster versions when locking is not required. */ __STDIO_INLINE int __NTH (ferror_unlocked (FILE *__stream)) { return __ferror_unlocked_body (__stream); } # endif /* misc */ # 140 "/usr/include/bits/stdio.h" 3 4 #endif /* Use extern inlines. */ # 142 "/usr/include/bits/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ \ && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 146 "/usr/include/bits/stdio.h" 3 4 /* Perform some simple optimizations. */ # define fread_unlocked(ptr, size, n, stream) \ (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ && (size_t) (size) * (size_t) (n) <= 8 \ && (size_t) (size) != 0) \ ? ({ char *__ptr = (char *) (ptr); \ FILE *__stream = (stream); \ size_t __cnt; \ for (__cnt = (size_t) (size) * (size_t) (n); \ __cnt > 0; --__cnt) \ { \ int __c = getc_unlocked (__stream); \ if (__c == EOF) \ break; \ *__ptr++ = __c; \ } \ ((size_t) (size) * (size_t) (n) - __cnt) \ / (size_t) (size); }) \ : (((__builtin_constant_p (size) && (size_t) (size) == 0) \ || (__builtin_constant_p (n) && (size_t) (n) == 0)) \ /* Evaluate all parameters once. */ \ ? ((void) (ptr), (void) (stream), (void) (size), \ (void) (n), (size_t) 0) \ : fread_unlocked (ptr, size, n, stream)))) # define fwrite_unlocked(ptr, size, n, stream) \ (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ && (size_t) (size) * (size_t) (n) <= 8 \ && (size_t) (size) != 0) \ ? ({ const char *__ptr = (const char *) (ptr); \ FILE *__stream = (stream); \ size_t __cnt; \ for (__cnt = (size_t) (size) * (size_t) (n); \ __cnt > 0; --__cnt) \ if (putc_unlocked (*__ptr++, __stream) == EOF) \ break; \ ((size_t) (size) * (size_t) (n) - __cnt) \ / (size_t) (size); }) \ : (((__builtin_constant_p (size) && (size_t) (size) == 0) \ || (__builtin_constant_p (n) && (size_t) (n) == 0)) \ /* Evaluate all parameters once. */ \ ? ((void) (ptr), (void) (stream), (void) (size), \ (void) (n), (size_t) 0) \ : fwrite_unlocked (ptr, size, n, stream)))) #endif # 191 "/usr/include/bits/stdio.h" 3 4 /* Define helper macro. */ #undef __STDIO_INLINE #endif /* bits/stdio.h. */ # 196 "/usr/include/bits/stdio.h" 3 4 #endif /* stdio.h expanded by -frewrite-includes */ # 967 "/usr/include/stdio.h" 2 3 4 #endif # 968 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 969 "/usr/include/stdio.h" 3 4 /* Now include the function definitions and redirects too. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 970 "/usr/include/stdio.h" 3 4 # 971 "/usr/include/stdio.h" 3 4 #endif # 972 "/usr/include/stdio.h" 3 4 __END_DECLS #endif /* included. */ # 976 "/usr/include/stdio.h" 3 4 #endif /* stdio.h expanded by -frewrite-includes */ # 39 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* string.h expanded by -frewrite-includes */ #include #else /* string.h expanded by -frewrite-includes */ # 39 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" # 1 "/usr/include/string.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.21 String handling */ #ifndef _STRING_H #define _STRING_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* libc-header-start.h expanded by -frewrite-includes */ #include #else /* libc-header-start.h expanded by -frewrite-includes */ # 26 "/usr/include/string.h" 3 4 # 1 "/usr/include/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION # error "Never include directly." #endif # 30 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/bits/libc-header-start.h" 3 4 # 34 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ #undef __GLIBC_USE_LIB_EXT2 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 40 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 1 #else # 42 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 0 #endif # 44 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. Most but not all symbols enabled by that macro in TS 18661-1 are enabled unconditionally in C23. In C23, the symbols in Annex F still require a new feature test macro __STDC_WANT_IEC_60559_EXT__ instead (C23 does not define __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS 18661-1 are not included in C23 (and thus should depend on __STDC_WANT_IEC_60559_BFP_EXT__ even when C23 features are enabled). __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS 18661-1 not included in C23. __GLIBC_USE (IEC_60559_BFP_EXT_C23) controls those features from TS 18661-1 that are also included in C23 (with no feature test macro required in C23). __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1 that are included in C23 but conditional on __STDC_WANT_IEC_60559_EXT__. (There are currently no features conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS 18661-1.) */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # 71 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif # 73 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_BFP_EXT_C23 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C23 1 #else # 77 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C23 0 #endif # 79 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_EXT #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_EXT 1 #else # 83 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_EXT 0 #endif # 85 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction functions, the symbols from this TS are enabled unconditionally in C23. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 92 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # 94 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif # 96 "/usr/include/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 98 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 1 #else # 100 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 0 #endif # 102 "/usr/include/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_TYPES_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 107 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # 109 "/usr/include/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 #endif # 111 "/usr/include/bits/libc-header-start.h" 3 4 #endif /* libc-header-start.h expanded by -frewrite-includes */ # 27 "/usr/include/string.h" 2 3 4 __BEGIN_DECLS /* Get size_t and NULL from . */ #define __need_size_t #define __need_NULL #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */ #include #else /* stddef.h expanded by -frewrite-includes */ # 33 "/usr/include/string.h" 3 4 # 1 "/usr/lib/clang/20/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stddef.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__MVS__) && __has_include_next() #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t #undef __need_wchar_t #undef __need_NULL #undef __need_nullptr_t #undef __need_unreachable #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/lib/clang/20/include/stddef.h" 3 4 # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 # 35 "/usr/lib/clang/20/include/stddef.h" 3 4 #else # 37 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_rsize_t) && !defined(__need_wchar_t) && \ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 43 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_rsize_t #endif # 50 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_wchar_t #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/clang/20/include/stddef.h" 3 4 /* * __stddef_null.h is special when building without modules: if __need_NULL is * set, then it will unconditionally redefine NULL. To avoid stepping on client * definitions of NULL, __need_NULL should only be set the first time this * header is included, that is when __STDDEF_H is not defined. However, when * building with modules, this header is a textual header and needs to * unconditionally include __stdef_null.h to support multiple submodules * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. * When SM.B builds, the definition from SM.A will leak when building without * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't * export NULL as expected. When building with modules, always include * __stddef_null.h so that everything works as expected. */ #define __need_NULL #endif # 69 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_nullptr_t #endif # 73 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 74 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_unreachable #endif # 76 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 78 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_max_align_t #endif # 80 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_offsetof /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 84 "/usr/lib/clang/20/include/stddef.h" 3 4 # 85 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif # 86 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_ptrdiff_t.h> #endif /* expanded by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 # 89 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 91 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_size_t.h expanded by -frewrite-includes */ #include <__stddef_size_t.h> #else /* __stddef_size_t.h expanded by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_size_t.h" 1 3 4 /*===---- __stddef_size_t.h - Definition of size_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #define _SIZE_T typedef __SIZE_TYPE__ size_t; #endif # 21 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #endif /* __stddef_size_t.h expanded by -frewrite-includes */ # 94 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 96 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_rsize_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_rsize_t.h> #endif /* expanded by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 # 99 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_rsize_t #endif /* defined(__need_rsize_t) */ # 101 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wchar_t.h> #endif /* expanded by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 # 104 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 106 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_null.h expanded by -frewrite-includes */ #include <__stddef_null.h> #else /* __stddef_null.h expanded by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_null.h" 1 3 4 /*===---- __stddef_null.h - Definition of NULL -----------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(NULL) || !__building_module(_Builtin_stddef) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 11 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 /* linux/stddef.h will define NULL to 0. glibc (and other) headers then define * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. * Modules don't support redefining macros like that, but support that pattern * in the non-modules case. */ #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 21 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL __null #else # 23 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL 0 #endif # 25 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #else # 26 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #define NULL ((void*)0) #endif # 28 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #endif # 30 "/usr/lib/clang/20/include/__stddef_null.h" 3 4 #endif /* __stddef_null.h expanded by -frewrite-includes */ # 109 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 111 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_nullptr_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_nullptr_t.h> #endif /* expanded by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 # 114 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_nullptr_t #endif /* defined(__need_nullptr_t) */ # 116 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_unreachable) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_unreachable.h> #endif /* expanded by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 # 119 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_unreachable #endif /* defined(__need_unreachable) */ # 121 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_max_align_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_max_align_t.h> #endif /* expanded by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 # 124 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_max_align_t #endif /* defined(__need_max_align_t) */ # 126 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_offsetof) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_offsetof.h> #endif /* expanded by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 # 129 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_offsetof #endif /* defined(__need_offsetof) */ # 131 "/usr/lib/clang/20/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wint_t.h> #endif /* expanded by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 # 136 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 138 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* __MVS__ */ # 140 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* stddef.h expanded by -frewrite-includes */ # 34 "/usr/include/string.h" 2 3 4 /* Tell the caller that we provide correct C++ prototypes. */ #if 0 /* disabled by -frewrite-includes */ #if defined __cplusplus && (__GNUC_PREREQ (4, 4) \ || __glibc_clang_prereq (3, 5)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 38 "/usr/include/string.h" 3 4 # define __CORRECT_ISO_CPP_STRING_H_PROTO #endif # 40 "/usr/include/string.h" 3 4 /* Copy N bytes of SRC to DEST. */ extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Copy N bytes of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern void *memmove (void *__dest, const void *__src, size_t __n) __THROW __nonnull ((1, 2)); /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 54 "/usr/include/string.h" 3 4 extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 4)); #endif /* Misc || X/Open. */ # 58 "/usr/include/string.h" 3 4 /* Set N bytes of S to C. */ extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); /* Compare N bytes of S1 and S2. */ extern int memcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare N bytes of S1 and S2. Return zero if S1 and S2 are equal. Return some non-zero value otherwise. Essentially __memcmpeq has the exact same semantics as memcmp except the return value is less constrained. memcmp is always a correct implementation of __memcmpeq. As well !!memcmp, -memcmp, or bcmp are correct implementations. __memcmpeq is meant to be used by compilers when memcmp return is only used for its boolean value. __memcmpeq is declared only for use by compilers. Programs should continue to use memcmp. */ extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Search N bytes of S for C. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern void *memchr (void *__s, int __c, size_t __n) __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1)); extern const void *memchr (const void *__s, int __c, size_t __n) __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline void * memchr (void *__s, int __c, size_t __n) __THROW { return __builtin_memchr (__s, __c, __n); } __extern_always_inline const void * memchr (const void *__s, int __c, size_t __n) __THROW { return __builtin_memchr (__s, __c, __n); } # endif # 105 "/usr/include/string.h" 3 4 } #else # 107 "/usr/include/string.h" 3 4 extern void *memchr (const void *__s, int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)); #endif # 110 "/usr/include/string.h" 3 4 #ifdef __USE_GNU /* Search in S for C. This is similar to `memchr' but there is no length limit. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" void *rawmemchr (void *__s, int __c) __THROW __asm ("rawmemchr") __attribute_pure__ __nonnull ((1)); extern "C++" const void *rawmemchr (const void *__s, int __c) __THROW __asm ("rawmemchr") __attribute_pure__ __nonnull ((1)); # else # 120 "/usr/include/string.h" 3 4 extern void *rawmemchr (const void *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif # 123 "/usr/include/string.h" 3 4 /* Search N bytes of S for the final occurrence of C. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" void *memrchr (void *__s, int __c, size_t __n) __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)) __attr_access ((__read_only__, 1, 3)); extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)) __attr_access ((__read_only__, 1, 3)); # else # 133 "/usr/include/string.h" 3 4 extern void *memrchr (const void *__s, int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)) __attr_access ((__read_only__, 1, 3)); # endif # 137 "/usr/include/string.h" 3 4 #endif # 138 "/usr/include/string.h" 3 4 /* Copy SRC to DEST. */ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Copy no more than N characters of SRC to DEST. */ extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Append SRC onto DEST. */ extern char *strcat (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Append no more than N characters from SRC onto DEST. */ extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Compare S1 and S2. */ extern int strcmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare N characters of S1 and S2. */ extern int strncmp (const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare the collated forms of S1 and S2. */ extern int strcoll (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((2)) __attr_access ((__write_only__, 1, 3)); #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* locale_t.h expanded by -frewrite-includes */ # include #else /* locale_t.h expanded by -frewrite-includes */ # 172 "/usr/include/string.h" 3 4 # 1 "/usr/include/bits/types/locale_t.h" 1 3 4 /* Definition of locale_t. Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES_LOCALE_T_H #define _BITS_TYPES_LOCALE_T_H 1 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __locale_t.h expanded by -frewrite-includes */ #include #else /* __locale_t.h expanded by -frewrite-includes */ # 22 "/usr/include/bits/types/locale_t.h" 3 4 # 1 "/usr/include/bits/types/__locale_t.h" 1 3 4 /* Definition of struct __locale_struct and __locale_t. Copyright (C) 1997-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES___LOCALE_T_H #define _BITS_TYPES___LOCALE_T_H 1 /* POSIX.1-2008: the locale_t type, representing a locale context (implementation-namespace version). This type should be treated as opaque by applications; some details are exposed for the sake of efficiency in e.g. ctype functions. */ struct __locale_struct { /* Note: LC_ALL is not a valid index into this array. */ struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */ /* To increase the speed of this solution we add some special members. */ const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; /* Note: LC_ALL is not a valid index into this array. */ const char *__names[13]; }; typedef struct __locale_struct *__locale_t; #endif /* bits/types/__locale_t.h */ # 44 "/usr/include/bits/types/__locale_t.h" 3 4 #endif /* __locale_t.h expanded by -frewrite-includes */ # 23 "/usr/include/bits/types/locale_t.h" 2 3 4 typedef __locale_t locale_t; #endif /* bits/types/locale_t.h */ # 27 "/usr/include/bits/types/locale_t.h" 3 4 #endif /* locale_t.h expanded by -frewrite-includes */ # 173 "/usr/include/string.h" 2 3 4 /* Compare the collated forms of S1 and S2, using sorting rules from L. */ extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) __THROW __attribute_pure__ __nonnull ((1, 2, 3)); /* Put a transformation of SRC into no more than N bytes of DEST, using sorting rules from L. */ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, locale_t __l) __THROW __nonnull ((2, 4)) __attr_access ((__write_only__, 1, 3)); #endif # 183 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \ || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 186 "/usr/include/string.h" 3 4 /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (const char *__s) __THROW __attribute_malloc__ __nonnull ((1)); #endif # 190 "/usr/include/string.h" 3 4 /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 195 "/usr/include/string.h" 3 4 extern char *strndup (const char *__string, size_t __n) __THROW __attribute_malloc__ __nonnull ((1)); #endif # 198 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU && defined __GNUC__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 200 "/usr/include/string.h" 3 4 /* Duplicate S, returning an identical alloca'd string. */ # define strdupa(s) \ (__extension__ \ ({ \ const char *__old = (s); \ size_t __len = strlen (__old) + 1; \ char *__new = (char *) __builtin_alloca (__len); \ (char *) memcpy (__new, __old, __len); \ })) /* Return an alloca'd copy of at most N bytes of string. */ # define strndupa(s, n) \ (__extension__ \ ({ \ const char *__old = (s); \ size_t __len = strnlen (__old, (n)); \ char *__new = (char *) __builtin_alloca (__len + 1); \ __new[__len] = '\0'; \ (char *) memcpy (__new, __old, __len); \ })) #endif # 221 "/usr/include/string.h" 3 4 /* Find the first occurrence of C in S. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strchr (char *__s, int __c) __THROW __asm ("strchr") __attribute_pure__ __nonnull ((1)); extern const char *strchr (const char *__s, int __c) __THROW __asm ("strchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline char * strchr (char *__s, int __c) __THROW { return __builtin_strchr (__s, __c); } __extern_always_inline const char * strchr (const char *__s, int __c) __THROW { return __builtin_strchr (__s, __c); } # endif # 244 "/usr/include/string.h" 3 4 } #else # 246 "/usr/include/string.h" 3 4 extern char *strchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); #endif # 249 "/usr/include/string.h" 3 4 /* Find the last occurrence of C in S. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strrchr (char *__s, int __c) __THROW __asm ("strrchr") __attribute_pure__ __nonnull ((1)); extern const char *strrchr (const char *__s, int __c) __THROW __asm ("strrchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline char * strrchr (char *__s, int __c) __THROW { return __builtin_strrchr (__s, __c); } __extern_always_inline const char * strrchr (const char *__s, int __c) __THROW { return __builtin_strrchr (__s, __c); } # endif # 271 "/usr/include/string.h" 3 4 } #else # 273 "/usr/include/string.h" 3 4 extern char *strrchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); #endif # 276 "/usr/include/string.h" 3 4 #ifdef __USE_MISC /* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *strchrnul (char *__s, int __c) __THROW __asm ("strchrnul") __attribute_pure__ __nonnull ((1)); extern "C++" const char *strchrnul (const char *__s, int __c) __THROW __asm ("strchrnul") __attribute_pure__ __nonnull ((1)); # else # 286 "/usr/include/string.h" 3 4 extern char *strchrnul (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif # 289 "/usr/include/string.h" 3 4 #endif # 290 "/usr/include/string.h" 3 4 /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ extern size_t strcspn (const char *__s, const char *__reject) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ extern size_t strspn (const char *__s, const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Find the first occurrence in S of any character in ACCEPT. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strpbrk (char *__s, const char *__accept) __THROW __asm ("strpbrk") __attribute_pure__ __nonnull ((1, 2)); extern const char *strpbrk (const char *__s, const char *__accept) __THROW __asm ("strpbrk") __attribute_pure__ __nonnull ((1, 2)); # ifdef __OPTIMIZE__ __extern_always_inline char * strpbrk (char *__s, const char *__accept) __THROW { return __builtin_strpbrk (__s, __accept); } __extern_always_inline const char * strpbrk (const char *__s, const char *__accept) __THROW { return __builtin_strpbrk (__s, __accept); } # endif # 321 "/usr/include/string.h" 3 4 } #else # 323 "/usr/include/string.h" 3 4 extern char *strpbrk (const char *__s, const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)); #endif # 326 "/usr/include/string.h" 3 4 /* Find the first occurrence of NEEDLE in HAYSTACK. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strstr (char *__haystack, const char *__needle) __THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2)); extern const char *strstr (const char *__haystack, const char *__needle) __THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2)); # ifdef __OPTIMIZE__ __extern_always_inline char * strstr (char *__haystack, const char *__needle) __THROW { return __builtin_strstr (__haystack, __needle); } __extern_always_inline const char * strstr (const char *__haystack, const char *__needle) __THROW { return __builtin_strstr (__haystack, __needle); } # endif # 348 "/usr/include/string.h" 3 4 } #else # 350 "/usr/include/string.h" 3 4 extern char *strstr (const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)); #endif # 353 "/usr/include/string.h" 3 4 /* Divide S into tokens separated by characters in DELIM. */ extern char *strtok (char *__restrict __s, const char *__restrict __delim) __THROW __nonnull ((2)); /* Divide S into tokens separated by characters in DELIM. Information passed between calls are stored in SAVE_PTR. */ extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); #ifdef __USE_POSIX extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); #endif # 370 "/usr/include/string.h" 3 4 #ifdef __USE_MISC /* Similar to `strstr' but this function ignores the case of both strings. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *strcasestr (char *__haystack, const char *__needle) __THROW __asm ("strcasestr") __attribute_pure__ __nonnull ((1, 2)); extern "C++" const char *strcasestr (const char *__haystack, const char *__needle) __THROW __asm ("strcasestr") __attribute_pure__ __nonnull ((1, 2)); # else # 380 "/usr/include/string.h" 3 4 extern char *strcasestr (const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)); # endif # 383 "/usr/include/string.h" 3 4 #endif # 384 "/usr/include/string.h" 3 4 #ifdef __USE_MISC /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) __THROW __attribute_pure__ __nonnull ((1, 3)) __attr_access ((__read_only__, 1, 2)) __attr_access ((__read_only__, 3, 4)); /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); #endif # 404 "/usr/include/string.h" 3 4 /* Return the length of S. */ extern size_t strlen (const char *__s) __THROW __attribute_pure__ __nonnull ((1)); #ifdef __USE_XOPEN2K8 /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ extern size_t strnlen (const char *__string, size_t __maxlen) __THROW __attribute_pure__ __nonnull ((1)); #endif # 416 "/usr/include/string.h" 3 4 /* Return a string describing the meaning of the `errno' code in ERRNUM. */ extern char *strerror (int __errnum) __THROW; #ifdef __USE_XOPEN2K /* Reentrant version of `strerror'. There are 2 flavors of `strerror_r', GNU which returns the string and may or may not use the supplied temporary buffer and POSIX one which fills the string into the buffer. To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L without -D_GNU_SOURCE is needed, otherwise the GNU version is preferred. */ #if 0 /* disabled by -frewrite-includes */ # if defined __USE_XOPEN2K && !defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 429 "/usr/include/string.h" 3 4 /* Fill BUF with a string describing the meaning of the `errno' code in ERRNUM. */ # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (strerror_r, (int __errnum, char *__buf, size_t __buflen), __xpg_strerror_r) __nonnull ((2)) __attr_access ((__write_only__, 2, 3)); # else # 437 "/usr/include/string.h" 3 4 extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3)); # define strerror_r __xpg_strerror_r # endif # 441 "/usr/include/string.h" 3 4 # else # 442 "/usr/include/string.h" 3 4 /* If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW __nonnull ((2)) __wur __attr_access ((__write_only__, 2, 3)); # endif # 447 "/usr/include/string.h" 3 4 # ifdef __USE_GNU /* Return a string describing the meaning of tthe error in ERR. */ extern const char *strerrordesc_np (int __err) __THROW; /* Return a string with the error name in ERR. */ extern const char *strerrorname_np (int __err) __THROW; # endif # 454 "/usr/include/string.h" 3 4 #endif # 455 "/usr/include/string.h" 3 4 #ifdef __USE_XOPEN2K8 /* Translate error number to string according to the locale L. */ extern char *strerror_l (int __errnum, locale_t __l) __THROW; #endif # 460 "/usr/include/string.h" 3 4 #ifdef __USE_MISC #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* strings.h expanded by -frewrite-includes */ # include #else /* strings.h expanded by -frewrite-includes */ # 462 "/usr/include/string.h" 3 4 # 1 "/usr/include/strings.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STRINGS_H #define _STRINGS_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/strings.h" 3 4 # 22 "/usr/include/strings.h" 3 4 #define __need_size_t #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */ #include #else /* stddef.h expanded by -frewrite-includes */ # 23 "/usr/include/strings.h" 3 4 # 1 "/usr/lib/clang/20/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stddef.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__MVS__) && __has_include_next() #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #undef __need_size_t #undef __need_rsize_t #undef __need_wchar_t #undef __need_NULL #undef __need_nullptr_t #undef __need_unreachable #undef __need_max_align_t #undef __need_offsetof #undef __need_wint_t #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/lib/clang/20/include/stddef.h" 3 4 # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 34 "/usr/lib/clang/20/include/stddef.h" 3 4 # 35 "/usr/lib/clang/20/include/stddef.h" 3 4 #else # 37 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_rsize_t) && !defined(__need_wchar_t) && \ !defined(__need_NULL) && !defined(__need_nullptr_t) && \ !defined(__need_unreachable) && !defined(__need_max_align_t) && \ !defined(__need_offsetof) && !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 43 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_rsize_t #endif # 50 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_wchar_t #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/clang/20/include/stddef.h" 3 4 /* * __stddef_null.h is special when building without modules: if __need_NULL is * set, then it will unconditionally redefine NULL. To avoid stepping on client * definitions of NULL, __need_NULL should only be set the first time this * header is included, that is when __STDDEF_H is not defined. However, when * building with modules, this header is a textual header and needs to * unconditionally include __stdef_null.h to support multiple submodules * exporting _Builtin_stddef.null. Take module SM with submodules A and B, whose * headers both include stddef.h When SM.A builds, __STDDEF_H will be defined. * When SM.B builds, the definition from SM.A will leak when building without * local submodule visibility. stddef.h wouldn't include __stddef_null.h, and * SM.B wouldn't import _Builtin_stddef.null, and SM.B's `export *` wouldn't * export NULL as expected. When building with modules, always include * __stddef_null.h so that everything works as expected. */ #define __need_NULL #endif # 69 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \ defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_nullptr_t #endif # 73 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 74 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_unreachable #endif # 76 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ (defined(__cplusplus) && __cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 78 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_max_align_t #endif # 80 "/usr/lib/clang/20/include/stddef.h" 3 4 #define __need_offsetof /* wint_t is provided by and not . It's here * for compatibility, but must be explicitly requested. Therefore * __need_wint_t is intentionally not defined here. */ #if 0 /* expanded by -frewrite-includes */ #include <__stddef_header_macro.h> #endif /* expanded by -frewrite-includes */ # 84 "/usr/lib/clang/20/include/stddef.h" 3 4 # 85 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif # 86 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_ptrdiff_t.h> #endif /* expanded by -frewrite-includes */ # 88 "/usr/lib/clang/20/include/stddef.h" 3 4 # 89 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 91 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_size_t.h expanded by -frewrite-includes */ #include <__stddef_size_t.h> #else /* __stddef_size_t.h expanded by -frewrite-includes */ # 93 "/usr/lib/clang/20/include/stddef.h" 3 4 # 1 "/usr/lib/clang/20/include/__stddef_size_t.h" 1 3 4 /*===---- __stddef_size_t.h - Definition of size_t -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || \ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #define _SIZE_T typedef __SIZE_TYPE__ size_t; #endif # 21 "/usr/lib/clang/20/include/__stddef_size_t.h" 3 4 #endif /* __stddef_size_t.h expanded by -frewrite-includes */ # 94 "/usr/lib/clang/20/include/stddef.h" 2 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 96 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_rsize_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_rsize_t.h> #endif /* expanded by -frewrite-includes */ # 98 "/usr/lib/clang/20/include/stddef.h" 3 4 # 99 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_rsize_t #endif /* defined(__need_rsize_t) */ # 101 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wchar_t.h> #endif /* expanded by -frewrite-includes */ # 103 "/usr/lib/clang/20/include/stddef.h" 3 4 # 104 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 106 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_null.h> #endif /* expanded by -frewrite-includes */ # 108 "/usr/lib/clang/20/include/stddef.h" 3 4 # 109 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 111 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_nullptr_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_nullptr_t.h> #endif /* expanded by -frewrite-includes */ # 113 "/usr/lib/clang/20/include/stddef.h" 3 4 # 114 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_nullptr_t #endif /* defined(__need_nullptr_t) */ # 116 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_unreachable) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_unreachable.h> #endif /* expanded by -frewrite-includes */ # 118 "/usr/lib/clang/20/include/stddef.h" 3 4 # 119 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_unreachable #endif /* defined(__need_unreachable) */ # 121 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_max_align_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_max_align_t.h> #endif /* expanded by -frewrite-includes */ # 123 "/usr/lib/clang/20/include/stddef.h" 3 4 # 124 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_max_align_t #endif /* defined(__need_max_align_t) */ # 126 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_offsetof) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_offsetof.h> #endif /* expanded by -frewrite-includes */ # 128 "/usr/lib/clang/20/include/stddef.h" 3 4 # 129 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_offsetof #endif /* defined(__need_offsetof) */ # 131 "/usr/lib/clang/20/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <__stddef_wint_t.h> #endif /* expanded by -frewrite-includes */ # 135 "/usr/lib/clang/20/include/stddef.h" 3 4 # 136 "/usr/lib/clang/20/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 138 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* __MVS__ */ # 140 "/usr/lib/clang/20/include/stddef.h" 3 4 #endif /* stddef.h expanded by -frewrite-includes */ # 24 "/usr/include/strings.h" 2 3 4 /* Tell the caller that we provide correct C++ prototypes. */ #if 0 /* disabled by -frewrite-includes */ #if defined __cplusplus && __GNUC_PREREQ (4, 4) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 27 "/usr/include/strings.h" 3 4 # define __CORRECT_ISO_CPP_STRINGS_H_PROTO #endif # 29 "/usr/include/strings.h" 3 4 __BEGIN_DECLS #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || !defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 33 "/usr/include/strings.h" 3 4 /* Compare N bytes of S1 and S2 (same as memcmp). */ extern int bcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ extern void bcopy (const void *__src, void *__dest, size_t __n) __THROW __nonnull ((1, 2)); /* Set N bytes of S to 0. */ extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1)); /* Find the first occurrence of C in S (same as strchr). */ # ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO extern "C++" { extern char *index (char *__s, int __c) __THROW __asm ("index") __attribute_pure__ __nonnull ((1)); extern const char *index (const char *__s, int __c) __THROW __asm ("index") __attribute_pure__ __nonnull ((1)); #if 0 /* disabled by -frewrite-includes */ # if defined __OPTIMIZE__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 54 "/usr/include/strings.h" 3 4 __extern_always_inline char * index (char *__s, int __c) __THROW { return __builtin_index (__s, __c); } __extern_always_inline const char * index (const char *__s, int __c) __THROW { return __builtin_index (__s, __c); } # endif # 66 "/usr/include/strings.h" 3 4 } # else # 68 "/usr/include/strings.h" 3 4 extern char *index (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif # 71 "/usr/include/strings.h" 3 4 /* Find the last occurrence of C in S (same as strrchr). */ # ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO extern "C++" { extern char *rindex (char *__s, int __c) __THROW __asm ("rindex") __attribute_pure__ __nonnull ((1)); extern const char *rindex (const char *__s, int __c) __THROW __asm ("rindex") __attribute_pure__ __nonnull ((1)); #if 0 /* disabled by -frewrite-includes */ # if defined __OPTIMIZE__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 82 "/usr/include/strings.h" 3 4 __extern_always_inline char * rindex (char *__s, int __c) __THROW { return __builtin_rindex (__s, __c); } __extern_always_inline const char * rindex (const char *__s, int __c) __THROW { return __builtin_rindex (__s, __c); } # endif # 94 "/usr/include/strings.h" 3 4 } # else # 96 "/usr/include/strings.h" 3 4 extern char *rindex (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif # 99 "/usr/include/strings.h" 3 4 #endif # 100 "/usr/include/strings.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || !defined __USE_XOPEN2K8 || defined __USE_XOPEN2K8XSI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 102 "/usr/include/strings.h" 3 4 /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ extern int ffs (int __i) __THROW __attribute_const__; #endif # 106 "/usr/include/strings.h" 3 4 /* The following two functions are non-standard but necessary for non-32 bit platforms. */ # ifdef __USE_MISC extern int ffsl (long int __l) __THROW __attribute_const__; __extension__ extern int ffsll (long long int __ll) __THROW __attribute_const__; # endif # 114 "/usr/include/strings.h" 3 4 /* Compare S1 and S2, ignoring case. */ extern int strcasecmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 125 "/usr/include/strings.h" 3 4 # 126 "/usr/include/strings.h" 3 4 /* Compare S1 and S2, ignoring case, using collation rules from LOC. */ extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) __THROW __attribute_pure__ __nonnull ((1, 2, 3)); /* Compare no more than N chars of S1 and S2, ignoring case, using collation rules from LOC. */ extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, locale_t __loc) __THROW __attribute_pure__ __nonnull ((1, 2, 4)); #endif # 137 "/usr/include/strings.h" 3 4 __END_DECLS #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,4) && __USE_FORTIFY_LEVEL > 0 \ && defined __fortify_function #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 142 "/usr/include/strings.h" 3 4 /* Functions with security checks. */ #if 0 /* disabled by -frewrite-includes */ # if defined __USE_MISC || !defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 144 "/usr/include/strings.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 144 "/usr/include/strings.h" 3 4 # 145 "/usr/include/strings.h" 3 4 # endif # 146 "/usr/include/strings.h" 3 4 #endif # 147 "/usr/include/strings.h" 3 4 #endif /* strings.h */ # 149 "/usr/include/strings.h" 3 4 #endif /* strings.h expanded by -frewrite-includes */ # 463 "/usr/include/string.h" 2 3 4 /* Set N bytes of S to 0. The compiler will not delete a call to this function, even if S is dead after the call. */ extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1)) __fortified_attr_access (__write_only__, 1, 2); /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) __THROW __nonnull ((1, 2)); #endif # 475 "/usr/include/string.h" 3 4 #ifdef __USE_XOPEN2K8 /* Return a string describing the meaning of the signal number in SIG. */ extern char *strsignal (int __sig) __THROW; # ifdef __USE_GNU /* Return an abbreviation string for the signal number SIG. */ extern const char *sigabbrev_np (int __sig) __THROW; /* Return a string describing the meaning of the signal number in SIG, the result is not translated. */ extern const char *sigdescr_np (int __sig) __THROW; # endif # 487 "/usr/include/string.h" 3 4 /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); #endif # 503 "/usr/include/string.h" 3 4 #ifdef __USE_MISC /* Copy at most N - 1 characters from SRC to DEST. */ extern size_t strlcpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 3)); /* Append SRC to DEST, possibly with truncation to keep the total size below N. */ extern size_t strlcat (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)) __attr_access ((__read_write__, 1, 3)); #endif # 516 "/usr/include/string.h" 3 4 #ifdef __USE_GNU /* Compare S1 and S2 as strings holding name & indices/version numbers. */ extern int strverscmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Sautee STRING briskly. */ extern char *strfry (char *__string) __THROW __nonnull ((1)); /* Frobnicate N bytes of S. */ extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)) __attr_access ((__read_write__, 1, 2)); # ifndef basename /* Return the file name within directory of FILENAME. We don't declare the function if the `basename' macro is available (defined in ) which makes the XPG version of this function available. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *basename (char *__filename) __THROW __asm ("basename") __nonnull ((1)); extern "C++" const char *basename (const char *__filename) __THROW __asm ("basename") __nonnull ((1)); # else # 540 "/usr/include/string.h" 3 4 extern char *basename (const char *__filename) __THROW __nonnull ((1)); # endif # 542 "/usr/include/string.h" 3 4 # endif # 543 "/usr/include/string.h" 3 4 #endif # 544 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,4) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 546 "/usr/include/string.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 547 "/usr/include/string.h" 3 4 /* Functions with security checks. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 548 "/usr/include/string.h" 3 4 # 549 "/usr/include/string.h" 3 4 # endif # 550 "/usr/include/string.h" 3 4 #endif # 551 "/usr/include/string.h" 3 4 __END_DECLS #endif /* string.h */ # 555 "/usr/include/string.h" 3 4 #endif /* string.h expanded by -frewrite-includes */ # 40 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" 2 /* * These macros/inline functions facilitate using Microsoft's "safe string" * functions with Visual Studio builds without the need to scatter #ifdefs * throughout the code base. */ #ifdef _MSC_VER #define SNPRINTF(str, n, format, ...) \ _snprintf_s(str, n, _TRUNCATE, format, ##__VA_ARGS__) #else # 54 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #define SNPRINTF snprintf #endif # 58 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #ifndef NO_GETENV #ifdef _MSC_VER static INLINE int GETENV_S(char *buffer, size_t buffer_size, const char *name) { size_t required_size; return (int)getenv_s(&required_size, buffer, buffer_size, name); } #else /* _MSC_VER */ # 72 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */ #include #else /* errno.h expanded by -frewrite-includes */ # 73 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" # 1 "/usr/include/errno.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.5 Errors */ #ifndef _ERRNO_H #define _ERRNO_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/errno.h" 3 4 # 26 "/usr/include/errno.h" 3 4 /* The system-specific definitions of the E* constants, as macros. */ #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */ #include #else /* errno.h expanded by -frewrite-includes */ # 28 "/usr/include/errno.h" 3 4 # 1 "/usr/include/bits/errno.h" 1 3 4 /* Error constants. Linux specific version. Copyright (C) 1996-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_ERRNO_H #define _BITS_ERRNO_H 1 #if 0 /* disabled by -frewrite-includes */ #if !defined _ERRNO_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/include/bits/errno.h" 3 4 # error "Never include directly; use instead." #endif # 25 "/usr/include/bits/errno.h" 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */ # include #else /* errno.h expanded by -frewrite-includes */ # 26 "/usr/include/bits/errno.h" 3 4 # 1 "/usr/include/linux/errno.h" 1 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */ #include #else /* errno.h expanded by -frewrite-includes */ # 1 "/usr/include/linux/errno.h" 3 4 # 1 "/usr/include/asm/errno.h" 1 3 4 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */ #include #else /* errno.h expanded by -frewrite-includes */ # 1 "/usr/include/asm/errno.h" 3 4 # 1 "/usr/include/asm-generic/errno.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_ERRNO_H #define _ASM_GENERIC_ERRNO_H #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno-base.h expanded by -frewrite-includes */ #include #else /* errno-base.h expanded by -frewrite-includes */ # 5 "/usr/include/asm-generic/errno.h" 3 4 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_ERRNO_BASE_H #define _ASM_GENERIC_ERRNO_BASE_H #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Argument list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Try again */ #define ENOMEM 12 /* Out of memory */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Device or resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Math argument out of domain of func */ #define ERANGE 34 /* Math result not representable */ #endif # 41 "/usr/include/asm-generic/errno-base.h" 3 4 #endif /* errno-base.h expanded by -frewrite-includes */ # 6 "/usr/include/asm-generic/errno.h" 2 3 4 #define EDEADLK 35 /* Resource deadlock would occur */ #define ENAMETOOLONG 36 /* File name too long */ #define ENOLCK 37 /* No record locks available */ /* * This error code is special: arch syscall entry code will return * -ENOSYS if users try to call a syscall that doesn't exist. To keep * failures of syscalls that really do exist distinguishable from * failures due to attempts to use a nonexistent syscall, syscall * implementations should refrain from returning -ENOSYS. */ #define ENOSYS 38 /* Invalid system call number */ #define ENOTEMPTY 39 /* Directory not empty */ #define ELOOP 40 /* Too many symbolic links encountered */ #define EWOULDBLOCK EAGAIN /* Operation would block */ #define ENOMSG 42 /* No message of desired type */ #define EIDRM 43 /* Identifier removed */ #define ECHRNG 44 /* Channel number out of range */ #define EL2NSYNC 45 /* Level 2 not synchronized */ #define EL3HLT 46 /* Level 3 halted */ #define EL3RST 47 /* Level 3 reset */ #define ELNRNG 48 /* Link number out of range */ #define EUNATCH 49 /* Protocol driver not attached */ #define ENOCSI 50 /* No CSI structure available */ #define EL2HLT 51 /* Level 2 halted */ #define EBADE 52 /* Invalid exchange */ #define EBADR 53 /* Invalid request descriptor */ #define EXFULL 54 /* Exchange full */ #define ENOANO 55 /* No anode */ #define EBADRQC 56 /* Invalid request code */ #define EBADSLT 57 /* Invalid slot */ #define EDEADLOCK EDEADLK #define EBFONT 59 /* Bad font file format */ #define ENOSTR 60 /* Device not a stream */ #define ENODATA 61 /* No data available */ #define ETIME 62 /* Timer expired */ #define ENOSR 63 /* Out of streams resources */ #define ENONET 64 /* Machine is not on the network */ #define ENOPKG 65 /* Package not installed */ #define EREMOTE 66 /* Object is remote */ #define ENOLINK 67 /* Link has been severed */ #define EADV 68 /* Advertise error */ #define ESRMNT 69 /* Srmount error */ #define ECOMM 70 /* Communication error on send */ #define EPROTO 71 /* Protocol error */ #define EMULTIHOP 72 /* Multihop attempted */ #define EDOTDOT 73 /* RFS specific error */ #define EBADMSG 74 /* Not a data message */ #define EOVERFLOW 75 /* Value too large for defined data type */ #define ENOTUNIQ 76 /* Name not unique on network */ #define EBADFD 77 /* File descriptor in bad state */ #define EREMCHG 78 /* Remote address changed */ #define ELIBACC 79 /* Can not access a needed shared library */ #define ELIBBAD 80 /* Accessing a corrupted shared library */ #define ELIBSCN 81 /* .lib section in a.out corrupted */ #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ #define ELIBEXEC 83 /* Cannot exec a shared library directly */ #define EILSEQ 84 /* Illegal byte sequence */ #define ERESTART 85 /* Interrupted system call should be restarted */ #define ESTRPIPE 86 /* Streams pipe error */ #define EUSERS 87 /* Too many users */ #define ENOTSOCK 88 /* Socket operation on non-socket */ #define EDESTADDRREQ 89 /* Destination address required */ #define EMSGSIZE 90 /* Message too long */ #define EPROTOTYPE 91 /* Protocol wrong type for socket */ #define ENOPROTOOPT 92 /* Protocol not available */ #define EPROTONOSUPPORT 93 /* Protocol not supported */ #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ #define EPFNOSUPPORT 96 /* Protocol family not supported */ #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ #define EADDRINUSE 98 /* Address already in use */ #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ #define ENETDOWN 100 /* Network is down */ #define ENETUNREACH 101 /* Network is unreachable */ #define ENETRESET 102 /* Network dropped connection because of reset */ #define ECONNABORTED 103 /* Software caused connection abort */ #define ECONNRESET 104 /* Connection reset by peer */ #define ENOBUFS 105 /* No buffer space available */ #define EISCONN 106 /* Transport endpoint is already connected */ #define ENOTCONN 107 /* Transport endpoint is not connected */ #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ #define ETOOMANYREFS 109 /* Too many references: cannot splice */ #define ETIMEDOUT 110 /* Connection timed out */ #define ECONNREFUSED 111 /* Connection refused */ #define EHOSTDOWN 112 /* Host is down */ #define EHOSTUNREACH 113 /* No route to host */ #define EALREADY 114 /* Operation already in progress */ #define EINPROGRESS 115 /* Operation now in progress */ #define ESTALE 116 /* Stale file handle */ #define EUCLEAN 117 /* Structure needs cleaning */ #define ENOTNAM 118 /* Not a XENIX named type file */ #define ENAVAIL 119 /* No XENIX semaphores available */ #define EISNAM 120 /* Is a named type file */ #define EREMOTEIO 121 /* Remote I/O error */ #define EDQUOT 122 /* Quota exceeded */ #define ENOMEDIUM 123 /* No medium found */ #define EMEDIUMTYPE 124 /* Wrong medium type */ #define ECANCELED 125 /* Operation Canceled */ #define ENOKEY 126 /* Required key not available */ #define EKEYEXPIRED 127 /* Key has expired */ #define EKEYREVOKED 128 /* Key has been revoked */ #define EKEYREJECTED 129 /* Key was rejected by service */ /* for robust mutexes */ #define EOWNERDEAD 130 /* Owner died */ #define ENOTRECOVERABLE 131 /* State not recoverable */ #define ERFKILL 132 /* Operation not possible due to RF-kill */ #define EHWPOISON 133 /* Memory page has hardware error */ #endif # 124 "/usr/include/asm-generic/errno.h" 3 4 #endif /* errno.h expanded by -frewrite-includes */ # 2 "/usr/include/asm/errno.h" 2 3 4 #endif /* errno.h expanded by -frewrite-includes */ # 2 "/usr/include/linux/errno.h" 2 3 4 #endif /* errno.h expanded by -frewrite-includes */ # 27 "/usr/include/bits/errno.h" 2 3 4 /* Older Linux headers do not define these constants. */ # ifndef ENOTSUP # define ENOTSUP EOPNOTSUPP # endif # 32 "/usr/include/bits/errno.h" 3 4 # ifndef ECANCELED # define ECANCELED 125 # endif # 36 "/usr/include/bits/errno.h" 3 4 # ifndef EOWNERDEAD # define EOWNERDEAD 130 # endif # 40 "/usr/include/bits/errno.h" 3 4 #ifndef ENOTRECOVERABLE # define ENOTRECOVERABLE 131 # endif # 44 "/usr/include/bits/errno.h" 3 4 # ifndef ERFKILL # define ERFKILL 132 # endif # 48 "/usr/include/bits/errno.h" 3 4 # ifndef EHWPOISON # define EHWPOISON 133 # endif # 52 "/usr/include/bits/errno.h" 3 4 #endif /* bits/errno.h. */ # 54 "/usr/include/bits/errno.h" 3 4 #endif /* errno.h expanded by -frewrite-includes */ # 29 "/usr/include/errno.h" 2 3 4 /* When included from assembly language, this header only provides the E* constants. */ #ifndef __ASSEMBLER__ __BEGIN_DECLS /* The error code set by various library functions. */ extern int *__errno_location (void) __THROW __attribute_const__; # define errno (*__errno_location ()) # ifdef __USE_GNU /* The full and simple forms of the name with which the program was invoked. These variables are set up automatically at startup based on the value of argv[0]. */ extern char *program_invocation_name; extern char *program_invocation_short_name; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/errno.h" 3 4 # 49 "/usr/include/errno.h" 3 4 # endif /* __USE_GNU */ # 51 "/usr/include/errno.h" 3 4 __END_DECLS #endif /* !__ASSEMBLER__ */ # 55 "/usr/include/errno.h" 3 4 #endif /* errno.h */ # 56 "/usr/include/errno.h" 3 4 #endif /* errno.h expanded by -frewrite-includes */ # 74 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" 2 /* This provides a similar interface to the Microsoft/C11 getenv_s() function, * but other than parameter validation, it has no advantages over getenv(). */ static INLINE int GETENV_S(char *buffer, size_t buffer_size, const char *name) { char *env; if (!buffer) { if (buffer_size == 0) return 0; else return (errno = EINVAL); } if (buffer_size == 0) return (errno = EINVAL); if (!name) { *buffer = 0; return 0; } env = getenv(name); if (!env) { *buffer = 0; return 0; } if (strlen(env) + 1 > buffer_size) { *buffer = 0; return ERANGE; } strncpy(buffer, env, buffer_size); return 0; } #endif /* _MSC_VER */ # 114 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #endif /* NO_GETENV */ # 116 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #ifndef NO_PUTENV #ifdef _WIN32 #define PUTENV_S(name, value) _putenv_s(name, value) #else # 125 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 126 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" # 127 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" /* This provides a similar interface to the Microsoft _putenv_s() function, but * other than parameter validation, it has no advantages over setenv(). */ static INLINE int PUTENV_S(const char *name, const char *value) { if (!name || !value) return (errno = EINVAL); setenv(name, value, 1); return errno; } #endif /* _WIN32 */ # 143 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #endif /* NO_PUTENV */ # 145 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #endif /* JINCLUDE_H */ # 148 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jinclude.h" #endif /* jinclude.h expanded by -frewrite-includes */ # 24 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) /* jpeglib.h expanded by -frewrite-includes */ #include "jpeglib.h" #else /* jpeglib.h expanded by -frewrite-includes */ # 24 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" 1 /* * jpeglib.h * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1998, Thomas G. Lane. * Modified 2002-2009 by Guido Vollbeding. * Lossless JPEG Modifications: * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: * Copyright (C) 2009-2011, 2013-2014, 2016-2017, 2020, 2022-2024, D. R. Commander. * Copyright (C) 2015, Google, Inc. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file defines the application interface for the JPEG library. * Most applications using the library need only include this file, * and perhaps jerror.h if they want to know the exact error codes. */ /* NOTE: This header file does not include stdio.h, despite the fact that it * uses FILE and size_t. That is by design, since the libjpeg API predates the * widespread adoption of ANSI/ISO C. Referring to libjpeg.txt, it is a * documented requirement that calling programs "include system headers that * define at least the typedefs FILE and size_t" before including jpeglib.h. * Technically speaking, changing that requirement by including stdio.h here * would break backward API compatibility. Please do not file bug reports, * feature requests, or pull requests regarding this. */ #ifndef JPEGLIB_H #define JPEGLIB_H /* * First we include the configuration files that record how this * installation of the JPEG library is set up. jconfig.h can be * generated automatically for many systems. jmorecfg.h contains * manual configuration options that most people need not worry about. */ #ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ #if 0 /* expanded by -frewrite-includes */ #include "jconfig.h" /* widely used configuration options */ #endif /* expanded by -frewrite-includes */ # 42 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" # 43 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #endif # 44 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #if defined(__CLANG_REWRITTEN_INCLUDES) /* jmorecfg.h expanded by -frewrite-includes */ #include "jmorecfg.h" /* seldom changed options */ #else /* jmorecfg.h expanded by -frewrite-includes */ # 44 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" 1 /* * jmorecfg.h * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1997, Thomas G. Lane. * Modified 1997-2009 by Guido Vollbeding. * Lossless JPEG Modifications: * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file contains additional configuration options that customize the * JPEG software for special applications or support machine-dependent * optimizations. Most users will not need to touch this file. */ /* * Maximum number of components (color channels) allowed in JPEG image. * To meet the letter of Rec. ITU-T T.81 | ISO/IEC 10918-1, set this to 255. * However, darn few applications need more than 4 channels (maybe 5 for CMYK + * alpha mask). We recommend 10 as a reasonable compromise; use 4 if you are * really short on memory. (Each allowed component costs a hundred or so * bytes of storage, whether actually used in an image or not.) */ #define MAX_COMPONENTS 10 /* maximum number of image components */ /* * Basic data types. * You may need to change these if you have a machine with unusual data * type sizes; for example, "char" not 8 bits, "short" not 16 bits, * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, * but it had better be at least 16. */ /* Representation of a single sample (pixel element value). * We frequently allocate large arrays of these, so it's important to keep * them small. But if you have memory to burn and access to char or short * arrays is very slow on your hardware, you might want to change these. */ /* JSAMPLE should be the smallest type that will hold the values 0..255. */ typedef unsigned char JSAMPLE; #define GETJSAMPLE(value) ((int)(value)) #define MAXJSAMPLE 255 #define CENTERJSAMPLE 128 /* J12SAMPLE should be the smallest type that will hold the values 0..4095. */ typedef short J12SAMPLE; #define MAXJ12SAMPLE 4095 #define CENTERJ12SAMPLE 2048 /* J16SAMPLE should be the smallest type that will hold the values 0..65535. */ typedef unsigned short J16SAMPLE; #define MAXJ16SAMPLE 65535 #define CENTERJ16SAMPLE 32768 /* Representation of a DCT frequency coefficient. * This should be a signed value of at least 16 bits; "short" is usually OK. * Again, we allocate large arrays of these, but you can change to int * if you have memory to burn and "short" is really slow. */ typedef short JCOEF; /* Compressed datastreams are represented as arrays of JOCTET. * These must be EXACTLY 8 bits wide, at least once they are written to * external storage. Note that when using the stdio data source/destination * managers, this is also the data type passed to fread/fwrite. */ typedef unsigned char JOCTET; #define GETJOCTET(value) (value) /* These typedefs are used for various table entries and so forth. * They must be at least as wide as specified; but making them too big * won't cost a huge amount of memory, so we don't provide special * extraction code like we did for JSAMPLE. (In other words, these * typedefs live at a different point on the speed/space tradeoff curve.) */ /* UINT8 must hold at least the values 0..255. */ typedef unsigned char UINT8; /* UINT16 must hold at least the values 0..65535. */ typedef unsigned short UINT16; /* INT16 must hold at least the values -32768..32767. */ #ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ typedef short INT16; #endif # 110 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" /* INT32 must hold at least signed 32-bit values. * * NOTE: The INT32 typedef dates back to libjpeg v5 (1994.) Integers were * sometimes 16-bit back then (MS-DOS), which is why INT32 is typedef'd to * long. It also wasn't common (or at least as common) in 1994 for INT32 to be * defined by platform headers. Since then, however, INT32 is defined in * several other common places: * * Xmd.h (X11 header) typedefs INT32 to int on 64-bit platforms and long on * 32-bit platforms (i.e always a 32-bit signed type.) * * basetsd.h (Win32 header) typedefs INT32 to int (always a 32-bit signed type * on modern platforms.) * * qglobal.h (Qt header) typedefs INT32 to int (always a 32-bit signed type on * modern platforms.) * * This is a recipe for conflict, since "long" and "int" aren't always * compatible types. Since the definition of INT32 has technically been part * of the libjpeg API for more than 20 years, we can't remove it, but we do not * use it internally any longer. We instead define a separate type (JLONG) * for internal use, which ensures that internal behavior will always be the * same regardless of any external headers that may be included. */ #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ #ifndef _BASETSD_H /* MinGW is slightly different */ #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ typedef long INT32; #endif # 142 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #endif # 143 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #endif # 144 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #endif # 145 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" /* Datatype used for image dimensions. The JPEG standard only supports * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore * "unsigned int" is sufficient on all machines. However, if you need to * handle larger images and you don't mind deviating from the spec, you * can change this datatype. (Note that changing this datatype will * potentially require modifying the SIMD code. The x86-64 SIMD extensions, * in particular, assume a 32-bit JDIMENSION.) */ typedef unsigned int JDIMENSION; #define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ /* These macros are used in all function definitions and extern declarations. * You could modify them if you need to change function linkage conventions; * in particular, you'll need to do that to make the library a Windows DLL. * Another application is to make all functions global for use with debuggers * or code profilers that require it. */ /* a function called through method pointers: */ #define METHODDEF(type) static type /* a function used only in its module: */ #define LOCAL(type) static type /* a function referenced thru EXTERNs: */ #define GLOBAL(type) type /* a reference to a GLOBAL function: */ #define EXTERN(type) extern type /* Originally, this macro was used as a way of defining function prototypes * for both modern compilers as well as older compilers that did not support * prototype parameters. libjpeg-turbo has never supported these older, * non-ANSI compilers, but the macro is still included because there is some * software out there that uses it. */ #define JMETHOD(type, methodname, arglist) type (*methodname) arglist /* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS), * but again, some software relies on this macro. */ #undef FAR #define FAR /* * On a few systems, type boolean and/or its values FALSE, TRUE may appear * in standard header files. Or you may have conflicts with application- * specific header files that you want to include together with these files. * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. */ #ifndef HAVE_BOOLEAN typedef int boolean; #endif # 205 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #ifndef FALSE /* in case these macros already exist */ #define FALSE 0 /* values of boolean */ #endif # 208 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #ifndef TRUE #define TRUE 1 #endif # 211 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" /* * The remaining options affect code selection within the JPEG library, * but they don't need to be visible to most applications using the library. * To minimize application namespace pollution, the symbols won't be * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. */ #ifdef JPEG_INTERNALS #define JPEG_INTERNAL_OPTIONS #endif # 223 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #ifdef JPEG_INTERNAL_OPTIONS /* * These defines indicate whether to include various optional functions. * Undefining some of these symbols will produce a smaller but less capable * library. Note that you can leave certain source files out of the * compilation/linking process if you've #undef'd the corresponding symbols. * (You may HAVE to do that if your compiler doesn't like null source files.) */ /* Capability options common to encoder and decoder: */ #define DCT_ISLOW_SUPPORTED /* accurate integer method */ #define DCT_IFAST_SUPPORTED /* less accurate int method [legacy feature] */ #define DCT_FLOAT_SUPPORTED /* floating-point method [legacy feature] */ /* Encoder capability options: */ #define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */ #define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ /* Note: if you selected 12-bit data precision, it is dangerous to turn off * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit * precision, so jchuff.c normally uses entropy optimization to compute * usable tables for higher precision. If you don't want to do optimization, * you'll have to supply different default Huffman tables. * The exact same statements apply for progressive and lossless JPEG: * the default tables don't work for progressive mode or lossless mode. * (This may get fixed, however.) */ #define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ /* Decoder capability options: */ #define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define D_LOSSLESS_SUPPORTED /* Lossless JPEG? */ #define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ #define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ #define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ #undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ #define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ #define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ #define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ /* more capability options later, no doubt */ /* * The RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros are a vestigial * feature of libjpeg. The idea was that, if an application developer needed * to compress from/decompress to a BGR/BGRX/RGBX/XBGR/XRGB buffer, they could * change these macros, rebuild libjpeg, and link their application statically * with it. In reality, few people ever did this, because there were some * severe restrictions involved (cjpeg and djpeg no longer worked properly, * compressing/decompressing RGB JPEGs no longer worked properly, and the color * quantizer wouldn't work with pixel sizes other than 3.) Furthermore, since * all of the O/S-supplied versions of libjpeg were built with the default * values of RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE, many applications * have come to regard these values as immutable. * * The libjpeg-turbo colorspace extensions provide a much cleaner way of * compressing from/decompressing to buffers with arbitrary component orders * and pixel sizes. Thus, we do not support changing the values of RGB_RED, * RGB_GREEN, RGB_BLUE, or RGB_PIXELSIZE. In addition to the restrictions * listed above, changing these values will also break the SIMD extensions and * the regression tests. */ #define RGB_RED 0 /* Offset of Red in an RGB scanline element */ #define RGB_GREEN 1 /* Offset of Green */ #define RGB_BLUE 2 /* Offset of Blue */ #define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ #define JPEG_NUMCS 17 #define EXT_RGB_RED 0 #define EXT_RGB_GREEN 1 #define EXT_RGB_BLUE 2 #define EXT_RGB_PIXELSIZE 3 #define EXT_RGBX_RED 0 #define EXT_RGBX_GREEN 1 #define EXT_RGBX_BLUE 2 #define EXT_RGBX_PIXELSIZE 4 #define EXT_BGR_RED 2 #define EXT_BGR_GREEN 1 #define EXT_BGR_BLUE 0 #define EXT_BGR_PIXELSIZE 3 #define EXT_BGRX_RED 2 #define EXT_BGRX_GREEN 1 #define EXT_BGRX_BLUE 0 #define EXT_BGRX_PIXELSIZE 4 #define EXT_XBGR_RED 3 #define EXT_XBGR_GREEN 2 #define EXT_XBGR_BLUE 1 #define EXT_XBGR_PIXELSIZE 4 #define EXT_XRGB_RED 1 #define EXT_XRGB_GREEN 2 #define EXT_XRGB_BLUE 3 #define EXT_XRGB_PIXELSIZE 4 static const int rgb_red[JPEG_NUMCS] = { -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED, EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED, EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED, -1 }; static const int rgb_green[JPEG_NUMCS] = { -1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN, EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN, EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN, -1 }; static const int rgb_blue[JPEG_NUMCS] = { -1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE, EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE, EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE, -1 }; static const int rgb_pixelsize[JPEG_NUMCS] = { -1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE, EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE, EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE, -1 }; /* Definitions for speed-related optimizations. */ /* On some machines (notably 68000 series) "int" is 32 bits, but multiplying * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER * as short on such a machine. MULTIPLIER must be at least 16 bits wide. */ #ifndef MULTIPLIER #ifndef WITH_SIMD #define MULTIPLIER int /* type for fastest integer multiply */ #else # 371 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */ #endif # 373 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #endif # 374 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" /* FAST_FLOAT should be either float or double, whichever is done faster * by your compiler. (Note that this type is only used in the floating point * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) */ #ifndef FAST_FLOAT #define FAST_FLOAT float #endif # 384 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #endif /* JPEG_INTERNAL_OPTIONS */ # 386 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jmorecfg.h" #endif /* jmorecfg.h expanded by -frewrite-includes */ # 45 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" 2 #ifdef __cplusplus #ifndef DONT_USE_EXTERN_C extern "C" { #endif # 51 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #endif # 52 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* Various constants determining the sizes of things. * All of these are specified by the JPEG standard, so don't change them * if you want to be compatible. */ /* NOTE: In lossless mode, an MCU contains one or more samples rather than one * or more 8x8 DCT blocks, so the term "data unit" is used to generically * describe a sample in lossless mode or an 8x8 DCT block in lossy mode. To * preserve backward API/ABI compatibility, the field and macro names retain * the "block" terminology. */ #define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ #define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ #define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ #define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ #define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ #define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ #define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ /* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU * to handle it. We even let you do this from the jconfig.h file. However, * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe * sometimes emits noncompliant files doesn't mean you should too. */ #define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on data units/MCU */ #ifndef D_MAX_BLOCKS_IN_MCU #define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on data units/MCU */ #endif # 84 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* Data structures for images (arrays of samples and of DCT coefficients). */ typedef JSAMPLE *JSAMPROW; /* ptr to one image row of pixel samples with 2-bit through 8-bit data precision. */ typedef JSAMPROW *JSAMPARRAY; /* ptr to some JSAMPLE rows (a 2-D JSAMPLE array) */ typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D JSAMPLE array: top index is color */ typedef J12SAMPLE *J12SAMPROW; /* ptr to one image row of pixel samples with 9-bit through 12-bit data precision. */ typedef J12SAMPROW *J12SAMPARRAY; /* ptr to some J12SAMPLE rows (a 2-D J12SAMPLE array) */ typedef J12SAMPARRAY *J12SAMPIMAGE; /* a 3-D J12SAMPLE array: top index is color */ typedef J16SAMPLE *J16SAMPROW; /* ptr to one image row of pixel samples with 13-bit through 16-bit data precision. */ typedef J16SAMPROW *J16SAMPARRAY; /* ptr to some J16SAMPLE rows (a 2-D J16SAMPLE array) */ typedef J16SAMPARRAY *J16SAMPIMAGE; /* a 3-D J16SAMPLE array: top index is color */ typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ typedef JBLOCK *JBLOCKROW; /* pointer to one row of coefficient blocks */ typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ typedef JCOEF *JCOEFPTR; /* useful in a couple of places */ /* Types for JPEG compression parameters and working tables. */ /* DCT coefficient quantization tables. */ typedef struct { /* This array gives the coefficient quantizers in natural array order * (not the zigzag order in which they are stored in a JPEG DQT marker). * CAUTION: IJG versions prior to v6a kept this array in zigzag order. */ UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ /* This field is used only during compression. It's initialized FALSE when * the table is created, and set TRUE when it's been output to the file. * You could suppress output of a table by setting this to TRUE. * (See jpeg_suppress_tables for an example.) */ boolean sent_table; /* TRUE when table has been output */ } JQUANT_TBL; /* Huffman coding tables. */ typedef struct { /* These two fields directly represent the contents of a JPEG DHT marker */ UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ /* length k bits; bits[0] is unused */ UINT8 huffval[256]; /* The symbols, in order of incr code length */ /* This field is used only during compression. It's initialized FALSE when * the table is created, and set TRUE when it's been output to the file. * You could suppress output of a table by setting this to TRUE. * (See jpeg_suppress_tables for an example.) */ boolean sent_table; /* TRUE when table has been output */ } JHUFF_TBL; /* Basic info about one component (color channel). */ typedef struct { /* These values are fixed over the whole image. */ /* For compression, they must be supplied by parameter setup; */ /* for decompression, they are read from the SOF marker. */ int component_id; /* identifier for this component (0..255) */ int component_index; /* its index in SOF or cinfo->comp_info[] */ int h_samp_factor; /* horizontal sampling factor (1..4) */ int v_samp_factor; /* vertical sampling factor (1..4) */ int quant_tbl_no; /* quantization table selector (0..3) */ /* These values may vary between scans. */ /* For compression, they must be supplied by parameter setup; */ /* for decompression, they are read from the SOS marker. */ /* The decompressor output side may not use these variables. */ int dc_tbl_no; /* DC entropy table selector (0..3) */ int ac_tbl_no; /* AC entropy table selector (0..3) */ /* Remaining fields should be treated as private by applications. */ /* These values are computed during compression or decompression startup: */ /* Component's size in data units. * In lossy mode, any dummy blocks added to complete an MCU are not counted; * therefore these values do not depend on whether a scan is interleaved or * not. In lossless mode, these are always equal to the image width and * height. */ JDIMENSION width_in_blocks; JDIMENSION height_in_blocks; /* Size of a data unit in samples. Always DCTSIZE for lossy compression. * For lossy decompression this is the size of the output from one DCT block, * reflecting any scaling we choose to apply during the IDCT step. * Values from 1 to 16 are supported. Note that different components may * receive different IDCT scalings. In lossless mode, this is always equal * to 1. */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 192 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int DCT_h_scaled_size; int DCT_v_scaled_size; #else # 195 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int DCT_scaled_size; #endif # 197 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* The downsampled dimensions are the component's actual, unpadded number * of samples at the main buffer (preprocessing/compression interface), thus * downsampled_width = ceil(image_width * Hi/Hmax) * and similarly for height. For lossy decompression, IDCT scaling is * included, so * downsampled_width = ceil(image_width * Hi/Hmax * DCT_[h_]scaled_size/DCTSIZE) * In lossless mode, these are always equal to the image width and height. */ JDIMENSION downsampled_width; /* actual width in samples */ JDIMENSION downsampled_height; /* actual height in samples */ /* This flag is used only for decompression. In cases where some of the * components will be ignored (eg grayscale output from YCbCr image), * we can skip most computations for the unused components. */ boolean component_needed; /* do we need the value of this component? */ /* These values are computed before starting a scan of the component. */ /* The decompressor output side may not use these variables. */ int MCU_width; /* number of data units per MCU, horizontally */ int MCU_height; /* number of data units per MCU, vertically */ int MCU_blocks; /* MCU_width * MCU_height */ int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_[h_]scaled_size */ int last_col_width; /* # of non-dummy data units across in last MCU */ int last_row_height; /* # of non-dummy data units down in last MCU */ /* Saved quantization table for component; NULL if none yet saved. * See jdinput.c comments about the need for this information. * This field is currently used only for decompression. */ JQUANT_TBL *quant_table; /* Private per-component storage for DCT or IDCT subsystem. */ void *dct_table; } jpeg_component_info; /* The script for encoding a multiple-scan file is an array of these: */ typedef struct { int comps_in_scan; /* number of components encoded in this scan */ int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ int Ss, Se; /* progressive JPEG spectral selection parms (Ss is the predictor selection value in lossless mode) */ int Ah, Al; /* progressive JPEG successive approx. parms (Al is the point transform value in lossless mode) */ } jpeg_scan_info; /* The decompressor can save APPn and COM markers in a list of these: */ typedef struct jpeg_marker_struct *jpeg_saved_marker_ptr; struct jpeg_marker_struct { jpeg_saved_marker_ptr next; /* next in list, or NULL */ UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ unsigned int original_length; /* # bytes of data in the file */ unsigned int data_length; /* # bytes of data saved at data[] */ JOCTET *data; /* the data contained in the marker */ /* the marker length word is not counted in data_length or original_length */ }; /* Known color spaces. */ #define JCS_EXTENSIONS 1 #define JCS_ALPHA_EXTENSIONS 1 typedef enum { JCS_UNKNOWN, /* error/unspecified */ JCS_GRAYSCALE, /* monochrome */ JCS_RGB, /* red/green/blue as specified by the RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros */ JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ JCS_CMYK, /* C/M/Y/K */ JCS_YCCK, /* Y/Cb/Cr/K */ JCS_EXT_RGB, /* red/green/blue */ JCS_EXT_RGBX, /* red/green/blue/x */ JCS_EXT_BGR, /* blue/green/red */ JCS_EXT_BGRX, /* blue/green/red/x */ JCS_EXT_XBGR, /* x/blue/green/red */ JCS_EXT_XRGB, /* x/red/green/blue */ /* When out_color_space it set to JCS_EXT_RGBX, JCS_EXT_BGRX, JCS_EXT_XBGR, or JCS_EXT_XRGB during decompression, the X byte is undefined, and in order to ensure the best performance, libjpeg-turbo can set that byte to whatever value it wishes. Use the following colorspace constants to ensure that the X byte is set to 0xFF, so that it can be interpreted as an opaque alpha channel. */ JCS_EXT_RGBA, /* red/green/blue/alpha */ JCS_EXT_BGRA, /* blue/green/red/alpha */ JCS_EXT_ABGR, /* alpha/blue/green/red */ JCS_EXT_ARGB, /* alpha/red/green/blue */ JCS_RGB565 /* 5-bit red/6-bit green/5-bit blue [decompression only] */ } J_COLOR_SPACE; /* DCT/IDCT algorithm options. */ typedef enum { JDCT_ISLOW, /* accurate integer method */ JDCT_IFAST, /* less accurate integer method [legacy feature] */ JDCT_FLOAT /* floating-point method [legacy feature] */ } J_DCT_METHOD; #ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ #define JDCT_DEFAULT JDCT_ISLOW #endif # 303 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ #define JDCT_FASTEST JDCT_IFAST #endif # 306 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* Dithering options for decompression. */ typedef enum { JDITHER_NONE, /* no dithering */ JDITHER_ORDERED, /* simple ordered dither */ JDITHER_FS /* Floyd-Steinberg error diffusion dither */ } J_DITHER_MODE; /* Common fields between JPEG compression and decompression master structs. */ #define jpeg_common_fields \ struct jpeg_error_mgr *err; /* Error handler module */ \ struct jpeg_memory_mgr *mem; /* Memory manager module */ \ struct jpeg_progress_mgr *progress; /* Progress monitor, or NULL if none */ \ void *client_data; /* Available for use by application */ \ boolean is_decompressor; /* So common code can tell which is which */ \ int global_state /* For checking call sequence validity */ /* Routines that are to be used by both halves of the library are declared * to receive a pointer to this structure. There are no actual instances of * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. */ struct jpeg_common_struct { jpeg_common_fields; /* Fields common to both master struct types */ /* Additional fields follow in an actual jpeg_compress_struct or * jpeg_decompress_struct. All three structs must agree on these * initial fields! (This would be a lot cleaner in C++.) */ }; typedef struct jpeg_common_struct *j_common_ptr; typedef struct jpeg_compress_struct *j_compress_ptr; typedef struct jpeg_decompress_struct *j_decompress_ptr; /* Master record for a compression instance */ struct jpeg_compress_struct { jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ /* Destination for compressed data */ struct jpeg_destination_mgr *dest; /* Description of source image --- these fields must be filled in by * outer application before starting compression. in_color_space must * be correct before you can even call jpeg_set_defaults(). */ JDIMENSION image_width; /* input image width */ JDIMENSION image_height; /* input image height */ int input_components; /* # of color components in input image */ J_COLOR_SPACE in_color_space; /* colorspace of input image */ double input_gamma; /* image gamma of input image */ /* Compression parameters --- these fields must be set before calling * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to * initialize everything to reasonable defaults, then changing anything * the application specifically wants to change. That way you won't get * burnt when new parameters are added. Also note that there are several * helper routines to simplify changing parameters. */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 372 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" unsigned int scale_num, scale_denom; /* fraction by which to scale image */ JDIMENSION jpeg_width; /* scaled JPEG image width */ JDIMENSION jpeg_height; /* scaled JPEG image height */ /* Dimensions of actual JPEG image that will be written to file, * derived from input dimensions by scaling factors above. * These fields are computed by jpeg_start_compress(). * You can also use jpeg_calc_jpeg_dimensions() to determine these values * in advance of calling jpeg_start_compress(). */ #endif # 383 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int data_precision; /* bits of precision in image data */ int num_components; /* # of color components in JPEG image */ J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ jpeg_component_info *comp_info; /* comp_info[i] describes component that appears i'th in SOF */ JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 394 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int q_scale_factor[NUM_QUANT_TBLS]; #endif # 396 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* ptrs to coefficient quantization tables, or NULL if not defined, * and corresponding scale factors (percentage, initialized 100). */ JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; /* ptrs to Huffman coding tables, or NULL if not defined */ UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ int num_scans; /* # of entries in scan_info array */ const jpeg_scan_info *scan_info; /* script for multi-scan file, or NULL */ /* The default value of scan_info is NULL, which causes a single-scan * sequential JPEG file to be emitted. To create a multi-scan file, * set num_scans and scan_info to point to an array of scan definitions. */ boolean raw_data_in; /* TRUE=caller supplies downsampled data */ boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ boolean CCIR601_sampling; /* TRUE=first samples are cosited */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 420 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ #endif # 422 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int smoothing_factor; /* 1..100, or 0 for no input smoothing */ J_DCT_METHOD dct_method; /* DCT algorithm selector */ /* The restart interval can be specified in absolute MCUs by setting * restart_interval, or in MCU rows by setting restart_in_rows * (in which case the correct restart_interval will be figured * for each scan). */ unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ int restart_in_rows; /* if > 0, MCU rows per restart interval */ /* Parameters controlling emission of special markers. */ boolean write_JFIF_header; /* should a JFIF marker be written? */ UINT8 JFIF_major_version; /* What to write for the JFIF version number */ UINT8 JFIF_minor_version; /* These three values are not used by the JPEG code, merely copied */ /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ /* ratio is defined by X_density/Y_density even when density_unit=0. */ UINT8 density_unit; /* JFIF code for pixel size units */ UINT16 X_density; /* Horizontal pixel density */ UINT16 Y_density; /* Vertical pixel density */ boolean write_Adobe_marker; /* should an Adobe marker be written? */ /* State variable: index of next scanline to be written to * jpeg_write_scanlines(). Application may use this to control its * processing loop, e.g., "while (next_scanline < image_height)". */ JDIMENSION next_scanline; /* 0 .. image_height-1 */ /* Remaining fields are known throughout compressor, but generally * should not be touched by a surrounding application. */ /* * These fields are computed during compression startup */ boolean progressive_mode; /* TRUE if scan script uses progressive mode */ int max_h_samp_factor; /* largest h_samp_factor */ int max_v_samp_factor; /* largest v_samp_factor */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 466 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ #endif # 469 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coefficient or difference controller */ /* The coefficient or difference controller receives data in units of MCU * rows as defined for fully interleaved scans (whether the JPEG file is * interleaved or not). In lossy mode, there are v_samp_factor * DCTSIZE * sample rows of each component in an "iMCU" (interleaved MCU) row. In * lossless mode, total_iMCU_rows is always equal to the image height. */ /* * These fields are valid during any one scan. * They describe the components and MCUs actually appearing in the scan. */ int comps_in_scan; /* # of JPEG components in this scan */ jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; /* *cur_comp_info[i] describes component that appears i'th in SOS */ JDIMENSION MCUs_per_row; /* # of MCUs across the image */ JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ int blocks_in_MCU; /* # of data units per MCU */ int MCU_membership[C_MAX_BLOCKS_IN_MCU]; /* MCU_membership[i] is index in cur_comp_info of component owning */ /* i'th data unit in an MCU */ int Ss, Se, Ah, Al; /* progressive/lossless JPEG parameters for scan */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 80 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 499 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int block_size; /* the basic DCT block size: 1..16 */ const int *natural_order; /* natural-order position array */ int lim_Se; /* min( Se, DCTSIZE2-1 ) */ #endif # 503 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* * Links to compression subobjects (methods and private variables of modules) */ struct jpeg_comp_master *master; struct jpeg_c_main_controller *main; struct jpeg_c_prep_controller *prep; struct jpeg_c_coef_controller *coef; struct jpeg_marker_writer *marker; struct jpeg_color_converter *cconvert; struct jpeg_downsampler *downsample; struct jpeg_forward_dct *fdct; struct jpeg_entropy_encoder *entropy; jpeg_scan_info *script_space; /* workspace for jpeg_simple_progression */ int script_space_size; }; /* Master record for a decompression instance */ struct jpeg_decompress_struct { jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ /* Source of compressed data */ struct jpeg_source_mgr *src; /* Basic description of image --- filled in by jpeg_read_header(). */ /* Application may inspect these values to decide how to process image. */ JDIMENSION image_width; /* nominal image width (from SOF marker) */ JDIMENSION image_height; /* nominal image height */ int num_components; /* # of color components in JPEG image */ J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ /* Decompression processing parameters --- these fields must be set before * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes * them to default values. */ J_COLOR_SPACE out_color_space; /* colorspace for output */ unsigned int scale_num, scale_denom; /* fraction by which to scale image */ double output_gamma; /* image gamma wanted in output */ boolean buffered_image; /* TRUE=multiple output passes */ boolean raw_data_out; /* TRUE=downsampled data wanted */ J_DCT_METHOD dct_method; /* IDCT algorithm selector */ boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ boolean quantize_colors; /* TRUE=colormapped output wanted */ /* the following are ignored if not quantize_colors: */ J_DITHER_MODE dither_mode; /* type of color dithering to use */ boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ int desired_number_of_colors; /* max # colors to use in created colormap */ /* these are significant only in buffered-image mode: */ boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ boolean enable_external_quant;/* enable future use of external colormap */ boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ /* Description of actual output image that will be returned to application. * These fields are computed by jpeg_start_decompress(). * You can also use jpeg_calc_output_dimensions() to determine these values * in advance of calling jpeg_start_decompress(). */ JDIMENSION output_width; /* scaled image width */ JDIMENSION output_height; /* scaled image height */ int out_color_components; /* # of color components in out_color_space */ int output_components; /* # of color components returned */ /* output_components is 1 (a colormap index) when quantizing colors; * otherwise it equals out_color_components. */ int rec_outbuf_height; /* min recommended height of scanline buffer */ /* If the buffer passed to jpeg_read_scanlines() is less than this many rows * high, space and time will be wasted due to unnecessary data copying. * Usually rec_outbuf_height will be 1 or 2, at most 4. */ /* When quantizing colors, the output colormap is described by these fields. * The application can supply a colormap by setting colormap non-NULL before * calling jpeg_start_decompress; otherwise a colormap is created during * jpeg_start_decompress or jpeg_start_output. * The map has out_color_components rows and actual_number_of_colors columns. */ int actual_number_of_colors; /* number of entries in use */ JSAMPARRAY colormap; /* The color map as a 2-D pixel array If data_precision is 12, then this is actually a J12SAMPARRAY, so callers must type-cast it in order to read/write 12-bit samples from/to the array. */ /* State variables: these variables indicate the progress of decompression. * The application may examine these but must not modify them. */ /* Row index of next scanline to be read from jpeg_read_scanlines(). * Application may use this to control its processing loop, e.g., * "while (output_scanline < output_height)". */ JDIMENSION output_scanline; /* 0 .. output_height-1 */ /* Current input scan number and number of iMCU rows completed in scan. * These indicate the progress of the decompressor input side. */ int input_scan_number; /* Number of SOS markers seen so far */ JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ /* The "output scan number" is the notional scan being displayed by the * output side. The decompressor will not allow output scan/row number * to get ahead of input scan/row, but it can fall arbitrarily far behind. */ int output_scan_number; /* Nominal scan number being displayed */ JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ /* Current progression status. coef_bits[c][i] indicates the precision * with which component c's DCT coefficient i (in zigzag order) is known. * It is -1 when no data has yet been received, otherwise it is the point * transform (shift) value for the most recent scan of the coefficient * (thus, 0 at completion of the progression). * This pointer is NULL when reading a non-progressive file. */ int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ /* Internal JPEG parameters --- the application usually need not look at * these fields. Note that the decompressor output side may not use * any parameters that can change between scans. */ /* Quantization and Huffman tables are carried forward across input * datastreams when processing abbreviated JPEG datastreams. */ JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; /* ptrs to coefficient quantization tables, or NULL if not defined */ JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; /* ptrs to Huffman coding tables, or NULL if not defined */ /* These parameters are never carried across datastreams, since they * are given in SOF/SOS markers or defined to be reset by SOI. */ int data_precision; /* bits of precision in image data */ jpeg_component_info *comp_info; /* comp_info[i] describes component that appears i'th in SOF */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 80 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 655 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ #endif # 657 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ /* These fields record data obtained from optional markers recognized by * the JPEG library. */ boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ UINT8 JFIF_major_version; /* JFIF version number */ UINT8 JFIF_minor_version; UINT8 density_unit; /* JFIF code for pixel size units */ UINT16 X_density; /* Horizontal pixel density */ UINT16 Y_density; /* Vertical pixel density */ boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ UINT8 Adobe_transform; /* Color transform code from Adobe marker */ boolean CCIR601_sampling; /* TRUE=first samples are cosited */ /* Aside from the specific data retained from APPn markers known to the * library, the uninterpreted contents of any or all APPn and COM markers * can be saved in a list for examination by the application. */ jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ /* Remaining fields are known throughout decompressor, but generally * should not be touched by a surrounding application. */ /* * These fields are computed during decompression startup */ int max_h_samp_factor; /* largest h_samp_factor */ int max_v_samp_factor; /* largest v_samp_factor */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 698 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ #else # 701 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ #endif # 703 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ /* The coefficient or difference controller's input and output progress is * measured in units of "iMCU" (interleaved MCU) rows. These are the same as * MCU rows in fully interleaved JPEG scans, but are used whether the scan is * interleaved or not. In lossy mode, we define an iMCU row as v_samp_factor * DCT block rows of each component. Therefore, the IDCT output contains * v_samp_factor*DCT_[v_]scaled_size sample rows of a component per iMCU row. * In lossless mode, total_iMCU_rows is always equal to the image height. */ JSAMPLE *sample_range_limit; /* table for fast range-limiting If data_precision is 9 to 12, then this is actually a J12SAMPLE pointer, and if data_precision is 13 to 16, then this is actually a J16SAMPLE pointer, so callers must type-cast it in order to read samples from the array. */ /* * These fields are valid during any one scan. * They describe the components and MCUs actually appearing in the scan. * Note that the decompressor output side must not use these fields. */ int comps_in_scan; /* # of JPEG components in this scan */ jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; /* *cur_comp_info[i] describes component that appears i'th in SOS */ JDIMENSION MCUs_per_row; /* # of MCUs across the image */ JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ int blocks_in_MCU; /* # of data units per MCU */ int MCU_membership[D_MAX_BLOCKS_IN_MCU]; /* MCU_membership[i] is index in cur_comp_info of component owning */ /* i'th data unit in an MCU */ int Ss, Se, Ah, Al; /* progressive/lossless JPEG parameters for scan */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 80 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 743 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* These fields are derived from Se of first SOS marker. */ int block_size; /* the basic DCT block size: 1..16 */ const int *natural_order; /* natural-order position array for entropy decode */ int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ #endif # 749 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* This field is shared between entropy decoder and marker parser. * It is either zero or the code of a JPEG marker that has been * read from the data source, but has not yet been processed. */ int unread_marker; /* * Links to decompression subobjects (methods, private variables of modules) */ struct jpeg_decomp_master *master; struct jpeg_d_main_controller *main; struct jpeg_d_coef_controller *coef; struct jpeg_d_post_controller *post; struct jpeg_input_controller *inputctl; struct jpeg_marker_reader *marker; struct jpeg_entropy_decoder *entropy; struct jpeg_inverse_dct *idct; struct jpeg_upsampler *upsample; struct jpeg_color_deconverter *cconvert; struct jpeg_color_quantizer *cquantize; }; /* "Object" declarations for JPEG modules that may be supplied or called * directly by the surrounding application. * As with all objects in the JPEG library, these structs only define the * publicly visible methods and state variables of a module. Additional * private fields may exist after the public ones. */ /* Error handler object */ struct jpeg_error_mgr { /* Error exit handler: does not return to caller */ void (*error_exit) (j_common_ptr cinfo); /* Conditionally emit a trace or warning message */ void (*emit_message) (j_common_ptr cinfo, int msg_level); /* Routine that actually outputs a trace or error message */ void (*output_message) (j_common_ptr cinfo); /* Format a message string for the most recent JPEG error or message */ void (*format_message) (j_common_ptr cinfo, char *buffer); #define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ /* Reset error state variables at start of a new image */ void (*reset_error_mgr) (j_common_ptr cinfo); /* The message ID code and any parameters are saved here. * A message can have one string parameter or up to 8 int parameters. */ int msg_code; #define JMSG_STR_PARM_MAX 80 union { int i[8]; char s[JMSG_STR_PARM_MAX]; } msg_parm; /* Standard state variables for error facility */ int trace_level; /* max msg_level that will be displayed */ /* For recoverable corrupt-data errors, we emit a warning message, * but keep going unless emit_message chooses to abort. emit_message * should count warnings in num_warnings. The surrounding application * can check for bad data by seeing if num_warnings is nonzero at the * end of processing. */ long num_warnings; /* number of corrupt-data warnings */ /* These fields point to the table(s) of error message strings. * An application can change the table pointer to switch to a different * message list (typically, to change the language in which errors are * reported). Some applications may wish to add additional error codes * that will be handled by the JPEG library error mechanism; the second * table pointer is used for this purpose. * * First table includes all errors generated by JPEG library itself. * Error code 0 is reserved for a "no such error string" message. */ const char * const *jpeg_message_table; /* Library errors */ int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ /* Second table can be added by application (see cjpeg/djpeg for example). * It contains strings numbered first_addon_message..last_addon_message. */ const char * const *addon_message_table; /* Non-library errors */ int first_addon_message; /* code for first string in addon table */ int last_addon_message; /* code for last string in addon table */ }; /* Progress monitor object */ struct jpeg_progress_mgr { void (*progress_monitor) (j_common_ptr cinfo); long pass_counter; /* work units completed in this pass */ long pass_limit; /* total number of work units in this pass */ int completed_passes; /* passes completed so far */ int total_passes; /* total number of passes expected */ }; /* Data destination object for compression */ struct jpeg_destination_mgr { JOCTET *next_output_byte; /* => next byte to write in buffer */ size_t free_in_buffer; /* # of byte spaces remaining in buffer */ void (*init_destination) (j_compress_ptr cinfo); boolean (*empty_output_buffer) (j_compress_ptr cinfo); void (*term_destination) (j_compress_ptr cinfo); }; /* Data source object for decompression */ struct jpeg_source_mgr { const JOCTET *next_input_byte; /* => next byte to read from buffer */ size_t bytes_in_buffer; /* # of bytes remaining in buffer */ void (*init_source) (j_decompress_ptr cinfo); boolean (*fill_input_buffer) (j_decompress_ptr cinfo); void (*skip_input_data) (j_decompress_ptr cinfo, long num_bytes); boolean (*resync_to_restart) (j_decompress_ptr cinfo, int desired); void (*term_source) (j_decompress_ptr cinfo); }; /* Memory manager object. * Allocates "small" objects (a few K total), "large" objects (tens of K), * and "really big" objects (virtual arrays with backing store if needed). * The memory manager does not allow individual objects to be freed; rather, * each created object is assigned to a pool, and whole pools can be freed * at once. This is faster and more convenient than remembering exactly what * to free, especially where malloc()/free() are not too speedy. * NB: alloc routines never return NULL. They exit to error_exit if not * successful. */ #define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ #define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ #define JPOOL_NUMPOOLS 2 typedef struct jvirt_sarray_control *jvirt_sarray_ptr; typedef struct jvirt_barray_control *jvirt_barray_ptr; struct jpeg_memory_mgr { /* Method pointers */ void *(*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject); void *(*alloc_large) (j_common_ptr cinfo, int pool_id, size_t sizeofobject); /* If cinfo->data_precision is 12 or 16, then this method and the * access_virt_sarray method actually return a J12SAMPARRAY or a * J16SAMPARRAY, so callers must type-cast the return value in order to * read/write 12-bit or 16-bit samples from/to the array. */ JSAMPARRAY (*alloc_sarray) (j_common_ptr cinfo, int pool_id, JDIMENSION samplesperrow, JDIMENSION numrows); JBLOCKARRAY (*alloc_barray) (j_common_ptr cinfo, int pool_id, JDIMENSION blocksperrow, JDIMENSION numrows); jvirt_sarray_ptr (*request_virt_sarray) (j_common_ptr cinfo, int pool_id, boolean pre_zero, JDIMENSION samplesperrow, JDIMENSION numrows, JDIMENSION maxaccess); jvirt_barray_ptr (*request_virt_barray) (j_common_ptr cinfo, int pool_id, boolean pre_zero, JDIMENSION blocksperrow, JDIMENSION numrows, JDIMENSION maxaccess); void (*realize_virt_arrays) (j_common_ptr cinfo); JSAMPARRAY (*access_virt_sarray) (j_common_ptr cinfo, jvirt_sarray_ptr ptr, JDIMENSION start_row, JDIMENSION num_rows, boolean writable); JBLOCKARRAY (*access_virt_barray) (j_common_ptr cinfo, jvirt_barray_ptr ptr, JDIMENSION start_row, JDIMENSION num_rows, boolean writable); void (*free_pool) (j_common_ptr cinfo, int pool_id); void (*self_destruct) (j_common_ptr cinfo); /* Limit on memory allocation for this JPEG object. (Note that this is * merely advisory, not a guaranteed maximum; it only affects the space * used for virtual-array buffers.) May be changed by outer application * after creating the JPEG object. */ long max_memory_to_use; /* Maximum allocation request accepted by alloc_large. */ long max_alloc_chunk; }; /* Routine signature for application-supplied marker processing methods. * Need not pass marker code since it is stored in cinfo->unread_marker. */ typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo); /* Originally, this macro was used as a way of defining function prototypes * for both modern compilers as well as older compilers that did not support * prototype parameters. libjpeg-turbo has never supported these older, * non-ANSI compilers, but the macro is still included because there is some * software out there that uses it. */ #define JPP(arglist) arglist /* Default error-management setup */ EXTERN(struct jpeg_error_mgr *) jpeg_std_error(struct jpeg_error_mgr *err); /* Initialization of JPEG compression objects. * jpeg_create_compress() and jpeg_create_decompress() are the exported * names that applications should call. These expand to calls on * jpeg_CreateCompress and jpeg_CreateDecompress with additional information * passed for version mismatch checking. * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. */ #define jpeg_create_compress(cinfo) \ jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ (size_t)sizeof(struct jpeg_compress_struct)) #define jpeg_create_decompress(cinfo) \ jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ (size_t)sizeof(struct jpeg_decompress_struct)) EXTERN(void) jpeg_CreateCompress(j_compress_ptr cinfo, int version, size_t structsize); EXTERN(void) jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, size_t structsize); /* Destruction of JPEG compression objects */ EXTERN(void) jpeg_destroy_compress(j_compress_ptr cinfo); EXTERN(void) jpeg_destroy_decompress(j_decompress_ptr cinfo); /* Standard data source and destination managers: stdio streams. */ /* Caller is responsible for opening the file before and closing after. */ EXTERN(void) jpeg_stdio_dest(j_compress_ptr cinfo, FILE *outfile); EXTERN(void) jpeg_stdio_src(j_decompress_ptr cinfo, FILE *infile); /* Data source and destination managers: memory buffers. */ EXTERN(void) jpeg_mem_dest(j_compress_ptr cinfo, unsigned char **outbuffer, unsigned long *outsize); EXTERN(void) jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *inbuffer, unsigned long insize); /* Default parameter setup for compression */ EXTERN(void) jpeg_set_defaults(j_compress_ptr cinfo); /* Compression parameter setup aids */ EXTERN(void) jpeg_set_colorspace(j_compress_ptr cinfo, J_COLOR_SPACE colorspace); EXTERN(void) jpeg_default_colorspace(j_compress_ptr cinfo); EXTERN(void) jpeg_set_quality(j_compress_ptr cinfo, int quality, boolean force_baseline); EXTERN(void) jpeg_set_linear_quality(j_compress_ptr cinfo, int scale_factor, boolean force_baseline); #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1004 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" EXTERN(void) jpeg_default_qtables(j_compress_ptr cinfo, boolean force_baseline); #endif # 1007 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" EXTERN(void) jpeg_add_quant_table(j_compress_ptr cinfo, int which_tbl, const unsigned int *basic_table, int scale_factor, boolean force_baseline); EXTERN(int) jpeg_quality_scaling(int quality); EXTERN(void) jpeg_enable_lossless(j_compress_ptr cinfo, int predictor_selection_value, int point_transform); EXTERN(void) jpeg_simple_progression(j_compress_ptr cinfo); EXTERN(void) jpeg_suppress_tables(j_compress_ptr cinfo, boolean suppress); EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table(j_common_ptr cinfo); EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table(j_common_ptr cinfo); /* Main entry points for compression */ EXTERN(void) jpeg_start_compress(j_compress_ptr cinfo, boolean write_all_tables); EXTERN(JDIMENSION) jpeg_write_scanlines(j_compress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION num_lines); EXTERN(JDIMENSION) jpeg12_write_scanlines(j_compress_ptr cinfo, J12SAMPARRAY scanlines, JDIMENSION num_lines); EXTERN(JDIMENSION) jpeg16_write_scanlines(j_compress_ptr cinfo, J16SAMPARRAY scanlines, JDIMENSION num_lines); EXTERN(void) jpeg_finish_compress(j_compress_ptr cinfo); #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1034 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* Precalculate JPEG dimensions for current compression parameters. */ EXTERN(void) jpeg_calc_jpeg_dimensions(j_compress_ptr cinfo); #endif # 1037 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* Replaces jpeg_write_scanlines when writing raw downsampled data. */ EXTERN(JDIMENSION) jpeg_write_raw_data(j_compress_ptr cinfo, JSAMPIMAGE data, JDIMENSION num_lines); EXTERN(JDIMENSION) jpeg12_write_raw_data(j_compress_ptr cinfo, J12SAMPIMAGE data, JDIMENSION num_lines); /* Write a special marker. See libjpeg.txt concerning safe usage. */ EXTERN(void) jpeg_write_marker(j_compress_ptr cinfo, int marker, const JOCTET *dataptr, unsigned int datalen); /* Same, but piecemeal. */ EXTERN(void) jpeg_write_m_header(j_compress_ptr cinfo, int marker, unsigned int datalen); EXTERN(void) jpeg_write_m_byte(j_compress_ptr cinfo, int val); /* Alternate compression function: just write an abbreviated table file */ EXTERN(void) jpeg_write_tables(j_compress_ptr cinfo); /* Write ICC profile. See libjpeg.txt for usage information. */ EXTERN(void) jpeg_write_icc_profile(j_compress_ptr cinfo, const JOCTET *icc_data_ptr, unsigned int icc_data_len); /* Decompression startup: read start of JPEG datastream to see what's there */ EXTERN(int) jpeg_read_header(j_decompress_ptr cinfo, boolean require_image); /* Return value is one of: */ #define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ #define JPEG_HEADER_OK 1 /* Found valid image datastream */ #define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ /* If you pass require_image = TRUE (normal case), you need not check for * a TABLES_ONLY return code; an abbreviated file will cause an error exit. * JPEG_SUSPENDED is only possible if you use a data source module that can * give a suspension return (the stdio source module doesn't). */ /* Main entry points for decompression */ EXTERN(boolean) jpeg_start_decompress(j_decompress_ptr cinfo); EXTERN(JDIMENSION) jpeg_read_scanlines(j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines); EXTERN(JDIMENSION) jpeg12_read_scanlines(j_decompress_ptr cinfo, J12SAMPARRAY scanlines, JDIMENSION max_lines); EXTERN(JDIMENSION) jpeg16_read_scanlines(j_decompress_ptr cinfo, J16SAMPARRAY scanlines, JDIMENSION max_lines); EXTERN(JDIMENSION) jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines); EXTERN(JDIMENSION) jpeg12_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines); EXTERN(void) jpeg_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, JDIMENSION *width); EXTERN(void) jpeg12_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, JDIMENSION *width); EXTERN(boolean) jpeg_finish_decompress(j_decompress_ptr cinfo); /* Replaces jpeg_read_scanlines when reading raw downsampled data. */ EXTERN(JDIMENSION) jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines); EXTERN(JDIMENSION) jpeg12_read_raw_data(j_decompress_ptr cinfo, J12SAMPIMAGE data, JDIMENSION max_lines); /* Additional entry points for buffered-image mode. */ EXTERN(boolean) jpeg_has_multiple_scans(j_decompress_ptr cinfo); EXTERN(boolean) jpeg_start_output(j_decompress_ptr cinfo, int scan_number); EXTERN(boolean) jpeg_finish_output(j_decompress_ptr cinfo); EXTERN(boolean) jpeg_input_complete(j_decompress_ptr cinfo); EXTERN(void) jpeg_new_colormap(j_decompress_ptr cinfo); EXTERN(int) jpeg_consume_input(j_decompress_ptr cinfo); /* Return value is one of: */ /* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ #define JPEG_REACHED_SOS 1 /* Reached start of new scan */ #define JPEG_REACHED_EOI 2 /* Reached end of image */ #define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ #define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ /* Precalculate output dimensions for current decompression parameters. */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 80 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1118 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" EXTERN(void) jpeg_core_output_dimensions(j_decompress_ptr cinfo); #endif # 1120 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" EXTERN(void) jpeg_calc_output_dimensions(j_decompress_ptr cinfo); /* Control saving of COM and APPn markers into marker_list. */ EXTERN(void) jpeg_save_markers(j_decompress_ptr cinfo, int marker_code, unsigned int length_limit); /* Install a special processing method for COM or APPn markers. */ EXTERN(void) jpeg_set_marker_processor(j_decompress_ptr cinfo, int marker_code, jpeg_marker_parser_method routine); /* Read or write raw DCT coefficients --- useful for lossless transcoding. */ EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients(j_decompress_ptr cinfo); EXTERN(void) jpeg_write_coefficients(j_compress_ptr cinfo, jvirt_barray_ptr *coef_arrays); EXTERN(void) jpeg_copy_critical_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo); /* If you choose to abort compression or decompression before completing * jpeg_finish_(de)compress, then you need to clean up to release memory, * temporary files, etc. You can just call jpeg_destroy_(de)compress * if you're done with the JPEG object, but if you want to clean it up and * reuse it, call this: */ EXTERN(void) jpeg_abort_compress(j_compress_ptr cinfo); EXTERN(void) jpeg_abort_decompress(j_decompress_ptr cinfo); /* Generic versions of jpeg_abort and jpeg_destroy that work on either * flavor of JPEG object. These may be more convenient in some places. */ EXTERN(void) jpeg_abort(j_common_ptr cinfo); EXTERN(void) jpeg_destroy(j_common_ptr cinfo); /* Default restart-marker-resync procedure for use by data source modules */ EXTERN(boolean) jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired); /* Read ICC profile. See libjpeg.txt for usage information. */ EXTERN(boolean) jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned int *icc_data_len); /* These marker codes are exported since applications and data source modules * are likely to want to use them. */ #define JPEG_RST0 0xD0 /* RST0 marker code */ #define JPEG_EOI 0xD9 /* EOI marker code */ #define JPEG_APP0 0xE0 /* APP0 marker code */ #define JPEG_COM 0xFE /* COM marker code */ /* If we have a brain-damaged compiler that emits warnings (or worse, errors) * for structure definitions that are never filled in, keep it quiet by * supplying dummy definitions for the various substructures. */ #ifdef INCOMPLETE_TYPES_BROKEN #ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ struct jvirt_sarray_control { long dummy; }; struct jvirt_barray_control { long dummy; }; struct jpeg_comp_master { long dummy; }; struct jpeg_c_main_controller { long dummy; }; struct jpeg_c_prep_controller { long dummy; }; struct jpeg_c_coef_controller { long dummy; }; struct jpeg_marker_writer { long dummy; }; struct jpeg_color_converter { long dummy; }; struct jpeg_downsampler { long dummy; }; struct jpeg_forward_dct { long dummy; }; struct jpeg_entropy_encoder { long dummy; }; struct jpeg_decomp_master { long dummy; }; struct jpeg_d_main_controller { long dummy; }; struct jpeg_d_coef_controller { long dummy; }; struct jpeg_d_post_controller { long dummy; }; struct jpeg_input_controller { long dummy; }; struct jpeg_marker_reader { long dummy; }; struct jpeg_entropy_decoder { long dummy; }; struct jpeg_inverse_dct { long dummy; }; struct jpeg_upsampler { long dummy; }; struct jpeg_color_deconverter { long dummy; }; struct jpeg_color_quantizer { long dummy; }; #endif /* JPEG_INTERNALS */ # 1202 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #endif /* INCOMPLETE_TYPES_BROKEN */ # 1203 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" /* * The JPEG library modules define JPEG_INTERNALS before including this file. * The internal structure declarations are read only when that is true. * Applications using the library should not include jpegint.h, but may wish * to include jerror.h. */ #ifdef JPEG_INTERNALS #if defined(__CLANG_REWRITTEN_INCLUDES) /* jpegint.h expanded by -frewrite-includes */ #include "jpegint.h" /* fetch private declarations */ #else /* jpegint.h expanded by -frewrite-includes */ # 1213 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" 1 /* * jpegint.h * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1997, Thomas G. Lane. * Modified 1997-2009 by Guido Vollbeding. * Lossless JPEG Modifications: * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: * Copyright (C) 2015-2017, 2019, 2021-2022, 2024, D. R. Commander. * Copyright (C) 2015, Google, Inc. * Copyright (C) 2021, Alex Richardson. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file provides common declarations for the various JPEG modules. * These declarations are considered internal to the JPEG library; most * applications using the library shouldn't need to include this file. */ /* Representation of a spatial difference value. * This should be a signed value of at least 16 bits; int is usually OK. */ typedef int JDIFF; typedef JDIFF FAR *JDIFFROW; /* pointer to one row of difference values */ typedef JDIFFROW *JDIFFARRAY; /* ptr to some rows (a 2-D diff array) */ typedef JDIFFARRAY *JDIFFIMAGE; /* a 3-D diff array: top index is color */ /* Declarations for both compression & decompression */ typedef enum { /* Operating modes for buffer controllers */ JBUF_PASS_THRU, /* Plain stripwise operation */ /* Remaining modes require a full-image buffer to have been created */ JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ } J_BUF_MODE; /* Values of global_state field (jdapi.c has some dependencies on ordering!) */ #define CSTATE_START 100 /* after create_compress */ #define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ #define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ #define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ #define DSTATE_START 200 /* after create_decompress */ #define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ #define DSTATE_READY 202 /* found SOS, ready for start_decompress */ #define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ #define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ #define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ #define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ #define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ #define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ #define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ #define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ /* JLONG must hold at least signed 32-bit values. */ typedef long JLONG; /* JUINTPTR must hold pointer values. */ #ifdef __UINTPTR_TYPE__ /* * __UINTPTR_TYPE__ is GNU-specific and available in GCC 4.6+ and Clang 3.0+. * Fortunately, that is sufficient to support the few architectures for which * sizeof(void *) != sizeof(size_t). The only other options would require C99 * or Clang-specific builtins. */ typedef __UINTPTR_TYPE__ JUINTPTR; #else # 74 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" typedef size_t JUINTPTR; #endif # 76 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" #define IsExtRGB(cs) \ (cs == JCS_RGB || (cs >= JCS_EXT_RGB && cs <= JCS_EXT_ARGB)) /* * Left shift macro that handles a negative operand without causing any * sanitizer warnings */ #define LEFT_SHIFT(a, b) ((JLONG)((unsigned long)(a) << (b))) /* Declarations for compression modules */ /* Master control module */ struct jpeg_comp_master { void (*prepare_for_pass) (j_compress_ptr cinfo); void (*pass_startup) (j_compress_ptr cinfo); void (*finish_pass) (j_compress_ptr cinfo); /* State variables made visible to other modules */ boolean call_pass_startup; /* True if pass_startup must be called */ boolean is_last_pass; /* True during last pass */ boolean lossless; /* True if lossless mode is enabled */ }; /* Main buffer control (downsampled-data buffer) */ struct jpeg_c_main_controller { void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); void (*process_data) (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail); void (*process_data_12) (j_compress_ptr cinfo, J12SAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail); #ifdef C_LOSSLESS_SUPPORTED void (*process_data_16) (j_compress_ptr cinfo, J16SAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail); #endif # 113 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" }; /* Compression preprocessing (downsampling input buffer control) */ struct jpeg_c_prep_controller { void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); void (*pre_process_data) (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail, JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, JDIMENSION out_row_groups_avail); void (*pre_process_data_12) (j_compress_ptr cinfo, J12SAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail, J12SAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, JDIMENSION out_row_groups_avail); #ifdef C_LOSSLESS_SUPPORTED void (*pre_process_data_16) (j_compress_ptr cinfo, J16SAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail, J16SAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, JDIMENSION out_row_groups_avail); #endif # 137 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" }; /* Lossy mode: Coefficient buffer control * Lossless mode: Difference buffer control */ struct jpeg_c_coef_controller { void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); boolean (*compress_data) (j_compress_ptr cinfo, JSAMPIMAGE input_buf); boolean (*compress_data_12) (j_compress_ptr cinfo, J12SAMPIMAGE input_buf); #ifdef C_LOSSLESS_SUPPORTED boolean (*compress_data_16) (j_compress_ptr cinfo, J16SAMPIMAGE input_buf); #endif # 149 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" }; /* Colorspace conversion */ struct jpeg_color_converter { void (*start_pass) (j_compress_ptr cinfo); void (*color_convert) (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows); void (*color_convert_12) (j_compress_ptr cinfo, J12SAMPARRAY input_buf, J12SAMPIMAGE output_buf, JDIMENSION output_row, int num_rows); #ifdef C_LOSSLESS_SUPPORTED void (*color_convert_16) (j_compress_ptr cinfo, J16SAMPARRAY input_buf, J16SAMPIMAGE output_buf, JDIMENSION output_row, int num_rows); #endif # 165 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" }; /* Downsampling */ struct jpeg_downsampler { void (*start_pass) (j_compress_ptr cinfo); void (*downsample) (j_compress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION in_row_index, JSAMPIMAGE output_buf, JDIMENSION out_row_group_index); void (*downsample_12) (j_compress_ptr cinfo, J12SAMPIMAGE input_buf, JDIMENSION in_row_index, J12SAMPIMAGE output_buf, JDIMENSION out_row_group_index); #ifdef C_LOSSLESS_SUPPORTED void (*downsample_16) (j_compress_ptr cinfo, J16SAMPIMAGE input_buf, JDIMENSION in_row_index, J16SAMPIMAGE output_buf, JDIMENSION out_row_group_index); #endif # 181 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" boolean need_context_rows; /* TRUE if need rows above & below */ }; /* Lossy mode: Forward DCT (also controls coefficient quantization) * Lossless mode: Prediction, sample differencing, and point transform */ struct jpeg_forward_dct { void (*start_pass) (j_compress_ptr cinfo); /* Lossy mode */ /* perhaps this should be an array??? */ void (*forward_DCT) (j_compress_ptr cinfo, jpeg_component_info *compptr, JSAMPARRAY sample_data, JBLOCKROW coef_blocks, JDIMENSION start_row, JDIMENSION start_col, JDIMENSION num_blocks); void (*forward_DCT_12) (j_compress_ptr cinfo, jpeg_component_info *compptr, J12SAMPARRAY sample_data, JBLOCKROW coef_blocks, JDIMENSION start_row, JDIMENSION start_col, JDIMENSION num_blocks); }; /* Entropy encoding */ struct jpeg_entropy_encoder { void (*start_pass) (j_compress_ptr cinfo, boolean gather_statistics); /* Lossy mode */ boolean (*encode_mcu) (j_compress_ptr cinfo, JBLOCKROW *MCU_data); /* Lossless mode */ JDIMENSION (*encode_mcus) (j_compress_ptr cinfo, JDIFFIMAGE diff_buf, JDIMENSION MCU_row_num, JDIMENSION MCU_col_num, JDIMENSION nMCU); void (*finish_pass) (j_compress_ptr cinfo); }; /* Marker writing */ struct jpeg_marker_writer { void (*write_file_header) (j_compress_ptr cinfo); void (*write_frame_header) (j_compress_ptr cinfo); void (*write_scan_header) (j_compress_ptr cinfo); void (*write_file_trailer) (j_compress_ptr cinfo); void (*write_tables_only) (j_compress_ptr cinfo); /* These routines are exported to allow insertion of extra markers */ /* Probably only COM and APPn markers should be written this way */ void (*write_marker_header) (j_compress_ptr cinfo, int marker, unsigned int datalen); void (*write_marker_byte) (j_compress_ptr cinfo, int val); }; /* Declarations for decompression modules */ /* Master control module */ struct jpeg_decomp_master { void (*prepare_for_output_pass) (j_decompress_ptr cinfo); void (*finish_output_pass) (j_decompress_ptr cinfo); /* State variables made visible to other modules */ boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ boolean lossless; /* True if decompressing a lossless image */ /* Partial decompression variables */ JDIMENSION first_iMCU_col; JDIMENSION last_iMCU_col; JDIMENSION first_MCU_col[MAX_COMPONENTS]; JDIMENSION last_MCU_col[MAX_COMPONENTS]; boolean jinit_upsampler_no_alloc; /* Last iMCU row that was successfully decoded */ JDIMENSION last_good_iMCU_row; /* Tail of list of saved markers */ jpeg_saved_marker_ptr marker_list_end; }; /* Input control module */ struct jpeg_input_controller { int (*consume_input) (j_decompress_ptr cinfo); void (*reset_input_controller) (j_decompress_ptr cinfo); void (*start_input_pass) (j_decompress_ptr cinfo); void (*finish_input_pass) (j_decompress_ptr cinfo); /* State variables made visible to other modules */ boolean has_multiple_scans; /* True if file has multiple scans */ boolean eoi_reached; /* True when EOI has been consumed */ }; /* Main buffer control (downsampled-data buffer) */ struct jpeg_d_main_controller { void (*start_pass) (j_decompress_ptr cinfo, J_BUF_MODE pass_mode); void (*process_data) (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); void (*process_data_12) (j_decompress_ptr cinfo, J12SAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); #ifdef D_LOSSLESS_SUPPORTED void (*process_data_16) (j_decompress_ptr cinfo, J16SAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); #endif # 280 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" }; /* Lossy mode: Coefficient buffer control * Lossless mode: Difference buffer control */ struct jpeg_d_coef_controller { void (*start_input_pass) (j_decompress_ptr cinfo); int (*consume_data) (j_decompress_ptr cinfo); void (*start_output_pass) (j_decompress_ptr cinfo); int (*decompress_data) (j_decompress_ptr cinfo, JSAMPIMAGE output_buf); int (*decompress_data_12) (j_decompress_ptr cinfo, J12SAMPIMAGE output_buf); #ifdef D_LOSSLESS_SUPPORTED int (*decompress_data_16) (j_decompress_ptr cinfo, J16SAMPIMAGE output_buf); #endif # 294 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" /* These variables keep track of the current location of the input side. */ /* cinfo->input_iMCU_row is also used for this. */ JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ int MCU_vert_offset; /* counts MCU rows within iMCU row */ int MCU_rows_per_iMCU_row; /* number of such rows needed */ /* The output side's location is represented by cinfo->output_iMCU_row. */ /* Lossy mode */ /* Pointer to array of coefficient virtual arrays, or NULL if none */ jvirt_barray_ptr *coef_arrays; }; /* Decompression postprocessing (color quantization buffer control) */ struct jpeg_d_post_controller { void (*start_pass) (j_decompress_ptr cinfo, J_BUF_MODE pass_mode); void (*post_process_data) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); void (*post_process_data_12) (j_decompress_ptr cinfo, J12SAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, J12SAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); #ifdef D_LOSSLESS_SUPPORTED void (*post_process_data_16) (j_decompress_ptr cinfo, J16SAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, J16SAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); #endif # 330 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" }; /* Marker reading & parsing */ struct jpeg_marker_reader { void (*reset_marker_reader) (j_decompress_ptr cinfo); /* Read markers until SOS or EOI. * Returns same codes as are defined for jpeg_consume_input: * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. */ int (*read_markers) (j_decompress_ptr cinfo); /* Read a restart marker --- exported for use by entropy decoder only */ jpeg_marker_parser_method read_restart_marker; /* State of marker reader --- nominally internal, but applications * supplying COM or APPn handlers might like to know the state. */ boolean saw_SOI; /* found SOI? */ boolean saw_SOF; /* found SOF? */ int next_restart_num; /* next restart number expected (0-7) */ unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ }; /* Entropy decoding */ struct jpeg_entropy_decoder { void (*start_pass) (j_decompress_ptr cinfo); /* Lossy mode */ boolean (*decode_mcu) (j_decompress_ptr cinfo, JBLOCKROW *MCU_data); /* Lossless mode */ JDIMENSION (*decode_mcus) (j_decompress_ptr cinfo, JDIFFIMAGE diff_buf, JDIMENSION MCU_row_num, JDIMENSION MCU_col_num, JDIMENSION nMCU); boolean (*process_restart) (j_decompress_ptr cinfo); /* This is here to share code between baseline and progressive decoders; */ /* other modules probably should not use it */ boolean insufficient_data; /* set TRUE after emitting warning */ }; /* Lossy mode: Inverse DCT (also performs dequantization) * Lossless mode: Prediction, sample undifferencing, point transform, and * sample size scaling */ typedef void (*inverse_DCT_method_ptr) (j_decompress_ptr cinfo, jpeg_component_info *compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col); typedef void (*inverse_DCT_12_method_ptr) (j_decompress_ptr cinfo, jpeg_component_info *compptr, JCOEFPTR coef_block, J12SAMPARRAY output_buf, JDIMENSION output_col); struct jpeg_inverse_dct { void (*start_pass) (j_decompress_ptr cinfo); /* Lossy mode */ /* It is useful to allow each component to have a separate IDCT method. */ inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; inverse_DCT_12_method_ptr inverse_DCT_12[MAX_COMPONENTS]; }; /* Upsampling (note that upsampler must also call color converter) */ struct jpeg_upsampler { void (*start_pass) (j_decompress_ptr cinfo); void (*upsample) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); void (*upsample_12) (j_decompress_ptr cinfo, J12SAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, J12SAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); #ifdef D_LOSSLESS_SUPPORTED void (*upsample_16) (j_decompress_ptr cinfo, J16SAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, J16SAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); #endif # 410 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" boolean need_context_rows; /* TRUE if need rows above & below */ }; /* Colorspace conversion */ struct jpeg_color_deconverter { void (*start_pass) (j_decompress_ptr cinfo); void (*color_convert) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows); void (*color_convert_12) (j_decompress_ptr cinfo, J12SAMPIMAGE input_buf, JDIMENSION input_row, J12SAMPARRAY output_buf, int num_rows); #ifdef D_LOSSLESS_SUPPORTED void (*color_convert_16) (j_decompress_ptr cinfo, J16SAMPIMAGE input_buf, JDIMENSION input_row, J16SAMPARRAY output_buf, int num_rows); #endif # 428 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" }; /* Color quantization or color precision reduction */ struct jpeg_color_quantizer { void (*start_pass) (j_decompress_ptr cinfo, boolean is_pre_scan); void (*color_quantize) (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows); void (*color_quantize_12) (j_decompress_ptr cinfo, J12SAMPARRAY input_buf, J12SAMPARRAY output_buf, int num_rows); void (*finish_pass) (j_decompress_ptr cinfo); void (*new_color_map) (j_decompress_ptr cinfo); }; /* Miscellaneous useful macros */ #undef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) #undef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) #ifdef ZERO_BUFFERS #define MALLOC(size) calloc(1, size) #else # 452 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" #define MALLOC(size) malloc(size) #endif # 454 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" /* We assume that right shift corresponds to signed division by 2 with * rounding towards minus infinity. This is correct for typical "arithmetic * shift" instructions that shift in copies of the sign bit. But some * C compilers implement >> with an unsigned shift. For these machines you * must define RIGHT_SHIFT_IS_UNSIGNED. * RIGHT_SHIFT provides a proper signed right shift of a JLONG quantity. * It is only applied with constant shift counts. SHIFT_TEMPS must be * included in the variables of any routine using RIGHT_SHIFT. */ #ifdef RIGHT_SHIFT_IS_UNSIGNED #define SHIFT_TEMPS JLONG shift_temp; #define RIGHT_SHIFT(x, shft) \ ((shift_temp = (x)) < 0 ? \ (shift_temp >> (shft)) | ((~((JLONG)0)) << (32 - (shft))) : \ (shift_temp >> (shft))) #else # 473 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" #define SHIFT_TEMPS #define RIGHT_SHIFT(x, shft) ((x) >> (shft)) #endif # 476 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" /* Compression module initialization routines */ EXTERN(void) jinit_compress_master(j_compress_ptr cinfo); EXTERN(void) jinit_c_master_control(j_compress_ptr cinfo, boolean transcode_only); EXTERN(void) jinit_c_main_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j12init_c_main_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_c_prep_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j12init_c_prep_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_c_coef_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j12init_c_coef_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_color_converter(j_compress_ptr cinfo); EXTERN(void) j12init_color_converter(j_compress_ptr cinfo); EXTERN(void) jinit_downsampler(j_compress_ptr cinfo); EXTERN(void) j12init_downsampler(j_compress_ptr cinfo); EXTERN(void) jinit_forward_dct(j_compress_ptr cinfo); EXTERN(void) j12init_forward_dct(j_compress_ptr cinfo); EXTERN(void) jinit_huff_encoder(j_compress_ptr cinfo); EXTERN(void) jinit_phuff_encoder(j_compress_ptr cinfo); EXTERN(void) jinit_arith_encoder(j_compress_ptr cinfo); EXTERN(void) jinit_marker_writer(j_compress_ptr cinfo); #ifdef C_LOSSLESS_SUPPORTED EXTERN(void) j16init_c_main_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j16init_c_prep_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j16init_color_converter(j_compress_ptr cinfo); EXTERN(void) j16init_downsampler(j_compress_ptr cinfo); EXTERN(void) jinit_c_diff_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j12init_c_diff_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j16init_c_diff_controller(j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_lhuff_encoder(j_compress_ptr cinfo); EXTERN(void) jinit_lossless_compressor(j_compress_ptr cinfo); EXTERN(void) j12init_lossless_compressor(j_compress_ptr cinfo); EXTERN(void) j16init_lossless_compressor(j_compress_ptr cinfo); #endif # 522 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" /* Decompression module initialization routines */ EXTERN(void) jinit_master_decompress(j_decompress_ptr cinfo); EXTERN(void) jinit_d_main_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j12init_d_main_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_d_coef_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j12init_d_coef_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_d_post_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j12init_d_post_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_input_controller(j_decompress_ptr cinfo); EXTERN(void) jinit_marker_reader(j_decompress_ptr cinfo); EXTERN(void) jinit_huff_decoder(j_decompress_ptr cinfo); EXTERN(void) jinit_phuff_decoder(j_decompress_ptr cinfo); EXTERN(void) jinit_arith_decoder(j_decompress_ptr cinfo); EXTERN(void) jinit_inverse_dct(j_decompress_ptr cinfo); EXTERN(void) j12init_inverse_dct(j_decompress_ptr cinfo); EXTERN(void) jinit_upsampler(j_decompress_ptr cinfo); EXTERN(void) j12init_upsampler(j_decompress_ptr cinfo); EXTERN(void) jinit_color_deconverter(j_decompress_ptr cinfo); EXTERN(void) j12init_color_deconverter(j_decompress_ptr cinfo); EXTERN(void) jinit_1pass_quantizer(j_decompress_ptr cinfo); EXTERN(void) j12init_1pass_quantizer(j_decompress_ptr cinfo); EXTERN(void) jinit_2pass_quantizer(j_decompress_ptr cinfo); EXTERN(void) j12init_2pass_quantizer(j_decompress_ptr cinfo); EXTERN(void) jinit_merged_upsampler(j_decompress_ptr cinfo); EXTERN(void) j12init_merged_upsampler(j_decompress_ptr cinfo); #ifdef D_LOSSLESS_SUPPORTED EXTERN(void) j16init_d_main_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j16init_d_post_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j16init_upsampler(j_decompress_ptr cinfo); EXTERN(void) j16init_color_deconverter(j_decompress_ptr cinfo); EXTERN(void) jinit_d_diff_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j12init_d_diff_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) j16init_d_diff_controller(j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_lhuff_decoder(j_decompress_ptr cinfo); EXTERN(void) jinit_lossless_decompressor(j_decompress_ptr cinfo); EXTERN(void) j12init_lossless_decompressor(j_decompress_ptr cinfo); EXTERN(void) j16init_lossless_decompressor(j_decompress_ptr cinfo); #endif # 572 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" /* Memory manager initialization */ EXTERN(void) jinit_memory_mgr(j_common_ptr cinfo); /* Utility routines in jutils.c */ EXTERN(long) jdiv_round_up(long a, long b); EXTERN(long) jround_up(long a, long b); EXTERN(void) jcopy_sample_rows(JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols); EXTERN(void) j12copy_sample_rows(J12SAMPARRAY input_array, int source_row, J12SAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols); #if 0 /* disabled by -frewrite-includes */ #if defined(C_LOSSLESS_SUPPORTED) || defined(D_LOSSLESS_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 586 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" EXTERN(void) j16copy_sample_rows(J16SAMPARRAY input_array, int source_row, J16SAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols); #endif # 590 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" EXTERN(void) jcopy_block_row(JBLOCKROW input_row, JBLOCKROW output_row, JDIMENSION num_blocks); EXTERN(void) jzero_far(void *target, size_t bytestozero); /* Constant tables in jutils.c */ #if 0 /* disabled by -frewrite-includes */ #if 0 /* This table is not actually needed in v6a */ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 595 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ #endif # 597 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegint.h" extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ /* Arithmetic coding probability estimation tables in jaricom.c */ extern const JLONG jpeg_aritab[]; #endif /* jpegint.h expanded by -frewrite-includes */ # 1214 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) /* jerror.h expanded by -frewrite-includes */ #include "jerror.h" /* fetch error codes too */ #else /* jerror.h expanded by -frewrite-includes */ # 1214 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" 1 /* * jerror.h * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1994-1997, Thomas G. Lane. * Modified 1997-2009 by Guido Vollbeding. * Lossless JPEG Modifications: * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: * Copyright (C) 2014, 2017, 2021-2023, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file defines the error and message codes for the JPEG library. * Edit this file to add new codes, or to translate the message strings to * some other language. * A set of error-reporting macros are defined too. Some applications using * the JPEG library may wish to include this file to get the error codes * and/or the macros. */ /* * To define the enum list of message codes, include this file without * defining macro JMESSAGE. To create a message string table, include it * again with a suitable JMESSAGE definition (see jerror.c for an example). */ #ifndef JMESSAGE #ifndef JERROR_H /* First time through, define the enum list */ #define JMAKE_ENUM_LIST #else # 32 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ #define JMESSAGE(code, string) #endif /* JERROR_H */ # 35 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" #endif /* JMESSAGE */ # 36 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" #ifdef JMAKE_ENUM_LIST typedef enum { #define JMESSAGE(code, string) code, #endif /* JMAKE_ENUM_LIST */ # 44 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ /* For maintenance convenience, list is alphabetical by message code name */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION < 70 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 49 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_ARITH_NOTIMPL, "Sorry, arithmetic coding is not implemented") #endif # 51 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 56 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") #endif # 58 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient (lossy) or spatial difference (lossless) out of range") JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 62 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_BAD_DROP_SAMPLING, "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") #endif # 65 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") JMESSAGE(JERR_BAD_LIB_VERSION, "Wrong JPEG library version: library is %d, caller expects %d") JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") JMESSAGE(JERR_BAD_PROGRESSION, "Invalid progressive/lossless parameters Ss=%d Se=%d Ah=%d Al=%d") JMESSAGE(JERR_BAD_PROG_SCRIPT, "Invalid progressive/lossless parameters at scan script entry %d") JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") JMESSAGE(JERR_BAD_STRUCT_SIZE, "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") JMESSAGE(JERR_EMS_READ, "Read from EMS failed") JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") JMESSAGE(JERR_FILE_READ, "Input file read error") JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, "Cannot transcode due to multiple use of quantization table %d") JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") JMESSAGE(JERR_NOTIMPL, "Requested features are incompatible") JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 112 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") #endif # 114 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_NO_BACKING_STORE, "Memory limit exceeded") JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") JMESSAGE(JERR_QUANT_COMPONENTS, "Cannot quantize more than %d color components") JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") JMESSAGE(JERR_TFILE_WRITE, "Write failed on temporary file --- out of disk space?") JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") JMESSAGE(JERR_XMS_READ, "Read from XMS failed") JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT_SHORT) JMESSAGE(JMSG_VERSION, JVERSION) JMESSAGE(JTRC_16BIT_TABLES, "Caution: quantization tables are too coarse for baseline JPEG") JMESSAGE(JTRC_ADOBE, "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") JMESSAGE(JTRC_DRI, "Define Restart Interval %u") JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") JMESSAGE(JTRC_EOI, "End Of Image") JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, "Warning: thumbnail image size does not match data length %u") JMESSAGE(JTRC_JFIF_EXTENSION, "JFIF extension marker: type 0x%02x, length %u") JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") JMESSAGE(JTRC_RST, "RST%d") JMESSAGE(JTRC_SMOOTH_NOTIMPL, "Smoothing not supported with nonstandard sampling ratios") JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") JMESSAGE(JTRC_SOI, "Start of Image") JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") JMESSAGE(JTRC_THUMB_JPEG, "JFIF extension marker: JPEG-compressed thumbnail image, length %u") JMESSAGE(JTRC_THUMB_PALETTE, "JFIF extension marker: palette thumbnail image, length %u") JMESSAGE(JTRC_THUMB_RGB, "JFIF extension marker: RGB thumbnail image, length %u") JMESSAGE(JTRC_UNKNOWN_IDS, "Unrecognized component IDs %d %d %d, assuming YCbCr (lossy) or RGB (lossless)") JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 191 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") #endif # 193 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JWRN_BOGUS_PROGRESSION, "Inconsistent progression sequence for component %d coefficient %d") JMESSAGE(JWRN_EXTRANEOUS_DATA, "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") JMESSAGE(JWRN_MUST_RESYNC, "Corrupt JPEG data: found marker 0x%02x instead of RST%d") JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION < 70 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 206 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") #if 0 /* disabled by -frewrite-includes */ #if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 208 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") #endif # 211 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" #endif # 212 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JWRN_BOGUS_ICC, "Corrupt JPEG data: bad ICC marker") #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION < 70 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 214 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_BAD_DROP_SAMPLING, "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") #endif # 217 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" JMESSAGE(JERR_BAD_RESTART, "Invalid restart interval %d; must be an integer multiple of the number of MCUs in an MCU row (%d)") #ifdef JMAKE_ENUM_LIST JMSG_LASTMSGCODE } J_MESSAGE_CODE; #undef JMAKE_ENUM_LIST #endif /* JMAKE_ENUM_LIST */ # 227 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" /* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ #undef JMESSAGE #ifndef JERROR_H #define JERROR_H /* Macros to simplify using the error and trace message stuff */ /* The first parameter is either type of cinfo pointer */ /* Fatal errors (print message and exit) */ #define ERREXIT(cinfo, code) \ ((cinfo)->err->msg_code = (code), \ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) #define ERREXIT1(cinfo, code, p1) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) #define ERREXIT2(cinfo, code, p1, p2) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[1] = (p2), \ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) #define ERREXIT3(cinfo, code, p1, p2, p3) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[2] = (p3), \ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) #define ERREXIT4(cinfo, code, p1, p2, p3, p4) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[2] = (p3), \ (cinfo)->err->msg_parm.i[3] = (p4), \ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) #define ERREXIT6(cinfo, code, p1, p2, p3, p4, p5, p6) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[2] = (p3), \ (cinfo)->err->msg_parm.i[3] = (p4), \ (cinfo)->err->msg_parm.i[4] = (p5), \ (cinfo)->err->msg_parm.i[5] = (p6), \ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) #define ERREXITS(cinfo, code, str) \ ((cinfo)->err->msg_code = (code), \ strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) #define MAKESTMT(stuff) do { stuff } while (0) /* Nonfatal errors (we can keep going, but the data is probably corrupt) */ #define WARNMS(cinfo, code) \ ((cinfo)->err->msg_code = (code), \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) #define WARNMS1(cinfo, code, p1) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) #define WARNMS2(cinfo, code, p1, p2) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[1] = (p2), \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) /* Informational/debugging messages */ #define TRACEMS(cinfo, lvl, code) \ ((cinfo)->err->msg_code = (code), \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) #define TRACEMS1(cinfo, lvl, code, p1) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) #define TRACEMS2(cinfo, lvl, code, p1, p2) \ ((cinfo)->err->msg_code = (code), \ (cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[1] = (p2), \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) #define TRACEMS3(cinfo, lvl, code, p1, p2, p3) \ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ (cinfo)->err->msg_code = (code); \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) #define TRACEMS4(cinfo, lvl, code, p1, p2, p3, p4) \ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ (cinfo)->err->msg_code = (code); \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) #define TRACEMS5(cinfo, lvl, code, p1, p2, p3, p4, p5) \ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ _mp[4] = (p5); \ (cinfo)->err->msg_code = (code); \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) #define TRACEMS8(cinfo, lvl, code, p1, p2, p3, p4, p5, p6, p7, p8) \ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ (cinfo)->err->msg_code = (code); \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) #define TRACEMSS(cinfo, lvl, code, str) \ ((cinfo)->err->msg_code = (code), \ strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) #endif /* JERROR_H */ # 337 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jerror.h" #endif /* jerror.h expanded by -frewrite-includes */ # 1215 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" 2 #endif # 1216 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #ifdef __cplusplus #ifndef DONT_USE_EXTERN_C } #endif # 1221 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #endif # 1222 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #endif /* JPEGLIB_H */ # 1224 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpeglib.h" #endif /* jpeglib.h expanded by -frewrite-includes */ # 25 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) /* transupp.h expanded by -frewrite-includes */ #include "transupp.h" /* My own external interface */ #else /* transupp.h expanded by -frewrite-includes */ # 25 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.h" 1 /* * transupp.h * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1997-2019, Thomas G. Lane, Guido Vollbeding. * libjpeg-turbo Modifications: * Copyright (C) 2017, 2021, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file contains declarations for image transformation routines and * other utility code used by the jpegtran sample application. These are * NOT part of the core JPEG library. But we keep these routines separate * from jpegtran.c to ease the task of maintaining jpegtran-like programs * that have other user interfaces. * * NOTE: all the routines declared here have very specific requirements * about when they are to be executed during the reading and writing of the * source and destination files. See the comments in transupp.c, or see * jpegtran.c for an example of correct usage. */ /* If you happen not to want the image transform support, disable it here */ #ifndef TRANSFORMS_SUPPORTED #define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ #endif # 27 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.h" /* * Although rotating and flipping data expressed as DCT coefficients is not * hard, there is an asymmetry in the JPEG format specification for images * whose dimensions aren't multiples of the iMCU size. The right and bottom * image edges are padded out to the next iMCU boundary with junk data; but * no padding is possible at the top and left edges. If we were to flip * the whole image including the pad data, then pad garbage would become * visible at the top and/or left, and real pixels would disappear into the * pad margins --- perhaps permanently, since encoders & decoders may not * bother to preserve DCT blocks that appear to be completely outside the * nominal image area. So, we have to exclude any partial iMCUs from the * basic transformation. * * Transpose is the only transformation that can handle partial iMCUs at the * right and bottom edges completely cleanly. flip_h can flip partial iMCUs * at the bottom, but leaves any partial iMCUs at the right edge untouched. * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. * The other transforms are defined as combinations of these basic transforms * and process edge blocks in a way that preserves the equivalence. * * The "trim" option causes untransformable partial iMCUs to be dropped; * this is not strictly lossless, but it usually gives the best-looking * result for odd-size images. Note that when this option is active, * the expected mathematical equivalences between the transforms may not hold. * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim * followed by -rot 180 -trim trims both edges.) * * We also offer a lossless-crop option, which discards data outside a given * image region but losslessly preserves what is inside. Like the rotate and * flip transforms, lossless crop is restricted by the JPEG format: the upper * left corner of the selected region must fall on an iMCU boundary. If this * does not hold for the given crop parameters, we silently move the upper left * corner up and/or left to make it so, simultaneously increasing the region * dimensions to keep the lower right crop corner unchanged. (Thus, the * output image covers at least the requested region, but may cover more.) * The adjustment of the region dimensions may be optionally disabled. * * A complementary lossless wipe option is provided to discard (gray out) data * inside a given image region while losslessly preserving what is outside. * A lossless drop option is also provided, which allows another JPEG image to * be inserted ("dropped") into the source image data at a given position, * replacing the existing image data at that position. Both the source image * and the drop image must have the same subsampling level. It is best if they * also have the same quantization (quality.) Otherwise, the quantization of * the output image will be adapted to accommodate the higher of the source * image quality and the drop image quality. The trim option can be used with * the drop option to requantize the drop image to match the source image. * * We also provide a lossless-resize option, which is kind of a lossless-crop * operation in the DCT coefficient block domain - it discards higher-order * coefficients and losslessly preserves lower-order coefficients of a * sub-block. * * Rotate/flip transform, resize, and crop can be requested together in a * single invocation. The crop is applied last --- that is, the crop region * is specified in terms of the destination image after transform/resize. * * We also offer a "force to grayscale" option, which simply discards the * chrominance channels of a YCbCr image. This is lossless in the sense that * the luminance channel is preserved exactly. It's not the same kind of * thing as the rotate/flip transformations, but it's convenient to handle it * as part of this package, mainly because the transformation routines have to * be aware of the option to know how many components to work on. */ /* * Codes for supported types of image transformations. */ typedef enum { JXFORM_NONE, /* no transformation */ JXFORM_FLIP_H, /* horizontal flip */ JXFORM_FLIP_V, /* vertical flip */ JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ JXFORM_ROT_90, /* 90-degree clockwise rotation */ JXFORM_ROT_180, /* 180-degree rotation */ JXFORM_ROT_270, /* 270-degree clockwise (or 90 ccw) */ JXFORM_WIPE, /* wipe */ JXFORM_DROP /* drop */ } JXFORM_CODE; /* * Codes for crop parameters, which can individually be unspecified, * positive or negative for xoffset or yoffset, * positive or force or reflect for width or height. */ typedef enum { JCROP_UNSET, JCROP_POS, JCROP_NEG, JCROP_FORCE, JCROP_REFLECT } JCROP_CODE; /* * Transform parameters struct. * NB: application must not change any elements of this struct after * calling jtransform_request_workspace. */ typedef struct { /* Options: set by caller */ JXFORM_CODE transform; /* image transform operator */ boolean perfect; /* if TRUE, fail if partial MCUs are requested */ boolean trim; /* if TRUE, trim partial MCUs as needed */ boolean force_grayscale; /* if TRUE, convert color image to grayscale */ boolean crop; /* if TRUE, crop or wipe source image, or drop */ boolean slow_hflip; /* For best performance, the JXFORM_FLIP_H transform normally modifies the source coefficients in place. Setting this to TRUE will instead use a slower, double-buffered algorithm, which leaves the source coefficients in tact (necessary if other transformed images must be generated from the same set of coefficients. */ /* Crop parameters: application need not set these unless crop is TRUE. * These can be filled in by jtransform_parse_crop_spec(). */ JDIMENSION crop_width; /* Width of selected region */ JCROP_CODE crop_width_set; /* (force-disables adjustment) */ JDIMENSION crop_height; /* Height of selected region */ JCROP_CODE crop_height_set; /* (force-disables adjustment) */ JDIMENSION crop_xoffset; /* X offset of selected region */ JCROP_CODE crop_xoffset_set; /* (negative measures from right edge) */ JDIMENSION crop_yoffset; /* Y offset of selected region */ JCROP_CODE crop_yoffset_set; /* (negative measures from bottom edge) */ /* Drop parameters: set by caller for drop request */ j_decompress_ptr drop_ptr; jvirt_barray_ptr *drop_coef_arrays; /* Internal workspace: caller should not touch these */ int num_components; /* # of components in workspace */ jvirt_barray_ptr *workspace_coef_arrays; /* workspace for transformations */ JDIMENSION output_width; /* cropped destination dimensions */ JDIMENSION output_height; JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */ JDIMENSION y_crop_offset; JDIMENSION drop_width; /* drop/wipe dimensions measured in iMCUs */ JDIMENSION drop_height; int iMCU_sample_width; /* destination iMCU size */ int iMCU_sample_height; } jpeg_transform_info; #if 0 /* disabled by -frewrite-includes */ #if TRANSFORMS_SUPPORTED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 177 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.h" /* Parse a crop specification (written in X11 geometry style) */ EXTERN(boolean) jtransform_parse_crop_spec(jpeg_transform_info *info, const char *spec); /* Request any required workspace */ EXTERN(boolean) jtransform_request_workspace(j_decompress_ptr srcinfo, jpeg_transform_info *info); /* Adjust output image parameters */ EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info *info); /* Execute the actual transformation, if any */ EXTERN(void) jtransform_execute_transform(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info *info); /* Determine whether lossless transformation is perfectly * possible for a specified image and transformation. */ EXTERN(boolean) jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height, int MCU_width, int MCU_height, JXFORM_CODE transform); /* jtransform_execute_transform used to be called * jtransform_execute_transformation, but some compilers complain about * routine names that long. This macro is here to avoid breaking any * old source code that uses the original name... */ #define jtransform_execute_transformation jtransform_execute_transform #endif /* TRANSFORMS_SUPPORTED */ # 209 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.h" /* * Support for copying optional markers from source to destination file. */ typedef enum { JCOPYOPT_NONE, /* copy no optional markers */ JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ JCOPYOPT_ALL, /* copy all optional markers */ JCOPYOPT_ALL_EXCEPT_ICC, /* copy all optional markers except APP2 */ JCOPYOPT_ICC /* copy only ICC profile (APP2) markers */ } JCOPY_OPTION; #define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ /* Setup decompression object to save desired markers in memory */ EXTERN(void) jcopy_markers_setup(j_decompress_ptr srcinfo, JCOPY_OPTION option); /* Copy markers saved in the given source object to the destination object */ EXTERN(void) jcopy_markers_execute(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOPY_OPTION option); #endif /* transupp.h expanded by -frewrite-includes */ # 26 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) /* jpegapicomp.h expanded by -frewrite-includes */ #include "jpegapicomp.h" #else /* jpegapicomp.h expanded by -frewrite-includes */ # 26 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" # 1 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegapicomp.h" 1 /* * jpegapicomp.h * * Copyright (C) 2010, 2020, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * JPEG compatibility macros * These declarations are considered internal to the JPEG library; most * applications using the library shouldn't need to include this file. */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 14 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegapicomp.h" #define _DCT_scaled_size DCT_h_scaled_size #define _DCT_h_scaled_size DCT_h_scaled_size #define _DCT_v_scaled_size DCT_v_scaled_size #define _min_DCT_scaled_size min_DCT_h_scaled_size #define _min_DCT_h_scaled_size min_DCT_h_scaled_size #define _min_DCT_v_scaled_size min_DCT_v_scaled_size #define _jpeg_width jpeg_width #define _jpeg_height jpeg_height #define JERR_ARITH_NOTIMPL JERR_NOT_COMPILED #else # 24 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegapicomp.h" #define _DCT_scaled_size DCT_scaled_size #define _DCT_h_scaled_size DCT_scaled_size #define _DCT_v_scaled_size DCT_scaled_size #define _min_DCT_scaled_size min_DCT_scaled_size #define _min_DCT_h_scaled_size min_DCT_scaled_size #define _min_DCT_v_scaled_size min_DCT_scaled_size #define _jpeg_width image_width #define _jpeg_height image_height #endif # 33 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/jpegapicomp.h" #endif /* jpegapicomp.h expanded by -frewrite-includes */ # 27 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" 2 #if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ctype.h expanded by -frewrite-includes */ #include /* to declare isdigit() */ #else /* ctype.h expanded by -frewrite-includes */ # 27 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" # 1 "/usr/include/ctype.h" 1 3 4 /* Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard 7.4: Character handling */ #ifndef _CTYPE_H #define _CTYPE_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/ctype.h" 3 4 # 26 "/usr/include/ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/ctype.h" 3 4 # 27 "/usr/include/ctype.h" 3 4 __BEGIN_DECLS #ifndef _ISbit /* These are all the characteristics of characters. If there get to be more than 16 distinct characteristics, many things must be changed that use `unsigned short int's. The characteristics are stored always in network byte order (big endian). We define the bit value interpretations here dependent on the machine's byte order. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/ctype.h" 3 4 # 40 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __BYTE_ORDER == __BIG_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/usr/include/ctype.h" 3 4 # define _ISbit(bit) (1 << (bit)) # else /* __BYTE_ORDER == __LITTLE_ENDIAN */ # 43 "/usr/include/ctype.h" 3 4 # define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) # endif # 45 "/usr/include/ctype.h" 3 4 enum { _ISupper = _ISbit (0), /* UPPERCASE. */ _ISlower = _ISbit (1), /* lowercase. */ _ISalpha = _ISbit (2), /* Alphabetic. */ _ISdigit = _ISbit (3), /* Numeric. */ _ISxdigit = _ISbit (4), /* Hexadecimal numeric. */ _ISspace = _ISbit (5), /* Whitespace. */ _ISprint = _ISbit (6), /* Printing. */ _ISgraph = _ISbit (7), /* Graphical. */ _ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */ _IScntrl = _ISbit (9), /* Control character. */ _ISpunct = _ISbit (10), /* Punctuation. */ _ISalnum = _ISbit (11) /* Alphanumeric. */ }; #endif /* ! _ISbit */ # 62 "/usr/include/ctype.h" 3 4 /* These are defined in ctype-info.c. The declarations here must match those in localeinfo.h. In the thread-specific locale model (see `uselocale' in ) we cannot use global variables for these as was done in the past. Instead, the following accessor functions return the address of each variable, which is local to the current thread if multithreaded. These point into arrays of 384, so they can be indexed by any `unsigned char' value [0,255]; by EOF (-1); or by any `signed char' value [-128,-1). ISO C requires that the ctype functions work for `unsigned char' values and for EOF; we also support negative `signed char' values for broken old programs. The case conversion arrays are of `int's rather than `unsigned char's because tolower (EOF) must be EOF, which doesn't fit into an `unsigned char'. But today more important is that the arrays are also used for multi-byte character sets. */ extern const unsigned short int **__ctype_b_loc (void) __THROW __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void) __THROW __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void) __THROW __attribute__ ((__const__)); #ifndef __cplusplus # define __isctype(c, type) \ ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type) #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined __USE_EXTERN_INLINES #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 91 "/usr/include/ctype.h" 3 4 # define __isctype_f(type) \ __extern_inline int \ is##type (int __c) __THROW \ { \ return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IS##type; \ } #endif # 98 "/usr/include/ctype.h" 3 4 #define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */ #define __toascii(c) ((c) & 0x7f) /* Mask off high bits. */ #define __exctype(name) extern int name (int) __THROW /* The following names are all functions: int isCHARACTERISTIC(int c); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ __exctype (isalnum); __exctype (isalpha); __exctype (iscntrl); __exctype (isdigit); __exctype (islower); __exctype (isgraph); __exctype (isprint); __exctype (ispunct); __exctype (isspace); __exctype (isupper); __exctype (isxdigit); /* Return the lowercase version of C. */ extern int tolower (int __c) __THROW; /* Return the uppercase version of C. */ extern int toupper (int __c) __THROW; /* ISO C99 introduced one new function. */ #ifdef __USE_ISOC99 __exctype (isblank); #endif # 132 "/usr/include/ctype.h" 3 4 #ifdef __USE_GNU /* Test C for a set of character classes according to MASK. */ extern int isctype (int __c, int __mask) __THROW; #endif # 137 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 139 "/usr/include/ctype.h" 3 4 /* Return nonzero iff C is in the ASCII set (i.e., is no more than 7 bits wide). */ extern int isascii (int __c) __THROW; /* Return the part of C that is in the ASCII set (i.e., the low-order 7 bits of C). */ extern int toascii (int __c) __THROW; /* These are the same as `toupper' and `tolower' except that they do not check the argument for being in the range of a `char'. */ __exctype (_toupper); __exctype (_tolower); #endif /* Use X/Open or use misc. */ # 153 "/usr/include/ctype.h" 3 4 /* This code is needed for the optimized mapping functions. */ #define __tobody(c, f, a, args) \ (__extension__ \ ({ int __res; \ if (sizeof (c) > 1) \ { \ if (__builtin_constant_p (c)) \ { \ int __c = (c); \ __res = __c < -128 || __c > 255 ? __c : (a)[__c]; \ } \ else \ __res = f args; \ } \ else \ __res = (a)[(int) (c)]; \ __res; })) #if 0 /* disabled by -frewrite-includes */ #if !defined __NO_CTYPE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 173 "/usr/include/ctype.h" 3 4 # ifdef __isctype_f __isctype_f (alnum) __isctype_f (alpha) __isctype_f (cntrl) __isctype_f (digit) __isctype_f (lower) __isctype_f (graph) __isctype_f (print) __isctype_f (punct) __isctype_f (space) __isctype_f (upper) __isctype_f (xdigit) # ifdef __USE_ISOC99 __isctype_f (blank) # endif # 188 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if 0 # elif defined __isctype #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 189 "/usr/include/ctype.h" 3 4 # define isalnum(c) __isctype((c), _ISalnum) # define isalpha(c) __isctype((c), _ISalpha) # define iscntrl(c) __isctype((c), _IScntrl) # define isdigit(c) __isctype((c), _ISdigit) # define islower(c) __isctype((c), _ISlower) # define isgraph(c) __isctype((c), _ISgraph) # define isprint(c) __isctype((c), _ISprint) # define ispunct(c) __isctype((c), _ISpunct) # define isspace(c) __isctype((c), _ISspace) # define isupper(c) __isctype((c), _ISupper) # define isxdigit(c) __isctype((c), _ISxdigit) # ifdef __USE_ISOC99 # define isblank(c) __isctype((c), _ISblank) # endif # 203 "/usr/include/ctype.h" 3 4 # endif # 204 "/usr/include/ctype.h" 3 4 # ifdef __USE_EXTERN_INLINES __extern_inline int __NTH (tolower (int __c)) { return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; } __extern_inline int __NTH (toupper (int __c)) { return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; } # endif # 218 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 220 "/usr/include/ctype.h" 3 4 # define tolower(c) __tobody (c, tolower, *__ctype_tolower_loc (), (c)) # define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c)) # endif /* Optimizing gcc */ # 223 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 225 "/usr/include/ctype.h" 3 4 # define isascii(c) __isascii (c) # define toascii(c) __toascii (c) # define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)]) # define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)]) # endif # 231 "/usr/include/ctype.h" 3 4 #endif /* Not __NO_CTYPE. */ # 233 "/usr/include/ctype.h" 3 4 #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 237 "/usr/include/ctype.h" 3 4 # 238 "/usr/include/ctype.h" 3 4 /* These definitions are similar to the ones above but all functions take as an argument a handle for the locale which shall be used. */ # define __isctype_l(c, type, locale) \ ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) # define __exctype_l(name) \ extern int name (int, locale_t) __THROW /* The following names are all functions: int isCHARACTERISTIC(int c, locale_t *locale); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ __exctype_l (isalnum_l); __exctype_l (isalpha_l); __exctype_l (iscntrl_l); __exctype_l (isdigit_l); __exctype_l (islower_l); __exctype_l (isgraph_l); __exctype_l (isprint_l); __exctype_l (ispunct_l); __exctype_l (isspace_l); __exctype_l (isupper_l); __exctype_l (isxdigit_l); __exctype_l (isblank_l); /* Return the lowercase version of C in locale L. */ extern int __tolower_l (int __c, locale_t __l) __THROW; extern int tolower_l (int __c, locale_t __l) __THROW; /* Return the uppercase version of C. */ extern int __toupper_l (int __c, locale_t __l) __THROW; extern int toupper_l (int __c, locale_t __l) __THROW; #if 0 /* disabled by -frewrite-includes */ # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 275 "/usr/include/ctype.h" 3 4 # define __tolower_l(c, locale) \ __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale)) # define __toupper_l(c, locale) \ __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale)) # define tolower_l(c, locale) __tolower_l ((c), (locale)) # define toupper_l(c, locale) __toupper_l ((c), (locale)) # endif /* Optimizing gcc */ # 282 "/usr/include/ctype.h" 3 4 # ifndef __NO_CTYPE # define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l)) # define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l)) # define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l)) # define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l)) # define __islower_l(c,l) __isctype_l((c), _ISlower, (l)) # define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l)) # define __isprint_l(c,l) __isctype_l((c), _ISprint, (l)) # define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l)) # define __isspace_l(c,l) __isctype_l((c), _ISspace, (l)) # define __isupper_l(c,l) __isctype_l((c), _ISupper, (l)) # define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l)) # define __isblank_l(c,l) __isctype_l((c), _ISblank, (l)) # ifdef __USE_MISC # define __isascii_l(c,l) ((l), __isascii (c)) # define __toascii_l(c,l) ((l), __toascii (c)) # endif # 303 "/usr/include/ctype.h" 3 4 # define isalnum_l(c,l) __isalnum_l ((c), (l)) # define isalpha_l(c,l) __isalpha_l ((c), (l)) # define iscntrl_l(c,l) __iscntrl_l ((c), (l)) # define isdigit_l(c,l) __isdigit_l ((c), (l)) # define islower_l(c,l) __islower_l ((c), (l)) # define isgraph_l(c,l) __isgraph_l ((c), (l)) # define isprint_l(c,l) __isprint_l ((c), (l)) # define ispunct_l(c,l) __ispunct_l ((c), (l)) # define isspace_l(c,l) __isspace_l ((c), (l)) # define isupper_l(c,l) __isupper_l ((c), (l)) # define isxdigit_l(c,l) __isxdigit_l ((c), (l)) # define isblank_l(c,l) __isblank_l ((c), (l)) # ifdef __USE_MISC # define isascii_l(c,l) __isascii_l ((c), (l)) # define toascii_l(c,l) __toascii_l ((c), (l)) # endif # 322 "/usr/include/ctype.h" 3 4 # endif /* Not __NO_CTYPE. */ # 324 "/usr/include/ctype.h" 3 4 #endif /* Use POSIX 2008. */ # 326 "/usr/include/ctype.h" 3 4 __END_DECLS #endif /* ctype.h */ # 330 "/usr/include/ctype.h" 3 4 #endif /* ctype.h expanded by -frewrite-includes */ # 28 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" 2 #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 31 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" #define dstinfo_min_DCT_h_scaled_size dstinfo->min_DCT_h_scaled_size #define dstinfo_min_DCT_v_scaled_size dstinfo->min_DCT_v_scaled_size #else # 34 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" #define dstinfo_min_DCT_h_scaled_size DCTSIZE #define dstinfo_min_DCT_v_scaled_size DCTSIZE #endif # 37 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" #if 0 /* disabled by -frewrite-includes */ #if TRANSFORMS_SUPPORTED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 40 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" /* * Lossless image transformation routines. These routines work on DCT * coefficient arrays and thus do not require any lossy decompression * or recompression of the image. * Thanks to Guido Vollbeding for the initial design and code of this feature, * and to Ben Jackson for introducing the cropping feature. * * Horizontal flipping is done in-place, using a single top-to-bottom * pass through the virtual source array. It will thus be much the * fastest option for images larger than main memory. * * The other routines require a set of destination virtual arrays, so they * need twice as much memory as jpegtran normally does. The destination * arrays are always written in normal scan order (top to bottom) because * the virtual array manager expects this. The source arrays will be scanned * in the corresponding order, which means multiple passes through the source * arrays for most of the transforms. That could result in much thrashing * if the image is larger than main memory. * * If cropping or trimming is involved, the destination arrays may be smaller * than the source arrays. Note it is not possible to do horizontal flip * in-place when a nonzero Y crop offset is specified, since we'd have to move * data from one block row to another but the virtual array manager doesn't * guarantee we can touch more than one row at a time. So in that case, * we have to use a separate destination array. * * Some notes about the operating environment of the individual transform * routines: * 1. Both the source and destination virtual arrays are allocated from the * source JPEG object, and therefore should be manipulated by calling the * source's memory manager. * 2. The destination's component count should be used. It may be smaller * than the source's when forcing to grayscale. * 3. Likewise the destination's sampling factors should be used. When * forcing to grayscale the destination's sampling factors will be all 1, * and we may as well take that as the effective iMCU size. * 4. When "trim" is in effect, the destination's dimensions will be the * trimmed values but the source's will be untrimmed. * 5. When "crop" is in effect, the destination's dimensions will be the * cropped values but the source's will be uncropped. Each transform * routine is responsible for picking up source data starting at the * correct X and Y offset for the crop region. (The X and Y offsets * passed to the transform routines are measured in iMCU blocks of the * destination.) * 6. All the routines assume that the source and destination buffers are * padded out to a full iMCU boundary. This is true, although for the * source buffer it is an undocumented property of jdcoefct.c. */ LOCAL(void) dequant_comp(j_decompress_ptr cinfo, jpeg_component_info *compptr, jvirt_barray_ptr coef_array, JQUANT_TBL *qtblptr1) { JDIMENSION blk_x, blk_y; int offset_y, k; JQUANT_TBL *qtblptr; JBLOCKARRAY buffer; JBLOCKROW block; JCOEFPTR ptr; qtblptr = compptr->quant_table; for (blk_y = 0; blk_y < compptr->height_in_blocks; blk_y += compptr->v_samp_factor) { buffer = (*cinfo->mem->access_virt_barray) ((j_common_ptr)cinfo, coef_array, blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { block = buffer[offset_y]; for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { ptr = block[blk_x]; for (k = 0; k < DCTSIZE2; k++) if (qtblptr->quantval[k] != qtblptr1->quantval[k]) ptr[k] *= qtblptr->quantval[k] / qtblptr1->quantval[k]; } } } } LOCAL(void) requant_comp(j_decompress_ptr cinfo, jpeg_component_info *compptr, jvirt_barray_ptr coef_array, JQUANT_TBL *qtblptr1) { JDIMENSION blk_x, blk_y; int offset_y, k; JQUANT_TBL *qtblptr; JBLOCKARRAY buffer; JBLOCKROW block; JCOEFPTR ptr; JCOEF temp, qval; qtblptr = compptr->quant_table; for (blk_y = 0; blk_y < compptr->height_in_blocks; blk_y += compptr->v_samp_factor) { buffer = (*cinfo->mem->access_virt_barray) ((j_common_ptr)cinfo, coef_array, blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { block = buffer[offset_y]; for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { ptr = block[blk_x]; for (k = 0; k < DCTSIZE2; k++) { temp = qtblptr->quantval[k]; qval = qtblptr1->quantval[k]; if (temp != qval && qval != 0) { temp *= ptr[k]; /* The following quantization code is copied from jcdctmgr.c */ #ifdef FAST_DIVIDE #define DIVIDE_BY(a, b) a /= b #else # 152 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" #define DIVIDE_BY(a, b) if (a >= b) a /= b; else a = 0 #endif # 154 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" if (temp < 0) { temp = -temp; temp += qval >> 1; /* for rounding */ DIVIDE_BY(temp, qval); temp = -temp; } else { temp += qval >> 1; /* for rounding */ DIVIDE_BY(temp, qval); } ptr[k] = temp; } } } } } } /* * Calculate largest common denominator using Euclid's algorithm. */ LOCAL(JCOEF) largest_common_denominator(JCOEF a, JCOEF b) { JCOEF c; do { c = a % b; a = b; b = c; } while (c); return a; } LOCAL(void) adjust_quant(j_decompress_ptr srcinfo, jvirt_barray_ptr *src_coef_arrays, j_decompress_ptr dropinfo, jvirt_barray_ptr *drop_coef_arrays, boolean trim, j_compress_ptr dstinfo) { jpeg_component_info *compptr1, *compptr2; JQUANT_TBL *qtblptr1, *qtblptr2, *qtblptr3; int ci, k; for (ci = 0; ci < dstinfo->num_components && ci < dropinfo->num_components; ci++) { compptr1 = srcinfo->comp_info + ci; compptr2 = dropinfo->comp_info + ci; qtblptr1 = compptr1->quant_table; if (qtblptr1 == NULL) ERREXIT1(srcinfo, JERR_NO_QUANT_TABLE, compptr1->quant_tbl_no); qtblptr2 = compptr2->quant_table; if (qtblptr2 == NULL) ERREXIT1(dropinfo, JERR_NO_QUANT_TABLE, compptr2->quant_tbl_no); for (k = 0; k < DCTSIZE2; k++) { if (qtblptr1->quantval[k] != qtblptr2->quantval[k]) { if (trim) requant_comp(dropinfo, compptr2, drop_coef_arrays[ci], qtblptr1); else { qtblptr3 = dstinfo->quant_tbl_ptrs[compptr1->quant_tbl_no]; for (k = 0; k < DCTSIZE2; k++) if (qtblptr1->quantval[k] != qtblptr2->quantval[k]) qtblptr3->quantval[k] = largest_common_denominator(qtblptr1->quantval[k], qtblptr2->quantval[k]); dequant_comp(srcinfo, compptr1, src_coef_arrays[ci], qtblptr3); dequant_comp(dropinfo, compptr2, drop_coef_arrays[ci], qtblptr3); } break; } } } } LOCAL(void) do_drop(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, j_decompress_ptr dropinfo, jvirt_barray_ptr *drop_coef_arrays, JDIMENSION drop_width, JDIMENSION drop_height) /* Drop (insert) the contents of another image into the source image. If the * number of components in the drop image is smaller than the number of * components in the destination image, then we fill in the remaining * components with zero. This allows for dropping the contents of grayscale * images into (arbitrarily sampled) color images. */ { JDIMENSION comp_width, comp_height; JDIMENSION blk_y, x_drop_blocks, y_drop_blocks; int ci, offset_y; JBLOCKARRAY src_buffer, dst_buffer; jpeg_component_info *compptr; for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = drop_width * compptr->h_samp_factor; comp_height = drop_height * compptr->v_samp_factor; x_drop_blocks = x_crop_offset * compptr->h_samp_factor; y_drop_blocks = y_crop_offset * compptr->v_samp_factor; for (blk_y = 0; blk_y < comp_height; blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], blk_y + y_drop_blocks, (JDIMENSION)compptr->v_samp_factor, TRUE); if (ci < dropinfo->num_components) { src_buffer = (*dropinfo->mem->access_virt_barray) ((j_common_ptr)dropinfo, drop_coef_arrays[ci], blk_y, (JDIMENSION)compptr->v_samp_factor, FALSE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y] + x_drop_blocks, comp_width); } } else { for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { memset(dst_buffer[offset_y] + x_drop_blocks, 0, comp_width * sizeof(JBLOCK)); } } } } } LOCAL(void) do_crop(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* Crop. This is only used when no rotate/flip is requested with the crop. */ { JDIMENSION dst_blk_y, x_crop_blocks, y_crop_blocks; int ci, offset_y; JBLOCKARRAY src_buffer, dst_buffer; jpeg_component_info *compptr; /* We simply have to copy the right amount of data (the destination's * image size) starting at the given X and Y offsets in the source. */ for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y + y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, dst_buffer[offset_y], compptr->width_in_blocks); } } } } LOCAL(void) do_crop_ext_zero(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* Crop. This is only used when no rotate/flip is requested with the crop. * Extension: If the destination size is larger than the source, we fill in the * expanded region with zero (neutral gray). Note that we also have to zero * partial iMCUs at the right and bottom edge of the source image area in this * case. */ { JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height; JDIMENSION dst_blk_y, x_crop_blocks, y_crop_blocks; int ci, offset_y; JBLOCKARRAY src_buffer, dst_buffer; jpeg_component_info *compptr; MCU_cols = srcinfo->output_width / (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); MCU_rows = srcinfo->output_height / (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = MCU_cols * compptr->h_samp_factor; comp_height = MCU_rows * compptr->v_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); if (dstinfo->_jpeg_height > srcinfo->output_height) { if (dst_blk_y < y_crop_blocks || dst_blk_y >= y_crop_blocks + comp_height) { for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { memset(dst_buffer[offset_y], 0, compptr->width_in_blocks * sizeof(JBLOCK)); } continue; } src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y - y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); } else { src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y + y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); } for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { if (dstinfo->_jpeg_width > srcinfo->output_width) { if (x_crop_blocks > 0) { memset(dst_buffer[offset_y], 0, x_crop_blocks * sizeof(JBLOCK)); } jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y] + x_crop_blocks, comp_width); if (compptr->width_in_blocks > x_crop_blocks + comp_width) { memset(dst_buffer[offset_y] + x_crop_blocks + comp_width, 0, (compptr->width_in_blocks - x_crop_blocks - comp_width) * sizeof(JBLOCK)); } } else { jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, dst_buffer[offset_y], compptr->width_in_blocks); } } } } } LOCAL(void) do_crop_ext_flat(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* Crop. This is only used when no rotate/flip is requested with the crop. * Extension: The destination width is larger than the source, and we fill in * the expanded region with the DC coefficient of the adjacent block. Note * that we also have to fill partial iMCUs at the right and bottom edge of the * source image area in this case. */ { JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height; JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; int ci, offset_y; JCOEF dc; JBLOCKARRAY src_buffer, dst_buffer; jpeg_component_info *compptr; MCU_cols = srcinfo->output_width / (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); MCU_rows = srcinfo->output_height / (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = MCU_cols * compptr->h_samp_factor; comp_height = MCU_rows * compptr->v_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); if (dstinfo->_jpeg_height > srcinfo->output_height) { if (dst_blk_y < y_crop_blocks || dst_blk_y >= y_crop_blocks + comp_height) { for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { memset(dst_buffer[offset_y], 0, compptr->width_in_blocks * sizeof(JBLOCK)); } continue; } src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y - y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); } else { src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y + y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); } for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { if (x_crop_blocks > 0) { memset(dst_buffer[offset_y], 0, x_crop_blocks * sizeof(JBLOCK)); dc = src_buffer[offset_y][0][0]; for (dst_blk_x = 0; dst_blk_x < x_crop_blocks; dst_blk_x++) { dst_buffer[offset_y][dst_blk_x][0] = dc; } } jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y] + x_crop_blocks, comp_width); if (compptr->width_in_blocks > x_crop_blocks + comp_width) { memset(dst_buffer[offset_y] + x_crop_blocks + comp_width, 0, (compptr->width_in_blocks - x_crop_blocks - comp_width) * sizeof(JBLOCK)); dc = src_buffer[offset_y][comp_width - 1][0]; for (dst_blk_x = x_crop_blocks + comp_width; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { dst_buffer[offset_y][dst_blk_x][0] = dc; } } } } } } LOCAL(void) do_crop_ext_reflect(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* Crop. This is only used when no rotate/flip is requested with the crop. * Extension: The destination width is larger than the source, and we fill in * the expanded region with repeated reflections of the source image. Note * that we also have to fill partial iMCUs at the right and bottom edge of the * source image area in this case. */ { JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, src_blk_x; JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; int ci, k, offset_y; JBLOCKARRAY src_buffer, dst_buffer; JBLOCKROW src_row_ptr, dst_row_ptr; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; MCU_cols = srcinfo->output_width / (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); MCU_rows = srcinfo->output_height / (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = MCU_cols * compptr->h_samp_factor; comp_height = MCU_rows * compptr->v_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); if (dstinfo->_jpeg_height > srcinfo->output_height) { if (dst_blk_y < y_crop_blocks || dst_blk_y >= y_crop_blocks + comp_height) { for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { memset(dst_buffer[offset_y], 0, compptr->width_in_blocks * sizeof(JBLOCK)); } continue; } src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y - y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); } else { src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y + y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); } for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { /* Copy source region */ jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y] + x_crop_blocks, comp_width); if (x_crop_blocks > 0) { /* Reflect to left */ dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks; for (dst_blk_x = x_crop_blocks; dst_blk_x > 0;) { src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0; src_blk_x--, dst_blk_x--) { dst_ptr = *(--dst_row_ptr); /* destination goes left */ src_ptr = *src_row_ptr++; /* source goes right */ /* This unrolled loop doesn't need to know which row it's on. */ for (k = 0; k < DCTSIZE2; k += 2) { *dst_ptr++ = *src_ptr++; /* copy even column */ *dst_ptr++ = -(*src_ptr++); /* copy odd column with sign change */ } } } } if (compptr->width_in_blocks > x_crop_blocks + comp_width) { /* Reflect to right */ dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks + comp_width; for (dst_blk_x = compptr->width_in_blocks - x_crop_blocks - comp_width; dst_blk_x > 0;) { src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0; src_blk_x--, dst_blk_x--) { dst_ptr = *dst_row_ptr++; /* destination goes right */ src_ptr = *(--src_row_ptr); /* source goes left */ /* This unrolled loop doesn't need to know which row it's on. */ for (k = 0; k < DCTSIZE2; k += 2) { *dst_ptr++ = *src_ptr++; /* copy even column */ *dst_ptr++ = -(*src_ptr++); /* copy odd column with sign change */ } } } } } } } } LOCAL(void) do_wipe(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, JDIMENSION drop_width, JDIMENSION drop_height) /* Wipe - discard image contents of specified region and fill with zero * (neutral gray) */ { JDIMENSION x_wipe_blocks, wipe_width; JDIMENSION y_wipe_blocks, wipe_bottom; int ci, offset_y; JBLOCKARRAY buffer; jpeg_component_info *compptr; for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; wipe_width = drop_width * compptr->h_samp_factor; y_wipe_blocks = y_crop_offset * compptr->v_samp_factor; wipe_bottom = drop_height * compptr->v_samp_factor + y_wipe_blocks; for (; y_wipe_blocks < wipe_bottom; y_wipe_blocks += compptr->v_samp_factor) { buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], y_wipe_blocks, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { memset(buffer[offset_y] + x_wipe_blocks, 0, wipe_width * sizeof(JBLOCK)); } } } } LOCAL(void) do_flatten(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, JDIMENSION drop_width, JDIMENSION drop_height) /* Flatten - discard image contents of specified region, similarly to wipe, * but fill with the average of adjacent blocks instead of zero. */ { JDIMENSION x_wipe_blocks, wipe_width, wipe_right; JDIMENSION y_wipe_blocks, wipe_bottom, blk_x; int ci, offset_y, dc_left_value, dc_right_value, average; JBLOCKARRAY buffer; jpeg_component_info *compptr; for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; wipe_width = drop_width * compptr->h_samp_factor; wipe_right = wipe_width + x_wipe_blocks; y_wipe_blocks = y_crop_offset * compptr->v_samp_factor; wipe_bottom = drop_height * compptr->v_samp_factor + y_wipe_blocks; for (; y_wipe_blocks < wipe_bottom; y_wipe_blocks += compptr->v_samp_factor) { buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], y_wipe_blocks, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { memset(buffer[offset_y] + x_wipe_blocks, 0, wipe_width * sizeof(JBLOCK)); if (x_wipe_blocks > 0) { dc_left_value = buffer[offset_y][x_wipe_blocks - 1][0]; if (wipe_right < compptr->width_in_blocks) { dc_right_value = buffer[offset_y][wipe_right][0]; average = (dc_left_value + dc_right_value) >> 1; } else { average = dc_left_value; } } else if (wipe_right < compptr->width_in_blocks) { average = buffer[offset_y][wipe_right][0]; } else continue; for (blk_x = x_wipe_blocks; blk_x < wipe_right; blk_x++) { buffer[offset_y][blk_x][0] = (JCOEF)average; } } } } } LOCAL(void) do_reflect(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, jvirt_barray_ptr *src_coef_arrays, JDIMENSION drop_width, JDIMENSION drop_height) /* Reflect - discard image contents of specified region, similarly to wipe, * but fill with repeated reflections of the outside region instead of zero. * NB: y_crop_offset is assumed to be zero. */ { JDIMENSION x_wipe_blocks, wipe_width; JDIMENSION y_wipe_blocks, wipe_bottom; JDIMENSION src_blk_x, dst_blk_x; int ci, k, offset_y; JBLOCKARRAY buffer; JBLOCKROW src_row_ptr, dst_row_ptr; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; wipe_width = drop_width * compptr->h_samp_factor; wipe_bottom = drop_height * compptr->v_samp_factor; for (y_wipe_blocks = 0; y_wipe_blocks < wipe_bottom; y_wipe_blocks += compptr->v_samp_factor) { buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], y_wipe_blocks, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { if (x_wipe_blocks > 0) { /* Reflect from left */ dst_row_ptr = buffer[offset_y] + x_wipe_blocks; for (dst_blk_x = wipe_width; dst_blk_x > 0;) { src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ for (src_blk_x = x_wipe_blocks; src_blk_x > 0 && dst_blk_x > 0; src_blk_x--, dst_blk_x--) { dst_ptr = *dst_row_ptr++; /* destination goes right */ src_ptr = *(--src_row_ptr); /* source goes left */ /* this unrolled loop doesn't need to know which row it's on... */ for (k = 0; k < DCTSIZE2; k += 2) { *dst_ptr++ = *src_ptr++; /* copy even column */ *dst_ptr++ = -(*src_ptr++); /* copy odd column with sign change */ } } } } else if (compptr->width_in_blocks > x_wipe_blocks + wipe_width) { /* Reflect from right */ dst_row_ptr = buffer[offset_y] + x_wipe_blocks + wipe_width; for (dst_blk_x = wipe_width; dst_blk_x > 0;) { src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ src_blk_x = compptr->width_in_blocks - x_wipe_blocks - wipe_width; for (; src_blk_x > 0 && dst_blk_x > 0; src_blk_x--, dst_blk_x--) { dst_ptr = *(--dst_row_ptr); /* destination goes left */ src_ptr = *src_row_ptr++; /* source goes right */ /* this unrolled loop doesn't need to know which row it's on... */ for (k = 0; k < DCTSIZE2; k += 2) { *dst_ptr++ = *src_ptr++; /* copy even column */ *dst_ptr++ = -(*src_ptr++); /* copy odd column with sign change */ } } } } else { memset(buffer[offset_y] + x_wipe_blocks, 0, wipe_width * sizeof(JBLOCK)); } } } } } LOCAL(void) do_flip_h_no_crop(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, jvirt_barray_ptr *src_coef_arrays) /* Horizontal flip; done in-place, so no separate dest array is required. * NB: this only works when y_crop_offset is zero. */ { JDIMENSION MCU_cols, comp_width, blk_x, blk_y, x_crop_blocks; int ci, k, offset_y; JBLOCKARRAY buffer; JCOEFPTR ptr1, ptr2; JCOEF temp1, temp2; jpeg_component_info *compptr; /* Horizontal mirroring of DCT blocks is accomplished by swapping * pairs of blocks in-place. Within a DCT block, we perform horizontal * mirroring by changing the signs of odd-numbered columns. * Partial iMCUs at the right edge are left untouched. */ MCU_cols = srcinfo->output_width / (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = MCU_cols * compptr->h_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; for (blk_y = 0; blk_y < compptr->height_in_blocks; blk_y += compptr->v_samp_factor) { buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { /* Do the mirroring */ for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) { ptr1 = buffer[offset_y][blk_x]; ptr2 = buffer[offset_y][comp_width - blk_x - 1]; /* this unrolled loop doesn't need to know which row it's on... */ for (k = 0; k < DCTSIZE2; k += 2) { temp1 = *ptr1; /* swap even column */ temp2 = *ptr2; *ptr1++ = temp2; *ptr2++ = temp1; temp1 = *ptr1; /* swap odd column with sign change */ temp2 = *ptr2; *ptr1++ = -temp2; *ptr2++ = -temp1; } } if (x_crop_blocks > 0) { /* Now left-justify the portion of the data to be kept. * We can't use a single jcopy_block_row() call because that routine * depends on memcpy(), whose behavior is unspecified for overlapping * source and destination areas. Sigh. */ for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { jcopy_block_row(buffer[offset_y] + blk_x + x_crop_blocks, buffer[offset_y] + blk_x, (JDIMENSION)1); } } } } } } LOCAL(void) do_flip_h(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* Horizontal flip in general cropping case */ { JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; JDIMENSION x_crop_blocks, y_crop_blocks; int ci, k, offset_y; JBLOCKARRAY src_buffer, dst_buffer; JBLOCKROW src_row_ptr, dst_row_ptr; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; /* Here we must output into a separate array because we can't touch * different rows of a single virtual array simultaneously. Otherwise, * this is essentially the same as the routine above. */ MCU_cols = srcinfo->output_width / (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = MCU_cols * compptr->h_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y + y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { dst_row_ptr = dst_buffer[offset_y]; src_row_ptr = src_buffer[offset_y]; for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { if (x_crop_blocks + dst_blk_x < comp_width) { /* Do the mirrorable blocks */ dst_ptr = dst_row_ptr[dst_blk_x]; src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; /* this unrolled loop doesn't need to know which row it's on... */ for (k = 0; k < DCTSIZE2; k += 2) { *dst_ptr++ = *src_ptr++; /* copy even column */ *dst_ptr++ = -(*src_ptr++); /* copy odd column with sign change */ } } else { /* Copy last partial block(s) verbatim */ jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks, dst_row_ptr + dst_blk_x, (JDIMENSION)1); } } } } } } LOCAL(void) do_flip_v(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* Vertical flip */ { JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; JDIMENSION x_crop_blocks, y_crop_blocks; int ci, i, j, offset_y; JBLOCKARRAY src_buffer, dst_buffer; JBLOCKROW src_row_ptr, dst_row_ptr; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; /* We output into a separate array because we can't touch different * rows of the source virtual array simultaneously. Otherwise, this * is a pretty straightforward analog of horizontal flip. * Within a DCT block, vertical mirroring is done by changing the signs * of odd-numbered rows. * Partial iMCUs at the bottom edge are copied verbatim. */ MCU_rows = srcinfo->output_height / (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_height = MCU_rows * compptr->v_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); if (y_crop_blocks + dst_blk_y < comp_height) { /* Row is within the mirrorable area. */ src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], comp_height - y_crop_blocks - dst_blk_y - (JDIMENSION)compptr->v_samp_factor, (JDIMENSION)compptr->v_samp_factor, FALSE); } else { /* Bottom-edge blocks will be copied verbatim. */ src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y + y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); } for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { if (y_crop_blocks + dst_blk_y < comp_height) { /* Row is within the mirrorable area. */ dst_row_ptr = dst_buffer[offset_y]; src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; src_row_ptr += x_crop_blocks; for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { dst_ptr = dst_row_ptr[dst_blk_x]; src_ptr = src_row_ptr[dst_blk_x]; for (i = 0; i < DCTSIZE; i += 2) { /* copy even row */ for (j = 0; j < DCTSIZE; j++) *dst_ptr++ = *src_ptr++; /* copy odd row with sign change */ for (j = 0; j < DCTSIZE; j++) *dst_ptr++ = -(*src_ptr++); } } } else { /* Just copy row verbatim. */ jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, dst_buffer[offset_y], compptr->width_in_blocks); } } } } } LOCAL(void) do_transpose(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* Transpose source into destination */ { JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; int ci, i, j, offset_x, offset_y; JBLOCKARRAY src_buffer, dst_buffer; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; /* Transposing pixels within a block just requires transposing the * DCT coefficients. * Partial iMCUs at the edges require no special treatment; we simply * process all the available DCT blocks for every component. */ for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x += compptr->h_samp_factor) { src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_x + x_crop_blocks, (JDIMENSION)compptr->h_samp_factor, FALSE); for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; src_ptr = src_buffer[offset_x][dst_blk_y + offset_y + y_crop_blocks]; for (i = 0; i < DCTSIZE; i++) for (j = 0; j < DCTSIZE; j++) dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; } } } } } } LOCAL(void) do_rot_90(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* 90 degree rotation is equivalent to * 1. Transposing the image; * 2. Horizontal mirroring. * These two steps are merged into a single processing routine. */ { JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; JDIMENSION x_crop_blocks, y_crop_blocks; int ci, i, j, offset_x, offset_y; JBLOCKARRAY src_buffer, dst_buffer; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; /* Because of the horizontal mirror step, we can't process partial iMCUs * at the (output) right edge properly. They just get transposed and * not mirrored. */ MCU_cols = srcinfo->output_height / (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = MCU_cols * compptr->h_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x += compptr->h_samp_factor) { if (x_crop_blocks + dst_blk_x < comp_width) { /* Block is within the mirrorable area. */ src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], comp_width - x_crop_blocks - dst_blk_x - (JDIMENSION)compptr->h_samp_factor, (JDIMENSION)compptr->h_samp_factor, FALSE); } else { /* Edge blocks are transposed but not mirrored. */ src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_x + x_crop_blocks, (JDIMENSION)compptr->h_samp_factor, FALSE); } for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; if (x_crop_blocks + dst_blk_x < comp_width) { /* Block is within the mirrorable area. */ src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] [dst_blk_y + offset_y + y_crop_blocks]; for (i = 0; i < DCTSIZE; i++) { for (j = 0; j < DCTSIZE; j++) dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; i++; for (j = 0; j < DCTSIZE; j++) dst_ptr[j * DCTSIZE + i] = -src_ptr[i * DCTSIZE + j]; } } else { /* Edge blocks are transposed but not mirrored. */ src_ptr = src_buffer[offset_x] [dst_blk_y + offset_y + y_crop_blocks]; for (i = 0; i < DCTSIZE; i++) for (j = 0; j < DCTSIZE; j++) dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; } } } } } } } LOCAL(void) do_rot_270(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* 270 degree rotation is equivalent to * 1. Horizontal mirroring; * 2. Transposing the image. * These two steps are merged into a single processing routine. */ { JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; JDIMENSION x_crop_blocks, y_crop_blocks; int ci, i, j, offset_x, offset_y; JBLOCKARRAY src_buffer, dst_buffer; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; /* Because of the horizontal mirror step, we can't process partial iMCUs * at the (output) bottom edge properly. They just get transposed and * not mirrored. */ MCU_rows = srcinfo->output_width / (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_height = MCU_rows * compptr->v_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x += compptr->h_samp_factor) { src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_x + x_crop_blocks, (JDIMENSION)compptr->h_samp_factor, FALSE); for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; if (y_crop_blocks + dst_blk_y < comp_height) { /* Block is within the mirrorable area. */ src_ptr = src_buffer[offset_x] [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; for (i = 0; i < DCTSIZE; i++) { for (j = 0; j < DCTSIZE; j++) { dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; j++; dst_ptr[j * DCTSIZE + i] = -src_ptr[i * DCTSIZE + j]; } } } else { /* Edge blocks are transposed but not mirrored. */ src_ptr = src_buffer[offset_x] [dst_blk_y + offset_y + y_crop_blocks]; for (i = 0; i < DCTSIZE; i++) for (j = 0; j < DCTSIZE; j++) dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; } } } } } } } LOCAL(void) do_rot_180(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* 180 degree rotation is equivalent to * 1. Vertical mirroring; * 2. Horizontal mirroring. * These two steps are merged into a single processing routine. */ { JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; JDIMENSION x_crop_blocks, y_crop_blocks; int ci, i, j, offset_y; JBLOCKARRAY src_buffer, dst_buffer; JBLOCKROW src_row_ptr, dst_row_ptr; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; MCU_cols = srcinfo->output_width / (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); MCU_rows = srcinfo->output_height / (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = MCU_cols * compptr->h_samp_factor; comp_height = MCU_rows * compptr->v_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); if (y_crop_blocks + dst_blk_y < comp_height) { /* Row is within the vertically mirrorable area. */ src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], comp_height - y_crop_blocks - dst_blk_y - (JDIMENSION)compptr->v_samp_factor, (JDIMENSION)compptr->v_samp_factor, FALSE); } else { /* Bottom-edge rows are only mirrored horizontally. */ src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_y + y_crop_blocks, (JDIMENSION)compptr->v_samp_factor, FALSE); } for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { dst_row_ptr = dst_buffer[offset_y]; if (y_crop_blocks + dst_blk_y < comp_height) { /* Row is within the mirrorable area. */ src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { dst_ptr = dst_row_ptr[dst_blk_x]; if (x_crop_blocks + dst_blk_x < comp_width) { /* Process the blocks that can be mirrored both ways. */ src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; for (i = 0; i < DCTSIZE; i += 2) { /* For even row, negate every odd column. */ for (j = 0; j < DCTSIZE; j += 2) { *dst_ptr++ = *src_ptr++; *dst_ptr++ = -(*src_ptr++); } /* For odd row, negate every even column. */ for (j = 0; j < DCTSIZE; j += 2) { *dst_ptr++ = -(*src_ptr++); *dst_ptr++ = *src_ptr++; } } } else { /* Any remaining right-edge blocks are only mirrored vertically. */ src_ptr = src_row_ptr[x_crop_blocks + dst_blk_x]; for (i = 0; i < DCTSIZE; i += 2) { for (j = 0; j < DCTSIZE; j++) *dst_ptr++ = *src_ptr++; for (j = 0; j < DCTSIZE; j++) *dst_ptr++ = -(*src_ptr++); } } } } else { /* Remaining rows are just mirrored horizontally. */ src_row_ptr = src_buffer[offset_y]; for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { if (x_crop_blocks + dst_blk_x < comp_width) { /* Process the blocks that can be mirrored. */ dst_ptr = dst_row_ptr[dst_blk_x]; src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; for (i = 0; i < DCTSIZE2; i += 2) { *dst_ptr++ = *src_ptr++; *dst_ptr++ = -(*src_ptr++); } } else { /* Any remaining right-edge blocks are only copied. */ jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks, dst_row_ptr + dst_blk_x, (JDIMENSION)1); } } } } } } } LOCAL(void) do_transverse(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* Transverse transpose is equivalent to * 1. 180 degree rotation; * 2. Transposition; * or * 1. Horizontal mirroring; * 2. Transposition; * 3. Horizontal mirroring. * These steps are merged into a single processing routine. */ { JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; JDIMENSION x_crop_blocks, y_crop_blocks; int ci, i, j, offset_x, offset_y; JBLOCKARRAY src_buffer, dst_buffer; JCOEFPTR src_ptr, dst_ptr; jpeg_component_info *compptr; MCU_cols = srcinfo->output_height / (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); MCU_rows = srcinfo->output_width / (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; comp_width = MCU_cols * compptr->h_samp_factor; comp_height = MCU_rows * compptr->v_samp_factor; x_crop_blocks = x_crop_offset * compptr->h_samp_factor; y_crop_blocks = y_crop_offset * compptr->v_samp_factor; for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; dst_blk_y += compptr->v_samp_factor) { dst_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, dst_coef_arrays[ci], dst_blk_y, (JDIMENSION)compptr->v_samp_factor, TRUE); for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x += compptr->h_samp_factor) { if (x_crop_blocks + dst_blk_x < comp_width) { /* Block is within the mirrorable area. */ src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], comp_width - x_crop_blocks - dst_blk_x - (JDIMENSION)compptr->h_samp_factor, (JDIMENSION)compptr->h_samp_factor, FALSE); } else { src_buffer = (*srcinfo->mem->access_virt_barray) ((j_common_ptr)srcinfo, src_coef_arrays[ci], dst_blk_x + x_crop_blocks, (JDIMENSION)compptr->h_samp_factor, FALSE); } for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; if (y_crop_blocks + dst_blk_y < comp_height) { if (x_crop_blocks + dst_blk_x < comp_width) { /* Block is within the mirrorable area. */ src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; for (i = 0; i < DCTSIZE; i++) { for (j = 0; j < DCTSIZE; j++) { dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; j++; dst_ptr[j * DCTSIZE + i] = -src_ptr[i * DCTSIZE + j]; } i++; for (j = 0; j < DCTSIZE; j++) { dst_ptr[j * DCTSIZE + i] = -src_ptr[i * DCTSIZE + j]; j++; dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; } } } else { /* Right-edge blocks are mirrored in y only */ src_ptr = src_buffer[offset_x] [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; for (i = 0; i < DCTSIZE; i++) { for (j = 0; j < DCTSIZE; j++) { dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; j++; dst_ptr[j * DCTSIZE + i] = -src_ptr[i * DCTSIZE + j]; } } } } else { if (x_crop_blocks + dst_blk_x < comp_width) { /* Bottom-edge blocks are mirrored in x only */ src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] [dst_blk_y + offset_y + y_crop_blocks]; for (i = 0; i < DCTSIZE; i++) { for (j = 0; j < DCTSIZE; j++) dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; i++; for (j = 0; j < DCTSIZE; j++) dst_ptr[j * DCTSIZE + i] = -src_ptr[i * DCTSIZE + j]; } } else { /* At lower right corner, just transpose, no mirroring */ src_ptr = src_buffer[offset_x] [dst_blk_y + offset_y + y_crop_blocks]; for (i = 0; i < DCTSIZE; i++) for (j = 0; j < DCTSIZE; j++) dst_ptr[j * DCTSIZE + i] = src_ptr[i * DCTSIZE + j]; } } } } } } } } /* Parse an unsigned integer: subroutine for jtransform_parse_crop_spec. * Returns TRUE if valid integer found, FALSE if not. * *strptr is advanced over the digit string, and *result is set to its value. */ LOCAL(boolean) jt_read_integer(const char **strptr, JDIMENSION *result) { const char *ptr = *strptr; JDIMENSION val = 0; for (; isdigit(*ptr); ptr++) { val = val * 10 + (JDIMENSION)(*ptr - '0'); } *result = val; if (ptr == *strptr) return FALSE; /* oops, no digits */ *strptr = ptr; return TRUE; } /* Parse a crop specification (written in X11 geometry style). * The routine returns TRUE if the spec string is valid, FALSE if not. * * The crop spec string should have the format * [{fr}]x[{fr}]{+-}{+-} * where width, height, xoffset, and yoffset are unsigned integers. * Each of the elements can be omitted to indicate a default value. * (A weakness of this style is that it is not possible to omit xoffset * while specifying yoffset, since they look alike.) * * This code is loosely based on XParseGeometry from the X11 distribution. */ GLOBAL(boolean) jtransform_parse_crop_spec(jpeg_transform_info *info, const char *spec) { info->crop = FALSE; info->crop_width_set = JCROP_UNSET; info->crop_height_set = JCROP_UNSET; info->crop_xoffset_set = JCROP_UNSET; info->crop_yoffset_set = JCROP_UNSET; if (isdigit(*spec)) { /* fetch width */ if (!jt_read_integer(&spec, &info->crop_width)) return FALSE; if (*spec == 'f' || *spec == 'F') { spec++; info->crop_width_set = JCROP_FORCE; } else if (*spec == 'r' || *spec == 'R') { spec++; info->crop_width_set = JCROP_REFLECT; } else info->crop_width_set = JCROP_POS; } if (*spec == 'x' || *spec == 'X') { /* fetch height */ spec++; if (!jt_read_integer(&spec, &info->crop_height)) return FALSE; if (*spec == 'f' || *spec == 'F') { spec++; info->crop_height_set = JCROP_FORCE; } else if (*spec == 'r' || *spec == 'R') { spec++; info->crop_height_set = JCROP_REFLECT; } else info->crop_height_set = JCROP_POS; } if (*spec == '+' || *spec == '-') { /* fetch xoffset */ info->crop_xoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS; spec++; if (!jt_read_integer(&spec, &info->crop_xoffset)) return FALSE; } if (*spec == '+' || *spec == '-') { /* fetch yoffset */ info->crop_yoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS; spec++; if (!jt_read_integer(&spec, &info->crop_yoffset)) return FALSE; } /* We had better have gotten to the end of the string. */ if (*spec != '\0') return FALSE; info->crop = TRUE; return TRUE; } /* Trim off any partial iMCUs on the indicated destination edge */ LOCAL(void) trim_right_edge(jpeg_transform_info *info, JDIMENSION full_width) { JDIMENSION MCU_cols; MCU_cols = info->output_width / info->iMCU_sample_width; if (MCU_cols > 0 && info->x_crop_offset + MCU_cols == full_width / info->iMCU_sample_width) info->output_width = MCU_cols * info->iMCU_sample_width; } LOCAL(void) trim_bottom_edge(jpeg_transform_info *info, JDIMENSION full_height) { JDIMENSION MCU_rows; MCU_rows = info->output_height / info->iMCU_sample_height; if (MCU_rows > 0 && info->y_crop_offset + MCU_rows == full_height / info->iMCU_sample_height) info->output_height = MCU_rows * info->iMCU_sample_height; } /* Request any required workspace. * * This routine figures out the size that the output image will be * (which implies that all the transform parameters must be set before * it is called). * * We allocate the workspace virtual arrays from the source decompression * object, so that all the arrays (both the original data and the workspace) * will be taken into account while making memory management decisions. * Hence, this routine must be called after jpeg_read_header (which reads * the image dimensions) and before jpeg_read_coefficients (which realizes * the source's virtual arrays). * * This function returns FALSE right away if -perfect is given * and transformation is not perfect. Otherwise returns TRUE. */ GLOBAL(boolean) jtransform_request_workspace(j_decompress_ptr srcinfo, jpeg_transform_info *info) { jvirt_barray_ptr *coef_arrays; boolean need_workspace, transpose_it; jpeg_component_info *compptr; JDIMENSION xoffset, yoffset, dtemp; JDIMENSION width_in_iMCUs, height_in_iMCUs; JDIMENSION width_in_blocks, height_in_blocks; int itemp, ci, h_samp_factor, v_samp_factor; /* Determine number of components in output image */ if (info->force_grayscale && srcinfo->jpeg_color_space == JCS_YCbCr && srcinfo->num_components == 3) /* We'll only process the first component */ info->num_components = 1; else /* Process all the components */ info->num_components = srcinfo->num_components; /* Compute output image dimensions and related values. */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 80 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1519 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" jpeg_core_output_dimensions(srcinfo); #else # 1521 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" srcinfo->output_width = srcinfo->image_width; srcinfo->output_height = srcinfo->image_height; #endif # 1524 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" /* Return right away if -perfect is given and transformation is not perfect. */ if (info->perfect) { if (info->num_components == 1) { if (!jtransform_perfect_transform(srcinfo->output_width, srcinfo->output_height, srcinfo->_min_DCT_h_scaled_size, srcinfo->_min_DCT_v_scaled_size, info->transform)) return FALSE; } else { if (!jtransform_perfect_transform(srcinfo->output_width, srcinfo->output_height, srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size, srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size, info->transform)) return FALSE; } } /* If there is only one output component, force the iMCU size to be 1; * else use the source iMCU size. (This allows us to do the right thing * when reducing color to grayscale, and also provides a handy way of * cleaning up "funny" grayscale images whose sampling factors are not 1x1.) */ switch (info->transform) { case JXFORM_TRANSPOSE: case JXFORM_TRANSVERSE: case JXFORM_ROT_90: case JXFORM_ROT_270: info->output_width = srcinfo->output_height; info->output_height = srcinfo->output_width; if (info->num_components == 1) { info->iMCU_sample_width = srcinfo->_min_DCT_v_scaled_size; info->iMCU_sample_height = srcinfo->_min_DCT_h_scaled_size; } else { info->iMCU_sample_width = srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size; info->iMCU_sample_height = srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size; } break; default: info->output_width = srcinfo->output_width; info->output_height = srcinfo->output_height; if (info->num_components == 1) { info->iMCU_sample_width = srcinfo->_min_DCT_h_scaled_size; info->iMCU_sample_height = srcinfo->_min_DCT_v_scaled_size; } else { info->iMCU_sample_width = srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size; info->iMCU_sample_height = srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size; } break; } /* If cropping has been requested, compute the crop area's position and * dimensions, ensuring that its upper left corner falls at an iMCU boundary. */ if (info->crop) { /* Insert default values for unset crop parameters */ if (info->crop_xoffset_set == JCROP_UNSET) info->crop_xoffset = 0; /* default to +0 */ if (info->crop_yoffset_set == JCROP_UNSET) info->crop_yoffset = 0; /* default to +0 */ if (info->crop_width_set == JCROP_UNSET) { if (info->crop_xoffset >= info->output_width) ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); info->crop_width = info->output_width - info->crop_xoffset; } else { /* Check for crop extension */ if (info->crop_width > info->output_width) { /* Crop extension does not work when transforming! */ if (info->transform != JXFORM_NONE || info->crop_xoffset >= info->crop_width || info->crop_xoffset > info->crop_width - info->output_width) ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); } else { if (info->crop_xoffset >= info->output_width || info->crop_width <= 0 || info->crop_xoffset > info->output_width - info->crop_width) ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); } } if (info->crop_height_set == JCROP_UNSET) { if (info->crop_yoffset >= info->output_height) ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); info->crop_height = info->output_height - info->crop_yoffset; } else { /* Check for crop extension */ if (info->crop_height > info->output_height) { /* Crop extension does not work when transforming! */ if (info->transform != JXFORM_NONE || info->crop_yoffset >= info->crop_height || info->crop_yoffset > info->crop_height - info->output_height) ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); } else { if (info->crop_yoffset >= info->output_height || info->crop_height <= 0 || info->crop_yoffset > info->output_height - info->crop_height) ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); } } /* Convert negative crop offsets into regular offsets */ if (info->crop_xoffset_set != JCROP_NEG) xoffset = info->crop_xoffset; else if (info->crop_width > info->output_width) /* crop extension */ xoffset = info->crop_width - info->output_width - info->crop_xoffset; else xoffset = info->output_width - info->crop_width - info->crop_xoffset; if (info->crop_yoffset_set != JCROP_NEG) yoffset = info->crop_yoffset; else if (info->crop_height > info->output_height) /* crop extension */ yoffset = info->crop_height - info->output_height - info->crop_yoffset; else yoffset = info->output_height - info->crop_height - info->crop_yoffset; /* Now adjust so that upper left corner falls at an iMCU boundary */ switch (info->transform) { case JXFORM_DROP: /* Ensure the effective drop region will not exceed the requested */ itemp = info->iMCU_sample_width; dtemp = itemp - 1 - ((xoffset + itemp - 1) % itemp); xoffset += dtemp; if (info->crop_width <= dtemp) info->drop_width = 0; else if (xoffset + info->crop_width - dtemp == info->output_width) /* Matching right edge: include partial iMCU */ info->drop_width = (info->crop_width - dtemp + itemp - 1) / itemp; else info->drop_width = (info->crop_width - dtemp) / itemp; itemp = info->iMCU_sample_height; dtemp = itemp - 1 - ((yoffset + itemp - 1) % itemp); yoffset += dtemp; if (info->crop_height <= dtemp) info->drop_height = 0; else if (yoffset + info->crop_height - dtemp == info->output_height) /* Matching bottom edge: include partial iMCU */ info->drop_height = (info->crop_height - dtemp + itemp - 1) / itemp; else info->drop_height = (info->crop_height - dtemp) / itemp; /* Check if sampling factors match for dropping */ if (info->drop_width != 0 && info->drop_height != 0) for (ci = 0; ci < info->num_components && ci < info->drop_ptr->num_components; ci++) { if (info->drop_ptr->comp_info[ci].h_samp_factor * srcinfo->max_h_samp_factor != srcinfo->comp_info[ci].h_samp_factor * info->drop_ptr->max_h_samp_factor) ERREXIT6(srcinfo, JERR_BAD_DROP_SAMPLING, ci, info->drop_ptr->comp_info[ci].h_samp_factor, info->drop_ptr->max_h_samp_factor, srcinfo->comp_info[ci].h_samp_factor, srcinfo->max_h_samp_factor, 'h'); if (info->drop_ptr->comp_info[ci].v_samp_factor * srcinfo->max_v_samp_factor != srcinfo->comp_info[ci].v_samp_factor * info->drop_ptr->max_v_samp_factor) ERREXIT6(srcinfo, JERR_BAD_DROP_SAMPLING, ci, info->drop_ptr->comp_info[ci].v_samp_factor, info->drop_ptr->max_v_samp_factor, srcinfo->comp_info[ci].v_samp_factor, srcinfo->max_v_samp_factor, 'v'); } break; case JXFORM_WIPE: /* Ensure the effective wipe region will cover the requested */ info->drop_width = (JDIMENSION)jdiv_round_up ((long)(info->crop_width + (xoffset % info->iMCU_sample_width)), (long)info->iMCU_sample_width); info->drop_height = (JDIMENSION)jdiv_round_up ((long)(info->crop_height + (yoffset % info->iMCU_sample_height)), (long)info->iMCU_sample_height); break; default: /* Ensure the effective crop region will cover the requested */ if (info->crop_width_set == JCROP_FORCE || info->crop_width > info->output_width) info->output_width = info->crop_width; else info->output_width = info->crop_width + (xoffset % info->iMCU_sample_width); if (info->crop_height_set == JCROP_FORCE || info->crop_height > info->output_height) info->output_height = info->crop_height; else info->output_height = info->crop_height + (yoffset % info->iMCU_sample_height); } /* Save x/y offsets measured in iMCUs */ info->x_crop_offset = xoffset / info->iMCU_sample_width; info->y_crop_offset = yoffset / info->iMCU_sample_height; } else { info->x_crop_offset = 0; info->y_crop_offset = 0; } /* Figure out whether we need workspace arrays, * and if so whether they are transposed relative to the source. */ need_workspace = FALSE; transpose_it = FALSE; switch (info->transform) { case JXFORM_NONE: if (info->x_crop_offset != 0 || info->y_crop_offset != 0 || info->output_width > srcinfo->output_width || info->output_height > srcinfo->output_height) need_workspace = TRUE; /* No workspace needed if neither cropping nor transforming */ break; case JXFORM_FLIP_H: if (info->trim) trim_right_edge(info, srcinfo->output_width); if (info->y_crop_offset != 0 || info->slow_hflip) need_workspace = TRUE; /* do_flip_h_no_crop doesn't need a workspace array */ break; case JXFORM_FLIP_V: if (info->trim) trim_bottom_edge(info, srcinfo->output_height); /* Need workspace arrays having same dimensions as source image. */ need_workspace = TRUE; break; case JXFORM_TRANSPOSE: /* transpose does NOT have to trim anything */ /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; transpose_it = TRUE; break; case JXFORM_TRANSVERSE: if (info->trim) { trim_right_edge(info, srcinfo->output_height); trim_bottom_edge(info, srcinfo->output_width); } /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; transpose_it = TRUE; break; case JXFORM_ROT_90: if (info->trim) trim_right_edge(info, srcinfo->output_height); /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; transpose_it = TRUE; break; case JXFORM_ROT_180: if (info->trim) { trim_right_edge(info, srcinfo->output_width); trim_bottom_edge(info, srcinfo->output_height); } /* Need workspace arrays having same dimensions as source image. */ need_workspace = TRUE; break; case JXFORM_ROT_270: if (info->trim) trim_bottom_edge(info, srcinfo->output_width); /* Need workspace arrays having transposed dimensions. */ need_workspace = TRUE; transpose_it = TRUE; break; case JXFORM_WIPE: break; case JXFORM_DROP: break; } /* Allocate workspace if needed. * Note that we allocate arrays padded out to the next iMCU boundary, * so that transform routines need not worry about missing edge blocks. */ if (need_workspace) { coef_arrays = (jvirt_barray_ptr *) (*srcinfo->mem->alloc_small) ((j_common_ptr)srcinfo, JPOOL_IMAGE, sizeof(jvirt_barray_ptr) * info->num_components); width_in_iMCUs = (JDIMENSION) jdiv_round_up((long)info->output_width, (long)info->iMCU_sample_width); height_in_iMCUs = (JDIMENSION) jdiv_round_up((long)info->output_height, (long)info->iMCU_sample_height); for (ci = 0; ci < info->num_components; ci++) { compptr = srcinfo->comp_info + ci; if (info->num_components == 1) { /* we're going to force samp factors to 1x1 in this case */ h_samp_factor = v_samp_factor = 1; } else if (transpose_it) { h_samp_factor = compptr->v_samp_factor; v_samp_factor = compptr->h_samp_factor; } else { h_samp_factor = compptr->h_samp_factor; v_samp_factor = compptr->v_samp_factor; } width_in_blocks = width_in_iMCUs * h_samp_factor; height_in_blocks = height_in_iMCUs * v_samp_factor; coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) ((j_common_ptr)srcinfo, JPOOL_IMAGE, FALSE, width_in_blocks, height_in_blocks, (JDIMENSION)v_samp_factor); } info->workspace_coef_arrays = coef_arrays; } else info->workspace_coef_arrays = NULL; return TRUE; } /* Transpose destination image parameters */ LOCAL(void) transpose_critical_parameters(j_compress_ptr dstinfo) { int tblno, i, j, ci, itemp; jpeg_component_info *compptr; JQUANT_TBL *qtblptr; JDIMENSION jtemp; UINT16 qtemp; /* Transpose image dimensions */ jtemp = dstinfo->image_width; dstinfo->image_width = dstinfo->image_height; dstinfo->image_height = jtemp; #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 70 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1845 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" itemp = dstinfo->min_DCT_h_scaled_size; dstinfo->min_DCT_h_scaled_size = dstinfo->min_DCT_v_scaled_size; dstinfo->min_DCT_v_scaled_size = itemp; #endif # 1849 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" /* Transpose sampling factors */ for (ci = 0; ci < dstinfo->num_components; ci++) { compptr = dstinfo->comp_info + ci; itemp = compptr->h_samp_factor; compptr->h_samp_factor = compptr->v_samp_factor; compptr->v_samp_factor = itemp; } /* Transpose quantization tables */ for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { qtblptr = dstinfo->quant_tbl_ptrs[tblno]; if (qtblptr != NULL) { for (i = 0; i < DCTSIZE; i++) { for (j = 0; j < i; j++) { qtemp = qtblptr->quantval[i * DCTSIZE + j]; qtblptr->quantval[i * DCTSIZE + j] = qtblptr->quantval[j * DCTSIZE + i]; qtblptr->quantval[j * DCTSIZE + i] = qtemp; } } } } } /* Adjust Exif image parameters. * * We try to adjust the Tags ExifImageWidth and ExifImageHeight if possible. */ LOCAL(void) adjust_exif_parameters(JOCTET *data, unsigned int length, JDIMENSION new_width, JDIMENSION new_height) { boolean is_motorola; /* Flag for byte order */ unsigned int number_of_tags, tagnum; unsigned int firstoffset, offset; JDIMENSION new_value; if (length < 12) return; /* Length of an IFD entry */ /* Discover byte order */ if (data[0] == 0x49 && data[1] == 0x49) is_motorola = FALSE; else if (data[0] == 0x4D && data[1] == 0x4D) is_motorola = TRUE; else return; /* Check Tag Mark */ if (is_motorola) { if (data[2] != 0) return; if (data[3] != 0x2A) return; } else { if (data[3] != 0) return; if (data[2] != 0x2A) return; } /* Get first IFD offset (offset to IFD0) */ if (is_motorola) { if (data[4] != 0) return; if (data[5] != 0) return; firstoffset = data[6]; firstoffset <<= 8; firstoffset += data[7]; } else { if (data[7] != 0) return; if (data[6] != 0) return; firstoffset = data[5]; firstoffset <<= 8; firstoffset += data[4]; } if (firstoffset > length - 2) return; /* check end of data segment */ /* Get the number of directory entries contained in this IFD */ if (is_motorola) { number_of_tags = data[firstoffset]; number_of_tags <<= 8; number_of_tags += data[firstoffset + 1]; } else { number_of_tags = data[firstoffset + 1]; number_of_tags <<= 8; number_of_tags += data[firstoffset]; } if (number_of_tags == 0) return; firstoffset += 2; /* Search for ExifSubIFD offset Tag in IFD0 */ for (;;) { if (firstoffset > length - 12) return; /* check end of data segment */ /* Get Tag number */ if (is_motorola) { tagnum = data[firstoffset]; tagnum <<= 8; tagnum += data[firstoffset + 1]; } else { tagnum = data[firstoffset + 1]; tagnum <<= 8; tagnum += data[firstoffset]; } if (tagnum == 0x8769) break; /* found ExifSubIFD offset Tag */ if (--number_of_tags == 0) return; firstoffset += 12; } /* Get the ExifSubIFD offset */ if (is_motorola) { if (data[firstoffset + 8] != 0) return; if (data[firstoffset + 9] != 0) return; offset = data[firstoffset + 10]; offset <<= 8; offset += data[firstoffset + 11]; } else { if (data[firstoffset + 11] != 0) return; if (data[firstoffset + 10] != 0) return; offset = data[firstoffset + 9]; offset <<= 8; offset += data[firstoffset + 8]; } if (offset > length - 2) return; /* check end of data segment */ /* Get the number of directory entries contained in this SubIFD */ if (is_motorola) { number_of_tags = data[offset]; number_of_tags <<= 8; number_of_tags += data[offset + 1]; } else { number_of_tags = data[offset + 1]; number_of_tags <<= 8; number_of_tags += data[offset]; } if (number_of_tags < 2) return; offset += 2; /* Search for ExifImageWidth and ExifImageHeight Tags in this SubIFD */ do { if (offset > length - 12) return; /* check end of data segment */ /* Get Tag number */ if (is_motorola) { tagnum = data[offset]; tagnum <<= 8; tagnum += data[offset + 1]; } else { tagnum = data[offset + 1]; tagnum <<= 8; tagnum += data[offset]; } if (tagnum == 0xA002 || tagnum == 0xA003) { if (tagnum == 0xA002) new_value = new_width; /* ExifImageWidth Tag */ else new_value = new_height; /* ExifImageHeight Tag */ if (is_motorola) { data[offset + 2] = 0; /* Format = unsigned long (4 octets) */ data[offset + 3] = 4; data[offset + 4] = 0; /* Number Of Components = 1 */ data[offset + 5] = 0; data[offset + 6] = 0; data[offset + 7] = 1; data[offset + 8] = 0; data[offset + 9] = 0; data[offset + 10] = (JOCTET)((new_value >> 8) & 0xFF); data[offset + 11] = (JOCTET)(new_value & 0xFF); } else { data[offset + 2] = 4; /* Format = unsigned long (4 octets) */ data[offset + 3] = 0; data[offset + 4] = 1; /* Number Of Components = 1 */ data[offset + 5] = 0; data[offset + 6] = 0; data[offset + 7] = 0; data[offset + 8] = (JOCTET)(new_value & 0xFF); data[offset + 9] = (JOCTET)((new_value >> 8) & 0xFF); data[offset + 10] = 0; data[offset + 11] = 0; } } offset += 12; } while (--number_of_tags); } /* Adjust output image parameters as needed. * * This must be called after jpeg_copy_critical_parameters() * and before jpeg_write_coefficients(). * * The return value is the set of virtual coefficient arrays to be written * (either the ones allocated by jtransform_request_workspace, or the * original source data arrays). The caller will need to pass this value * to jpeg_write_coefficients(). */ GLOBAL(jvirt_barray_ptr *) jtransform_adjust_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info *info) { /* If force-to-grayscale is requested, adjust destination parameters */ if (info->force_grayscale) { /* First, ensure we have YCbCr or grayscale data, and that the source's * Y channel is full resolution. (No reasonable person would make Y * be less than full resolution, so actually coping with that case * isn't worth extra code space. But we check it to avoid crashing.) */ if (((dstinfo->jpeg_color_space == JCS_YCbCr && dstinfo->num_components == 3) || (dstinfo->jpeg_color_space == JCS_GRAYSCALE && dstinfo->num_components == 1)) && srcinfo->comp_info[0].h_samp_factor == srcinfo->max_h_samp_factor && srcinfo->comp_info[0].v_samp_factor == srcinfo->max_v_samp_factor) { /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed * properly. Among other things, it sets the target h_samp_factor & * v_samp_factor to 1, which typically won't match the source. * We have to preserve the source's quantization table number, however. */ int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no; jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE); dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no; } else { /* Sorry, can't do it */ ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL); } } else if (info->num_components == 1) { /* For a single-component source, we force the destination sampling factors * to 1x1, with or without force_grayscale. This is useful because some * decoders choke on grayscale images with other sampling factors. */ dstinfo->comp_info[0].h_samp_factor = 1; dstinfo->comp_info[0].v_samp_factor = 1; } /* Correct the destination's image dimensions as necessary * for rotate/flip, resize, and crop operations. */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 80 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2085 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" dstinfo->jpeg_width = info->output_width; dstinfo->jpeg_height = info->output_height; #endif # 2088 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" /* Transpose destination image parameters, adjust quantization */ switch (info->transform) { case JXFORM_TRANSPOSE: case JXFORM_TRANSVERSE: case JXFORM_ROT_90: case JXFORM_ROT_270: #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION < 80 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2096 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" dstinfo->image_width = info->output_height; dstinfo->image_height = info->output_width; #endif # 2099 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" transpose_critical_parameters(dstinfo); break; case JXFORM_DROP: if (info->drop_width != 0 && info->drop_height != 0) adjust_quant(srcinfo, src_coef_arrays, info->drop_ptr, info->drop_coef_arrays, info->trim, dstinfo); break; default: #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION < 80 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2109 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" dstinfo->image_width = info->output_width; dstinfo->image_height = info->output_height; #endif # 2112 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" break; } /* Adjust Exif properties */ if (srcinfo->marker_list != NULL && srcinfo->marker_list->marker == JPEG_APP0 + 1 && srcinfo->marker_list->data_length >= 6 && srcinfo->marker_list->data[0] == 0x45 && srcinfo->marker_list->data[1] == 0x78 && srcinfo->marker_list->data[2] == 0x69 && srcinfo->marker_list->data[3] == 0x66 && srcinfo->marker_list->data[4] == 0 && srcinfo->marker_list->data[5] == 0) { /* Suppress output of JFIF marker */ dstinfo->write_JFIF_header = FALSE; /* Adjust Exif image parameters */ #if 0 /* disabled by -frewrite-includes */ #if JPEG_LIB_VERSION >= 80 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2129 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" if (dstinfo->jpeg_width != srcinfo->image_width || dstinfo->jpeg_height != srcinfo->image_height) /* Align data segment to start of TIFF structure for parsing */ adjust_exif_parameters(srcinfo->marker_list->data + 6, srcinfo->marker_list->data_length - 6, dstinfo->jpeg_width, dstinfo->jpeg_height); #else # 2136 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" if (dstinfo->image_width != srcinfo->image_width || dstinfo->image_height != srcinfo->image_height) /* Align data segment to start of TIFF structure for parsing */ adjust_exif_parameters(srcinfo->marker_list->data + 6, srcinfo->marker_list->data_length - 6, dstinfo->image_width, dstinfo->image_height); #endif # 2143 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" } /* Return the appropriate output data set */ if (info->workspace_coef_arrays != NULL) return info->workspace_coef_arrays; return src_coef_arrays; } /* Execute the actual transformation, if any. * * This must be called *after* jpeg_write_coefficients, because it depends * on jpeg_write_coefficients to have computed subsidiary values such as * the per-component width and height fields in the destination object. * * Note that some transformations will modify the source data arrays! */ GLOBAL(void) jtransform_execute_transform(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info *info) { jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays; /* Note: conditions tested here should match those in switch statement * in jtransform_request_workspace() */ switch (info->transform) { case JXFORM_NONE: if (info->output_width > srcinfo->output_width || info->output_height > srcinfo->output_height) { if (info->output_width > srcinfo->output_width && info->crop_width_set == JCROP_REFLECT) do_crop_ext_reflect(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); else if (info->output_width > srcinfo->output_width && info->crop_width_set == JCROP_FORCE) do_crop_ext_flat(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); else do_crop_ext_zero(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); } else if (info->x_crop_offset != 0 || info->y_crop_offset != 0) do_crop(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); break; case JXFORM_FLIP_H: if (info->y_crop_offset != 0 || info->slow_hflip) do_flip_h(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); else do_flip_h_no_crop(srcinfo, dstinfo, info->x_crop_offset, src_coef_arrays); break; case JXFORM_FLIP_V: do_flip_v(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); break; case JXFORM_TRANSPOSE: do_transpose(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); break; case JXFORM_TRANSVERSE: do_transverse(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); break; case JXFORM_ROT_90: do_rot_90(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); break; case JXFORM_ROT_180: do_rot_180(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); break; case JXFORM_ROT_270: do_rot_270(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, dst_coef_arrays); break; case JXFORM_WIPE: if (info->crop_width_set == JCROP_REFLECT && info->y_crop_offset == 0 && info->drop_height == (JDIMENSION)jdiv_round_up ((long)info->output_height, (long)info->iMCU_sample_height) && (info->x_crop_offset == 0 || info->x_crop_offset + info->drop_width == (JDIMENSION)jdiv_round_up ((long)info->output_width, (long)info->iMCU_sample_width))) do_reflect(srcinfo, dstinfo, info->x_crop_offset, src_coef_arrays, info->drop_width, info->drop_height); else if (info->crop_width_set == JCROP_FORCE) do_flatten(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, info->drop_width, info->drop_height); else do_wipe(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, info->drop_width, info->drop_height); break; case JXFORM_DROP: if (info->drop_width != 0 && info->drop_height != 0) do_drop(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, src_coef_arrays, info->drop_ptr, info->drop_coef_arrays, info->drop_width, info->drop_height); break; } } /* jtransform_perfect_transform * * Determine whether lossless transformation is perfectly * possible for a specified image and transformation. * * Inputs: * image_width, image_height: source image dimensions. * MCU_width, MCU_height: pixel dimensions of MCU. * transform: transformation identifier. * Parameter sources from initialized jpeg_struct * (after reading source header): * image_width = cinfo.image_width * image_height = cinfo.image_height * MCU_width = cinfo.max_h_samp_factor * cinfo.block_size * MCU_height = cinfo.max_v_samp_factor * cinfo.block_size * Result: * TRUE = perfect transformation possible * FALSE = perfect transformation not possible * (may use custom action then) */ GLOBAL(boolean) jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height, int MCU_width, int MCU_height, JXFORM_CODE transform) { boolean result = TRUE; /* initialize TRUE */ switch (transform) { case JXFORM_FLIP_H: case JXFORM_ROT_270: if (image_width % (JDIMENSION)MCU_width) result = FALSE; break; case JXFORM_FLIP_V: case JXFORM_ROT_90: if (image_height % (JDIMENSION)MCU_height) result = FALSE; break; case JXFORM_TRANSVERSE: case JXFORM_ROT_180: if (image_width % (JDIMENSION)MCU_width) result = FALSE; if (image_height % (JDIMENSION)MCU_height) result = FALSE; break; default: break; } return result; } #endif /* TRANSFORMS_SUPPORTED */ # 2306 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" /* Setup decompression object to save desired markers in memory. * This must be called before jpeg_read_header() to have the desired effect. */ GLOBAL(void) jcopy_markers_setup(j_decompress_ptr srcinfo, JCOPY_OPTION option) { #ifdef SAVE_MARKERS_SUPPORTED int m; /* Save comments unless JCOPYOPT_NONE or JCOPYOPT_ICC specified */ if (option != JCOPYOPT_NONE && option != JCOPYOPT_ICC) { jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF); } /* Save all APPn markers iff JCOPYOPT_ALL* specified ... */ if (option == JCOPYOPT_ALL || option == JCOPYOPT_ALL_EXCEPT_ICC) { for (m = 0; m < 16; m++) { /* ... except APP2 markers if JCOPYOPT_ALL_EXCEPT_ICC specified */ if (option == JCOPYOPT_ALL_EXCEPT_ICC && m == 2) continue; jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF); } } /* Save only APP2 markers if JCOPYOPT_ICC specified */ if (option == JCOPYOPT_ICC) { jpeg_save_markers(srcinfo, JPEG_APP0 + 2, 0xFFFF); } #endif /* SAVE_MARKERS_SUPPORTED */ # 2336 "/tmp/makepkg/libjpeg-turbo-git/src/libjpeg-turbo/src/transupp.c" } /* Copy markers saved in the given source object to the destination object. * This should be called just after jpeg_start_compress() or * jpeg_write_coefficients(). * Note that those routines will have written the SOI, and also the * JFIF APP0 or Adobe APP14 markers if selected. */ GLOBAL(void) jcopy_markers_execute(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOPY_OPTION option) { jpeg_saved_marker_ptr marker; for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) { if (option == JCOPYOPT_NONE) continue; else if (option == JCOPYOPT_COMMENTS) { if (marker->marker != JPEG_COM) continue; } else if (option == JCOPYOPT_ALL_EXCEPT_ICC) { if (marker->marker == JPEG_APP0 + 2) continue; } else if (option == JCOPYOPT_ICC) { if (marker->marker != JPEG_APP0 + 2) continue; } /* To avoid confusion, we do not output JFIF and Adobe APP14 markers if the * encoder library already wrote one. */ if (dstinfo->write_JFIF_header && marker->marker == JPEG_APP0 && marker->data_length >= 5 && marker->data[0] == 0x4A && marker->data[1] == 0x46 && marker->data[2] == 0x49 && marker->data[3] == 0x46 && marker->data[4] == 0) continue; /* reject duplicate JFIF */ if (dstinfo->write_Adobe_marker && marker->marker == JPEG_APP0 + 14 && marker->data_length >= 5 && marker->data[0] == 0x41 && marker->data[1] == 0x64 && marker->data[2] == 0x6F && marker->data[3] == 0x62 && marker->data[4] == 0x65) continue; /* reject duplicate Adobe */ jpeg_write_marker(dstinfo, marker->marker, marker->data, marker->data_length); } }