NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hts_defs.h
Go to the documentation of this file.
1 /* hts_defs.h -- Miscellaneous definitions.
2 
3  Copyright (C) 2013-2014 Genome Research Ltd.
4 
5  Author: John Marshall <jm18@sanger.ac.uk>
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13 
14 The above copyright notices and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE. */
24 
25 #ifndef HTSLIB_HTS_DEFS_H
26 #define HTSLIB_HTS_DEFS_H
27 
28 #if __clang__major__ >= 2 || __GNUC__ >= 3
29 #define HTS_NORETURN __attribute__ ((__noreturn__))
30 #else
31 #define HTS_NORETURN
32 #endif
33 
34 #if (defined __clang__ && __clang_major__ >= 3) || \
35  (defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__==4 && __GNUC_MINOR__ >= 5)))
36 #define HTS_RESULT_USED __attribute__ ((__warn_unused_result__))
37 #else
38 #define HTS_RESULT_USED
39 #endif
40 
41 #if defined __clang__ || defined __GNUC__
42 #define HTS_UNUSED __attribute__ ((__unused__))
43 #else
44 #define HTS_UNUSED
45 #endif
46 
47 #endif