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


Here is the patch:

--- arscan.c-orig   Fri Nov  1 14:08:25 1996
+++ arscan.c   Mon Dec  6 19:12:46 1999
@@ -434,14 +434,21 @@ ar_name_equal (name, mem, truncated)
       abort ();
 #else
       struct ar_hdr hdr;
-      return !strncmp (name, mem,
-                sizeof (hdr.ar_name) -
+
+      /* Changed code to determine the truncated amount to remove
+         the #ifdef code that was in the middle of the call to strncmp
+         to fix a gcc-2.95.2 on Linux 2.2.13 compile problem.
+         Code changed by Tom Williams on 12/6/99
+         e-mail: tomdkat@home.com
+       */
+      int amount = 0;
 #if !defined (__hpux) && !defined (cray)
-                1
+       amount = 1;
 #else
-                2
-#endif /* !__hpux && !cray */
-                );
+       amount = 2;
+#endif /* !__hupx && !cray */
+       return !strncmp (name, mem,
+                sizeof (hdr.ar_name) - amount);
 #endif
     }

Peace......

Tom




Chris Faylor <cgf@cygnus.com> on 12/06/99 01:47:03 PM

Please respond to cygwin@sourceware.cygnus.com

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




On Mon, Dec 06, 1999 at 01:10:31PM -0500, Chris Faylor wrote:
>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.
I'm sorry.  This is not a patch.  Peruse past mailing list articles for
information on generating patches.  Hint:  You use diff.
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]