1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-20 15:43:16 +00:00

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-)
This commit is contained in:
John Birrell 1998-01-09 06:14:59 +00:00
parent d9b8124d7d
commit f1d896d117
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32361
5 changed files with 45 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);