File: compile.h

package info (click to toggle)
mcl 1%3A14-137-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 10,704 kB
  • ctags: 5,125
  • sloc: ansic: 53,217; sh: 4,448; perl: 3,967; makefile: 422
file content (65 lines) | stat: -rw-r--r-- 2,356 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*   (C) Copyright 2001, 2002, 2003, 2004, 2005 Stijn van Dongen
 *   (C) Copyright 2006, 2007, 2008, 2009  Stijn van Dongen
 *
 * This file is part of tingea.  You can redistribute and/or modify tingea
 * under the terms of the GNU General Public License; either version 3 of the
 * License or (at your option) any later version.  You should have received a
 * copy of the GPL along with tingea, in the file COPYING.
*/

#ifndef tingea_compile_h
#define tingea_compile_h


#ifndef TINGEA__TYPED_MINMAX
#  define TINGEA__TYPED_MINMAX 0
#endif


#ifndef __GNUC__
#  define   MCX_GNUC_OK       0
#  define inline         /* no inline */
#  define cpl__pure         /* no pure */ 
#  define cpl__const        /* no const */
#  define cpl__noreturn     /* no noreturn */ 
#  define cpl__malloc       /* no malloc */
#  define cpl__must_check   /* no warn_unused_result */
#  define cpl__deprecated   /* no deprecated */ 
#  define cpl__used         /* no used */
#  define cpl__unused       /* no unused */
#  define cpl__packed       /* no packed */
#  define likely(x)      (x)
#  define unlikely(x)    (x)
#else
#define   MCX_GNUC_OK       1
#if __GNUC__  >= 3
#  define inline __inline__ __attribute__ ((always_inline))
#  define cpl__pure         __attribute__ ((pure))
#  define cpl__const        __attribute__ ((const))
#  define cpl__noreturn     __attribute__ ((noreturn))
#  define cpl__malloc       __attribute__ ((malloc))
#  define cpl__must_check   __attribute__ ((warn_unused_result))
#  define cpl__deprecated   __attribute__ ((deprecated))
#  define cpl__used         __attribute__ ((used))
#  define cpl__unused       __attribute__ ((unused))
#  define cpl__packed       __attribute__ ((packed))
#  define likely(x)      __builtin_expect (!!(x), 1)
#  define unlikely(x)    __builtin_expect (!!(x), 0)
#else
#  define inline         /* no inline */
#  define cpl__pure         /* no pure */ 
#  define cpl__const        /* no const */
#  define cpl__noreturn     /* no noreturn */ 
#  define cpl__malloc       /* no malloc */
#  define cpl__must_check   /* no warn_unused_result */
#  define cpl__deprecated   /* no deprecated */ 
#  define cpl__used         /* no used */
#  define cpl__unused       /* no unused */
#  define cpl__packed       /* no packed */
#  define likely(x)      (x)
#  define unlikely(x)    (x)
#endif
#endif

#endif