|
SA Bugzilla – Full Text Bug Listing |
Description
Sidney Markowitz
2003-12-20 14:48:46 UTC
Created attachment 1630 [details] *OBSOLETE* patches to Makefile.PL and spamd/ files to port spamc to Win32 Note that the patch to Makefile.PL is against the CVS version and includes the patch submitted for bug #2808, obsoleting that patch. Created attachment 1631 [details]
file spamd\README.Win32
file name spamd\README.Win32
Created attachment 1632 [details]
*OBSOLETE* file spamd/getopt.h
file spamd/getopt.h
Created attachment 1633 [details]
*OBSOLETE* file spamd/getopt.c
file spamd/getopt.c copied from OpenBSD
Created attachment 1634 [details]
*OBSOLETE* file spamd/win32.config
file spamd/win32.config used to build Win32 version of spamc
Created attachment 1635 [details]
*OBSOLETE* file spamd/win32.mak
file spamd/win32.mak used to build Win32 version of spamc
Whoops, there are some bugs in there -- I'll upload a fixed patch after I've had a chance to test this better on non-Windows platforms. Created attachment 1637 [details]
*OBSOLETE* updated patches to Makefile.PL and spamd files
This patch fixes bugs in the first patch that I found when I tested under
Cygwin. Note that SSL is not supported under Win32 in this patch. I would like
to see this confirmed and checked in and then we can deal with SSL.
Created attachment 1641 [details]
patches to Makefile.PL and spamd/ files now with SSL support
Updated patch to include SSL support in Win32 spamc
Created attachment 1642 [details]
*OBSOLETE* spamd/win32nossl.mak spamc makefile for Win32 with no SSL
Name this file spamd/win32nossl.mak
It is used as the makefile to build spamc when under Win32 and building spamc
without SSL support
Created attachment 1643 [details]
*OBSOLETE* file name spamd/win32ssl.mak
Name this file spamd/win32ssl.mak
It is used for building the Win32 version of spamc with ssl support
Created attachment 1644 [details]
spamd/win32.config for use in Win32 build of spamc
Name this file spamd/win32.config
Used in Win32 build of spamc. Updated version that works for SSL and non-SSL
builds.
sidney -- you were asking about the OpenBSD code, but I didn't get a chance to reply before vacation. We can't incorporate that, unfortunately, unless the original authors say "ok" to relicensing by sending in an Apache CLA. However there may be a getopt implementation in the Apache httpd sourcecode, I reckon; might be worth taking a look in there, since we could use that code, no problem. Created attachment 1652 [details]
file spamd/getopt.h apache licensed version copied from apache 1.3
Downloaded from the Apache 1.3 source repository as a dropin replacement for
the OpenBSD version I first uploaded
Created attachment 1653 [details]
file spamd/getopt.c apache licensed version copied from apache 1.3
Downloaded from the Apache 1.3 source repository as a dropin replacement for
the OpenBSD version I first uploaded
Created attachment 1654 [details]
file spamd/win32nossl.mak
The Apache 1.3 getopt checks for WIN32 define instead of _WIN32 which is
supplied by the VC++ 6.0 compiler. This updated makefile for non-SSL build of
spamc adds the definition of WIN32
Created attachment 1655 [details]
file name spamd/win32ssl.mak
The Apache 1.3 getopt checks for WIN32 define instead of _WIN32 which is
supplied by the VC++ 6.0 compiler. This updated makefile for SSL build of spamc
adds the definition of WIN32
Subject: Re: Port of spamc to Win32 environment Sander Striker wrote: >> However there may be a getopt >>implementation in the Apache httpd sourcecode, I reckon; might be worth taking a >>look in there, since we could use that code, no problem. > > > In APR (http://apr.apache.org/) actually. See apr/include/apr_getopt.h. I don't know why your email did not make it into the bugzilla comments on bug 2862. Did you see my response there? I already checked in copies from apache-1.3/src/os/win32/getopt.* which work as drop in replacements. Since getopt is in the run time library in unix/linux it would be even messier to use the apr_getopt in Windows since that uses different names all the structures and functions, adding on the 'apr_' prefix. -- sidney Sidney, could you please take a moment and mark obsolete patches/files (via the Edit link)? It's currently a bit hard to check the stuff (though it looks good from what I saw till now). *** Bug 2808 has been marked as a duplicate of this bug. *** Malte, I did mark each one that was obsoleted whenever I checked a new version in, and they show up as obsolete in my browser. What I see on this screen are eight attachments marked obsolete (the description struck out), one non-obsoleted attachment that is labeled as being a patch to existing files, and six non-obsoleted attachments that are new files, each of the six labeled with the name of the directory/file that is to be added to the source tree with no duplicate names. Do you see something different in your browser? I'll go ahead and add the word OBSOLETE to the eight obsolete entries in case the strikeout markup isn't showing up in lynx or some other browser. Hmm... I don't have anything struck out. Must be my browser. Sorry, it was also more or less my fault; I took a sample to see if they were made obsolete, but looked at the getopt.h file and thought it was a former version of getopt.c. doh! Ok, I'll check those stuff now... Subject: Re: Port of spamc to Win32 environment I'm getting the "bugzilla is currently broken [...] too many connections" error now, so I'm sending this via email Malte, note that the latest Net::DNS is required for the Cygwin/Win32 versions of spamd/spamc to work properly. Most configurations will work with the current Net::DNS 0.44 from CPAN, but I have a fix for some less common system configurations that went into 0.44_01, which right now is marked "Developer Release". -- sidney Ok Sidney: You wanted something like configure for Windows? Here you've got it :) HHOS; I just committed a modified version of your patch: configure is now wrapped by a Perl script called build/configure which calls the autoconf script if it's not running under Windows and does the stuff on it's own if it is. What it actually does is: 1. copy spamd/config.h.win to spamd/config.h 2. copy spamd/binaries.mk.win to spamd/binaries.mk *and* do variable replacement of @@FOO@@ stuff similar to autoconf (two @ because it uses our existing preprocessor for that). SSL is now enabled with --enable-ssl under Windows, too. The values for the variables are currently stored in the build/configure script itself but might be moved to a separate file if this script should once be re-used (which is simple to do). Your patches to Makefile.PL went in, too, though modified. And the stuff to spamc.c and libspamc.c, too, though I'm not really happy with all those #ifdefs. It should be simple to get rid of most of them (by introducing a vararg routine log() instead of the macro syslog() and some other changes). Please test the stuff and tell me if it works (I tested it too, but I just "simulated" Windows ;) You can do an svn log -r 4625:4627 -v to see which files were modified and svn diff -r 4625:4627 to see my actual changes. Cygwin built and tested fine. It's not quite right yet. The Win32 make file has unix style seperators in the pathnames, e.g., spamd/spamc.c instead of spamd\spamc.c. I'll fix it and submit the patch on my next awake cycle... This cycle is long over :-) Malte, I would like you to either fix this or let me know the best place to fix it. The latest files you checked in when built under WIN32 result in a makefile that contains this SPAMC_FILES = spamd/spamc.c spamd/getopt.c LIBSPAMC_FILES = spamd/libspamc.c spamd/utils.c all: spamd/spamc.exe spamd/spamc.exe: $(SPAMC_FILES) $(LIBSPAMC_FILES) ============== where it should contain SPAMC_FILES = spamd\spamc.c spamd\getopt.c LIBSPAMC_FILES = spamd\libspamc.c spamd\utils.c all: spamd\spamc.exe spamd\spamc.exe: $(SPAMC_FILES) $(LIBSPAMC_FILES) Umm, please pretend that I never wrote that last comment :-( Which comment? Can't see one ;-) I think this is finally solved :) *** Bug 3101 has been marked as a duplicate of this bug. *** |