• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef SRC_TRACE_BASE_STRINGHELP_H
16 #define SRC_TRACE_BASE_STRINGHELP_H
17 
18 #include <cstdint>
19 #include <sys/types.h>
20 namespace SysTuning {
21 namespace base {
22 #if !is_mingw
23 int memcpy_s(void* dest, uint32_t destSize, const void* src, size_t srcSize);
24 int sscanf_s(const char* buffer, const char* format, ...);
25 int strncpy_s(char* strDest, size_t destMax, const char* strSrc, size_t count);
26 #endif
27 void* memset_s(void* dest, size_t destSize, int ch, size_t n);
28 int snprintf_s(char* strDest, size_t destMax, size_t count, const char* format, ...);
29 int sprintf_s(char* strDest, size_t destMax, const char* format, ...);
30 } // namespace base
31 } // namespace SysTuning
32 #endif // SRC_TRACE_BASE_STRINGHELP_H
33