1 ?RCS: $Id: d_brokstat.U,v 3.0.1.1 1997/02/28 15:30:53 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: $Log: d_brokstat.U,v $
12 ?RCS: Revision 3.0.1.1 1997/02/28 15:30:53 ram
13 ?RCS: patch61: created
15 ?MAKE:d_brokstat: cat contains cppstdin cppminus +cppflags rm Setvar
16 ?MAKE: -pick add $@ %<
18 ?S: This variable conditionally defines STAT_MACROS_BROKEN if some
19 ?S: of the S_IS*() macros from <sys/stat.h> give false positive on
22 ?C:STAT_MACROS_BROKEN:
23 ?C: This symbol, if defined, indicates that the S_IS*() stat macros
24 ?C: such as S_ISBLK() give false positive and are thus unusable.
25 ?C: Your best bet is then to supply your own set.
27 ?H:#$d_brokstat STAT_MACROS_BROKEN /**/
30 ?X: This test inspired by autoconf -- RAM, 28/02/97
32 echo "Checking whether your stat() macros are broken..."
34 #include <sys/types.h>
37 #if defined(S_ISBLK) && defined(S_IFDIR)
43 #if defined(S_ISBLK) && defined(S_IFCHR)
49 #if defined(S_ISLNK) && defined(S_IFREG)
55 #if defined(S_ISSOCK) && defined(S_IFREG)
61 $cppstdin $cppflags $cppminus <try.c 2>/dev/null >try
62 if $contains Broken try >/dev/null 2>&1; then
63 echo "Alas, they are. I'll use my own macro set then." >&4
66 echo "Nope, working just fine." >&4