diff options
author | jb <jb@FreeBSD.org> | 1998-01-09 06:14:59 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-01-09 06:14:59 +0000 |
commit | 2e1938f076c03ba21731ed8299cf04d2cb383666 (patch) | |
tree | 93d30eeaecb3b440749c9006c4d918314109afc9 /lib/libc/gen | |
parent | 1e1816b4893c1a3899f7b9ea6d30f51cb21da945 (diff) | |
download | FreeBSD-src-2e1938f076c03ba21731ed8299cf04d2cb383666.zip FreeBSD-src-2e1938f076c03ba21731ed8299cf04d2cb383666.tar.gz |
Make a couple of the stat flags dependent on the sys/stat.h header file
that this source is compiled against. This source is referenced by
install which is needed as a build tool and must be able to compile
against NetBSD headers and libraries if we have a hope of supporting
another architecture.
With this change, that's two working programs down and 3945 (?) to go.
The other one was make, but that didn't need any changes to work under
FreeBSD/Alpha. 8-)
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/setflags.c | 10 | ||||
-rw-r--r-- | lib/libc/gen/setflagsbyname.c | 10 | ||||
-rw-r--r-- | lib/libc/gen/strtofflags.c | 10 |
3 files changed, 27 insertions, 3 deletions
diff --git a/lib/libc/gen/setflags.c b/lib/libc/gen/setflags.c index 775bcd7..1f22f5a 100644 --- a/lib/libc/gen/setflags.c +++ b/lib/libc/gen/setflags.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)stat_flags.c 8.1 (Berkeley) 5/31/93"; #else static const char rcsid[] = - "$Id: stat_flags.c,v 1.7 1997/08/07 15:33:49 steve Exp $"; + "$Id: stat_flags.c,v 1.8 1997/08/07 22:28:25 steve Exp $"; #endif #endif /* not lint */ @@ -72,8 +72,10 @@ flags_to_string(flags, def) SAPPEND("uappnd"); if (flags & UF_IMMUTABLE) SAPPEND("uchg"); +#ifdef UF_NOUNLINK if (flags & UF_NOUNLINK) SAPPEND("uunlnk"); +#endif if (flags & UF_NODUMP) SAPPEND("nodump"); if (flags & UF_OPAQUE) @@ -84,8 +86,10 @@ flags_to_string(flags, def) SAPPEND("arch"); if (flags & SF_IMMUTABLE) SAPPEND("schg"); +#ifdef SF_NOUNLINK if (flags & SF_NOUNLINK) SAPPEND("sunlnk"); +#endif return (prefix == NULL && def != NULL ? def : string); } @@ -146,8 +150,10 @@ string_to_flags(stringp, setp, clrp) TEST(p, "schg", SF_IMMUTABLE); TEST(p, "schange", SF_IMMUTABLE); TEST(p, "simmutable", SF_IMMUTABLE); +#ifdef SF_NOUNLINK TEST(p, "sunlnk", SF_NOUNLINK); TEST(p, "sunlink", SF_NOUNLINK); +#endif return (1); case 'u': TEST(p, "uappnd", UF_APPEND); @@ -155,8 +161,10 @@ string_to_flags(stringp, setp, clrp) TEST(p, "uchg", UF_IMMUTABLE); TEST(p, "uchange", UF_IMMUTABLE); TEST(p, "uimmutable", UF_IMMUTABLE); +#ifdef UF_NOUNLINK TEST(p, "uunlnk", UF_NOUNLINK); TEST(p, "uunlink", UF_NOUNLINK); +#endif /* FALLTHROUGH */ default: return (1); diff --git a/lib/libc/gen/setflagsbyname.c b/lib/libc/gen/setflagsbyname.c index 775bcd7..1f22f5a 100644 --- a/lib/libc/gen/setflagsbyname.c +++ b/lib/libc/gen/setflagsbyname.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)stat_flags.c 8.1 (Berkeley) 5/31/93"; #else static const char rcsid[] = - "$Id: stat_flags.c,v 1.7 1997/08/07 15:33:49 steve Exp $"; + "$Id: stat_flags.c,v 1.8 1997/08/07 22:28:25 steve Exp $"; #endif #endif /* not lint */ @@ -72,8 +72,10 @@ flags_to_string(flags, def) SAPPEND("uappnd"); if (flags & UF_IMMUTABLE) SAPPEND("uchg"); +#ifdef UF_NOUNLINK if (flags & UF_NOUNLINK) SAPPEND("uunlnk"); +#endif if (flags & UF_NODUMP) SAPPEND("nodump"); if (flags & UF_OPAQUE) @@ -84,8 +86,10 @@ flags_to_string(flags, def) SAPPEND("arch"); if (flags & SF_IMMUTABLE) SAPPEND("schg"); +#ifdef SF_NOUNLINK if (flags & SF_NOUNLINK) SAPPEND("sunlnk"); +#endif return (prefix == NULL && def != NULL ? def : string); } @@ -146,8 +150,10 @@ string_to_flags(stringp, setp, clrp) TEST(p, "schg", SF_IMMUTABLE); TEST(p, "schange", SF_IMMUTABLE); TEST(p, "simmutable", SF_IMMUTABLE); +#ifdef SF_NOUNLINK TEST(p, "sunlnk", SF_NOUNLINK); TEST(p, "sunlink", SF_NOUNLINK); +#endif return (1); case 'u': TEST(p, "uappnd", UF_APPEND); @@ -155,8 +161,10 @@ string_to_flags(stringp, setp, clrp) TEST(p, "uchg", UF_IMMUTABLE); TEST(p, "uchange", UF_IMMUTABLE); TEST(p, "uimmutable", UF_IMMUTABLE); +#ifdef UF_NOUNLINK TEST(p, "uunlnk", UF_NOUNLINK); TEST(p, "uunlink", UF_NOUNLINK); +#endif /* FALLTHROUGH */ default: return (1); diff --git a/lib/libc/gen/strtofflags.c b/lib/libc/gen/strtofflags.c index 775bcd7..1f22f5a 100644 --- a/lib/libc/gen/strtofflags.c +++ b/lib/libc/gen/strtofflags.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)stat_flags.c 8.1 (Berkeley) 5/31/93"; #else static const char rcsid[] = - "$Id: stat_flags.c,v 1.7 1997/08/07 15:33:49 steve Exp $"; + "$Id: stat_flags.c,v 1.8 1997/08/07 22:28:25 steve Exp $"; #endif #endif /* not lint */ @@ -72,8 +72,10 @@ flags_to_string(flags, def) SAPPEND("uappnd"); if (flags & UF_IMMUTABLE) SAPPEND("uchg"); +#ifdef UF_NOUNLINK if (flags & UF_NOUNLINK) SAPPEND("uunlnk"); +#endif if (flags & UF_NODUMP) SAPPEND("nodump"); if (flags & UF_OPAQUE) @@ -84,8 +86,10 @@ flags_to_string(flags, def) SAPPEND("arch"); if (flags & SF_IMMUTABLE) SAPPEND("schg"); +#ifdef SF_NOUNLINK if (flags & SF_NOUNLINK) SAPPEND("sunlnk"); +#endif return (prefix == NULL && def != NULL ? def : string); } @@ -146,8 +150,10 @@ string_to_flags(stringp, setp, clrp) TEST(p, "schg", SF_IMMUTABLE); TEST(p, "schange", SF_IMMUTABLE); TEST(p, "simmutable", SF_IMMUTABLE); +#ifdef SF_NOUNLINK TEST(p, "sunlnk", SF_NOUNLINK); TEST(p, "sunlink", SF_NOUNLINK); +#endif return (1); case 'u': TEST(p, "uappnd", UF_APPEND); @@ -155,8 +161,10 @@ string_to_flags(stringp, setp, clrp) TEST(p, "uchg", UF_IMMUTABLE); TEST(p, "uchange", UF_IMMUTABLE); TEST(p, "uimmutable", UF_IMMUTABLE); +#ifdef UF_NOUNLINK TEST(p, "uunlnk", UF_NOUNLINK); TEST(p, "uunlink", UF_NOUNLINK); +#endif /* FALLTHROUGH */ default: return (1); |