github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/sdk/c/c11_support.h (about) 1 /* 2 Copyright 2017 Intel Corporation 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 ------------------------------------------------------------------------------ 16 */ 17 18 #ifndef C11_SUPPORT_H 19 #define C11_SUPPORT_H 20 21 #include <stdlib.h> 22 // If the compiler has been built with optional extensions, then we can have 23 // some of the missing functions made available by defining the appropriate 24 // preprocessor define before including string.h 25 #ifdef __STDC_LIB_EXT1__ 26 #define __STDC_WANT_LIB_EXT1__ 1 27 #else 28 int strncpy_s(char *dest, size_t sizeInBytes, 29 const char *src, size_t count); 30 #endif // #ifdef __STDC_LIB_EXT1__ 31 32 #include <string.h> 33 34 #ifndef STRUNCATE 35 #define STRUNCATE 80 36 #endif 37 38 #endif