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]

libstdc++-v3 patch [Re: build successful (was Re: winsup in EGCS?)]


Phil Edwards <pedwards@jaj.com> writes:
> 
> Now if I can work around the different "nan" signatures in the math
> library, I can get libstdc++-v3 built.  Cool!
> 

This is something from way back, but may help.

Thu Apr 20 09:49:58 1999  Mumit Khan  <khan@xraylith.wisc.edu>

	* bits/c++config.h (mbstate_t): Define for Cygwin as well.
	* bits/std_cwchar.h: Cygwin declares conflicting prototypes.
	* math/complex-stub.h (nan): Newlib's nan has different signature.
	* math/mathconf.h (NAN): Define for Cygwin/newlib.

Index: bits/c++config.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/c++config.h,v
retrieving revision 1.19
diff -u -3 -p -r1.19 c++config.h
--- bits/c++config.h	1999/03/18 23:26:19	1.19
+++ bits/c++config.h	1999/04/22 15:50:52
@@ -89,7 +89,7 @@ enum
 #undef _ISbit
 #endif
 
-#ifdef __sun__
+#if defined (__sun__) || defined (__CYGWIN__)
 /* When we auto-generate this file this definition will done automatically
    as well.  */
 typedef struct {
Index: bits/std_cwchar.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/std_cwchar.h,v
retrieving revision 1.5
diff -u -3 -p -r1.5 std_cwchar.h
--- bits/std_cwchar.h	1998/12/31 23:15:39	1.5
+++ bits/std_cwchar.h	1999/04/22 15:50:52
@@ -38,6 +38,7 @@
 
 # include_next <wchar.h>
 
+#ifndef __CYGWIN__
 // XXX These don't belong here only if the system header does not define them. 
 extern "C" {
 int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n);
@@ -47,5 +48,6 @@ wchar_t *wmemmove (wchar_t *__s1, const 
 wchar_t *wmemcpy (wchar_t *__s1, const wchar_t *__s2, size_t __n);
 wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n);
 }
+#endif
 
 #endif
Index: math/complex-stub.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/math/complex-stub.h,v
retrieving revision 1.6
diff -u -3 -p -r1.6 complex-stub.h
--- math/complex-stub.h	1998/12/31 23:15:40	1.6
+++ math/complex-stub.h	1999/04/22 15:50:52
@@ -86,6 +86,8 @@ double __mycabs (__complex__ double x);
 float __mycabsf (__complex__ float x);
 long double __mycabsl (__complex__ long double x);
 
+#ifndef __CYGWIN__
 double nan (const char *s);
+#endif
 
 #endif
Index: math/mathconf.h
===================================================================
RCS file: /cvs/libstdc++/libstdc++/math/mathconf.h,v
retrieving revision 1.7
diff -u -3 -p -r1.7 mathconf.h
--- math/mathconf.h	1998/12/31 23:15:40	1.7
+++ math/mathconf.h	1999/04/22 15:50:52
@@ -113,8 +113,13 @@ typedef int Int32_t __attribute ((mode (
 # endif
 #endif
 
+
 #ifndef NAN
+#ifdef __CYGWIN__
+# define NAN (nan ())
+#else
 # define NAN (nan (""))
+#endif
 #endif
 
 
Regards,
Mumit


--
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]