This explanation probably should be added to the docs directory.

> If all you are doing is adding reason and function codes to existing
> libraries then you just need to add them in the C source files then type
> "make errors" at the top level. Error codes will then be added to the
> relevent header file and text generated in the relevant error source
> file.
> 
> You shouldn't add error codes directly to header files: "make errors"
> does that for you keeping the numbers unique.
> 
> What it does in detail is this.
> 
> 1. Scans all the C source files for function and reason codes. 
> 2. Scans the header file prototypes for function names.
> 3. Scan the header files for existing function and reason codes.
> 4. If any new codes are needed they are added starting with one more
> than the highest currently used code. Existing codes stay the same.
> 5. Rewrite the error C source file is any new codes were added, the
> function codes are translated to the function names, if possible.
> 
> The reason the headers look out of order is that they are sorted
> alphabetically but a new code could be added anywhere.
> 
> There are a number of reasons for doing things this way. If anyone
> actually is taking notice of error numbers then the old ones are
> retained. Also it keeps the patch sizes down: if the codes were assigned
> numerically then adding one new code could completely re-order the
> header file - it used to do this at one point.
> 
> There are options to the generation script (util/mkerr.pl) to start from
> scratch when assigning codes and various other things as well such as
> forcing it to re-write all header and C source files and there is a
> config file telling it where to find all the header and source files.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to