]> granicus.if.org Git - apache/commitdiff
A half hour to waste waiting for builds... this is what you get.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 21 Jul 2002 09:19:19 +0000 (09:19 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 21 Jul 2002 09:19:19 +0000 (09:19 +0000)
  mod_isapi will build and run on OSX... presume others as well unless
  I choose some awful errno values for portability.

PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96136 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/win32/.cvsignore
modules/arch/win32/Makefile.in [new file with mode: 0644]
modules/arch/win32/config.m4 [new file with mode: 0644]
modules/arch/win32/mod_isapi.c
modules/arch/win32/mod_isapi.h

index 1bb03def788298cc8b1f4097d28d556d32c28b88..8a31aca1e9eb69a9aed5ac58e83c1c4152ce2d3c 100644 (file)
@@ -1,5 +1,16 @@
+.deps
+.libs
+*.la
+modules.mk
+Makefile
+*.lo
+*.slo
+*.so
 Debug
 Release
+*.plg
+*.aps
+*.dep
 *.mak
 *.rc
 BuildLog.htm
diff --git a/modules/arch/win32/Makefile.in b/modules/arch/win32/Makefile.in
new file mode 100644 (file)
index 0000000..7c5c149
--- /dev/null
@@ -0,0 +1,3 @@
+# a modules Makefile has no explicit targets -- they will be defined by
+# whatever modules are enabled. just grab special.mk to deal with this.
+include $(top_srcdir)/build/special.mk
diff --git a/modules/arch/win32/config.m4 b/modules/arch/win32/config.m4
new file mode 100644 (file)
index 0000000..25f7a85
--- /dev/null
@@ -0,0 +1,11 @@
+dnl modules enabled in this directory by default
+
+dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
+
+APACHE_MODPATH_INIT(arch/win32)
+
+APACHE_MODULE(isapi, isapi extension support, , , no)
+
+APR_ADDTO(LT_LDFLAGS,-export-dynamic)
+
+APACHE_MODPATH_FINISH
index bd99f003e0fdafa5ee312478e1be48ce662c7702..21cf62ca23661667f53fb298b436d2becc7f4775 100644 (file)
@@ -308,7 +308,7 @@ static apr_status_t isapi_load(apr_pool_t *p, server_rec *s, isapi_loaded *isa)
      * location, etc) they apply to.
      */
     isa->report_version = MAKELONG(0, 5); /* Revision 5.0 */
-    isa->timeout = INFINITE; /* microsecs */
+    isa->timeout = 300 * 1000000; /* microsecs, not used */
     
     rv = apr_dso_load(&isa->handle, isa->filename, p);
     if (rv)
@@ -515,7 +515,7 @@ apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
  **********************************************************/
 
 /* Our "Connection ID" structure */
-typedef struct isapi_cid {
+struct isapi_cid {
     EXTENSION_CONTROL_BLOCK *ecb;
     isapi_dir_conf           dconf;
     isapi_loaded            *isa;
@@ -524,7 +524,7 @@ typedef struct isapi_cid {
     PFN_HSE_IO_COMPLETION    completion;
     void                    *completion_arg;
     apr_thread_mutex_t      *completed;
-} isapi_cid;
+};
 
 int APR_THREAD_FUNC GetServerVariable (isapi_cid    *cid, 
                                        char         *variable_name,
@@ -1158,17 +1158,18 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid    *cid,
          */
         if (subreq->path_info && *subreq->path_info) {
             apr_cpystrn(info->lpszPath + info->cchMatchingPath, 
-                        subreq->path_info, MAX_PATH - info->cchMatchingPath);
+                        subreq->path_info, 
+                        sizeof(info->lpszPath) - info->cchMatchingPath);
             info->cchMatchingURL -= strlen(subreq->path_info);
             if (subreq->finfo.filetype == APR_DIR
-                 && info->cchMatchingPath < MAX_PATH - 1) {
+                 && info->cchMatchingPath < sizeof(info->lpszPath) - 1) {
                 /* roll forward over path_info's first slash */
                 ++info->cchMatchingPath;
                 ++info->cchMatchingURL;
             }
         }
         else if (subreq->finfo.filetype == APR_DIR
-                 && info->cchMatchingPath < MAX_PATH - 1) {
+                 && info->cchMatchingPath < sizeof(info->lpszPath) - 1) {
             /* Add a trailing slash for directory */
             info->lpszPath[info->cchMatchingPath++] = '/';
             info->lpszPath[info->cchMatchingPath] = '\0';
index 3a4ffd951bb93c58e91e6bd1440b7ef1646d882a..6c96db4ba64f572729b391d5aeadba08cc18dc90 100644 (file)
@@ -78,7 +78,8 @@ typedef (APR_THREAD_FUNC *PFN_GETEXTENSIONVERSION)(HSE_VERSION_INFO *ver_info);
 
 /* Our internal 'HCONN' representation, always opaque to the user.
  */
-typedef struct isapi_cid isapi_cid, *HCONN;
+typedef struct isapi_cid isapi_cid;
+typedef struct isapi_cid *HCONN;
 
 /* Prototypes of the essential functions exposed by mod_isapi 
  * for the module to communicate with Apache.
@@ -201,7 +202,7 @@ typedef struct HSE_TF_INFO {
 } HSE_TF_INFO;
 
 typedef struct HSE_URL_MAPEX_INFO {
-    char         lpszPath[MAX_PATH];
+    char         lpszPath[260];
     apr_uint32_t dwFlags;
     apr_uint32_t cchMatchingPath;
     apr_uint32_t cchMatchingURL;
@@ -251,6 +252,27 @@ typedef apr_uint32_t (APR_THREAD_FUNC
 #define HSE_STATUS_PENDING                3 /* Emulated (thread lock) */
 #define HSE_STATUS_ERROR                  4
 
+/* Anticipated error code for common faults within mod_isapi itself
+ */
+#ifndef ERROR_INSUFFICIENT_BUFFER
+#define ERROR_INSUFFICIENT_BUFFER ENOBUFS
+#endif
+#ifndef ERROR_INVALID_INDEX
+#define ERROR_INVALID_INDEX EINVAL
+#endif
+#ifndef ERROR_INVALID_PARAMETER
+#define ERROR_INVALID_PARAMETER EINVAL
+#endif
+#ifndef ERROR_READ_FAULT
+#define ERROR_READ_FAULT EIO
+#endif
+#ifndef ERROR_WRITE_FAULT
+#define ERROR_WRITE_FAULT EIO
+#endif
+#ifndef ERROR_SUCCESS
+#define ERROR_SUCCESS 0
+#endif
+
 /* Valid flags passed with TerminateExtension()
  */
 #define HSE_TERM_MUST_UNLOAD      1