[ bogofilter-Patches-706375 ] Building under OS/2
David Relson
relson at osagesoftware.com
Tue Apr 1 20:53:24 CEST 2003
Yuri,
Matthias is our portability expert, so I leave most of the related
decisions to him.
At the present time, there are very few #ifdefs in the .c files. That
helps keep code readable. I'd like to keep it that way.
For the getopt initialization, my thought would be to define a macro in the
beginning of bogoconfig.c and use it for initializing optind.
What might work well is to add two API files, named posix.c and os2.c, and
have configure include the proper one in the build. The _fsetmode() calls
could go in function init_stdio(), which would be an empty function in
posix.c. Database locking, in particular belongs in the API files. The
init value for optind could be a global in the API files.
Most, if not all, of the OS/2 code will be in os2.c and its existeence will
not unduly complicate bogofilter. Factoring the code in this way should
help maintain clarity.
Personally, I think having bogofilter run on OS/2 is really neat. For
about 10 years, starting in 1989, OS/2 was my preferred environment. It
held that place in my heart until I replaced it with Linux in
1999. Unfortunately my OS/2 machine has been converted to NT for reading
email, doing office and financial stuff, and running my HP LaserJet 3100
(windoze only).
Good luck with your efforts!
David
More information about the bogofilter-dev
mailing list