sys/fdpass.c: Allocate extra cmsg space to hack around a Qemu bug.
[mLib] / utils / compiler.3
CommitLineData
33e3ac90
MW
1.\" -*-nroff-*-
2.TH compiler 3 "26 May 2018" "Straylight/Edgeware" "mLib utilities library"
3.SH NAME
4compiler \- detect compiler version
5.\" @GCC_VERSION_P
6.\" @CLANG_VERSION_P
7.SH SYNOPSIS
8.nf
9.B "#include <mLib/compiler.h>"
10
11.BI "int GCC_VERSION_P(" maj ", " min ");"
12.BI "int CLANG_VERSION_P(" maj ", " min ");"
13.fi
14.SH DESCRIPTION
15The macro invocation
16.BI GCC_VERSION_P( maj ", " min )
17expands to a compile-time constant nonzero value if the present compiler
18is GCC version
19.IR maj . min
20or better, or claims compatibility with it.
21This is frequently imperfect, as many compilers claim compatibility
22without implementing all of the necessary features, but it works
23adequately if one takes care.
24.PP
25The macro invocation
26.BI CLANG_VERSION_P( maj ", " min )
27expands to a compile-time constant nonzero value if the present compiler
28is Clang version
29.IR maj . min
30or better (or claims compatibility with it, but this is less likely
31than for GCC.
32.SH "SEE ALSO"
33.BR mLib (3).
34.SH "AUTHOR"
35Mark Wooding, <mdw@distorted.org.uk>