Mail Archives: cygwin/1999/04/10/20:59:38
On Fri, 09 Apr 1999 17:26:05 Mumit Khan wrote:
>"Phil Edwards" <devphil AT my-dejanews DOT com> writes:
>>
>> I've been doing some work under B20.1/egcs-1.1.2 using
>> -mno-cygwin, and getting errors when I try to use the
>> standard algorithm random_shuffle() (which I have
>> used before, so I know the STL code isn't completely
>> full of cheese, etc).
>
>Please look up the specs for random_shuffle -- it requires a
>random access iterator (hint: use deque as opposed to list).
Well, crap. First time I've ever screwed up because
of ISO noncompliance. And my cow-orkers rely on me
to tell them these things...
>Here's a patch for Mingw ... please patch the stl_config.h file located
>in the <install_root>/include/g++ directory with the following:
>
>--- stl_config.h.~1 Fri Apr 9 17:19:19 1999
>+++ stl_config.h Fri Apr 9 17:20:38 1999
>@@ -138,6 +138,10 @@
> # define __STL_USE_NAMESPACES
> # endif
>
>+# if defined(__GNUC__) && defined(__MINGW32__)
>+# define __STL_NO_DRAND48
>+# endif
>+
> # if defined(_MSC_VER)
> # if _MSC_VER > 1000
> # include <yvals.h>
>
Patched and tested. All is well!
As always, I am in your debt. Thanks again,
Phil
-----== Sent via Deja News, The Discussion Network ==-----
http://www.dejanews.com/ Easy access to 50,000+ discussion forums
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -