On Thu, Jun 20, 2024 at 09:17:38AM +0200, Otto Moerbeek wrote:

> On Wed, Jun 19, 2024 at 06:44:56PM +0200, Theo Buehler wrote:
> 
> > These are the ports using strmode.
> > 
> > archivers/libarchive
> > archivers/libtar
> > editors/emacs
> > games/gemrb
> > math/octave
> > misc/findutils
> > net/lftp
> > security/ssh-ldap-helper
> > shells/ksh93
> > sysutils/bfs
> > sysutils/colorls
> > sysutils/coreutils
> > sysutils/lnav
> > sysutils/tarsnap
> > 
> > Given the short list and the nature of the change, I don't think it's
> > necessary to run a bulk, but inspecting a few of them would be good,
> > especially libarchive and coreutils are depended upon by a lot of ports.
> > And there's emacs in this list.
> 
> New diff, taking the suggestion (but not all of it, the implementation
> can use mode_t as it includes sys/types.h
> 
> I tested base + coreutils + emacs builds with this.

ping...

> 
>       -Otto
> 
> Index: include/string.h
> ===================================================================
> RCS file: /home/cvs/src/include/string.h,v
> diff -u -p -r1.32 string.h
> --- include/string.h  5 Sep 2017 03:16:13 -0000       1.32
> +++ include/string.h  20 Jun 2024 07:13:03 -0000
> @@ -37,7 +37,7 @@
>  
>  #include <sys/cdefs.h>
>  #include <sys/_null.h>
> -#include <machine/_types.h>
> +#include <sys/_types.h>
>  
>  /*
>   * POSIX mandates that certain string functions not present in ISO C
> @@ -128,7 +128,7 @@ size_t     strlcat(char *, const char *, si
>               __attribute__ ((__bounded__(__string__,1,3)));
>  size_t        strlcpy(char *, const char *, size_t)
>               __attribute__ ((__bounded__(__string__,1,3)));
> -void  strmode(int, char *);
> +void  strmode(__mode_t, char *);
>  char *strsep(char **, const char *);
>  int   timingsafe_bcmp(const void *, const void *, size_t);
>  int   timingsafe_memcmp(const void *, const void *, size_t);
> Index: lib/libc/string/strmode.c
> ===================================================================
> RCS file: /home/cvs/src/lib/libc/string/strmode.c,v
> diff -u -p -r1.8 strmode.c
> --- lib/libc/string/strmode.c 31 Aug 2015 02:53:57 -0000      1.8
> +++ lib/libc/string/strmode.c 20 Jun 2024 07:13:03 -0000
> @@ -32,10 +32,8 @@
>  #include <sys/stat.h>
>  #include <string.h>
>  
> -/* XXX mode should be mode_t */
> -
>  void
> -strmode(int mode, char *p)
> +strmode(mode_t mode, char *p)
>  {
>        /* print type */
>       switch (mode & S_IFMT) {
> 

Reply via email to