[AArch64] Split X-reg UBFIZ into W-reg LSL when possible
[official-gcc.git] / libcilkrts / runtime / sslib / safe_lib.h
blob9ffb24e72ab03d4412ac8bedca6b5379a23a9f82
1 /*------------------------------------------------------------------
2 * safe_lib.h -- Safe C Library
4 * October 2008, Bo Berry
5 * Modified 2012, Jonathan Toppins <jtoppins@users.sourceforge.net>
7 * Copyright (c) 2008-2013 by Cisco Systems, Inc
8 * All rights reserved.
10 * Permission is hereby granted, free of charge, to any person
11 * obtaining a copy of this software and associated documentation
12 * files (the "Software"), to deal in the Software without
13 * restriction, including without limitation the rights to use,
14 * copy, modify, merge, publish, distribute, sublicense, and/or
15 * sell copies of the Software, and to permit persons to whom the
16 * Software is furnished to do so, subject to the following
17 * conditions:
19 * The above copyright notice and this permission notice shall be
20 * included in all copies or substantial portions of the Software.
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
24 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
27 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 * OTHER DEALINGS IN THE SOFTWARE.
30 *------------------------------------------------------------------
33 #ifndef __SAFE_LIB_H__
34 #define __SAFE_LIB_H__
36 #include "safe_types.h"
37 #include "safe_lib_errno.h"
39 /* C11 appendix K types - specific for bounds checking */
40 typedef size_t rsize_t;
43 * We depart from the standard and allow memory and string operations to
44 * have different max sizes. See the respective safe_mem_lib.h or
45 * safe_str_lib.h files.
47 /* #define RSIZE_MAX (~(rsize_t)0) - leave here for completeness */
49 typedef void (*constraint_handler_t) (const char * /* msg */,
50 void * /* ptr */,
51 errno_t /* error */);
53 extern void abort_handler_s(const char *msg, void *ptr, errno_t error);
54 extern void ignore_handler_s(const char *msg, void *ptr, errno_t error);
56 #define sl_default_handler ignore_handler_s
58 //#include "safe_mem_lib.h"
59 #include "safe_str_lib.h"
61 #endif /* __SAFE_LIB_H__ */