Mark A. Craig wrote: > Actually, Bill, it kinda sorta does use APR: Yup... it looks half ported; right up through ctype.h it looks like the author had reduced the headers to what was available, and then surrendered. I suspect that this is the typical kitchen sink; throw in every usual header so that any feature is available. It might be worthwhile to comment them all out and readd them one-by-one for the actual declarations that are required by the code. Witness, for example, the redundant sys/types.h :) As I mention, comment them all out (I prefer #if 0 ... #endif for that sort of thing) and start readding one-by-one, and possibly even state something like /* for foo_fn() declaration */ explaining why that header is needed. Bill > #define WIN32 1 > > // from IPC example module > #if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE) > #include "unixd.h" > #define MOD_EXIPC_SET_MUTEX_PERMS // XXX Apache should define something > #endif > /* -------------------------------------------------------------------- */ > /* End #defines Section */ > > /* Begin #includes Section */ > /* -------------------------------------------------------------------- */ > #include "apr.h" > #include "apr_version.h" > #include "apr_signal.h" > #include "apr_buckets.h" > #include "apr_strings.h" > #include "apr_network_io.h" > #include "apr_file_io.h" > #include "apr_time.h" > #include "apr_getopt.h" > #include "apr_general.h" > #include "apr_lib.h" > #include "apr_portable.h" > #include "ap_config.h" > #include "ap_release.h" > #include "apr_poll.h" > #define APR_WANT_STRFUNC > #include "apr_want.h" > #include "apr_base64.h" > #if APR_HAVE_STDIO_H > #include <stdio.h> > #endif > #if APR_HAVE_STDLIB_H > #include <stdlib.h> > #include <math.h> > #endif > #if APR_HAVE_CTYPE_H > #include <ctype.h> > #endif > #include <sys/types.h> > #include <sys/socket.h> > #include <sys/stat.h> > #include <netinet/in.h> > #include <arpa/inet.h> > #include <string.h> > #include <stdlib.h> > #include <sys/types.h> > #include <time.h> > #include <syslog.h> > #include <errno.h> > #include <netdb.h> > #include <time.h> > #include <math.h> > #include <stdarg.h> > #if APR_HAVE_SYS_TYPES_H > #include <sys/types.h> > #endif > #if APR_HAVE_UNISTD_H > #include <unistd.h> > #endif > #include "httpd.h" > #include "http_main.h" > #include "http_core.h" > #include "http_config.h" > #include "http_log.h" > #include "http_request.h" > #include "http_protocol.h" > #include "ap_config.h" > #include "apr_buckets.h" > #include "util_script.h" > #include "util_filter.h" > #include "apr_tables.h" > #include "http_vhost.h" > #include "http_config.h" > #include "pcre.h" > //#include <pcre/pcre.h> > /* -------------------------------------------------------------------- */ > /* End #includes Section */ > > </snip> > > I think I added the WIN32 #define myself, early on in my attempts. Is > there anything obvious I can do to fix this thing up, or am I hamstrung > with it until a "real" coder comes along and fixes it? (It's > open-sourced and GPLed, so it could happen....) I assume I actually > have apr.h, since the compiler didn't complain about that? > > Mark > > -------- Original Message -------- > Subject: Re: Compiling module under Windows for Apache > 2.2.4 with APXS.BAT/.PL > From: William A. Rowe, Jr. <wrowe@xxxxxxxxxxxxx> > To: users@xxxxxxxxxxxxxxxx > Date: Wednesday, October 03, 2007 03:41:57 PM > >> Mark A. Craig wrote: >>> C:\Program Files\Apache Software Foundation\Apache2.2\bin>apxs -c -i -a >>> mod_httpbl.c >>> cl /nologo /MD /W3 /O2 /D WIN32 /D _WINDOWS /D NDEBUG >>> -I"C:\PROGRA~1\APACHE~1\Apache2.2\include" /c /Fomod_httpbl.lo >>> mod_httpbl.c >>> >>> mod_httpbl.c >>> >>> mod_httpbl.c(360) : fatal error C1083: Cannot open include file: >>> 'sys/socket.h': No such file or directory >>> >>> apxs:Error: Command failed with rc=131072 >>> >>> So why am I missing this one, and what SDK do I hafta download to get >>> it? >> >> You are there!!! You will be able to build 'many' modules. >> >> Sadly this author isn't using the APR API (w/httpd) for socket io. There >> is no win32 sys/socket.h. Essentially this is not a win32 ported (or >> generally portable) module. Even on unix, sys/socket.h frequently >> changes identity (which is why there is so much autoconf gunk in the >> wheels of apr and httpd's ./configure). >> >> Bill > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx