1 ?RCS: $Id: d_attribut.U,v 3.0.1.3 1995/01/30 14:33:45 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
13 ?RCS: $Log: d_attribut.U,v $
14 ?RCS: Revision 3.0.1.3 1995/01/30 14:33:45 ram
15 ?RCS: patch49: test C program now includes <stdio.h> (WED)
17 ?RCS: Revision 3.0.1.2 1995/01/11 15:25:47 ram
18 ?RCS: patch45: fixed typo in the d_attribut variable (ADO)
20 ?RCS: Revision 3.0.1.1 1994/10/29 16:08:55 ram
21 ?RCS: patch36: created by ADO
23 ?MAKE:d_attribut: Myread Oldconfig cat cc ccflags rm Setvar contains
24 ?MAKE: -pick add $@ %<
25 ?S:d_attribut (d_attrib):
26 ?S: This variable conditionally defines HASATTRIBUTE, which
27 ?S: indicates the C compiler can check for function attributes,
28 ?S: such as printf formats.
30 ?C:HASATTRIBUTE ~ %< (GNUC_ATTRIBUTE_CHECK):
31 ?C: This symbol indicates the C compiler can check for function attributes,
32 ?C: such as printf formats. This is normally only supported by GNU cc.
34 ?H:?%<:#$d_attribut HASATTRIBUTE /**/
35 ?H:?%<:#ifndef HASATTRIBUTE
36 ?H:?%<:#ifdef __attribute__
37 ?H:?%<:#undef __attribute__
39 ?H:?%<:#define __attribute__(_arg_)
44 ?LINT:known __attribute__
45 : Look for GNU-cc style attribute checking
47 echo "Checking whether your compiler can handle __attribute__ ..." >&4
48 $cat >attrib.c <<'EOCP'
50 void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
52 if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
53 if $contains 'warning' attrib.out >/dev/null 2>&1; then
54 echo "Your C compiler doesn't fully support __attribute__."
57 echo "Your C compiler supports __attribute__."
61 echo "Your C compiler doesn't seem to understand __attribute__ at all."