/* This file is part of Lcrzo.
*/

int lcrzo_priv_stat_forbidsnotreg(struct stat st)
{ lcrzo_int16 language;
#if defined LCRZODEF_SYSTEM_Unix
  if ( !S_ISREG(st.st_mode) )
#elif defined LCRZODEF_SYSTEM_Windows
  if ( ! ( st.st_mode & _S_IFREG ) )
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif
  { lcrzo_er(lcrzo_global_get_language(&language));
    if (language==LCRZO_GLOBAL_LANG_FR)
    { lcrzo_er(lcrzo_priv_global_set_errmsglcrzo("Le fichier n'est pas regulier"));
    }
    else
    { lcrzo_er(lcrzo_priv_global_set_errmsglcrzo("Not a regular file"));
    }
    return(LCRZO_ERR_SPFILESECURITY);
  }
  return(LCRZO_ERR_OK);
}

