This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC Posix Interface Design using ISO_C_BINDING


Jerry wrote:
> Working in the error codes is the next step. I think we
> should be able to access errno directly by declaring in
> external.

Otherwise you can use the gfortran existing intrinsics
IERRNO() and PERROR().

POSIX has:
"It is unspecified whether errno is a macro or an identifier
 declared with external linkage. If a macro definition
 is  suppressed  in  order to access an actual object, or a
 program defines an identifier with the name errno, the
 behavior is undefined."

There is an additional problem:
"An application that needs to examine the value of errno to
 determine the error should set it to 0 before a  function call"

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]