rem: value = -1 != eaccess (argv[pos - 1], W_OK); return (TRUE == value);
add: return euidaccess (argv[pos - 1], W_OK) == 0;
context: unary_operator (void){  int value;  struct stat stat_buf;  switch (argv[pos][1])    {    default:      return (FALSE);      /* All of the following unary operators use unary_advance (), which	 checks to make sure that there is an argument, and then advances	 pos right past it.  This means that pos - 1 is the location of the	 argument. */    case 'a':			/* file exists in the file system? */    case 'e':      unary_advance ();      value = -1 != stat (argv[pos - 1], &stat_buf);      return (TRUE == value);    case 'r':			/* file is readable? */      unary_advance ();      value = -1 != eaccess (argv[pos - 1], R_OK);      return (TRUE == value);    case 'w':			/* File is writable? */      unary_advance ();      value = -1 != eaccess (argv[pos - 1], W_OK);      return (TRUE == value);    case 'x':			/* File is executable? */      unary_advance ();      value = -1 != eaccess (argv[pos - 1], X_OK);      return (TRUE == value);    case 'O':			/* File is owned by you? */      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (geteuid () == stat_buf.st_uid));    case 'G':			/* File is owned by your group? */      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (getegid () == stat_buf.st_gid));    case 'f':			/* File is a file? */      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      /* Under POSIX, -f is true if the given file exists	 and is a regular file. */      return (TRUE == ((S_ISREG (stat_buf.st_mode)) ||		       (0 == (stat_buf.st_mode & S_IFMT))));    case 'd':			/* File is a directory? */      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (S_ISDIR (stat_buf.st_mode)));    case 's':			/* File has something in it? */      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (stat_buf.st_size > (off_t) 0));    case 'S':			/* File is a socket? */#if !defined (S_ISSOCK)      return (FALSE);#else      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (S_ISSOCK (stat_buf.st_mode)));#endif				/* S_ISSOCK */    case 'c':			/* File is character special? */      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (S_ISCHR (stat_buf.st_mode)));    case 'b':			/* File is block special? */      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (S_ISBLK (stat_buf.st_mode)));    case 'p':			/* File is a named pipe? */      unary_advance ();#ifndef S_ISFIFO      return (FALSE);#else      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (S_ISFIFO (stat_buf.st_mode)));#endif				/* S_ISFIFO */    case 'L':			/* Same as -h  */      /*FALLTHROUGH*/    case 'h':			/* File is a symbolic link? */      unary_advance ();#ifndef S_ISLNK      return (FALSE);#else      /* An empty filename is not a valid pathname. */      if ((argv[pos - 1][0] == '\0') ||	  (lstat (argv[pos - 1], &stat_buf) < 0))	return (FALSE);      return (TRUE == (S_ISLNK (stat_buf.st_mode)));#endif				/* S_IFLNK */    case 'u':			/* File is setuid? */      unary_advance ();#ifndef S_ISUID      return (FALSE);#else      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (0 != (stat_buf.st_mode & S_ISUID)));#endif    case 'g':			/* File is setgid? */      unary_advance ();#ifndef S_ISGID      return (FALSE);#else      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);      return (TRUE == (0 != (stat_buf.st_mode & S_ISGID)));#endif    case 'k':			/* File has sticky bit set? */      unary_advance ();      if (stat (argv[pos - 1], &stat_buf) < 0)	return (FALSE);#ifndef S_ISVTX      /* This is not Posix, and is not defined on some Posix systems. */      return (FALSE);#else      return (TRUE == (0 != (stat_buf.st_mode & S_ISVTX)));#endif    case 't':			/* File (fd) is a terminal? */      {	intmax_t fd;	advance (0);	if (pos < argc)	  {	    if (!isint (argv[pos], &fd))	      integer_expected_error (_("after -t"));	    advance (0);	  }	else	  {	    fd = 1;	  }	return (TRUE == (fd == (int) fd && isatty (fd)));      }    case 'n':			/* True if arg has some length. */      unary_advance ();      return (TRUE == (argv[pos - 1][0] != 0));    case 'z':			/* True if arg has no length. */      unary_advance ();      return (TRUE == (argv[pos - 1][0] == '\0'));    }}