gpg_err_code_from_errno usage

Marcus Brinkmann marcus.brinkmann at ruhr-uni-bochum.de
Sat Mar 11 12:26:18 CET 2006


At Sat, 11 Mar 2006 11:52:26 +0100,
Nikos Mavrogiannopoulos wrote:
> 
> On Sat 11 Mar 2006 10:45, Marcus Brinkmann wrote:
> 
> > > But how can you be sure that calloc() (or in that case gcry_calloc)
> > > will set the errno? calloc is a library call which may or may not
> > > use a system call. Even if it works on some systems, this is a very
> > > non-portable construction, which will result in no error checking
> > > in systems that do not set errno.
> > It's not in ISO C, but in POSIX.  Single Unix v3 has:
> > http://www.opengroup.org/onlinepubs/009695399/functions/calloc.html
> 
> Maybe but this doesn't change my argument. It is less portable than
> the ISO/ANSI C  behavior. Given that libgcrypt is already ported to 
> non-UNIX systems as well[0], I would consider this a bug.

ISO/ANSI C alone is not a reasonable target platform to write
applications for.  So, if you want to port libgcrypt to a specific
platform, please say which one and tell us what changes are required
to make it work on that specific platform.  Only then we can consider
it.

Thanks,
Marcus




More information about the Gcrypt-devel mailing list