autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] AC_SITE_LOAD: add OS/2-specific initialization


From: KO Myung-Hun
Subject: Re: [PATCH 2/4] AC_SITE_LOAD: add OS/2-specific initialization
Date: Tue, 23 Sep 2014 11:39:29 +0900
User-agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:10.0.6esrpre) Gecko/20120715 Firefox/10.0.6esrpre SeaMonkey/2.7.2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi/2.

Eric Blake wrote:
> On 09/22/2014 12:59 AM, KO Myung-Hun wrote:
>> \ may be recognized as an escape character on some shells such
>> as pdksh. And the executables on OS/2 have .exe as an extension.
> 
> Umm, \ is an escape character on ALL sh-related shells.  And .exe 
> handling on OS/2 should behave as it does on mingw.
> 

Sorry, my change log was not enough somewhat. I meant 'echo'. At
least, echo of pdksh treats \ as an escape char without -E.

How does mingw handle .exe ?


>> 
>> * lib/autoconf/general.m4 (AC_SITE_LOAD): Convert \ in PATH to
>> /. Add .exe to ac_executable_extensions.
> 
> This says what you changed, but not why.  A good commit message
> gives rationale on WHY the change is important, such as a
> demonstration of what goes wrong without the patch.
> 

I thought I explained WHY above message.

>> --- lib/autoconf/general.m4 |   28 ++++++++++++++++++++++++++++ 1
>> files changed, 28 insertions(+), 0 deletions(-)
>> 
>> diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 
>> index 77f71d2..5a87d5e 100644 --- a/lib/autoconf/general.m4 +++
>> b/lib/autoconf/general.m4 @@ -1951,6 +1951,34 @@ do ||
>> AC_MSG_FAILURE([failed to load site script $ac_site_file]) fi 
>> done + +if test -n "$OS2_SHELL"; then +  # Backslashes into
>> forward slashes: +  # The following OS/2 specific code is
>> performed AFTER config.site +  # has been loaded to allow users
>> to change their environment there. +  # This strange code is
>> necessary to deal with handling of backslashes by +  # ksh. +
>> ac_save_IFS="$IFS" +  IFS="\\" +  ac_TEMP_PATH= +  for ac_dir in
>> $PATH; do +    IFS=$ac_save_IFS +    if test -z "$ac_TEMP_PATH";
>> then +      ac_TEMP_PATH="$ac_dir" +    else +
>> ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir" +    fi +  done +  export
>> PATH="$ac_TEMP_PATH" +  unset ac_TEMP_PATH
> 
> It looks like this is an (overly-complex) way of converting all \
> in $PATH into / before proceeding.  But why is it necessary?
> 

As I said above, without this, echoing components of PATH may be
corrupted. For examples, x:\usr\bin will be x:\usin on pdksh.

>> + +  # add .exe to ac_executable_extensions +  if test -z
>> "$ac_executable_extensions"; then +
>> AC_MSG_WARN([ac_executable_extensions not set, assuming .exe]) +
>> fi +  ac_executable_extensions="$ac_executable_extensions .exe" +
>> export ac_executable_extensions
> 
> Why is the existing code that sets ac_executable_extensions not 
> sufficient?

What is the existing code ? Anyway without this,
ac_executable_extensions is not set at all.

> And why do you have to export it into the environment of child
> processes?

I just preserved the old codes from OS/2 fork if possible. If it is
not needed, I'll remove it.

This might be better as two separate patches, since it
> is doing two unrelated changes.
> 

I thought both these were OS/2 init codes. Anyway, I'll split.

Thanks.

- -- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (OS/2)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFUIN1bE9YstvghgroRArVhAKCuk5IB3l+obfrSYmII2/UveVCcDACeOEDx
KH4QH+jBfUSMhWhnha2fETk=
=/kpB
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]