/* This file is part of Lcrzo.
*/

int lcrzo_priv_fd_stat_get(int fd, 
			   struct stat *pst)
{ int ret;

  if (pst==NULL) return(LCRZO_ERR_PANULLPTR);

#if defined LCRZODEF_SYSTEM_Unix
  ret=fstat(fd, pst);
#elif defined LCRZODEF_SYSTEM_Windows
  ret=_fstat(fd, (struct _stat*)pst);
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif

  if (ret==-1) return(LCRZO_ERR_FUFSTAT);
  return(LCRZO_ERR_OK);
}

