diff mbox

[Fixinclude] : Fix typo and default to twoprocess on VMS

Message ID B54A5ED3-8DE8-4C8C-A389-96BAF2E09FCB@adacore.com
State New
Headers show

Commit Message

Tristan Gingold April 17, 2012, 12:57 p.m. UTC
Hi,

one-process methodology cannot be used on VMS because fork/pipe/dup2 aren't fully supported.  To avoid a build failure, it is therefore better to build using two-process methodology.

But, when twoprocess is selected, gcc emits a warning due to a missing specifier in printf.  The patch fixes that.

Manually tested on x86_64-darwin by configuring with --enable-twoprocess.

I am pretty sure that fixinclude cannot be used as-is on VMS due to the filename convention and missing shell, but at least we can build a cross and a native canadian on UNIX.

Ok for trunk ?

Tristan.

fixincludes/
2012-04-17  Tristan Gingold  <gingold@adacore.com>

	* fixincl.c (fix_with_system): Add missing specifier.
	* configure.ac: Default to twoprocess on vms.
	* configure: Regenerate.

Comments

Bruce Korb April 17, 2012, 2:21 p.m. UTC | #1
Hi Tristan,

On Tue, Apr 17, 2012 at 5:57 AM, Tristan Gingold <gingold@adacore.com> wrote:
> Hi,
>
> one-process methodology cannot be used on VMS[...]
> But, when twoprocess is selected, gcc emits a warning[...]
> Ok for trunk ?

> diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
> index e7de791..f1fb2ff 100644
> --- a/fixincludes/configure.ac
> +++ b/fixincludes/configure.ac
> @@ -53,7 +53,8 @@ fi],
>        i?86-*-msdosdjgpp* | \
>        i?86-*-mingw32* | \
>        x86_64-*-mingw32* | \
> -       *-*-beos* )
> +       *-*-beos* | \
> +        *-*-*vms*)
>                TARGET=twoprocess
>                ;;

This, definitely.

> diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
> index 9f399ab..1133534 100644
> --- a/fixincludes/fixincl.c
> +++ b/fixincludes/fixincl.c
> @@ -829,7 +829,7 @@ fix_with_system (tFixDesc* p_fixd,
>       /*
>        *  Now add the fix number and file names that may be needed
>        */
> -      sprintf (pz_scan, " %ld '%s' '%s'",  (long) (p_fixd - fixDescList),
> +      sprintf (pz_scan, " %ld '%s' '%s' '%s'", (long) (p_fixd - fixDescList),
>               pz_fix_file, pz_file_source, pz_temp_file);
>     }
>   else /* NOT an "internal" fix: */

This, almost certainly.  I'll take a peek at the source and convince myself of
this decade old mistake tomorrow & send my grateful thanks and approval then.
(No access to source today.)

Thank you!  Cheers - Bruce
Tristan Gingold April 18, 2012, 8:43 a.m. UTC | #2
On Apr 17, 2012, at 4:21 PM, Bruce Korb wrote:

> Hi Tristan,
> 
> On Tue, Apr 17, 2012 at 5:57 AM, Tristan Gingold <gingold@adacore.com> wrote:
>> Hi,
>> 
>> one-process methodology cannot be used on VMS[...]
>> But, when twoprocess is selected, gcc emits a warning[...]
>> Ok for trunk ?
> 
>> diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
>> index e7de791..f1fb2ff 100644
>> --- a/fixincludes/configure.ac
>> +++ b/fixincludes/configure.ac
>> @@ -53,7 +53,8 @@ fi],
>>        i?86-*-msdosdjgpp* | \
>>        i?86-*-mingw32* | \
>>        x86_64-*-mingw32* | \
>> -       *-*-beos* )
>> +       *-*-beos* | \
>> +        *-*-*vms*)
>>                TARGET=twoprocess
>>                ;;
> 
> This, definitely.
> 
>> diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
>> index 9f399ab..1133534 100644
>> --- a/fixincludes/fixincl.c
>> +++ b/fixincludes/fixincl.c
>> @@ -829,7 +829,7 @@ fix_with_system (tFixDesc* p_fixd,
>>       /*
>>        *  Now add the fix number and file names that may be needed
>>        */
>> -      sprintf (pz_scan, " %ld '%s' '%s'",  (long) (p_fixd - fixDescList),
>> +      sprintf (pz_scan, " %ld '%s' '%s' '%s'", (long) (p_fixd - fixDescList),
>>               pz_fix_file, pz_file_source, pz_temp_file);
>>     }
>>   else /* NOT an "internal" fix: */
> 
> This, almost certainly.  I'll take a peek at the source and convince myself of
> this decade old mistake tomorrow & send my grateful thanks and approval then.
> (No access to source today.)

Fine, I stay tuned.

Tristan.
Bruce Korb April 18, 2012, 6:23 p.m. UTC | #3
Hi,

When I approved a patch in 2008, there was a typo.  I didn't
notice and it was "fixed" by removing a formatting element.
Your patch corrects the error.

Please apply your changes to active branches.  Thank you!
Regards, Bruce
Tristan Gingold April 24, 2012, 9:25 a.m. UTC | #4
On Apr 18, 2012, at 8:23 PM, Bruce Korb wrote:

> Hi,
> 
> When I approved a patch in 2008, there was a typo.  I didn't
> notice and it was "fixed" by removing a formatting element.
> Your patch corrects the error.
> 
> Please apply your changes to active branches.  Thank you!
> Regards, Bruce

Thanks, committed on the trunk.

Tristan.
diff mbox

Patch

diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
index e7de791..f1fb2ff 100644
--- a/fixincludes/configure.ac
+++ b/fixincludes/configure.ac
@@ -53,7 +53,8 @@  fi],
        i?86-*-msdosdjgpp* | \
        i?86-*-mingw32* | \
        x86_64-*-mingw32* | \
-       *-*-beos* )
+       *-*-beos* | \
+        *-*-*vms*)
                TARGET=twoprocess
                ;;
 
diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
index 9f399ab..1133534 100644
--- a/fixincludes/fixincl.c
+++ b/fixincludes/fixincl.c
@@ -829,7 +829,7 @@  fix_with_system (tFixDesc* p_fixd,
       /*
        *  Now add the fix number and file names that may be needed
        */
-      sprintf (pz_scan, " %ld '%s' '%s'",  (long) (p_fixd - fixDescList),
+      sprintf (pz_scan, " %ld '%s' '%s' '%s'", (long) (p_fixd - fixDescList),
               pz_fix_file, pz_file_source, pz_temp_file);
     }
   else /* NOT an "internal" fix: */