delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/08/12:19:03

Sender: bkorb AT sco DOT COM
Message-ID: <399031D7.6FF8F2E1@sco.com>
Date: Tue, 08 Aug 2000 09:14:15 -0700
From: Bruce Korb <bkorb AT sco DOT COM>
Organization: The Santa Cruz Operation
X-Mailer: Mozilla 4.7 [en] (X11; I; SCO_SV 3.2 i386)
X-Accept-Language: en
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp-workers AT delorie DOT com, Bruce Korb <bkorb AT gnu DOT org>
Subject: Re: DJGPP patch for fixincludes
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000808092918 DOT 4905A-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:
> > As for your other patch, I am going to disable the file name test
> > disablement.  It is not really necessary for the "make check" to
> > run on DOS.
> 
> My problem was that only a couple of tests are marked to catch
> testing.h.

Precisely.  The fixes are targeted to specific files that do not
occur under DJGPP-DOS.  The "check.tpl" file causes the relevant
"test_text" entries to appear in files with the correct name.
So, yes, I am comfortable with the DOS testing only being applied
to the "testing.h" header.

> > I think it safe to assume that ``system(3)'' will work essentially
> > the same way on UNIX and DOS.
> 
> That is not a very good assumption, although when $SHELL points to
> Bash, the similarity is almost 100%, because in that case, DJGPP's
> system(3) simply invokes Bash with its unmodified argument.

Well, then if they do not have Bash installed, it is entirely possible
that fixincl will not run.  It is certain to not run correctly if they
do not have ``sed(1)'' installed.  :-)  OTOH, fixincl does have a rather
constrained command set that it uses.  As long as ``system(3)'' can
correctly handle this style of quoting:

  sed -e 's/'\''/"/'

all will be well.

> > (By the way, if ``pz_machine'' is NULL, then fixincl is operating in
> > test mode.)
> 
> I thought someone might want to test all the machines and all the
> files separately, so I didn't want to overload $TARGET_MACHINE and
> `pz_machine' with more magic meaning.

Its magic meaning is constrained to one thing:  fixincl is running
in testing mode.  I should improve the commentary on that....

> Of course, if you remove it, the following line in Makefile.DOS:
> 
>         export FIXINCL_TEST=y ; export TARGET_MACHINE=* ; \
> 
> should instead say this:
> 
>         export TARGET_MACHINE="*" ; \

Clearly.

> The diffs against fixinc/tests/base/testing.h are below.  Do you think
> I should debug this?

The blank lines are an interesting nuisance.
The 'strncmp()' thingey is a problem with the sed expression
in the sysv68_string fix:

    /*
     *  This sed expression is broken inside fixincl.
     *  The same expression seems to work outside, however :-(
     */
    sed = "/^\tstrncmp(),$/N";
    sed = 's/^\(' "\t" 'strncmp()\),\n\(' "\t" 'strlen(),\)$/'
            '\1;' "\\\nextern unsigned int\\\n\\2/";

If you can fix that one, it would be wonderful  :-).
The missing NULL define is a problem, however.
That needs to be run down.

> --- ./fixinc/tests/base/testing.h       Wed Jul 19 17:18:30 2000
> +++ ./include.dos/testing.h     Mon Aug  7 20:40:58 2000
> @@ -7,8 +7,6 @@
>      This had to be done to correct non-standard usages in the
>      original, manufacturer supplied header file.  */
> 
> -
> -
>  #if defined( CTRL_QUOTES_DEF_CHECK )
>  #define _CTRL(c) (c&037)
>  #endif  /* CTRL_QUOTES_DEF_CHECK */
> @@ -59,8 +57,7 @@
>         *memccpy(),
>         memcpy();
>  extern int
> -       strncmp();
> -extern unsigned int
> +       strncmp(),
>         strlen(),
>         strspn();
>  extern size_t
> @@ -77,3 +74,8 @@
>  #endif
> 
>  #endif  /* UNDEFINE_NULL_CHECK */
> +
> +
> +#ifndef NULL
> +#define NULL 0
> +#endif

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019