11bd4fe43Sopenharmony_ci/*
21bd4fe43Sopenharmony_ci * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
31bd4fe43Sopenharmony_ci * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
41bd4fe43Sopenharmony_ci *
51bd4fe43Sopenharmony_ci * Redistribution and use in source and binary forms, with or without modification,
61bd4fe43Sopenharmony_ci * are permitted provided that the following conditions are met:
71bd4fe43Sopenharmony_ci *
81bd4fe43Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright notice, this list of
91bd4fe43Sopenharmony_ci *    conditions and the following disclaimer.
101bd4fe43Sopenharmony_ci *
111bd4fe43Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright notice, this list
121bd4fe43Sopenharmony_ci *    of conditions and the following disclaimer in the documentation and/or other materials
131bd4fe43Sopenharmony_ci *    provided with the distribution.
141bd4fe43Sopenharmony_ci *
151bd4fe43Sopenharmony_ci * 3. Neither the name of the copyright holder nor the names of its contributors may be used
161bd4fe43Sopenharmony_ci *    to endorse or promote products derived from this software without specific prior written
171bd4fe43Sopenharmony_ci *    permission.
181bd4fe43Sopenharmony_ci *
191bd4fe43Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
201bd4fe43Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
211bd4fe43Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221bd4fe43Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
231bd4fe43Sopenharmony_ci * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
241bd4fe43Sopenharmony_ci * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
251bd4fe43Sopenharmony_ci * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
261bd4fe43Sopenharmony_ci * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
271bd4fe43Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
281bd4fe43Sopenharmony_ci * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
291bd4fe43Sopenharmony_ci * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
301bd4fe43Sopenharmony_ci */
311bd4fe43Sopenharmony_ci
321bd4fe43Sopenharmony_ci#include <libc.h>
331bd4fe43Sopenharmony_ci
341bd4fe43Sopenharmony_ci/**
351bd4fe43Sopenharmony_ci * get libc version string.
361bd4fe43Sopenharmony_ci * @return libc version string. the format is <major>.<minor>.<patch>[-<platform>[-<desc>]]
371bd4fe43Sopenharmony_ci */
381bd4fe43Sopenharmony_ciconst char *libc_get_version_string(void)
391bd4fe43Sopenharmony_ci{
401bd4fe43Sopenharmony_ci    return LIBC_VERSION_STR;
411bd4fe43Sopenharmony_ci}
421bd4fe43Sopenharmony_ci
431bd4fe43Sopenharmony_ci/**
441bd4fe43Sopenharmony_ci * get libc version code.
451bd4fe43Sopenharmony_ci * @return libc version code. the format is 0x00XXYYZZ, XX is major version, YY is minor version and ZZ is patch version
461bd4fe43Sopenharmony_ci */
471bd4fe43Sopenharmony_ciint libc_get_version(void)
481bd4fe43Sopenharmony_ci{
491bd4fe43Sopenharmony_ci    return LIBC_VERSION_NUM;
501bd4fe43Sopenharmony_ci}
51