rem: mode &= (X_OK | W_OK | R_OK);	 #if R_OK != S_IROTH || W_OK != S_IWOTH || X_OK != S_IXOTH ?error Oops, portability assumptions incorrect. #endif  if (mode == F_OK) return 0;			  #ifdef	_LIBC  if (have_ids == 0) { have_ids = 1; euid = __geteuid (); egid = __getegid (); } #endif
context: euidaccess (const char *path, int mode){  struct stat stats;  int granted;#ifdef	_LIBC  if (! __libc_enable_secure)    /* If we are not set-uid or set-gid, access does the same.  */    return __access (path, mode);#else  if (have_ids == 0)    {      have_ids = 1;      uid = getuid ();      gid = getgid ();      euid = geteuid ();      egid = getegid ();    }  if (uid == euid && gid == egid)    /* If we are not set-uid or set-gid, access does the same.  */    return access (path, mode);#endif  if (stat (path, &stats))    return -1;  mode &= (X_OK | W_OK | R_OK);	/* Clear any bogus bits. */#if R_OK != S_IROTH || W_OK != S_IWOTH || X_OK != S_IXOTH  ?error Oops, portability assumptions incorrect.#endif  if (mode == F_OK)    return 0;			/* The file exists. */#ifdef	_LIBC  /* Now we need the IDs.  */  if (have_ids == 0)    {      have_ids = 1;      euid = __geteuid ();      egid = __getegid ();    }#endif  /* The super-user can read and write any file, and execute any file     that anyone can execute. */  if (euid == 0 && ((mode & X_OK) == 0		    || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))    return 0;  if (euid == stats.st_uid)    granted = (unsigned) (stats.st_mode & (mode << 6)) >> 6;  else if (egid == stats.st_gid || group_member (stats.st_gid))    granted = (unsigned) (stats.st_mode & (mode << 3)) >> 3;  else    granted = (stats.st_mode & mode);  if (granted == mode)    return 0;  __set_errno (EACCESS);  return -1;}