From MAILER-DAEMON Fri Oct 03 22:00:49 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A5biz-0003DN-He
	for mharc-bug-commoncpp@gnu.org; Fri, 03 Oct 2003 22:00:49 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A5bis-0003D9-OT
	for bug-commoncpp@gnu.org; Fri, 03 Oct 2003 22:00:42 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A5biM-0002vI-Qv
	for bug-commoncpp@gnu.org; Fri, 03 Oct 2003 22:00:41 -0400
Received: from [199.232.41.2] (helo=subversions.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1A5biM-0002u2-C4
	for bug-commoncpp@gnu.org; Fri, 03 Oct 2003 22:00:10 -0400
Received: from www-data by subversions.gnu.org with local (Exim 4.20)
	id 1A5bga-0008Sa-Ib; Fri, 03 Oct 2003 21:58:20 -0400
To: bug-commoncpp@gnu.org, jmvignes@broadpark.no, dyfet@ostel.com,
	fedemp@altern.org
From: nobody@savannah.gnu.org
X-Savannah-Server: savannah.gnu.org:443 [199.232.41.3]
X-Savannah-Project: commoncpp
X-Savannah-Artifact: bug
X-Savannah-Artifact-ID: 2128
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux)
X-Apparently-From: 138.89.82.77
Message-Id: <E1A5bga-0008Sa-Ib@subversions.gnu.org>
Sender: www-data <www-data@subversions.gnu.org>
Date: Fri, 03 Oct 2003 21:58:20 -0400
Cc: 
Subject: [bug #2128] Weird troubles with iostream and commonc++
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 04 Oct 2003 02:00:43 -0000


=================== BUG #2128: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2128&group_id=89

Changes by: David Sugar <dyfet@ostel.com>
Date: Fri 10/03/2003 at 21:58 (US/Eastern)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
         Assigned to | fedemp                    | dyfet
              Status | Open                      | Closed




=================== BUG #2128: FULL BUG SNAPSHOT ===================


Submitted by: inful                   Project: commonc++                    
Submitted on: Fri 01/03/2003 at 14:53
Category:  None                       Severity:  5 - Major                  
Bug Group:  None                      Resolution:  Fixed                    
Assigned to:  dyfet                   Status:  Closed                       

Summary:  Weird troubles with iostream and commonc++

Original Submission:  The following snippet is the minimum of code needed to display the problem:
#include <cc++/digest.h>
#include <iostream>
#include <string>
int main(){
  const string &test("d");
  cout << test << endl;
}
When compiled, the following error-messages appear:
test.cpp: In function `int main()':
test.cpp:6: no match for `_IO_ostream_withassign & << const basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> > &'
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:77: candidates are: class ostream & ostream::operator <<(char)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:78:                 class ostream & ostream::operator <<(unsigned char)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:79:                 class ostream & ostream::operator <<(signed char)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:80:                 class ostream & ostream::operator <<(const char *)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:82:                 class ostream & ostream::operator <<(const unsigned char *)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:84:                 class ostream & ostream::operator <<(const signed char *)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:85:                 class ostream & ostream::operator <<(const void *)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:86:                 class ostream & ostream::operator <<(int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:87:                 class ostream & ostream::operator <<(unsigned int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:88:                 class ostream & ostream::operator <<(long int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:89:                 class ostream & ostream::operator <<(long unsigned int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:91:                 class ostream & ostream::operator <<(long long int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:92:                 class ostream & ostream::operator <<(long long unsigned int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:94:                 class ostream & ostream::operator <<(short int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:95:                 class ostream & ostream::operator <<(short unsigned int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:97:                 class ostream & ostream::operator <<(bool)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:99:                 class ostream & ostream::operator <<(double)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:100:                 class ostream & ostream::operator <<(float)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:102:                 class ostream & ostream::operator <<(long double)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:106:                 class ostream & ostream::operator <<(ostream & (*)(ostream &))
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:107:                 class ostream & ostream::operator <<(ios & (*)(ios &))
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:108:                 class ostream & ostream::operator <<(streambuf *)
/usr/include/cc++2/cc++/digest.h:125:                 class ostream & ost::operator <<(ostream &, ost::Digest &)
/usr/include/cc++2/cc++/digest.h:299:                 class ostream & ost::operator <<(ostream &, ost::SHATumbler<unsigned int> &)

This problem goes away as soon as you comment out 
#include <cc++/digest.h>


Follow-up Comments
*******************

-------------------------------------------------------
Date: Fri 01/17/2003 at 17:53       By: fedemp
Curiously enough, gcc 3.x seems to handle this

without trouble. It seems that gcc 2.9x finds

an ambiguity because of the Digest related <<

operators. I guess the easiest way to get 

around this problem is using test.c_str() 

instead of test, which seems to make gcc happy.




CC List
*******

CC Address                          | Comment
------------------------------------+-----------------------------
bug-commoncpp@gnu.org               | 



No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2128&group_id=89

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




From MAILER-DAEMON Sun Oct 05 00:26:50 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A60Tq-0007rA-KM
	for mharc-bug-commoncpp@gnu.org; Sun, 05 Oct 2003 00:26:50 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A60To-0007o0-9P
	for bug-commoncpp@gnu.org; Sun, 05 Oct 2003 00:26:48 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A60TI-00078r-52
	for bug-commoncpp@gnu.org; Sun, 05 Oct 2003 00:26:47 -0400
Received: from [209.225.8.38] (helo=remt28.cluster1.charter.net)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A60TG-00073I-2g
	for bug-commoncpp@gnu.org; Sun, 05 Oct 2003 00:26:14 -0400
Received: from [66.169.100.31] (HELO liliwhite.renaissance.oasis)
	by remt28.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6)
	with ESMTP id 14744274 for bug-commoncpp@gnu.org;
	Sun, 05 Oct 2003 00:26:12 -0400
Received: from lizzy by liliwhite.renaissance.oasis with local (Exim 3.35 #1
	(Debian)) id 1A60T7-0005A4-00
	for <bug-commoncpp@gnu.org>; Sat, 04 Oct 2003 23:26:05 -0500
To: bug-commoncpp@gnu.org
References: <E1A5bga-0008Sa-Ib@subversions.gnu.org>
From: Elizabeth Barham <lizzy@soggytrousers.net>
Date: 04 Oct 2003 23:26:04 -0500
In-Reply-To: nobody@savannah.gnu.org's message of "Fri,
	03 Oct 2003 21:58:20 -0400"
Message-ID: <87smm8gvj7.fsf@liliwhite.renaissance.oasis>
Lines: 40
X-Mailer: Gnus v5.7/Emacs 20.7
Sender: Elizabeth Barham <lizzy@soggytrousers.net>
Subject: Re: [bug #2128] Weird troubles with iostream and commonc++
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 05 Oct 2003 04:26:49 -0000

> Summary:  Weird troubles with iostream and commonc++
> 
> Original Submission:  The following snippet is the minimum of code needed to display the problem:
> #include <cc++/digest.h>
> #include <iostream>
> #include <string>
> int main(){
>   const string &test("d");
>   cout << test << endl;
> }

In trying to figure why this is occurring, I changed the order of the
includes and an odd error shows up:

#include <iostream>
#include <cc++/digest.h>
#include <string>

[ ... ]

In file included from ../include/cc++/digest.h:54,
                 from tester.cpp:2:
../include/cc++/thread.h:318: syntax error before `;'

Which is:

#ifdef HAVE_PTHREAD_RWLOCK
	pthread_rwlock_t _lock; // HERE
#else
	Mutex mutex;
#endif

and my guess is that pthread_rwlock_t is not defined and in the
pre-processor dump I could not find it being defined.

I realize this may not have any direct relevance to the situation at
hand but it seems a bit peculiar.

Sincerely,
Elizabeth



From MAILER-DAEMON Tue Oct 07 22:41:19 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A74GN-0008F1-Pa
	for mharc-bug-commoncpp@gnu.org; Tue, 07 Oct 2003 22:41:19 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A74GM-0008Eu-4Y
	for bug-commoncpp@gnu.org; Tue, 07 Oct 2003 22:41:18 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A74Fq-0007vE-CQ
	for bug-commoncpp@gnu.org; Tue, 07 Oct 2003 22:41:17 -0400
Received: from [144.135.25.155] (helo=mta01ps.bigpond.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A74Fp-0007v7-SJ
	for bug-commoncpp@gnu.org; Tue, 07 Oct 2003 22:40:46 -0400
Received: from udderish ([144.135.25.72]) by mta01ps.email.bigpond.com
	(iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003))
	with SMTP id <0HMF00J4F3FPIB@mta01ps.email.bigpond.com> for
	bug-commoncpp@gnu.org; Wed, 08 Oct 2003 12:40:37 +1000 (EST)
Received: from cpe-203-51-180-162.vic.bigpond.net.au ([203.51.180.162])
	by psmam02bpa.bigpond.com(MAM REL_3_3_2d 80/8649746); Wed,
	08 Oct 2003 12:40:37 +0000
Date: Wed, 08 Oct 2003 12:40:32 +1000
From: Julie Russell <julie.russell@throughput.com.au>
To: bug-commoncpp@gnu.org
Message-id: <CAEDLLCOCGBPMAAFIFOCMEJKCAAA.julie.russell@throughput.com.au>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Subject: Newbie
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Oct 2003 02:41:18 -0000

Hi Everyone,

I have just recently downloaded Common C++ 2 version 1.0.13. I am running
SuSE 8.2 in KDevelop.

I set up the cxxflags as: -I/usr/local/include/cc++2 -D_GNU_SOURCE
I set up the additional libraries
as: -L/usr/local/lib -lccgnu2 -ldl -pthread

I am trying to use the thread libraries and when I add the header
<cc++/thread.h> everything still compiles but when I extend Thread I get
compiler errors.

ie:
class Test : public Thread {
public:
	Test();
	void run();
};

The compiler says class test is a forward declaration, says it's invalid use
of class test and complains about the curly brackets. I assume it's an
initialisation thing, either my flags are wrong, or I am missing something
else.

Would appreciate any help you can give.

Regards,
Julie.





From MAILER-DAEMON Wed Oct 08 03:28:23 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A78kA-0007os-EY
	for mharc-bug-commoncpp@gnu.org; Wed, 08 Oct 2003 03:28:22 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A78jt-0007o3-EF
	for bug-commoncpp@gnu.org; Wed, 08 Oct 2003 03:28:05 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A78jM-0007k2-BP
	for bug-commoncpp@gnu.org; Wed, 08 Oct 2003 03:28:03 -0400
Received: from [150.214.7.5] (helo=mx.imse.cnm.es)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A78jL-0007jl-PI
	for bug-commoncpp@gnu.org; Wed, 08 Oct 2003 03:27:31 -0400
Received: from pcutec.imse.cnm.es (mail@pcutec [150.214.7.153])
	by mx.imse.cnm.es (8.12.10/8.12.3) with ESMTP id h987RK3j015523;
	Wed, 8 Oct 2003 09:27:24 +0200 (MEST)
Received: from fedemp by pcutec.imse.cnm.es with local (Exim 3.35 #1 (Debian))
	id 1A78gO-0000B7-00; Wed, 08 Oct 2003 09:24:28 +0200
Date: Wed, 8 Oct 2003 09:24:28 +0200
From: Federico Montesino Pouzols <fedemp@altern.org>
To: Julie Russell <julie.russell@throughput.com.au>
Message-ID: <20031008072428.GA670@pcutec>
Mail-Followup-To: Julie Russell <julie.russell@throughput.com.au>,
	bug-commoncpp@gnu.org
References: <CAEDLLCOCGBPMAAFIFOCMEJKCAAA.julie.russell@throughput.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAEDLLCOCGBPMAAFIFOCMEJKCAAA.julie.russell@throughput.com.au>
User-Agent: Mutt/1.3.28i
Sender: Federico Montesino Pouzols <fedemp@imse.cnm.es>
Cc: bug-commoncpp@gnu.org
Subject: Re: Newbie
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Federico Montesino Pouzols <fedemp@altern.org>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Oct 2003 07:28:06 -0000


	You should use the flags provided by the script
ccgnu2-config. See the section 'Compiler Options' in the
documentation, or searh the archives of this list if you need more
info.

On Wed, Oct 08, 2003 at 12:40:32PM +1000, Julie Russell wrote:
> Hi Everyone,
> 
> I have just recently downloaded Common C++ 2 version 1.0.13. I am running
> SuSE 8.2 in KDevelop.
> 
> I set up the cxxflags as: -I/usr/local/include/cc++2 -D_GNU_SOURCE
> I set up the additional libraries
> as: -L/usr/local/lib -lccgnu2 -ldl -pthread
> 
> I am trying to use the thread libraries and when I add the header
> <cc++/thread.h> everything still compiles but when I extend Thread I get
> compiler errors.
> 
> ie:
> class Test : public Thread {
> public:
> 	Test();
> 	void run();
> };
> 
> The compiler says class test is a forward declaration, says it's invalid use
> of class test and complains about the curly brackets. I assume it's an
> initialisation thing, either my flags are wrong, or I am missing something
> else.
> 
> Would appreciate any help you can give.
> 
> Regards,
> Julie.
> 
> 
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp



From MAILER-DAEMON Thu Oct 09 01:40:40 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A7TXU-0002V3-82
	for mharc-bug-commoncpp@gnu.org; Thu, 09 Oct 2003 01:40:40 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A7TXS-0002UZ-3t
	for bug-commoncpp@gnu.org; Thu, 09 Oct 2003 01:40:38 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A7TWw-00024m-Bu
	for bug-commoncpp@gnu.org; Thu, 09 Oct 2003 01:40:37 -0400
Received: from [144.135.25.157] (helo=mta03ps.bigpond.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A7TWv-00020V-FU
	for bug-commoncpp@gnu.org; Thu, 09 Oct 2003 01:40:06 -0400
Received: from udderish ([144.135.25.81]) by mta03ps.email.bigpond.com
	(iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003))
	with SMTP id <0HMH00DZ3676A2@mta03ps.email.bigpond.com> for
	bug-commoncpp@gnu.org; Thu, 09 Oct 2003 15:35:30 +1000 (EST)
Received: from cpe-203-51-180-162.vic.bigpond.net.au ([203.51.180.162])
	by psmam05bpa.bigpond.com(MAM REL_3_3_2d 107/9543929); Thu,
	09 Oct 2003 15:35:30 +0000
Date: Thu, 09 Oct 2003 15:35:24 +1000
From: Julie Russell <julie.russell@throughput.com.au>
In-reply-to: <E1A7Gkg-0000wK-1h@monty-python.gnu.org>
To: bug-commoncpp@gnu.org
Message-id: <CAEDLLCOCGBPMAAFIFOCKEJLCAAA.julie.russell@throughput.com.au>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Subject: Setting thread priority
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Oct 2003 05:40:38 -0000

Hi Everyone!

Thanks for all the advice, I've got the libraries installed now! I am trying
to run a thread in an x11 application, using Xine in one window and x11
libraries in the other. Xine uses multi-threading and I am using common
threads to run the other window, however I am experiencing deadlocking. I
want to set the priority of the thread I created to fairly low, however I
couldn't find any documentation on what an average low priority is. Does
anyone know what priority I would be looking at? Also, I noticed that the
constructor of Thread not only takes a priority but a stack size. I am just
learning C++, what stack size would I be looking at setting? Or is there a
default? Does anyone have any suggestions on how else to prevent
deadlocking? I am guessing that they both want to share the video driver,
but I am not sure and have no control over the other threads in the
application, only the one I created.

Thanks again,
Julie.






From MAILER-DAEMON Fri Oct 10 11:21:17 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A7z4u-0007Cg-9o
	for mharc-bug-commoncpp@gnu.org; Fri, 10 Oct 2003 11:21:16 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A7ypz-00012l-7Y
	for bug-commoncpp@gnu.org; Fri, 10 Oct 2003 11:05:51 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A7ygE-0007ei-HH
	for bug-commoncpp@gnu.org; Fri, 10 Oct 2003 10:56:17 -0400
Received: from [217.72.192.165] (helo=mailgate5.cinetic.de)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A7ygC-0007e8-RS
	for bug-commoncpp@gnu.org; Fri, 10 Oct 2003 10:55:45 -0400
Received: from web.de (fmomail03.dlan.cinetic.de [172.20.1.236])
	by mailgate5.cinetic.de (8.11.6p2/8.11.2/SuSE Linux 8.11.0-0.4) with
	SMTP id h9AEMfQ28630
	for bug-commoncpp@gnu.org; Fri, 10 Oct 2003 16:22:41 +0200
Date: Fri, 10 Oct 2003 16:22:41 +0200
Message-Id: <200310101422.h9AEMfQ28630@mailgate5.cinetic.de>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: "Armin Berres" <a.berres@web.de>
To: bug-commoncpp@gnu.org
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Fri, 10 Oct 2003 11:21:15 -0400
Subject: Thread doesn't terminate
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Oct 2003 15:05:52 -0000

Hello everybody!

I got a problem. Im creating a thread but it does't terminate. Thread::isRunning() is always true, even if my Run() Method has terminated! The code of the Method is

void ThreadedDeepDensityMap::Run(void)
{
	GenerateMap();
	Exit();
}

GenerateMap() terminates, Run() too. Why is isRunning still true? Where is the fault?
When Run() has terminated I want to start it again!

Thanks a lot!
Bye!
______________________________________________________________________________
Die Besten ihrer Klasse! WEB.DE FreeMail (1,7) und WEB.DE Club (1,9) -
bei der Stiftung Warentest - ein Doppelsieg! http://f.web.de/?mc=021184




From MAILER-DAEMON Sun Oct 12 10:33:34 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A8hHp-0006Oe-G6
	for mharc-bug-commoncpp@gnu.org; Sun, 12 Oct 2003 10:33:33 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A8hHm-0006Md-Ft
	for bug-commoncpp@gnu.org; Sun, 12 Oct 2003 10:33:30 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A8hHE-000626-TT
	for bug-commoncpp@gnu.org; Sun, 12 Oct 2003 10:33:28 -0400
Received: from [138.89.82.77] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1A8hHE-0005zv-0l
	for bug-commoncpp@gnu.org; Sun, 12 Oct 2003 10:32:56 -0400
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h9CFVUUf023040; Sun, 12 Oct 2003 11:31:30 -0400
From: David Sugar <dyfet@ostel.com>
To: "Armin Berres" <a.berres@web.de>, bug-commoncpp@gnu.org
Date: Sun, 12 Oct 2003 10:43:19 -0400
User-Agent: KMail/1.5
References: <200310101422.h9AEMfQ28630@mailgate5.cinetic.de>
In-Reply-To: <200310101422.h9AEMfQ28630@mailgate5.cinetic.de>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200310121043.19076.dyfet@ostel.com>
Cc: 
Subject: Re: Thread doesn't terminate
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 12 Oct 2003 14:33:31 -0000

First, you cannot directly "restart" a thread that has terminated.  This is 
usually because the thread was originally constructed in the class 
constructor, the object lives as long as it is running, and is usually 
destroyed when it is done.  You could create a new object instance.  But I 
assume you are looking to keep persistant data between exections, and to keep 
them in your derived class?  Is this correct?  If so, I will look at the 
question of thread restartability.  You can suspend and resume a thread, 
however.  Also, what version of Common C++ are you using?

On Friday 10 October 2003 10:22 am, Armin Berres wrote:
> Hello everybody!
>
> I got a problem. Im creating a thread but it does't terminate.
> Thread::isRunning() is always true, even if my Run() Method has terminated!
> The code of the Method is
>
> void ThreadedDeepDensityMap::Run(void)
> {
> 	GenerateMap();
> 	Exit();
> }
>
> GenerateMap() terminates, Run() too. Why is isRunning still true? Where is
> the fault? When Run() has terminated I want to start it again!
>
> Thanks a lot!
> Bye!
> ___________________________________________________________________________
>___ Die Besten ihrer Klasse! WEB.DE FreeMail (1,7) und WEB.DE Club (1,9) -
> bei der Stiftung Warentest - ein Doppelsieg! http://f.web.de/?mc=021184
>
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Sun Oct 12 11:30:52 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A8iBI-0007L4-Mu
	for mharc-bug-commoncpp@gnu.org; Sun, 12 Oct 2003 11:30:52 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A8iBF-0007Jh-M3
	for bug-commoncpp@gnu.org; Sun, 12 Oct 2003 11:30:49 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A8iAi-0007FW-Ft
	for bug-commoncpp@gnu.org; Sun, 12 Oct 2003 11:30:47 -0400
Received: from [138.89.82.77] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1A8iAh-0007F5-M0
	for bug-commoncpp@gnu.org; Sun, 12 Oct 2003 11:30:15 -0400
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h9CGSqUf023376; Sun, 12 Oct 2003 12:28:53 -0400
From: David Sugar <dyfet@ostel.com>
To: Julie Russell <julie.russell@throughput.com.au>, bug-commoncpp@gnu.org
Date: Sun, 12 Oct 2003 11:40:41 -0400
User-Agent: KMail/1.5
References: <CAEDLLCOCGBPMAAFIFOCKEJLCAAA.julie.russell@throughput.com.au>
In-Reply-To: <CAEDLLCOCGBPMAAFIFOCKEJLCAAA.julie.russell@throughput.com.au>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200310121140.41013.dyfet@ostel.com>
Cc: 
Subject: Re: Setting thread priority
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 12 Oct 2003 15:30:50 -0000

If you use a stack size of "0", a default stack size is selected.  I think in 
the Linux kernel environment, since a thread is a seperate process, the stack 
automatically grows in it's own virtual space, so it is not important to use 
stack size there.  However, if you think you will have a lot of automatic 
variables and deep subroutine nesting, you should consider passing an 
appropriate stack size, so that the code will work and not crash on platforms 
other than GNU/Linux :).  FreeBSD, in particular, requires a valid stack for 
each thread, and the default size it uses if you pass 0 may be a bit small.

The other issue to consider is that, depending on the compiler and target 
platform involved, when a thread exits, the stack frame of the thread 
(starting from the "run" method) will NOT be un would, and hence automatic 
objects and classes will NOT have their destructors called automatically.  
Sometimes, for this reason, it is best to have a flag or variable that the 
run method can look at to see when to exit, and then have it fall through a 
return, or have the run method selectivily establish it's own cancellation 
points and call subroutines which are themselves NOT cancellation points, as 
this assures the stack frame will be clean and automatic objects will be 
destroyed since final cancellation can only occur when not in a subroutine, 
assuming your run method itself creates no additional automatic objects.  I 
tend to not use automatic objects at all from my run methods....

As for thread priority, higher is "better", or the reverse of "nice".  Some 
platforms only known three priorities, "higher" than the base process, the 
same, or "lower". 

On Thursday 09 October 2003 01:35 am, Julie Russell wrote:
> Hi Everyone!
>
> Thanks for all the advice, I've got the libraries installed now! I am
> trying to run a thread in an x11 application, using Xine in one window and
> x11 libraries in the other. Xine uses multi-threading and I am using common
> threads to run the other window, however I am experiencing deadlocking. I
> want to set the priority of the thread I created to fairly low, however I
> couldn't find any documentation on what an average low priority is. Does
> anyone know what priority I would be looking at? Also, I noticed that the
> constructor of Thread not only takes a priority but a stack size. I am just
> learning C++, what stack size would I be looking at setting? Or is there a
> default? Does anyone have any suggestions on how else to prevent
> deadlocking? I am guessing that they both want to share the video driver,
> but I am not sure and have no control over the other threads in the
> application, only the one I created.
>
> Thanks again,
> Julie.
>
>
>
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Mon Oct 13 05:40:48 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A8zC4-0000Qs-G4
	for mharc-bug-commoncpp@gnu.org; Mon, 13 Oct 2003 05:40:48 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A8zC1-0000PL-Nc
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 05:40:45 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A8zBV-0000Gy-BB
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 05:40:44 -0400
Received: from [217.72.192.165] (helo=mailgate5.cinetic.de)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8zBU-0000Gj-OX
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 05:40:12 -0400
Received: from web.de (fmomail03.dlan.cinetic.de [172.20.1.236])
	by mailgate5.cinetic.de (8.11.6p2/8.11.2/SuSE Linux 8.11.0-0.4) with
	SMTP id h9D9eBQ02679
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 11:40:11 +0200
Date: Mon, 13 Oct 2003 11:40:11 +0200
Message-Id: <200310130940.h9D9eBQ02679@mailgate5.cinetic.de>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: "Armin Berres" <a.berres@web.de>
To: bug-commoncpp@gnu.org
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: Re: Thread doesn't terminate 
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Oct 2003 09:40:46 -0000

Hi!

I'm using CommonC++-1.5.0 and Win2k.
My problem is, that I need to run the GenerateMap() function again, after it has termiated.
I can't do it with a loop because I have to change some Data in my class first and then Genarate Map should start again in the thread! Both is controlled by the main programm! How can I do this?

Thanks!
______________________________________________________________________________
Zwei Mal Platz 1 mit dem jeweils besten Testergebnis! WEB.DE FreeMail
und WEB.DE Club bei Stiftung Warentest! http://f.web.de/?mc=021183




From MAILER-DAEMON Mon Oct 13 08:59:13 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A92I3-0007NT-SY
	for mharc-bug-commoncpp@gnu.org; Mon, 13 Oct 2003 08:59:11 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A8wvn-0000R8-Cx
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 03:15:51 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A8wvB-0000M9-QY
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 03:15:44 -0400
Received: from [194.67.57.46] (helo=f16.mail.ru)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8wvB-0000M5-EF
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 03:15:13 -0400
Received: from mail by f16.mail.ru with local id 1A8wuj-0008FK-00
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 11:14:45 +0400
Received: from [213.182.180.60] by win.mail.ru with HTTP;
	Mon, 13 Oct 2003 11:14:45 +0400
From: =?koi8-r?Q?=22?=Andrew Batyuck=?koi8-r?Q?=22=20?=<javaman@mail.ru>
To: bug-commoncpp@gnu.org
Mime-Version: 1.0
X-Mailer: mPOP Web-Mail 2.19
X-Originating-IP: 192.168.82.140 via proxy [213.182.180.60]
Date: Mon, 13 Oct 2003 11:14:45 +0400
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 8bit
Message-Id: <E1A8wuj-0008FK-00.javaman-mail-ru@f16.mail.ru>
X-Mailman-Approved-At: Mon, 13 Oct 2003 08:59:09 -0400
Subject: Segmentation fault on example thread2.cpp
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: =?koi8-r?Q?=22?=Andrew Batyuck=?koi8-r?Q?=22=20?= <javaman@mail.ru>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Oct 2003 07:15:52 -0000

Greetings,
I've started learning CommonC++, but after the first example i compiled i encountered problem. 
Compile and run thread2.cpp - program gives out intended output, but after the last line comes 'Segmenation fault' message.
I have SuSE 8.2 Professional installed with last kernel update from SuSE.

Sorry for my poor english and lack of information, writing from work, while problem was encountered at home =(

Regards, Andrew



From MAILER-DAEMON Mon Oct 13 09:34:08 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A92ps-0003G8-G2
	for mharc-bug-commoncpp@gnu.org; Mon, 13 Oct 2003 09:34:08 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A92pp-0003F3-Bx
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 09:34:05 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A92pI-00034n-7E
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 09:34:03 -0400
Received: from [138.89.82.77] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1A92pG-00033x-KI
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 09:33:30 -0400
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h9DEWFUf028837; Mon, 13 Oct 2003 10:32:15 -0400
From: David Sugar <dyfet@ostel.com>
To: "Armin Berres" <a.berres@web.de>, bug-commoncpp@gnu.org
Date: Mon, 13 Oct 2003 09:44:03 -0400
User-Agent: KMail/1.5
References: <200310130906.h9D96AQ05452@mailgate5.cinetic.de>
In-Reply-To: <200310130906.h9D96AQ05452@mailgate5.cinetic.de>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200310130944.03605.dyfet@ostel.com>
Cc: 
Subject: Re: Thread doesn't terminate
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Oct 2003 13:34:06 -0000

First, I would suggest verifying the issue with commoncpp2 (1.0.1x), at 
ftp.gnu.org:/gnu/commonc++

On Monday 13 October 2003 05:06 am, Armin Berres wrote:
> Hi!
>
> I'm using CommonC++-1.5.0 and Win2k.
> My problem is, that I need to run the GenerateMap() function again, after
> it has termiated. I can't do it with a loop because I have to change some
> Data in my class first and then Genarate Map should start again in the
> thread! Both is controlled by the main programm! How can I do this?
>
> Thanks!
> ___________________________________________________________________________
>___ Die Besten ihrer Klasse! WEB.DE FreeMail (1,7) und WEB.DE Club (1,9) -
> bei der Stiftung Warentest - ein Doppelsieg! http://f.web.de/?mc=021184




From MAILER-DAEMON Mon Oct 13 09:56:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A93BU-0004aC-TL
	for mharc-bug-commoncpp@gnu.org; Mon, 13 Oct 2003 09:56:28 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A93BQ-0004ZC-RS
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 09:56:24 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A93Au-0004Q5-Cs
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 09:56:23 -0400
Received: from [217.217.173.190] (helo=paraguas)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A93At-0004Pd-P0
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 09:55:51 -0400
Received: from fedemp by paraguas with local (Exim 3.36 #1 (Debian))
	id 1A93HR-0000o6-00; Mon, 13 Oct 2003 16:02:37 +0200
Date: Mon, 13 Oct 2003 16:02:37 +0200
From: Federico Montesino Pouzols <fedemp@altern.org>
To: Andrew Batyuck  <javaman@mail.ru>
Message-ID: <20031013140237.GA784@paraguas>
Mail-Followup-To: Andrew Batyuck  <javaman@mail.ru>, bug-commoncpp@gnu.org
References: <E1A8wuj-0008FK-00.javaman-mail-ru@f16.mail.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E1A8wuj-0008FK-00.javaman-mail-ru@f16.mail.ru>
User-Agent: Mutt/1.5.4i
Cc: bug-commoncpp@gnu.org
Subject: Re: Segmentation fault on example thread2.cpp
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Federico Montesino Pouzols <fedemp@altern.org>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Oct 2003 13:56:26 -0000


	'Segmentation fault' is actually the good behaviour for this
test, as it tries to access a memory block which has been
freed. Remove the following line:

                // reset memory to test access violation
                memset(this,0,sizeof(*this));

	and check that the test does not lead to a segmentation fault
any more.

On Mon, Oct 13, 2003 at 11:14:45AM +0400, "Andrew Batyuck"  wrote:
> Greetings,
> I've started learning CommonC++, but after the first example i compiled i encountered problem. 
> Compile and run thread2.cpp - program gives out intended output, but after the last line comes 'Segmenation fault' message.
> I have SuSE 8.2 Professional installed with last kernel update from SuSE.
> 
> Sorry for my poor english and lack of information, writing from work, while problem was encountered at home =(
> 
> Regards, Andrew
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp



From MAILER-DAEMON Mon Oct 13 10:08:35 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A93ND-00036B-2m
	for mharc-bug-commoncpp@gnu.org; Mon, 13 Oct 2003 10:08:35 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A93NA-00035u-Ke
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 10:08:32 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A93MY-00030Y-31
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 10:08:30 -0400
Received: from [138.89.82.77] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1A93MX-0002zx-K5
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 10:07:53 -0400
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h9DF6bUf029007; Mon, 13 Oct 2003 11:06:37 -0400
From: David Sugar <dyfet@ostel.com>
To: Federico Montesino Pouzols <fedemp@altern.org>,
	Andrew Batyuck <javaman@mail.ru>
Date: Mon, 13 Oct 2003 10:18:25 -0400
User-Agent: KMail/1.5
References: <E1A8wuj-0008FK-00.javaman-mail-ru@f16.mail.ru>
	<20031013140237.GA784@paraguas>
In-Reply-To: <20031013140237.GA784@paraguas>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200310131018.26001.dyfet@ostel.com>
Cc: bug-commoncpp@gnu.org
Subject: Re: Segmentation fault on example thread2.cpp
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Oct 2003 14:08:33 -0000

"thread2" was not an "example", but a "test" program, and as Federico points 
out, it was intended to test the fact that a segfault does occur!

On Monday 13 October 2003 10:02 am, Federico Montesino Pouzols wrote:
> 'Segmentation fault' is actually the good behaviour for this
> test, as it tries to access a memory block which has been
> freed. Remove the following line:
>
>                 // reset memory to test access violation
>                 memset(this,0,sizeof(*this));
>
> 	and check that the test does not lead to a segmentation fault
> any more.
>
> On Mon, Oct 13, 2003 at 11:14:45AM +0400, "Andrew Batyuck"  wrote:
> > Greetings,
> > I've started learning CommonC++, but after the first example i compiled i
> > encountered problem. Compile and run thread2.cpp - program gives out
> > intended output, but after the last line comes 'Segmenation fault'
> > message. I have SuSE 8.2 Professional installed with last kernel update
> > from SuSE.
> >
> > Sorry for my poor english and lack of information, writing from work,
> > while problem was encountered at home =(
> >
> > Regards, Andrew
> >
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > Bug-commoncpp@gnu.org
> > http://mail.gnu.org/mailman/listinfo/bug-commoncpp
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Tue Oct 14 08:39:07 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A9OS1-0004wd-6Q
	for mharc-bug-commoncpp@gnu.org; Tue, 14 Oct 2003 08:38:57 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A97j9-0008CM-M7
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 14:47:31 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A97iP-0007a8-Uv
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 14:47:17 -0400
Received: from [200.17.94.5] (helo=toledo.inf.pucrs.br)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A97iB-0006NK-8P
	for bug-commoncpp@gnu.org; Mon, 13 Oct 2003 14:46:31 -0400
Received: from inf.pucrs.br (linux98.inf.pucrs.br [200.17.94.98])
	by toledo.inf.pucrs.br (8.12.10/8.12.8) with ESMTP id h9DIho62015502
	for <bug-commoncpp@gnu.org>; Mon, 13 Oct 2003 15:43:53 -0300 (EST)
Message-ID: <3F8AF1DB.6080505@inf.pucrs.br>
Date: Mon, 13 Oct 2003 15:41:31 -0300
From: vitormr <vitormr@inf.pucrs.br>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
Content-Type: multipart/mixed; boundary="------------010101090909080305060005"
X-ECS-MailScanner: Found to be clean
X-Mailman-Approved-At: Tue, 14 Oct 2003 08:38:55 -0400
Subject: problems with simple examples...
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Oct 2003 18:47:47 -0000

This is a multi-part message in MIME format.
--------------010101090909080305060005
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by toledo.inf.pucrs.br id
	h9DIho62015502

Hello,
I have some problems to generate a Makefile for my examples. Can you=20
help me?
I need a Makefile example to compile a generic .cpp example as a=20
documentation
examples (e.g., bug1, bug2...).

In attach you can see my Makefiles and a simple example.

Thank you,
  V=EDtor

--------------010101090909080305060005
Content-Type: text/plain;
 name="main.cpp"
Content-Disposition: inline;
 filename="main.cpp"
Content-Transfer-Encoding: 7bit

#include <cc++2/cc++/thread.h>
#include <cstdio>

#ifdef  CCXX_NAMESPACES
using namespace std;
using namespace ost;
#endif

// This is a little regression test
// 

class ThreadTest: public Thread
{
public:
        ThreadTest();
        void run();
};

volatile int n = 0;

bool WaitNValue(int value)
{
        for(int i=0;; ++i)
        {
                if (n == value)
                        break;
                if (i >= 100)
                        return false;
                Thread::sleep(10);
        }
        return true;
}

bool WaitChangeNValue(int value)
{
        for(int i=0;; ++i)
        {
                if (n != value)
                        break;
                if (i >= 100)
                        return false;
                Thread::sleep(10);
        }
        return true;
}

ThreadTest::ThreadTest()
{
}

void ThreadTest::run()
{
        setCancel(Thread::cancelDeferred);
        n = 1;

        // wait for main thread
        if (!WaitNValue(2)) return;

        // increment infinitely
        for(;;)
        {
                yield();
                n = n+1;
        }
}

bool TestChange(bool shouldChange)
{
        if (shouldChange)
                printf("- thread should change n...");
        else
                printf("- thread should not change n...");
        if (WaitChangeNValue(n) == shouldChange)
        {
                printf("ok\n");
                return true;
        }
        printf("ko\n");
        return false;
}

#undef ERROR
#undef OK
#define ERROR {printf("ko\n"); return 1; }
#define OK {printf("ok\n"); }

#define TEST_CHANGE(b) if (!TestChange(b)) return 1;

int main(int argc, char* argv[])
{
        ThreadTest test;

        // test only thread, without sincronization
        printf("***********************************************\n");
        printf("* Testing class Thread without syncronization *\n");
        printf("***********************************************\n");

        printf("Testing thread creation\n\n");
        n = 0;
        test.start();

        // wait for n == 1
        printf("- thread should set n to 1...");
        if (WaitNValue(1)) OK
        else ERROR;

        // increment number in thread
        printf("\nTesting thread is working\n\n");
        n = 2;
        TEST_CHANGE(true);
        TEST_CHANGE(true);
        
        // suspend thread, variable should not change
        printf("\nTesting suspend & resume\n\n");
        test.suspend();
        TEST_CHANGE(false);
        TEST_CHANGE(false);

        // resume, variable should change
        test.resume();
        TEST_CHANGE(true);
        TEST_CHANGE(true);

        printf("\nTesting recursive suspend & resume\n\n");
        test.suspend();
        test.suspend();
        TEST_CHANGE(false);
        TEST_CHANGE(false);
        
        test.resume();
        TEST_CHANGE(false);
        TEST_CHANGE(false);
        test.resume();
        TEST_CHANGE(true);
        TEST_CHANGE(true);

        printf("\nTesting no suspend on resume\n\n");
        test.resume();
        TEST_CHANGE(true);
        TEST_CHANGE(true);
                
        // suspend thread, variable should not change
        printf("\nTesting resuspend\n\n");
        test.suspend();
        TEST_CHANGE(false);
        TEST_CHANGE(false);

        printf("\nNow program should finish... :)\n");
        test.resume();

        return 0;
}

--------------010101090909080305060005
Content-Type: text/plain;
 name="Makefile.defs"
Content-Disposition: inline;
 filename="Makefile.defs"
Content-Transfer-Encoding: 7bit


INCDIR = -I. -I$(HOME)/library/include/cc++2 -I$(HOME)/library/include -D_GNU_SOURCE
LIBDIR = -L. -L$(HOME)/library/lib 

LIBS   =  -lccext2 -lccgnu2 -lxml2 -lz -ldl -lpthread $(EXTRA_LIBS)


EXE    = $(MODULE).x

.SUFFIXES: .cc .cpp .o .x

$(EXE): $(OBJS) $(HOME)/library/lib/libccgnu2.a $(HOME)/library/lib/libccext2.a
	$(CC) $(CFLAGS) $(INCDIR) $(LIBDIR) -o $@ $(OBJS) $(LIBS) 2>&1 | c++filt

.cpp.o:
	$(CC) $(CFLAGS) $(INCDIR) -c $<

.cc.o:
	$(CC) $(CFLAGS) $(INCDIR) -c $<

clean::
	rm -f $(OBJS) *~ $(EXE) core



--------------010101090909080305060005
Content-Type: text/plain;
 name="Makefile.gcc"
Content-Disposition: inline;
 filename="Makefile.gcc"
Content-Transfer-Encoding: 7bit

CC     = g++
OPT    = -O3
DEBUG  = -g
OTHER  = -Wall -lpthread
CFLAGS = $(OPT) $(OTHER)
#CFLAGS = $(DEBUG) $(OTHER)

MODULE = run

include Makefile.srcs

OBJS = $(SRCS:.cpp=.o)

include ./Makefile.defs

--------------010101090909080305060005
Content-Type: text/plain;
 name="Makefile.srcs"
Content-Disposition: inline;
 filename="Makefile.srcs"
Content-Transfer-Encoding: 7bit


SRCS =                     \
	bug1.cpp           

--------------010101090909080305060005--




From MAILER-DAEMON Tue Oct 14 10:37:56 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1A9QIY-0000mu-1F
	for mharc-bug-commoncpp@gnu.org; Tue, 14 Oct 2003 10:37:18 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1A9QIF-0000UC-As
	for bug-commoncpp@gnu.org; Tue, 14 Oct 2003 10:36:59 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1A9QHZ-0007l2-OH
	for bug-commoncpp@gnu.org; Tue, 14 Oct 2003 10:36:48 -0400
Received: from [150.214.7.5] (helo=mx.imse.cnm.es)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9QHW-0007Ee-QL
	for bug-commoncpp@gnu.org; Tue, 14 Oct 2003 10:36:15 -0400
Received: from pcutec.imse.cnm.es (mail@pcutec [150.214.7.153])
	by mx.imse.cnm.es (8.12.10/8.12.3) with ESMTP id h9EEZp3j022947;
	Tue, 14 Oct 2003 16:35:53 +0200 (MEST)
Received: from fedemp by pcutec.imse.cnm.es with local (Exim 3.35 #1 (Debian))
	id 1A9QH1-0001b0-00; Tue, 14 Oct 2003 16:35:43 +0200
Date: Tue, 14 Oct 2003 16:35:43 +0200
From: Federico Montesino Pouzols <fedemp@altern.org>
To: vitormr <vitormr@inf.pucrs.br>
Message-ID: <20031014143543.GD468@pcutec>
Mail-Followup-To: vitormr <vitormr@inf.pucrs.br>, bug-commoncpp@gnu.org
References: <3F8AF1DB.6080505@inf.pucrs.br>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <3F8AF1DB.6080505@inf.pucrs.br>
User-Agent: Mutt/1.3.28i
Sender: Federico Montesino Pouzols <fedemp@imse.cnm.es>
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx.imse.cnm.es id
	h9EEZp3j022947
Cc: bug-commoncpp@gnu.org
Subject: Re: problems with simple examples...
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Federico Montesino Pouzols <fedemp@altern.org>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Oct 2003 14:37:15 -0000


	You can get the right compiler/linker flags for you system
from the output of the 'ccgnu2-config' script which is installed with
common c++. You can read detailed instructions in the chapter
"Compiler Options" in the manual, or searching for 'ccgnu2-config' in
the archives of this list.

On Mon, Oct 13, 2003 at 03:41:31PM -0300, vitormr wrote:
> Hello,
> I have some problems to generate a Makefile for my examples. Can you=20
> help me?
> I need a Makefile example to compile a generic .cpp example as a=20
> documentation
> examples (e.g., bug1, bug2...).
>=20
> In attach you can see my Makefiles and a simple example.
>=20
> Thank you,
>  V=EDtor




From MAILER-DAEMON Thu Oct 16 06:00:27 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AA4vQ-0006V1-Dd
	for mharc-bug-commoncpp@gnu.org; Thu, 16 Oct 2003 06:00:08 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AA4v7-00062U-TA
	for bug-commoncpp@gnu.org; Thu, 16 Oct 2003 05:59:49 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AA4u4-0005a9-Se
	for bug-commoncpp@gnu.org; Thu, 16 Oct 2003 05:59:16 -0400
Received: from [217.72.192.165] (helo=mailgate5.cinetic.de)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AA4ts-0005Wn-J1
	for bug-commoncpp@gnu.org; Thu, 16 Oct 2003 05:58:32 -0400
Received: from web.de (fmomail03.dlan.cinetic.de [172.20.1.236])
	by mailgate5.cinetic.de (8.11.6p2/8.11.2/SuSE Linux 8.11.0-0.4) with
	SMTP id h9G9AWQ27558
	for bug-commoncpp@gnu.org; Thu, 16 Oct 2003 11:10:32 +0200
Date: Thu, 16 Oct 2003 11:10:32 +0200
Message-Id: <200310160910.h9G9AWQ27558@mailgate5.cinetic.de>
MIME-Version: 1.0
Organization: http://freemail.web.de/
From: "Armin Berres" <a.berres@web.de>
To: bug-commoncpp@gnu.org
Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Problems using windows.h and thread.h
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Oct 2003 09:59:56 -0000

Hi!

Im using commoncpp2-1.0.13, Win2k and VC++6. If I compile a project which uses thread.h but not windows.h, e.g. the tests, everything is fine! If I want to use windows.h and thread.h I get in trouble with winsock2.h!

C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(99) : error C2011: 'fd_set' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(134) : warning C4005: 'FD_SET' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(83) : see previous definition of 'FD_SET'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(143) : error C2011: 'timeval' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(199) : error C2011: 'hostent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(212) : error C2011: 'netent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(219) : error C2011: 'servent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(226) : error C2011: 'protoent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(310) : error C2011: 'in_addr' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(368) : error C2011: 'sockaddr_in' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(378) : error C2011: 'WSAData' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(430) : warning C4005: 'SO_DONTLINGER' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(391) : see previous definition of 'SO_DONTLINGER'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(483) : warning C4005: 'AF_IPX' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(449) : see previous definition of 'AF_IPX'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(506) : warning C4005: 'AF_MAX' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(468) : see previous definition of 'AF_MAX'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(512) : error C2011: 'sockaddr' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(521) : error C2011: 'sockproto' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(560) : error C2011: 'linger' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(573) : warning C4005: 'SOMAXCONN' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(533) : see previous definition of 'SOMAXCONN'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(598) : warning C4005: 'FD_READ' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(551) : see previous definition of 'FD_READ'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(601) : warning C4005: 'FD_WRITE' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(552) : see previous definition of 'FD_WRITE'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(604) : warning C4005: 'FD_OOB' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(553) : see previous definition of 'FD_OOB'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(607) : warning C4005: 'FD_ACCEPT' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(554) : see previous definition of 'FD_ACCEPT'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(610) : warning C4005: 'FD_CONNECT' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(555) : see previous definition of 'FD_CONNECT'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(613) : warning C4005: 'FD_CLOSE' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(556) : see previous definition of 'FD_CLOSE'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1427) : error C2375: 'accept' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(707) : see declaration of 'accept'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1448) : error C2375: 'bind' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(710) : see declaration of 'bind'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1467) : error C2375: 'closesocket' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(712) : see declaration of 'closesocket'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1486) : error C2375: 'connect' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(714) : see declaration of 'connect'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1507) : error C2375: 'ioctlsocket' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(716) : see declaration of 'ioctlsocket'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1528) : error C2375: 'getpeername' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(718) : see declaration of 'getpeername'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1549) : error C2375: 'getsockname' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(721) : see declaration of 'getsockname'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1572) : error C2375: 'getsockopt' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(724) : see declaration of 'getsockopt'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1593) : error C2375: 'htonl' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(727) : see declaration of 'htonl'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1610) : error C2375: 'htons' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(729) : see declaration of 'htons'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1627) : error C2375: 'inet_addr' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(731) : see declaration of 'inet_addr'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1644) : error C2375: 'inet_ntoa' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(733) : see declaration of 'inet_ntoa'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1662) : error C2375: 'listen' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(735) : see declaration of 'listen'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1680) : error C2375: 'ntohl' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(737) : see declaration of 'ntohl'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1697) : error C2375: 'ntohs' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(739) : see declaration of 'ntohs'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1717) : error C2375: 'recv' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(741) : see declaration of 'recv'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1742) : error C2375: 'recvfrom' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(743) : see declaration of 'recvfrom'

..and so on!
Whats the matter?
Thanks!
______________________________________________________________________________
Zwei Mal Platz 1 mit dem jeweils besten Testergebnis! WEB.DE FreeMail
und WEB.DE Club bei Stiftung Warentest! http://f.web.de/?mc=021183




From MAILER-DAEMON Thu Oct 16 06:36:13 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AA5UJ-00007c-Hp
	for mharc-bug-commoncpp@gnu.org; Thu, 16 Oct 2003 06:36:11 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AA5UE-00005Q-1F
	for bug-commoncpp@gnu.org; Thu, 16 Oct 2003 06:36:06 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AA5Tg-0008S2-GY
	for bug-commoncpp@gnu.org; Thu, 16 Oct 2003 06:36:03 -0400
Received: from [194.67.66.158] (helo=stalker)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AA5Td-000889-Rv
	for bug-commoncpp@gnu.org; Thu, 16 Oct 2003 06:35:30 -0400
Received: from mind.zone (unknown [192.168.13.200])
	by stalker (Postfix) with ESMTP
	id 40DAE3B4; Thu, 16 Oct 2003 17:07:26 +0400 (MSD)
Date: Thu, 16 Oct 2003 14:33:18 +0400
From: Andrey Kulikov <ilfis@dezcom.mephi.ru>
X-Mailer: The Bat! (v2.00)
X-Priority: 3 (Normal)
Message-ID: <53159573359.20031016143318@dezcom.mephi.ru>
To: "Armin Berres" <a.berres@web.de>
In-Reply-To: <200310160910.h9G9AWQ27558@mailgate5.cinetic.de>
References: <200310160910.h9G9AWQ27558@mailgate5.cinetic.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: bug-commoncpp@gnu.org
Subject: Re: Problems using windows.h and thread.h
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Oct 2003 10:36:09 -0000

Hello Armin,

Thursday, October 16, 2003, 1:10:32 PM, you wrote:

AB> Hi!

AB> Im using commoncpp2-1.0.13, Win2k and VC++6. If I compile a
AB> project which uses thread.h but not windows.h, e.g. the tests,
AB> everything is fine! If I want to use windows.h and thread.h I get
AB> in trouble with winsock2.h!

AB> C:\Program Files\Microsoft Visual
AB> Studio\VC98\INCLUDE\winsock2.h(99) : error C2011: 'fd_set' :
AB> 'struct' type redefinition
AB> C:\Program Files\Microsoft Visual
AB> Studio\VC98\INCLUDE\winsock2.h(134) : warning C4005: 'FD_SET' :
AB> macro redefinition
AB>         C:\Program Files\Microsoft Visual
AB> Studio\VC98\INCLUDE\winsock.h(743) : see declaration of 'recvfrom'

AB> ..and so on!
AB> Whats the matter?
AB> Thanks!

It becoms because your windows.h include winsock.h, but CommonC++
include winsock2.h
For solving this problem update your Platform SDK (i try it on
Platform SDK 2000, and everything was be ok), or everywhere where you
include windows.h you must write:

#define _WINSOCKAPI_
#include <windows.h>

On the VC++ 7.1 (VS2003) this problems not appears.


-- 
Best regards,
 Andrey                            mailto:ilfis@dezcom.mephi.ru




From MAILER-DAEMON Mon Oct 20 04:37:08 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1ABVXI-0005s1-7p
	for mharc-bug-commoncpp@gnu.org; Mon, 20 Oct 2003 04:37:08 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1ABKDT-0000Tn-K8
	for bug-commoncpp@gnu.org; Sun, 19 Oct 2003 16:31:55 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1ABKCx-0000KK-EO
	for bug-commoncpp@gnu.org; Sun, 19 Oct 2003 16:31:54 -0400
Received: from [62.140.230.9] (helo=haides.fiord.ru)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1ABKCw-0000GC-Rt
	for bug-commoncpp@gnu.org; Sun, 19 Oct 2003 16:31:23 -0400
Received: from zeves.fiord.ru (zeves.fiord.ru [62.140.230.5])
	by haides.fiord.ru (8.12.10/8.12.10) with ESMTP id h9JKUrCU017767
	for <bug-commoncpp@gnu.org>; Mon, 20 Oct 2003 00:30:56 +0400
Received: from station (9.232.140.62.fiord.ru [62.140.232.9])
	by zeves.fiord.ru (8.9.1a/8.9.1/ASN) with SMTP id AAA12085
	for <bug-commoncpp@gnu.org>; Mon, 20 Oct 2003 00:31:56 +0400 (MSD)
Message-ID: <000801c39680$3abef800$5901a8c0@station>
From: "Artem Gvozdin" <joky@rambler.ru>
To: <bug-commoncpp@gnu.org>
Date: Mon, 20 Oct 2003 00:33:10 +0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
X-Mailman-Approved-At: Mon, 20 Oct 2003 04:37:06 -0400
Subject: ost::Thread possible bug
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Oct 2003 20:31:56 -0000

Hello.
I writing multi threaded daemon, that accepts connection from unix
socket(one thread per client, nothing very advanced), using ost::Thread and
ost::unixstream.
With high connection count at second, some about 1000/s, SIGSEGV accurs in
Thread::detach at thread.cpp:729.
        _start = start;
        rtn = pthread_create(&priv->_tid, &priv->_attr,
exec_t(&ccxx_exec_handler), this);
729: if(!rtn && priv->_tid)
                return 0;
        return -1;
I use commonc++ '2' version 1.0.13 on Debian Woody 3.0r0. I don't debug soo
deep to understand from what things this occurs. I only wrote a self simple
ost::Thread implementation that works fine.
Sorry if these already known issue. And thanks for you'r very usefull
Framework :)




From MAILER-DAEMON Mon Oct 27 07:05:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AE67G-00005Y-Ky
	for mharc-bug-commoncpp@gnu.org; Mon, 27 Oct 2003 07:04:58 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AE58p-0003Gf-Nj
	for bug-commoncpp@gnu.org; Mon, 27 Oct 2003 06:02:31 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AE58I-0002gg-Ql
	for bug-commoncpp@gnu.org; Mon, 27 Oct 2003 06:02:30 -0500
Received: from [153.1.55.62] (helo=mail.cs.uta.fi)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AE58I-0002fB-3Z
	for bug-commoncpp@gnu.org; Mon, 27 Oct 2003 06:01:58 -0500
Received: from uta.fi (unknown [153.1.60.143])
	by mail.cs.uta.fi (Postfix) with ESMTP id 128E76EB04
	for <bug-commoncpp@gnu.org>; Mon, 27 Oct 2003 13:01:58 +0200 (EET)
Message-ID: <3F9CED15.2000307@uta.fi>
Date: Mon, 27 Oct 2003 12:01:57 +0200
From: Rami Saarinen <rami.saarinen@uta.fi>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Mon, 27 Oct 2003 07:04:57 -0500
Subject: Borland C++ Builder 5, w2k and sockets
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 27 Oct 2003 11:02:33 -0000

Hello and sorry to bother you again for those who have read this message 
from the sourceforge forums. I have been trying to get the library 
compiled for BCB5, but ran into some trouble. The reason why I won't be 
using minGW or cygwin is that I am working on some research project at 
my school and it uses some BCB5 resources. I'm also a bit green on 
Windows so either way I am heading towards trouble.

I have also added all the other files except fifo.cpp and xml.cpp as 
they create errors and I think I won't be needing them.

<beg>
Please, please, please give me some enlightment for this matter as I'd 
really hate to look out for another cross-platform threading and 
networking library and change my project to use it. **sob** I am _so_ 
desperate!
<\beg>

So the original message was:

I'm currently trying to get the commoncpp compiled with BCB5 (on win2k) 
and having some trouble with it. Switching from BCB5 is not an option at 
the moment and I'd really like to have the cc++ at hand. To this point I 
have been developing in Linux, but I want to make the project to work on 
Windows too (hence I chose the ccpp at the first place). All I really 
need is the threading and network functionality.

After several feeble attempts I chose to edit (with my limited makefile 
writing abilities) the BCC5 makefile as my make version did not have a 
clue about the '%' stuff (nor did I). You find the modiefied version at 
the end of this message (sorry about the size). I also added "#define 
__MT__" to config.h

To my surprise all files compiled nicely (after I have added the winsoc 
stuff, as instructed by a friend). There are warnings during (I guess) 
the creation of the LIB file:

Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise Corporation
Warning duplicate symbol: @ost@Exception@what$xqv
Warning duplicate symbol: @ost@Exception@what$xqv
Warning duplicate symbol: @ost@Exception@what$xqv
Warning duplicate symbol: @ost@Thread@final$qv
Warning duplicate symbol: @ost@Thread@getExtended$qv
Warning duplicate symbol: @ost@Thread@getExtended$qv
Warning duplicate symbol: @ost@Thread@initial$qv
Warning duplicate symbol: @ost@Thread@notify$qp10ost@Thread
Warning duplicate symbol: @ost@Thread@notify$qp10ost@Thread

Ok. As brute force and ignorance usually works in situations like this I 
decided to give it a try nonetheless. First I tried to compile the 
thread1.cpp test program with:

$ bcc32 -WC -lap -I..\\..\\include -I..\\ ws2_32.lib ccgnu2.lib thread1.cpp

Some warnings of type (there is usually quite a lot of them):
"Warning W8026 ..\..\include\cc++/exception.h 87: Functions with 
exception specifications are not expanded inline"

But thread1.exe executes nicely without a problem. Now I tried 
tcpstr1.cpp with:

$ bcc32 -WC -lap -Lc:\\progra~1\\borland\\cbuilder5\\lib 
-I..\\..\\include -I..\\ ccgnu2.lib ws2_32.lib tcpstr1.
cpp

Again lot of those inline warnings (and about argc and argv not used in 
main). And running the tcpstr1.exe causes:

"The instruction at 0x... referenced memory at 0x... The memory could 
not be "read""

and so on for 14 times, some of them about memory could not be 
"written". I took a look and found that the probles start on line " 
tcpstream tcp("127.0.0.1:96000");" inside the ThreadOut class.

I'd be very happy for any kind of feedback and ideas. Pretty please? 
Needless to say that I'm not so familiar with developing on windows.

Thanks!

----------------------------------------------------

Here's the Makefile.bcc:

# GNU Makefile to build CommonC++ using Borland CC 5.5.1

prefix = c:\\progra~1\\borland\\cbuilder5
includedir = $(prefix)\\include
bindir = $(prefix)\\bin
libdir = $(prefix)\\lib

BCC = bcc32.exe -w- -tWM -I..\\win32 -I..\\src -I$(includedir) -I..\\include
ILIB = ilink32.exe -L$(libdir) -L$(libdir)\\psdk -c -Tpd ws2_32.lib 
wsock32.lib
IMPLIB = implib.exe -c

LIBS = cw32mt import32

OBJS = inaddr.obj socket.obj peer.obj mempager.obj threadkey.obj 
keydata.obj mutex.obj exception.obj slog.obj semaphore.obj thread.obj 
event.obj peer.obj file.obj friends.obj port.obj

ccgnu2.dll ccgnu2.lib:
$(ILIB) c0d32 $(OBJS), $@, ,$(LIBS)
$(IMPLIB) ccgnu2.lib ccgnu2.dll

all: ccgnu2.dll ccgnu2.lib

ccgnu2.dll: thread.obj threadkey.obj event.obj file.obj friends.obj 
exception.obj mutex.obj port.obj inaddr.obj peer.obj socket.obj slog.obj 
mempager.obj keydata.obj semaphore.obj

clean:
$(RM) *.dll *.lib *.ilc *.ild *.ilf *.ils *.map *.tds *.obj

inaddr.obj: ..\\src\\inaddr.cpp
$(BCC) -c ..\\src\\inaddr.cpp

socket.obj: ..\\src\\socket.cpp
$(BCC) -c ..\\src\\socket.cpp

peer.obj: ..\\src\\peer.cpp
$(BCC) -c ..\\src\\peer.cpp

event.obj: ..\\src\\event.cpp
$(BCC) -c ..\\src\\event.cpp

file.obj: ..\\src\\file.cpp
$(BCC) -c ..\\src\\file.cpp
friends.obj: ..\\src\\friends.cpp
$(BCC) -c ..\\src\\friends.cpp
port.obj: ..\\src\\port.cpp
$(BCC) -c ..\\src\\port.cpp

mempager.obj: ..\\src\\mempager.cpp
$(BCC) -c ..\\src\\mempager.cpp

thread.obj: ..\\src\\thread.cpp
$(BCC) -c ..\\src\\thread.cpp

threadkey.obj: ..\\src\\threadkey.cpp
$(BCC) -c ..\\src\\threadkey.cpp

keydata.obj: ..\\src\\keydata.cpp
$(BCC) -c ..\\src\\keydata.cpp

mutex.obj: ..\\src\\mutex.cpp
$(BCC) -c ..\\src\\mutex.cpp

exception.obj: ..\\src\\exception.cpp
$(BCC) -c ..\\src\\exception.cpp

slog.obj: ..\\src\\slog.cpp
$(BCC) -c ..\\src\\slog.cpp

semaphore.obj: ..\\src\\semaphore.cpp
$(BCC) -c ..\\src\\semaphore.cpp



--
Rami Saarinen
rami.saarinen@uta.fi




From MAILER-DAEMON Fri Oct 31 21:42:02 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AFliE-0004Br-1R
	for mharc-bug-commoncpp@gnu.org; Fri, 31 Oct 2003 21:42:02 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AFlRm-0007RU-Ss
	for bug-commoncpp@gnu.org; Fri, 31 Oct 2003 21:25:02 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AFlRG-0007BE-6W
	for bug-commoncpp@gnu.org; Fri, 31 Oct 2003 21:25:01 -0500
Received: from [129.137.2.128] (helo=webmail.uc.edu)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AFlRF-0007BB-UE
	for bug-commoncpp@gnu.org; Fri, 31 Oct 2003 21:24:29 -0500
Received: (from apache@localhost)
	by webmail.uc.edu (8.11.6/8.11.6) id hA12g0s06763
	for bug-commoncpp@gnu.org; Fri, 31 Oct 2003 21:42:00 -0500
X-Authentication-Warning: webmail.uc.edu: apache set sender to
	deshmua@mail.ececs.uc.edu using -f
To: bug-commoncpp@gnu.org
Message-ID: <1067654520.3fa31d78a6286@webmail.uc.edu>
Date: Fri, 31 Oct 2003 21:42:00 -0500 (EST)
From: deshmua@mail.ececs.uc.edu
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: IMP/PHP IMAP webmail program 2.2.7
X-Originating-IP: 10.63.7.155
X-Mailman-Approved-At: Fri, 31 Oct 2003 21:41:59 -0500
Subject: newbie question: help with writing multithreaded server
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 01 Nov 2003 02:25:03 -0000

Hi,

** sorry for posting a newbie question here, if there is a separate list for 
such questions, please let it be known ***

I just started using GNU Common C++. I have a problem understanding
the class organization of this package. I'm trying to create
a class that starts off multiple TCP servers (each in a separate thread).
Is there something analogous to the Java ServerSocket class that creates
and listens on a socket to accept connections (which may be eventually 
services in a separate thread)

I come from Java background, so I find it difficult to understand why
such a simple task seems to be so complicated with this library.
Ideally I am looking for something like:

--------------------snip code---------------------
// in the class "MultipleServices"
class MultipleServices {
MyThread *service_1; 
MyThread *service_2;
.
.
.
// in constructor or some method...
*service_1 = new MyThread(server_port_1);
*service_2 = new MyThread(server_port_2);
service_1->start();
service_2->start();
.
.
.
}; // class MultipleServices ends.



class MyThread : public Thread {
.
.
.
// MyThread's run method is describe briefly below:
void run() {
    serverSocket = new ServerSocket(port);
    while (true) {
        sock = serverSocket->accept(); // block till someone connects
        service(sock); // this may or may not start in its on thread
    }
}
}; // class MyThread ends
--------------------snip code---------------------

Can anyone write the same code in a concise way using the "GNU Common C++"
library. I'm particularly confused since I cannot understand GNU Common C++
analogy to ServerSocket class in Java.

TIA,
~ amol



