Getting ready to land lots of stuff
rra at stanford.edu
Sun Jun 4 09:16:47 UTC 2000
I'm getting ready to land a bunch of miscellaneous stuff that I've been
fiddling with into the CURRENT tree (and some of it into the STABLE tree).
The main part, and the part that will also go into STABLE, is a new
library routine to generate a properly formatted Date header so that we
can isolate the hackery that we have to use to get the right time zone,
along with some new configure tests to support it.
While I was at it, though, I also rewrote convdate and added some new
functionality (to allow some testing of the date routines), and added my
error handling routines (shortcuts for printing warning messages,
optionally appending strerror output and possibly exiting) to libinn.
I'd also like to start thinking about a reorganization of the header
namespace. Right now, to install the headers needed to use all of the
libinn and libstorage functionality, we'd install a bunch of headers with
very generic names like ov.h. I'd like to instead install those as
inn/ov.h and the like, which is what most packages are doing these days.
That will require creating an inn subdirectory in the include directory
and slowly starting to move headers into it (and creating new headers that
should be installed in that directory).
It's generally considered a bad idea to install autoconf-generated header
files (they often conflict with the autoconf results used by other
packages, among other reasons), so config.h won't be installed. That
means that definitions used by the other header files (as opposed to INN
code) need to be put into another header file, which I'm planning on
calling inn/defines.h. The installed header files will include that, and
all of the INN core code should include config.h before including any
other header files (to get the typedefs and so forth).
Header files that won't be installed (like config.h and clibrary.h) but
which are just used internally by INN can remain at the top level of the
include directory; it's only header files that should eventually be
installed that should move. libinn.h, having a sufficiently specific name
and being the include file most likely already included by other packages,
I think can safely also stay at the top level even when installed.
Finally, I've added the code to set up a bool type to the inn/defines.h
that I've been working with, eventually to replace the use of BOOL in the
INN source, since we need the lowercase version for Perl anyway and since
innfeed has been using it for a while. This will require testing to make
sure it doesn't conflict with system headers, but it shouldn't. I find
the lowercase version of bool easier to read and more natural to use than
the all-caps version, but more than anything else it's just a case of
picking one varient and working to standardize on it, and defining "bool"
is required for compatibility with Perl.
What I currently have done is the new date routine, the configure probes
that it uses, the convdate rewrite, the error handling routines, and
inn/defines.h containing the bool type, BEGIN_DECLS/END_DECLS as a nicer
way of doing the C++ wrapping, preprocessor magic to hide __attribute__
from non-gcc compilers so that we can use the gcc attributes if we want,
and a #define for gcc to mark a function argument as unused (which may be
worth using at some point if we start using a standard set of warning
flags to "lint" INN occasionally). There are also minor modifications
elsewhere to use the bool from inn/defines.h rather than setting up one's
I haven't checked anything in yet; figured this was enough random stuff
that I should query people and get feedback on any of the above. :) The
date stuff and only it would go into BETA; the rest is for CURRENT. Mail
inn-workers if any of the above sounds wrong or if you have any questions.
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-workers