[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

errno values over the net

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-11-27 20:09:14 CET

I have svn_ra_svn mostly working (the remaining big piece is
connection establishment and SASL integration, which is a doozy). One
of the bits of remaining polish is in how to pass src_err values over
the wire when communicating error values. Although the most common
errno values like ENOENT tend to have the same value on all systems,
they aren't portable in general; for instance, ECONNRESET is 104 on
Linux and 131 on Solaris.

The only way I can think of to handle this gracefully is to make a
giant table containing a whole bunch of known errno values, with
initializer entries like:

  { ENOENT, "ENOENT" },
#ifdef EROFS
  { EROFS, "EROFS" },
#endif

(we'd #ifdef all the values not specified by POSIX, probably). Then
we could pass errno values over the wire as strings. Such a table
would conceivably have to be updated for new platforms or platform
versions, and of course begs the question of what to do when you get
EL2NSYNC from some system call on Solaris and want to pass it over the
wire to a Linux system.

Do people have better ideas?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 27 20:22:10 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.