Browse Source

Fixed compiling for httpd 1.3.37

git-svn-id: trunk@4878 -
sekelsenmat 19 years ago
parent
commit
bf384c8bd6

+ 1 - 0
.gitattributes

@@ -1333,6 +1333,7 @@ packages/base/httpd/httpd-1.3/http_request.inc svneol=native#text/plain
 packages/base/httpd/httpd-1.3/http_vhost.inc svneol=native#text/plain
 packages/base/httpd/httpd-1.3/http_vhost.inc svneol=native#text/plain
 packages/base/httpd/httpd-1.3/httpd.inc svneol=native#text/plain
 packages/base/httpd/httpd-1.3/httpd.inc svneol=native#text/plain
 packages/base/httpd/httpd-1.3/httpd.pas svneol=native#text/plain
 packages/base/httpd/httpd-1.3/httpd.pas svneol=native#text/plain
+packages/base/httpd/httpd-1.3/readdir.inc -text
 packages/base/httpd/httpd-1.3/util_uri.inc svneol=native#text/plain
 packages/base/httpd/httpd-1.3/util_uri.inc svneol=native#text/plain
 packages/base/httpd/httpd-1.3/win32_os.inc svneol=native#text/plain
 packages/base/httpd/httpd-1.3/win32_os.inc svneol=native#text/plain
 packages/base/httpd/httpd-2.0/Makefile svneol=native#text/plain
 packages/base/httpd/httpd-2.0/Makefile svneol=native#text/plain

+ 5 - 1
packages/base/httpd/httpd-1.3/httpd.inc

@@ -1248,6 +1248,8 @@ type
     sig: cint;
     sig: cint;
     pid: pid_t;
     pid: pid_t;
   end;
   end;
+  
+  Pap_exception_info_t = ^ap_exception_info_t;
 
 
 { Register a function to be called after a fatal exception (on *X systems, a
 { Register a function to be called after a fatal exception (on *X systems, a
  * "synchronous signal" such as SIGSEGV, SIGILL, etc.).
  * "synchronous signal" such as SIGSEGV, SIGILL, etc.).
@@ -1256,7 +1258,9 @@ type
  * If EnableExceptionHook directive is not set to "on", this function will
  * If EnableExceptionHook directive is not set to "on", this function will
  * report failure and no such hooks will be called.
  * report failure and no such hooks will be called.
  }
  }
-function ap_add_fatal_exception_hook(fn: procedure (param: Pap_exception_info_t) ): cint;
+ fn_afeh_t = procedure (param: Pap_exception_info_t);
+ 
+function ap_add_fatal_exception_hook(fn: fn_afeh_t): cint;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
  {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
 
 
 {$endif} { AP_ENABLE_EXCEPTION_HOOK }
 {$endif} { AP_ENABLE_EXCEPTION_HOOK }

+ 2 - 0
packages/base/httpd/httpd-1.3/httpd.pas

@@ -82,6 +82,8 @@ type
  include more files.
  include more files.
 }
 }
 
 
+{$include readdir.inc}
+
 {.$include ap_provider.inc}
 {.$include ap_provider.inc}
 {.$include util_cfgtree.inc}
 {.$include util_cfgtree.inc}
 
 

+ 73 - 0
packages/base/httpd/httpd-1.3/readdir.inc

@@ -0,0 +1,73 @@
+{ Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ }
+
+{
+ * Structures and types used to implement opendir/readdir/closedir
+ * on Windows 95/NT.
+ }
+
+{$ifdef WIN32}
+
+{#include <io.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+#ifndef API_EXPORT
+# define API_EXPORT(type)    __declspec(dllexport) type __stdcall
+#endif}
+
+{ struct dirent - same as Unix }
+type
+  dirent = record
+    d_ino: clong;                         { inode (always 1 in WIN32) }
+    d_off: off_t;                         { offset to this dirent }
+    d_reclen: cushort;                    { length of d_name }
+    d_name: array[_MAX_FNAME+1] of Char;  { filename (null terminated) }
+  end;
+
+{ typedef DIR - not the same as Unix }
+  DIR = record
+    handle: clong;                 { _findfirst/_findnext handle }
+    offset: cshort;                { offset into directory }
+    finished: cshort;              { 1 if there are not more files }
+//    struct _finddata_t fileinfo; { from _findfirst/_findnext }
+    fileinfo: Pointer;             { from _findfirst/_findnext }
+    dir: PChar;                    { the dir we are reading }
+    dent: dirent;                  { the dirent to return }
+  end;
+
+  PDIR = ^DIR;
+  
+{ Function prototypes }
+{API_EXPORT(DIR *) opendir(const char *);
+API_EXPORT(struct dirent *) readdir(DIR *);
+API_EXPORT(int) closedir(DIR *);}
+
+  va_list = Pointer;
+
+{
+ * Simplified declarations for other platforms
+ }
+
+{$else}
+
+  PDIR = Pointer;
+
+  va_list = Pointer;
+
+{$endif} { WIN32 }
+