Mail Archives: djgpp-workers/2000/07/26/05:42:31
On Tue, 25 Jul 2000, Bruce Korb wrote:
> Hey, this was easy. What's the big deal? ;-)
>
> Attached are two patches.
Thanks!
Were these diffs generated against the current CVS, or to the last
released version (or something else)?
> The patch assumes that __DOS__ is defined.
The correct symbol is __MSDOS__ (or MSDOS, without the underscores).
> All fix tests that depend on using a server shell are presumed
> to NOT APPLY in DOS-land. All fixes that use a shell script
> to produce the modification (all of one example anyway) are
> also presumed to NOT APPLY.
Hmm... I'm afraid I don't know enough about this to comment off the
top of my head. DJGPP does have a working port of Bash, and our
system(3) knows how to run a script if Bash is installed, so if the
fixes performed by a shell script are useful, we could retain them.
I have a few comments, based on code inspection; hopefully, they will
be useful to whoever works on this (or to myself ;-).
> + pz_tmptmp = (char*)xmalloc( strlen( argv[4] ) + 5 );
> + sprintf( pz_tmptmp, "%sX", argv[4] );
> + if (freopen( pz_tmptmp, "w", stdout ) != stdin)
^^^^^
Shouldn't this be stdout?
> + # ifdef __DOS__
> + {
> + tSCC z_tmp_fname_fmt[] = "%s/fxinc%03X.tp";
> + char* pz = getenv( "TMP" );
> + if (pz == NULL)
> + pz = "/tmp";
> + pz_temp_file = (char*)xmalloc (sizeof(z_tmp_fname_fmt) + strlen (pz));
> + sprintf (pz_temp_file, z_tmp_fname_fmt, pz, getpid() & 0x0FFF);
> + }
> + # endif
This should probably use $TMPDIR or tempnam().
> ! #else
> ! /*
> ! * IF we are in MS-DOS land, then whatever shell-type test is required
> ! * will, by definition, fail
> ! */
> ! #define test_test(t,tf) SKIP_FIX
> ! #endif
See my comment above: if Bash is installed (and it must be, in order
to build GCC), these shell tests need not fail.
Thanks again.
- Raw text -