Mail Archives: cygwin/1999/12/06/15:02:30
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 AT cygnus DOT com> on 12/06/99 10:10:31 AM
Please respond to cygwin AT sourceware DOT cygnus DOT com
To: Tom Williams/HQ/dssi
cc: cygwin AT sourceware DOT cygnus DOT 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 AT sourceware DOT cygnus DOT com
- Raw text -