Michael Reed wrote: > - mmap support was recently made the default, but the includes were > left unsorted; this diff deals with that > > - remove optarg & optind declarations as unistd.h already does this > > - remove `#ifdef sun' block: htohl() isn't used anywhere here, although > ntohl() is in util.c (perhaps endian.h should be included there). > Besides that ``grep -wR sun /usr/include | grep define'' didn't show > that `sun' was being defined.
ok mmcc@ > Index: locate.c > =================================================================== > RCS file: /cvs/src/usr.bin/locate/locate/locate.c,v > retrieving revision 1.29 > diff -u -p -r1.29 locate.c > --- locate.c 23 Oct 2015 14:16:02 -0000 1.29 > +++ locate.c 23 Oct 2015 20:14:45 -0000 > @@ -63,26 +63,21 @@ > * in the standard 'find'. > */ > > +#include <sys/types.h> > +#include <sys/mman.h> > +#include <sys/stat.h> > + > #include <ctype.h> > #include <err.h> > +#include <fcntl.h> > #include <fnmatch.h> > #include <libgen.h> > +#include <limits.h> > #include <locale.h> > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > #include <unistd.h> > -#include <limits.h> > - > -#include <sys/types.h> > -#include <sys/stat.h> > -#include <sys/mman.h> > -#include <fcntl.h> > - > - > -#ifdef sun > -#include <netinet/in.h> /* SunOS byteorder(3) htohl(3) */ > -#endif > > #include "locate.h" > #include "pathnames.h" > @@ -120,9 +115,6 @@ extern int getwf(FILE *); > extern u_char *tolower_word(u_char *); > extern int check_bigram_char(int); > extern char *patprep(char *); > - > -extern char *optarg; > -extern int optind; > > > int >