Dr Stephen Henson wrote:
> 
> Better change the subject...
> 
> Ben Laurie wrote:
> >
> >
> > Isn't that how its done already? But anyway, that wasn't what I meant -
> > I mean how do we deal with the result of doing a "make depend", which
> > alters all the Makefiles...
> >
> 
> No that isn't what it does already. What it does is to copy the *.h file
> up to the string:
> 
> /* BEGIN ERROR CODES */
> 
> and then appends the list of error codes it has extracted from the
> source files followed by some closing stuff. If you add one reason or
> function code you usually re-order the list.
> 
> There are a few other problems this causes.
> 
> If anyone actually checked the error codes (not many do!) and for
> example used SSLeay as a shared library then adding a single reason or
> function code could break things and would require a re-compile.
> 
> One way to solve this I suppose would be to read in the existing error
> codes and append any new ones to the end.

That would be rather fragile, though. I was going to suggest that we use
a hash of the name of the error, but then I remembered that several get
packed into one code, so the chance of a collision would be high.

Currently the only thing I can think of is to do the traditional thing
and just define them by hand. I suppose in that case we could do what
you suggest above (read in the existing ones and append the new ones
[and delete the old ones?]) as a helper, but treat the generated files
as if they were hand-written for robustness.

> Also if you do a "make errors" you end up modifying several *.h files
> which results in lots of stuff being re-compiled that hasn't changed.

That doesn't matter - in fact, it is required, surely, for safety? We
could reduce the amount it happens by being more careful about what
headers are included where.

> There is also a kludge in the asn1 code. If you look at a typical asn1
> source file you see stuff like this:
> 
> /* ASN1err(ASN1_F_D2I_PKCS7,ASN1_R_BAD_PKCS7_CONTENT);
>  * ASN1err(ASN1_F_I2D_PKCS7,ASN1_R_BAD_PKCS7_TYPE);
>  * ASN1err(ASN1_F_PKCS7_NEW,ASN1_R_BAD_PKCS7_TYPE);
>  */
> 
> which is a kludge so the error parser adds the right codes.

Yech.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
and Technical Director|Email: [EMAIL PROTECTED] |
A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to