Re: Failure in rebuilding Cygwin-1.5.24-2 with recent newlib

2007-06-17 Thread Corinna Vinschen
On Jun 16 20:33, Christopher Faylor wrote:
 On Sat, Jun 16, 2007 at 09:47:41PM +0200, Corinna Vinschen wrote:
 Chris, do you know why we maintain our own sys.cdefs.h?  It looks
 like we could just delete it.
 
 Cygwin's cdefs.h predates the newlib version.  I've removed Cygwin's version.

Thanks.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


Re: Failure in rebuilding Cygwin-1.5.24-2 with recent newlib

2007-06-16 Thread Brian Dessent
Angelo Graziosi wrote:
 
 I want to flag that rebuilding Cygwin-1.5.24-2 with recent checkout of
 newlib fails in this way:

It's really not a good idea to mix and match like that, you can run into
subtle breakage that way as the two are meant to be kept in sync.  For
example, if newlib added a new function (as in this case) it will be
present in the headers but it won't get exported by the DLL since that
requires changes in cygwin.din.  And thus if you try to use the
combination of lib+headers that you just built you'll get failures since
the latter declares an interface that the former doesn't export.

And besides, Newlib and Cygwin are in the same CVS repository so all you
have to do is check out the cygwin module and you get the latest newlib
module automatically.

 '/home/Angelo/Downloads/cygwin_varie/Snapshots/cygwin-1.5.24-2p5/newlib/libc/string/'`strcasestr.c
 /home/Angelo/Downloads/cygwin_varie/Snapshots/cygwin-1.5.24-2p5/newlib/libc/string/strcasestr.c:72:
  error: parse
 error before string constant
 /home/Angelo/Downloads/cygwin_varie/Snapshots/cygwin-1.5.24-2p5/newlib/libc/string/strcasestr.c:72:
  warning: data
 definition has no type or storage class

This is just due to __FBSDID not getting #defined to blank properly. 
The file includes sys/cdefs.h and newlib's copy contains the required
bit (#define __FBSDID(x) /* nothing */) however when building with
Cygwin, the Cygwin headers are used and Cygwin's sys/cdefs.h doesn't
contain this.  The appropriate fix is either to modify strcasestr.c or
to fix Cygwin's sys/cdefs.h.  I think the latter is probably the better
choice, since it seems that there is precedent already in newlib for
being able to just #include sys/cdefs.h followed by use of __FBSDID
without having to explicitly undefine it.  Patch attached which fixes
the build for me.

Brian2007-06-16  Brian Dessent  [EMAIL PROTECTED]

* include/sys/cdefs.h (__FBSDID): Define.

Index: include/sys/cdefs.h
===
RCS file: /cvs/src/src/winsup/cygwin/include/sys/cdefs.h,v
retrieving revision 1.4
diff -u -p -r1.4 cdefs.h
--- include/sys/cdefs.h 8 Aug 2005 18:54:28 -   1.4
+++ include/sys/cdefs.h 16 Jun 2007 15:28:58 -
@@ -21,3 +21,4 @@ details. */
 #define  __CONCAT(__x,__y)   __x##__y
 #endif
 
+#define __FBSDID(x) /* nothing */


Re: Failure in rebuilding Cygwin-1.5.24-2 with recent newlib

2007-06-16 Thread Corinna Vinschen
On Jun 16 08:38, Brian Dessent wrote:
 This is just due to __FBSDID not getting #defined to blank properly. 
 The file includes sys/cdefs.h and newlib's copy contains the required
 bit (#define __FBSDID(x) /* nothing */) however when building with
 Cygwin, the Cygwin headers are used and Cygwin's sys/cdefs.h doesn't
 contain this.  The appropriate fix is either to modify strcasestr.c or
 to fix Cygwin's sys/cdefs.h.  I think the latter is probably the better
 choice, since it seems that there is precedent already in newlib for
 being able to just #include sys/cdefs.h followed by use of __FBSDID
 without having to explicitly undefine it.  Patch attached which fixes
 the build for me.

Thanks for the patch.  However, when comparing newlib's and Cygwin's
sys/cdefs.h file, I'm wondering why Cygwin needs its own version of
sys/cdefs.h at all.

Chris, do you know why we maintain our own sys.cdefs.h?  It looks
like we could just delete it.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


Re: Failure in rebuilding Cygwin-1.5.24-2 with recent newlib

2007-06-16 Thread Corinna Vinschen
On Jun 16 21:47, Corinna Vinschen wrote:
 On Jun 16 08:38, Brian Dessent wrote:
  This is just due to __FBSDID not getting #defined to blank properly. 
  The file includes sys/cdefs.h and newlib's copy contains the required
  bit (#define __FBSDID(x) /* nothing */) however when building with
  Cygwin, the Cygwin headers are used and Cygwin's sys/cdefs.h doesn't
  contain this.  The appropriate fix is either to modify strcasestr.c or
  to fix Cygwin's sys/cdefs.h.  I think the latter is probably the better
  choice, since it seems that there is precedent already in newlib for
  being able to just #include sys/cdefs.h followed by use of __FBSDID
  without having to explicitly undefine it.  Patch attached which fixes
  the build for me.
 
 Thanks for the patch.  However, when comparing newlib's and Cygwin's
 sys/cdefs.h file, I'm wondering why Cygwin needs its own version of
 sys/cdefs.h at all.
 
 Chris, do you know why we maintain our own sys.cdefs.h?  It looks
 like we could just delete it.

...and add the missing __CONCAT definition to newlib's cdefs.h.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


Re: Failure in rebuilding Cygwin-1.5.24-2 with recent newlib

2007-06-16 Thread Christopher Faylor
On Sat, Jun 16, 2007 at 09:47:41PM +0200, Corinna Vinschen wrote:
On Jun 16 08:38, Brian Dessent wrote:
 This is just due to __FBSDID not getting #defined to blank properly. 
 The file includes sys/cdefs.h and newlib's copy contains the required
 bit (#define __FBSDID(x) /* nothing */) however when building with
 Cygwin, the Cygwin headers are used and Cygwin's sys/cdefs.h doesn't
 contain this.  The appropriate fix is either to modify strcasestr.c or
 to fix Cygwin's sys/cdefs.h.  I think the latter is probably the better
 choice, since it seems that there is precedent already in newlib for
 being able to just #include sys/cdefs.h followed by use of __FBSDID
 without having to explicitly undefine it.  Patch attached which fixes
 the build for me.

Thanks for the patch.  However, when comparing newlib's and Cygwin's
sys/cdefs.h file, I'm wondering why Cygwin needs its own version of
sys/cdefs.h at all.

Chris, do you know why we maintain our own sys.cdefs.h?  It looks
like we could just delete it.

Cygwin's cdefs.h predates the newlib version.  I've removed Cygwin's version.

cgf