<commit_before>/*-
 * Copyright (c) 1991, 1993
 * The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Berkeley Software Design, Inc.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef _SYS_CDEFS_H_
#define _SYS_CDEFS_H_

#include <stddef.h>

/* Testing against Clang-specific extensions */
#ifndef __has_attribute
#define __has_attribute(x)      0
#endif /* !__has_attribute */

#ifndef __has_extension
#define __has_extension __has_feature
#endif /* !__has_extension */

#ifndef __has_feature
#define __has_feature(x)        0
#endif /* !__has_feature */

#ifndef __has_include
#define __has_include(x)        0
#endif /* !__has_include */

#ifndef __has_builtin
#define __has_builtin(x)        0
#endif /* !__has_builtin */

#ifdef __cplusplus
#define __BEGIN_DECLS   extern "C" {
#define __END_DECLS     }
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif /* __cplusplus */

/* The __CONCAT macro is used to concatenate parts of symbol names, e.g. with
 * "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. The __CONCAT
 * macro is a bit tricky to use if it must work in non-ANSI mode -- there must
 * be no spaces between its arguments, and for nested __CONCAT's, all the
 * __CONCAT's must be at the left. __CONCAT can also concatenate double-quoted
 * strings produced by the __STRING macro, but this only works with ANSI C.
 *
 * __XSTRING is like __STRING, but it expands any macros in its argument first.
 * It is only available with ANSI C. */

#define __CONCAT1(x,y)  x ## y
#define __CONCAT(x,y)   __CONCAT1(x,y)
#define __STRING(x)     #x /* Stringify without expanding x */
#define __STRINGIFY(x)  #x /* Stringify without expanding x */
#define __XSTRING(x)    __STRING(x) /* Expand x, then stringify */

/* Compiler-dependent macros to help declare dead (non-returning) and pure (no
 * side effects) functions, and unused variables.
 *
 * They are null except for versions of gcc that are known to support the
 * features properly (old versions of gcc-2 supported the dead and pure features
 * in a different (wrong) way). If we do not provide an implementation for a
 * given compiler, let the compile fail if it is told to use a feature that we
 * cannot live without. */

#define __aligned(x)            __attribute__ ((__aligned__ (x)))
#define __alloc_size(x)         __attribute__ ((__alloc_size__ (x)))
#define __always_inline         __attribute__ ((__always_inline__))
#define __const                 __attribute__ ((__const__))
#define __dead2                 __attribute__ ((__noreturn__))
#define __fastcall              __attribute__ ((__fastcall__))
#define __interrupt_handler     __attribute__ ((interrupt_handler))
#define __malloc_like           __attribute__ ((__malloc__))
#define __may_alias             __attribute__ ((__may_alias__))
#define __noinline              __attribute__ ((__noinline__))
#define __nonnull(x)            __attribute__ ((__nonnull__ (x)))
#define __nonnull_all           __attribute__ ((__nonnull__))
#define __noreturn              __attribute__ ((noreturn))
#define __packed                __attribute__ ((__packed__))
#define __pure                  __attribute__ ((__pure__))
#define __pure2                 __attribute__ ((__const__))
#define __result_use_check      __attribute__ ((__warn_unused_result__))
#define __returns_twice         __attribute__ ((__returns_twice__))
#define __section(x)            __attribute__ ((__section__ (x)))
#define __unused                __attribute__ ((__unused__))
#define __used                  __attribute__ ((__used__))
#define __weak                  __attribute__ ((__weak__))

#if __has_attribute(__alloc_align__)
#define __alloc_align(x)        __attribute__ ((__alloc_align__ (x)))
#else
#define __alloc_align(x)
#endif /* __has_attribute(__alloc_align__) */
<commit_msg>Add new attribute<commit_after>/*-
 * Copyright (c) 1991, 1993
 * The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Berkeley Software Design, Inc.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef _SYS_CDEFS_H_
#define _SYS_CDEFS_H_

#include <stddef.h>

/* Testing against Clang-specific extensions */
#ifndef __has_attribute
#define __has_attribute(x)      0
#endif /* !__has_attribute */

#ifndef __has_extension
#define __has_extension __has_feature
#endif /* !__has_extension */

#ifndef __has_feature
#define __has_feature(x)        0
#endif /* !__has_feature */

#ifndef __has_include
#define __has_include(x)        0
#endif /* !__has_include */

#ifndef __has_builtin
#define __has_builtin(x)        0
#endif /* !__has_builtin */

#ifdef __cplusplus
#define __BEGIN_DECLS   extern "C" {
#define __END_DECLS     }
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif /* __cplusplus */

/* The __CONCAT macro is used to concatenate parts of symbol names, e.g. with
 * "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. The __CONCAT
 * macro is a bit tricky to use if it must work in non-ANSI mode -- there must
 * be no spaces between its arguments, and for nested __CONCAT's, all the
 * __CONCAT's must be at the left. __CONCAT can also concatenate double-quoted
 * strings produced by the __STRING macro, but this only works with ANSI C.
 *
 * __XSTRING is like __STRING, but it expands any macros in its argument first.
 * It is only available with ANSI C. */

#define __CONCAT1(x,y)  x ## y
#define __CONCAT(x,y)   __CONCAT1(x,y)
#define __STRING(x)     #x /* Stringify without expanding x */
#define __STRINGIFY(x)  #x /* Stringify without expanding x */
#define __XSTRING(x)    __STRING(x) /* Expand x, then stringify */

/* Compiler-dependent macros to help declare dead (non-returning) and pure (no
 * side effects) functions, and unused variables.
 *
 * They are null except for versions of gcc that are known to support the
 * features properly (old versions of gcc-2 supported the dead and pure features
 * in a different (wrong) way). If we do not provide an implementation for a
 * given compiler, let the compile fail if it is told to use a feature that we
 * cannot live without. */

#define __aligned(x)            __attribute__ ((__aligned__ (x)))
#define __alloc_size(x)         __attribute__ ((__alloc_size__ (x)))
#define __always_inline         __attribute__ ((__always_inline__))
#define __const                 __attribute__ ((__const__))
#define __dead2                 __attribute__ ((__noreturn__))
#define __fastcall              __attribute__ ((__fastcall__))
#define __interrupt_handler     __attribute__ ((interrupt_handler))
#define __malloc_like           __attribute__ ((__malloc__))
#define __may_alias             __attribute__ ((__may_alias__))
#define __noinline              __attribute__ ((__noinline__))
#define __nonnull(x)            __attribute__ ((__nonnull__ (x)))
#define __nonnull_all           __attribute__ ((__nonnull__))
#define __noreturn              __attribute__ ((noreturn))
#define __packed                __attribute__ ((__packed__))
#define __pure                  __attribute__ ((__pure__))
#define __pure2                 __attribute__ ((__const__))
#define __result_use_check      __attribute__ ((__warn_unused_result__))
#define __returns_twice         __attribute__ ((__returns_twice__))
#define __section(x)            __attribute__ ((__section__ (x)))
#define __unused                __attribute__ ((__unused__))
#define __used                  __attribute__ ((__used__))
#define __weak                  __attribute__ ((__weak__))
#define __leaf                  __attribute__ ((leaf))

#if __has_attribute(__alloc_align__)
#define __alloc_align(x)        __attribute__ ((__alloc_align__ (x)))
#else
#define __alloc_align(x)
#endif /* __has_attribute(__alloc_align__) */

{'fraction_non_alphanumeric': 0.0775677437377782, 'fraction_numerical': 0.003724741596051774, 'mean_word_length': 3.710526315789474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7431759', 'n_tokens_mistral': 3106, 'n_tokens_neox': 2936, 'n_words': 1212}