You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2011/03/27 17:30:38 UTC

[PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

For autoconf-based builds, DEFAULT_REL_RUNTIMEDIR is defined by the
layout machinery, which creates ap_config_layout.h.

For non-autoconf-based builds, there is no equivalent to
ap_config_layout.h.  Windows and NetWare MPMs define
DEFAULT_REL_RUNTIMEDIR in mpm_layout.h, but that is local to the MPM.
So no definition is visible to modules and other source files.  As a
work-around, several common source files have created their own
defaults when DEFAULT_REL_RUNTIMEDIR is not defined.

The attached patch creates a new os_layout.h for non-autoconf-based
builds (just Windows and NetWare) which defines
DEFAULT_REL_RUNTIMEDIR.  The workarounds from the several common
source files are removed.  Third-party modules can also depend on
DEFAULT_REL_RUNTIMEDIR again.

Concerns (such as better name for the new file)?

No, I didn't test it :)  My Visual C++ Express setup for httpd is not
workable at present.

I will try to test the docgen stuff before I commit.

Re: [PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, Mar 28, 2011 at 12:51 AM, NormW <no...@gknw.net> wrote:
> On 28/03/2011 10:41 AM, NormW wrote:
>>
>> On 28/03/2011 9:54 AM, Jeff Trawick wrote:
>>>
>>> On Sun, Mar 27, 2011 at 6:09 PM, William A. Rowe Jr.
>>> <wr...@rowe-clan.net> wrote:
>>>>
>>>> On 3/27/2011 10:30 AM, Jeff Trawick wrote:
>>>>>
>>>>> Concerns (such as better name for the new file)?
>>>>
>>>> Only one... please don't add #include logic, let Gunter and I wire up
>>>> the auto-copy to ap_config_layout.h and we will truly be consistent.
>>>>
>>>> You can update the patch to assume that file always exists. Let's keep
>>>> the main .c code as absolutely consistent as possible with fewer
>>>> per-arch
>>>> variations.
>>>
>>> ap_config.h now unconditionally includes ap_config_layout.h.
>>>
>>> I renamed the two OS-specific, non-autoconf-build versions to
>>> {win32,netware}_config_layout.h to make it obvious to lurkers that
>>> they should not include this file as present in the os directory.
>>>
> A patch to httpd-trunk similar to the following does the trick (on NetWare
> at least).
>
> Index: include/ap_config.h
> ===================================================================
> --- include/ap_config.h (revision 1086115)
> +++ include/ap_config.h (working copy)
> @@ -232,8 +232,12 @@
>  #include "os.h"
>  #if (!defined(WIN32) && !defined(NETWARE)) || defined(__MINGW32__)
>  #include "ap_config_auto.h"
> +#include "ap_config_layout.h"
> +#elif defined(NETWARE)
> +#include "netware_config_layout.h"
> +#elif defined(WIN32)
> +#include "win32_config_layout.h"
>  #endif
> -#include "ap_config_layout.h"
>
>  #if defined(NETWARE)
>  #define AP_NONBLOCK_WHEN_MULTI_LISTEN 1

Thanks, but as per wrowe's suggestion the file
(netware_config_layout.h or ap_config_layout.hnw if renamed) will get
copied to ap_config_layout.h, so that the one #include of
ap_config_layout.h will work for all platforms.

(ap_config_layout.h for Unix is generated anyway.)

Re: [PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

Posted by NormW <no...@gknw.net>.
On 28/03/2011 10:41 AM, NormW wrote:
> On 28/03/2011 9:54 AM, Jeff Trawick wrote:
>> On Sun, Mar 27, 2011 at 6:09 PM, William A. Rowe Jr.
>> <wr...@rowe-clan.net> wrote:
>>> On 3/27/2011 10:30 AM, Jeff Trawick wrote:
>>>>
>>>> Concerns (such as better name for the new file)?
>>>
>>> Only one... please don't add #include logic, let Gunter and I wire up
>>> the auto-copy to ap_config_layout.h and we will truly be consistent.
>>>
>>> You can update the patch to assume that file always exists. Let's keep
>>> the main .c code as absolutely consistent as possible with fewer
>>> per-arch
>>> variations.
>>
>> ap_config.h now unconditionally includes ap_config_layout.h.
>>
>> I renamed the two OS-specific, non-autoconf-build versions to
>> {win32,netware}_config_layout.h to make it obvious to lurkers that
>> they should not include this file as present in the os directory.
>>
A patch to httpd-trunk similar to the following does the trick (on 
NetWare at least).

Index: include/ap_config.h
===================================================================
--- include/ap_config.h	(revision 1086115)
+++ include/ap_config.h	(working copy)
@@ -232,8 +232,12 @@
  #include "os.h"
  #if (!defined(WIN32) && !defined(NETWARE)) || defined(__MINGW32__)
  #include "ap_config_auto.h"
+#include "ap_config_layout.h"
+#elif defined(NETWARE)
+#include "netware_config_layout.h"
+#elif defined(WIN32)
+#include "win32_config_layout.h"
  #endif
-#include "ap_config_layout.h"

  #if defined(NETWARE)
  #define AP_NONBLOCK_WHEN_MULTI_LISTEN 1

Norm

Re: [PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

Posted by NormW <no...@gknw.net>.
On 28/03/2011 9:54 AM, Jeff Trawick wrote:
> On Sun, Mar 27, 2011 at 6:09 PM, William A. Rowe Jr.
> <wr...@rowe-clan.net>  wrote:
>> On 3/27/2011 10:30 AM, Jeff Trawick wrote:
>>>
>>> Concerns (such as better name for the new file)?
>>
>> Only one... please don't add #include logic, let Gunter and I wire up
>> the auto-copy to ap_config_layout.h and we will truly be consistent.
>>
>> You can update the patch to assume that file always exists.  Let's keep
>> the main .c code as absolutely consistent as possible with fewer per-arch
>> variations.
>
> ap_config.h now unconditionally includes ap_config_layout.h.
>
> I renamed the two OS-specific, non-autoconf-build versions to
> {win32,netware}_config_layout.h to make it obvious to lurkers that
> they should not include this file as present in the os directory.
>
Hi,
AFAICT renaming os_layout.h -> netware_config_layout.h requires a tweak 
in ap_config.h now, plus a tweak of svn eol properties for added pieces.

Norm


Re: [PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

Posted by Jeff Trawick <tr...@gmail.com>.
On Sun, Mar 27, 2011 at 6:09 PM, William A. Rowe Jr.
<wr...@rowe-clan.net> wrote:
> On 3/27/2011 10:30 AM, Jeff Trawick wrote:
>>
>> Concerns (such as better name for the new file)?
>
> Only one... please don't add #include logic, let Gunter and I wire up
> the auto-copy to ap_config_layout.h and we will truly be consistent.
>
> You can update the patch to assume that file always exists.  Let's keep
> the main .c code as absolutely consistent as possible with fewer per-arch
> variations.

ap_config.h now unconditionally includes ap_config_layout.h.

I renamed the two OS-specific, non-autoconf-build versions to
{win32,netware}_config_layout.h to make it obvious to lurkers that
they should not include this file as present in the os directory.

Re: [PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/27/2011 10:30 AM, Jeff Trawick wrote:
> 
> Concerns (such as better name for the new file)?

Only one... please don't add #include logic, let Gunter and I wire up
the auto-copy to ap_config_layout.h and we will truly be consistent.

You can update the patch to assume that file always exists.  Let's keep
the main .c code as absolutely consistent as possible with fewer per-arch
variations.

Re: [PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

Posted by NormW <no...@gknw.net>.
On 28/03/2011 6:08 AM, Jeff Trawick wrote:
> On Sun, Mar 27, 2011 at 3:26 PM, NormW<no...@gknw.net>  wrote:
>> On 28/03/2011 1:30 AM, Jeff Trawick wrote:
>>>
>>> For autoconf-based builds, DEFAULT_REL_RUNTIMEDIR is defined by the
>>> layout machinery, which creates ap_config_layout.h.
>>>
>>> For non-autoconf-based builds, there is no equivalent to
>>> ap_config_layout.h.  Windows and NetWare MPMs define
>>> DEFAULT_REL_RUNTIMEDIR in mpm_layout.h, but that is local to the MPM.
>>> So no definition is visible to modules and other source files.  As a
>>> work-around, several common source files have created their own
>>> defaults when DEFAULT_REL_RUNTIMEDIR is not defined.
>>>
>>> The attached patch creates a new os_layout.h for non-autoconf-based
>>> builds (just Windows and NetWare) which defines
>>> DEFAULT_REL_RUNTIMEDIR.  The workarounds from the several common
>>> source files are removed.  Third-party modules can also depend on
>>> DEFAULT_REL_RUNTIMEDIR again.
>>>
>>> Concerns (such as better name for the new file)?
>>>
>>> No, I didn't test it :)  My Visual C++ Express setup for httpd is not
>>> workable at present.
>>>
>>> I will try to test the docgen stuff before I commit.
>>
>> Seems like the paperclip failed.
>
> (blush)
>
> now attached
Hi,
Patch applies without issue, compiles for NetWare without issue, loads 
on server without issue, socachedbm creates its files in .\logs as 
previous and server can deliver Apache manual with no problems; bottom 
line is 'change looks fine for NetWare'.
Norm


Re: [PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

Posted by Jeff Trawick <tr...@gmail.com>.
On Sun, Mar 27, 2011 at 3:26 PM, NormW <no...@gknw.net> wrote:
> On 28/03/2011 1:30 AM, Jeff Trawick wrote:
>>
>> For autoconf-based builds, DEFAULT_REL_RUNTIMEDIR is defined by the
>> layout machinery, which creates ap_config_layout.h.
>>
>> For non-autoconf-based builds, there is no equivalent to
>> ap_config_layout.h.  Windows and NetWare MPMs define
>> DEFAULT_REL_RUNTIMEDIR in mpm_layout.h, but that is local to the MPM.
>> So no definition is visible to modules and other source files.  As a
>> work-around, several common source files have created their own
>> defaults when DEFAULT_REL_RUNTIMEDIR is not defined.
>>
>> The attached patch creates a new os_layout.h for non-autoconf-based
>> builds (just Windows and NetWare) which defines
>> DEFAULT_REL_RUNTIMEDIR.  The workarounds from the several common
>> source files are removed.  Third-party modules can also depend on
>> DEFAULT_REL_RUNTIMEDIR again.
>>
>> Concerns (such as better name for the new file)?
>>
>> No, I didn't test it :)  My Visual C++ Express setup for httpd is not
>> workable at present.
>>
>> I will try to test the docgen stuff before I commit.
>
> Seems like the paperclip failed.

(blush)

now attached

Re: [PATCH] default_rel_runtimedir everywhere (Windows, NetWare)

Posted by NormW <no...@gknw.net>.
On 28/03/2011 1:30 AM, Jeff Trawick wrote:
> For autoconf-based builds, DEFAULT_REL_RUNTIMEDIR is defined by the
> layout machinery, which creates ap_config_layout.h.
>
> For non-autoconf-based builds, there is no equivalent to
> ap_config_layout.h.  Windows and NetWare MPMs define
> DEFAULT_REL_RUNTIMEDIR in mpm_layout.h, but that is local to the MPM.
> So no definition is visible to modules and other source files.  As a
> work-around, several common source files have created their own
> defaults when DEFAULT_REL_RUNTIMEDIR is not defined.
>
> The attached patch creates a new os_layout.h for non-autoconf-based
> builds (just Windows and NetWare) which defines
> DEFAULT_REL_RUNTIMEDIR.  The workarounds from the several common
> source files are removed.  Third-party modules can also depend on
> DEFAULT_REL_RUNTIMEDIR again.
>
> Concerns (such as better name for the new file)?
>
> No, I didn't test it :)  My Visual C++ Express setup for httpd is not
> workable at present.
>
> I will try to test the docgen stuff before I commit.
Seems like the paperclip failed.
Norm