17310c0d0Sopenharmony_ci/*
27310c0d0Sopenharmony_ci * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
37310c0d0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47310c0d0Sopenharmony_ci * you may not use this file except in compliance with the License.
57310c0d0Sopenharmony_ci * You may obtain a copy of the License at
67310c0d0Sopenharmony_ci *
77310c0d0Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
87310c0d0Sopenharmony_ci *
97310c0d0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107310c0d0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117310c0d0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127310c0d0Sopenharmony_ci * See the License for the specific language governing permissions and
137310c0d0Sopenharmony_ci * limitations under the License.
147310c0d0Sopenharmony_ci */
157310c0d0Sopenharmony_ci#ifndef __HVB_SYSDEPS_H_
167310c0d0Sopenharmony_ci#define __HVB_SYSDEPS_H_
177310c0d0Sopenharmony_ci
187310c0d0Sopenharmony_ci#include <stdlib.h>
197310c0d0Sopenharmony_ci#include <stdio.h>
207310c0d0Sopenharmony_ci#include <stdint.h>
217310c0d0Sopenharmony_ci#include "securec.h"
227310c0d0Sopenharmony_ci
237310c0d0Sopenharmony_ci#ifdef __cplusplus
247310c0d0Sopenharmony_ciextern "C" {
257310c0d0Sopenharmony_ci#endif
267310c0d0Sopenharmony_ci
277310c0d0Sopenharmony_ci#define HVB_ATTR_PACKED __attribute__((packed))
287310c0d0Sopenharmony_ci
297310c0d0Sopenharmony_ciint hvb_memcmp(const void *src1, const void *src2, size_t n);
307310c0d0Sopenharmony_ciint hvb_strcmp(const char *s1, const char *s2);
317310c0d0Sopenharmony_ciint hvb_strncmp(const char *s1, const char *s2, size_t n);
327310c0d0Sopenharmony_civoid *hvb_memcpy(void *dest, const void *src, size_t n);
337310c0d0Sopenharmony_ciint hvb_memcpy_s(void *dest, size_t destMax, const void *src, size_t count);
347310c0d0Sopenharmony_civoid *hvb_memset(void *dest, const int c, size_t n);
357310c0d0Sopenharmony_ciint hvb_memset_s(void *dest, size_t destMax, int c, size_t count);
367310c0d0Sopenharmony_civoid hvb_print(const char *message);
377310c0d0Sopenharmony_civoid hvb_printv(const char *message, ...);
387310c0d0Sopenharmony_civoid *hvb_malloc_(size_t size);
397310c0d0Sopenharmony_civoid hvb_free(void *ptr);
407310c0d0Sopenharmony_civoid hvb_abort(void);
417310c0d0Sopenharmony_cisize_t hvb_strlen(const char *str);
427310c0d0Sopenharmony_cisize_t hvb_strnlen(const char *str, size_t len);
437310c0d0Sopenharmony_ciuint32_t hvb_div_by_10(uint64_t *dividend);
447310c0d0Sopenharmony_ci
457310c0d0Sopenharmony_ci#ifdef __cplusplus
467310c0d0Sopenharmony_ci}
477310c0d0Sopenharmony_ci#endif
487310c0d0Sopenharmony_ci
497310c0d0Sopenharmony_ci#endif /* __HVB_SYSDEPS_H_ */
50