modruby patch for compiling against apache-2.2
Nagy Bence <[email protected]> Sat, 07 Jan 2006 23:18:59 +0100
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Dear Developers, Miklós Vajna (Frugalware Linux core developer) has created a patch for compiling mod_ruby under Frugalware against apache-2.2. I think it solves bug #9 (http://dev.modruby.net/tickets/9). Greetings, Bence
mod_ruby-1.2.4-apache22.diff
(text/x-patch, 3.1 KB)
diff -Naur mod_ruby-1.2.4/apachelib.c mod_ruby-1.2.4.apache22/apachelib.c --- mod_ruby-1.2.4/apachelib.c 2004-09-23 20:43:18.000000000 +0200 +++ mod_ruby-1.2.4.apache22/apachelib.c 2006-01-07 21:20:13.000000000 +0100 @@ -27,6 +27,7 @@ * SUCH DAMAGE. */ +#define _LARGEFILE64_SOURCE #ifndef WIN32 #include <unistd.h> #endif diff -Naur mod_ruby-1.2.4/apache_request.c mod_ruby-1.2.4.apache22/apache_request.c --- mod_ruby-1.2.4/apache_request.c 2004-09-23 20:43:18.000000000 +0200 +++ mod_ruby-1.2.4.apache22/apache_request.c 2006-01-07 21:20:51.000000000 +0100 @@ -14,6 +14,7 @@ */ /* Modified by Shugo Maeda for mod_ruby. */ +#define _LARGEFILE64_SOURCE #include <errno.h> #include <string.h> #include "mod_ruby.h" diff -Naur mod_ruby-1.2.4/mod_ruby.c mod_ruby-1.2.4.apache22/mod_ruby.c --- mod_ruby-1.2.4/mod_ruby.c 2004-09-27 07:02:36.000000000 +0200 +++ mod_ruby-1.2.4.apache22/mod_ruby.c 2006-01-07 21:19:07.000000000 +0100 @@ -27,6 +27,7 @@ * SUCH DAMAGE. */ +#define _LARGEFILE64_SOURCE #include <stdarg.h> #include <signal.h> diff -Naur mod_ruby-1.2.4.orig/mod_ruby.h mod_ruby-1.2.4/mod_ruby.h --- mod_ruby-1.2.4.orig/mod_ruby.h 2004-09-27 07:11:32.000000000 +0200 +++ mod_ruby-1.2.4/mod_ruby.h 2006-01-07 22:37:13.000000000 +0100 @@ -30,6 +30,49 @@ #ifndef MOD_RUBY_H #define MOD_RUBY_H +#ifndef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE +#endif + +/* starting with apache 2.2 the backward-compatibility defines for + * 1.3 APIs are not available anymore. Define them ourselves here. + */ +#ifndef ap_copy_table + +#define ap_copy_table apr_table_copy +#define ap_cpystrn apr_cpystrn +#define ap_destroy_pool apr_pool_destroy +#define ap_isspace apr_isspace +#define ap_make_array apr_array_make +#define ap_make_table apr_table_make +#define ap_null_cleanup apr_pool_cleanup_null +#define ap_palloc apr_palloc +#define ap_pcalloc apr_pcalloc +#define ap_psprintf apr_psprintf +#define ap_pstrcat apr_pstrcat +#define ap_pstrdup apr_pstrdup +#define ap_pstrndup apr_pstrndup +#define ap_push_array apr_array_push +#define ap_register_cleanup apr_pool_cleanup_register +#define ap_snprintf apr_snprintf +#define ap_table_add apr_table_add +#define ap_table_do apr_table_do +#define ap_table_get apr_table_get +#define ap_table_set apr_table_set +#define ap_table_setn apr_table_setn +#define ap_table_unset apr_table_unset +#define ap_day_snames apr_day_snames +#define ap_month_snames apr_month_snames +#define ap_overlay_tables apr_table_overlay +#define ap_append_arrays apr_array_append +#define ap_clear_table apr_table_clear +#define ap_isdigit apr_isdigit +#define ap_isxdigit apr_isxdigit +#define ap_table_elts apr_table_elts +#define ap_table_merge apr_table_merge + +#endif /* defined(ap_copy_table) */ + #include "httpd.h" #include "http_config.h" #include "http_core.h" diff -Naur mod_ruby-1.2.4/request.c mod_ruby-1.2.4.apache22/request.c --- mod_ruby-1.2.4/request.c 2004-09-23 20:43:18.000000000 +0200 +++ mod_ruby-1.2.4.apache22/request.c 2006-01-07 21:20:29.000000000 +0100 @@ -27,6 +27,7 @@ * SUCH DAMAGE. */ +#define _LARGEFILE64_SOURCE #include <sys/types.h> #include <sys/stat.h>