Make compile_et output usable out-of-tree
authorBenjamin Kaduk <kaduk@mit.edu>
Tue, 27 Jan 2015 21:33:25 +0000 (16:33 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 29 Aug 2015 04:05:25 +0000 (00:05 -0400)
commit07e474e35e070b9ddcc5158796c95442aea0597f
tree9ef69406fa41f7c563acf74361131a9693b85c47
parente99bfcfaa3bca3e65f03928718c2c9eb5eff7c8c
Make compile_et output usable out-of-tree

Prior to this commit, the output C files from compile_et would
emit #includes of <afsconfig.h> and <afs/param.h>.  These files
are not installed, and are only available in an OpenAFS build tree.
The output C files also emit #includes of <afs/error_table.h>, which
is an installed file, and is therefore expected to be available on
a system with OpenAFS installed.  Removing the first two headers will
allow OpenAFS's compile_et binary to be used to compile error tables
which are not part of OpenAFS, on systems where OpenAFS is installed.

The inclusion of afsconfig.h was added in commit
972a4072827fb2ec680354d5adebc2c5cca06939 to ensure that it was included
prior to afs/param.h; however, the inclusion of afs/param.h in
compile_et.c stems from the original IBM import and seems of minimal
value.  The only changes needed to build without param.h are to use
int instead of afs_int32 in a couple places (int is 32 bits on
all platforms currently supported) and to include <sys/types.h>
for size_t.

Change-Id: I1ee969eec92b139d265a7494e13ddfc69c05f238
Reviewed-on: http://gerrit.openafs.org/11708
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/comerr/com_err.h
src/comerr/compile_et.c
src/comerr/error_table.h
src/comerr/et_name.c