1e1051a39Sopenharmony_ci/*
2e1051a39Sopenharmony_ci * Generated by util/mkerr.pl DO NOT EDIT
3e1051a39Sopenharmony_ci * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4e1051a39Sopenharmony_ci *
5e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License").  You may not use
6e1051a39Sopenharmony_ci * this file except in compliance with the License.  You can obtain a copy
7e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at
8e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html
9e1051a39Sopenharmony_ci */
10e1051a39Sopenharmony_ci
11e1051a39Sopenharmony_ci#include <openssl/err.h>
12e1051a39Sopenharmony_ci#include "e_dasync_err.h"
13e1051a39Sopenharmony_ci
14e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
15e1051a39Sopenharmony_ci
16e1051a39Sopenharmony_cistatic ERR_STRING_DATA DASYNC_str_reasons[] = {
17e1051a39Sopenharmony_ci    {ERR_PACK(0, 0, DASYNC_R_INIT_FAILED), "init failed"},
18e1051a39Sopenharmony_ci    {0, NULL}
19e1051a39Sopenharmony_ci};
20e1051a39Sopenharmony_ci
21e1051a39Sopenharmony_ci#endif
22e1051a39Sopenharmony_ci
23e1051a39Sopenharmony_cistatic int lib_code = 0;
24e1051a39Sopenharmony_cistatic int error_loaded = 0;
25e1051a39Sopenharmony_ci
26e1051a39Sopenharmony_cistatic int ERR_load_DASYNC_strings(void)
27e1051a39Sopenharmony_ci{
28e1051a39Sopenharmony_ci    if (lib_code == 0)
29e1051a39Sopenharmony_ci        lib_code = ERR_get_next_error_library();
30e1051a39Sopenharmony_ci
31e1051a39Sopenharmony_ci    if (!error_loaded) {
32e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
33e1051a39Sopenharmony_ci        ERR_load_strings(lib_code, DASYNC_str_reasons);
34e1051a39Sopenharmony_ci#endif
35e1051a39Sopenharmony_ci        error_loaded = 1;
36e1051a39Sopenharmony_ci    }
37e1051a39Sopenharmony_ci    return 1;
38e1051a39Sopenharmony_ci}
39e1051a39Sopenharmony_ci
40e1051a39Sopenharmony_cistatic void ERR_unload_DASYNC_strings(void)
41e1051a39Sopenharmony_ci{
42e1051a39Sopenharmony_ci    if (error_loaded) {
43e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
44e1051a39Sopenharmony_ci        ERR_unload_strings(lib_code, DASYNC_str_reasons);
45e1051a39Sopenharmony_ci#endif
46e1051a39Sopenharmony_ci        error_loaded = 0;
47e1051a39Sopenharmony_ci    }
48e1051a39Sopenharmony_ci}
49e1051a39Sopenharmony_ci
50e1051a39Sopenharmony_cistatic void ERR_DASYNC_error(int function, int reason, const char *file, int line)
51e1051a39Sopenharmony_ci{
52e1051a39Sopenharmony_ci    if (lib_code == 0)
53e1051a39Sopenharmony_ci        lib_code = ERR_get_next_error_library();
54e1051a39Sopenharmony_ci    ERR_raise(lib_code, reason);
55e1051a39Sopenharmony_ci    ERR_set_debug(file, line, NULL);
56e1051a39Sopenharmony_ci}
57