diff options
author | Manoj Srivastava <srivasta@debian.org> | 2003-12-01 17:11:15 +0000 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2003-12-01 17:11:15 +0000 |
commit | 371472d9fb6a936149b105a6563a0550d35bdf1a (patch) | |
tree | 6d23751e44a7dddf4e29918551f1ea0513352622 /mcon/U/d_brokstat.U |
Initial import of upstream branch
Initial import of upstream branch
git-archimport-id: srivasta@debian.org--2003-primary/dist--upstream--3.70--base-0
Diffstat (limited to 'mcon/U/d_brokstat.U')
-rw-r--r-- | mcon/U/d_brokstat.U | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/mcon/U/d_brokstat.U b/mcon/U/d_brokstat.U new file mode 100644 index 0000000..29886f3 --- /dev/null +++ b/mcon/U/d_brokstat.U @@ -0,0 +1,72 @@ +?RCS: $Id: d_brokstat.U,v 3.0.1.1 1997/02/28 15:30:53 ram Exp $ +?RCS: +?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?RCS: $Log: d_brokstat.U,v $ +?RCS: Revision 3.0.1.1 1997/02/28 15:30:53 ram +?RCS: patch61: created +?RCS: +?MAKE:d_brokstat: cat contains cppstdin cppminus +cppflags rm Setvar +?MAKE: -pick add $@ %< +?S:d_brokstat: +?S: This variable conditionally defines STAT_MACROS_BROKEN if some +?S: of the S_IS*() macros from <sys/stat.h> give false positive on +?S: regular files. +?S:. +?C:STAT_MACROS_BROKEN: +?C: This symbol, if defined, indicates that the S_IS*() stat macros +?C: such as S_ISBLK() give false positive and are thus unusable. +?C: Your best bet is then to supply your own set. +?C:. +?H:#$d_brokstat STAT_MACROS_BROKEN /**/ +?H:. +?LINT:set d_brokstat +?X: This test inspired by autoconf -- RAM, 28/02/97 +echo " " +echo "Checking whether your stat() macros are broken..." +$cat >try.c <<'EOC' +#include <sys/types.h> +#include <sys/stat.h> + +#if defined(S_ISBLK) && defined(S_IFDIR) +#if S_ISBLK(S_IFDIR) +Broken +#endif +#endif + +#if defined(S_ISBLK) && defined(S_IFCHR) +#if S_ISBLK(S_IFCHR) +Broken +#endif +#endif + +#if defined(S_ISLNK) && defined(S_IFREG) +#if S_ISLNK(S_IFREG) +Broken. +#endif +#endif + +#if defined(S_ISSOCK) && defined(S_IFREG) +#if S_ISSOCK(S_IFREG) +Broken. +#endif +#endif +EOC +$cppstdin $cppflags $cppminus <try.c 2>/dev/null >try +if $contains Broken try >/dev/null 2>&1; then + echo "Alas, they are. I'll use my own macro set then." >&4 + val="$define" +else + echo "Nope, working just fine." >&4 + val="$undef" +fi +$rm -f try try.c +set d_brokstat +eval $setvar + |