diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-05-22 11:10:03 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-05-22 11:10:03 +0000 |
commit | aef64f84a36d9aec129ca413d84681f7724c13dc (patch) | |
tree | b9f3a9165afff78ce2b88e1959162506c3d9d34a /usr.bin | |
parent | db664693ee0d8a3b58f2e0a6a4803da573813dbc (diff) | |
download | FreeBSD-src-aef64f84a36d9aec129ca413d84681f7724c13dc.zip FreeBSD-src-aef64f84a36d9aec129ca413d84681f7724c13dc.tar.gz |
Make sccs(1) compile cleanly by fixing syntax errors such as #endif followed
by a token, and by including headers to get prototypes for many things, and
also by spelling the type of structure readdir(3) returns as "dirent".
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sccs/sccs.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/usr.bin/sccs/sccs.c b/usr.bin/sccs/sccs.c index 9a8b749..34c31bc 100644 --- a/usr.bin/sccs/sccs.c +++ b/usr.bin/sccs/sccs.c @@ -46,13 +46,18 @@ static char sccsid[] = "@(#)sccs.c 8.1 (Berkeley) 6/6/93"; #include <sys/param.h> #include <sys/stat.h> -#include <sys/dir.h> +#include <sys/wait.h> #include <signal.h> #include <sysexits.h> +#include <dirent.h> #include <errno.h> +#include "pathnames.h" +#include <paths.h> #include <pwd.h> #include <stdio.h> -#include "pathnames.h" +#include <stdlib.h> +#include <string.h> +#include <unistd.h> /* ** SCCS.C -- human-oriented front end to the SCCS system. @@ -152,11 +157,11 @@ static char sccsid[] = "@(#)sccs.c 8.1 (Berkeley) 6/6/93"; # ifndef SCCSPATH # define SCCSPATH "SCCS" /* pathname in which to find s-files */ -# endif NOT SCCSPATH +# endif /* NOT SCCSPATH */ # ifndef MYNAME # define MYNAME "sccs" /* name used for printing errors */ -# endif NOT MYNAME +# endif /* NOT MYNAME */ /**************** End of Configuration Information ****************/ @@ -268,7 +273,7 @@ bool Debug; /* turn on tracing */ # endif # ifndef V6 extern char *getenv(); -# endif V6 +# endif /* V6 */ char *gstrcat(), *strcat(); char *gstrncat(), *strncat(); @@ -318,8 +323,8 @@ main(argc, argv) SccsDir = buf; } } -# endif SCCSDIR -# endif V6 +# endif /* SCCSDIR */ +# endif /* V6 */ /* ** Detect and decode flags intended for this program. @@ -977,7 +982,7 @@ clean(mode, argv) int mode; char **argv; { - struct direct *dir; + struct dirent *dir; char buf[FBUFSIZ]; char *bufend; register DIR *dirp; @@ -1578,7 +1583,7 @@ username() if (p == NULL || p[0] == '\0') p = getlogin(); return (p); -# endif UIDUSER +# endif /* UIDUSER */ } /* |