This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problems compiling dev-src (Cygwin B20.1) on Linux


Ok, here it is.  The code that is commented out did not compile using
gcc-2.95.2 on Linux 2.2.13 w/ glibc-2.1.2.  The code as it stands below
(with the inclusion of the "snippd" part) compiles just fine.  I'm not sure
if it's a gcc bug.

file: arscan.c
function: int ar_name_equal()
old code:

int
ar_name_equal (name, mem, truncated)
     char *name, *mem;
     int truncated;
{
[snip]

#else     /* AIX or APOLLO.  */

  if (truncated)
    {
#ifdef AIAMAG
      /* TRUNCATED should never be set on this system.  */
      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
    }

  return !strcmp (name, mem);

#endif
}

**** patched code:

#else
      struct ar_hdr hdr;
      int amount = 0;
#if !defined (__hpux) && !defined (cray)
      amount = 1;
#else
      amount = 2;
#endif  /* !__hpux && !cray */
      return !strncmp (name, mem,
                 sizeof (hdr.ar_name) - amount);
#endif
  return !strcmp (name, mem);

#endif
}




Chris Faylor <cgf@cygnus.com> on 12/06/99 10:10:31 AM

Please respond to cygwin@sourceware.cygnus.com

To:   Tom Williams/HQ/dssi
cc:   cygwin@sourceware.cygnus.com
Subject:  Re: problems compiling dev-src (Cygwin B20.1) on Linux




On Sun, Dec 05, 1999 at 06:11:26PM -0800, Tom Williams wrote:
>Hi!  I was trying to build Cygwin B20.1 from source (dev-src) on Linux
>(2.2.13 kernel w/ glibc-2.1.2) in an attempt to build a Linux hosted,
Win32
>targetted cross compiler based on gcc-2.95.2.
>
>I found the file arscan.c would not compile due to some #ifdef coding for
>portability in a certain function.
>
>How should I send in the "patch" I made to get it to properly compile?
Send the patch to the mailing list.
I assume that it is small enough that it won't bother anyone.
cgf







--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]