delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/04/10/20:59:38

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
To: "Cygwin List" <cygwin AT sourceware DOT cygnus DOT com>
Date: Sat, 10 Apr 1999 16:58:12 -0800
From: "Phil Edwards" <devphil AT my-dejanews DOT com>
Message-ID: <JCCLJOBKMNNFAAAA@my-dejanews.com>
Mime-Version: 1.0
X-Sent-Mail: off
X-Mailer: MailCity Service
Subject: Re: random_shuffle failure on B20.1?
X-Sender-Ip: 162.18.75.91
Organization: Deja News Mail (http://www.my-dejanews.com:80)

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019