Subject: Patch to build cross compiler: RedHat6.0 -> Cygwin20.1
From: "D. Richard Hipp" <[email-masked]>
To: [email-masked]
Date: Thu, 22 Jul 1999 10:58:51 -0400

I've been working on getting Cygwin20.1 to build as a cross-compiler
on a new RedHat 6.0 server.  I had two problems, one of which
involved a patch to the source tree.  I'm posted the patch here
on the off chance that someone might be interested.

The problem is in the file src/make/arscan.c.  It appears that
in RedHat 6.0 the strncmp() function is really a macro, and that
preprocessor directives like "#if" are no allowed within the
arguments to a macro.  Hence:

--------------- BEGIN PATCH ------------------
*** arscan.c    Thu Jul 22 10:05:37 1999
--- arscan.c.orig       Thu Jul 22 10:05:21 1999
***************
*** 434,446 ****
        abort ();
  #else
        struct ar_hdr hdr;
!       int n;
  #if !defined (__hpux) && !defined (cray)
!       n = 1;
  #else
!       n = 2;
  #endif /* !__hpux && !cray */
!       return !strncmp (name, mem, sizeof (hdr.ar_name) - n);
  #endif
      }
  
--- 434,447 ----
        abort ();
  #else
        struct ar_hdr hdr;
!       return !strncmp (name, mem,
!                      sizeof (hdr.ar_name) - 
  #if !defined (__hpux) && !defined (cray)
!                      1
  #else
!                      2
  #endif /* !__hpux && !cray */
!                      );
  #endif
      }
----------------- END PATCH ------------------

The other problem I had was that the cross-compiler will not
build if "." is anywhere on your PATH environment variable.
If "." is on your path, then target tools sometimes get used
in place of host tools.

I'm not a subscriber to this group.  Please let me know if
I have posted this bug report to the wrong place.

-- 
D. Richard Hipp -- [email-masked] -- http://www.hwaci.com/drh/

--
Want to unsubscribe from this list?
Send a message to [email-masked]