policy on using errno?

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Aug 31 02:43:00 GMT 2004


What are the guidelines for using errno?  I'm
working on getcwd() and want to do something 
like

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif

void
prefix(getcwd_i4_sub) ( char * cwd, gfc_strlen_type cwd_len,
  GFC_INTEGER_4 * status)
{
  errno = 0;
  (void) getcwd (cwd, (size_t) cwd_len);
  *status = (GFC_INTEGER_4) errno;
}

-- 
Steve



More information about the Fortran mailing list