Deleted Added
full compact
cdefs.h (231673) cdefs.h (231714)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Berkeley Software Design, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)cdefs.h 8.8 (Berkeley) 1/9/95
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Berkeley Software Design, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)cdefs.h 8.8 (Berkeley) 1/9/95
33 * $FreeBSD: head/sys/sys/cdefs.h 231673 2012-02-14 12:03:23Z theraven $
33 * $FreeBSD: head/sys/sys/cdefs.h 231714 2012-02-14 21:48:46Z dim $
34 */
35
36#ifndef _SYS_CDEFS_H_
37#define _SYS_CDEFS_H_
38
39#if defined(__cplusplus)
40#define __BEGIN_DECLS extern "C" {
41#define __END_DECLS }

--- 183 unchanged lines hidden (view full) ---

225/*
226 * Keywords added in C11.
227 */
228#if defined(__cplusplus) && __cplusplus >= 201103L
229#define _Alignas(e) alignas(e)
230#define _Alignof(e) alignof(e)
231#define _Noreturn [[noreturn]]
232#define _Static_assert(e, s) static_assert(e, s)
34 */
35
36#ifndef _SYS_CDEFS_H_
37#define _SYS_CDEFS_H_
38
39#if defined(__cplusplus)
40#define __BEGIN_DECLS extern "C" {
41#define __END_DECLS }

--- 183 unchanged lines hidden (view full) ---

225/*
226 * Keywords added in C11.
227 */
228#if defined(__cplusplus) && __cplusplus >= 201103L
229#define _Alignas(e) alignas(e)
230#define _Alignof(e) alignof(e)
231#define _Noreturn [[noreturn]]
232#define _Static_assert(e, s) static_assert(e, s)
233/* FIXME: change this to thread_local when clang in base supports it */
234#define _Thread_local __thread
233#define _Thread_local thread_local
235#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
236/* Do nothing. They are language keywords. */
237#else
238/* Not supported. Implement them using our versions. */
239#define _Alignas(x) __aligned(x)
240#define _Alignof(x) __alignof(x)
241#define _Noreturn __dead2
242#define _Thread_local __thread

--- 153 unchanged lines hidden (view full) ---

396 * or scanf-like arguments. They are null except for versions of gcc
397 * that are known to support the features properly (old versions of gcc-2
398 * didn't permit keeping the keywords out of the application namespace).
399 */
400#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
401#define __printflike(fmtarg, firstvararg)
402#define __scanflike(fmtarg, firstvararg)
403#define __format_arg(fmtarg)
234#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
235/* Do nothing. They are language keywords. */
236#else
237/* Not supported. Implement them using our versions. */
238#define _Alignas(x) __aligned(x)
239#define _Alignof(x) __alignof(x)
240#define _Noreturn __dead2
241#define _Thread_local __thread

--- 153 unchanged lines hidden (view full) ---

395 * or scanf-like arguments. They are null except for versions of gcc
396 * that are known to support the features properly (old versions of gcc-2
397 * didn't permit keeping the keywords out of the application namespace).
398 */
399#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
400#define __printflike(fmtarg, firstvararg)
401#define __scanflike(fmtarg, firstvararg)
402#define __format_arg(fmtarg)
404#define __strfmonlike(fmtarg, firstvararg)
405#define __strftimelike(fmtarg, firstvararg)
406#else
407#define __printflike(fmtarg, firstvararg) \
408 __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
409#define __scanflike(fmtarg, firstvararg) \
410 __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
411#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg)))
403#else
404#define __printflike(fmtarg, firstvararg) \
405 __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
406#define __scanflike(fmtarg, firstvararg) \
407 __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
408#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg)))
412#define __strfmonlike(fmtarg, firstvararg) \
413 __attribute__((__format__ (__strfmon__, fmtarg, firstvararg)))
414#define __strftimelike(fmtarg, firstvararg) \
415 __attribute__((__format__ (__strftime__, fmtarg, firstvararg)))
416#endif
417
418/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */
419#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \
420 defined(__GNUC__) && !defined(__INTEL_COMPILER)
421#define __printf0like(fmtarg, firstvararg) \
422 __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
423#else

--- 46 unchanged lines hidden (view full) ---

470 */
471#define __IDSTRING(name,string) static const char name[] __unused = string
472#endif
473
474/*
475 * Embed the rcs id of a source file in the resulting library. Note that in
476 * more recent ELF binutils, we use .ident allowing the ID to be stripped.
477 * Usage:
409#endif
410
411/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */
412#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \
413 defined(__GNUC__) && !defined(__INTEL_COMPILER)
414#define __printf0like(fmtarg, firstvararg) \
415 __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
416#else

--- 46 unchanged lines hidden (view full) ---

463 */
464#define __IDSTRING(name,string) static const char name[] __unused = string
465#endif
466
467/*
468 * Embed the rcs id of a source file in the resulting library. Note that in
469 * more recent ELF binutils, we use .ident allowing the ID to be stripped.
470 * Usage:
478 * __FBSDID("$FreeBSD: head/sys/sys/cdefs.h 231673 2012-02-14 12:03:23Z theraven $");
471 * __FBSDID("$FreeBSD: head/sys/sys/cdefs.h 231714 2012-02-14 21:48:46Z dim $");
479 */
480#ifndef __FBSDID
481#if !defined(lint) && !defined(STRIP_FBSDID)
482#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
483#else
484#define __FBSDID(s) struct __hack
485#endif
486#endif

--- 165 unchanged lines hidden (view full) ---

652#endif
653#ifndef __has_include
654#define __has_include(x) 0
655#endif
656#ifndef __has_builtin
657#define __has_builtin(x) 0
658#endif
659
472 */
473#ifndef __FBSDID
474#if !defined(lint) && !defined(STRIP_FBSDID)
475#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
476#else
477#define __FBSDID(s) struct __hack
478#endif
479#endif

--- 165 unchanged lines hidden (view full) ---

645#endif
646#ifndef __has_include
647#define __has_include(x) 0
648#endif
649#ifndef __has_builtin
650#define __has_builtin(x) 0
651#endif
652
660#if defined(__arm) || defined(__mips)
661#define __NO_TLS 1
662#endif
663
664#endif /* !_SYS_CDEFS_H_ */
653#endif /* !_SYS_CDEFS_H_ */